mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-07-21 12:29:40 +00:00
Compare commits
6 Commits
v8.3.2
...
update-kno
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8d58d7e62 | ||
|
|
47a7f4fb2e | ||
|
|
71966eff34 | ||
|
|
f12b1f0a84 | ||
|
|
ecd24dd710 | ||
|
|
6a19136684 |
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
||||
uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
source-root: src
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
||||
uses: github/codeql-action/autobuild@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -73,4 +73,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
||||
uses: github/codeql-action/analyze@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
|
||||
|
||||
18
README.md
18
README.md
@@ -26,7 +26,7 @@ Set up your GitHub Actions workflow with a specific version of [uv](https://docs
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
```
|
||||
|
||||
If you do not specify a version, this action will look for a [required-version](https://docs.astral.sh/uv/reference/settings/#required-version)
|
||||
@@ -42,7 +42,7 @@ Have a look under [Advanced Configuration](#advanced-configuration) for detailed
|
||||
|
||||
```yaml
|
||||
- name: Install uv with all available options
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
# The version of uv to install (default: searches for version in config files, then latest)
|
||||
version: ""
|
||||
@@ -100,7 +100,7 @@ Have a look under [Advanced Configuration](#advanced-configuration) for detailed
|
||||
cache-local-path: ""
|
||||
|
||||
# Prune cache before saving
|
||||
prune-cache: "true"
|
||||
prune-cache: "false"
|
||||
|
||||
# Upload managed Python installations to the GitHub Actions cache
|
||||
cache-python: "false"
|
||||
@@ -148,7 +148,7 @@ This will override any python version specifications in `pyproject.toml` and `.p
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv and set the python version to 3.13t
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
python-version: 3.13t
|
||||
- run: uv pip install --python=3.13t pip
|
||||
@@ -166,7 +166,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Install the latest version of uv and set the python version
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Test with python ${{ matrix.python-version }}
|
||||
@@ -183,7 +183,7 @@ It also controls where [the venv gets created](#activate-environment), unless `v
|
||||
|
||||
```yaml
|
||||
- name: Install uv based on the config files in the working-directory
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
working-directory: my/subproject/dir
|
||||
```
|
||||
@@ -225,7 +225,7 @@ For example:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@main
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
enable-cache: true
|
||||
- name: Test
|
||||
@@ -237,7 +237,7 @@ To install a specific version of Python, use
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
enable-cache: true
|
||||
- name: Install Python 3.12
|
||||
@@ -256,7 +256,7 @@ output:
|
||||
uses: actions/checkout@main
|
||||
- name: Install the default version of uv
|
||||
id: setup-uv
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
- name: Print the installed version
|
||||
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
|
||||
```
|
||||
|
||||
4
__tests__/cache/restore-cache.test.ts
vendored
4
__tests__/cache/restore-cache.test.ts
vendored
@@ -62,13 +62,13 @@ describe("restoreCache", () => {
|
||||
expect(cacheKey).toContain("-tests-3.10%2C3.11");
|
||||
});
|
||||
|
||||
it("keeps cache keys unchanged for exact Python versions and simple suffixes", async () => {
|
||||
it("uses an unpruned cache key by default", async () => {
|
||||
const inputs = createSetupInputs({ cacheSuffix: "tests-3.11" });
|
||||
|
||||
await restoreCache(inputs, "3.11");
|
||||
|
||||
expect(cacheKeyOutput()).toBe(
|
||||
"setup-uv-2-x86_64-unknown-linux-gnu-ubuntu-24.04-3.11-pruned-dependencyhash-tests-3.11",
|
||||
"setup-uv-2-x86_64-unknown-linux-gnu-ubuntu-24.04-3.11-dependencyhash-tests-3.11",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -20,7 +20,7 @@ export function createSetupInputs(
|
||||
ignoreEmptyWorkdir: false,
|
||||
ignoreNothingToCache: false,
|
||||
noProject: false,
|
||||
pruneCache: true,
|
||||
pruneCache: false,
|
||||
pythonDir: "/tmp/uv-python-dir",
|
||||
pythonVersion: "",
|
||||
quiet: false,
|
||||
|
||||
@@ -61,7 +61,7 @@ inputs:
|
||||
default: ""
|
||||
prune-cache:
|
||||
description: "Prune cache before saving."
|
||||
default: "true"
|
||||
default: "false"
|
||||
cache-python:
|
||||
description: "Upload managed Python installations to the Github Actions cache."
|
||||
default: "false"
|
||||
|
||||
398
dist/save-cache/index.cjs
generated
vendored
398
dist/save-cache/index.cjs
generated
vendored
@@ -61835,125 +61835,6 @@ var import_node_path = __toESM(require("node:path"), 1);
|
||||
// src/utils/config-file.ts
|
||||
var import_node_fs2 = __toESM(require("node:fs"), 1);
|
||||
|
||||
// node_modules/smol-toml/dist/error.js
|
||||
function getLineColFromPtr(string, ptr) {
|
||||
let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
|
||||
return [lines.length, lines.pop().length + 1];
|
||||
}
|
||||
function makeCodeBlock(string, line, column) {
|
||||
let lines = string.split(/\r\n|\n|\r/g);
|
||||
let codeblock = "";
|
||||
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
||||
for (let i = line - 1; i <= line + 1; i++) {
|
||||
let l = lines[i - 1];
|
||||
if (!l)
|
||||
continue;
|
||||
codeblock += i.toString().padEnd(numberLen, " ");
|
||||
codeblock += ": ";
|
||||
codeblock += l;
|
||||
codeblock += "\n";
|
||||
if (i === line) {
|
||||
codeblock += " ".repeat(numberLen + column + 2);
|
||||
codeblock += "^\n";
|
||||
}
|
||||
}
|
||||
return codeblock;
|
||||
}
|
||||
var TomlError = class extends Error {
|
||||
line;
|
||||
column;
|
||||
codeblock;
|
||||
constructor(message, options) {
|
||||
const [line, column] = getLineColFromPtr(options.toml, options.ptr);
|
||||
const codeblock = makeCodeBlock(options.toml, line, column);
|
||||
super(`Invalid TOML document: ${message}
|
||||
|
||||
${codeblock}`, options);
|
||||
this.line = line;
|
||||
this.column = column;
|
||||
this.codeblock = codeblock;
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/smol-toml/dist/util.js
|
||||
function isEscaped(str, ptr) {
|
||||
let i = 0;
|
||||
while (str[ptr - ++i] === "\\")
|
||||
;
|
||||
return --i && i % 2;
|
||||
}
|
||||
function indexOfNewline(str, start = 0, end = str.length) {
|
||||
let idx = str.indexOf("\n", start);
|
||||
if (str[idx - 1] === "\r")
|
||||
idx--;
|
||||
return idx <= end ? idx : -1;
|
||||
}
|
||||
function skipComment(str, ptr) {
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
let c = str[i];
|
||||
if (c === "\n")
|
||||
return i;
|
||||
if (c === "\r" && str[i + 1] === "\n")
|
||||
return i + 1;
|
||||
if (c < " " && c !== " " || c === "\x7F") {
|
||||
throw new TomlError("control characters are not allowed in comments", {
|
||||
toml: str,
|
||||
ptr
|
||||
});
|
||||
}
|
||||
}
|
||||
return str.length;
|
||||
}
|
||||
function skipVoid(str, ptr, banNewLines, banComments) {
|
||||
let c;
|
||||
while (1) {
|
||||
while ((c = str[ptr]) === " " || c === " " || !banNewLines && (c === "\n" || c === "\r" && str[ptr + 1] === "\n"))
|
||||
ptr++;
|
||||
if (banComments || c !== "#")
|
||||
break;
|
||||
ptr = skipComment(str, ptr);
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
function skipUntil(str, ptr, sep7, end, banNewLines = false) {
|
||||
if (!end) {
|
||||
ptr = indexOfNewline(str, ptr);
|
||||
return ptr < 0 ? str.length : ptr;
|
||||
}
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
let c = str[i];
|
||||
if (c === "#") {
|
||||
i = indexOfNewline(str, i);
|
||||
} else if (c === sep7) {
|
||||
return i + 1;
|
||||
} else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
throw new TomlError("cannot find end of structure", {
|
||||
toml: str,
|
||||
ptr
|
||||
});
|
||||
}
|
||||
function getStringEnd(str, seek) {
|
||||
let first = str[seek];
|
||||
let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first;
|
||||
seek += target.length - 1;
|
||||
do
|
||||
seek = str.indexOf(target, ++seek);
|
||||
while (seek > -1 && first !== "'" && isEscaped(str, seek));
|
||||
if (seek > -1) {
|
||||
seek += target.length;
|
||||
if (target.length > 1) {
|
||||
if (str[seek] === first)
|
||||
seek++;
|
||||
if (str[seek] === first)
|
||||
seek++;
|
||||
}
|
||||
}
|
||||
return seek;
|
||||
}
|
||||
|
||||
// node_modules/smol-toml/dist/date.js
|
||||
var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
||||
var TomlDate = class _TomlDate extends Date {
|
||||
@@ -62046,93 +61927,153 @@ var TomlDate = class _TomlDate extends Date {
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/smol-toml/dist/error.js
|
||||
function getLineColFromPtr(string, ptr) {
|
||||
let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
|
||||
return [lines.length, lines.pop().length + 1];
|
||||
}
|
||||
function makeCodeBlock(string, line, column) {
|
||||
let lines = string.split(/\r\n|\n|\r/g);
|
||||
let codeblock = "";
|
||||
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
||||
for (let i = line - 1; i <= line + 1; i++) {
|
||||
let l = lines[i - 1];
|
||||
if (!l)
|
||||
continue;
|
||||
codeblock += i.toString().padEnd(numberLen, " ");
|
||||
codeblock += ": ";
|
||||
codeblock += l;
|
||||
codeblock += "\n";
|
||||
if (i === line) {
|
||||
codeblock += " ".repeat(numberLen + column + 2);
|
||||
codeblock += "^\n";
|
||||
}
|
||||
}
|
||||
return codeblock;
|
||||
}
|
||||
var TomlError = class extends Error {
|
||||
line;
|
||||
column;
|
||||
codeblock;
|
||||
constructor(message, options) {
|
||||
const [line, column] = getLineColFromPtr(options.toml, options.ptr);
|
||||
const codeblock = makeCodeBlock(options.toml, line, column);
|
||||
super(`Invalid TOML document: ${message}
|
||||
|
||||
${codeblock}`, options);
|
||||
this.line = line;
|
||||
this.column = column;
|
||||
this.codeblock = codeblock;
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/smol-toml/dist/primitive.js
|
||||
var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
|
||||
var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
|
||||
var LEADING_ZERO = /^[+-]?0[0-9_]/;
|
||||
var ESCAPE_REGEX = /^[0-9a-f]{2,8}$/i;
|
||||
var ESC_MAP = {
|
||||
b: "\b",
|
||||
t: " ",
|
||||
n: "\n",
|
||||
f: "\f",
|
||||
r: "\r",
|
||||
e: "\x1B",
|
||||
'"': '"',
|
||||
"\\": "\\"
|
||||
};
|
||||
function parseString(str, ptr = 0, endPtr = str.length) {
|
||||
let isLiteral = str[ptr] === "'";
|
||||
let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1];
|
||||
function parseString(str, ptr) {
|
||||
let c = str[ptr++];
|
||||
let first = c;
|
||||
let isLiteral = c === "'";
|
||||
let isMultiline = c === str[ptr] && c === str[ptr + 1];
|
||||
if (isMultiline) {
|
||||
endPtr -= 2;
|
||||
if (str[ptr += 2] === "\r")
|
||||
ptr++;
|
||||
if (str[ptr] === "\n")
|
||||
if (str[ptr += 2] === "\n")
|
||||
ptr++;
|
||||
else if (str[ptr] === "\r" && str[ptr + 1] === "\n")
|
||||
ptr += 2;
|
||||
}
|
||||
let tmp = 0;
|
||||
let isEscape;
|
||||
let parsed = "";
|
||||
let sliceStart = ptr;
|
||||
while (ptr < endPtr - 1) {
|
||||
let c = str[ptr++];
|
||||
if (c === "\n" || c === "\r" && str[ptr] === "\n") {
|
||||
if (!isMultiline) {
|
||||
throw new TomlError("newlines are not allowed in strings", {
|
||||
toml: str,
|
||||
ptr: ptr - 1
|
||||
});
|
||||
}
|
||||
let state3 = 0;
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
c = str[i];
|
||||
if (isMultiline && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
|
||||
state3 = state3 && 3;
|
||||
} else if (c < " " && c !== " " || c === "\x7F") {
|
||||
throw new TomlError("control characters are not allowed in strings", {
|
||||
toml: str,
|
||||
ptr: ptr - 1
|
||||
ptr: i
|
||||
});
|
||||
} else if ((!state3 || state3 === 3) && c === first && (!isMultiline || str[i + 1] === first && str[i + 2] === first)) {
|
||||
if (isMultiline) {
|
||||
if (str[i + 3] === first)
|
||||
i++;
|
||||
if (str[i + 3] === first)
|
||||
i++;
|
||||
}
|
||||
if (isEscape) {
|
||||
isEscape = false;
|
||||
return [
|
||||
// If we're in a newline escape still, then there's nothing to add.
|
||||
// Also try to avoid concat if there's nothing to add to parsed, or nothing has been added to parsed.
|
||||
state3 ? parsed : parsed + str.slice(sliceStart, i),
|
||||
i + (isMultiline ? 3 : 1)
|
||||
];
|
||||
} else if (!state3) {
|
||||
if (!isLiteral && c === "\\") {
|
||||
parsed += str.slice(sliceStart, sliceStart = i);
|
||||
state3 = 1;
|
||||
}
|
||||
} else if (state3 === 1) {
|
||||
if (c === "x" || c === "u" || c === "U") {
|
||||
let code = str.slice(ptr, ptr += c === "x" ? 2 : c === "u" ? 4 : 8);
|
||||
if (!ESCAPE_REGEX.test(code)) {
|
||||
throw new TomlError("invalid unicode escape", {
|
||||
toml: str,
|
||||
ptr: tmp
|
||||
});
|
||||
let value = 0;
|
||||
let len = c === "x" ? 2 : c === "u" ? 4 : 8;
|
||||
for (let j = 0; j < len; j++, i++) {
|
||||
let hex = str.charCodeAt(i + 1);
|
||||
let digit = (
|
||||
/* 0-9 */
|
||||
hex >= 48 && hex <= 57 ? hex - 48 : (
|
||||
/* A-F */
|
||||
hex >= 65 && hex <= 70 ? hex - 65 + 10 : (
|
||||
/* a-f */
|
||||
hex >= 97 && hex <= 102 ? hex - 97 + 10 : -1
|
||||
)
|
||||
)
|
||||
);
|
||||
if (digit < 0)
|
||||
throw new TomlError("invalid non-hex character in unicode escape", { toml: str, ptr: i + 1 });
|
||||
value = value << 4 | digit;
|
||||
}
|
||||
try {
|
||||
parsed += String.fromCodePoint(parseInt(code, 16));
|
||||
} catch {
|
||||
throw new TomlError("invalid unicode escape", {
|
||||
toml: str,
|
||||
ptr: tmp
|
||||
});
|
||||
if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) {
|
||||
throw new TomlError("invalid unicode escape", { toml: str, ptr: i });
|
||||
}
|
||||
} else if (isMultiline && (c === "\n" || c === " " || c === " " || c === "\r")) {
|
||||
ptr = skipVoid(str, ptr - 1, true);
|
||||
if (str[ptr] !== "\n" && str[ptr] !== "\r") {
|
||||
parsed += String.fromCodePoint(value);
|
||||
sliceStart = i + 1;
|
||||
state3 = 0;
|
||||
} else if (c === " " || c === " ") {
|
||||
state3 = 2;
|
||||
} else {
|
||||
if (c === "b")
|
||||
parsed += "\b";
|
||||
else if (c === "t")
|
||||
parsed += " ";
|
||||
else if (c === "n")
|
||||
parsed += "\n";
|
||||
else if (c === "f")
|
||||
parsed += "\f";
|
||||
else if (c === "r")
|
||||
parsed += "\r";
|
||||
else if (c === "e")
|
||||
parsed += "\x1B";
|
||||
else if (c === '"')
|
||||
parsed += '"';
|
||||
else if (c === "\\")
|
||||
parsed += "\\";
|
||||
else
|
||||
throw new TomlError("unrecognized escape sequence", { toml: str, ptr: i });
|
||||
sliceStart = i + 1;
|
||||
state3 = 0;
|
||||
}
|
||||
} else if (c !== " " && c !== " ") {
|
||||
if (state3 === 2) {
|
||||
throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
|
||||
toml: str,
|
||||
ptr: tmp
|
||||
ptr: sliceStart
|
||||
});
|
||||
}
|
||||
ptr = skipVoid(str, ptr);
|
||||
} else if (c in ESC_MAP) {
|
||||
parsed += ESC_MAP[c];
|
||||
} else {
|
||||
throw new TomlError("unrecognized escape sequence", {
|
||||
toml: str,
|
||||
ptr: tmp
|
||||
});
|
||||
}
|
||||
sliceStart = ptr;
|
||||
} else if (!isLiteral && c === "\\") {
|
||||
tmp = ptr - 1;
|
||||
isEscape = true;
|
||||
parsed += str.slice(sliceStart, tmp);
|
||||
state3 = !isLiteral && c === "\\" ? 1 : 0;
|
||||
sliceStart = i;
|
||||
}
|
||||
}
|
||||
return parsed + str.slice(sliceStart, endPtr - 1);
|
||||
throw new TomlError("unfinished string", { toml: str, ptr });
|
||||
}
|
||||
function parseValue2(value, toml, ptr, integersAsBigInt) {
|
||||
if (value === "true")
|
||||
@@ -62185,6 +62126,61 @@ function parseValue2(value, toml, ptr, integersAsBigInt) {
|
||||
return date;
|
||||
}
|
||||
|
||||
// node_modules/smol-toml/dist/util.js
|
||||
function indexOfNewline(str, start = 0, end = str.length) {
|
||||
let idx = str.indexOf("\n", start);
|
||||
if (str[idx - 1] === "\r")
|
||||
idx--;
|
||||
return idx <= end ? idx : -1;
|
||||
}
|
||||
function skipComment(str, ptr) {
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
let c = str[i];
|
||||
if (c === "\n")
|
||||
return i;
|
||||
if (c === "\r" && str[i + 1] === "\n")
|
||||
return i + 1;
|
||||
if (c < " " && c !== " " || c === "\x7F") {
|
||||
throw new TomlError("control characters are not allowed in comments", {
|
||||
toml: str,
|
||||
ptr
|
||||
});
|
||||
}
|
||||
}
|
||||
return str.length;
|
||||
}
|
||||
function skipVoid(str, ptr, banNewLines, banComments) {
|
||||
let c;
|
||||
while (1) {
|
||||
while ((c = str[ptr]) === " " || c === " " || !banNewLines && (c === "\n" || c === "\r" && str[ptr + 1] === "\n"))
|
||||
ptr++;
|
||||
if (banComments || c !== "#")
|
||||
break;
|
||||
ptr = skipComment(str, ptr);
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
function skipUntil(str, ptr, sep7, end, banNewLines = false) {
|
||||
if (!end) {
|
||||
ptr = indexOfNewline(str, ptr);
|
||||
return ptr < 0 ? str.length : ptr;
|
||||
}
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
let c = str[i];
|
||||
if (c === "#") {
|
||||
i = indexOfNewline(str, i);
|
||||
} else if (c === sep7) {
|
||||
return i + 1;
|
||||
} else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
throw new TomlError("cannot find end of structure", {
|
||||
toml: str,
|
||||
ptr
|
||||
});
|
||||
}
|
||||
|
||||
// node_modules/smol-toml/dist/extract.js
|
||||
function sliceAndTrimEndOf(str, startPtr, endPtr) {
|
||||
let value = str.slice(startPtr, endPtr);
|
||||
@@ -62218,24 +62214,23 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
||||
}
|
||||
return [value, endPtr2];
|
||||
}
|
||||
let endPtr;
|
||||
if (c === '"' || c === "'") {
|
||||
endPtr = getStringEnd(str, ptr);
|
||||
let parsed = parseString(str, ptr, endPtr);
|
||||
let [parsed, endPtr2] = parseString(str, ptr);
|
||||
if (end) {
|
||||
endPtr = skipVoid(str, endPtr);
|
||||
if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") {
|
||||
endPtr2 = skipVoid(str, endPtr2);
|
||||
if (str[endPtr2] && str[endPtr2] !== "," && str[endPtr2] !== end && str[endPtr2] !== "\n" && str[endPtr2] !== "\r") {
|
||||
throw new TomlError("unexpected character encountered", {
|
||||
toml: str,
|
||||
ptr: endPtr
|
||||
ptr: endPtr2
|
||||
});
|
||||
}
|
||||
endPtr += +(str[endPtr] === ",");
|
||||
if (str[endPtr2] === ",")
|
||||
endPtr2++;
|
||||
}
|
||||
return [parsed, endPtr];
|
||||
return [parsed, endPtr2];
|
||||
}
|
||||
endPtr = skipUntil(str, ptr, ",", end);
|
||||
let slice = sliceAndTrimEndOf(str, ptr, endPtr - +(str[endPtr - 1] === ","));
|
||||
let endPtr = skipUntil(str, ptr, ",", end);
|
||||
let slice = sliceAndTrimEndOf(str, ptr, endPtr - (str[endPtr - 1] === "," ? 1 : 0));
|
||||
if (!slice[0]) {
|
||||
throw new TomlError("incomplete key-value declaration: no value specified", {
|
||||
toml: str,
|
||||
@@ -62244,7 +62239,8 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
||||
}
|
||||
if (end && slice[1] > -1) {
|
||||
endPtr = skipVoid(str, ptr + slice[1]);
|
||||
endPtr += +(str[endPtr] === ",");
|
||||
if (str[endPtr] === ",")
|
||||
endPtr++;
|
||||
}
|
||||
return [
|
||||
parseValue2(slice[0], str, ptr, integersAsBigInt),
|
||||
@@ -62274,13 +62270,7 @@ function parseKey(str, ptr, end = "=") {
|
||||
ptr
|
||||
});
|
||||
}
|
||||
let eos = getStringEnd(str, ptr);
|
||||
if (eos < 0) {
|
||||
throw new TomlError("unfinished string encountered", {
|
||||
toml: str,
|
||||
ptr
|
||||
});
|
||||
}
|
||||
let [part, eos] = parseString(str, ptr);
|
||||
dot = str.indexOf(".", eos);
|
||||
let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
|
||||
let newLine = indexOfNewline(strEnd);
|
||||
@@ -62305,7 +62295,7 @@ function parseKey(str, ptr, end = "=") {
|
||||
});
|
||||
}
|
||||
}
|
||||
parsed.push(parseString(str, ptr, eos));
|
||||
parsed.push(part);
|
||||
} else {
|
||||
dot = str.indexOf(".", ptr);
|
||||
let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot);
|
||||
@@ -62931,10 +62921,10 @@ undici/lib/web/fetch/body.js:
|
||||
undici/lib/web/websocket/frame.js:
|
||||
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
||||
|
||||
smol-toml/dist/error.js:
|
||||
smol-toml/dist/util.js:
|
||||
smol-toml/dist/date.js:
|
||||
smol-toml/dist/error.js:
|
||||
smol-toml/dist/primitive.js:
|
||||
smol-toml/dist/util.js:
|
||||
smol-toml/dist/extract.js:
|
||||
smol-toml/dist/struct.js:
|
||||
smol-toml/dist/parse.js:
|
||||
|
||||
441
dist/setup/index.cjs
generated
vendored
441
dist/setup/index.cjs
generated
vendored
@@ -90506,6 +90506,7 @@ function getOSNameVersion() {
|
||||
}
|
||||
function getLinuxOSNameVersion() {
|
||||
const files = ["/etc/os-release", "/usr/lib/os-release"];
|
||||
let idWithoutVersion;
|
||||
for (const file of files) {
|
||||
try {
|
||||
const content = import_node_fs2.default.readFileSync(file, "utf8");
|
||||
@@ -90522,9 +90523,15 @@ function getLinuxOSNameVersion() {
|
||||
if (id && buildId) {
|
||||
return `${id}-${buildId}`;
|
||||
}
|
||||
if (id && idWithoutVersion === void 0) {
|
||||
idWithoutVersion = id;
|
||||
}
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
if (idWithoutVersion) {
|
||||
return idWithoutVersion;
|
||||
}
|
||||
throw new Error(
|
||||
"Failed to determine Linux distribution. Could not read /etc/os-release or /usr/lib/os-release"
|
||||
);
|
||||
@@ -91093,6 +91100,42 @@ var fs10 = __toESM(require("node:fs"), 1);
|
||||
|
||||
// src/download/checksum/known-checksums.ts
|
||||
var KNOWN_CHECKSUMS = {
|
||||
"aarch64-apple-darwin-0.11.30": "9bed3567d496d8dab84ecf7a1247551ac94ef1baaebb7b65df008dd93e9dc357",
|
||||
"aarch64-pc-windows-msvc-0.11.30": "0edc44e7f23668bce7985facd96b2fe04a4d8ea8edfc7e53294afd8993e960fc",
|
||||
"aarch64-unknown-linux-gnu-0.11.30": "8c11d90f5f66d232930cf8ae3a085c39877690d409e10878234802b028b20e2a",
|
||||
"aarch64-unknown-linux-musl-0.11.30": "7562a40e4e08b1bfd566bd6aeca55a16ee5ac45211554543e8cdb3c395b47416",
|
||||
"arm-unknown-linux-musleabihf-0.11.30": "58967610a6f14f2785e3be3b1b47553b5ff92c3d51bc0f1d9d90d83dc224f0db",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.30": "8e2d2ab63a37af47c1b4126c5871ee191b983a10670af91d8ef0bee198292931",
|
||||
"armv7-unknown-linux-musleabihf-0.11.30": "33b515887e04c79d4d5de5967b8278b9dac1853cc8d657bf77052bab16a6629f",
|
||||
"i686-pc-windows-msvc-0.11.30": "8ceaa74889e30d64adf55d7ad7acce6ed101fb036155bf2d7613715c9d9533c1",
|
||||
"i686-unknown-linux-gnu-0.11.30": "e53221602d83b03c63a5e262bfcbf0f5f6e5972e93847498418bdb42005f04e7",
|
||||
"i686-unknown-linux-musl-0.11.30": "f66898852a6a745a8c0ab0a26e046857ee77c9f24e4a3b64cb078753490b3978",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.30": "81a71fa495239c372b3b0c1bb2509167da00cf307323a2d2a39cbc92f0c6d5d1",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.30": "e2d65822d8f668f6d055679dba4937e386764b9561f9d1269d3bc9e7140f7491",
|
||||
"riscv64gc-unknown-linux-musl-0.11.30": "3d75e26ace5e679e5de26106a71ee775af5c7f7ad872cd04f33b4d53c523a707",
|
||||
"s390x-unknown-linux-gnu-0.11.30": "a30f253aca1291dbcdbb7f76c754235f268ff84d106a595f7d1abf337ab22ac1",
|
||||
"x86_64-apple-darwin-0.11.30": "ce285fbbfbe294b1e1bc6c87c8b59d9622b85383b88b2b132a2df5c73e83d7c1",
|
||||
"x86_64-pc-windows-msvc-0.11.30": "be8d78c992312212e5cc05e9f9de3fa996db73b7c86a186dfb9231eb9f91d33e",
|
||||
"x86_64-unknown-linux-gnu-0.11.30": "04bc7d180d6138bf6dc08387acf507a823f397a98fea55da36b0ccc7fbce3b68",
|
||||
"x86_64-unknown-linux-musl-0.11.30": "023fdd3b59fccfb67b365c69fb34182aaaed1d685d367a57571e3c1468a4c70c",
|
||||
"aarch64-apple-darwin-0.11.29": "61c04acc52a33ef0f331e494bdfbedcdb6c26c6970c022ed3699e5860f8930e3",
|
||||
"aarch64-pc-windows-msvc-0.11.29": "55b597ae81bc29531a7c352a1431a8a73cc2755d7a5b9ec454580cbe02e5154f",
|
||||
"aarch64-unknown-linux-gnu-0.11.29": "94500fb064ae3c971a873cba64d94694c50677e0a4dbf78735c80509e7429919",
|
||||
"aarch64-unknown-linux-musl-0.11.29": "593d79a797ece3f1dfaaf3e0a973263422a135d9262c7dbc6cd75d9c11acc0b4",
|
||||
"arm-unknown-linux-musleabihf-0.11.29": "b160d7eb7dc45af378b3c9dd2cd6b07d64c65b509f2da673434e8e5dc996e5b1",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.29": "7b5717ae304fbb1e94104699fb8c08b32d1537fedc90dd8fcf87768d818951ed",
|
||||
"armv7-unknown-linux-musleabihf-0.11.29": "bfd05286a80b39bd4708bbbb4450fe09f07fea86eea60d31ea2de0b5e816ef54",
|
||||
"i686-pc-windows-msvc-0.11.29": "c173af6f6e125d65214b55d6b75fcf1a32d5e1c3a656938740fe0b2379cd4bcc",
|
||||
"i686-unknown-linux-gnu-0.11.29": "c62af324951ae6f31f9453280e077176c96b6e31897d8133c00411a91a20878f",
|
||||
"i686-unknown-linux-musl-0.11.29": "368dd75d030cae0512631ba0d50604e8471275ec2d9f02836edb91e4c82ad36a",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.29": "641b15637de9fedc7e738b0e4716b2233c792ba6dca722ba0484381749e1a9fd",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.29": "5c1229cc0309ebc6872ee847b8fc75564b3b7688edeb09e19427203e2dbc0ea7",
|
||||
"riscv64gc-unknown-linux-musl-0.11.29": "d4708d913ba88fad9fe1d81da3e13aecadde7a3190cc095a7f2af2fa5c8caa8f",
|
||||
"s390x-unknown-linux-gnu-0.11.29": "fa029183f550a3b00b89c06529fabfa11e0c69c097ccd397a8e7eae46f397348",
|
||||
"x86_64-apple-darwin-0.11.29": "c4c4de482da9ccdd076dc4fb5cfe7b740609029385c72f58606be3153602387d",
|
||||
"x86_64-pc-windows-msvc-0.11.29": "a047d55651bc3e0ca24595b25ec4cfcb10f9dca9fb56514e661269b37d4fae68",
|
||||
"x86_64-unknown-linux-gnu-0.11.29": "04f8b82f5d47f0512dcd32c67a4a6f16a0ea27c81537c338fd0ad6b23cebe829",
|
||||
"x86_64-unknown-linux-musl-0.11.29": "46711858adb2a3acaa9cee00f9060688ad1fd5706aecc005b96a6a7f285a00b7",
|
||||
"aarch64-apple-darwin-0.11.28": "33540eb7c883ab857eff79bd5ac2aa31fe27b595abecb4a9c003a2c998447232",
|
||||
"aarch64-pc-windows-msvc-0.11.28": "3248109afad3ec59baad299d324ff53de17e2d9a3b3e21580ffd26744b11e036",
|
||||
"aarch64-unknown-linux-gnu-0.11.28": "03e9fe0a81b0718d0bc84625de3885df6cc3f89a8b6af6121d6b9f6113fb6533",
|
||||
@@ -96720,125 +96763,6 @@ var import_node_fs6 = __toESM(require("node:fs"), 1);
|
||||
// src/utils/config-file.ts
|
||||
var import_node_fs3 = __toESM(require("node:fs"), 1);
|
||||
|
||||
// node_modules/smol-toml/dist/error.js
|
||||
function getLineColFromPtr(string, ptr) {
|
||||
let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
|
||||
return [lines.length, lines.pop().length + 1];
|
||||
}
|
||||
function makeCodeBlock(string, line, column) {
|
||||
let lines = string.split(/\r\n|\n|\r/g);
|
||||
let codeblock = "";
|
||||
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
||||
for (let i = line - 1; i <= line + 1; i++) {
|
||||
let l = lines[i - 1];
|
||||
if (!l)
|
||||
continue;
|
||||
codeblock += i.toString().padEnd(numberLen, " ");
|
||||
codeblock += ": ";
|
||||
codeblock += l;
|
||||
codeblock += "\n";
|
||||
if (i === line) {
|
||||
codeblock += " ".repeat(numberLen + column + 2);
|
||||
codeblock += "^\n";
|
||||
}
|
||||
}
|
||||
return codeblock;
|
||||
}
|
||||
var TomlError = class extends Error {
|
||||
line;
|
||||
column;
|
||||
codeblock;
|
||||
constructor(message, options) {
|
||||
const [line, column] = getLineColFromPtr(options.toml, options.ptr);
|
||||
const codeblock = makeCodeBlock(options.toml, line, column);
|
||||
super(`Invalid TOML document: ${message}
|
||||
|
||||
${codeblock}`, options);
|
||||
this.line = line;
|
||||
this.column = column;
|
||||
this.codeblock = codeblock;
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/smol-toml/dist/util.js
|
||||
function isEscaped(str, ptr) {
|
||||
let i = 0;
|
||||
while (str[ptr - ++i] === "\\")
|
||||
;
|
||||
return --i && i % 2;
|
||||
}
|
||||
function indexOfNewline(str, start = 0, end = str.length) {
|
||||
let idx = str.indexOf("\n", start);
|
||||
if (str[idx - 1] === "\r")
|
||||
idx--;
|
||||
return idx <= end ? idx : -1;
|
||||
}
|
||||
function skipComment(str, ptr) {
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
let c = str[i];
|
||||
if (c === "\n")
|
||||
return i;
|
||||
if (c === "\r" && str[i + 1] === "\n")
|
||||
return i + 1;
|
||||
if (c < " " && c !== " " || c === "\x7F") {
|
||||
throw new TomlError("control characters are not allowed in comments", {
|
||||
toml: str,
|
||||
ptr
|
||||
});
|
||||
}
|
||||
}
|
||||
return str.length;
|
||||
}
|
||||
function skipVoid(str, ptr, banNewLines, banComments) {
|
||||
let c;
|
||||
while (1) {
|
||||
while ((c = str[ptr]) === " " || c === " " || !banNewLines && (c === "\n" || c === "\r" && str[ptr + 1] === "\n"))
|
||||
ptr++;
|
||||
if (banComments || c !== "#")
|
||||
break;
|
||||
ptr = skipComment(str, ptr);
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
function skipUntil(str, ptr, sep8, end, banNewLines = false) {
|
||||
if (!end) {
|
||||
ptr = indexOfNewline(str, ptr);
|
||||
return ptr < 0 ? str.length : ptr;
|
||||
}
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
let c = str[i];
|
||||
if (c === "#") {
|
||||
i = indexOfNewline(str, i);
|
||||
} else if (c === sep8) {
|
||||
return i + 1;
|
||||
} else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
throw new TomlError("cannot find end of structure", {
|
||||
toml: str,
|
||||
ptr
|
||||
});
|
||||
}
|
||||
function getStringEnd(str, seek) {
|
||||
let first = str[seek];
|
||||
let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first;
|
||||
seek += target.length - 1;
|
||||
do
|
||||
seek = str.indexOf(target, ++seek);
|
||||
while (seek > -1 && first !== "'" && isEscaped(str, seek));
|
||||
if (seek > -1) {
|
||||
seek += target.length;
|
||||
if (target.length > 1) {
|
||||
if (str[seek] === first)
|
||||
seek++;
|
||||
if (str[seek] === first)
|
||||
seek++;
|
||||
}
|
||||
}
|
||||
return seek;
|
||||
}
|
||||
|
||||
// node_modules/smol-toml/dist/date.js
|
||||
var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
||||
var TomlDate = class _TomlDate extends Date {
|
||||
@@ -96931,93 +96855,153 @@ var TomlDate = class _TomlDate extends Date {
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/smol-toml/dist/error.js
|
||||
function getLineColFromPtr(string, ptr) {
|
||||
let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
|
||||
return [lines.length, lines.pop().length + 1];
|
||||
}
|
||||
function makeCodeBlock(string, line, column) {
|
||||
let lines = string.split(/\r\n|\n|\r/g);
|
||||
let codeblock = "";
|
||||
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
||||
for (let i = line - 1; i <= line + 1; i++) {
|
||||
let l = lines[i - 1];
|
||||
if (!l)
|
||||
continue;
|
||||
codeblock += i.toString().padEnd(numberLen, " ");
|
||||
codeblock += ": ";
|
||||
codeblock += l;
|
||||
codeblock += "\n";
|
||||
if (i === line) {
|
||||
codeblock += " ".repeat(numberLen + column + 2);
|
||||
codeblock += "^\n";
|
||||
}
|
||||
}
|
||||
return codeblock;
|
||||
}
|
||||
var TomlError = class extends Error {
|
||||
line;
|
||||
column;
|
||||
codeblock;
|
||||
constructor(message, options) {
|
||||
const [line, column] = getLineColFromPtr(options.toml, options.ptr);
|
||||
const codeblock = makeCodeBlock(options.toml, line, column);
|
||||
super(`Invalid TOML document: ${message}
|
||||
|
||||
${codeblock}`, options);
|
||||
this.line = line;
|
||||
this.column = column;
|
||||
this.codeblock = codeblock;
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/smol-toml/dist/primitive.js
|
||||
var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
|
||||
var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
|
||||
var LEADING_ZERO = /^[+-]?0[0-9_]/;
|
||||
var ESCAPE_REGEX = /^[0-9a-f]{2,8}$/i;
|
||||
var ESC_MAP = {
|
||||
b: "\b",
|
||||
t: " ",
|
||||
n: "\n",
|
||||
f: "\f",
|
||||
r: "\r",
|
||||
e: "\x1B",
|
||||
'"': '"',
|
||||
"\\": "\\"
|
||||
};
|
||||
function parseString(str, ptr = 0, endPtr = str.length) {
|
||||
let isLiteral = str[ptr] === "'";
|
||||
let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1];
|
||||
function parseString(str, ptr) {
|
||||
let c = str[ptr++];
|
||||
let first = c;
|
||||
let isLiteral = c === "'";
|
||||
let isMultiline = c === str[ptr] && c === str[ptr + 1];
|
||||
if (isMultiline) {
|
||||
endPtr -= 2;
|
||||
if (str[ptr += 2] === "\r")
|
||||
ptr++;
|
||||
if (str[ptr] === "\n")
|
||||
if (str[ptr += 2] === "\n")
|
||||
ptr++;
|
||||
else if (str[ptr] === "\r" && str[ptr + 1] === "\n")
|
||||
ptr += 2;
|
||||
}
|
||||
let tmp = 0;
|
||||
let isEscape;
|
||||
let parsed = "";
|
||||
let sliceStart = ptr;
|
||||
while (ptr < endPtr - 1) {
|
||||
let c = str[ptr++];
|
||||
if (c === "\n" || c === "\r" && str[ptr] === "\n") {
|
||||
if (!isMultiline) {
|
||||
throw new TomlError("newlines are not allowed in strings", {
|
||||
toml: str,
|
||||
ptr: ptr - 1
|
||||
});
|
||||
}
|
||||
let state3 = 0;
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
c = str[i];
|
||||
if (isMultiline && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
|
||||
state3 = state3 && 3;
|
||||
} else if (c < " " && c !== " " || c === "\x7F") {
|
||||
throw new TomlError("control characters are not allowed in strings", {
|
||||
toml: str,
|
||||
ptr: ptr - 1
|
||||
ptr: i
|
||||
});
|
||||
} else if ((!state3 || state3 === 3) && c === first && (!isMultiline || str[i + 1] === first && str[i + 2] === first)) {
|
||||
if (isMultiline) {
|
||||
if (str[i + 3] === first)
|
||||
i++;
|
||||
if (str[i + 3] === first)
|
||||
i++;
|
||||
}
|
||||
if (isEscape) {
|
||||
isEscape = false;
|
||||
return [
|
||||
// If we're in a newline escape still, then there's nothing to add.
|
||||
// Also try to avoid concat if there's nothing to add to parsed, or nothing has been added to parsed.
|
||||
state3 ? parsed : parsed + str.slice(sliceStart, i),
|
||||
i + (isMultiline ? 3 : 1)
|
||||
];
|
||||
} else if (!state3) {
|
||||
if (!isLiteral && c === "\\") {
|
||||
parsed += str.slice(sliceStart, sliceStart = i);
|
||||
state3 = 1;
|
||||
}
|
||||
} else if (state3 === 1) {
|
||||
if (c === "x" || c === "u" || c === "U") {
|
||||
let code = str.slice(ptr, ptr += c === "x" ? 2 : c === "u" ? 4 : 8);
|
||||
if (!ESCAPE_REGEX.test(code)) {
|
||||
throw new TomlError("invalid unicode escape", {
|
||||
toml: str,
|
||||
ptr: tmp
|
||||
});
|
||||
let value = 0;
|
||||
let len = c === "x" ? 2 : c === "u" ? 4 : 8;
|
||||
for (let j = 0; j < len; j++, i++) {
|
||||
let hex = str.charCodeAt(i + 1);
|
||||
let digit = (
|
||||
/* 0-9 */
|
||||
hex >= 48 && hex <= 57 ? hex - 48 : (
|
||||
/* A-F */
|
||||
hex >= 65 && hex <= 70 ? hex - 65 + 10 : (
|
||||
/* a-f */
|
||||
hex >= 97 && hex <= 102 ? hex - 97 + 10 : -1
|
||||
)
|
||||
)
|
||||
);
|
||||
if (digit < 0)
|
||||
throw new TomlError("invalid non-hex character in unicode escape", { toml: str, ptr: i + 1 });
|
||||
value = value << 4 | digit;
|
||||
}
|
||||
try {
|
||||
parsed += String.fromCodePoint(parseInt(code, 16));
|
||||
} catch {
|
||||
throw new TomlError("invalid unicode escape", {
|
||||
toml: str,
|
||||
ptr: tmp
|
||||
});
|
||||
if (value < 0 || value > 1114111 || value >= 55296 && value <= 57343) {
|
||||
throw new TomlError("invalid unicode escape", { toml: str, ptr: i });
|
||||
}
|
||||
} else if (isMultiline && (c === "\n" || c === " " || c === " " || c === "\r")) {
|
||||
ptr = skipVoid(str, ptr - 1, true);
|
||||
if (str[ptr] !== "\n" && str[ptr] !== "\r") {
|
||||
parsed += String.fromCodePoint(value);
|
||||
sliceStart = i + 1;
|
||||
state3 = 0;
|
||||
} else if (c === " " || c === " ") {
|
||||
state3 = 2;
|
||||
} else {
|
||||
if (c === "b")
|
||||
parsed += "\b";
|
||||
else if (c === "t")
|
||||
parsed += " ";
|
||||
else if (c === "n")
|
||||
parsed += "\n";
|
||||
else if (c === "f")
|
||||
parsed += "\f";
|
||||
else if (c === "r")
|
||||
parsed += "\r";
|
||||
else if (c === "e")
|
||||
parsed += "\x1B";
|
||||
else if (c === '"')
|
||||
parsed += '"';
|
||||
else if (c === "\\")
|
||||
parsed += "\\";
|
||||
else
|
||||
throw new TomlError("unrecognized escape sequence", { toml: str, ptr: i });
|
||||
sliceStart = i + 1;
|
||||
state3 = 0;
|
||||
}
|
||||
} else if (c !== " " && c !== " ") {
|
||||
if (state3 === 2) {
|
||||
throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
|
||||
toml: str,
|
||||
ptr: tmp
|
||||
ptr: sliceStart
|
||||
});
|
||||
}
|
||||
ptr = skipVoid(str, ptr);
|
||||
} else if (c in ESC_MAP) {
|
||||
parsed += ESC_MAP[c];
|
||||
} else {
|
||||
throw new TomlError("unrecognized escape sequence", {
|
||||
toml: str,
|
||||
ptr: tmp
|
||||
});
|
||||
}
|
||||
sliceStart = ptr;
|
||||
} else if (!isLiteral && c === "\\") {
|
||||
tmp = ptr - 1;
|
||||
isEscape = true;
|
||||
parsed += str.slice(sliceStart, tmp);
|
||||
state3 = !isLiteral && c === "\\" ? 1 : 0;
|
||||
sliceStart = i;
|
||||
}
|
||||
}
|
||||
return parsed + str.slice(sliceStart, endPtr - 1);
|
||||
throw new TomlError("unfinished string", { toml: str, ptr });
|
||||
}
|
||||
function parseValue2(value, toml, ptr, integersAsBigInt) {
|
||||
if (value === "true")
|
||||
@@ -97070,6 +97054,61 @@ function parseValue2(value, toml, ptr, integersAsBigInt) {
|
||||
return date;
|
||||
}
|
||||
|
||||
// node_modules/smol-toml/dist/util.js
|
||||
function indexOfNewline(str, start = 0, end = str.length) {
|
||||
let idx = str.indexOf("\n", start);
|
||||
if (str[idx - 1] === "\r")
|
||||
idx--;
|
||||
return idx <= end ? idx : -1;
|
||||
}
|
||||
function skipComment(str, ptr) {
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
let c = str[i];
|
||||
if (c === "\n")
|
||||
return i;
|
||||
if (c === "\r" && str[i + 1] === "\n")
|
||||
return i + 1;
|
||||
if (c < " " && c !== " " || c === "\x7F") {
|
||||
throw new TomlError("control characters are not allowed in comments", {
|
||||
toml: str,
|
||||
ptr
|
||||
});
|
||||
}
|
||||
}
|
||||
return str.length;
|
||||
}
|
||||
function skipVoid(str, ptr, banNewLines, banComments) {
|
||||
let c;
|
||||
while (1) {
|
||||
while ((c = str[ptr]) === " " || c === " " || !banNewLines && (c === "\n" || c === "\r" && str[ptr + 1] === "\n"))
|
||||
ptr++;
|
||||
if (banComments || c !== "#")
|
||||
break;
|
||||
ptr = skipComment(str, ptr);
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
function skipUntil(str, ptr, sep8, end, banNewLines = false) {
|
||||
if (!end) {
|
||||
ptr = indexOfNewline(str, ptr);
|
||||
return ptr < 0 ? str.length : ptr;
|
||||
}
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
let c = str[i];
|
||||
if (c === "#") {
|
||||
i = indexOfNewline(str, i);
|
||||
} else if (c === sep8) {
|
||||
return i + 1;
|
||||
} else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
throw new TomlError("cannot find end of structure", {
|
||||
toml: str,
|
||||
ptr
|
||||
});
|
||||
}
|
||||
|
||||
// node_modules/smol-toml/dist/extract.js
|
||||
function sliceAndTrimEndOf(str, startPtr, endPtr) {
|
||||
let value = str.slice(startPtr, endPtr);
|
||||
@@ -97103,24 +97142,23 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
||||
}
|
||||
return [value, endPtr2];
|
||||
}
|
||||
let endPtr;
|
||||
if (c === '"' || c === "'") {
|
||||
endPtr = getStringEnd(str, ptr);
|
||||
let parsed = parseString(str, ptr, endPtr);
|
||||
let [parsed, endPtr2] = parseString(str, ptr);
|
||||
if (end) {
|
||||
endPtr = skipVoid(str, endPtr);
|
||||
if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") {
|
||||
endPtr2 = skipVoid(str, endPtr2);
|
||||
if (str[endPtr2] && str[endPtr2] !== "," && str[endPtr2] !== end && str[endPtr2] !== "\n" && str[endPtr2] !== "\r") {
|
||||
throw new TomlError("unexpected character encountered", {
|
||||
toml: str,
|
||||
ptr: endPtr
|
||||
ptr: endPtr2
|
||||
});
|
||||
}
|
||||
endPtr += +(str[endPtr] === ",");
|
||||
if (str[endPtr2] === ",")
|
||||
endPtr2++;
|
||||
}
|
||||
return [parsed, endPtr];
|
||||
return [parsed, endPtr2];
|
||||
}
|
||||
endPtr = skipUntil(str, ptr, ",", end);
|
||||
let slice = sliceAndTrimEndOf(str, ptr, endPtr - +(str[endPtr - 1] === ","));
|
||||
let endPtr = skipUntil(str, ptr, ",", end);
|
||||
let slice = sliceAndTrimEndOf(str, ptr, endPtr - (str[endPtr - 1] === "," ? 1 : 0));
|
||||
if (!slice[0]) {
|
||||
throw new TomlError("incomplete key-value declaration: no value specified", {
|
||||
toml: str,
|
||||
@@ -97129,7 +97167,8 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
||||
}
|
||||
if (end && slice[1] > -1) {
|
||||
endPtr = skipVoid(str, ptr + slice[1]);
|
||||
endPtr += +(str[endPtr] === ",");
|
||||
if (str[endPtr] === ",")
|
||||
endPtr++;
|
||||
}
|
||||
return [
|
||||
parseValue2(slice[0], str, ptr, integersAsBigInt),
|
||||
@@ -97159,13 +97198,7 @@ function parseKey(str, ptr, end = "=") {
|
||||
ptr
|
||||
});
|
||||
}
|
||||
let eos = getStringEnd(str, ptr);
|
||||
if (eos < 0) {
|
||||
throw new TomlError("unfinished string encountered", {
|
||||
toml: str,
|
||||
ptr
|
||||
});
|
||||
}
|
||||
let [part, eos] = parseString(str, ptr);
|
||||
dot = str.indexOf(".", eos);
|
||||
let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
|
||||
let newLine = indexOfNewline(strEnd);
|
||||
@@ -97190,7 +97223,7 @@ function parseKey(str, ptr, end = "=") {
|
||||
});
|
||||
}
|
||||
}
|
||||
parsed.push(parseString(str, ptr, eos));
|
||||
parsed.push(part);
|
||||
} else {
|
||||
dot = str.indexOf(".", ptr);
|
||||
let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot);
|
||||
@@ -98394,10 +98427,10 @@ undici/lib/web/websocket/frame.js:
|
||||
undici/lib/web/websocket/frame.js:
|
||||
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
||||
|
||||
smol-toml/dist/error.js:
|
||||
smol-toml/dist/util.js:
|
||||
smol-toml/dist/date.js:
|
||||
smol-toml/dist/error.js:
|
||||
smol-toml/dist/primitive.js:
|
||||
smol-toml/dist/util.js:
|
||||
smol-toml/dist/extract.js:
|
||||
smol-toml/dist/struct.js:
|
||||
smol-toml/dist/parse.js:
|
||||
|
||||
36
dist/update-known-checksums/index.cjs
generated
vendored
36
dist/update-known-checksums/index.cjs
generated
vendored
@@ -45701,6 +45701,42 @@ var semver = __toESM(require_semver(), 1);
|
||||
|
||||
// src/download/checksum/known-checksums.ts
|
||||
var KNOWN_CHECKSUMS = {
|
||||
"aarch64-apple-darwin-0.11.30": "9bed3567d496d8dab84ecf7a1247551ac94ef1baaebb7b65df008dd93e9dc357",
|
||||
"aarch64-pc-windows-msvc-0.11.30": "0edc44e7f23668bce7985facd96b2fe04a4d8ea8edfc7e53294afd8993e960fc",
|
||||
"aarch64-unknown-linux-gnu-0.11.30": "8c11d90f5f66d232930cf8ae3a085c39877690d409e10878234802b028b20e2a",
|
||||
"aarch64-unknown-linux-musl-0.11.30": "7562a40e4e08b1bfd566bd6aeca55a16ee5ac45211554543e8cdb3c395b47416",
|
||||
"arm-unknown-linux-musleabihf-0.11.30": "58967610a6f14f2785e3be3b1b47553b5ff92c3d51bc0f1d9d90d83dc224f0db",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.30": "8e2d2ab63a37af47c1b4126c5871ee191b983a10670af91d8ef0bee198292931",
|
||||
"armv7-unknown-linux-musleabihf-0.11.30": "33b515887e04c79d4d5de5967b8278b9dac1853cc8d657bf77052bab16a6629f",
|
||||
"i686-pc-windows-msvc-0.11.30": "8ceaa74889e30d64adf55d7ad7acce6ed101fb036155bf2d7613715c9d9533c1",
|
||||
"i686-unknown-linux-gnu-0.11.30": "e53221602d83b03c63a5e262bfcbf0f5f6e5972e93847498418bdb42005f04e7",
|
||||
"i686-unknown-linux-musl-0.11.30": "f66898852a6a745a8c0ab0a26e046857ee77c9f24e4a3b64cb078753490b3978",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.30": "81a71fa495239c372b3b0c1bb2509167da00cf307323a2d2a39cbc92f0c6d5d1",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.30": "e2d65822d8f668f6d055679dba4937e386764b9561f9d1269d3bc9e7140f7491",
|
||||
"riscv64gc-unknown-linux-musl-0.11.30": "3d75e26ace5e679e5de26106a71ee775af5c7f7ad872cd04f33b4d53c523a707",
|
||||
"s390x-unknown-linux-gnu-0.11.30": "a30f253aca1291dbcdbb7f76c754235f268ff84d106a595f7d1abf337ab22ac1",
|
||||
"x86_64-apple-darwin-0.11.30": "ce285fbbfbe294b1e1bc6c87c8b59d9622b85383b88b2b132a2df5c73e83d7c1",
|
||||
"x86_64-pc-windows-msvc-0.11.30": "be8d78c992312212e5cc05e9f9de3fa996db73b7c86a186dfb9231eb9f91d33e",
|
||||
"x86_64-unknown-linux-gnu-0.11.30": "04bc7d180d6138bf6dc08387acf507a823f397a98fea55da36b0ccc7fbce3b68",
|
||||
"x86_64-unknown-linux-musl-0.11.30": "023fdd3b59fccfb67b365c69fb34182aaaed1d685d367a57571e3c1468a4c70c",
|
||||
"aarch64-apple-darwin-0.11.29": "61c04acc52a33ef0f331e494bdfbedcdb6c26c6970c022ed3699e5860f8930e3",
|
||||
"aarch64-pc-windows-msvc-0.11.29": "55b597ae81bc29531a7c352a1431a8a73cc2755d7a5b9ec454580cbe02e5154f",
|
||||
"aarch64-unknown-linux-gnu-0.11.29": "94500fb064ae3c971a873cba64d94694c50677e0a4dbf78735c80509e7429919",
|
||||
"aarch64-unknown-linux-musl-0.11.29": "593d79a797ece3f1dfaaf3e0a973263422a135d9262c7dbc6cd75d9c11acc0b4",
|
||||
"arm-unknown-linux-musleabihf-0.11.29": "b160d7eb7dc45af378b3c9dd2cd6b07d64c65b509f2da673434e8e5dc996e5b1",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.29": "7b5717ae304fbb1e94104699fb8c08b32d1537fedc90dd8fcf87768d818951ed",
|
||||
"armv7-unknown-linux-musleabihf-0.11.29": "bfd05286a80b39bd4708bbbb4450fe09f07fea86eea60d31ea2de0b5e816ef54",
|
||||
"i686-pc-windows-msvc-0.11.29": "c173af6f6e125d65214b55d6b75fcf1a32d5e1c3a656938740fe0b2379cd4bcc",
|
||||
"i686-unknown-linux-gnu-0.11.29": "c62af324951ae6f31f9453280e077176c96b6e31897d8133c00411a91a20878f",
|
||||
"i686-unknown-linux-musl-0.11.29": "368dd75d030cae0512631ba0d50604e8471275ec2d9f02836edb91e4c82ad36a",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.29": "641b15637de9fedc7e738b0e4716b2233c792ba6dca722ba0484381749e1a9fd",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.29": "5c1229cc0309ebc6872ee847b8fc75564b3b7688edeb09e19427203e2dbc0ea7",
|
||||
"riscv64gc-unknown-linux-musl-0.11.29": "d4708d913ba88fad9fe1d81da3e13aecadde7a3190cc095a7f2af2fa5c8caa8f",
|
||||
"s390x-unknown-linux-gnu-0.11.29": "fa029183f550a3b00b89c06529fabfa11e0c69c097ccd397a8e7eae46f397348",
|
||||
"x86_64-apple-darwin-0.11.29": "c4c4de482da9ccdd076dc4fb5cfe7b740609029385c72f58606be3153602387d",
|
||||
"x86_64-pc-windows-msvc-0.11.29": "a047d55651bc3e0ca24595b25ec4cfcb10f9dca9fb56514e661269b37d4fae68",
|
||||
"x86_64-unknown-linux-gnu-0.11.29": "04f8b82f5d47f0512dcd32c67a4a6f16a0ea27c81537c338fd0ad6b23cebe829",
|
||||
"x86_64-unknown-linux-musl-0.11.29": "46711858adb2a3acaa9cee00f9060688ad1fd5706aecc005b96a6a7f285a00b7",
|
||||
"aarch64-apple-darwin-0.11.28": "33540eb7c883ab857eff79bd5ac2aa31fe27b595abecb4a9c003a2c998447232",
|
||||
"aarch64-pc-windows-msvc-0.11.28": "3248109afad3ec59baad299d324ff53de17e2d9a3b3e21580ffd26744b11e036",
|
||||
"aarch64-unknown-linux-gnu-0.11.28": "03e9fe0a81b0718d0bc84625de3885df6cc3f89a8b6af6121d6b9f6113fb6533",
|
||||
|
||||
@@ -6,7 +6,7 @@ This document covers advanced options for configuring which version of uv to ins
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
version: "latest"
|
||||
```
|
||||
@@ -15,7 +15,7 @@ This document covers advanced options for configuring which version of uv to ins
|
||||
|
||||
```yaml
|
||||
- name: Install a specific version of uv
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
version: "0.4.4"
|
||||
```
|
||||
@@ -28,21 +28,21 @@ to install the latest version that satisfies the range.
|
||||
|
||||
```yaml
|
||||
- name: Install a semver range of uv
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
version: ">=0.4.0"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Pinning a minor version of uv
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
version: "0.4.x"
|
||||
```
|
||||
|
||||
```yaml
|
||||
- name: Install a pep440-specifier-satisfying version of uv
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
version: ">=0.4.25,<0.5"
|
||||
```
|
||||
@@ -54,7 +54,7 @@ You can change this behavior using the `resolution-strategy` input:
|
||||
|
||||
```yaml
|
||||
- name: Install the lowest compatible version of uv
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
version: ">=0.4.0"
|
||||
resolution-strategy: "lowest"
|
||||
@@ -76,7 +76,7 @@ uv defined as a dependency in `pyproject.toml` or `requirements.txt`.
|
||||
|
||||
```yaml
|
||||
- name: Install uv based on the version defined in pyproject.toml
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
version-file: "pyproject.toml"
|
||||
```
|
||||
@@ -87,7 +87,7 @@ silently picking up a newer uv until the lockfile is updated.
|
||||
|
||||
```yaml
|
||||
- name: Install uv based on the version locked in uv.lock
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
version-file: "uv.lock"
|
||||
```
|
||||
|
||||
@@ -23,7 +23,7 @@ The computed cache key is available as the `cache-key` output:
|
||||
```yaml
|
||||
- name: Setup uv
|
||||
id: setup-uv
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
enable-cache: true
|
||||
- name: Print cache key
|
||||
@@ -33,8 +33,8 @@ The computed cache key is available as the `cache-key` output:
|
||||
## Enable caching
|
||||
|
||||
> [!NOTE]
|
||||
> The cache is pruned before it is uploaded to the GitHub Actions cache. This can lead to
|
||||
> a small or empty cache. See [Disable cache pruning](#disable-cache-pruning) for more details.
|
||||
> The entire uv cache is uploaded to the GitHub Actions cache by default. To reduce the cache size,
|
||||
> see [Enable cache pruning](#enable-cache-pruning).
|
||||
|
||||
If you enable caching, the [uv cache](https://docs.astral.sh/uv/concepts/cache/) will be uploaded to
|
||||
the GitHub Actions cache. This can speed up runs that reuse the cache by several minutes.
|
||||
@@ -50,7 +50,7 @@ You can optionally define a custom cache key suffix.
|
||||
```yaml
|
||||
- name: Enable caching and define a custom cache key suffix
|
||||
id: setup-uv
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-suffix: "optional-suffix"
|
||||
@@ -89,7 +89,7 @@ changes. If you use relative paths, they are relative to the working directory.
|
||||
|
||||
```yaml
|
||||
- name: Define a cache dependency glob
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "**/pyproject.toml"
|
||||
@@ -97,7 +97,7 @@ changes. If you use relative paths, they are relative to the working directory.
|
||||
|
||||
```yaml
|
||||
- name: Define a list of cache dependency globs
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: |
|
||||
@@ -107,7 +107,7 @@ changes. If you use relative paths, they are relative to the working directory.
|
||||
|
||||
```yaml
|
||||
- name: Define an absolute cache dependency glob
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "/tmp/my-folder/requirements*.txt"
|
||||
@@ -115,7 +115,7 @@ changes. If you use relative paths, they are relative to the working directory.
|
||||
|
||||
```yaml
|
||||
- name: Never invalidate the cache
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: ""
|
||||
@@ -128,7 +128,7 @@ By default, the cache will be restored.
|
||||
|
||||
```yaml
|
||||
- name: Don't restore an existing cache
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
enable-cache: true
|
||||
restore-cache: false
|
||||
@@ -142,7 +142,7 @@ By default, the cache will be saved.
|
||||
|
||||
```yaml
|
||||
- name: Don't save the cache after the run
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
enable-cache: true
|
||||
save-cache: false
|
||||
@@ -168,35 +168,34 @@ It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\setup-uv-cache` on
|
||||
|
||||
```yaml
|
||||
- name: Define a custom uv cache path
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
cache-local-path: "/path/to/cache"
|
||||
```
|
||||
|
||||
## Disable cache pruning
|
||||
## Enable cache pruning
|
||||
|
||||
By default, the uv cache is pruned after every run, removing pre-built wheels, but retaining any
|
||||
wheels that were built from source. On GitHub-hosted runners, it's typically faster to omit those
|
||||
pre-built wheels from the cache (and instead re-download them from the registry on each run).
|
||||
However, on self-hosted or local runners, preserving the cache may be more efficient. See
|
||||
the [documentation](https://docs.astral.sh/uv/concepts/cache/#caching-in-continuous-integration) for
|
||||
more information.
|
||||
By default, the entire uv cache is persisted across runs. On GitHub-hosted runners, it's typically
|
||||
faster to prune the cache before saving it, removing pre-built wheels, but retaining any wheels that
|
||||
were built from source. The pre-built wheels are then re-downloaded from the registry on each run.
|
||||
See the [documentation](https://docs.astral.sh/uv/concepts/cache/#caching-in-continuous-integration)
|
||||
for more information.
|
||||
|
||||
If you want to persist the entire cache across runs, disable cache pruning with the `prune-cache`
|
||||
input.
|
||||
If you want to prune the cache before saving it, enable cache pruning with the `prune-cache` input.
|
||||
|
||||
```yaml
|
||||
- name: Don't prune the cache before saving it
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
- name: Prune the cache before saving it
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
enable-cache: true
|
||||
prune-cache: false
|
||||
prune-cache: true
|
||||
```
|
||||
|
||||
## Cache Python installs
|
||||
|
||||
By default, the Python install dir (`uv python dir` / `UV_PYTHON_INSTALL_DIR`) is not cached,
|
||||
for the same reason that the dependency cache is pruned.
|
||||
for the same reason that pruning the dependency cache can improve performance on GitHub-hosted
|
||||
runners.
|
||||
If you want to cache Python installs along with your dependencies, set the `cache-python` input to `true`.
|
||||
|
||||
Note that this only caches Python versions that uv actually installs into `UV_PYTHON_INSTALL_DIR`
|
||||
@@ -205,7 +204,7 @@ To force managed Python installs, set `UV_PYTHON_PREFERENCE=only-managed`.
|
||||
|
||||
```yaml
|
||||
- name: Cache Python installs
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-python: true
|
||||
@@ -223,7 +222,7 @@ If you want to ignore this, set the `ignore-nothing-to-cache` input to `true`.
|
||||
|
||||
```yaml
|
||||
- name: Ignore nothing to cache
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
enable-cache: true
|
||||
ignore-nothing-to-cache: true
|
||||
|
||||
@@ -10,7 +10,7 @@ are automatically verified by this action. The sha256 hashes can be found on the
|
||||
|
||||
```yaml
|
||||
- name: Install a specific version and validate the checksum
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
version: "0.3.1"
|
||||
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
|
||||
@@ -39,7 +39,7 @@ The `archive_format` field is currently ignored.
|
||||
|
||||
```yaml
|
||||
- name: Use a custom manifest file
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
manifest-file: "https://example.com/my-custom-manifest.ndjson"
|
||||
```
|
||||
@@ -58,7 +58,7 @@ You can disable this by setting the `add-problem-matchers` input to `false`.
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv without problem matchers
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
add-problem-matchers: false
|
||||
```
|
||||
|
||||
@@ -9,7 +9,7 @@ This allows directly using it in later steps:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv and activate the environment
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
activate-environment: true
|
||||
- run: uv pip install pip
|
||||
@@ -20,7 +20,7 @@ By default, the venv is created at `.venv` inside the `working-directory`.
|
||||
You can customize the venv location with `venv-path`, for example to place it in the runner temp directory:
|
||||
|
||||
```yaml
|
||||
- uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
- uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
activate-environment: true
|
||||
venv-path: ${{ runner.temp }}/custom-venv
|
||||
@@ -51,7 +51,7 @@ are not sufficient, you can provide a custom GitHub token with the necessary per
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom GitHub token
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
```
|
||||
@@ -69,7 +69,7 @@ input:
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom tool dir
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
tool-dir: "/path/to/tool/dir"
|
||||
```
|
||||
@@ -88,7 +88,7 @@ If you want to change this behaviour (especially on self-hosted runners) you can
|
||||
|
||||
```yaml
|
||||
- name: Install the latest version of uv with a custom tool bin dir
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
tool-bin-dir: "/path/to/tool-bin/dir"
|
||||
```
|
||||
@@ -105,7 +105,7 @@ This action supports expanding the `~` character to the user's home directory fo
|
||||
|
||||
```yaml
|
||||
- name: Expand the tilde character
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
cache-local-path: "~/path/to/cache"
|
||||
tool-dir: "~/path/to/tool/dir"
|
||||
@@ -122,7 +122,7 @@ If you want to ignore this, set the `ignore-empty-workdir` input to `true`.
|
||||
|
||||
```yaml
|
||||
- name: Ignore empty workdir
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
ignore-empty-workdir: true
|
||||
```
|
||||
@@ -145,7 +145,7 @@ This action sets several environment variables that influence uv's behavior and
|
||||
|
||||
```yaml
|
||||
- name: Example using environment variables
|
||||
uses: astral-sh/setup-uv@f98e06938123ccabd21905ea5d0069192241f9f1 # v8.3.1
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
python-version: "3.12"
|
||||
tool-dir: "/custom/tool/dir"
|
||||
|
||||
58
package-lock.json
generated
58
package-lock.json
generated
@@ -16,15 +16,15 @@
|
||||
"@actions/io": "^3.0.2",
|
||||
"@actions/tool-cache": "^4.0.0",
|
||||
"@renovatebot/pep440": "^5.0.0",
|
||||
"smol-toml": "^1.6.1",
|
||||
"smol-toml": "^1.7.0",
|
||||
"undici": "^8.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.5.1",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "^25.5.0",
|
||||
"@types/node": "^26.0.1",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@vercel/ncc": "^0.44.0",
|
||||
"@vercel/ncc": "^0.44.1",
|
||||
"esbuild": "^0.28.0",
|
||||
"jest": "^30.4.2",
|
||||
"js-yaml": "^4.1.1",
|
||||
@@ -2145,13 +2145,13 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "25.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz",
|
||||
"integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==",
|
||||
"version": "26.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.0.1.tgz",
|
||||
"integrity": "sha512-fc3KiUoBt6kie0N9bIW3E47vZsuaMf0PM2AaUpLCLT0s/LvX1nxAim6Fc049cNxODPpGm6qRAuUOB86SkRuPQw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~7.18.0"
|
||||
"undici-types": "~8.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/semver": {
|
||||
@@ -2520,9 +2520,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@vercel/ncc": {
|
||||
"version": "0.44.0",
|
||||
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.44.0.tgz",
|
||||
"integrity": "sha512-pHyI+bZokSgIscTKFSmpNk5vZzmOrb9RW0Vu4SRyqUvkJ0kgg3PzaZLLDVTFXhbUiCqg0/Eu8L4fKtgViA92kg==",
|
||||
"version": "0.44.1",
|
||||
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.44.1.tgz",
|
||||
"integrity": "sha512-cUjIE5P2YY1n+Kt9rFIazMMpGoPn1Fic04rOmTkElMkiDP5oszGfERMpo2shVkFKDL7rVppdM2pqJKC59shQWQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
@@ -4984,9 +4984,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/smol-toml": {
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.1.tgz",
|
||||
"integrity": "sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg==",
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.7.0.tgz",
|
||||
"integrity": "sha512-aqVvWoyO21L23mb+drl4RmMXbf6N7FdHjAhTRA9ZBL7apWBgfWC16KjrASI+1p9GAroljyMHj6fK67i0UiTNvQ==",
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
@@ -5435,9 +5435,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "7.18.2",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
|
||||
"integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
|
||||
"integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -7143,12 +7143,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "25.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz",
|
||||
"integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==",
|
||||
"version": "26.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.0.1.tgz",
|
||||
"integrity": "sha512-fc3KiUoBt6kie0N9bIW3E47vZsuaMf0PM2AaUpLCLT0s/LvX1nxAim6Fc049cNxODPpGm6qRAuUOB86SkRuPQw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"undici-types": "~7.18.0"
|
||||
"undici-types": "~8.3.0"
|
||||
}
|
||||
},
|
||||
"@types/semver": {
|
||||
@@ -7354,9 +7354,9 @@
|
||||
"optional": true
|
||||
},
|
||||
"@vercel/ncc": {
|
||||
"version": "0.44.0",
|
||||
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.44.0.tgz",
|
||||
"integrity": "sha512-pHyI+bZokSgIscTKFSmpNk5vZzmOrb9RW0Vu4SRyqUvkJ0kgg3PzaZLLDVTFXhbUiCqg0/Eu8L4fKtgViA92kg==",
|
||||
"version": "0.44.1",
|
||||
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.44.1.tgz",
|
||||
"integrity": "sha512-cUjIE5P2YY1n+Kt9rFIazMMpGoPn1Fic04rOmTkElMkiDP5oszGfERMpo2shVkFKDL7rVppdM2pqJKC59shQWQ==",
|
||||
"dev": true
|
||||
},
|
||||
"agent-base": {
|
||||
@@ -9025,9 +9025,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"smol-toml": {
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.1.tgz",
|
||||
"integrity": "sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg=="
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.7.0.tgz",
|
||||
"integrity": "sha512-aqVvWoyO21L23mb+drl4RmMXbf6N7FdHjAhTRA9ZBL7apWBgfWC16KjrASI+1p9GAroljyMHj6fK67i0UiTNvQ=="
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
@@ -9298,9 +9298,9 @@
|
||||
"integrity": "sha512-TkUDgb6tl7KOGZ+7e8E3d2FYgUQgF6z5YypqjWmixVQSQERFcVrVg0ySADm2LVLRh5ljAaHTCR5Fmz3Q34rB7Q=="
|
||||
},
|
||||
"undici-types": {
|
||||
"version": "7.18.2",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
|
||||
"integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
|
||||
"integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
|
||||
"dev": true
|
||||
},
|
||||
"unrs-resolver": {
|
||||
|
||||
@@ -35,15 +35,15 @@
|
||||
"@actions/io": "^3.0.2",
|
||||
"@actions/tool-cache": "^4.0.0",
|
||||
"@renovatebot/pep440": "^5.0.0",
|
||||
"smol-toml": "^1.6.1",
|
||||
"smol-toml": "^1.7.0",
|
||||
"undici": "^8.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.5.1",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/node": "^25.5.0",
|
||||
"@types/node": "^26.0.1",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@vercel/ncc": "^0.44.0",
|
||||
"@vercel/ncc": "^0.44.1",
|
||||
"esbuild": "^0.28.0",
|
||||
"jest": "^30.4.2",
|
||||
"js-yaml": "^4.1.1",
|
||||
|
||||
@@ -1,5 +1,77 @@
|
||||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
||||
"aarch64-apple-darwin-0.11.30":
|
||||
"9bed3567d496d8dab84ecf7a1247551ac94ef1baaebb7b65df008dd93e9dc357",
|
||||
"aarch64-pc-windows-msvc-0.11.30":
|
||||
"0edc44e7f23668bce7985facd96b2fe04a4d8ea8edfc7e53294afd8993e960fc",
|
||||
"aarch64-unknown-linux-gnu-0.11.30":
|
||||
"8c11d90f5f66d232930cf8ae3a085c39877690d409e10878234802b028b20e2a",
|
||||
"aarch64-unknown-linux-musl-0.11.30":
|
||||
"7562a40e4e08b1bfd566bd6aeca55a16ee5ac45211554543e8cdb3c395b47416",
|
||||
"arm-unknown-linux-musleabihf-0.11.30":
|
||||
"58967610a6f14f2785e3be3b1b47553b5ff92c3d51bc0f1d9d90d83dc224f0db",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.30":
|
||||
"8e2d2ab63a37af47c1b4126c5871ee191b983a10670af91d8ef0bee198292931",
|
||||
"armv7-unknown-linux-musleabihf-0.11.30":
|
||||
"33b515887e04c79d4d5de5967b8278b9dac1853cc8d657bf77052bab16a6629f",
|
||||
"i686-pc-windows-msvc-0.11.30":
|
||||
"8ceaa74889e30d64adf55d7ad7acce6ed101fb036155bf2d7613715c9d9533c1",
|
||||
"i686-unknown-linux-gnu-0.11.30":
|
||||
"e53221602d83b03c63a5e262bfcbf0f5f6e5972e93847498418bdb42005f04e7",
|
||||
"i686-unknown-linux-musl-0.11.30":
|
||||
"f66898852a6a745a8c0ab0a26e046857ee77c9f24e4a3b64cb078753490b3978",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.30":
|
||||
"81a71fa495239c372b3b0c1bb2509167da00cf307323a2d2a39cbc92f0c6d5d1",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.30":
|
||||
"e2d65822d8f668f6d055679dba4937e386764b9561f9d1269d3bc9e7140f7491",
|
||||
"riscv64gc-unknown-linux-musl-0.11.30":
|
||||
"3d75e26ace5e679e5de26106a71ee775af5c7f7ad872cd04f33b4d53c523a707",
|
||||
"s390x-unknown-linux-gnu-0.11.30":
|
||||
"a30f253aca1291dbcdbb7f76c754235f268ff84d106a595f7d1abf337ab22ac1",
|
||||
"x86_64-apple-darwin-0.11.30":
|
||||
"ce285fbbfbe294b1e1bc6c87c8b59d9622b85383b88b2b132a2df5c73e83d7c1",
|
||||
"x86_64-pc-windows-msvc-0.11.30":
|
||||
"be8d78c992312212e5cc05e9f9de3fa996db73b7c86a186dfb9231eb9f91d33e",
|
||||
"x86_64-unknown-linux-gnu-0.11.30":
|
||||
"04bc7d180d6138bf6dc08387acf507a823f397a98fea55da36b0ccc7fbce3b68",
|
||||
"x86_64-unknown-linux-musl-0.11.30":
|
||||
"023fdd3b59fccfb67b365c69fb34182aaaed1d685d367a57571e3c1468a4c70c",
|
||||
"aarch64-apple-darwin-0.11.29":
|
||||
"61c04acc52a33ef0f331e494bdfbedcdb6c26c6970c022ed3699e5860f8930e3",
|
||||
"aarch64-pc-windows-msvc-0.11.29":
|
||||
"55b597ae81bc29531a7c352a1431a8a73cc2755d7a5b9ec454580cbe02e5154f",
|
||||
"aarch64-unknown-linux-gnu-0.11.29":
|
||||
"94500fb064ae3c971a873cba64d94694c50677e0a4dbf78735c80509e7429919",
|
||||
"aarch64-unknown-linux-musl-0.11.29":
|
||||
"593d79a797ece3f1dfaaf3e0a973263422a135d9262c7dbc6cd75d9c11acc0b4",
|
||||
"arm-unknown-linux-musleabihf-0.11.29":
|
||||
"b160d7eb7dc45af378b3c9dd2cd6b07d64c65b509f2da673434e8e5dc996e5b1",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.29":
|
||||
"7b5717ae304fbb1e94104699fb8c08b32d1537fedc90dd8fcf87768d818951ed",
|
||||
"armv7-unknown-linux-musleabihf-0.11.29":
|
||||
"bfd05286a80b39bd4708bbbb4450fe09f07fea86eea60d31ea2de0b5e816ef54",
|
||||
"i686-pc-windows-msvc-0.11.29":
|
||||
"c173af6f6e125d65214b55d6b75fcf1a32d5e1c3a656938740fe0b2379cd4bcc",
|
||||
"i686-unknown-linux-gnu-0.11.29":
|
||||
"c62af324951ae6f31f9453280e077176c96b6e31897d8133c00411a91a20878f",
|
||||
"i686-unknown-linux-musl-0.11.29":
|
||||
"368dd75d030cae0512631ba0d50604e8471275ec2d9f02836edb91e4c82ad36a",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.29":
|
||||
"641b15637de9fedc7e738b0e4716b2233c792ba6dca722ba0484381749e1a9fd",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.29":
|
||||
"5c1229cc0309ebc6872ee847b8fc75564b3b7688edeb09e19427203e2dbc0ea7",
|
||||
"riscv64gc-unknown-linux-musl-0.11.29":
|
||||
"d4708d913ba88fad9fe1d81da3e13aecadde7a3190cc095a7f2af2fa5c8caa8f",
|
||||
"s390x-unknown-linux-gnu-0.11.29":
|
||||
"fa029183f550a3b00b89c06529fabfa11e0c69c097ccd397a8e7eae46f397348",
|
||||
"x86_64-apple-darwin-0.11.29":
|
||||
"c4c4de482da9ccdd076dc4fb5cfe7b740609029385c72f58606be3153602387d",
|
||||
"x86_64-pc-windows-msvc-0.11.29":
|
||||
"a047d55651bc3e0ca24595b25ec4cfcb10f9dca9fb56514e661269b37d4fae68",
|
||||
"x86_64-unknown-linux-gnu-0.11.29":
|
||||
"04f8b82f5d47f0512dcd32c67a4a6f16a0ea27c81537c338fd0ad6b23cebe829",
|
||||
"x86_64-unknown-linux-musl-0.11.29":
|
||||
"46711858adb2a3acaa9cee00f9060688ad1fd5706aecc005b96a6a7f285a00b7",
|
||||
"aarch64-apple-darwin-0.11.28":
|
||||
"33540eb7c883ab857eff79bd5ac2aa31fe27b595abecb4a9c003a2c998447232",
|
||||
"aarch64-pc-windows-msvc-0.11.28":
|
||||
|
||||
@@ -102,6 +102,7 @@ export function getOSNameVersion(): string {
|
||||
|
||||
function getLinuxOSNameVersion(): string {
|
||||
const files = ["/etc/os-release", "/usr/lib/os-release"];
|
||||
let idWithoutVersion: string | undefined;
|
||||
|
||||
for (const file of files) {
|
||||
try {
|
||||
@@ -122,11 +123,22 @@ function getLinuxOSNameVersion(): string {
|
||||
if (id && buildId) {
|
||||
return `${id}-${buildId}`;
|
||||
}
|
||||
// Remember the ID but keep looking: the next file might still
|
||||
// provide a version field
|
||||
if (id && idWithoutVersion === undefined) {
|
||||
idWithoutVersion = id;
|
||||
}
|
||||
} catch {
|
||||
// Try next file
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback for rolling releases (e.g. void) that have no version
|
||||
// field at all
|
||||
if (idWithoutVersion) {
|
||||
return idWithoutVersion;
|
||||
}
|
||||
|
||||
throw new Error(
|
||||
"Failed to determine Linux distribution. " +
|
||||
"Could not read /etc/os-release or /usr/lib/os-release",
|
||||
|
||||
Reference in New Issue
Block a user