mirror of
https://github.com/prefix-dev/setup-pixi
synced 2026-10-08 15:04:08 +03:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2bb9e2af8 | ||
|
|
041b177283 | ||
|
|
c2b1b0900e | ||
|
|
fa1893576e | ||
|
|
2d8ad6d40b | ||
|
|
3386b66ca6 | ||
|
|
f2b00643d1 | ||
|
|
baaee6ddca | ||
|
|
0588e20b3b | ||
|
|
cd462a6dae | ||
|
|
1004096c21 | ||
|
|
3416289b3a |
+9
-6
@@ -3,21 +3,24 @@ changelog:
|
||||
labels:
|
||||
- ignore for release
|
||||
categories:
|
||||
- title: New features
|
||||
- title: 💥 Breaking changes
|
||||
labels:
|
||||
- breaking
|
||||
- title: ✨ New features
|
||||
labels:
|
||||
- enhancement
|
||||
- title: CI
|
||||
- title: 👷🏻 CI
|
||||
labels:
|
||||
- ci
|
||||
- title: Bug fixes
|
||||
- title: 🐛 Bug fixes
|
||||
labels:
|
||||
- bug
|
||||
- title: Documentation
|
||||
- title: 📝 Documentation
|
||||
labels:
|
||||
- documentation
|
||||
- title: Dependency updates
|
||||
- title: ⬆️ Dependency updates
|
||||
labels:
|
||||
- dependencies
|
||||
- title: Other changes
|
||||
- title: 🤷🏻 Other changes
|
||||
labels:
|
||||
- "*"
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
|
||||
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
|
||||
@@ -12,7 +12,7 @@ jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Quantco/ui-actions/version-metadata@v1
|
||||
id: version-metadata
|
||||
with:
|
||||
|
||||
@@ -64,8 +64,38 @@ jobs:
|
||||
- uses: ./
|
||||
with:
|
||||
pixi-version: v0.1.0
|
||||
# pixi 0.1.0 doesn't support --locked
|
||||
locked: false
|
||||
- run: pixi --version | grep -q "pixi 0.1.0"
|
||||
|
||||
frozen:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Move pixi.toml
|
||||
run: mv test/default/* .
|
||||
- uses: ./
|
||||
with:
|
||||
frozen: true
|
||||
- run: pixi run python --version | grep -q 3.11
|
||||
|
||||
locked:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Move pixi.toml
|
||||
run: mv test/default/* .
|
||||
- uses: ./
|
||||
with:
|
||||
locked: true
|
||||
- run: pixi run python --version | grep -q 3.11
|
||||
|
||||
custom-pixi-url:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -75,6 +105,8 @@ jobs:
|
||||
- uses: ./
|
||||
with:
|
||||
pixi-url: https://github.com/prefix-dev/pixi/releases/download/v0.0.8/pixi-x86_64-unknown-linux-musl
|
||||
# pixi 0.0.8 doesn't support --locked
|
||||
locked: false
|
||||
- run: pixi --version | grep -q "pixi 0.0.8"
|
||||
|
||||
custom-manifest-path:
|
||||
@@ -186,6 +218,23 @@ jobs:
|
||||
# https://github.com/prefix-dev/pixi/issues/330
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
|
||||
auth-token-install:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Move pixi.toml
|
||||
run: mv test/auth/* .
|
||||
- uses: ./
|
||||
with:
|
||||
auth-host: https://repo.prefix.dev
|
||||
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
|
||||
- name: Ensure private-package is installed
|
||||
run: |
|
||||
test -f .pixi/env/conda-meta/private-package-0.0.1-0.json
|
||||
|
||||
pixi-shell:
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -405,3 +454,84 @@ jobs:
|
||||
# cache-key: test-cache-no-lockfile-${{ github.sha }}-${{ github.run_attempt }}-
|
||||
# - run: exit 1
|
||||
# if: success()
|
||||
|
||||
# test-incorrect-version:
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
# - name: Move pixi files
|
||||
# run: mv test/default/* .
|
||||
# - uses: ./
|
||||
# with:
|
||||
# pixi-version: 0.1.0
|
||||
# - run: exit 1
|
||||
# if: success()
|
||||
|
||||
# test-frozen-and-locked:
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
# - name: Move pixi files
|
||||
# run: mv test/default/* .
|
||||
# - uses: ./
|
||||
# with:
|
||||
# pixi-version: v0.5.0
|
||||
# frozen: true
|
||||
# locked: true
|
||||
# - run: exit 1
|
||||
# if: success()
|
||||
|
||||
# test-frozen-no-lockfile:
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
# - name: Move pixi files
|
||||
# run: mv test/no-lockfile/* .
|
||||
# - uses: ./
|
||||
# with:
|
||||
# frozen: true
|
||||
# - run: exit 1
|
||||
# if: success()
|
||||
|
||||
# test-locked-no-lockfile:
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
# - name: Move pixi files
|
||||
# run: mv test/no-lockfile/* .
|
||||
# - uses: ./
|
||||
# with:
|
||||
# locked: true
|
||||
# - run: exit 1
|
||||
# if: success()
|
||||
|
||||
# test-lockfile-not-up-to-date:
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
# - name: Move pixi files
|
||||
# run: mv test/lockfile-not-up-to-date/* .
|
||||
# - uses: ./
|
||||
# # locked: true is implicit
|
||||
# - run: exit 1
|
||||
# if: success()
|
||||
|
||||
@@ -1,15 +1,31 @@
|
||||
# setup-pixi 📦
|
||||
<h1 align="center">
|
||||
|
||||
[](https://github.com/pavelzw/setup-pixi/actions/workflows/test.yml)
|
||||
[![License][license-badge]][license]
|
||||
[![CI][build-badge]][build]
|
||||
[![Latest release][latest-release-badge]][releases]
|
||||
[![Project Chat][chat-badge]][chat-url]
|
||||
|
||||
[license-badge]: https://img.shields.io/github/license/prefix-dev/setup-pixi?style=flat-square
|
||||
[license]: ./LICENSE
|
||||
[build-badge]: https://img.shields.io/github/actions/workflow/status/prefix-dev/setup-pixi/test.yml?style=flat-square
|
||||
[build]: https://github.com/prefix-dev/setup-pixi/actions/
|
||||
[latest-release-badge]: https://img.shields.io/github/v/tag/prefix-dev/setup-pixi?style=flat-square&label=latest&sort=semver
|
||||
[releases]: https://github.com/prefix-dev/setup-pixi/releases
|
||||
[chat-badge]: https://img.shields.io/discord/1082332781146800168.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2&style=flat-square
|
||||
[chat-url]: https://discord.gg/kKV8ZxyzY4
|
||||
|
||||
</h1>
|
||||
|
||||
# setup-pixi 📦
|
||||
|
||||
GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package manager.
|
||||
|
||||
## Usage
|
||||
|
||||
```yml
|
||||
- uses: pavelzw/setup-pixi@v0.2.0
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
with:
|
||||
pixi-version: '0.2.0'
|
||||
pixi-version: v0.5.0
|
||||
cache: true
|
||||
auth-host: prefix.dev
|
||||
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
|
||||
@@ -18,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., `pavelzw/setup-pixi@v0.2.0`) to avoid breaking changes.
|
||||
> Please pin the versions of this action to a specific version (i.e., `prefix-dev/setup-pixi@v0.3.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).
|
||||
|
||||
## Features
|
||||
@@ -55,7 +71,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: pavelzw/setup-pixi@v0.2.0
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
with:
|
||||
auth-host: prefix.dev
|
||||
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
|
||||
@@ -67,7 +83,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: pavelzw/setup-pixi@v0.2.0
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
with:
|
||||
auth-host: custom-artifactory.com
|
||||
auth-username: ${{ secrets.PIXI_USERNAME }}
|
||||
@@ -80,7 +96,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: pavelzw/setup-pixi@v0.2.0
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
with:
|
||||
auth-host: anaconda.org # or my-quetz-instance.com
|
||||
conda-token: ${{ secrets.CONDA_TOKEN }}
|
||||
@@ -112,6 +128,21 @@ You can even run python scripts like this:
|
||||
> This file does not have the executable bit set, so you cannot use `shell: pixi run {0}` directly but instead have to use `shell: pixi run bash {0}`.
|
||||
> See the [official documentation](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#custom-shell) and [ADR 0277](https://github.com/actions/runner/blob/main/docs/adrs/0277-run-action-shell-options.md) for more information about how the `shell:` input works in GitHub Actions.
|
||||
|
||||
### `--frozen` and `--locked`
|
||||
|
||||
You can specify whether `setup-pixi` should run `pixi install --frozen` or `pixi install --locked` depending on the `frozen` or the `locked` input argument.
|
||||
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.3.0
|
||||
with:
|
||||
locked: true
|
||||
# or
|
||||
frozen: true
|
||||
```
|
||||
|
||||
If you don't specify anything, the default behavior is to run `pixi install --locked` if a `pixi.lock` file is present and `pixi install` otherwise.
|
||||
|
||||
### Debugging
|
||||
|
||||
There are two types of debug logging that you can enable.
|
||||
@@ -122,7 +153,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: pavelzw/setup-pixi@v0.2.0
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
env:
|
||||
RUNNER_DEBUG: true
|
||||
```
|
||||
@@ -140,7 +171,7 @@ The second type is the debug logging of the pixi executable.
|
||||
This can be specified by setting the `log-level` input.
|
||||
|
||||
```yml
|
||||
- uses: pavelzw/setup-pixi@v0.2.0
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
with:
|
||||
# one of `q`, `default`, `v`, `vv`, or `vvv`.
|
||||
log-level: vvv
|
||||
@@ -164,7 +195,7 @@ If you set `post-cleanup` to `true`, the action will delete the following files:
|
||||
If nothing is specified, `setup-pixi` will default to `true`.
|
||||
|
||||
```yml
|
||||
- uses: pavelzw/setup-pixi@v0.2.0
|
||||
- uses: prefix-dev/setup-pixi@v0.3.0
|
||||
with:
|
||||
post-cleanup: false
|
||||
```
|
||||
|
||||
@@ -18,6 +18,10 @@ inputs:
|
||||
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`.
|
||||
locked:
|
||||
description: Whether to use `pixi install --locked`. Defaults to `true` when the lockfile is present, otherwise `false`.
|
||||
frozen:
|
||||
description: Whether to use `pixi install --frozen`. Defaults to `false`.
|
||||
cache:
|
||||
description: Whether to cache the pixi environment. Defaults to `true`. Only works if `pixi.lock` is present.
|
||||
cache-key:
|
||||
|
||||
+100
-35
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/utils.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/utils.js
|
||||
var require_utils = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/utils.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/utils.js"(exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.toCommandProperties = exports.toCommandValue = void 0;
|
||||
@@ -65,9 +65,9 @@ var require_utils = __commonJS({
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/command.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/command.js
|
||||
var require_command = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/command.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/command.js"(exports) {
|
||||
"use strict";
|
||||
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
||||
if (k2 === void 0)
|
||||
@@ -500,9 +500,9 @@ var init_esm_node = __esm({
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/file-command.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/file-command.js
|
||||
var require_file_command = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/file-command.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/file-command.js"(exports) {
|
||||
"use strict";
|
||||
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
||||
if (k2 === void 0)
|
||||
@@ -1570,9 +1570,9 @@ var require_auth = __commonJS({
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/oidc-utils.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/oidc-utils.js
|
||||
var require_oidc_utils = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/oidc-utils.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/oidc-utils.js"(exports) {
|
||||
"use strict";
|
||||
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
||||
function adopt(value) {
|
||||
@@ -1637,7 +1637,7 @@ var require_oidc_utils = __commonJS({
|
||||
|
||||
Error Code : ${error2.statusCode}
|
||||
|
||||
Error Message: ${error2.result.message}`);
|
||||
Error Message: ${error2.message}`);
|
||||
});
|
||||
const id_token = (_a2 = res.result) === null || _a2 === void 0 ? void 0 : _a2.value;
|
||||
if (!id_token) {
|
||||
@@ -1668,9 +1668,9 @@ var require_oidc_utils = __commonJS({
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/summary.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/summary.js
|
||||
var require_summary = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/summary.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/summary.js"(exports) {
|
||||
"use strict";
|
||||
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
||||
function adopt(value) {
|
||||
@@ -1962,9 +1962,9 @@ var require_summary = __commonJS({
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/path-utils.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/path-utils.js
|
||||
var require_path_utils = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/path-utils.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/path-utils.js"(exports) {
|
||||
"use strict";
|
||||
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
||||
if (k2 === void 0)
|
||||
@@ -2012,9 +2012,9 @@ var require_path_utils = __commonJS({
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/core.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/core.js
|
||||
var require_core = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/core.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/core.js"(exports) {
|
||||
"use strict";
|
||||
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
||||
if (k2 === void 0)
|
||||
@@ -2152,15 +2152,15 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
|
||||
command_1.issue("echo", enabled2 ? "on" : "off");
|
||||
}
|
||||
exports.setCommandEcho = setCommandEcho;
|
||||
function setFailed2(message) {
|
||||
function setFailed3(message) {
|
||||
process.exitCode = ExitCode.Failure;
|
||||
error2(message);
|
||||
}
|
||||
exports.setFailed = setFailed2;
|
||||
function isDebug2() {
|
||||
exports.setFailed = setFailed3;
|
||||
function isDebug3() {
|
||||
return process.env["RUNNER_DEBUG"] === "1";
|
||||
}
|
||||
exports.isDebug = isDebug2;
|
||||
exports.isDebug = isDebug3;
|
||||
function debug5(message) {
|
||||
command_1.issueCommand("debug", {}, message);
|
||||
}
|
||||
@@ -22602,9 +22602,9 @@ var init_requestPolicy = __esm({
|
||||
/**
|
||||
* The main method to implement that manipulates a request/response.
|
||||
*/
|
||||
constructor(_nextPolicy, _options) {
|
||||
constructor(_nextPolicy, _options2) {
|
||||
this._nextPolicy = _nextPolicy;
|
||||
this._options = _options;
|
||||
this._options = _options2;
|
||||
}
|
||||
/**
|
||||
* Get whether or not a log with the provided log level should be logged.
|
||||
@@ -29352,10 +29352,10 @@ var init_userAgentPolicy = __esm({
|
||||
init_httpHeaders();
|
||||
getDefaultUserAgentHeaderName = getDefaultUserAgentKey;
|
||||
UserAgentPolicy = class extends BaseRequestPolicy {
|
||||
constructor(_nextPolicy, _options, headerKey, headerValue) {
|
||||
super(_nextPolicy, _options);
|
||||
constructor(_nextPolicy, _options2, headerKey, headerValue) {
|
||||
super(_nextPolicy, _options2);
|
||||
this._nextPolicy = _nextPolicy;
|
||||
this._options = _options;
|
||||
this._options = _options2;
|
||||
this.headerKey = headerKey;
|
||||
this.headerValue = headerValue;
|
||||
}
|
||||
@@ -30781,7 +30781,7 @@ var init_ProxyTracer = __esm({
|
||||
ProxyTracer2.prototype.startSpan = function(name, options2, context3) {
|
||||
return this._getTracer().startSpan(name, options2, context3);
|
||||
};
|
||||
ProxyTracer2.prototype.startActiveSpan = function(_name, _options, _context, _fn) {
|
||||
ProxyTracer2.prototype.startActiveSpan = function(_name, _options2, _context, _fn) {
|
||||
var tracer = this._getTracer();
|
||||
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
||||
};
|
||||
@@ -30811,7 +30811,7 @@ var init_NoopTracerProvider = __esm({
|
||||
function() {
|
||||
function NoopTracerProvider2() {
|
||||
}
|
||||
NoopTracerProvider2.prototype.getTracer = function(_name, _version, _options) {
|
||||
NoopTracerProvider2.prototype.getTracer = function(_name, _version, _options2) {
|
||||
return new NoopTracer();
|
||||
};
|
||||
return NoopTracerProvider2;
|
||||
@@ -46011,7 +46011,7 @@ var init_Credential = __esm({
|
||||
* @param _nextPolicy -
|
||||
* @param _options -
|
||||
*/
|
||||
create(_nextPolicy, _options) {
|
||||
create(_nextPolicy, _options2) {
|
||||
throw new Error("Method should be implemented in children classes.");
|
||||
}
|
||||
};
|
||||
@@ -57377,12 +57377,15 @@ var require_cache = __commonJS({
|
||||
var import_promises2 = __toESM(require("fs/promises"));
|
||||
var import_os3 = __toESM(require("os"));
|
||||
var import_path3 = __toESM(require("path"));
|
||||
var import_process2 = require("process");
|
||||
var core4 = __toESM(require_core());
|
||||
var import_tool_cache = __toESM(require_tool_cache());
|
||||
|
||||
// src/options.ts
|
||||
var import_path = __toESM(require("path"));
|
||||
var import_os = __toESM(require("os"));
|
||||
var import_process = require("process");
|
||||
var import_fs = require("fs");
|
||||
var core = __toESM(require_core());
|
||||
|
||||
// node_modules/.pnpm/zod@3.22.2/node_modules/zod/lib/index.mjs
|
||||
@@ -60965,12 +60968,19 @@ var logLevelSchema = enumType(["q", "default", "v", "vv", "vvv"]);
|
||||
var PATHS = {
|
||||
pixiBin: import_path.default.join(import_os.default.homedir(), ".pixi", "bin", `pixi${import_os.default.platform() === "win32" ? ".exe" : ""}`)
|
||||
};
|
||||
var parseOrUndefined = (key, schema) => {
|
||||
var parseOrUndefined = (key, schema, errorMessage) => {
|
||||
const input = core.getInput(key);
|
||||
if (input === "") {
|
||||
return void 0;
|
||||
}
|
||||
return schema.parse(input);
|
||||
const maybeResult = schema.safeParse(input);
|
||||
if (!maybeResult.success) {
|
||||
if (!errorMessage) {
|
||||
throw new Error(`${key} is not valid: ${maybeResult.error.message}`);
|
||||
}
|
||||
throw new Error(errorMessage);
|
||||
}
|
||||
return maybeResult.data;
|
||||
};
|
||||
var parseOrUndefinedJSON = (key, schema) => {
|
||||
const input = core.getInput(key);
|
||||
@@ -60989,6 +60999,15 @@ var validateInputs = (inputs) => {
|
||||
if (inputs.runInstall === false && inputs.cache === true) {
|
||||
throw new Error("Cannot cache without running install");
|
||||
}
|
||||
if (inputs.runInstall === false && inputs.frozen === true) {
|
||||
throw new Error("Cannot use `frozen: true` when not running install");
|
||||
}
|
||||
if (inputs.runInstall === false && inputs.locked === true) {
|
||||
throw new Error("Cannot use `locked: true` when not running install");
|
||||
}
|
||||
if (inputs.locked === true && inputs.frozen === true) {
|
||||
throw new Error("Cannot use `locked: true` and `frozen: true` at the same time");
|
||||
}
|
||||
if (inputs.authUsername && !inputs.authPassword || !inputs.authUsername && inputs.authPassword) {
|
||||
throw new Error("You need to specify both auth-username and auth-password");
|
||||
}
|
||||
@@ -61018,6 +61037,10 @@ var inferOptions = (inputs) => {
|
||||
const cache2 = inputs.cacheKey ? { cacheKeyPrefix: inputs.cacheKey, cacheWrite: inputs.cacheWrite ?? true } : inputs.cache ? { cacheKeyPrefix: "pixi-", cacheWrite: true } : void 0;
|
||||
const pixiBinPath = inputs.pixiBinPath ? import_path.default.resolve(untildify(inputs.pixiBinPath)) : PATHS.pixiBin;
|
||||
const pixiRunShell = import_path.default.join(import_path.default.dirname(pixiBinPath), "pixi-shell");
|
||||
const frozen = inputs.frozen ?? false;
|
||||
const lockFileAvailable = (0, import_fs.existsSync)(pixiLockFile);
|
||||
core.debug(`lockFileAvailable: ${lockFileAvailable}`);
|
||||
const locked = inputs.locked ?? (lockFileAvailable && !frozen);
|
||||
const auth = !inputs.authHost ? void 0 : inputs.authToken ? {
|
||||
host: inputs.authHost,
|
||||
token: inputs.authToken
|
||||
@@ -61036,6 +61059,8 @@ var inferOptions = (inputs) => {
|
||||
manifestPath,
|
||||
pixiLockFile,
|
||||
runInstall,
|
||||
frozen,
|
||||
locked,
|
||||
cache: cache2,
|
||||
pixiBinPath,
|
||||
pixiRunShell,
|
||||
@@ -61043,15 +61068,25 @@ var inferOptions = (inputs) => {
|
||||
postCleanup
|
||||
};
|
||||
};
|
||||
var assertOptions = (_options) => {
|
||||
var assertOptions = (_options2) => {
|
||||
};
|
||||
var getOptions = () => {
|
||||
const inputs = {
|
||||
pixiVersion: parseOrUndefined("pixi-version", unionType([literalType("latest"), stringType().regex(/^v\d+\.\d+\.\d+$/)])),
|
||||
pixiVersion: parseOrUndefined(
|
||||
"pixi-version",
|
||||
unionType([literalType("latest"), stringType().regex(/^v\d+\.\d+\.\d+$/)]),
|
||||
"pixi-version must either be `latest` or a version string matching `vX.Y.Z`."
|
||||
),
|
||||
pixiUrl: parseOrUndefined("pixi-url", stringType().url()),
|
||||
logLevel: parseOrUndefined("log-level", logLevelSchema),
|
||||
logLevel: parseOrUndefined(
|
||||
"log-level",
|
||||
logLevelSchema,
|
||||
"log-level must be one of `q`, `default`, `v`, `vv`, `vvv`."
|
||||
),
|
||||
manifestPath: parseOrUndefined("manifest-path", stringType()),
|
||||
runInstall: parseOrUndefinedJSON("run-install", booleanType()),
|
||||
locked: parseOrUndefinedJSON("locked", booleanType()),
|
||||
frozen: parseOrUndefinedJSON("frozen", booleanType()),
|
||||
cache: parseOrUndefinedJSON("cache", booleanType()),
|
||||
cacheKey: parseOrUndefined("cache-key", stringType()),
|
||||
cacheWrite: parseOrUndefinedJSON("cache-write", booleanType()),
|
||||
@@ -61070,7 +61105,23 @@ var getOptions = () => {
|
||||
assertOptions(options2);
|
||||
return options2;
|
||||
};
|
||||
var options = getOptions();
|
||||
var _options;
|
||||
try {
|
||||
_options = getOptions();
|
||||
} catch (error2) {
|
||||
if (core.isDebug()) {
|
||||
throw error2;
|
||||
}
|
||||
if (error2 instanceof Error) {
|
||||
core.setFailed(error2.message);
|
||||
(0, import_process.exit)(1);
|
||||
} else if (typeof error2 === "string") {
|
||||
core.setFailed(error2);
|
||||
(0, import_process.exit)(1);
|
||||
}
|
||||
throw error2;
|
||||
}
|
||||
var options = _options;
|
||||
|
||||
// src/util.ts
|
||||
var import_crypto4 = require("crypto");
|
||||
@@ -61251,7 +61302,9 @@ var pixiInstall = async () => {
|
||||
core4.debug("Skipping pixi install.");
|
||||
return Promise.resolve();
|
||||
}
|
||||
return tryRestoreCache().then((_cacheKey) => execute(pixiCmd("install"))).then(saveCache2);
|
||||
return tryRestoreCache().then(
|
||||
(_cacheKey) => execute(pixiCmd(`install${options.frozen ? " --frozen" : ""}${options.locked ? " --locked" : ""}`))
|
||||
).then(saveCache2);
|
||||
};
|
||||
var generateInfo = () => core4.group("pixi info", () => execute(pixiCmd("info")));
|
||||
var run = async () => {
|
||||
@@ -61263,7 +61316,19 @@ var run = async () => {
|
||||
await pixiInstall();
|
||||
await generateInfo();
|
||||
};
|
||||
run().catch((error2) => core4.setFailed(error2.message));
|
||||
run().catch((error2) => {
|
||||
if (core4.isDebug()) {
|
||||
throw error2;
|
||||
}
|
||||
if (error2 instanceof Error) {
|
||||
core4.setFailed(error2.message);
|
||||
(0, import_process2.exit)(1);
|
||||
} else if (typeof error2 === "string") {
|
||||
core4.setFailed(error2);
|
||||
(0, import_process2.exit)(1);
|
||||
}
|
||||
throw error2;
|
||||
});
|
||||
/*! Bundled license information:
|
||||
|
||||
mime-db/index.js:
|
||||
|
||||
+89
-26
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/utils.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/utils.js
|
||||
var require_utils = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/utils.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/utils.js"(exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.toCommandProperties = exports.toCommandValue = void 0;
|
||||
@@ -65,9 +65,9 @@ var require_utils = __commonJS({
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/command.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/command.js
|
||||
var require_command = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/command.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/command.js"(exports) {
|
||||
"use strict";
|
||||
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
||||
if (k2 === void 0)
|
||||
@@ -500,9 +500,9 @@ var init_esm_node = __esm({
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/file-command.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/file-command.js
|
||||
var require_file_command = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/file-command.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/file-command.js"(exports) {
|
||||
"use strict";
|
||||
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
||||
if (k2 === void 0)
|
||||
@@ -1570,9 +1570,9 @@ var require_auth = __commonJS({
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/oidc-utils.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/oidc-utils.js
|
||||
var require_oidc_utils = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/oidc-utils.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/oidc-utils.js"(exports) {
|
||||
"use strict";
|
||||
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
||||
function adopt(value) {
|
||||
@@ -1637,7 +1637,7 @@ var require_oidc_utils = __commonJS({
|
||||
|
||||
Error Code : ${error.statusCode}
|
||||
|
||||
Error Message: ${error.result.message}`);
|
||||
Error Message: ${error.message}`);
|
||||
});
|
||||
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
|
||||
if (!id_token) {
|
||||
@@ -1668,9 +1668,9 @@ var require_oidc_utils = __commonJS({
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/summary.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/summary.js
|
||||
var require_summary = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/summary.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/summary.js"(exports) {
|
||||
"use strict";
|
||||
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
||||
function adopt(value) {
|
||||
@@ -1962,9 +1962,9 @@ var require_summary = __commonJS({
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/path-utils.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/path-utils.js
|
||||
var require_path_utils = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/path-utils.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/path-utils.js"(exports) {
|
||||
"use strict";
|
||||
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
||||
if (k2 === void 0)
|
||||
@@ -2012,9 +2012,9 @@ var require_path_utils = __commonJS({
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/core.js
|
||||
// node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/core.js
|
||||
var require_core = __commonJS({
|
||||
"node_modules/.pnpm/@actions+core@1.10.0/node_modules/@actions/core/lib/core.js"(exports) {
|
||||
"node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/core.js"(exports) {
|
||||
"use strict";
|
||||
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
||||
if (k2 === void 0)
|
||||
@@ -2152,15 +2152,15 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
|
||||
command_1.issue("echo", enabled ? "on" : "off");
|
||||
}
|
||||
exports.setCommandEcho = setCommandEcho;
|
||||
function setFailed(message) {
|
||||
function setFailed3(message) {
|
||||
process.exitCode = ExitCode.Failure;
|
||||
error(message);
|
||||
}
|
||||
exports.setFailed = setFailed;
|
||||
function isDebug2() {
|
||||
exports.setFailed = setFailed3;
|
||||
function isDebug3() {
|
||||
return process.env["RUNNER_DEBUG"] === "1";
|
||||
}
|
||||
exports.isDebug = isDebug2;
|
||||
exports.isDebug = isDebug3;
|
||||
function debug3(message) {
|
||||
command_1.issueCommand("debug", {}, message);
|
||||
}
|
||||
@@ -2245,11 +2245,14 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
|
||||
var import_promises = __toESM(require("fs/promises"));
|
||||
var import_path2 = __toESM(require("path"));
|
||||
var os3 = __toESM(require("os"));
|
||||
var import_process2 = require("process");
|
||||
var core2 = __toESM(require_core());
|
||||
|
||||
// src/options.ts
|
||||
var import_path = __toESM(require("path"));
|
||||
var import_os = __toESM(require("os"));
|
||||
var import_process = require("process");
|
||||
var import_fs = require("fs");
|
||||
var core = __toESM(require_core());
|
||||
|
||||
// node_modules/.pnpm/zod@3.22.2/node_modules/zod/lib/index.mjs
|
||||
@@ -5832,12 +5835,19 @@ var logLevelSchema = enumType(["q", "default", "v", "vv", "vvv"]);
|
||||
var PATHS = {
|
||||
pixiBin: import_path.default.join(import_os.default.homedir(), ".pixi", "bin", `pixi${import_os.default.platform() === "win32" ? ".exe" : ""}`)
|
||||
};
|
||||
var parseOrUndefined = (key, schema) => {
|
||||
var parseOrUndefined = (key, schema, errorMessage) => {
|
||||
const input = core.getInput(key);
|
||||
if (input === "") {
|
||||
return void 0;
|
||||
}
|
||||
return schema.parse(input);
|
||||
const maybeResult = schema.safeParse(input);
|
||||
if (!maybeResult.success) {
|
||||
if (!errorMessage) {
|
||||
throw new Error(`${key} is not valid: ${maybeResult.error.message}`);
|
||||
}
|
||||
throw new Error(errorMessage);
|
||||
}
|
||||
return maybeResult.data;
|
||||
};
|
||||
var parseOrUndefinedJSON = (key, schema) => {
|
||||
const input = core.getInput(key);
|
||||
@@ -5856,6 +5866,15 @@ var validateInputs = (inputs) => {
|
||||
if (inputs.runInstall === false && inputs.cache === true) {
|
||||
throw new Error("Cannot cache without running install");
|
||||
}
|
||||
if (inputs.runInstall === false && inputs.frozen === true) {
|
||||
throw new Error("Cannot use `frozen: true` when not running install");
|
||||
}
|
||||
if (inputs.runInstall === false && inputs.locked === true) {
|
||||
throw new Error("Cannot use `locked: true` when not running install");
|
||||
}
|
||||
if (inputs.locked === true && inputs.frozen === true) {
|
||||
throw new Error("Cannot use `locked: true` and `frozen: true` at the same time");
|
||||
}
|
||||
if (inputs.authUsername && !inputs.authPassword || !inputs.authUsername && inputs.authPassword) {
|
||||
throw new Error("You need to specify both auth-username and auth-password");
|
||||
}
|
||||
@@ -5885,6 +5904,10 @@ var inferOptions = (inputs) => {
|
||||
const cache = inputs.cacheKey ? { cacheKeyPrefix: inputs.cacheKey, cacheWrite: inputs.cacheWrite ?? true } : inputs.cache ? { cacheKeyPrefix: "pixi-", cacheWrite: true } : void 0;
|
||||
const pixiBinPath = inputs.pixiBinPath ? import_path.default.resolve(untildify(inputs.pixiBinPath)) : PATHS.pixiBin;
|
||||
const pixiRunShell = import_path.default.join(import_path.default.dirname(pixiBinPath), "pixi-shell");
|
||||
const frozen = inputs.frozen ?? false;
|
||||
const lockFileAvailable = (0, import_fs.existsSync)(pixiLockFile);
|
||||
core.debug(`lockFileAvailable: ${lockFileAvailable}`);
|
||||
const locked = inputs.locked ?? (lockFileAvailable && !frozen);
|
||||
const auth = !inputs.authHost ? void 0 : inputs.authToken ? {
|
||||
host: inputs.authHost,
|
||||
token: inputs.authToken
|
||||
@@ -5903,6 +5926,8 @@ var inferOptions = (inputs) => {
|
||||
manifestPath,
|
||||
pixiLockFile,
|
||||
runInstall,
|
||||
frozen,
|
||||
locked,
|
||||
cache,
|
||||
pixiBinPath,
|
||||
pixiRunShell,
|
||||
@@ -5910,15 +5935,25 @@ var inferOptions = (inputs) => {
|
||||
postCleanup
|
||||
};
|
||||
};
|
||||
var assertOptions = (_options) => {
|
||||
var assertOptions = (_options2) => {
|
||||
};
|
||||
var getOptions = () => {
|
||||
const inputs = {
|
||||
pixiVersion: parseOrUndefined("pixi-version", unionType([literalType("latest"), stringType().regex(/^v\d+\.\d+\.\d+$/)])),
|
||||
pixiVersion: parseOrUndefined(
|
||||
"pixi-version",
|
||||
unionType([literalType("latest"), stringType().regex(/^v\d+\.\d+\.\d+$/)]),
|
||||
"pixi-version must either be `latest` or a version string matching `vX.Y.Z`."
|
||||
),
|
||||
pixiUrl: parseOrUndefined("pixi-url", stringType().url()),
|
||||
logLevel: parseOrUndefined("log-level", logLevelSchema),
|
||||
logLevel: parseOrUndefined(
|
||||
"log-level",
|
||||
logLevelSchema,
|
||||
"log-level must be one of `q`, `default`, `v`, `vv`, `vvv`."
|
||||
),
|
||||
manifestPath: parseOrUndefined("manifest-path", stringType()),
|
||||
runInstall: parseOrUndefinedJSON("run-install", booleanType()),
|
||||
locked: parseOrUndefinedJSON("locked", booleanType()),
|
||||
frozen: parseOrUndefinedJSON("frozen", booleanType()),
|
||||
cache: parseOrUndefinedJSON("cache", booleanType()),
|
||||
cacheKey: parseOrUndefined("cache-key", stringType()),
|
||||
cacheWrite: parseOrUndefinedJSON("cache-write", booleanType()),
|
||||
@@ -5937,7 +5972,23 @@ var getOptions = () => {
|
||||
assertOptions(options2);
|
||||
return options2;
|
||||
};
|
||||
var options = getOptions();
|
||||
var _options;
|
||||
try {
|
||||
_options = getOptions();
|
||||
} catch (error) {
|
||||
if (core.isDebug()) {
|
||||
throw error;
|
||||
}
|
||||
if (error instanceof Error) {
|
||||
core.setFailed(error.message);
|
||||
(0, import_process.exit)(1);
|
||||
} else if (typeof error === "string") {
|
||||
core.setFailed(error);
|
||||
(0, import_process.exit)(1);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
var options = _options;
|
||||
|
||||
// src/post.ts
|
||||
var removeEmptyParentDirs = (dirPath) => {
|
||||
@@ -5996,5 +6047,17 @@ var run = () => {
|
||||
core2.debug("Skipping post-cleanup.");
|
||||
return Promise.resolve();
|
||||
};
|
||||
run();
|
||||
run().catch((error) => {
|
||||
if (core2.isDebug()) {
|
||||
throw error;
|
||||
}
|
||||
if (error instanceof Error) {
|
||||
core2.setFailed(error.message);
|
||||
(0, import_process2.exit)(1);
|
||||
} else if (typeof error === "string") {
|
||||
core2.setFailed(error);
|
||||
(0, import_process2.exit)(1);
|
||||
}
|
||||
throw error;
|
||||
});
|
||||
//# sourceMappingURL=post.js.map
|
||||
+9
-8
@@ -1,12 +1,13 @@
|
||||
{
|
||||
"name": "setup-pixi",
|
||||
"version": "0.2.0",
|
||||
"version": "0.3.0",
|
||||
"private": true,
|
||||
"description": "Action to set up the pixi package manager.",
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
"dev": "tsup --watch",
|
||||
"lint": "eslint ./src --ext ts"
|
||||
"lint": "eslint ./src --ext ts",
|
||||
"lint:fix": "eslint ./src --ext ts --fix"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -21,7 +22,7 @@
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^3.2.2",
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/core": "^1.10.1",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/io": "^1.1.3",
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
@@ -29,14 +30,14 @@
|
||||
"zod": "^3.22.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.5.9",
|
||||
"@typescript-eslint/eslint-plugin": "^6.5.0",
|
||||
"@typescript-eslint/parser": "^6.5.0",
|
||||
"eslint": "^8.48.0",
|
||||
"@types/node": "^20.8.2",
|
||||
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
||||
"@typescript-eslint/parser": "^6.7.3",
|
||||
"eslint": "^8.50.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-config-standard": "^17.1.0",
|
||||
"eslint-plugin-import": "^2.28.1",
|
||||
"eslint-plugin-n": "^16.0.2",
|
||||
"eslint-plugin-n": "^16.1.0",
|
||||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"prettier": "^3.0.3",
|
||||
|
||||
Generated
+140
-124
@@ -9,8 +9,8 @@ dependencies:
|
||||
specifier: ^3.2.2
|
||||
version: 3.2.2
|
||||
'@actions/core':
|
||||
specifier: ^1.10.0
|
||||
version: 1.10.0
|
||||
specifier: ^1.10.1
|
||||
version: 1.10.1
|
||||
'@actions/exec':
|
||||
specifier: ^1.1.1
|
||||
version: 1.1.1
|
||||
@@ -29,35 +29,35 @@ dependencies:
|
||||
|
||||
devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^20.5.9
|
||||
version: 20.5.9
|
||||
specifier: ^20.8.2
|
||||
version: 20.8.2
|
||||
'@typescript-eslint/eslint-plugin':
|
||||
specifier: ^6.5.0
|
||||
version: 6.5.0(@typescript-eslint/parser@6.5.0)(eslint@8.48.0)(typescript@5.2.2)
|
||||
specifier: ^6.7.3
|
||||
version: 6.7.3(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/parser':
|
||||
specifier: ^6.5.0
|
||||
version: 6.5.0(eslint@8.48.0)(typescript@5.2.2)
|
||||
specifier: ^6.7.3
|
||||
version: 6.7.3(eslint@8.50.0)(typescript@5.2.2)
|
||||
eslint:
|
||||
specifier: ^8.48.0
|
||||
version: 8.48.0
|
||||
specifier: ^8.50.0
|
||||
version: 8.50.0
|
||||
eslint-config-prettier:
|
||||
specifier: ^9.0.0
|
||||
version: 9.0.0(eslint@8.48.0)
|
||||
version: 9.0.0(eslint@8.50.0)
|
||||
eslint-config-standard:
|
||||
specifier: ^17.1.0
|
||||
version: 17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.0.2)(eslint-plugin-promise@6.1.1)(eslint@8.48.0)
|
||||
version: 17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.1.0)(eslint-plugin-promise@6.1.1)(eslint@8.50.0)
|
||||
eslint-plugin-import:
|
||||
specifier: ^2.28.1
|
||||
version: 2.28.1(@typescript-eslint/parser@6.5.0)(eslint@8.48.0)
|
||||
version: 2.28.1(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)
|
||||
eslint-plugin-n:
|
||||
specifier: ^16.0.2
|
||||
version: 16.0.2(eslint@8.48.0)
|
||||
specifier: ^16.1.0
|
||||
version: 16.1.0(eslint@8.50.0)
|
||||
eslint-plugin-prettier:
|
||||
specifier: ^5.0.0
|
||||
version: 5.0.0(eslint-config-prettier@9.0.0)(eslint@8.48.0)(prettier@3.0.3)
|
||||
version: 5.0.0(eslint-config-prettier@9.0.0)(eslint@8.50.0)(prettier@3.0.3)
|
||||
eslint-plugin-promise:
|
||||
specifier: ^6.1.1
|
||||
version: 6.1.1(eslint@8.48.0)
|
||||
version: 6.1.1(eslint@8.50.0)
|
||||
prettier:
|
||||
specifier: ^3.0.3
|
||||
version: 3.0.3
|
||||
@@ -78,7 +78,7 @@ packages:
|
||||
/@actions/cache@3.2.2:
|
||||
resolution: {integrity: sha512-6D0Jq5JrLZRQ3VApeQwQkkV20ZZXjXsHNYXd9VjNUdi9E0h93wESpxfMJ2JWLCUCgHNLcfY0v3GjNM+2FdRMlg==}
|
||||
dependencies:
|
||||
'@actions/core': 1.10.0
|
||||
'@actions/core': 1.10.1
|
||||
'@actions/exec': 1.1.1
|
||||
'@actions/glob': 0.1.2
|
||||
'@actions/http-client': 2.1.1
|
||||
@@ -92,8 +92,8 @@ packages:
|
||||
- encoding
|
||||
dev: false
|
||||
|
||||
/@actions/core@1.10.0:
|
||||
resolution: {integrity: sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==}
|
||||
/@actions/core@1.10.1:
|
||||
resolution: {integrity: sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==}
|
||||
dependencies:
|
||||
'@actions/http-client': 2.1.1
|
||||
uuid: 8.3.2
|
||||
@@ -108,7 +108,7 @@ packages:
|
||||
/@actions/glob@0.1.2:
|
||||
resolution: {integrity: sha512-SclLR7Ia5sEqjkJTPs7Sd86maMDw43p769YxBOxvPvEWuPEhpAnBsQfENOpXjFYMmhCqd127bmf+YdvJqVqR4A==}
|
||||
dependencies:
|
||||
'@actions/core': 1.10.0
|
||||
'@actions/core': 1.10.1
|
||||
minimatch: 3.1.2
|
||||
dev: false
|
||||
|
||||
@@ -125,7 +125,7 @@ packages:
|
||||
/@actions/tool-cache@2.0.1:
|
||||
resolution: {integrity: sha512-iPU+mNwrbA8jodY8eyo/0S/QqCKDajiR8OxWTnSk/SnYg0sj8Hp4QcUEVC1YFpHWXtrfbQrE13Jz4k4HXJQKcA==}
|
||||
dependencies:
|
||||
'@actions/core': 1.10.0
|
||||
'@actions/core': 1.10.1
|
||||
'@actions/exec': 1.1.1
|
||||
'@actions/http-client': 2.1.1
|
||||
'@actions/io': 1.1.3
|
||||
@@ -440,18 +440,23 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@eslint-community/eslint-utils@4.4.0(eslint@8.48.0):
|
||||
/@eslint-community/eslint-utils@4.4.0(eslint@8.50.0):
|
||||
resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
|
||||
dependencies:
|
||||
eslint: 8.48.0
|
||||
eslint: 8.50.0
|
||||
eslint-visitor-keys: 3.4.3
|
||||
dev: true
|
||||
|
||||
/@eslint-community/regexpp@4.8.0:
|
||||
resolution: {integrity: sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==}
|
||||
/@eslint-community/regexpp@4.8.1:
|
||||
resolution: {integrity: sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==}
|
||||
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/@eslint-community/regexpp@4.9.0:
|
||||
resolution: {integrity: sha512-zJmuCWj2VLBt4c25CfBIbMZLGLyhkvs7LznyVX5HfpzeocThgIj5XQK4L+g3U36mMcx8bPMhGyPpwCATamC4jQ==}
|
||||
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
@@ -462,7 +467,7 @@ packages:
|
||||
ajv: 6.12.6
|
||||
debug: 4.3.4
|
||||
espree: 9.6.1
|
||||
globals: 13.21.0
|
||||
globals: 13.22.0
|
||||
ignore: 5.2.4
|
||||
import-fresh: 3.3.0
|
||||
js-yaml: 4.1.0
|
||||
@@ -472,8 +477,8 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@eslint/js@8.48.0:
|
||||
resolution: {integrity: sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==}
|
||||
/@eslint/js@8.50.0:
|
||||
resolution: {integrity: sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
@@ -565,8 +570,8 @@ packages:
|
||||
tslib: 2.6.2
|
||||
dev: true
|
||||
|
||||
/@types/json-schema@7.0.12:
|
||||
resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==}
|
||||
/@types/json-schema@7.0.13:
|
||||
resolution: {integrity: sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==}
|
||||
dev: true
|
||||
|
||||
/@types/json5@0.0.29:
|
||||
@@ -576,25 +581,25 @@ packages:
|
||||
/@types/node-fetch@2.6.4:
|
||||
resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==}
|
||||
dependencies:
|
||||
'@types/node': 20.5.9
|
||||
'@types/node': 20.8.2
|
||||
form-data: 3.0.1
|
||||
dev: false
|
||||
|
||||
/@types/node@20.5.9:
|
||||
resolution: {integrity: sha512-PcGNd//40kHAS3sTlzKB9C9XL4K0sTup8nbG5lC14kzEteTNuAFh9u5nA0o5TWnSG2r/JNPRXFVcHJIIeRlmqQ==}
|
||||
/@types/node@20.8.2:
|
||||
resolution: {integrity: sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==}
|
||||
|
||||
/@types/semver@7.5.1:
|
||||
resolution: {integrity: sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==}
|
||||
/@types/semver@7.5.3:
|
||||
resolution: {integrity: sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==}
|
||||
dev: true
|
||||
|
||||
/@types/tunnel@0.0.3:
|
||||
resolution: {integrity: sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==}
|
||||
dependencies:
|
||||
'@types/node': 20.5.9
|
||||
'@types/node': 20.8.2
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/eslint-plugin@6.5.0(@typescript-eslint/parser@6.5.0)(eslint@8.48.0)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-2pktILyjvMaScU6iK3925uvGU87E+N9rh372uGZgiMYwafaw9SXq86U04XPq3UH6tzRvNgBsub6x2DacHc33lw==}
|
||||
/@typescript-eslint/eslint-plugin@6.7.3(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-vntq452UHNltxsaaN+L9WyuMch8bMd9CqJ3zhzTPXXidwbf5mqqKCVXEuvRZUqLJSTLeWE65lQwyXsRGnXkCTA==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
|
||||
@@ -604,26 +609,26 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.8.0
|
||||
'@typescript-eslint/parser': 6.5.0(eslint@8.48.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/scope-manager': 6.5.0
|
||||
'@typescript-eslint/type-utils': 6.5.0(eslint@8.48.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/utils': 6.5.0(eslint@8.48.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/visitor-keys': 6.5.0
|
||||
'@eslint-community/regexpp': 4.9.0
|
||||
'@typescript-eslint/parser': 6.7.3(eslint@8.50.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/scope-manager': 6.7.3
|
||||
'@typescript-eslint/type-utils': 6.7.3(eslint@8.50.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/utils': 6.7.3(eslint@8.50.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/visitor-keys': 6.7.3
|
||||
debug: 4.3.4
|
||||
eslint: 8.48.0
|
||||
eslint: 8.50.0
|
||||
graphemer: 1.4.0
|
||||
ignore: 5.2.4
|
||||
natural-compare: 1.4.0
|
||||
semver: 7.5.4
|
||||
ts-api-utils: 1.0.2(typescript@5.2.2)
|
||||
ts-api-utils: 1.0.3(typescript@5.2.2)
|
||||
typescript: 5.2.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/parser@6.5.0(eslint@8.48.0)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-LMAVtR5GN8nY0G0BadkG0XIe4AcNMeyEy3DyhKGAh9k4pLSMBO7rF29JvDBpZGCmp5Pgz5RLHP6eCpSYZJQDuQ==}
|
||||
/@typescript-eslint/parser@6.7.3(eslint@8.50.0)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-TlutE+iep2o7R8Lf+yoer3zU6/0EAUc8QIBB3GYBc1KGz4c4TRm83xwXUZVPlZ6YCLss4r77jbu6j3sendJoiQ==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^7.0.0 || ^8.0.0
|
||||
@@ -632,27 +637,27 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 6.5.0
|
||||
'@typescript-eslint/types': 6.5.0
|
||||
'@typescript-eslint/typescript-estree': 6.5.0(typescript@5.2.2)
|
||||
'@typescript-eslint/visitor-keys': 6.5.0
|
||||
'@typescript-eslint/scope-manager': 6.7.3
|
||||
'@typescript-eslint/types': 6.7.3
|
||||
'@typescript-eslint/typescript-estree': 6.7.3(typescript@5.2.2)
|
||||
'@typescript-eslint/visitor-keys': 6.7.3
|
||||
debug: 4.3.4
|
||||
eslint: 8.48.0
|
||||
eslint: 8.50.0
|
||||
typescript: 5.2.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/scope-manager@6.5.0:
|
||||
resolution: {integrity: sha512-A8hZ7OlxURricpycp5kdPTH3XnjG85UpJS6Fn4VzeoH4T388gQJ/PGP4ole5NfKt4WDVhmLaQ/dBLNDC4Xl/Kw==}
|
||||
/@typescript-eslint/scope-manager@6.7.3:
|
||||
resolution: {integrity: sha512-wOlo0QnEou9cHO2TdkJmzF7DFGvAKEnB82PuPNHpT8ZKKaZu6Bm63ugOTn9fXNJtvuDPanBc78lGUGGytJoVzQ==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 6.5.0
|
||||
'@typescript-eslint/visitor-keys': 6.5.0
|
||||
'@typescript-eslint/types': 6.7.3
|
||||
'@typescript-eslint/visitor-keys': 6.7.3
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/type-utils@6.5.0(eslint@8.48.0)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-f7OcZOkRivtujIBQ4yrJNIuwyCQO1OjocVqntl9dgSIZAdKqicj3xFDqDOzHDlGCZX990LqhLQXWRnQvsapq8A==}
|
||||
/@typescript-eslint/type-utils@6.7.3(eslint@8.50.0)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-Fc68K0aTDrKIBvLnKTZ5Pf3MXK495YErrbHb1R6aTpfK5OdSFj0rVN7ib6Tx6ePrZ2gsjLqr0s98NG7l96KSQw==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^7.0.0 || ^8.0.0
|
||||
@@ -661,23 +666,23 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/typescript-estree': 6.5.0(typescript@5.2.2)
|
||||
'@typescript-eslint/utils': 6.5.0(eslint@8.48.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/typescript-estree': 6.7.3(typescript@5.2.2)
|
||||
'@typescript-eslint/utils': 6.7.3(eslint@8.50.0)(typescript@5.2.2)
|
||||
debug: 4.3.4
|
||||
eslint: 8.48.0
|
||||
ts-api-utils: 1.0.2(typescript@5.2.2)
|
||||
eslint: 8.50.0
|
||||
ts-api-utils: 1.0.3(typescript@5.2.2)
|
||||
typescript: 5.2.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/types@6.5.0:
|
||||
resolution: {integrity: sha512-eqLLOEF5/lU8jW3Bw+8auf4lZSbbljHR2saKnYqON12G/WsJrGeeDHWuQePoEf9ro22+JkbPfWQwKEC5WwLQ3w==}
|
||||
/@typescript-eslint/types@6.7.3:
|
||||
resolution: {integrity: sha512-4g+de6roB2NFcfkZb439tigpAMnvEIg3rIjWQ+EM7IBaYt/CdJt6em9BJ4h4UpdgaBWdmx2iWsafHTrqmgIPNw==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/typescript-estree@6.5.0(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-q0rGwSe9e5Kk/XzliB9h2LBc9tmXX25G0833r7kffbl5437FPWb2tbpIV9wAATebC/018pGa9fwPDuvGN+LxWQ==}
|
||||
/@typescript-eslint/typescript-estree@6.7.3(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-YLQ3tJoS4VxLFYHTw21oe1/vIZPRqAO91z6Uv0Ss2BKm/Ag7/RVQBcXTGcXhgJMdA4U+HrKuY5gWlJlvoaKZ5g==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
@@ -685,42 +690,42 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 6.5.0
|
||||
'@typescript-eslint/visitor-keys': 6.5.0
|
||||
'@typescript-eslint/types': 6.7.3
|
||||
'@typescript-eslint/visitor-keys': 6.7.3
|
||||
debug: 4.3.4
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
semver: 7.5.4
|
||||
ts-api-utils: 1.0.2(typescript@5.2.2)
|
||||
ts-api-utils: 1.0.3(typescript@5.2.2)
|
||||
typescript: 5.2.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/utils@6.5.0(eslint@8.48.0)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-9nqtjkNykFzeVtt9Pj6lyR9WEdd8npPhhIPM992FWVkZuS6tmxHfGVnlUcjpUP2hv8r4w35nT33mlxd+Be1ACQ==}
|
||||
/@typescript-eslint/utils@6.7.3(eslint@8.50.0)(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-vzLkVder21GpWRrmSR9JxGZ5+ibIUSudXlW52qeKpzUEQhRSmyZiVDDj3crAth7+5tmN1ulvgKaCU2f/bPRCzg==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^7.0.0 || ^8.0.0
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0)
|
||||
'@types/json-schema': 7.0.12
|
||||
'@types/semver': 7.5.1
|
||||
'@typescript-eslint/scope-manager': 6.5.0
|
||||
'@typescript-eslint/types': 6.5.0
|
||||
'@typescript-eslint/typescript-estree': 6.5.0(typescript@5.2.2)
|
||||
eslint: 8.48.0
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.50.0)
|
||||
'@types/json-schema': 7.0.13
|
||||
'@types/semver': 7.5.3
|
||||
'@typescript-eslint/scope-manager': 6.7.3
|
||||
'@typescript-eslint/types': 6.7.3
|
||||
'@typescript-eslint/typescript-estree': 6.7.3(typescript@5.2.2)
|
||||
eslint: 8.50.0
|
||||
semver: 7.5.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- typescript
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/visitor-keys@6.5.0:
|
||||
resolution: {integrity: sha512-yCB/2wkbv3hPsh02ZS8dFQnij9VVQXJMN/gbQsaaY+zxALkZnxa/wagvLEFsAWMPv7d7lxQmNsIzGU1w/T/WyA==}
|
||||
/@typescript-eslint/visitor-keys@6.7.3:
|
||||
resolution: {integrity: sha512-HEVXkU9IB+nk9o63CeICMHxFWbHWr3E1mpilIQBe9+7L/lH97rleFLVtYsfnWB+JVMaiFnEaxvknvmIzX+CqVg==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 6.5.0
|
||||
'@typescript-eslint/types': 6.7.3
|
||||
eslint-visitor-keys: 3.4.3
|
||||
dev: true
|
||||
|
||||
@@ -1176,16 +1181,16 @@ packages:
|
||||
engines: {node: '>=10'}
|
||||
dev: true
|
||||
|
||||
/eslint-config-prettier@9.0.0(eslint@8.48.0):
|
||||
/eslint-config-prettier@9.0.0(eslint@8.50.0):
|
||||
resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
eslint: '>=7.0.0'
|
||||
dependencies:
|
||||
eslint: 8.48.0
|
||||
eslint: 8.50.0
|
||||
dev: true
|
||||
|
||||
/eslint-config-standard@17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.0.2)(eslint-plugin-promise@6.1.1)(eslint@8.48.0):
|
||||
/eslint-config-standard@17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.1.0)(eslint-plugin-promise@6.1.1)(eslint@8.50.0):
|
||||
resolution: {integrity: sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
@@ -1194,10 +1199,10 @@ packages:
|
||||
eslint-plugin-n: '^15.0.0 || ^16.0.0 '
|
||||
eslint-plugin-promise: ^6.0.0
|
||||
dependencies:
|
||||
eslint: 8.48.0
|
||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.5.0)(eslint@8.48.0)
|
||||
eslint-plugin-n: 16.0.2(eslint@8.48.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.48.0)
|
||||
eslint: 8.50.0
|
||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)
|
||||
eslint-plugin-n: 16.1.0(eslint@8.50.0)
|
||||
eslint-plugin-promise: 6.1.1(eslint@8.50.0)
|
||||
dev: true
|
||||
|
||||
/eslint-import-resolver-node@0.3.9:
|
||||
@@ -1210,7 +1215,7 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-module-utils@2.8.0(@typescript-eslint/parser@6.5.0)(eslint-import-resolver-node@0.3.9)(eslint@8.48.0):
|
||||
/eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.3)(eslint-import-resolver-node@0.3.9)(eslint@8.50.0):
|
||||
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
@@ -1231,26 +1236,26 @@ packages:
|
||||
eslint-import-resolver-webpack:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 6.5.0(eslint@8.48.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/parser': 6.7.3(eslint@8.50.0)(typescript@5.2.2)
|
||||
debug: 3.2.7
|
||||
eslint: 8.48.0
|
||||
eslint: 8.50.0
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-es-x@7.2.0(eslint@8.48.0):
|
||||
/eslint-plugin-es-x@7.2.0(eslint@8.50.0):
|
||||
resolution: {integrity: sha512-9dvv5CcvNjSJPqnS5uZkqb3xmbeqRLnvXKK7iI5+oK/yTusyc46zbBZKENGsOfojm/mKfszyZb+wNqNPAPeGXA==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
eslint: '>=8'
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0)
|
||||
'@eslint-community/regexpp': 4.8.0
|
||||
eslint: 8.48.0
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.50.0)
|
||||
'@eslint-community/regexpp': 4.9.0
|
||||
eslint: 8.50.0
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.5.0)(eslint@8.48.0):
|
||||
/eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.3)(eslint@8.50.0):
|
||||
resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
@@ -1260,16 +1265,16 @@ packages:
|
||||
'@typescript-eslint/parser':
|
||||
optional: true
|
||||
dependencies:
|
||||
'@typescript-eslint/parser': 6.5.0(eslint@8.48.0)(typescript@5.2.2)
|
||||
'@typescript-eslint/parser': 6.7.3(eslint@8.50.0)(typescript@5.2.2)
|
||||
array-includes: 3.1.6
|
||||
array.prototype.findlastindex: 1.2.3
|
||||
array.prototype.flat: 1.3.1
|
||||
array.prototype.flatmap: 1.3.1
|
||||
debug: 3.2.7
|
||||
doctrine: 2.1.0
|
||||
eslint: 8.48.0
|
||||
eslint: 8.50.0
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.5.0)(eslint-import-resolver-node@0.3.9)(eslint@8.48.0)
|
||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.3)(eslint-import-resolver-node@0.3.9)(eslint@8.50.0)
|
||||
has: 1.0.3
|
||||
is-core-module: 2.13.0
|
||||
is-glob: 4.0.3
|
||||
@@ -1285,16 +1290,17 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-n@16.0.2(eslint@8.48.0):
|
||||
resolution: {integrity: sha512-Y66uDfUNbBzypsr0kELWrIz+5skicECrLUqlWuXawNSLUq3ltGlCwu6phboYYOTSnoTdHgTLrc+5Ydo6KjzZog==}
|
||||
/eslint-plugin-n@16.1.0(eslint@8.50.0):
|
||||
resolution: {integrity: sha512-3wv/TooBst0N4ND+pnvffHuz9gNPmk/NkLwAxOt2JykTl/hcuECe6yhTtLJcZjIxtZwN+GX92ACp/QTLpHA3Hg==}
|
||||
engines: {node: '>=16.0.0'}
|
||||
peerDependencies:
|
||||
eslint: '>=7.0.0'
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0)
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.50.0)
|
||||
builtins: 5.0.1
|
||||
eslint: 8.48.0
|
||||
eslint-plugin-es-x: 7.2.0(eslint@8.48.0)
|
||||
eslint: 8.50.0
|
||||
eslint-plugin-es-x: 7.2.0(eslint@8.50.0)
|
||||
get-tsconfig: 4.7.0
|
||||
ignore: 5.2.4
|
||||
is-core-module: 2.13.0
|
||||
minimatch: 3.1.2
|
||||
@@ -1302,7 +1308,7 @@ packages:
|
||||
semver: 7.5.4
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-prettier@5.0.0(eslint-config-prettier@9.0.0)(eslint@8.48.0)(prettier@3.0.3):
|
||||
/eslint-plugin-prettier@5.0.0(eslint-config-prettier@9.0.0)(eslint@8.50.0)(prettier@3.0.3):
|
||||
resolution: {integrity: sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
@@ -1316,20 +1322,20 @@ packages:
|
||||
eslint-config-prettier:
|
||||
optional: true
|
||||
dependencies:
|
||||
eslint: 8.48.0
|
||||
eslint-config-prettier: 9.0.0(eslint@8.48.0)
|
||||
eslint: 8.50.0
|
||||
eslint-config-prettier: 9.0.0(eslint@8.50.0)
|
||||
prettier: 3.0.3
|
||||
prettier-linter-helpers: 1.0.0
|
||||
synckit: 0.8.5
|
||||
dev: true
|
||||
|
||||
/eslint-plugin-promise@6.1.1(eslint@8.48.0):
|
||||
/eslint-plugin-promise@6.1.1(eslint@8.50.0):
|
||||
resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^7.0.0 || ^8.0.0
|
||||
dependencies:
|
||||
eslint: 8.48.0
|
||||
eslint: 8.50.0
|
||||
dev: true
|
||||
|
||||
/eslint-scope@7.2.2:
|
||||
@@ -1345,15 +1351,15 @@ packages:
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
dev: true
|
||||
|
||||
/eslint@8.48.0:
|
||||
resolution: {integrity: sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==}
|
||||
/eslint@8.50.0:
|
||||
resolution: {integrity: sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0)
|
||||
'@eslint-community/regexpp': 4.8.0
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.50.0)
|
||||
'@eslint-community/regexpp': 4.8.1
|
||||
'@eslint/eslintrc': 2.1.2
|
||||
'@eslint/js': 8.48.0
|
||||
'@eslint/js': 8.50.0
|
||||
'@humanwhocodes/config-array': 0.11.11
|
||||
'@humanwhocodes/module-importer': 1.0.1
|
||||
'@nodelib/fs.walk': 1.2.8
|
||||
@@ -1372,7 +1378,7 @@ packages:
|
||||
file-entry-cache: 6.0.1
|
||||
find-up: 5.0.0
|
||||
glob-parent: 6.0.2
|
||||
globals: 13.21.0
|
||||
globals: 13.22.0
|
||||
graphemer: 1.4.0
|
||||
ignore: 5.2.4
|
||||
imurmurhash: 0.1.4
|
||||
@@ -1523,13 +1529,13 @@ packages:
|
||||
resolution: {integrity: sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dependencies:
|
||||
flatted: 3.2.7
|
||||
flatted: 3.2.9
|
||||
keyv: 4.5.3
|
||||
rimraf: 3.0.2
|
||||
dev: true
|
||||
|
||||
/flatted@3.2.7:
|
||||
resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==}
|
||||
/flatted@3.2.9:
|
||||
resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==}
|
||||
dev: true
|
||||
|
||||
/for-each@0.3.3:
|
||||
@@ -1617,6 +1623,12 @@ packages:
|
||||
get-intrinsic: 1.2.1
|
||||
dev: true
|
||||
|
||||
/get-tsconfig@4.7.0:
|
||||
resolution: {integrity: sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==}
|
||||
dependencies:
|
||||
resolve-pkg-maps: 1.0.0
|
||||
dev: true
|
||||
|
||||
/glob-parent@5.1.2:
|
||||
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
|
||||
engines: {node: '>= 6'}
|
||||
@@ -1653,8 +1665,8 @@ packages:
|
||||
path-is-absolute: 1.0.1
|
||||
dev: true
|
||||
|
||||
/globals@13.21.0:
|
||||
resolution: {integrity: sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==}
|
||||
/globals@13.22.0:
|
||||
resolution: {integrity: sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
type-fest: 0.20.2
|
||||
@@ -2354,6 +2366,10 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/resolve-pkg-maps@1.0.0:
|
||||
resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
|
||||
dev: true
|
||||
|
||||
/resolve@1.22.4:
|
||||
resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==}
|
||||
hasBin: true
|
||||
@@ -2596,8 +2612,8 @@ packages:
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/ts-api-utils@1.0.2(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-Cbu4nIqnEdd+THNEsBdkolnOXhg0I8XteoHaEKgvsxpsbWda4IsUut2c187HxywQCvveojow0Dgw/amxtSKVkQ==}
|
||||
/ts-api-utils@1.0.3(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==}
|
||||
engines: {node: '>=16.13.0'}
|
||||
peerDependencies:
|
||||
typescript: '>=4.2.0'
|
||||
|
||||
+17
-2
@@ -1,6 +1,7 @@
|
||||
import fs from 'fs/promises'
|
||||
import os from 'os'
|
||||
import path from 'path'
|
||||
import { exit } from 'process'
|
||||
import * as core from '@actions/core'
|
||||
import { downloadTool } from '@actions/tool-cache'
|
||||
import type { PixiSource } from './options'
|
||||
@@ -53,7 +54,9 @@ const pixiInstall = async () => {
|
||||
return Promise.resolve()
|
||||
}
|
||||
return tryRestoreCache()
|
||||
.then((_cacheKey) => execute(pixiCmd('install')))
|
||||
.then((_cacheKey) =>
|
||||
execute(pixiCmd(`install${options.frozen ? ' --frozen' : ''}${options.locked ? ' --locked' : ''}`))
|
||||
)
|
||||
.then(saveCache)
|
||||
}
|
||||
|
||||
@@ -69,4 +72,16 @@ const run = async () => {
|
||||
await generateInfo()
|
||||
}
|
||||
|
||||
run().catch((error) => core.setFailed(error.message))
|
||||
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
|
||||
})
|
||||
|
||||
+60
-5
@@ -1,5 +1,7 @@
|
||||
import path from 'path'
|
||||
import os from 'os'
|
||||
import { exit } from 'process'
|
||||
import { existsSync } from 'fs'
|
||||
import * as core from '@actions/core'
|
||||
import * as z from 'zod'
|
||||
import untildify from 'untildify'
|
||||
@@ -10,6 +12,8 @@ type Inputs = {
|
||||
logLevel?: LogLevel
|
||||
manifestPath?: string
|
||||
runInstall?: boolean
|
||||
frozen?: boolean
|
||||
locked?: boolean
|
||||
cache?: boolean
|
||||
cacheKey?: string
|
||||
cacheWrite?: boolean
|
||||
@@ -56,6 +60,8 @@ export type Options = Readonly<{
|
||||
manifestPath: string
|
||||
pixiLockFile: string
|
||||
runInstall: boolean
|
||||
frozen: boolean
|
||||
locked: boolean
|
||||
cache?: Cache
|
||||
pixiBinPath: string
|
||||
pixiRunShell: string
|
||||
@@ -70,13 +76,20 @@ export const PATHS = {
|
||||
pixiBin: path.join(os.homedir(), '.pixi', 'bin', `pixi${os.platform() === 'win32' ? '.exe' : ''}`)
|
||||
}
|
||||
|
||||
const parseOrUndefined = <T>(key: string, schema: z.ZodSchema<T>): T | undefined => {
|
||||
const parseOrUndefined = <T>(key: string, schema: z.ZodSchema<T>, errorMessage?: string): T | undefined => {
|
||||
const input = core.getInput(key)
|
||||
// GitHub actions sets empty inputs to the empty string, but we want undefined
|
||||
if (input === '') {
|
||||
return undefined
|
||||
}
|
||||
return schema.parse(input)
|
||||
const maybeResult = schema.safeParse(input)
|
||||
if (!maybeResult.success) {
|
||||
if (!errorMessage) {
|
||||
throw new Error(`${key} is not valid: ${maybeResult.error.message}`)
|
||||
}
|
||||
throw new Error(errorMessage)
|
||||
}
|
||||
return maybeResult.data
|
||||
}
|
||||
|
||||
const parseOrUndefinedJSON = <T>(key: string, schema: z.ZodSchema<T>): T | undefined => {
|
||||
@@ -98,6 +111,15 @@ const validateInputs = (inputs: Inputs): void => {
|
||||
if (inputs.runInstall === false && inputs.cache === true) {
|
||||
throw new Error('Cannot cache without running install')
|
||||
}
|
||||
if (inputs.runInstall === false && inputs.frozen === true) {
|
||||
throw new Error('Cannot use `frozen: true` when not running install')
|
||||
}
|
||||
if (inputs.runInstall === false && inputs.locked === true) {
|
||||
throw new Error('Cannot use `locked: true` when not running install')
|
||||
}
|
||||
if (inputs.locked === true && inputs.frozen === true) {
|
||||
throw new Error('Cannot use `locked: true` and `frozen: true` at the same time')
|
||||
}
|
||||
if ((inputs.authUsername && !inputs.authPassword) || (!inputs.authUsername && inputs.authPassword)) {
|
||||
throw new Error('You need to specify both auth-username and auth-password')
|
||||
}
|
||||
@@ -140,6 +162,10 @@ const inferOptions = (inputs: Inputs): Options => {
|
||||
: undefined
|
||||
const pixiBinPath = inputs.pixiBinPath ? path.resolve(untildify(inputs.pixiBinPath)) : PATHS.pixiBin
|
||||
const pixiRunShell = path.join(path.dirname(pixiBinPath), 'pixi-shell')
|
||||
const frozen = inputs.frozen ?? false
|
||||
const lockFileAvailable = existsSync(pixiLockFile)
|
||||
core.debug(`lockFileAvailable: ${lockFileAvailable}`)
|
||||
const locked = inputs.locked ?? (lockFileAvailable && !frozen)
|
||||
const auth = !inputs.authHost
|
||||
? undefined
|
||||
: ((inputs.authToken
|
||||
@@ -164,6 +190,8 @@ const inferOptions = (inputs: Inputs): Options => {
|
||||
manifestPath,
|
||||
pixiLockFile,
|
||||
runInstall,
|
||||
frozen,
|
||||
locked,
|
||||
cache,
|
||||
pixiBinPath,
|
||||
pixiRunShell,
|
||||
@@ -183,11 +211,21 @@ const assertOptions = (_options: Options) => {
|
||||
|
||||
const getOptions = () => {
|
||||
const inputs: Inputs = {
|
||||
pixiVersion: parseOrUndefined('pixi-version', z.union([z.literal('latest'), z.string().regex(/^v\d+\.\d+\.\d+$/)])),
|
||||
pixiVersion: parseOrUndefined(
|
||||
'pixi-version',
|
||||
z.union([z.literal('latest'), z.string().regex(/^v\d+\.\d+\.\d+$/)]),
|
||||
'pixi-version must either be `latest` or a version string matching `vX.Y.Z`.'
|
||||
),
|
||||
pixiUrl: parseOrUndefined('pixi-url', z.string().url()),
|
||||
logLevel: parseOrUndefined('log-level', logLevelSchema),
|
||||
logLevel: parseOrUndefined(
|
||||
'log-level',
|
||||
logLevelSchema,
|
||||
'log-level must be one of `q`, `default`, `v`, `vv`, `vvv`.'
|
||||
),
|
||||
manifestPath: parseOrUndefined('manifest-path', z.string()),
|
||||
runInstall: parseOrUndefinedJSON('run-install', z.boolean()),
|
||||
locked: parseOrUndefinedJSON('locked', z.boolean()),
|
||||
frozen: parseOrUndefinedJSON('frozen', z.boolean()),
|
||||
cache: parseOrUndefinedJSON('cache', z.boolean()),
|
||||
cacheKey: parseOrUndefined('cache-key', z.string()),
|
||||
cacheWrite: parseOrUndefinedJSON('cache-write', z.boolean()),
|
||||
@@ -207,4 +245,21 @@ const getOptions = () => {
|
||||
return options
|
||||
}
|
||||
|
||||
export const options = getOptions()
|
||||
let _options: Options
|
||||
try {
|
||||
_options = getOptions()
|
||||
} 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
|
||||
}
|
||||
|
||||
export const options = _options
|
||||
|
||||
+14
-1
@@ -1,6 +1,7 @@
|
||||
import fs from 'fs/promises'
|
||||
import path from 'path'
|
||||
import * as os from 'os'
|
||||
import { exit } from 'process'
|
||||
import * as core from '@actions/core'
|
||||
import { options } from './options'
|
||||
|
||||
@@ -67,4 +68,16 @@ const run = () => {
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
run()
|
||||
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
|
||||
})
|
||||
|
||||
+1693
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,14 @@
|
||||
[project]
|
||||
name = "test-auth"
|
||||
version = "0.1.0"
|
||||
description = "Add a short description here"
|
||||
authors = ["Pavel"]
|
||||
channels = ["conda-forge", "https://repo.prefix.dev/setup-pixi-test"]
|
||||
platforms = ["osx-arm64", "osx-64", "linux-64", "linux-aarch64", "win-64"]
|
||||
|
||||
[tasks]
|
||||
test = "python -c 'print(\"Hello world!\")'"
|
||||
|
||||
[dependencies]
|
||||
python = "3.9.*"
|
||||
private-package = "*"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,14 @@
|
||||
[project]
|
||||
name = "test-default"
|
||||
version = "0.1.0"
|
||||
description = "Add a short description here"
|
||||
authors = ["Pavel Zwerschke <pavelzw@gmail.com>"]
|
||||
channels = ["conda-forge"]
|
||||
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
|
||||
|
||||
[tasks]
|
||||
test = "python -c 'print(\"Hello world!\")'"
|
||||
|
||||
[dependencies]
|
||||
# the lockfile still has python 3.10.*
|
||||
python = "3.11.*"
|
||||
@@ -0,0 +1,28 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2023, Pavel Zwerschke
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,28 @@
|
||||
package:
|
||||
name: private-package
|
||||
version: 0.0.1
|
||||
|
||||
build:
|
||||
noarch: python
|
||||
script: echo this is a noop
|
||||
number: 0
|
||||
|
||||
requirements:
|
||||
run:
|
||||
- python >=3.9
|
||||
|
||||
test:
|
||||
commands:
|
||||
- echo this is a noop
|
||||
|
||||
about:
|
||||
home: http://github.com/prefix-dev/setup-pixi
|
||||
license: BSD-3-Clause
|
||||
license_file: LICENSE
|
||||
description: |
|
||||
This is a test package for setup-pixi.
|
||||
dev_url: http://github.com/prefix-dev/setup-pixi
|
||||
|
||||
extra:
|
||||
recipe-maintainers:
|
||||
- pavelzw
|
||||
Reference in New Issue
Block a user