mirror of
https://github.com/prefix-dev/setup-pixi
synced 2026-10-08 15:04:08 +03:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9ac241030 | ||
|
|
b68487257f | ||
|
|
2058dcd92f | ||
|
|
fd715b50ef |
@@ -23,9 +23,9 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m
|
||||
## Usage
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
with:
|
||||
pixi-version: v0.21.1
|
||||
pixi-version: v0.22.0
|
||||
cache: true
|
||||
auth-host: prefix.dev
|
||||
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
|
||||
@@ -34,7 +34,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.7.0`) to avoid breaking changes.
|
||||
> Please pin the versions of this action to a specific version (i.e., `prefix-dev/setup-pixi@v0.8.0`) 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:
|
||||
@@ -73,7 +73,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.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
with:
|
||||
cache: true
|
||||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
|
||||
@@ -118,7 +118,7 @@ test:
|
||||
environment: [py311, py312]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: prefix-dev/setup-pixi@v0.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
with:
|
||||
environments: ${{ matrix.environment }}
|
||||
```
|
||||
@@ -128,7 +128,7 @@ test:
|
||||
The following example will install both the `py311` and the `py312` environment on the runner.
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
with:
|
||||
# separated by spaces
|
||||
environments: >-
|
||||
@@ -163,7 +163,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.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
with:
|
||||
auth-host: prefix.dev
|
||||
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
|
||||
@@ -175,7 +175,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.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
with:
|
||||
auth-host: custom-artifactory.com
|
||||
auth-username: ${{ secrets.PIXI_USERNAME }}
|
||||
@@ -188,7 +188,7 @@ Specify the conda-token using the `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.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
with:
|
||||
auth-host: anaconda.org # or my-quetz-instance.com
|
||||
conda-token: ${{ secrets.CONDA_TOKEN }}
|
||||
@@ -235,7 +235,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.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
with:
|
||||
activate-environment: true
|
||||
```
|
||||
@@ -243,7 +243,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.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
with:
|
||||
environments: >-
|
||||
py311
|
||||
@@ -260,7 +260,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.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
with:
|
||||
locked: true
|
||||
# or
|
||||
@@ -279,7 +279,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.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
env:
|
||||
RUNNER_DEBUG: true
|
||||
```
|
||||
@@ -297,7 +297,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.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
with:
|
||||
# one of `q`, `default`, `v`, `vv`, or `vvv`.
|
||||
log-level: vvv
|
||||
@@ -323,7 +323,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.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
with:
|
||||
post-cleanup: true
|
||||
# ${{ runner.temp }}\Scripts\pixi.exe on Windows
|
||||
@@ -339,7 +339,7 @@ You can also use a preinstalled local version of pixi on the runner by not setti
|
||||
This can be overwritten by setting the `manifest-path` input argument.
|
||||
|
||||
```yml
|
||||
- uses: prefix-dev/setup-pixi@v0.7.0
|
||||
- uses: prefix-dev/setup-pixi@v0.8.0
|
||||
with:
|
||||
manifest-path: pyproject.toml
|
||||
```
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ inputs:
|
||||
manifest-path:
|
||||
description: Path to the manifest file (i.e., `pixi.toml`) to use for the pixi CLI. Defaults to `pixi.toml`.
|
||||
run-install:
|
||||
description: Whether to run `pixi install` after setting up the environment. Defaults to `true`.
|
||||
description: Whether to run `pixi install` after installing pixi. Defaults to `true`.
|
||||
environments:
|
||||
description: |
|
||||
A space-separated list of environments to install. If not specified, only the default environment is installed.
|
||||
|
||||
+258
-68
@@ -78899,7 +78899,7 @@ var import_process = require("process");
|
||||
var import_fs = require("fs");
|
||||
var core = __toESM(require_core());
|
||||
|
||||
// node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
|
||||
// node_modules/.pnpm/zod@3.23.5/node_modules/zod/lib/index.mjs
|
||||
var util;
|
||||
(function(util4) {
|
||||
util4.assertEqual = (val) => val;
|
||||
@@ -79049,7 +79049,7 @@ var ZodIssueCode = util.arrayToEnum([
|
||||
"not_multiple_of",
|
||||
"not_finite"
|
||||
]);
|
||||
var ZodError = class extends Error {
|
||||
var ZodError = class _ZodError extends Error {
|
||||
constructor(issues) {
|
||||
super();
|
||||
this.issues = [];
|
||||
@@ -79107,6 +79107,11 @@ var ZodError = class extends Error {
|
||||
processError(this);
|
||||
return fieldErrors;
|
||||
}
|
||||
static assert(value) {
|
||||
if (!(value instanceof _ZodError)) {
|
||||
throw new Error(`Not a ZodError: ${value}`);
|
||||
}
|
||||
}
|
||||
toString() {
|
||||
return this.message;
|
||||
}
|
||||
@@ -79246,6 +79251,13 @@ var makeIssue = (params) => {
|
||||
...issueData,
|
||||
path: fullPath
|
||||
};
|
||||
if (issueData.message !== void 0) {
|
||||
return {
|
||||
...issueData,
|
||||
path: fullPath,
|
||||
message: issueData.message
|
||||
};
|
||||
}
|
||||
let errorMessage = "";
|
||||
const maps = errorMaps.filter((m) => !!m).slice().reverse();
|
||||
for (const map of maps) {
|
||||
@@ -79254,10 +79266,11 @@ var makeIssue = (params) => {
|
||||
return {
|
||||
...issueData,
|
||||
path: fullPath,
|
||||
message: issueData.message || errorMessage
|
||||
message: errorMessage
|
||||
};
|
||||
};
|
||||
function addIssueToContext(ctx, issueData) {
|
||||
const overrideMap = getErrorMap();
|
||||
const issue = makeIssue({
|
||||
issueData,
|
||||
data: ctx.data,
|
||||
@@ -79265,8 +79278,8 @@ function addIssueToContext(ctx, issueData) {
|
||||
errorMaps: [
|
||||
ctx.common.contextualErrorMap,
|
||||
ctx.schemaErrorMap,
|
||||
getErrorMap(),
|
||||
errorMap
|
||||
overrideMap,
|
||||
overrideMap === errorMap ? void 0 : errorMap
|
||||
// then global default map
|
||||
].filter((x) => !!x)
|
||||
});
|
||||
@@ -79298,9 +79311,11 @@ var ParseStatus = class _ParseStatus {
|
||||
static async mergeObjectAsync(status, pairs) {
|
||||
const syncPairs = [];
|
||||
for (const pair of pairs) {
|
||||
const key = await pair.key;
|
||||
const value = await pair.value;
|
||||
syncPairs.push({
|
||||
key: await pair.key,
|
||||
value: await pair.value
|
||||
key,
|
||||
value
|
||||
});
|
||||
}
|
||||
return _ParseStatus.mergeObjectSync(status, syncPairs);
|
||||
@@ -79333,11 +79348,29 @@ 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;
|
||||
}
|
||||
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;
|
||||
})(errorUtil || (errorUtil = {}));
|
||||
var _ZodEnum_cache;
|
||||
var _ZodNativeEnum_cache;
|
||||
var ParseInputLazyPath = class {
|
||||
constructor(parent, value, path4, key) {
|
||||
this._cachedPath = [];
|
||||
@@ -79386,12 +79419,17 @@ function processCreateParams(params) {
|
||||
if (errorMap2)
|
||||
return { errorMap: errorMap2, description };
|
||||
const customMap = (iss, ctx) => {
|
||||
var _a2, _b2;
|
||||
const { message } = params;
|
||||
if (iss.code === "invalid_enum_value") {
|
||||
return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
|
||||
}
|
||||
if (typeof ctx.data === "undefined") {
|
||||
return { message: (_a2 = message !== null && message !== void 0 ? message : required_error) !== null && _a2 !== void 0 ? _a2 : ctx.defaultError };
|
||||
}
|
||||
if (iss.code !== "invalid_type")
|
||||
return { message: ctx.defaultError };
|
||||
if (typeof ctx.data === "undefined") {
|
||||
return { message: required_error !== null && required_error !== void 0 ? required_error : ctx.defaultError };
|
||||
}
|
||||
return { message: invalid_type_error !== null && invalid_type_error !== void 0 ? invalid_type_error : ctx.defaultError };
|
||||
return { message: (_b2 = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b2 !== void 0 ? _b2 : ctx.defaultError };
|
||||
};
|
||||
return { errorMap: customMap, description };
|
||||
}
|
||||
@@ -79639,35 +79677,40 @@ var ZodType = class {
|
||||
}
|
||||
};
|
||||
var cuidRegex = /^c[^\s-]{8,}$/i;
|
||||
var cuid2Regex = /^[a-z][a-z0-9]*$/;
|
||||
var cuid2Regex = /^[0-9a-z]+$/;
|
||||
var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
|
||||
var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
|
||||
var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
|
||||
var nanoidRegex = /^[a-z0-9_-]{21}$/i;
|
||||
var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
|
||||
var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
|
||||
var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
||||
var emojiRegex;
|
||||
var ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;
|
||||
var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
||||
var ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
|
||||
var datetimeRegex = (args) => {
|
||||
var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
|
||||
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`;
|
||||
if (args.precision) {
|
||||
if (args.offset) {
|
||||
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
|
||||
} else {
|
||||
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`);
|
||||
}
|
||||
} else if (args.precision === 0) {
|
||||
if (args.offset) {
|
||||
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
|
||||
} else {
|
||||
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`);
|
||||
}
|
||||
} else {
|
||||
if (args.offset) {
|
||||
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
|
||||
} else {
|
||||
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$`);
|
||||
}
|
||||
regex = `${regex}\\.\\d{${args.precision}}`;
|
||||
} else if (args.precision == null) {
|
||||
regex = `${regex}(\\.\\d+)?`;
|
||||
}
|
||||
};
|
||||
return regex;
|
||||
}
|
||||
function timeRegex(args) {
|
||||
return new RegExp(`^${timeRegexSource(args)}$`);
|
||||
}
|
||||
function datetimeRegex(args) {
|
||||
let regex = `${dateRegexSource}T${timeRegexSource(args)}`;
|
||||
const opts = [];
|
||||
opts.push(args.local ? `Z?` : `Z`);
|
||||
if (args.offset)
|
||||
opts.push(`([+-]\\d{2}:?\\d{2})`);
|
||||
regex = `${regex}(${opts.join("|")})`;
|
||||
return new RegExp(`^${regex}$`);
|
||||
}
|
||||
function isValidIP(ip, version3) {
|
||||
if ((version3 === "v4" || !version3) && ipv4Regex.test(ip)) {
|
||||
return true;
|
||||
@@ -79685,15 +79728,11 @@ var ZodString = class _ZodString extends ZodType {
|
||||
const parsedType = this._getType(input);
|
||||
if (parsedType !== ZodParsedType.string) {
|
||||
const ctx2 = this._getOrReturnCtx(input);
|
||||
addIssueToContext(
|
||||
ctx2,
|
||||
{
|
||||
code: ZodIssueCode.invalid_type,
|
||||
expected: ZodParsedType.string,
|
||||
received: ctx2.parsedType
|
||||
}
|
||||
//
|
||||
);
|
||||
addIssueToContext(ctx2, {
|
||||
code: ZodIssueCode.invalid_type,
|
||||
expected: ZodParsedType.string,
|
||||
received: ctx2.parsedType
|
||||
});
|
||||
return INVALID;
|
||||
}
|
||||
const status = new ParseStatus();
|
||||
@@ -79784,6 +79823,16 @@ var ZodString = class _ZodString extends ZodType {
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "nanoid") {
|
||||
if (!nanoidRegex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
addIssueToContext(ctx, {
|
||||
validation: "nanoid",
|
||||
code: ZodIssueCode.invalid_string,
|
||||
message: check.message
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "cuid") {
|
||||
if (!cuidRegex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
@@ -79885,6 +79934,38 @@ var ZodString = class _ZodString extends ZodType {
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "date") {
|
||||
const regex = dateRegex;
|
||||
if (!regex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
addIssueToContext(ctx, {
|
||||
code: ZodIssueCode.invalid_string,
|
||||
validation: "date",
|
||||
message: check.message
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "time") {
|
||||
const regex = timeRegex(check);
|
||||
if (!regex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
addIssueToContext(ctx, {
|
||||
code: ZodIssueCode.invalid_string,
|
||||
validation: "time",
|
||||
message: check.message
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "duration") {
|
||||
if (!durationRegex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
addIssueToContext(ctx, {
|
||||
validation: "duration",
|
||||
code: ZodIssueCode.invalid_string,
|
||||
message: check.message
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "ip") {
|
||||
if (!isValidIP(input.data, check.version)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
@@ -79895,6 +79976,16 @@ var ZodString = class _ZodString extends ZodType {
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "base64") {
|
||||
if (!base64Regex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
addIssueToContext(ctx, {
|
||||
validation: "base64",
|
||||
code: ZodIssueCode.invalid_string,
|
||||
message: check.message
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else {
|
||||
util.assertNever(check);
|
||||
}
|
||||
@@ -79926,6 +80017,9 @@ var ZodString = class _ZodString extends ZodType {
|
||||
uuid(message) {
|
||||
return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) });
|
||||
}
|
||||
nanoid(message) {
|
||||
return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message) });
|
||||
}
|
||||
cuid(message) {
|
||||
return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) });
|
||||
}
|
||||
@@ -79935,16 +80029,20 @@ var ZodString = class _ZodString extends ZodType {
|
||||
ulid(message) {
|
||||
return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) });
|
||||
}
|
||||
base64(message) {
|
||||
return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
|
||||
}
|
||||
ip(options2) {
|
||||
return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options2) });
|
||||
}
|
||||
datetime(options2) {
|
||||
var _a2;
|
||||
var _a2, _b2;
|
||||
if (typeof options2 === "string") {
|
||||
return this._addCheck({
|
||||
kind: "datetime",
|
||||
precision: null,
|
||||
offset: false,
|
||||
local: false,
|
||||
message: options2
|
||||
});
|
||||
}
|
||||
@@ -79952,9 +80050,30 @@ var ZodString = class _ZodString extends ZodType {
|
||||
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: (_a2 = options2 === null || options2 === void 0 ? void 0 : options2.offset) !== null && _a2 !== void 0 ? _a2 : 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)
|
||||
});
|
||||
}
|
||||
date(message) {
|
||||
return this._addCheck({ kind: "date", message });
|
||||
}
|
||||
time(options2) {
|
||||
if (typeof options2 === "string") {
|
||||
return this._addCheck({
|
||||
kind: "time",
|
||||
precision: null,
|
||||
message: options2
|
||||
});
|
||||
}
|
||||
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)
|
||||
});
|
||||
}
|
||||
duration(message) {
|
||||
return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message) });
|
||||
}
|
||||
regex(regex, message) {
|
||||
return this._addCheck({
|
||||
kind: "regex",
|
||||
@@ -80033,6 +80152,15 @@ var ZodString = class _ZodString extends ZodType {
|
||||
get isDatetime() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "datetime");
|
||||
}
|
||||
get isDate() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "date");
|
||||
}
|
||||
get isTime() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "time");
|
||||
}
|
||||
get isDuration() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "duration");
|
||||
}
|
||||
get isEmail() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "email");
|
||||
}
|
||||
@@ -80045,6 +80173,9 @@ var ZodString = class _ZodString extends ZodType {
|
||||
get isUUID() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "uuid");
|
||||
}
|
||||
get isNANOID() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "nanoid");
|
||||
}
|
||||
get isCUID() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "cuid");
|
||||
}
|
||||
@@ -80057,6 +80188,9 @@ var ZodString = class _ZodString extends ZodType {
|
||||
get isIP() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "ip");
|
||||
}
|
||||
get isBase64() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "base64");
|
||||
}
|
||||
get minLength() {
|
||||
let min = null;
|
||||
for (const ch of this._def.checks) {
|
||||
@@ -80970,9 +81104,10 @@ var ZodObject = class _ZodObject extends ZodType {
|
||||
const syncPairs = [];
|
||||
for (const pair of pairs) {
|
||||
const key = await pair.key;
|
||||
const value = await pair.value;
|
||||
syncPairs.push({
|
||||
key,
|
||||
value: await pair.value,
|
||||
value,
|
||||
alwaysSet: pair.alwaysSet
|
||||
});
|
||||
}
|
||||
@@ -81323,15 +81458,25 @@ var getDiscriminator = (type3) => {
|
||||
} else if (type3 instanceof ZodEnum) {
|
||||
return type3.options;
|
||||
} else if (type3 instanceof ZodNativeEnum) {
|
||||
return Object.keys(type3.enum);
|
||||
return util.objectValues(type3.enum);
|
||||
} else if (type3 instanceof ZodDefault) {
|
||||
return getDiscriminator(type3._def.innerType);
|
||||
} else if (type3 instanceof ZodUndefined) {
|
||||
return [void 0];
|
||||
} else if (type3 instanceof ZodNull) {
|
||||
return [null];
|
||||
} else if (type3 instanceof ZodOptional) {
|
||||
return [void 0, ...getDiscriminator(type3.unwrap())];
|
||||
} else if (type3 instanceof ZodNullable) {
|
||||
return [null, ...getDiscriminator(type3.unwrap())];
|
||||
} else if (type3 instanceof ZodBranded) {
|
||||
return getDiscriminator(type3.unwrap());
|
||||
} else if (type3 instanceof ZodReadonly) {
|
||||
return getDiscriminator(type3.unwrap());
|
||||
} else if (type3 instanceof ZodCatch) {
|
||||
return getDiscriminator(type3._def.innerType);
|
||||
} else {
|
||||
return null;
|
||||
return [];
|
||||
}
|
||||
};
|
||||
var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {
|
||||
@@ -81391,7 +81536,7 @@ var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {
|
||||
const optionsMap = /* @__PURE__ */ new Map();
|
||||
for (const type3 of options2) {
|
||||
const discriminatorValues = getDiscriminator(type3.shape[discriminator]);
|
||||
if (!discriminatorValues) {
|
||||
if (!discriminatorValues.length) {
|
||||
throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
|
||||
}
|
||||
for (const value of discriminatorValues) {
|
||||
@@ -81591,7 +81736,8 @@ var ZodRecord = class _ZodRecord extends ZodType {
|
||||
for (const key in ctx.data) {
|
||||
pairs.push({
|
||||
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
|
||||
value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key))
|
||||
value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),
|
||||
alwaysSet: key in ctx.data
|
||||
});
|
||||
}
|
||||
if (ctx.common.async) {
|
||||
@@ -81935,6 +82081,10 @@ 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);
|
||||
@@ -81946,7 +82096,10 @@ var ZodEnum = class _ZodEnum extends ZodType {
|
||||
});
|
||||
return INVALID;
|
||||
}
|
||||
if (this._def.values.indexOf(input.data) === -1) {
|
||||
if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
|
||||
__classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
|
||||
}
|
||||
if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
|
||||
const ctx = this._getOrReturnCtx(input);
|
||||
const expectedValues = this._def.values;
|
||||
addIssueToContext(ctx, {
|
||||
@@ -81982,15 +82135,26 @@ var ZodEnum = class _ZodEnum extends ZodType {
|
||||
}
|
||||
return enumValues;
|
||||
}
|
||||
extract(values) {
|
||||
return _ZodEnum.create(values);
|
||||
extract(values, newDef = this._def) {
|
||||
return _ZodEnum.create(values, {
|
||||
...this._def,
|
||||
...newDef
|
||||
});
|
||||
}
|
||||
exclude(values) {
|
||||
return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));
|
||||
exclude(values, newDef = this._def) {
|
||||
return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {
|
||||
...this._def,
|
||||
...newDef
|
||||
});
|
||||
}
|
||||
};
|
||||
_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);
|
||||
@@ -82003,7 +82167,10 @@ var ZodNativeEnum = class extends ZodType {
|
||||
});
|
||||
return INVALID;
|
||||
}
|
||||
if (nativeEnumValues.indexOf(input.data) === -1) {
|
||||
if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
|
||||
__classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
|
||||
}
|
||||
if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
|
||||
const expectedValues = util.objectValues(nativeEnumValues);
|
||||
addIssueToContext(ctx, {
|
||||
received: ctx.data,
|
||||
@@ -82018,6 +82185,7 @@ var ZodNativeEnum = class extends ZodType {
|
||||
return this._def.values;
|
||||
}
|
||||
};
|
||||
_ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
|
||||
ZodNativeEnum.create = (values, params) => {
|
||||
return new ZodNativeEnum({
|
||||
values,
|
||||
@@ -82081,26 +82249,38 @@ var ZodEffects = class extends ZodType {
|
||||
checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
|
||||
if (effect.type === "preprocess") {
|
||||
const processed = effect.transform(ctx.data, checkCtx);
|
||||
if (ctx.common.issues.length) {
|
||||
return {
|
||||
status: "dirty",
|
||||
value: ctx.data
|
||||
};
|
||||
}
|
||||
if (ctx.common.async) {
|
||||
return Promise.resolve(processed).then((processed2) => {
|
||||
return this._def.schema._parseAsync({
|
||||
return Promise.resolve(processed).then(async (processed2) => {
|
||||
if (status.value === "aborted")
|
||||
return INVALID;
|
||||
const result = await this._def.schema._parseAsync({
|
||||
data: processed2,
|
||||
path: ctx.path,
|
||||
parent: ctx
|
||||
});
|
||||
if (result.status === "aborted")
|
||||
return INVALID;
|
||||
if (result.status === "dirty")
|
||||
return DIRTY(result.value);
|
||||
if (status.value === "dirty")
|
||||
return DIRTY(result.value);
|
||||
return result;
|
||||
});
|
||||
} else {
|
||||
return this._def.schema._parseSync({
|
||||
if (status.value === "aborted")
|
||||
return INVALID;
|
||||
const result = this._def.schema._parseSync({
|
||||
data: processed,
|
||||
path: ctx.path,
|
||||
parent: ctx
|
||||
});
|
||||
if (result.status === "aborted")
|
||||
return INVALID;
|
||||
if (result.status === "dirty")
|
||||
return DIRTY(result.value);
|
||||
if (status.value === "dirty")
|
||||
return DIRTY(result.value);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
if (effect.type === "refinement") {
|
||||
@@ -82394,6 +82574,9 @@ var ZodReadonly = class extends ZodType {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
unwrap() {
|
||||
return this._def.innerType;
|
||||
}
|
||||
};
|
||||
ZodReadonly.create = (type3, params) => {
|
||||
return new ZodReadonly({
|
||||
@@ -82599,10 +82782,17 @@ var inferOptions = (inputs) => {
|
||||
manifestPath = "pixi.toml";
|
||||
} else if ((0, import_fs.existsSync)("pyproject.toml")) {
|
||||
const fileContent = (0, import_fs.readFileSync)("pyproject.toml", "utf-8");
|
||||
const parsedContent = (0, import_toml.parse)(fileContent);
|
||||
if (parsedContent.tool && parsedContent.tool.pixi) {
|
||||
core.debug("The tool.pixi table found so using pyproject.toml as manifest file.");
|
||||
manifestPath = "pyproject.toml";
|
||||
console.log(fileContent);
|
||||
try {
|
||||
const parsedContent = (0, import_toml.parse)(fileContent);
|
||||
console.log(parsedContent);
|
||||
if (parsedContent.tool && parsedContent.tool.pixi) {
|
||||
core.debug("The tool.pixi table found so using pyproject.toml as manifest file.");
|
||||
manifestPath = "pyproject.toml";
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
throw new Error("Failed to parse pyproject.toml");
|
||||
}
|
||||
} else {
|
||||
if (runInstall) {
|
||||
@@ -83038,7 +83228,7 @@ run().catch((error2) => {
|
||||
(0, import_process2.exit)(1);
|
||||
}
|
||||
throw error2;
|
||||
});
|
||||
}).then(() => (0, import_process2.exit)(0));
|
||||
/*! Bundled license information:
|
||||
|
||||
undici/lib/fetch/body.js:
|
||||
|
||||
+257
-67
@@ -6258,7 +6258,7 @@ var import_process = require("process");
|
||||
var import_fs = require("fs");
|
||||
var core = __toESM(require_core());
|
||||
|
||||
// node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
|
||||
// node_modules/.pnpm/zod@3.23.5/node_modules/zod/lib/index.mjs
|
||||
var util;
|
||||
(function(util2) {
|
||||
util2.assertEqual = (val) => val;
|
||||
@@ -6408,7 +6408,7 @@ var ZodIssueCode = util.arrayToEnum([
|
||||
"not_multiple_of",
|
||||
"not_finite"
|
||||
]);
|
||||
var ZodError = class extends Error {
|
||||
var ZodError = class _ZodError extends Error {
|
||||
constructor(issues) {
|
||||
super();
|
||||
this.issues = [];
|
||||
@@ -6466,6 +6466,11 @@ var ZodError = class extends Error {
|
||||
processError(this);
|
||||
return fieldErrors;
|
||||
}
|
||||
static assert(value) {
|
||||
if (!(value instanceof _ZodError)) {
|
||||
throw new Error(`Not a ZodError: ${value}`);
|
||||
}
|
||||
}
|
||||
toString() {
|
||||
return this.message;
|
||||
}
|
||||
@@ -6605,6 +6610,13 @@ var makeIssue = (params) => {
|
||||
...issueData,
|
||||
path: fullPath
|
||||
};
|
||||
if (issueData.message !== void 0) {
|
||||
return {
|
||||
...issueData,
|
||||
path: fullPath,
|
||||
message: issueData.message
|
||||
};
|
||||
}
|
||||
let errorMessage = "";
|
||||
const maps = errorMaps.filter((m) => !!m).slice().reverse();
|
||||
for (const map of maps) {
|
||||
@@ -6613,10 +6625,11 @@ var makeIssue = (params) => {
|
||||
return {
|
||||
...issueData,
|
||||
path: fullPath,
|
||||
message: issueData.message || errorMessage
|
||||
message: errorMessage
|
||||
};
|
||||
};
|
||||
function addIssueToContext(ctx, issueData) {
|
||||
const overrideMap = getErrorMap();
|
||||
const issue = makeIssue({
|
||||
issueData,
|
||||
data: ctx.data,
|
||||
@@ -6624,8 +6637,8 @@ function addIssueToContext(ctx, issueData) {
|
||||
errorMaps: [
|
||||
ctx.common.contextualErrorMap,
|
||||
ctx.schemaErrorMap,
|
||||
getErrorMap(),
|
||||
errorMap
|
||||
overrideMap,
|
||||
overrideMap === errorMap ? void 0 : errorMap
|
||||
// then global default map
|
||||
].filter((x) => !!x)
|
||||
});
|
||||
@@ -6657,9 +6670,11 @@ var ParseStatus = class _ParseStatus {
|
||||
static async mergeObjectAsync(status, pairs) {
|
||||
const syncPairs = [];
|
||||
for (const pair of pairs) {
|
||||
const key = await pair.key;
|
||||
const value = await pair.value;
|
||||
syncPairs.push({
|
||||
key: await pair.key,
|
||||
value: await pair.value
|
||||
key,
|
||||
value
|
||||
});
|
||||
}
|
||||
return _ParseStatus.mergeObjectSync(status, syncPairs);
|
||||
@@ -6692,11 +6707,29 @@ 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;
|
||||
}
|
||||
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;
|
||||
})(errorUtil || (errorUtil = {}));
|
||||
var _ZodEnum_cache;
|
||||
var _ZodNativeEnum_cache;
|
||||
var ParseInputLazyPath = class {
|
||||
constructor(parent, value, path3, key) {
|
||||
this._cachedPath = [];
|
||||
@@ -6745,12 +6778,17 @@ 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 };
|
||||
}
|
||||
if (typeof ctx.data === "undefined") {
|
||||
return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
|
||||
}
|
||||
if (iss.code !== "invalid_type")
|
||||
return { message: ctx.defaultError };
|
||||
if (typeof ctx.data === "undefined") {
|
||||
return { message: required_error !== null && required_error !== void 0 ? required_error : ctx.defaultError };
|
||||
}
|
||||
return { message: invalid_type_error !== null && invalid_type_error !== void 0 ? invalid_type_error : ctx.defaultError };
|
||||
return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
|
||||
};
|
||||
return { errorMap: customMap, description };
|
||||
}
|
||||
@@ -6998,35 +7036,40 @@ var ZodType = class {
|
||||
}
|
||||
};
|
||||
var cuidRegex = /^c[^\s-]{8,}$/i;
|
||||
var cuid2Regex = /^[a-z][a-z0-9]*$/;
|
||||
var cuid2Regex = /^[0-9a-z]+$/;
|
||||
var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;
|
||||
var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
|
||||
var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
|
||||
var nanoidRegex = /^[a-z0-9_-]{21}$/i;
|
||||
var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
|
||||
var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
|
||||
var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
||||
var emojiRegex;
|
||||
var ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;
|
||||
var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
||||
var ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
|
||||
var datetimeRegex = (args) => {
|
||||
var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
|
||||
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`;
|
||||
if (args.precision) {
|
||||
if (args.offset) {
|
||||
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
|
||||
} else {
|
||||
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`);
|
||||
}
|
||||
} else if (args.precision === 0) {
|
||||
if (args.offset) {
|
||||
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
|
||||
} else {
|
||||
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`);
|
||||
}
|
||||
} else {
|
||||
if (args.offset) {
|
||||
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
|
||||
} else {
|
||||
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$`);
|
||||
}
|
||||
regex = `${regex}\\.\\d{${args.precision}}`;
|
||||
} else if (args.precision == null) {
|
||||
regex = `${regex}(\\.\\d+)?`;
|
||||
}
|
||||
};
|
||||
return regex;
|
||||
}
|
||||
function timeRegex(args) {
|
||||
return new RegExp(`^${timeRegexSource(args)}$`);
|
||||
}
|
||||
function datetimeRegex(args) {
|
||||
let regex = `${dateRegexSource}T${timeRegexSource(args)}`;
|
||||
const opts = [];
|
||||
opts.push(args.local ? `Z?` : `Z`);
|
||||
if (args.offset)
|
||||
opts.push(`([+-]\\d{2}:?\\d{2})`);
|
||||
regex = `${regex}(${opts.join("|")})`;
|
||||
return new RegExp(`^${regex}$`);
|
||||
}
|
||||
function isValidIP(ip, version2) {
|
||||
if ((version2 === "v4" || !version2) && ipv4Regex.test(ip)) {
|
||||
return true;
|
||||
@@ -7044,15 +7087,11 @@ var ZodString = class _ZodString extends ZodType {
|
||||
const parsedType = this._getType(input);
|
||||
if (parsedType !== ZodParsedType.string) {
|
||||
const ctx2 = this._getOrReturnCtx(input);
|
||||
addIssueToContext(
|
||||
ctx2,
|
||||
{
|
||||
code: ZodIssueCode.invalid_type,
|
||||
expected: ZodParsedType.string,
|
||||
received: ctx2.parsedType
|
||||
}
|
||||
//
|
||||
);
|
||||
addIssueToContext(ctx2, {
|
||||
code: ZodIssueCode.invalid_type,
|
||||
expected: ZodParsedType.string,
|
||||
received: ctx2.parsedType
|
||||
});
|
||||
return INVALID;
|
||||
}
|
||||
const status = new ParseStatus();
|
||||
@@ -7143,6 +7182,16 @@ var ZodString = class _ZodString extends ZodType {
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "nanoid") {
|
||||
if (!nanoidRegex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
addIssueToContext(ctx, {
|
||||
validation: "nanoid",
|
||||
code: ZodIssueCode.invalid_string,
|
||||
message: check.message
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "cuid") {
|
||||
if (!cuidRegex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
@@ -7244,6 +7293,38 @@ var ZodString = class _ZodString extends ZodType {
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "date") {
|
||||
const regex = dateRegex;
|
||||
if (!regex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
addIssueToContext(ctx, {
|
||||
code: ZodIssueCode.invalid_string,
|
||||
validation: "date",
|
||||
message: check.message
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "time") {
|
||||
const regex = timeRegex(check);
|
||||
if (!regex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
addIssueToContext(ctx, {
|
||||
code: ZodIssueCode.invalid_string,
|
||||
validation: "time",
|
||||
message: check.message
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "duration") {
|
||||
if (!durationRegex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
addIssueToContext(ctx, {
|
||||
validation: "duration",
|
||||
code: ZodIssueCode.invalid_string,
|
||||
message: check.message
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "ip") {
|
||||
if (!isValidIP(input.data, check.version)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
@@ -7254,6 +7335,16 @@ var ZodString = class _ZodString extends ZodType {
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else if (check.kind === "base64") {
|
||||
if (!base64Regex.test(input.data)) {
|
||||
ctx = this._getOrReturnCtx(input, ctx);
|
||||
addIssueToContext(ctx, {
|
||||
validation: "base64",
|
||||
code: ZodIssueCode.invalid_string,
|
||||
message: check.message
|
||||
});
|
||||
status.dirty();
|
||||
}
|
||||
} else {
|
||||
util.assertNever(check);
|
||||
}
|
||||
@@ -7285,6 +7376,9 @@ var ZodString = class _ZodString extends ZodType {
|
||||
uuid(message) {
|
||||
return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) });
|
||||
}
|
||||
nanoid(message) {
|
||||
return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message) });
|
||||
}
|
||||
cuid(message) {
|
||||
return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) });
|
||||
}
|
||||
@@ -7294,16 +7388,20 @@ var ZodString = class _ZodString extends ZodType {
|
||||
ulid(message) {
|
||||
return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) });
|
||||
}
|
||||
base64(message) {
|
||||
return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
|
||||
}
|
||||
ip(options2) {
|
||||
return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options2) });
|
||||
}
|
||||
datetime(options2) {
|
||||
var _a;
|
||||
var _a, _b;
|
||||
if (typeof options2 === "string") {
|
||||
return this._addCheck({
|
||||
kind: "datetime",
|
||||
precision: null,
|
||||
offset: false,
|
||||
local: false,
|
||||
message: options2
|
||||
});
|
||||
}
|
||||
@@ -7311,9 +7409,30 @@ var ZodString = class _ZodString extends ZodType {
|
||||
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)
|
||||
});
|
||||
}
|
||||
date(message) {
|
||||
return this._addCheck({ kind: "date", message });
|
||||
}
|
||||
time(options2) {
|
||||
if (typeof options2 === "string") {
|
||||
return this._addCheck({
|
||||
kind: "time",
|
||||
precision: null,
|
||||
message: options2
|
||||
});
|
||||
}
|
||||
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)
|
||||
});
|
||||
}
|
||||
duration(message) {
|
||||
return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message) });
|
||||
}
|
||||
regex(regex, message) {
|
||||
return this._addCheck({
|
||||
kind: "regex",
|
||||
@@ -7392,6 +7511,15 @@ var ZodString = class _ZodString extends ZodType {
|
||||
get isDatetime() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "datetime");
|
||||
}
|
||||
get isDate() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "date");
|
||||
}
|
||||
get isTime() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "time");
|
||||
}
|
||||
get isDuration() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "duration");
|
||||
}
|
||||
get isEmail() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "email");
|
||||
}
|
||||
@@ -7404,6 +7532,9 @@ var ZodString = class _ZodString extends ZodType {
|
||||
get isUUID() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "uuid");
|
||||
}
|
||||
get isNANOID() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "nanoid");
|
||||
}
|
||||
get isCUID() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "cuid");
|
||||
}
|
||||
@@ -7416,6 +7547,9 @@ var ZodString = class _ZodString extends ZodType {
|
||||
get isIP() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "ip");
|
||||
}
|
||||
get isBase64() {
|
||||
return !!this._def.checks.find((ch) => ch.kind === "base64");
|
||||
}
|
||||
get minLength() {
|
||||
let min = null;
|
||||
for (const ch of this._def.checks) {
|
||||
@@ -8329,9 +8463,10 @@ var ZodObject = class _ZodObject extends ZodType {
|
||||
const syncPairs = [];
|
||||
for (const pair of pairs) {
|
||||
const key = await pair.key;
|
||||
const value = await pair.value;
|
||||
syncPairs.push({
|
||||
key,
|
||||
value: await pair.value,
|
||||
value,
|
||||
alwaysSet: pair.alwaysSet
|
||||
});
|
||||
}
|
||||
@@ -8682,15 +8817,25 @@ var getDiscriminator = (type) => {
|
||||
} else if (type instanceof ZodEnum) {
|
||||
return type.options;
|
||||
} else if (type instanceof ZodNativeEnum) {
|
||||
return Object.keys(type.enum);
|
||||
return util.objectValues(type.enum);
|
||||
} else if (type instanceof ZodDefault) {
|
||||
return getDiscriminator(type._def.innerType);
|
||||
} else if (type instanceof ZodUndefined) {
|
||||
return [void 0];
|
||||
} else if (type instanceof ZodNull) {
|
||||
return [null];
|
||||
} else if (type instanceof ZodOptional) {
|
||||
return [void 0, ...getDiscriminator(type.unwrap())];
|
||||
} else if (type instanceof ZodNullable) {
|
||||
return [null, ...getDiscriminator(type.unwrap())];
|
||||
} else if (type instanceof ZodBranded) {
|
||||
return getDiscriminator(type.unwrap());
|
||||
} else if (type instanceof ZodReadonly) {
|
||||
return getDiscriminator(type.unwrap());
|
||||
} else if (type instanceof ZodCatch) {
|
||||
return getDiscriminator(type._def.innerType);
|
||||
} else {
|
||||
return null;
|
||||
return [];
|
||||
}
|
||||
};
|
||||
var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {
|
||||
@@ -8750,7 +8895,7 @@ var ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType {
|
||||
const optionsMap = /* @__PURE__ */ new Map();
|
||||
for (const type of options2) {
|
||||
const discriminatorValues = getDiscriminator(type.shape[discriminator]);
|
||||
if (!discriminatorValues) {
|
||||
if (!discriminatorValues.length) {
|
||||
throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
|
||||
}
|
||||
for (const value of discriminatorValues) {
|
||||
@@ -8950,7 +9095,8 @@ var ZodRecord = class _ZodRecord extends ZodType {
|
||||
for (const key in ctx.data) {
|
||||
pairs.push({
|
||||
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
|
||||
value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key))
|
||||
value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),
|
||||
alwaysSet: key in ctx.data
|
||||
});
|
||||
}
|
||||
if (ctx.common.async) {
|
||||
@@ -9294,6 +9440,10 @@ 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);
|
||||
@@ -9305,7 +9455,10 @@ var ZodEnum = class _ZodEnum extends ZodType {
|
||||
});
|
||||
return INVALID;
|
||||
}
|
||||
if (this._def.values.indexOf(input.data) === -1) {
|
||||
if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
|
||||
__classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
|
||||
}
|
||||
if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
|
||||
const ctx = this._getOrReturnCtx(input);
|
||||
const expectedValues = this._def.values;
|
||||
addIssueToContext(ctx, {
|
||||
@@ -9341,15 +9494,26 @@ var ZodEnum = class _ZodEnum extends ZodType {
|
||||
}
|
||||
return enumValues;
|
||||
}
|
||||
extract(values) {
|
||||
return _ZodEnum.create(values);
|
||||
extract(values, newDef = this._def) {
|
||||
return _ZodEnum.create(values, {
|
||||
...this._def,
|
||||
...newDef
|
||||
});
|
||||
}
|
||||
exclude(values) {
|
||||
return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));
|
||||
exclude(values, newDef = this._def) {
|
||||
return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {
|
||||
...this._def,
|
||||
...newDef
|
||||
});
|
||||
}
|
||||
};
|
||||
_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);
|
||||
@@ -9362,7 +9526,10 @@ var ZodNativeEnum = class extends ZodType {
|
||||
});
|
||||
return INVALID;
|
||||
}
|
||||
if (nativeEnumValues.indexOf(input.data) === -1) {
|
||||
if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
|
||||
__classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
|
||||
}
|
||||
if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
|
||||
const expectedValues = util.objectValues(nativeEnumValues);
|
||||
addIssueToContext(ctx, {
|
||||
received: ctx.data,
|
||||
@@ -9377,6 +9544,7 @@ var ZodNativeEnum = class extends ZodType {
|
||||
return this._def.values;
|
||||
}
|
||||
};
|
||||
_ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap();
|
||||
ZodNativeEnum.create = (values, params) => {
|
||||
return new ZodNativeEnum({
|
||||
values,
|
||||
@@ -9440,26 +9608,38 @@ var ZodEffects = class extends ZodType {
|
||||
checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
|
||||
if (effect.type === "preprocess") {
|
||||
const processed = effect.transform(ctx.data, checkCtx);
|
||||
if (ctx.common.issues.length) {
|
||||
return {
|
||||
status: "dirty",
|
||||
value: ctx.data
|
||||
};
|
||||
}
|
||||
if (ctx.common.async) {
|
||||
return Promise.resolve(processed).then((processed2) => {
|
||||
return this._def.schema._parseAsync({
|
||||
return Promise.resolve(processed).then(async (processed2) => {
|
||||
if (status.value === "aborted")
|
||||
return INVALID;
|
||||
const result = await this._def.schema._parseAsync({
|
||||
data: processed2,
|
||||
path: ctx.path,
|
||||
parent: ctx
|
||||
});
|
||||
if (result.status === "aborted")
|
||||
return INVALID;
|
||||
if (result.status === "dirty")
|
||||
return DIRTY(result.value);
|
||||
if (status.value === "dirty")
|
||||
return DIRTY(result.value);
|
||||
return result;
|
||||
});
|
||||
} else {
|
||||
return this._def.schema._parseSync({
|
||||
if (status.value === "aborted")
|
||||
return INVALID;
|
||||
const result = this._def.schema._parseSync({
|
||||
data: processed,
|
||||
path: ctx.path,
|
||||
parent: ctx
|
||||
});
|
||||
if (result.status === "aborted")
|
||||
return INVALID;
|
||||
if (result.status === "dirty")
|
||||
return DIRTY(result.value);
|
||||
if (status.value === "dirty")
|
||||
return DIRTY(result.value);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
if (effect.type === "refinement") {
|
||||
@@ -9753,6 +9933,9 @@ var ZodReadonly = class extends ZodType {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
unwrap() {
|
||||
return this._def.innerType;
|
||||
}
|
||||
};
|
||||
ZodReadonly.create = (type, params) => {
|
||||
return new ZodReadonly({
|
||||
@@ -9958,10 +10141,17 @@ var inferOptions = (inputs) => {
|
||||
manifestPath = "pixi.toml";
|
||||
} else if ((0, import_fs.existsSync)("pyproject.toml")) {
|
||||
const fileContent = (0, import_fs.readFileSync)("pyproject.toml", "utf-8");
|
||||
const parsedContent = (0, import_toml.parse)(fileContent);
|
||||
if (parsedContent.tool && parsedContent.tool.pixi) {
|
||||
core.debug("The tool.pixi table found so using pyproject.toml as manifest file.");
|
||||
manifestPath = "pyproject.toml";
|
||||
console.log(fileContent);
|
||||
try {
|
||||
const parsedContent = (0, import_toml.parse)(fileContent);
|
||||
console.log(parsedContent);
|
||||
if (parsedContent.tool && parsedContent.tool.pixi) {
|
||||
core.debug("The tool.pixi table found so using pyproject.toml as manifest file.");
|
||||
manifestPath = "pyproject.toml";
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
throw new Error("Failed to parse pyproject.toml");
|
||||
}
|
||||
} else {
|
||||
if (runInstall) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "setup-pixi",
|
||||
"version": "0.7.0",
|
||||
"version": "0.8.0",
|
||||
"private": true,
|
||||
"description": "Action to set up the pixi package manager.",
|
||||
"scripts": {
|
||||
|
||||
+14
-12
@@ -129,16 +129,18 @@ const run = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
run().catch((error) => {
|
||||
if (core.isDebug()) {
|
||||
run()
|
||||
.catch((error) => {
|
||||
if (core.isDebug()) {
|
||||
throw error
|
||||
}
|
||||
if (error instanceof Error) {
|
||||
core.setFailed(error.message)
|
||||
exit(1)
|
||||
} else if (typeof error === 'string') {
|
||||
core.setFailed(error)
|
||||
exit(1)
|
||||
}
|
||||
throw error
|
||||
}
|
||||
if (error instanceof Error) {
|
||||
core.setFailed(error.message)
|
||||
exit(1)
|
||||
} else if (typeof error === 'string') {
|
||||
core.setFailed(error)
|
||||
exit(1)
|
||||
}
|
||||
throw error
|
||||
})
|
||||
})
|
||||
.then(() => exit(0)) // workaround for https://github.com/actions/toolkit/issues/1578
|
||||
|
||||
+12
-5
@@ -209,11 +209,18 @@ const inferOptions = (inputs: Inputs): Options => {
|
||||
manifestPath = 'pixi.toml'
|
||||
} else if (existsSync('pyproject.toml')) {
|
||||
const fileContent = readFileSync('pyproject.toml', 'utf-8')
|
||||
const parsedContent = parse(fileContent)
|
||||
// only use pyproject.toml if [tool.pixi] is present
|
||||
if (parsedContent.tool && parsedContent.tool.pixi) {
|
||||
core.debug('The tool.pixi table found so using pyproject.toml as manifest file.')
|
||||
manifestPath = 'pyproject.toml'
|
||||
console.log(fileContent)
|
||||
try {
|
||||
const parsedContent = parse(fileContent)
|
||||
console.log(parsedContent)
|
||||
// only use pyproject.toml if [tool.pixi] is present
|
||||
if (parsedContent.tool && parsedContent.tool.pixi) {
|
||||
core.debug('The tool.pixi table found so using pyproject.toml as manifest file.')
|
||||
manifestPath = 'pyproject.toml'
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
throw new Error('Failed to parse pyproject.toml')
|
||||
}
|
||||
} else {
|
||||
if (runInstall) {
|
||||
|
||||
Reference in New Issue
Block a user