Compare commits

..
5 Commits
Author SHA1 Message Date
Daniel Elsner 14c8aabd75 fix: Forcefully remove empty parents directory on post-cleanup (#205) 2025-06-12 17:01:57 +02:00
Daniel Elsner 97359467ea fix: Ignore errors in post-cleanup if files do not exist (#204) 2025-06-12 13:02:18 +02:00
dependabot[bot]dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Pavel Zwerschke
1d2add66b9 Bump the nodejs group across 1 directory with 8 updates (#203)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pavel Zwerschke <pavelzw@gmail.com>
2025-06-12 12:01:02 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 64e585d510 Bump the gh-actions group with 2 updates (#199)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-12 11:54:41 +02:00
Pavel Zwerschke 22ee2b0fa0 docs: Add security policy (#202) 2025-05-23 12:12:45 +00:00
9 changed files with 516 additions and 419 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ jobs:
version: 9
- name: Install Node.js
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 20
cache: pnpm
@@ -98,7 +98,7 @@ jobs:
version: 9
- name: Install Node.js
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 20
cache: pnpm
+1 -1
View File
@@ -24,7 +24,7 @@ jobs:
TAG_NAME: v${{ steps.version-metadata.outputs.newVersion }}
- name: Create release
if: steps.version-metadata.outputs.changed == 'true'
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
with:
generate_release_notes: true
tag_name: v${{ steps.version-metadata.outputs.newVersion }}
+18 -18
View File
@@ -23,7 +23,7 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m
## Usage
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
pixi-version: v0.44.0
@@ -35,7 +35,7 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m
> [!WARNING]
> Since pixi is not yet stable, the API of this action may change between minor versions.
> Please pin the versions of this action to a specific version (i.e., `prefix-dev/setup-pixi@v0.8.8`) to avoid breaking changes.
> Please pin the versions of this action to a specific version (i.e., `prefix-dev/setup-pixi@v0.8.10`) to avoid breaking changes.
> You can automatically update the version of this action by using [Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot).
>
> Put the following in your `.github/dependabot.yml` file to enable Dependabot for your GitHub Actions:
@@ -74,7 +74,7 @@ In order to not exceed the [10 GB cache size limit](https://docs.github.com/en/a
This can be done by setting the `cache-write` argument.
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
@@ -119,7 +119,7 @@ test:
environment: [py311, py312]
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
environments: ${{ matrix.environment }}
```
@@ -129,7 +129,7 @@ test:
The following example will install both the `py311` and the `py312` environment on the runner.
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
# separated by spaces
environments: >-
@@ -165,7 +165,7 @@ Specify the token using the `auth-token` input argument.
This form of authentication (bearer token in the request headers) is mainly used at [prefix.dev](https://prefix.dev).
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
auth-host: prefix.dev
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
@@ -177,7 +177,7 @@ Specify the username and password using the `auth-username` and `auth-password`
This form of authentication (HTTP Basic Auth) is used in some enterprise environments with [artifactory](https://jfrog.com/artifactory) for example.
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
auth-host: custom-artifactory.com
auth-username: ${{ secrets.PIXI_USERNAME }}
@@ -190,7 +190,7 @@ Specify the conda-token using the `auth-conda-token` input argument.
This form of authentication (token is encoded in URL: `https://my-quetz-instance.com/t/<token>/get/custom-channel`) is used at [anaconda.org](https://anaconda.org) or with [quetz instances](https://github.com/mamba-org/quetz).
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
auth-host: anaconda.org # or my-quetz-instance.com
auth-conda-token: ${{ secrets.CONDA_TOKEN }}
@@ -202,7 +202,7 @@ Specify the S3 key pair using the `auth-access-key-id` and `auth-secret-access-k
You can also specify the session token using the `auth-session-token` input argument.
```yaml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
auth-host: s3://my-s3-bucket
auth-s3-access-key-id: ${{ secrets.ACCESS_KEY_ID }}
@@ -274,7 +274,7 @@ To this end, `setup-pixi` adds all environment variables set when executing `pix
As a result, all installed binaries can be accessed without having to call `pixi run`.
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
activate-environment: true
```
@@ -282,7 +282,7 @@ As a result, all installed binaries can be accessed without having to call `pixi
If you are installing multiple environments, you will need to specify the name of the environment that you want to be activated.
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
environments: >-
py311
@@ -299,7 +299,7 @@ You can specify whether `setup-pixi` should run `pixi install --frozen` or `pixi
See the [official documentation](https://prefix.dev/docs/pixi/cli#install) for more information about the `--frozen` and `--locked` flags.
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
locked: true
# or
@@ -318,7 +318,7 @@ The first one is the debug logging of the action itself.
This can be enabled by running the action with the `RUNNER_DEBUG` environment variable set to `true`.
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
env:
RUNNER_DEBUG: true
```
@@ -336,7 +336,7 @@ The second type is the debug logging of the pixi executable.
This can be specified by setting the `log-level` input.
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
# one of `q`, `default`, `v`, `vv`, or `vvv`.
log-level: vvv
@@ -362,7 +362,7 @@ If nothing is specified, `post-cleanup` will default to `true`.
On self-hosted runners, you also might want to alter the default pixi install location to a temporary location. You can use `pixi-bin-path: ${{ runner.temp }}/bin/pixi` to do this.
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
post-cleanup: true
# ${{ runner.temp }}\Scripts\pixi.exe on Windows
@@ -372,13 +372,13 @@ On self-hosted runners, you also might want to alter the default pixi install lo
You can also use a preinstalled local version of pixi on the runner by not setting any of the `pixi-version`,
`pixi-url` or `pixi-bin-path` inputs. This action will then try to find a local version of pixi in the runner's PATH.
### Using the `pyproject.toml` as a manifest file for pixi.
### Using the `pyproject.toml` as a manifest file for pixi
`setup-pixi` will automatically pick up the `pyproject.toml` if it contains a `[tool.pixi.project]` section and no `pixi.toml`.
This can be overwritten by setting the `manifest-path` input argument.
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
manifest-path: pyproject.toml
```
@@ -388,7 +388,7 @@ This can be overwritten by setting the `manifest-path` input argument.
If you only want to install pixi and not install the current project, you can use the `run-install` option.
```yml
- uses: prefix-dev/setup-pixi@v0.8.8
- uses: prefix-dev/setup-pixi@v0.8.10
with:
run-install: false
```
+7
View File
@@ -0,0 +1,7 @@
# Reporting Security Issues
We take security bugs in our projects seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/prefix-dev/setup-pixi/security/advisories/new) tab.
We will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
Generated Vendored
+114 -133
View File
@@ -25819,9 +25819,9 @@ var require_ms = __commonJS({
}
});
// node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js
// node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js
var require_common = __commonJS({
"node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js"(exports2, module2) {
"node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js"(exports2, module2) {
"use strict";
function setup(env) {
createDebug.debug = createDebug;
@@ -25923,7 +25923,7 @@ var require_common = __commonJS({
createDebug.namespaces = namespaces;
createDebug.names = [];
createDebug.skips = [];
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
for (const ns of split) {
if (ns[0] === "-") {
createDebug.skips.push(ns.slice(1));
@@ -25997,9 +25997,9 @@ var require_common = __commonJS({
}
});
// node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js
// node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js
var require_browser = __commonJS({
"node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js"(exports2, module2) {
"node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js"(exports2, module2) {
"use strict";
exports2.formatArgs = formatArgs;
exports2.save = save;
@@ -26142,7 +26142,7 @@ var require_browser = __commonJS({
function load() {
let r;
try {
r = exports2.storage.getItem("debug");
r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
} catch (error3) {
}
if (!r && typeof process !== "undefined" && "env" in process) {
@@ -26283,9 +26283,9 @@ var require_supports_color = __commonJS({
}
});
// node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/node.js
// node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js
var require_node = __commonJS({
"node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/node.js"(exports2, module2) {
"node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js"(exports2, module2) {
"use strict";
var tty = require("tty");
var util4 = require("util");
@@ -26458,9 +26458,9 @@ var require_node = __commonJS({
}
});
// node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js
// node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js
var require_src = __commonJS({
"node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js"(exports2, module2) {
"node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js"(exports2, module2) {
"use strict";
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
module2.exports = require_browser();
@@ -64246,10 +64246,11 @@ var import_process = require("process");
var import_fs = require("fs");
var core = __toESM(require_core());
// node_modules/.pnpm/zod@3.24.2/node_modules/zod/lib/index.mjs
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/helpers/util.js
var util;
(function(util4) {
util4.assertEqual = (val) => val;
util4.assertEqual = (_) => {
};
function assertIs(_arg) {
}
util4.assertIs = assertIs;
@@ -64293,7 +64294,7 @@ var util;
}
return void 0;
};
util4.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
util4.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
function joinValues(array, separator = " | ") {
return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
}
@@ -64345,7 +64346,7 @@ var getParsedType = (data) => {
case "string":
return ZodParsedType.string;
case "number":
return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
case "boolean":
return ZodParsedType.boolean;
case "function":
@@ -64378,6 +64379,8 @@ var getParsedType = (data) => {
return ZodParsedType.unknown;
}
};
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/ZodError.js
var ZodIssueCode = util.arrayToEnum([
"invalid_type",
"invalid_literal",
@@ -64489,6 +64492,8 @@ ZodError.create = (issues) => {
const error3 = new ZodError(issues);
return error3;
};
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/locales/en.js
var errorMap = (issue, _ctx) => {
let message;
switch (issue.code) {
@@ -64587,10 +64592,15 @@ var errorMap = (issue, _ctx) => {
}
return { message };
};
var overrideErrorMap = errorMap;
var en_default = errorMap;
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/errors.js
var overrideErrorMap = en_default;
function getErrorMap() {
return overrideErrorMap;
}
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/helpers/parseUtil.js
var makeIssue = (params) => {
const { data, path: path4, errorMaps, issueData } = params;
const fullPath = [...path4, ...issueData.path || []];
@@ -64629,7 +64639,7 @@ function addIssueToContext(ctx, issueData) {
// then schema-bound map if available
overrideMap,
// then global override map
overrideMap === errorMap ? void 0 : errorMap
overrideMap === en_default ? void 0 : en_default
// then global default map
].filter((x) => !!x)
});
@@ -64698,24 +64708,15 @@ var isAborted = (x) => x.status === "aborted";
var isDirty = (x) => x.status === "dirty";
var isValid = (x) => x.status === "valid";
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
function __classPrivateFieldGet(receiver, state3, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state3 === "function" ? receiver !== state3 || !f : !state3.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state3.get(receiver);
}
function __classPrivateFieldSet(receiver, state3, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state3 === "function" ? receiver !== state3 || !f : !state3.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state3.set(receiver, value), value;
}
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/helpers/errorUtil.js
var errorUtil;
(function(errorUtil2) {
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
})(errorUtil || (errorUtil = {}));
var _ZodEnum_cache;
var _ZodNativeEnum_cache;
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/types.js
var ParseInputLazyPath = class {
constructor(parent, value, path4, key) {
this._cachedPath = [];
@@ -64726,7 +64727,7 @@ var ParseInputLazyPath = class {
}
get path() {
if (!this._cachedPath.length) {
if (this._key instanceof Array) {
if (Array.isArray(this._key)) {
this._cachedPath.push(...this._path, ...this._key);
} else {
this._cachedPath.push(...this._path, this._key);
@@ -64764,17 +64765,16 @@ function processCreateParams(params) {
if (errorMap2)
return { errorMap: errorMap2, description };
const customMap = (iss, ctx) => {
var _a3, _b2;
const { message } = params;
if (iss.code === "invalid_enum_value") {
return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
return { message: message ?? ctx.defaultError };
}
if (typeof ctx.data === "undefined") {
return { message: (_a3 = message !== null && message !== void 0 ? message : required_error) !== null && _a3 !== void 0 ? _a3 : ctx.defaultError };
return { message: message ?? required_error ?? ctx.defaultError };
}
if (iss.code !== "invalid_type")
return { message: ctx.defaultError };
return { message: (_b2 = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b2 !== void 0 ? _b2 : ctx.defaultError };
return { message: message ?? invalid_type_error ?? ctx.defaultError };
};
return { errorMap: customMap, description };
}
@@ -64826,14 +64826,13 @@ var ZodType = class {
throw result.error;
}
safeParse(data, params) {
var _a3;
const ctx = {
common: {
issues: [],
async: (_a3 = params === null || params === void 0 ? void 0 : params.async) !== null && _a3 !== void 0 ? _a3 : false,
contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap
async: params?.async ?? false,
contextualErrorMap: params?.errorMap
},
path: (params === null || params === void 0 ? void 0 : params.path) || [],
path: params?.path || [],
schemaErrorMap: this._def.errorMap,
parent: null,
data,
@@ -64843,7 +64842,6 @@ var ZodType = class {
return handleResult(ctx, result);
}
"~validate"(data) {
var _a3, _b2;
const ctx = {
common: {
issues: [],
@@ -64864,7 +64862,7 @@ var ZodType = class {
issues: ctx.common.issues
};
} catch (err) {
if ((_b2 = (_a3 = err === null || err === void 0 ? void 0 : err.message) === null || _a3 === void 0 ? void 0 : _a3.toLowerCase()) === null || _b2 === void 0 ? void 0 : _b2.includes("encountered")) {
if (err?.message?.toLowerCase()?.includes("encountered")) {
this["~standard"].async = true;
}
ctx.common = {
@@ -64889,10 +64887,10 @@ var ZodType = class {
const ctx = {
common: {
issues: [],
contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
contextualErrorMap: params?.errorMap,
async: true
},
path: (params === null || params === void 0 ? void 0 : params.path) || [],
path: params?.path || [],
schemaErrorMap: this._def.errorMap,
parent: null,
data,
@@ -65082,13 +65080,14 @@ var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_
var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
var dateRegex = new RegExp(`^${dateRegexSource}$`);
function timeRegexSource(args) {
let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
let secondsRegexSource = `[0-5]\\d`;
if (args.precision) {
regex = `${regex}\\.\\d{${args.precision}}`;
secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
} else if (args.precision == null) {
regex = `${regex}(\\.\\d+)?`;
secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
}
return regex;
const secondsQuantifier = args.precision ? "+" : "?";
return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
}
function timeRegex(args) {
return new RegExp(`^${timeRegexSource(args)}$`);
@@ -65120,12 +65119,14 @@ function isValidJWT(jwt, alg) {
const decoded = JSON.parse(atob(base64));
if (typeof decoded !== "object" || decoded === null)
return false;
if (!decoded.typ || !decoded.alg)
if ("typ" in decoded && decoded?.typ !== "JWT")
return false;
if (!decoded.alg)
return false;
if (alg && decoded.alg !== alg)
return false;
return true;
} catch (_a3) {
} catch {
return false;
}
}
@@ -65284,7 +65285,7 @@ var ZodString = class _ZodString extends ZodType {
} else if (check.kind === "url") {
try {
new URL(input.data);
} catch (_a3) {
} catch {
ctx = this._getOrReturnCtx(input, ctx);
addIssueToContext(ctx, {
validation: "url",
@@ -65496,7 +65497,6 @@ var ZodString = class _ZodString extends ZodType {
return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options2) });
}
datetime(options2) {
var _a3, _b2;
if (typeof options2 === "string") {
return this._addCheck({
kind: "datetime",
@@ -65508,10 +65508,10 @@ var ZodString = class _ZodString extends ZodType {
}
return this._addCheck({
kind: "datetime",
precision: typeof (options2 === null || options2 === void 0 ? void 0 : options2.precision) === "undefined" ? null : options2 === null || options2 === void 0 ? void 0 : options2.precision,
offset: (_a3 = options2 === null || options2 === void 0 ? void 0 : options2.offset) !== null && _a3 !== void 0 ? _a3 : false,
local: (_b2 = options2 === null || options2 === void 0 ? void 0 : options2.local) !== null && _b2 !== void 0 ? _b2 : false,
...errorUtil.errToObj(options2 === null || options2 === void 0 ? void 0 : options2.message)
precision: typeof options2?.precision === "undefined" ? null : options2?.precision,
offset: options2?.offset ?? false,
local: options2?.local ?? false,
...errorUtil.errToObj(options2?.message)
});
}
date(message) {
@@ -65527,8 +65527,8 @@ var ZodString = class _ZodString extends ZodType {
}
return this._addCheck({
kind: "time",
precision: typeof (options2 === null || options2 === void 0 ? void 0 : options2.precision) === "undefined" ? null : options2 === null || options2 === void 0 ? void 0 : options2.precision,
...errorUtil.errToObj(options2 === null || options2 === void 0 ? void 0 : options2.message)
precision: typeof options2?.precision === "undefined" ? null : options2?.precision,
...errorUtil.errToObj(options2?.message)
});
}
duration(message) {
@@ -65545,8 +65545,8 @@ var ZodString = class _ZodString extends ZodType {
return this._addCheck({
kind: "includes",
value,
position: options2 === null || options2 === void 0 ? void 0 : options2.position,
...errorUtil.errToObj(options2 === null || options2 === void 0 ? void 0 : options2.message)
position: options2?.position,
...errorUtil.errToObj(options2?.message)
});
}
startsWith(value, message) {
@@ -65678,11 +65678,10 @@ var ZodString = class _ZodString extends ZodType {
}
};
ZodString.create = (params) => {
var _a3;
return new ZodString({
checks: [],
typeName: ZodFirstPartyTypeKind.ZodString,
coerce: (_a3 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a3 !== void 0 ? _a3 : false,
coerce: params?.coerce ?? false,
...processCreateParams(params)
});
};
@@ -65690,9 +65689,9 @@ function floatSafeRemainder(val, step) {
const valDecCount = (val.toString().split(".")[1] || "").length;
const stepDecCount = (step.toString().split(".")[1] || "").length;
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
return valInt % stepInt / Math.pow(10, decCount);
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
return valInt % stepInt / 10 ** decCount;
}
var ZodNumber = class _ZodNumber extends ZodType {
constructor() {
@@ -65902,7 +65901,8 @@ var ZodNumber = class _ZodNumber extends ZodType {
return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
}
get isFinite() {
let max = null, min = null;
let max = null;
let min = null;
for (const ch of this._def.checks) {
if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
return true;
@@ -65921,7 +65921,7 @@ ZodNumber.create = (params) => {
return new ZodNumber({
checks: [],
typeName: ZodFirstPartyTypeKind.ZodNumber,
coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
coerce: params?.coerce || false,
...processCreateParams(params)
});
};
@@ -65935,7 +65935,7 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
if (this._def.coerce) {
try {
input.data = BigInt(input.data);
} catch (_a3) {
} catch {
return this._getInvalidInput(input);
}
}
@@ -66090,11 +66090,10 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
}
};
ZodBigInt.create = (params) => {
var _a3;
return new ZodBigInt({
checks: [],
typeName: ZodFirstPartyTypeKind.ZodBigInt,
coerce: (_a3 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a3 !== void 0 ? _a3 : false,
coerce: params?.coerce ?? false,
...processCreateParams(params)
});
};
@@ -66119,7 +66118,7 @@ var ZodBoolean = class extends ZodType {
ZodBoolean.create = (params) => {
return new ZodBoolean({
typeName: ZodFirstPartyTypeKind.ZodBoolean,
coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
coerce: params?.coerce || false,
...processCreateParams(params)
});
};
@@ -66138,7 +66137,7 @@ var ZodDate = class _ZodDate extends ZodType {
});
return INVALID;
}
if (isNaN(input.data.getTime())) {
if (Number.isNaN(input.data.getTime())) {
const ctx2 = this._getOrReturnCtx(input);
addIssueToContext(ctx2, {
code: ZodIssueCode.invalid_date
@@ -66227,7 +66226,7 @@ var ZodDate = class _ZodDate extends ZodType {
ZodDate.create = (params) => {
return new ZodDate({
checks: [],
coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
coerce: params?.coerce || false,
typeName: ZodFirstPartyTypeKind.ZodDate,
...processCreateParams(params)
});
@@ -66502,7 +66501,8 @@ var ZodObject = class _ZodObject extends ZodType {
return this._cached;
const shape = this._def.shape();
const keys = util.objectKeys(shape);
return this._cached = { shape, keys };
this._cached = { shape, keys };
return this._cached;
}
_parse(input) {
const parsedType = this._getType(input);
@@ -66552,8 +66552,8 @@ var ZodObject = class _ZodObject extends ZodType {
});
status.dirty();
}
} else if (unknownKeys === "strip") ;
else {
} else if (unknownKeys === "strip") {
} else {
throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
}
} else {
@@ -66600,11 +66600,10 @@ var ZodObject = class _ZodObject extends ZodType {
unknownKeys: "strict",
...message !== void 0 ? {
errorMap: (issue, ctx) => {
var _a3, _b2, _c2, _d2;
const defaultError = (_c2 = (_b2 = (_a3 = this._def).errorMap) === null || _b2 === void 0 ? void 0 : _b2.call(_a3, issue, ctx).message) !== null && _c2 !== void 0 ? _c2 : ctx.defaultError;
const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
if (issue.code === "unrecognized_keys")
return {
message: (_d2 = errorUtil.errToObj(message).message) !== null && _d2 !== void 0 ? _d2 : defaultError
message: errorUtil.errToObj(message).message ?? defaultError
};
return {
message: defaultError
@@ -66735,11 +66734,11 @@ var ZodObject = class _ZodObject extends ZodType {
}
pick(mask) {
const shape = {};
util.objectKeys(mask).forEach((key) => {
for (const key of util.objectKeys(mask)) {
if (mask[key] && this.shape[key]) {
shape[key] = this.shape[key];
}
});
}
return new _ZodObject({
...this._def,
shape: () => shape
@@ -66747,11 +66746,11 @@ var ZodObject = class _ZodObject extends ZodType {
}
omit(mask) {
const shape = {};
util.objectKeys(this.shape).forEach((key) => {
for (const key of util.objectKeys(this.shape)) {
if (!mask[key]) {
shape[key] = this.shape[key];
}
});
}
return new _ZodObject({
...this._def,
shape: () => shape
@@ -66765,14 +66764,14 @@ var ZodObject = class _ZodObject extends ZodType {
}
partial(mask) {
const newShape = {};
util.objectKeys(this.shape).forEach((key) => {
for (const key of util.objectKeys(this.shape)) {
const fieldSchema = this.shape[key];
if (mask && !mask[key]) {
newShape[key] = fieldSchema;
} else {
newShape[key] = fieldSchema.optional();
}
});
}
return new _ZodObject({
...this._def,
shape: () => newShape
@@ -66780,7 +66779,7 @@ var ZodObject = class _ZodObject extends ZodType {
}
required(mask) {
const newShape = {};
util.objectKeys(this.shape).forEach((key) => {
for (const key of util.objectKeys(this.shape)) {
if (mask && !mask[key]) {
newShape[key] = this.shape[key];
} else {
@@ -66791,7 +66790,7 @@ var ZodObject = class _ZodObject extends ZodType {
}
newShape[key] = newField;
}
});
}
return new _ZodObject({
...this._def,
shape: () => newShape
@@ -67407,12 +67406,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
return makeIssue({
data: args,
path: ctx.path,
errorMaps: [
ctx.common.contextualErrorMap,
ctx.schemaErrorMap,
getErrorMap(),
errorMap
].filter((x) => !!x),
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
issueData: {
code: ZodIssueCode.invalid_arguments,
argumentsError: error3
@@ -67423,12 +67417,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
return makeIssue({
data: returns,
path: ctx.path,
errorMaps: [
ctx.common.contextualErrorMap,
ctx.schemaErrorMap,
getErrorMap(),
errorMap
].filter((x) => !!x),
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
issueData: {
code: ZodIssueCode.invalid_return_type,
returnTypeError: error3
@@ -67552,10 +67541,6 @@ function createZodEnum(values, params) {
});
}
var ZodEnum = class _ZodEnum extends ZodType {
constructor() {
super(...arguments);
_ZodEnum_cache.set(this, void 0);
}
_parse(input) {
if (typeof input.data !== "string") {
const ctx = this._getOrReturnCtx(input);
@@ -67567,10 +67552,10 @@ var ZodEnum = class _ZodEnum extends ZodType {
});
return INVALID;
}
if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
__classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
if (!this._cache) {
this._cache = new Set(this._def.values);
}
if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
if (!this._cache.has(input.data)) {
const ctx = this._getOrReturnCtx(input);
const expectedValues = this._def.values;
addIssueToContext(ctx, {
@@ -67619,13 +67604,8 @@ var ZodEnum = class _ZodEnum extends ZodType {
});
}
};
_ZodEnum_cache = /* @__PURE__ */ new WeakMap();
ZodEnum.create = createZodEnum;
var ZodNativeEnum = class extends ZodType {
constructor() {
super(...arguments);
_ZodNativeEnum_cache.set(this, void 0);
}
_parse(input) {
const nativeEnumValues = util.getValidEnumValues(this._def.values);
const ctx = this._getOrReturnCtx(input);
@@ -67638,10 +67618,10 @@ var ZodNativeEnum = class extends ZodType {
});
return INVALID;
}
if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
__classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
if (!this._cache) {
this._cache = new Set(util.getValidEnumValues(this._def.values));
}
if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
if (!this._cache.has(input.data)) {
const expectedValues = util.objectValues(nativeEnumValues);
addIssueToContext(ctx, {
received: ctx.data,
@@ -67656,7 +67636,6 @@ var ZodNativeEnum = class extends ZodType {
return this._def.values;
}
};
_ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
ZodNativeEnum.create = (values, params) => {
return new ZodNativeEnum({
values,
@@ -67797,7 +67776,7 @@ var ZodEffects = class extends ZodType {
parent: ctx
});
if (!isValid(base))
return base;
return INVALID;
const result = effect.transform(base.value, checkCtx);
if (result instanceof Promise) {
throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
@@ -67806,8 +67785,11 @@ var ZodEffects = class extends ZodType {
} else {
return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
if (!isValid(base))
return base;
return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
return INVALID;
return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
status: status.value,
value: result
}));
});
}
}
@@ -68146,7 +68128,7 @@ function untildify(pathWithTilde) {
return homeDirectory ? pathWithTilde.replace(/^~(?=$|\/|\\)/, homeDirectory) : pathWithTilde;
}
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/error.js
// node_modules/.pnpm/smol-toml@1.3.4/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];
@@ -68186,7 +68168,7 @@ ${codeblock}`, options2);
}
};
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/util.js
// node_modules/.pnpm/smol-toml@1.3.4/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")
@@ -68226,9 +68208,7 @@ function skipUntil(str, ptr, sep, end, banNewLines = false) {
i = indexOfNewline(str, i);
} else if (c === sep) {
return i + 1;
} else if (c === end) {
return i;
} else if (banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
} else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
return i;
}
}
@@ -68243,7 +68223,7 @@ function getStringEnd(str, seek) {
seek += target.length - 1;
do
seek = str.indexOf(target, ++seek);
while (seek > -1 && first !== "'" && str[seek - 1] === "\\" && str[seek - 2] !== "\\");
while (seek > -1 && first !== "'" && str[seek - 1] === "\\" && (str[seek - 2] !== "\\" || str[seek - 3] === "\\"));
if (seek > -1) {
seek += target.length;
if (target.length > 1) {
@@ -68256,7 +68236,7 @@ function getStringEnd(str, seek) {
return seek;
}
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/date.js
// node_modules/.pnpm/smol-toml@1.3.4/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 _hasDate, _hasTime, _offset;
var _TomlDate = class _TomlDate extends Date {
@@ -68272,6 +68252,7 @@ var _TomlDate = class _TomlDate extends Date {
date = `0000-01-01T${date}`;
}
hasTime = !!match[2];
hasTime && date[10] === " " && (date = date.replace(" ", "T"));
if (match[2] && +match[2] > 23) {
date = "";
} else {
@@ -68352,7 +68333,7 @@ _hasTime = new WeakMap();
_offset = new WeakMap();
var TomlDate = _TomlDate;
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/primitive.js
// node_modules/.pnpm/smol-toml@1.3.4/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_]/;
@@ -68485,7 +68466,7 @@ function parseValue(value, toml, ptr) {
return date;
}
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/extract.js
// node_modules/.pnpm/smol-toml@1.3.4/node_modules/smol-toml/dist/extract.js
function sliceAndTrimEndOf(str, startPtr, endPtr, allowNewLines) {
let value = str.slice(startPtr, endPtr);
let commentIdx = value.indexOf("#");
@@ -68505,7 +68486,7 @@ function sliceAndTrimEndOf(str, startPtr, endPtr, allowNewLines) {
}
return [trimmed, commentIdx];
}
function extractValue(str, ptr, end, depth) {
function extractValue(str, ptr, end, depth = -1) {
if (depth === 0) {
throw new TomlError("document contains excessively nested structures. aborting.", {
toml: str,
@@ -68515,8 +68496,8 @@ function extractValue(str, ptr, end, depth) {
let c = str[ptr];
if (c === "[" || c === "{") {
let [value, endPtr2] = c === "[" ? parseArray(str, ptr, depth) : parseInlineTable(str, ptr, depth);
let newPtr = skipUntil(str, endPtr2, ",", end);
if (end === "}") {
let newPtr = end ? skipUntil(str, endPtr2, ",", end) : endPtr2;
if (endPtr2 - newPtr && end === "}") {
let nextNewLine = indexOfNewline(str, endPtr2, newPtr);
if (nextNewLine > -1) {
throw new TomlError("newlines are not allowed in inline tables", {
@@ -68561,7 +68542,7 @@ function extractValue(str, ptr, end, depth) {
];
}
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/struct.js
// node_modules/.pnpm/smol-toml@1.3.4/node_modules/smol-toml/dist/struct.js
var KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
function parseKey(str, ptr, end = "=") {
let dot = ptr - 1;
@@ -68630,7 +68611,7 @@ function parseKey(str, ptr, end = "=") {
} while (dot + 1 && dot < endPtr);
return [parsed, skipVoid(str, endPtr + 1, true, true)];
}
function parseInlineTable(str, ptr, depth) {
function parseInlineTable(str, ptr, depth = -1) {
let res = {};
let seen = /* @__PURE__ */ new Set();
let c;
@@ -68698,7 +68679,7 @@ function parseInlineTable(str, ptr, depth) {
}
return [res, ptr];
}
function parseArray(str, ptr, depth) {
function parseArray(str, ptr, depth = -1) {
let res = [];
let c;
ptr++;
@@ -68725,7 +68706,7 @@ function parseArray(str, ptr, depth) {
return [res, ptr];
}
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/parse.js
// node_modules/.pnpm/smol-toml@1.3.4/node_modules/smol-toml/dist/parse.js
function peekTable(key, table, meta, type2) {
let t = table;
let m = meta;
Generated Vendored
+117 -126
View File
@@ -20122,10 +20122,11 @@ var import_process = require("process");
var import_fs = require("fs");
var core = __toESM(require_core());
// node_modules/.pnpm/zod@3.24.2/node_modules/zod/lib/index.mjs
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/helpers/util.js
var util;
(function(util2) {
util2.assertEqual = (val) => val;
util2.assertEqual = (_) => {
};
function assertIs(_arg) {
}
util2.assertIs = assertIs;
@@ -20169,7 +20170,7 @@ var util;
}
return void 0;
};
util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
function joinValues(array, separator = " | ") {
return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
}
@@ -20221,7 +20222,7 @@ var getParsedType = (data) => {
case "string":
return ZodParsedType.string;
case "number":
return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
case "boolean":
return ZodParsedType.boolean;
case "function":
@@ -20254,6 +20255,8 @@ var getParsedType = (data) => {
return ZodParsedType.unknown;
}
};
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/ZodError.js
var ZodIssueCode = util.arrayToEnum([
"invalid_type",
"invalid_literal",
@@ -20365,6 +20368,8 @@ ZodError.create = (issues) => {
const error2 = new ZodError(issues);
return error2;
};
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/locales/en.js
var errorMap = (issue, _ctx) => {
let message;
switch (issue.code) {
@@ -20463,10 +20468,15 @@ var errorMap = (issue, _ctx) => {
}
return { message };
};
var overrideErrorMap = errorMap;
var en_default = errorMap;
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/errors.js
var overrideErrorMap = en_default;
function getErrorMap() {
return overrideErrorMap;
}
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/helpers/parseUtil.js
var makeIssue = (params) => {
const { data, path: path3, errorMaps, issueData } = params;
const fullPath = [...path3, ...issueData.path || []];
@@ -20505,7 +20515,7 @@ function addIssueToContext(ctx, issueData) {
// then schema-bound map if available
overrideMap,
// then global override map
overrideMap === errorMap ? void 0 : errorMap
overrideMap === en_default ? void 0 : en_default
// then global default map
].filter((x) => !!x)
});
@@ -20574,24 +20584,15 @@ var isAborted = (x) => x.status === "aborted";
var isDirty = (x) => x.status === "dirty";
var isValid = (x) => x.status === "valid";
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
function __classPrivateFieldGet(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
}
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/helpers/errorUtil.js
var errorUtil;
(function(errorUtil2) {
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
})(errorUtil || (errorUtil = {}));
var _ZodEnum_cache;
var _ZodNativeEnum_cache;
// node_modules/.pnpm/zod@3.25.45/node_modules/zod/dist/esm/v3/types.js
var ParseInputLazyPath = class {
constructor(parent, value, path3, key) {
this._cachedPath = [];
@@ -20602,7 +20603,7 @@ var ParseInputLazyPath = class {
}
get path() {
if (!this._cachedPath.length) {
if (this._key instanceof Array) {
if (Array.isArray(this._key)) {
this._cachedPath.push(...this._path, ...this._key);
} else {
this._cachedPath.push(...this._path, this._key);
@@ -20640,17 +20641,16 @@ function processCreateParams(params) {
if (errorMap2)
return { errorMap: errorMap2, description };
const customMap = (iss, ctx) => {
var _a, _b;
const { message } = params;
if (iss.code === "invalid_enum_value") {
return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
return { message: message ?? ctx.defaultError };
}
if (typeof ctx.data === "undefined") {
return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
return { message: message ?? required_error ?? ctx.defaultError };
}
if (iss.code !== "invalid_type")
return { message: ctx.defaultError };
return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
return { message: message ?? invalid_type_error ?? ctx.defaultError };
};
return { errorMap: customMap, description };
}
@@ -20702,14 +20702,13 @@ var ZodType = class {
throw result.error;
}
safeParse(data, params) {
var _a;
const ctx = {
common: {
issues: [],
async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,
contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap
async: params?.async ?? false,
contextualErrorMap: params?.errorMap
},
path: (params === null || params === void 0 ? void 0 : params.path) || [],
path: params?.path || [],
schemaErrorMap: this._def.errorMap,
parent: null,
data,
@@ -20719,7 +20718,6 @@ var ZodType = class {
return handleResult(ctx, result);
}
"~validate"(data) {
var _a, _b;
const ctx = {
common: {
issues: [],
@@ -20740,7 +20738,7 @@ var ZodType = class {
issues: ctx.common.issues
};
} catch (err) {
if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes("encountered")) {
if (err?.message?.toLowerCase()?.includes("encountered")) {
this["~standard"].async = true;
}
ctx.common = {
@@ -20765,10 +20763,10 @@ var ZodType = class {
const ctx = {
common: {
issues: [],
contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
contextualErrorMap: params?.errorMap,
async: true
},
path: (params === null || params === void 0 ? void 0 : params.path) || [],
path: params?.path || [],
schemaErrorMap: this._def.errorMap,
parent: null,
data,
@@ -20958,13 +20956,14 @@ var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_
var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
var dateRegex = new RegExp(`^${dateRegexSource}$`);
function timeRegexSource(args) {
let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
let secondsRegexSource = `[0-5]\\d`;
if (args.precision) {
regex = `${regex}\\.\\d{${args.precision}}`;
secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
} else if (args.precision == null) {
regex = `${regex}(\\.\\d+)?`;
secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
}
return regex;
const secondsQuantifier = args.precision ? "+" : "?";
return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
}
function timeRegex(args) {
return new RegExp(`^${timeRegexSource(args)}$`);
@@ -20996,12 +20995,14 @@ function isValidJWT(jwt, alg) {
const decoded = JSON.parse(atob(base64));
if (typeof decoded !== "object" || decoded === null)
return false;
if (!decoded.typ || !decoded.alg)
if ("typ" in decoded && decoded?.typ !== "JWT")
return false;
if (!decoded.alg)
return false;
if (alg && decoded.alg !== alg)
return false;
return true;
} catch (_a) {
} catch {
return false;
}
}
@@ -21160,7 +21161,7 @@ var ZodString = class _ZodString extends ZodType {
} else if (check.kind === "url") {
try {
new URL(input.data);
} catch (_a) {
} catch {
ctx = this._getOrReturnCtx(input, ctx);
addIssueToContext(ctx, {
validation: "url",
@@ -21372,7 +21373,6 @@ var ZodString = class _ZodString extends ZodType {
return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options2) });
}
datetime(options2) {
var _a, _b;
if (typeof options2 === "string") {
return this._addCheck({
kind: "datetime",
@@ -21384,10 +21384,10 @@ var ZodString = class _ZodString extends ZodType {
}
return this._addCheck({
kind: "datetime",
precision: typeof (options2 === null || options2 === void 0 ? void 0 : options2.precision) === "undefined" ? null : options2 === null || options2 === void 0 ? void 0 : options2.precision,
offset: (_a = options2 === null || options2 === void 0 ? void 0 : options2.offset) !== null && _a !== void 0 ? _a : false,
local: (_b = options2 === null || options2 === void 0 ? void 0 : options2.local) !== null && _b !== void 0 ? _b : false,
...errorUtil.errToObj(options2 === null || options2 === void 0 ? void 0 : options2.message)
precision: typeof options2?.precision === "undefined" ? null : options2?.precision,
offset: options2?.offset ?? false,
local: options2?.local ?? false,
...errorUtil.errToObj(options2?.message)
});
}
date(message) {
@@ -21403,8 +21403,8 @@ var ZodString = class _ZodString extends ZodType {
}
return this._addCheck({
kind: "time",
precision: typeof (options2 === null || options2 === void 0 ? void 0 : options2.precision) === "undefined" ? null : options2 === null || options2 === void 0 ? void 0 : options2.precision,
...errorUtil.errToObj(options2 === null || options2 === void 0 ? void 0 : options2.message)
precision: typeof options2?.precision === "undefined" ? null : options2?.precision,
...errorUtil.errToObj(options2?.message)
});
}
duration(message) {
@@ -21421,8 +21421,8 @@ var ZodString = class _ZodString extends ZodType {
return this._addCheck({
kind: "includes",
value,
position: options2 === null || options2 === void 0 ? void 0 : options2.position,
...errorUtil.errToObj(options2 === null || options2 === void 0 ? void 0 : options2.message)
position: options2?.position,
...errorUtil.errToObj(options2?.message)
});
}
startsWith(value, message) {
@@ -21554,11 +21554,10 @@ var ZodString = class _ZodString extends ZodType {
}
};
ZodString.create = (params) => {
var _a;
return new ZodString({
checks: [],
typeName: ZodFirstPartyTypeKind.ZodString,
coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
coerce: params?.coerce ?? false,
...processCreateParams(params)
});
};
@@ -21566,9 +21565,9 @@ function floatSafeRemainder(val, step) {
const valDecCount = (val.toString().split(".")[1] || "").length;
const stepDecCount = (step.toString().split(".")[1] || "").length;
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
return valInt % stepInt / Math.pow(10, decCount);
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
return valInt % stepInt / 10 ** decCount;
}
var ZodNumber = class _ZodNumber extends ZodType {
constructor() {
@@ -21778,7 +21777,8 @@ var ZodNumber = class _ZodNumber extends ZodType {
return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
}
get isFinite() {
let max = null, min = null;
let max = null;
let min = null;
for (const ch of this._def.checks) {
if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
return true;
@@ -21797,7 +21797,7 @@ ZodNumber.create = (params) => {
return new ZodNumber({
checks: [],
typeName: ZodFirstPartyTypeKind.ZodNumber,
coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
coerce: params?.coerce || false,
...processCreateParams(params)
});
};
@@ -21811,7 +21811,7 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
if (this._def.coerce) {
try {
input.data = BigInt(input.data);
} catch (_a) {
} catch {
return this._getInvalidInput(input);
}
}
@@ -21966,11 +21966,10 @@ var ZodBigInt = class _ZodBigInt extends ZodType {
}
};
ZodBigInt.create = (params) => {
var _a;
return new ZodBigInt({
checks: [],
typeName: ZodFirstPartyTypeKind.ZodBigInt,
coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
coerce: params?.coerce ?? false,
...processCreateParams(params)
});
};
@@ -21995,7 +21994,7 @@ var ZodBoolean = class extends ZodType {
ZodBoolean.create = (params) => {
return new ZodBoolean({
typeName: ZodFirstPartyTypeKind.ZodBoolean,
coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
coerce: params?.coerce || false,
...processCreateParams(params)
});
};
@@ -22014,7 +22013,7 @@ var ZodDate = class _ZodDate extends ZodType {
});
return INVALID;
}
if (isNaN(input.data.getTime())) {
if (Number.isNaN(input.data.getTime())) {
const ctx2 = this._getOrReturnCtx(input);
addIssueToContext(ctx2, {
code: ZodIssueCode.invalid_date
@@ -22103,7 +22102,7 @@ var ZodDate = class _ZodDate extends ZodType {
ZodDate.create = (params) => {
return new ZodDate({
checks: [],
coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
coerce: params?.coerce || false,
typeName: ZodFirstPartyTypeKind.ZodDate,
...processCreateParams(params)
});
@@ -22378,7 +22377,8 @@ var ZodObject = class _ZodObject extends ZodType {
return this._cached;
const shape = this._def.shape();
const keys = util.objectKeys(shape);
return this._cached = { shape, keys };
this._cached = { shape, keys };
return this._cached;
}
_parse(input) {
const parsedType = this._getType(input);
@@ -22428,8 +22428,8 @@ var ZodObject = class _ZodObject extends ZodType {
});
status.dirty();
}
} else if (unknownKeys === "strip") ;
else {
} else if (unknownKeys === "strip") {
} else {
throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
}
} else {
@@ -22476,11 +22476,10 @@ var ZodObject = class _ZodObject extends ZodType {
unknownKeys: "strict",
...message !== void 0 ? {
errorMap: (issue, ctx) => {
var _a, _b, _c, _d;
const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;
const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
if (issue.code === "unrecognized_keys")
return {
message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError
message: errorUtil.errToObj(message).message ?? defaultError
};
return {
message: defaultError
@@ -22611,11 +22610,11 @@ var ZodObject = class _ZodObject extends ZodType {
}
pick(mask) {
const shape = {};
util.objectKeys(mask).forEach((key) => {
for (const key of util.objectKeys(mask)) {
if (mask[key] && this.shape[key]) {
shape[key] = this.shape[key];
}
});
}
return new _ZodObject({
...this._def,
shape: () => shape
@@ -22623,11 +22622,11 @@ var ZodObject = class _ZodObject extends ZodType {
}
omit(mask) {
const shape = {};
util.objectKeys(this.shape).forEach((key) => {
for (const key of util.objectKeys(this.shape)) {
if (!mask[key]) {
shape[key] = this.shape[key];
}
});
}
return new _ZodObject({
...this._def,
shape: () => shape
@@ -22641,14 +22640,14 @@ var ZodObject = class _ZodObject extends ZodType {
}
partial(mask) {
const newShape = {};
util.objectKeys(this.shape).forEach((key) => {
for (const key of util.objectKeys(this.shape)) {
const fieldSchema = this.shape[key];
if (mask && !mask[key]) {
newShape[key] = fieldSchema;
} else {
newShape[key] = fieldSchema.optional();
}
});
}
return new _ZodObject({
...this._def,
shape: () => newShape
@@ -22656,7 +22655,7 @@ var ZodObject = class _ZodObject extends ZodType {
}
required(mask) {
const newShape = {};
util.objectKeys(this.shape).forEach((key) => {
for (const key of util.objectKeys(this.shape)) {
if (mask && !mask[key]) {
newShape[key] = this.shape[key];
} else {
@@ -22667,7 +22666,7 @@ var ZodObject = class _ZodObject extends ZodType {
}
newShape[key] = newField;
}
});
}
return new _ZodObject({
...this._def,
shape: () => newShape
@@ -23283,12 +23282,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
return makeIssue({
data: args,
path: ctx.path,
errorMaps: [
ctx.common.contextualErrorMap,
ctx.schemaErrorMap,
getErrorMap(),
errorMap
].filter((x) => !!x),
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
issueData: {
code: ZodIssueCode.invalid_arguments,
argumentsError: error2
@@ -23299,12 +23293,7 @@ var ZodFunction = class _ZodFunction extends ZodType {
return makeIssue({
data: returns,
path: ctx.path,
errorMaps: [
ctx.common.contextualErrorMap,
ctx.schemaErrorMap,
getErrorMap(),
errorMap
].filter((x) => !!x),
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
issueData: {
code: ZodIssueCode.invalid_return_type,
returnTypeError: error2
@@ -23428,10 +23417,6 @@ function createZodEnum(values, params) {
});
}
var ZodEnum = class _ZodEnum extends ZodType {
constructor() {
super(...arguments);
_ZodEnum_cache.set(this, void 0);
}
_parse(input) {
if (typeof input.data !== "string") {
const ctx = this._getOrReturnCtx(input);
@@ -23443,10 +23428,10 @@ var ZodEnum = class _ZodEnum extends ZodType {
});
return INVALID;
}
if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
__classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
if (!this._cache) {
this._cache = new Set(this._def.values);
}
if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
if (!this._cache.has(input.data)) {
const ctx = this._getOrReturnCtx(input);
const expectedValues = this._def.values;
addIssueToContext(ctx, {
@@ -23495,13 +23480,8 @@ var ZodEnum = class _ZodEnum extends ZodType {
});
}
};
_ZodEnum_cache = /* @__PURE__ */ new WeakMap();
ZodEnum.create = createZodEnum;
var ZodNativeEnum = class extends ZodType {
constructor() {
super(...arguments);
_ZodNativeEnum_cache.set(this, void 0);
}
_parse(input) {
const nativeEnumValues = util.getValidEnumValues(this._def.values);
const ctx = this._getOrReturnCtx(input);
@@ -23514,10 +23494,10 @@ var ZodNativeEnum = class extends ZodType {
});
return INVALID;
}
if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
__classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
if (!this._cache) {
this._cache = new Set(util.getValidEnumValues(this._def.values));
}
if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
if (!this._cache.has(input.data)) {
const expectedValues = util.objectValues(nativeEnumValues);
addIssueToContext(ctx, {
received: ctx.data,
@@ -23532,7 +23512,6 @@ var ZodNativeEnum = class extends ZodType {
return this._def.values;
}
};
_ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
ZodNativeEnum.create = (values, params) => {
return new ZodNativeEnum({
values,
@@ -23673,7 +23652,7 @@ var ZodEffects = class extends ZodType {
parent: ctx
});
if (!isValid(base))
return base;
return INVALID;
const result = effect.transform(base.value, checkCtx);
if (result instanceof Promise) {
throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
@@ -23682,8 +23661,11 @@ var ZodEffects = class extends ZodType {
} else {
return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
if (!isValid(base))
return base;
return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
return INVALID;
return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
status: status.value,
value: result
}));
});
}
}
@@ -24022,7 +24004,7 @@ function untildify(pathWithTilde) {
return homeDirectory ? pathWithTilde.replace(/^~(?=$|\/|\\)/, homeDirectory) : pathWithTilde;
}
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/error.js
// node_modules/.pnpm/smol-toml@1.3.4/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];
@@ -24062,7 +24044,7 @@ ${codeblock}`, options2);
}
};
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/util.js
// node_modules/.pnpm/smol-toml@1.3.4/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")
@@ -24102,9 +24084,7 @@ function skipUntil(str, ptr, sep, end, banNewLines = false) {
i = indexOfNewline(str, i);
} else if (c === sep) {
return i + 1;
} else if (c === end) {
return i;
} else if (banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
} else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
return i;
}
}
@@ -24119,7 +24099,7 @@ function getStringEnd(str, seek) {
seek += target.length - 1;
do
seek = str.indexOf(target, ++seek);
while (seek > -1 && first !== "'" && str[seek - 1] === "\\" && str[seek - 2] !== "\\");
while (seek > -1 && first !== "'" && str[seek - 1] === "\\" && (str[seek - 2] !== "\\" || str[seek - 3] === "\\"));
if (seek > -1) {
seek += target.length;
if (target.length > 1) {
@@ -24132,7 +24112,7 @@ function getStringEnd(str, seek) {
return seek;
}
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/date.js
// node_modules/.pnpm/smol-toml@1.3.4/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 _hasDate, _hasTime, _offset;
var _TomlDate = class _TomlDate extends Date {
@@ -24148,6 +24128,7 @@ var _TomlDate = class _TomlDate extends Date {
date = `0000-01-01T${date}`;
}
hasTime = !!match[2];
hasTime && date[10] === " " && (date = date.replace(" ", "T"));
if (match[2] && +match[2] > 23) {
date = "";
} else {
@@ -24228,7 +24209,7 @@ _hasTime = new WeakMap();
_offset = new WeakMap();
var TomlDate = _TomlDate;
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/primitive.js
// node_modules/.pnpm/smol-toml@1.3.4/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_]/;
@@ -24361,7 +24342,7 @@ function parseValue(value, toml, ptr) {
return date;
}
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/extract.js
// node_modules/.pnpm/smol-toml@1.3.4/node_modules/smol-toml/dist/extract.js
function sliceAndTrimEndOf(str, startPtr, endPtr, allowNewLines) {
let value = str.slice(startPtr, endPtr);
let commentIdx = value.indexOf("#");
@@ -24381,7 +24362,7 @@ function sliceAndTrimEndOf(str, startPtr, endPtr, allowNewLines) {
}
return [trimmed, commentIdx];
}
function extractValue(str, ptr, end, depth) {
function extractValue(str, ptr, end, depth = -1) {
if (depth === 0) {
throw new TomlError("document contains excessively nested structures. aborting.", {
toml: str,
@@ -24391,8 +24372,8 @@ function extractValue(str, ptr, end, depth) {
let c = str[ptr];
if (c === "[" || c === "{") {
let [value, endPtr2] = c === "[" ? parseArray(str, ptr, depth) : parseInlineTable(str, ptr, depth);
let newPtr = skipUntil(str, endPtr2, ",", end);
if (end === "}") {
let newPtr = end ? skipUntil(str, endPtr2, ",", end) : endPtr2;
if (endPtr2 - newPtr && end === "}") {
let nextNewLine = indexOfNewline(str, endPtr2, newPtr);
if (nextNewLine > -1) {
throw new TomlError("newlines are not allowed in inline tables", {
@@ -24437,7 +24418,7 @@ function extractValue(str, ptr, end, depth) {
];
}
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/struct.js
// node_modules/.pnpm/smol-toml@1.3.4/node_modules/smol-toml/dist/struct.js
var KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
function parseKey(str, ptr, end = "=") {
let dot = ptr - 1;
@@ -24506,7 +24487,7 @@ function parseKey(str, ptr, end = "=") {
} while (dot + 1 && dot < endPtr);
return [parsed, skipVoid(str, endPtr + 1, true, true)];
}
function parseInlineTable(str, ptr, depth) {
function parseInlineTable(str, ptr, depth = -1) {
let res = {};
let seen = /* @__PURE__ */ new Set();
let c;
@@ -24574,7 +24555,7 @@ function parseInlineTable(str, ptr, depth) {
}
return [res, ptr];
}
function parseArray(str, ptr, depth) {
function parseArray(str, ptr, depth = -1) {
let res = [];
let c;
ptr++;
@@ -24601,7 +24582,7 @@ function parseArray(str, ptr, depth) {
return [res, ptr];
}
// node_modules/.pnpm/smol-toml@1.3.1/node_modules/smol-toml/dist/parse.js
// node_modules/.pnpm/smol-toml@1.3.4/node_modules/smol-toml/dist/parse.js
function peekTable(key, table, meta, type) {
let t = table;
let m = meta;
@@ -24991,7 +24972,7 @@ var removeEmptyParentDirs = (dirPath) => {
return import_promises.default.readdir(dirPath).then((files) => {
if (files.length === 0) {
core2.debug(`Removing empty directory ${dirPath}.`);
return import_promises.default.rm(dirPath, { recursive: true }).then(() => {
return import_promises.default.rm(dirPath, { recursive: true, force: true }).then(() => {
const parentDir = import_path2.default.dirname(dirPath);
if (parentDir !== dirPath) {
return removeEmptyParentDirs(parentDir);
@@ -25005,7 +24986,12 @@ var cleanupPixiBin = () => {
const pixiBinPath = options.pixiBinPath;
const pixiBinDir = import_path2.default.dirname(pixiBinPath);
core2.debug(`Cleaning up pixi binary ${pixiBinPath}.`);
return import_promises.default.rm(pixiBinPath).then(() => removeEmptyParentDirs(pixiBinDir));
return import_promises.default.rm(pixiBinPath, {
// Ignore exceptions if pixi binary does not exist anymore,
// to avoid errors if setup-pixi is used multiple times within the same workflow.
// This could, for instance, be the case for composite actions using setup-pixi.
force: true
}).then(() => removeEmptyParentDirs(pixiBinDir));
};
var cleanupEnv = () => {
if (!options.runInstall) {
@@ -25014,7 +25000,12 @@ var cleanupEnv = () => {
}
const envDir = import_path2.default.join(import_path2.default.dirname(options.manifestPath), ".pixi");
core2.debug(`Cleaning up .pixi directory ${envDir}.`);
return import_promises.default.rm(envDir, { recursive: true });
return import_promises.default.rm(envDir, {
recursive: true,
// Ignore exceptions if environment does not exist anymore,
// to avoid errors if setup-pixi is used multiple times within the same workflow.
force: true
});
};
var determineCacheDir = () => {
if (import_os2.default.platform() === "win32") {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "setup-pixi",
"version": "0.8.8",
"version": "0.8.10",
"private": true,
"description": "Action to set up the pixi package manager.",
"scripts": {
@@ -27,7 +27,7 @@
"@actions/exec": "^1.1.1",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.2",
"smol-toml": "^1.3.1",
"smol-toml": "^1.3.4",
"untildify": "^5.0.0",
"which": "^5.0.0",
"zod": "^3.24.2"
+240 -134
View File
@@ -24,8 +24,8 @@ importers:
specifier: ^2.0.2
version: 2.0.2
smol-toml:
specifier: ^1.3.1
version: 1.3.1
specifier: ^1.3.4
version: 1.3.4
untildify:
specifier: ^5.0.0
version: 5.0.0
@@ -34,35 +34,35 @@ importers:
version: 5.0.0
zod:
specifier: ^3.24.2
version: 3.24.2
version: 3.25.45
devDependencies:
'@eslint/js':
specifier: ^9.23.0
version: 9.23.0
version: 9.28.0
'@types/eslint__js':
specifier: ^9.14.0
version: 9.14.0
'@types/node':
specifier: ^22.13.14
version: 22.13.14
version: 22.15.29
'@types/which':
specifier: ^3.0.4
version: 3.0.4
eslint:
specifier: ^9.23.0
version: 9.23.0
version: 9.28.0
prettier:
specifier: ^3.5.3
version: 3.5.3
tsup:
specifier: ^8.4.0
version: 8.4.0(typescript@5.8.2)
version: 8.5.0(typescript@5.8.3)
typescript:
specifier: ^5.8.2
version: 5.8.2
version: 5.8.3
typescript-eslint:
specifier: ^8.29.0
version: 8.29.0(eslint@9.23.0)(typescript@5.8.2)
version: 8.33.0(eslint@9.28.0)(typescript@5.8.3)
packages:
@@ -298,36 +298,42 @@ packages:
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
'@eslint-community/eslint-utils@4.7.0':
resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
'@eslint-community/regexpp@4.12.1':
resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
'@eslint/config-array@0.19.2':
resolution: {integrity: sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==}
'@eslint/config-array@0.20.0':
resolution: {integrity: sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/config-helpers@0.2.0':
resolution: {integrity: sha512-yJLLmLexii32mGrhW29qvU3QBVTu0GUmEf/J4XsBtVhp4JkIUFN/BjWqTF63yRvGApIDpZm5fa97LtYtINmfeQ==}
'@eslint/config-helpers@0.2.2':
resolution: {integrity: sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/core@0.12.0':
resolution: {integrity: sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==}
'@eslint/core@0.14.0':
resolution: {integrity: sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/eslintrc@3.3.1':
resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/js@9.23.0':
resolution: {integrity: sha512-35MJ8vCPU0ZMxo7zfev2pypqTwWTofFZO6m4KAtdoFhRpLJUpHTZZ+KB3C7Hb1d7bULYwO4lJXGCi5Se+8OMbw==}
'@eslint/js@9.28.0':
resolution: {integrity: sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/object-schema@2.1.6':
resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/plugin-kit@0.2.7':
resolution: {integrity: sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==}
'@eslint/plugin-kit@0.3.1':
resolution: {integrity: sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@fastify/busboy@2.1.1':
@@ -517,57 +523,67 @@ packages:
'@types/json-schema@7.0.15':
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
'@types/node@22.13.14':
resolution: {integrity: sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==}
'@types/node@22.15.29':
resolution: {integrity: sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==}
'@types/which@3.0.4':
resolution: {integrity: sha512-liyfuo/106JdlgSchJzXEQCVArk0CvevqPote8F8HgWgJ3dRCcTHgJIsLDuee0kxk/mhbInzIZk3QWSZJ8R+2w==}
'@typescript-eslint/eslint-plugin@8.29.0':
resolution: {integrity: sha512-PAIpk/U7NIS6H7TEtN45SPGLQaHNgB7wSjsQV/8+KYokAb2T/gloOA/Bee2yd4/yKVhPKe5LlaUGhAZk5zmSaQ==}
'@typescript-eslint/eslint-plugin@8.33.0':
resolution: {integrity: sha512-CACyQuqSHt7ma3Ns601xykeBK/rDeZa3w6IS6UtMQbixO5DWy+8TilKkviGDH6jtWCo8FGRKEK5cLLkPvEammQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
'@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0
'@typescript-eslint/parser': ^8.33.0
eslint: ^8.57.0 || ^9.0.0
typescript: '>=4.8.4 <5.9.0'
'@typescript-eslint/parser@8.29.0':
resolution: {integrity: sha512-8C0+jlNJOwQso2GapCVWWfW/rzaq7Lbme+vGUFKE31djwNncIpgXD7Cd4weEsDdkoZDjH0lwwr3QDQFuyrMg9g==}
'@typescript-eslint/parser@8.33.0':
resolution: {integrity: sha512-JaehZvf6m0yqYp34+RVnihBAChkqeH+tqqhS0GuX1qgPpwLvmTPheKEs6OeCK6hVJgXZHJ2vbjnC9j119auStQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
typescript: '>=4.8.4 <5.9.0'
'@typescript-eslint/scope-manager@8.29.0':
resolution: {integrity: sha512-aO1PVsq7Gm+tcghabUpzEnVSFMCU4/nYIgC2GOatJcllvWfnhrgW0ZEbnTxm36QsikmCN1K/6ZgM7fok2I7xNw==}
'@typescript-eslint/project-service@8.33.0':
resolution: {integrity: sha512-d1hz0u9l6N+u/gcrk6s6gYdl7/+pp8yHheRTqP6X5hVDKALEaTn8WfGiit7G511yueBEL3OpOEpD+3/MBdoN+A==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/type-utils@8.29.0':
resolution: {integrity: sha512-ahaWQ42JAOx+NKEf5++WC/ua17q5l+j1GFrbbpVKzFL/tKVc0aYY8rVSYUpUvt2hUP1YBr7mwXzx+E/DfUWI9Q==}
'@typescript-eslint/scope-manager@8.33.0':
resolution: {integrity: sha512-LMi/oqrzpqxyO72ltP+dBSP6V0xiUb4saY7WLtxSfiNEBI8m321LLVFU9/QDJxjDQG9/tjSqKz/E3380TEqSTw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/tsconfig-utils@8.33.0':
resolution: {integrity: sha512-sTkETlbqhEoiFmGr1gsdq5HyVbSOF0145SYDJ/EQmXHtKViCaGvnyLqWFFHtEXoS0J1yU8Wyou2UGmgW88fEug==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '>=4.8.4 <5.9.0'
'@typescript-eslint/type-utils@8.33.0':
resolution: {integrity: sha512-lScnHNCBqL1QayuSrWeqAL5GmqNdVUQAAMTaCwdYEdWfIrSrOGzyLGRCHXcCixa5NK6i5l0AfSO2oBSjCjf4XQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
typescript: '>=4.8.4 <5.9.0'
'@typescript-eslint/types@8.29.0':
resolution: {integrity: sha512-wcJL/+cOXV+RE3gjCyl/V2G877+2faqvlgtso/ZRbTCnZazh0gXhe+7gbAnfubzN2bNsBtZjDvlh7ero8uIbzg==}
'@typescript-eslint/types@8.33.0':
resolution: {integrity: sha512-DKuXOKpM5IDT1FA2g9x9x1Ug81YuKrzf4mYX8FAVSNu5Wo/LELHWQyM1pQaDkI42bX15PWl0vNPt1uGiIFUOpg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/typescript-estree@8.29.0':
resolution: {integrity: sha512-yOfen3jE9ISZR/hHpU/bmNvTtBW1NjRbkSFdZOksL1N+ybPEE7UVGMwqvS6CP022Rp00Sb0tdiIkhSCe6NI8ow==}
'@typescript-eslint/typescript-estree@8.33.0':
resolution: {integrity: sha512-vegY4FQoB6jL97Tu/lWRsAiUUp8qJTqzAmENH2k59SJhw0Th1oszb9Idq/FyyONLuNqT1OADJPXfyUNOR8SzAQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '>=4.8.4 <5.9.0'
'@typescript-eslint/utils@8.29.0':
resolution: {integrity: sha512-gX/A0Mz9Bskm8avSWFcK0gP7cZpbY4AIo6B0hWYFCaIsz750oaiWR4Jr2CI+PQhfW1CpcQr9OlfPS+kMFegjXA==}
'@typescript-eslint/utils@8.33.0':
resolution: {integrity: sha512-lPFuQaLA9aSNa7D5u2EpRiqdAUhzShwGg/nhpBlc4GR6kcTABttCuyjFs8BcEZ8VWrjCBof/bePhP3Q3fS+Yrw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
typescript: '>=4.8.4 <5.9.0'
'@typescript-eslint/visitor-keys@8.29.0':
resolution: {integrity: sha512-Sne/pVz8ryR03NFK21VpN88dZ2FdQXOlq3VIklbrTYEt8yXtRFr9tvUhqvCeKjqYk5FSim37sHbooT6vzBTZcg==}
'@typescript-eslint/visitor-keys@8.33.0':
resolution: {integrity: sha512-7RW7CMYoskiz5OOGAWjJFxgb7c5UNjTG292gYhWeOAcFmYCtVCSqjqSBj5zMhxbXo2JOW95YYrUWJfU0zrpaGQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
abort-controller@3.0.0:
@@ -673,6 +689,9 @@ packages:
concat-map@0.0.1:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
confbox@0.1.8:
resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==}
consola@3.4.0:
resolution: {integrity: sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==}
engines: {node: ^14.18.0 || >=16.10.0}
@@ -690,6 +709,15 @@ packages:
supports-color:
optional: true
debug@4.4.1:
resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==}
engines: {node: '>=6.0'}
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
deep-is@0.1.4:
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
@@ -747,8 +775,8 @@ packages:
resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
eslint@9.23.0:
resolution: {integrity: sha512-jV7AbNoFPAY1EkFYpLq5bslU9NLNO8xnEeQXwErNibVryjk67wHVmddTBilc5srIttJDBrB0eMHKZBFbSIABCw==}
eslint@9.28.0:
resolution: {integrity: sha512-ocgh41VhRlf9+fVpe7QKzwLj9c92fDiqOj8Y3Sd4/ZmVA4Btx4PlUYPq4pp9JDyupkf1upbEXecxL2mwNV7jPQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
hasBin: true
peerDependencies:
@@ -825,6 +853,9 @@ packages:
resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==}
engines: {node: '>=10'}
fix-dts-default-cjs-exports@1.0.1:
resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==}
flat-cache@4.0.1:
resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==}
engines: {node: '>=16'}
@@ -907,6 +938,10 @@ packages:
resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
engines: {node: '>= 4'}
ignore@7.0.5:
resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==}
engines: {node: '>= 4'}
import-fresh@3.3.1:
resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==}
engines: {node: '>=6'}
@@ -989,6 +1024,9 @@ packages:
lru-cache@10.4.3:
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
magic-string@0.30.17:
resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==}
math-intrinsics@1.1.0:
resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
engines: {node: '>= 0.4'}
@@ -1020,6 +1058,9 @@ packages:
resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}
engines: {node: '>=16 || 14 >=14.17'}
mlly@1.7.4:
resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==}
ms@2.1.3:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
@@ -1073,6 +1114,9 @@ packages:
resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
engines: {node: '>=16 || 14 >=14.18'}
pathe@2.0.3:
resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}
picocolors@1.1.1:
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
@@ -1088,6 +1132,9 @@ packages:
resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==}
engines: {node: '>= 6'}
pkg-types@1.3.1:
resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==}
postcss-load-config@6.0.1:
resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==}
engines: {node: '>= 18'}
@@ -1156,8 +1203,8 @@ packages:
resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==}
hasBin: true
semver@7.7.1:
resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==}
semver@7.7.2:
resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==}
engines: {node: '>=10'}
hasBin: true
@@ -1173,8 +1220,8 @@ packages:
resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
engines: {node: '>=14'}
smol-toml@1.3.1:
resolution: {integrity: sha512-tEYNll18pPKHroYSmLLrksq233j021G0giwW7P3D24jC54pQ5W5BXMsQ/Mvw1OJCmEYDgY+lrzT+3nNUtoNfXQ==}
smol-toml@1.3.4:
resolution: {integrity: sha512-UOPtVuYkzYGee0Bd2Szz8d2G3RfMfJ2t3qVdZUAozZyAk+a0Sxa+QKix0YCwjL/A1RR0ar44nCxaoN9FxdJGwA==}
engines: {node: '>= 18'}
source-map@0.8.0-beta.0:
@@ -1256,8 +1303,8 @@ packages:
tslib@2.8.1:
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
tsup@8.4.0:
resolution: {integrity: sha512-b+eZbPCjz10fRryaAA7C8xlIHnf8VnsaRqydheLIqwG/Mcpfk8Z5zp3HayX7GaTygkigHl5cBUs+IhcySiIexQ==}
tsup@8.5.0:
resolution: {integrity: sha512-VmBp77lWNQq6PfuMqCHD3xWl22vEoWsKajkF8t+yMBawlUS8JzEI+vOVMeuNZIuMML8qXRizFKi9oD5glKQVcQ==}
engines: {node: '>=18'}
hasBin: true
peerDependencies:
@@ -1283,8 +1330,8 @@ packages:
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
engines: {node: '>= 0.8.0'}
typescript-eslint@8.29.0:
resolution: {integrity: sha512-ep9rVd9B4kQsZ7ZnWCVxUE/xDLUUUsRzE0poAeNu+4CkFErLfuvPt/qtm2EpnSyfvsR0S6QzDFSrPCFBwf64fg==}
typescript-eslint@8.33.0:
resolution: {integrity: sha512-5YmNhF24ylCsvdNW2oJwMzTbaeO4bg90KeGtMjUw0AGtHksgEPLRTUil+coHwCfiu4QjVJFnjp94DmU6zV7DhQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
@@ -1295,13 +1342,16 @@ packages:
engines: {node: '>=4.2.0'}
hasBin: true
typescript@5.8.2:
resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==}
typescript@5.8.3:
resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==}
engines: {node: '>=14.17'}
hasBin: true
undici-types@6.20.0:
resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==}
ufo@1.6.1:
resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==}
undici-types@6.21.0:
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
undici@5.29.0:
resolution: {integrity: sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==}
@@ -1364,8 +1414,8 @@ packages:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
zod@3.24.2:
resolution: {integrity: sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ==}
zod@3.25.45:
resolution: {integrity: sha512-kv1swJBZqv98NQibL0oVvkQE8rXT+6qGNM1FpZkFcJG2jnz4vbtu48bgaitp85CaBPLSKXibrEsU7MzJoVoZAA==}
snapshots:
@@ -1596,14 +1646,19 @@ snapshots:
'@esbuild/win32-x64@0.25.0':
optional: true
'@eslint-community/eslint-utils@4.5.1(eslint@9.23.0)':
'@eslint-community/eslint-utils@4.5.1(eslint@9.28.0)':
dependencies:
eslint: 9.23.0
eslint: 9.28.0
eslint-visitor-keys: 3.4.3
'@eslint-community/eslint-utils@4.7.0(eslint@9.28.0)':
dependencies:
eslint: 9.28.0
eslint-visitor-keys: 3.4.3
'@eslint-community/regexpp@4.12.1': {}
'@eslint/config-array@0.19.2':
'@eslint/config-array@0.20.0':
dependencies:
'@eslint/object-schema': 2.1.6
debug: 4.4.0
@@ -1611,9 +1666,9 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@eslint/config-helpers@0.2.0': {}
'@eslint/config-helpers@0.2.2': {}
'@eslint/core@0.12.0':
'@eslint/core@0.14.0':
dependencies:
'@types/json-schema': 7.0.15
@@ -1631,13 +1686,13 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@eslint/js@9.23.0': {}
'@eslint/js@9.28.0': {}
'@eslint/object-schema@2.1.6': {}
'@eslint/plugin-kit@0.2.7':
'@eslint/plugin-kit@0.3.1':
dependencies:
'@eslint/core': 0.12.0
'@eslint/core': 0.14.0
levn: 0.4.1
'@fastify/busboy@2.1.1': {}
@@ -1776,7 +1831,7 @@ snapshots:
'@types/eslint__js@9.14.0':
dependencies:
'@eslint/js': 9.23.0
'@eslint/js': 9.28.0
'@types/estree@1.0.6': {}
@@ -1784,87 +1839,102 @@ snapshots:
'@types/json-schema@7.0.15': {}
'@types/node@22.13.14':
'@types/node@22.15.29':
dependencies:
undici-types: 6.20.0
undici-types: 6.21.0
'@types/which@3.0.4': {}
'@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2)':
'@typescript-eslint/eslint-plugin@8.33.0(@typescript-eslint/parser@8.33.0(eslint@9.28.0)(typescript@5.8.3))(eslint@9.28.0)(typescript@5.8.3)':
dependencies:
'@eslint-community/regexpp': 4.12.1
'@typescript-eslint/parser': 8.29.0(eslint@9.23.0)(typescript@5.8.2)
'@typescript-eslint/scope-manager': 8.29.0
'@typescript-eslint/type-utils': 8.29.0(eslint@9.23.0)(typescript@5.8.2)
'@typescript-eslint/utils': 8.29.0(eslint@9.23.0)(typescript@5.8.2)
'@typescript-eslint/visitor-keys': 8.29.0
eslint: 9.23.0
'@typescript-eslint/parser': 8.33.0(eslint@9.28.0)(typescript@5.8.3)
'@typescript-eslint/scope-manager': 8.33.0
'@typescript-eslint/type-utils': 8.33.0(eslint@9.28.0)(typescript@5.8.3)
'@typescript-eslint/utils': 8.33.0(eslint@9.28.0)(typescript@5.8.3)
'@typescript-eslint/visitor-keys': 8.33.0
eslint: 9.28.0
graphemer: 1.4.0
ignore: 5.3.2
ignore: 7.0.5
natural-compare: 1.4.0
ts-api-utils: 2.1.0(typescript@5.8.2)
typescript: 5.8.2
ts-api-utils: 2.1.0(typescript@5.8.3)
typescript: 5.8.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.2)':
'@typescript-eslint/parser@8.33.0(eslint@9.28.0)(typescript@5.8.3)':
dependencies:
'@typescript-eslint/scope-manager': 8.29.0
'@typescript-eslint/types': 8.29.0
'@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.2)
'@typescript-eslint/visitor-keys': 8.29.0
debug: 4.4.0
eslint: 9.23.0
typescript: 5.8.2
'@typescript-eslint/scope-manager': 8.33.0
'@typescript-eslint/types': 8.33.0
'@typescript-eslint/typescript-estree': 8.33.0(typescript@5.8.3)
'@typescript-eslint/visitor-keys': 8.33.0
debug: 4.4.1
eslint: 9.28.0
typescript: 5.8.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/scope-manager@8.29.0':
'@typescript-eslint/project-service@8.33.0(typescript@5.8.3)':
dependencies:
'@typescript-eslint/types': 8.29.0
'@typescript-eslint/visitor-keys': 8.29.0
'@typescript-eslint/tsconfig-utils': 8.33.0(typescript@5.8.3)
'@typescript-eslint/types': 8.33.0
debug: 4.4.1
transitivePeerDependencies:
- supports-color
- typescript
'@typescript-eslint/type-utils@8.29.0(eslint@9.23.0)(typescript@5.8.2)':
'@typescript-eslint/scope-manager@8.33.0':
dependencies:
'@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.2)
'@typescript-eslint/utils': 8.29.0(eslint@9.23.0)(typescript@5.8.2)
debug: 4.4.0
eslint: 9.23.0
ts-api-utils: 2.1.0(typescript@5.8.2)
typescript: 5.8.2
'@typescript-eslint/types': 8.33.0
'@typescript-eslint/visitor-keys': 8.33.0
'@typescript-eslint/tsconfig-utils@8.33.0(typescript@5.8.3)':
dependencies:
typescript: 5.8.3
'@typescript-eslint/type-utils@8.33.0(eslint@9.28.0)(typescript@5.8.3)':
dependencies:
'@typescript-eslint/typescript-estree': 8.33.0(typescript@5.8.3)
'@typescript-eslint/utils': 8.33.0(eslint@9.28.0)(typescript@5.8.3)
debug: 4.4.1
eslint: 9.28.0
ts-api-utils: 2.1.0(typescript@5.8.3)
typescript: 5.8.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/types@8.29.0': {}
'@typescript-eslint/types@8.33.0': {}
'@typescript-eslint/typescript-estree@8.29.0(typescript@5.8.2)':
'@typescript-eslint/typescript-estree@8.33.0(typescript@5.8.3)':
dependencies:
'@typescript-eslint/types': 8.29.0
'@typescript-eslint/visitor-keys': 8.29.0
debug: 4.4.0
'@typescript-eslint/project-service': 8.33.0(typescript@5.8.3)
'@typescript-eslint/tsconfig-utils': 8.33.0(typescript@5.8.3)
'@typescript-eslint/types': 8.33.0
'@typescript-eslint/visitor-keys': 8.33.0
debug: 4.4.1
fast-glob: 3.3.3
is-glob: 4.0.3
minimatch: 9.0.5
semver: 7.7.1
ts-api-utils: 2.1.0(typescript@5.8.2)
typescript: 5.8.2
semver: 7.7.2
ts-api-utils: 2.1.0(typescript@5.8.3)
typescript: 5.8.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/utils@8.29.0(eslint@9.23.0)(typescript@5.8.2)':
'@typescript-eslint/utils@8.33.0(eslint@9.28.0)(typescript@5.8.3)':
dependencies:
'@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0)
'@typescript-eslint/scope-manager': 8.29.0
'@typescript-eslint/types': 8.29.0
'@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.2)
eslint: 9.23.0
typescript: 5.8.2
'@eslint-community/eslint-utils': 4.7.0(eslint@9.28.0)
'@typescript-eslint/scope-manager': 8.33.0
'@typescript-eslint/types': 8.33.0
'@typescript-eslint/typescript-estree': 8.33.0(typescript@5.8.3)
eslint: 9.28.0
typescript: 5.8.3
transitivePeerDependencies:
- supports-color
'@typescript-eslint/visitor-keys@8.29.0':
'@typescript-eslint/visitor-keys@8.33.0':
dependencies:
'@typescript-eslint/types': 8.29.0
'@typescript-eslint/types': 8.33.0
eslint-visitor-keys: 4.2.0
abort-controller@3.0.0:
@@ -1954,6 +2024,8 @@ snapshots:
concat-map@0.0.1: {}
confbox@0.1.8: {}
consola@3.4.0: {}
cross-spawn@7.0.6:
@@ -1966,6 +2038,10 @@ snapshots:
dependencies:
ms: 2.1.3
debug@4.4.1:
dependencies:
ms: 2.1.3
deep-is@0.1.4: {}
delayed-stream@1.0.0: {}
@@ -2036,16 +2112,16 @@ snapshots:
eslint-visitor-keys@4.2.0: {}
eslint@9.23.0:
eslint@9.28.0:
dependencies:
'@eslint-community/eslint-utils': 4.5.1(eslint@9.23.0)
'@eslint-community/eslint-utils': 4.5.1(eslint@9.28.0)
'@eslint-community/regexpp': 4.12.1
'@eslint/config-array': 0.19.2
'@eslint/config-helpers': 0.2.0
'@eslint/core': 0.12.0
'@eslint/config-array': 0.20.0
'@eslint/config-helpers': 0.2.2
'@eslint/core': 0.14.0
'@eslint/eslintrc': 3.3.1
'@eslint/js': 9.23.0
'@eslint/plugin-kit': 0.2.7
'@eslint/js': 9.28.0
'@eslint/plugin-kit': 0.3.1
'@humanfs/node': 0.16.6
'@humanwhocodes/module-importer': 1.0.1
'@humanwhocodes/retry': 0.4.2
@@ -2137,6 +2213,12 @@ snapshots:
locate-path: 6.0.0
path-exists: 4.0.0
fix-dts-default-cjs-exports@1.0.1:
dependencies:
magic-string: 0.30.17
mlly: 1.7.4
rollup: 4.34.8
flat-cache@4.0.1:
dependencies:
flatted: 3.3.3
@@ -2218,19 +2300,21 @@ snapshots:
http-proxy-agent@7.0.2:
dependencies:
agent-base: 7.1.3
debug: 4.4.0
debug: 4.4.1
transitivePeerDependencies:
- supports-color
https-proxy-agent@7.0.6:
dependencies:
agent-base: 7.1.3
debug: 4.4.0
debug: 4.4.1
transitivePeerDependencies:
- supports-color
ignore@5.3.2: {}
ignore@7.0.5: {}
import-fresh@3.3.1:
dependencies:
parent-module: 1.0.1
@@ -2295,6 +2379,10 @@ snapshots:
lru-cache@10.4.3: {}
magic-string@0.30.17:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
math-intrinsics@1.1.0: {}
merge2@1.4.1: {}
@@ -2320,6 +2408,13 @@ snapshots:
minipass@7.1.2: {}
mlly@1.7.4:
dependencies:
acorn: 8.14.1
pathe: 2.0.3
pkg-types: 1.3.1
ufo: 1.6.1
ms@2.1.3: {}
mz@2.7.0:
@@ -2368,6 +2463,8 @@ snapshots:
lru-cache: 10.4.3
minipass: 7.1.2
pathe@2.0.3: {}
picocolors@1.1.1: {}
picomatch@2.3.1: {}
@@ -2376,6 +2473,12 @@ snapshots:
pirates@4.0.6: {}
pkg-types@1.3.1:
dependencies:
confbox: 0.1.8
mlly: 1.7.4
pathe: 2.0.3
postcss-load-config@6.0.1:
dependencies:
lilconfig: 3.1.3
@@ -2431,7 +2534,7 @@ snapshots:
semver@6.3.1: {}
semver@7.7.1: {}
semver@7.7.2: {}
shebang-command@2.0.0:
dependencies:
@@ -2441,7 +2544,7 @@ snapshots:
signal-exit@4.1.0: {}
smol-toml@1.3.1: {}
smol-toml@1.3.4: {}
source-map@0.8.0-beta.0:
dependencies:
@@ -2512,9 +2615,9 @@ snapshots:
tree-kill@1.2.2: {}
ts-api-utils@2.1.0(typescript@5.8.2):
ts-api-utils@2.1.0(typescript@5.8.3):
dependencies:
typescript: 5.8.2
typescript: 5.8.3
ts-interface-checker@0.1.13: {}
@@ -2522,7 +2625,7 @@ snapshots:
tslib@2.8.1: {}
tsup@8.4.0(typescript@5.8.2):
tsup@8.5.0(typescript@5.8.3):
dependencies:
bundle-require: 5.1.0(esbuild@0.25.0)
cac: 6.7.14
@@ -2530,6 +2633,7 @@ snapshots:
consola: 3.4.0
debug: 4.4.0
esbuild: 0.25.0
fix-dts-default-cjs-exports: 1.0.1
joycon: 3.1.1
picocolors: 1.1.1
postcss-load-config: 6.0.1
@@ -2541,7 +2645,7 @@ snapshots:
tinyglobby: 0.2.12
tree-kill: 1.2.2
optionalDependencies:
typescript: 5.8.2
typescript: 5.8.3
transitivePeerDependencies:
- jiti
- supports-color
@@ -2554,21 +2658,23 @@ snapshots:
dependencies:
prelude-ls: 1.2.1
typescript-eslint@8.29.0(eslint@9.23.0)(typescript@5.8.2):
typescript-eslint@8.33.0(eslint@9.28.0)(typescript@5.8.3):
dependencies:
'@typescript-eslint/eslint-plugin': 8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0)(typescript@5.8.2))(eslint@9.23.0)(typescript@5.8.2)
'@typescript-eslint/parser': 8.29.0(eslint@9.23.0)(typescript@5.8.2)
'@typescript-eslint/utils': 8.29.0(eslint@9.23.0)(typescript@5.8.2)
eslint: 9.23.0
typescript: 5.8.2
'@typescript-eslint/eslint-plugin': 8.33.0(@typescript-eslint/parser@8.33.0(eslint@9.28.0)(typescript@5.8.3))(eslint@9.28.0)(typescript@5.8.3)
'@typescript-eslint/parser': 8.33.0(eslint@9.28.0)(typescript@5.8.3)
'@typescript-eslint/utils': 8.33.0(eslint@9.28.0)(typescript@5.8.3)
eslint: 9.28.0
typescript: 5.8.3
transitivePeerDependencies:
- supports-color
typescript@3.9.10: {}
typescript@5.8.2: {}
typescript@5.8.3: {}
undici-types@6.20.0: {}
ufo@1.6.1: {}
undici-types@6.21.0: {}
undici@5.29.0:
dependencies:
@@ -2628,4 +2734,4 @@ snapshots:
yocto-queue@0.1.0: {}
zod@3.24.2: {}
zod@3.25.45: {}
+15 -3
View File
@@ -9,7 +9,7 @@ const removeEmptyParentDirs = (dirPath: string): Promise<void> => {
return fs.readdir(dirPath).then((files) => {
if (files.length === 0) {
core.debug(`Removing empty directory ${dirPath}.`)
return fs.rm(dirPath, { recursive: true }).then(() => {
return fs.rm(dirPath, { recursive: true, force: true }).then(() => {
const parentDir = path.dirname(dirPath)
if (parentDir !== dirPath) {
return removeEmptyParentDirs(parentDir)
@@ -24,7 +24,14 @@ const cleanupPixiBin = () => {
const pixiBinPath = options.pixiBinPath
const pixiBinDir = path.dirname(pixiBinPath)
core.debug(`Cleaning up pixi binary ${pixiBinPath}.`)
return fs.rm(pixiBinPath).then(() => removeEmptyParentDirs(pixiBinDir))
return fs
.rm(pixiBinPath, {
// Ignore exceptions if pixi binary does not exist anymore,
// to avoid errors if setup-pixi is used multiple times within the same workflow.
// This could, for instance, be the case for composite actions using setup-pixi.
force: true
})
.then(() => removeEmptyParentDirs(pixiBinDir))
}
const cleanupEnv = () => {
@@ -34,7 +41,12 @@ const cleanupEnv = () => {
}
const envDir = path.join(path.dirname(options.manifestPath), '.pixi')
core.debug(`Cleaning up .pixi directory ${envDir}.`)
return fs.rm(envDir, { recursive: true })
return fs.rm(envDir, {
recursive: true,
// Ignore exceptions if environment does not exist anymore,
// to avoid errors if setup-pixi is used multiple times within the same workflow.
force: true
})
}
const determineCacheDir = (): string => {