Compare commits

...

50 Commits

Author SHA1 Message Date
Kevin Cui
d648c2dd06
fix: not allow install multiple package manager (#161)
When a project has both npm and pnpm, using pnpm/action-setup will result in an error: `Multiple versions of pnpm specified`.

The previous implementation was only meant to avoid the "ERR_PNPM_BAD_PM_VERSION" error, but it did not take into account the situation of multiple different package managers.

Signed-off-by: Kevin Cui <bh@bugs.cc>
2025-03-28 08:37:14 +08:00
Zoltan Kochan
a7487c7e89
feat: update dist 2025-02-06 22:30:07 +01:00
Zoltan Kochan
fff70888d0
test: update pnpm to v9 2025-02-06 22:24:21 +01:00
Daniel Bayley
6e3017af18
docs: support package.yaml (#157) 2025-02-06 22:13:04 +01:00
Daniel Bayley
0cb0538c33
feat: support package.yaml (#156) 2025-02-06 22:04:41 +01:00
Azat S.
e303250a24
docs: update pnpm version in readme examples (#154) 2025-01-09 00:42:18 +01:00
Karl Horky
ac5bf11548
Update examples to use pnpm v9 (#142) 2024-08-14 16:07:48 +02:00
its-monotype
18ac635edf
docs: remove redundant manual cache due to setup-node cache (#131) 2024-07-05 15:24:26 +02:00
Zoltan Kochan
0d0b43217a
docs: add warning about v2 2024-07-05 14:37:28 +02:00
Karl Horky
0eb0e97082
Add readme example for omitting version (#134)
* Add readme example for omitting `version`

* docs: more detailed explanations

---------

Co-authored-by: Khải <hvksmr1996@gmail.com>
2024-07-04 10:37:24 +02:00
hyesung oh
23657c8550
docs: change order of setup node and pnpm (#129) 2024-06-16 14:33:23 +02:00
Linda_pp
5d79380f29
fix: add missing outputs metadata to action.yml (#127) 2024-06-12 16:45:37 +02:00
Ben McCann
562dbbf611
fix: correct typo in error message (#125) 2024-06-12 16:44:03 +02:00
Ben McCann
00884bcdc5
docs: use cached pnpm installation (#128) 2024-06-12 16:38:46 +02:00
Zoltan Kochan
fe02b34f77
docs: bump action-setup version in README 2024-05-07 15:16:48 +02:00
Karl Horky
bee1f099e5
feat: throw error when multiple versions specified (#122)
* Throw error when multiple versions specified

* fix: fmt

* fix: fmt

* Swallow error on ENOENT

* Match versions

* refactor: install pnpm

---------

Co-authored-by: Khải <hvksmr1996@gmail.com>
Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-05-06 23:24:46 +02:00
Sukka
ce859e384f
refactor: replace fs-extra with Node.js built-in fs methods (#120) 2024-04-16 11:26:31 +02:00
Zoltan Kochan
2ab6dce4f5
docs(README): fix link to LICENSE 2024-03-27 22:17:57 +01:00
Ethan Neff
e280758d01
docs(README): update dependency versions (#117) 2024-03-27 22:12:51 +01:00
dependabot[bot]
129abb77bf
Bump undici from 5.28.2 to 5.28.3 (#115)
Bumps [undici](https://github.com/nodejs/undici) from 5.28.2 to 5.28.3.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.2...v5.28.3)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-17 10:59:33 +01:00
Zoltan Kochan
a3252b78c4
docs(README): update version 2024-02-08 11:28:50 +01:00
Erik Burton
1ee9c9d01d
feat!: node20 upgrade (#110)
* upgrade versions to latest

* remove usage of ts-schema-autogen

* fix: update pnpm sources

* update build/output

* use node20

* fix: run-install array output

* fix: maintain behaviour for parseRunInstall, error messages

* fix: another edge case for input.args

* fix: use zod for input validation

* fix: use zod.infer for exported RunInstall types

* fix: remove @types/js-yaml

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-02-08 11:22:15 +01:00
dependabot[bot]
ebcfd6995d
Bump actions/setup-node from 3 to 4 (#103)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-10 21:58:17 +02:00
Steven Yung
d2613e087f
docs: update pnpm version in caching example (#94) 2023-09-27 19:17:23 +03:00
dependabot[bot]
d928be8e0c
Bump actions/checkout from 3 to 4 (#96)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-27 19:17:06 +03:00
Khải
d882d12c64
feat: standalone binary (#92)
* feat: add an option to install the self-contained binary version of pnpm

* test: add a test about nodejs_bundled

* style: remove an empty line

* chore: use newer pnpm

* chore: update dependencies

* feat: rename `nodejs_bundled` to `standalone`

as @zkochan suggested

* docs: add

---------

Co-authored-by: Takashi Sato <takashi@tks.st>
2023-07-26 14:50:04 +03:00
Khải
0b715c7ebb
Merge pull request #75 from ojeytonwilliams/fix/caching-example
docs: update the caching example
2023-07-25 17:00:41 +07:00
Khải
2ed49cbb02
Merge pull request #88 from KengoTODA/make-path-configurable
support projects that have package.json in non-root directory
2023-07-25 16:59:00 +07:00
Khải
218cb35941
Merge pull request #69 from zakuro9715/zakuro9715-patch-2
Remove corepack url in error message
2023-07-25 14:16:42 +07:00
Khải
3723f63bb4
Merge pull request #90 from pnpm/optional-version
feat: make version actually optional
2023-07-25 14:05:04 +07:00
khai96_
849d884800 feat: make version actually optional
closes https://github.com/pnpm/action-setup/issues/85
2023-07-25 14:01:28 +07:00
khai96_
f92eb0edb6 docs: update pnpm version in readme
fixes https://github.com/pnpm/action-setup/issues/89
2023-07-25 13:50:35 +07:00
Kengo TODA
b27f801bf9 feat: add package_json_file option
Signed-off-by: Kengo TODA <skypencil@gmail.com>
2023-07-08 07:02:46 +08:00
Khải
11dd14d0c0
Change sponsor to pnpm's opencollective 2023-04-22 17:39:01 +07:00
Oliver Eyton-Williams
61eb8c655a
docs: update the caching example 2023-03-08 00:13:47 +01:00
zakuro
65db188e28
Remove corepack url in error message 2022-11-09 06:54:12 +09:00
Khải
0609f0983b
Merge pull request #66 from mrienstra/patch-1
docs: drop minor & patch version from examples
2022-11-02 12:09:43 +07:00
Michael Rienstra
7208fa2733
docs: drop minor & patch version from examples 2022-11-01 21:55:20 -07:00
Khải
1bd00a2972
Merge pull request #64 from mrienstra/patch-1
typo: not latest version
2022-10-26 10:32:07 +07:00
Michael Rienstra
d5601fb603
bump first occurrence of actions/checkout to v3 2022-10-25 10:52:54 -07:00
Michael Rienstra
bc06aa6030
typo: not latest version 2022-10-25 10:42:24 -07:00
Khải
cd2af74528
Merge pull request #62 from melMass/mel/fix-readme
fix: ️ cross-platform example
2022-10-18 17:29:18 +07:00
Mel Massadian
c8a150e137
fix: ️ just use shell:bash
set-output is deprecated see #58
2022-10-18 12:23:15 +02:00
Mel Massadian
ed0172a253
fix: ️ cross-platform example 2022-10-18 12:02:38 +02:00
Zoltan Kochan
c3b53f6a16
chore(release): 2.2.4 2022-10-15 21:12:50 +03:00
Zoltan Kochan
21e88da200
fix(deps): update 2022-10-15 21:12:13 +03:00
Zoltan Kochan
fc3334fa11
build 2022-10-15 21:09:00 +03:00
Sébastien Vanvelthem
d01953a678
Update action/core to 1.10.0 to fix deprecation warnings (#59)
* chore: update action/core to 1.10.0

* chore(lock): freshen
2022-10-15 20:57:21 +03:00
Khải
3360b50db7
Merge pull request #58 from belgattitude/doc-adapt-to-new-github-env
Doc update to account for deprecated `set-output`.
2022-10-13 22:23:23 +07:00
Sébastien Vanvelthem
6f9e9a867a docs: update to new github env 2022-10-13 16:58:06 +02:00
19 changed files with 237814 additions and 269031 deletions

14
.github/FUNDING.yml vendored
View File

@ -1,12 +1,2 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: khai96_
open_collective: # Collective unavailable
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # disabled
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
custom:
- https://opencollective.com/pnpm

View File

@ -15,19 +15,19 @@ jobs:
fail-fast: false
matrix:
pnpm:
- 4.11.1
- 9.15.5
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run the action
uses: ./
with:
version: 4.11.1
version: 9.15.5
- name: 'Test: which'
run: which pnpm; which pnpx
@ -35,8 +35,8 @@ jobs:
- name: 'Test: install'
run: pnpm install
test_explicit_inputs:
name: Test with explicit inputs
test_dest:
name: Test with dest
runs-on: ${{ matrix.os }}
@ -44,19 +44,19 @@ jobs:
fail-fast: false
matrix:
pnpm:
- 4.11.1
- 9.15.5
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run the action
uses: ./
with:
version: 4.11.1
version: 9.15.5
dest: ~/test/pnpm
- name: 'Test: which'
@ -65,6 +65,61 @@ jobs:
- name: 'Test: install'
run: pnpm install
test_standalone:
name: Test with standalone
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
standalone:
- true
- false
steps:
- uses: actions/checkout@v4
- name: Run the action
uses: ./
with:
version: 9.15.0
standalone: ${{ matrix.standalone }}
- name: install Node.js
uses: actions/setup-node@v4
with:
# pnpm@7.0.0 is not compatible with Node.js 12
node-version: 12.22.12
- name: 'Test: which (pnpm)'
run: which pnpm
- name: 'Test: which (pnpx)'
if: matrix.standalone == false
run: which pnpx
- name: 'Test: install when standalone is true'
if: matrix.standalone
run: pnpm install
- name: 'Test: install when standalone is false'
if: matrix.standalone == false
# Since the default shell on windows runner is pwsh, we specify bash explicitly
shell: bash
run: |
if pnpm install; then
echo "pnpm install should fail"
exit 1
else
echo "pnpm install failed as expected"
fi
test_run_install:
name: 'Test with run_install (${{ matrix.run_install.name }}, ${{ matrix.os }})'
@ -74,7 +129,7 @@ jobs:
fail-fast: false
matrix:
pnpm:
- 4.11.1
- 9.15.5
os:
- ubuntu-latest
- macos-latest
@ -94,7 +149,6 @@ jobs:
- --global-dir=./pnpm-global
- npm
- yarn
- pnpm
- name: 'array'
value: |
- {}
@ -104,15 +158,14 @@ jobs:
- --global-dir=./pnpm-global
- npm
- yarn
- pnpm
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run the action
uses: ./
with:
version: 4.11.1
version: 9.15.5
run_install: ${{ matrix.run_install.value }}
- name: 'Test: which'

3
.gitignore vendored
View File

@ -2,7 +2,8 @@ node_modules
*.log
/dist/*
!/dist/index.js
!/dist/pnpm.js
!/dist/pnpm.cjs
!/dist/worker.js
tmp
temp
*.tmp

View File

@ -1,3 +1,7 @@
> ## :warning: Upgrade from v2!
>
> The v2 version of this action [has stopped working](https://github.com/pnpm/action-setup/issues/135) with newer Node.js versions. Please, upgrade to the latest version to fix any issues.
# Setup pnpm
Install pnpm package manager.
@ -38,6 +42,16 @@ If `run_install` is a YAML string representation of either an object or an array
**Optional** (_type:_ `string[]`) Additional arguments after `pnpm [recursive] install`, e.g. `[--frozen-lockfile, --strict-peer-dependencies]`.
### `package_json_file`
**Optional** (_type:_ `string`, _default:_ `package.json`) File path to the `package.json`/[`package.yaml`](https://github.com/pnpm/pnpm/pull/1799) to read "packageManager" configuration.
### `standalone`
**Optional** (_type:_ `boolean`, _default:_ `false`) When set to true, [@pnpm/exe](https://www.npmjs.com/package/@pnpm/exe), which is a Node.js bundled package, will be installed, enabling using `pnpm` without Node.js.
This is useful when you want to use a incompatible pair of Node.js and pnpm.
## Outputs
### `dest`
@ -50,7 +64,9 @@ Location of `pnpm` and `pnpx` command.
## Usage example
### Just install pnpm
### Install only pnpm without `packageManager`
This works when the repo either doesn't have a `package.json` or has a `package.json` but it doesn't specify `packageManager`.
```yaml
on:
@ -62,9 +78,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v2.2.2
- uses: pnpm/action-setup@v4
with:
version: 6.0.2
version: 10
```
### Install only pnpm with `packageManager`
Omit `version` input to use the version in the [`packageManager` field in the `package.json`](https://nodejs.org/api/corepack.html).
```yaml
on:
- push
- pull_request
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v4
```
### Install pnpm and a few npm packages
@ -79,11 +112,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2.2.2
- uses: pnpm/action-setup@v4
with:
version: 6.0.2
version: 10
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
@ -103,32 +136,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 7
version: 10
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
- name: Install Node.js
uses: actions/setup-node@v4
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
@ -142,4 +162,4 @@ This action does not setup Node.js for you, use [actions/setup-node](https://git
## License
[MIT](https://git.io/JfclH) © [Hoàng Văn Khải](https://github.com/KSXGitHub/)
[MIT](https://github.com/pnpm/action-setup/blob/master/LICENSE.md) © [Hoàng Văn Khải](https://github.com/KSXGitHub/)

View File

@ -6,6 +6,7 @@ branding:
inputs:
version:
description: Version of pnpm to install
required: false
dest:
description: Where to store pnpm files
required: false
@ -14,7 +15,20 @@ inputs:
description: If specified, run `pnpm install`
required: false
default: 'null'
package_json_file:
description: File path to the package.json to read "packageManager" configuration
required: false
default: 'package.json'
standalone:
description: When set to true, @pnpm/exe, which is a Node.js bundled package, will be installed, enabling using pnpm without Node.js.
required: false
default: 'false'
outputs:
dest:
description: Expanded path of inputs#dest
bin_dest:
description: Location of `pnpm` and `pnpx` command
runs:
using: node16
using: node20
main: dist/index.js
post: dist/index.js

6
dist/index.js vendored

File diff suppressed because one or more lines are too long

220780
dist/pnpm.cjs vendored Normal file

File diff suppressed because one or more lines are too long

134031
dist/pnpm.js vendored

File diff suppressed because one or more lines are too long

16625
dist/worker.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,26 +1,23 @@
{
"private": true,
"scripts": {
"build:schemas": "ts-schema-autogen generate",
"build:ncc": "ncc build --minify --no-source-map-register --no-cache dist/tsc/index.js --out dist/",
"build": "pnpm run build:schemas && tsc && pnpm run build:ncc && cp src/install-pnpm/pnpm.js dist/pnpm.js",
"start": "pnpm run build && sh ./run.sh"
"build": "tsc && pnpm run build:ncc",
"start": "pnpm run build && sh ./run.sh",
"update-pnpm-dist": "pnpm install && cp ./node_modules/pnpm/dist/pnpm.cjs ./dist/pnpm.cjs && cp ./node_modules/pnpm/dist/worker.js ./dist/worker.js"
},
"dependencies": {
"@actions/core": "^1.6.0",
"@types/expand-tilde": "^2.0.0",
"@types/fs-extra": "^9.0.13",
"@types/js-yaml": "^4.0.5",
"@types/node": "^14.18.10",
"@types/node-fetch": "^2.6.1",
"ajv": "^6.12.6",
"@actions/core": "^1.10.1",
"@types/expand-tilde": "^2.0.2",
"@types/node": "^20.11.5",
"@types/node-fetch": "^2.6.11",
"expand-tilde": "^2.0.2",
"fs-extra": "^10.0.0",
"js-yaml": "^4.1.0"
"yaml": "^2.3.4",
"zod": "^3.22.4"
},
"devDependencies": {
"@ts-schema-autogen/cli": "^0.1.2",
"@vercel/ncc": "^0.33.3",
"typescript": "^4.5.5"
"@vercel/ncc": "^0.38.1",
"pnpm": "^8.14.3",
"typescript": "^5.3.3"
}
}

949
pnpm-lock.yaml generated
View File

@ -1,819 +1,200 @@
lockfileVersion: 5.4
lockfileVersion: '9.0'
specifiers:
'@actions/core': ^1.6.0
'@ts-schema-autogen/cli': ^0.1.2
'@types/expand-tilde': ^2.0.0
'@types/fs-extra': ^9.0.13
'@types/js-yaml': ^4.0.5
'@types/node': ^14.18.10
'@types/node-fetch': ^2.6.1
'@vercel/ncc': ^0.33.3
ajv: ^6.12.6
expand-tilde: ^2.0.2
fs-extra: ^10.0.0
js-yaml: ^4.1.0
typescript: ^4.5.5
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
'@actions/core': 1.6.0
'@types/expand-tilde': 2.0.0
'@types/fs-extra': 9.0.13
'@types/js-yaml': 4.0.5
'@types/node': 14.18.10
'@types/node-fetch': 2.6.1
ajv: 6.12.6
expand-tilde: 2.0.2
fs-extra: 10.0.0
js-yaml: 4.1.0
importers:
devDependencies:
'@ts-schema-autogen/cli': 0.1.2
'@vercel/ncc': 0.33.3
typescript: 4.5.5
.:
dependencies:
'@actions/core':
specifier: ^1.10.1
version: 1.11.1
'@types/expand-tilde':
specifier: ^2.0.2
version: 2.0.2
'@types/node':
specifier: ^20.11.5
version: 20.17.17
'@types/node-fetch':
specifier: ^2.6.11
version: 2.6.12
expand-tilde:
specifier: ^2.0.2
version: 2.0.2
yaml:
specifier: ^2.3.4
version: 2.7.0
zod:
specifier: ^3.22.4
version: 3.24.1
devDependencies:
'@vercel/ncc':
specifier: ^0.38.1
version: 0.38.3
pnpm:
specifier: ^8.14.3
version: 8.15.9
typescript:
specifier: ^5.3.3
version: 5.7.3
packages:
/@actions/core/1.6.0:
resolution: {integrity: sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==}
dependencies:
'@actions/http-client': 1.0.11
dev: false
'@actions/core@1.11.1':
resolution: {integrity: sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==}
/@actions/http-client/1.0.11:
resolution: {integrity: sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==}
dependencies:
tunnel: 0.0.6
dev: false
'@actions/exec@1.1.1':
resolution: {integrity: sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==}
/@ts-schema-autogen/cli/0.1.2:
resolution: {integrity: sha512-61aIkJh7RDDNLCQJtp++1pL/LWlPAI9dxgWyhXycyRm4TRaTVaRBOoxTVnN0IVT+akdhWeiXkhNkCzG6Vd5zAw==}
'@actions/http-client@2.1.0':
resolution: {integrity: sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==}
'@actions/io@1.1.3':
resolution: {integrity: sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==}
'@types/expand-tilde@2.0.2':
resolution: {integrity: sha512-wlsMYiapmIR4Eq/Z0qysN8xaDMjSkO6AIDNFx9oxgWGeKVA1jU+NzwPRZErBNP5z6/dx6QNkNpKglBGPO9OkTA==}
'@types/node-fetch@2.6.12':
resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==}
'@types/node@20.17.17':
resolution: {integrity: sha512-/WndGO4kIfMicEQLTi/mDANUu/iVUhT7KboZPdEqqHQ4aTS+3qT3U5gIqWDFV+XouorjfgGqvKILJeHhuQgFYg==}
'@vercel/ncc@0.38.3':
resolution: {integrity: sha512-rnK6hJBS6mwc+Bkab+PGPs9OiS0i/3kdTO+CkI8V0/VrW3vmz7O2Pxjw/owOlmo6PKEIxRSeZKv/kuL9itnpYA==}
hasBin: true
dependencies:
'@ts-schema-autogen/main': 0.1.1
'@types/fs-extra': 8.1.2
'@types/node': 13.13.52
'@types/yargs': 15.0.14
fs-extra: 8.1.0
tslib: 1.14.1
typescript-json-schema: 0.42.0
yargs: 15.4.1
dev: true
/@ts-schema-autogen/lib/0.1.1:
resolution: {integrity: sha512-1oOQ9lbGnA3RVfIMiX1thvC0OEvTpvuTyLC6kwaBm8CnOBSFsxWUtoQ9ceyVe/otOqZL4SoucMmbJ3kOUnK7EQ==}
dependencies:
'@ts-schema-autogen/status': 0.1.1
'@ts-schema-autogen/types': 0.1.1
'@ts-schema-autogen/utils': 0.0.1
'@ts-schema-autogen/validate': 0.1.1
'@tsfun/object': 0.0.17
'@tsfun/result': 0.0.16
'@types/js-yaml': 3.12.7
'@types/node': 13.13.52
better-path-join: 0.0.1
fast-traverse: 0.1.7
js-yaml: 3.14.1
tslib: 1.14.1
dev: true
asynckit@0.4.0:
resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}
/@ts-schema-autogen/main/0.1.1:
resolution: {integrity: sha512-IC193iebvbbERdx2DGugDq97ne4Fn+zXNVqTc40QuyTbzTGBES6+DnSfI3t1e2f/jX0xGT1e6pDMN8DbdrK1Hw==}
dependencies:
'@ts-schema-autogen/lib': 0.1.1
'@ts-schema-autogen/status': 0.1.1
'@ts-schema-autogen/types': 0.1.1
'@ts-schema-autogen/utils': 0.0.1
'@tsfun/object': 0.0.17
'@tsfun/pipe': 0.0.11
'@types/node': 13.13.52
tslib: 1.14.1
dev: true
/@ts-schema-autogen/schemas/0.1.1:
resolution: {integrity: sha512-cHzhHPJsCQbZCYetSpxRcIEB17MLDOUnuxZiuZ0Yn1BRS72qMwgXqCDckMgGuf9TAsfbkBxUiOIT0C8S7FPYyw==}
dependencies:
'@ts-schema-autogen/types': 0.1.1
'@types/node': 13.13.52
exec-once: 0.1.8
tslib: 1.14.1
dev: true
/@ts-schema-autogen/status/0.1.1:
resolution: {integrity: sha512-zN5KSkk9HjrsgCRFiENYUL7K/fZvK/afQolfSDrqj3nnyuYzRazIn/i2fV5pgTrdEKG3fK/95Zznko7evtK2ow==}
dependencies:
'@ts-schema-autogen/types': 0.1.1
'@ts-schema-autogen/utils': 0.0.1
'@types/node': 13.13.52
tslib: 1.14.1
dev: true
/@ts-schema-autogen/types/0.1.1:
resolution: {integrity: sha512-ePh2vU49xe8Tb4gXytOFDtI/dtSVzQpT1fp5WlyS4KwADZH4Gplj5c3M9t0m7bXl07qUVw5HnF7O6G7iliQ/XQ==}
dependencies:
'@ts-schema-autogen/utils': 0.0.1
'@types/node': 13.13.52
tslib: 1.14.1
typescript-json-schema: 0.42.0
dev: true
/@ts-schema-autogen/utils/0.0.1:
resolution: {integrity: sha512-ASFLu03+zcRBaVAeRCTP84WvuHxmpGiksORB8QpE3nOmWC9m+f/dDRTvgTq/t3bNIYVSe1vKs4LutXX5pjhdjA==}
dependencies:
'@types/node': 13.13.52
tslib: 1.14.1
dev: true
/@ts-schema-autogen/validate/0.1.1:
resolution: {integrity: sha512-5h1xEHsCBk4JZeecLATpEDvCzuQifqA6YzmlEu2C1u8zEMNpv6Y49Yw7ABDGOnam8HQVdnCG6QggKVjVE4GyJQ==}
dependencies:
'@ts-schema-autogen/schemas': 0.1.1
'@ts-schema-autogen/types': 0.1.1
'@tsfun/result': 0.0.16
'@types/node': 13.13.52
ajv: 6.12.6
exec-once: 0.1.8
tslib: 1.14.1
dev: true
/@tsfun/object/0.0.17:
resolution: {integrity: sha512-H/hRAlGWkoui1ZqIX2iPSQdK07mUF7QZwIkyY5SzwBIe1jVkSRNXmHtm9WvWMuoaGCr3peCZGXphximX3DEzig==}
dependencies:
'@types/node': 13.13.52
tslib: 1.14.1
utility-types: 3.10.0
dev: true
/@tsfun/pipe/0.0.11:
resolution: {integrity: sha512-jL88eyhDR/Pena+eBzY9bw8SOED9nET2QPNSgvXpz4XK9t2CBmwtu6YUPzdZCBG6RTSZoQV5VKmsXu4255qVaA==}
engines: {node: '>= 8.9.0'}
dependencies:
'@tsfun/tap': 0.0.10
'@types/node': 13.13.52
tslib: 1.14.1
dev: true
/@tsfun/prv-option-result-common/0.0.11:
resolution: {integrity: sha512-AIp2Oygr9WD12BG4p+fUEhyGtPnchRVALahzDab2eobkD2IhxRnHsKZh4J3v84faEIuXbnpdfALwGkzaOcgkPA==}
engines: {node: '>= 8.9.0'}
dependencies:
'@types/node': 13.13.52
tslib: 1.14.1
dev: true
/@tsfun/prv-types/0.0.6:
resolution: {integrity: sha512-s97gvRX2SjGTdU+Odsi6RgsVFi+xNOx3T6Jew2mo7m7Wj6eJmM0HB0HlFPmwIIi2MtXIpSr71TZmRVcMeU3Atw==}
dependencies:
'@types/node': 13.13.52
tslib: 1.14.1
dev: true
/@tsfun/result/0.0.16:
resolution: {integrity: sha512-lUpVISAm0RUxRdyVUuAOLBe7ArdrQkepdLz4nML0a/2/WvrDsAIn2PIdRL3eZXqqdyhS2dy+ot5E5vc/RNWOEQ==}
engines: {node: '>= 8.9.0'}
dependencies:
'@tsfun/prv-option-result-common': 0.0.11
'@tsfun/prv-types': 0.0.6
'@tsfun/tap': 0.0.10
'@types/node': 13.13.52
tslib: 1.14.1
dev: true
/@tsfun/tap/0.0.10:
resolution: {integrity: sha512-ArfW5g+1BxUXhqWOCOceiR3iviWn6PvDjOHzSBCCw3luYlVJ8JwYMcvj9ZXITBbP33uM8NKbxwzjRGGVckXLdg==}
dependencies:
'@types/node': 13.13.52
tslib: 1.14.1
dev: true
/@types/expand-tilde/2.0.0:
resolution: {integrity: sha512-17h/6MRHoetV2QVUVnUfrmaFCXNIFJ3uDJmXlklX2xDtlEb1W0OXLgP+qwND2Ibg/PtQfQi0vx19KGuPayjLiw==}
dev: false
/@types/fs-extra/8.1.2:
resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==}
dependencies:
'@types/node': 14.18.10
dev: true
/@types/fs-extra/9.0.13:
resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==}
dependencies:
'@types/node': 14.18.10
dev: false
/@types/js-yaml/3.12.7:
resolution: {integrity: sha512-S6+8JAYTE1qdsc9HMVsfY7+SgSuUU/Tp6TYTmITW0PZxiyIMvol3Gy//y69Wkhs0ti4py5qgR3uZH6uz/DNzJQ==}
dev: true
/@types/js-yaml/4.0.5:
resolution: {integrity: sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA==}
dev: false
/@types/json-schema/7.0.9:
resolution: {integrity: sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==}
dev: true
/@types/node-fetch/2.6.1:
resolution: {integrity: sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==}
dependencies:
'@types/node': 14.18.10
form-data: 3.0.1
dev: false
/@types/node/13.13.52:
resolution: {integrity: sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==}
dev: true
/@types/node/14.18.10:
resolution: {integrity: sha512-6iihJ/Pp5fsFJ/aEDGyvT4pHGmCpq7ToQ/yf4bl5SbVAvwpspYJ+v3jO7n8UyjhQVHTy+KNszOozDdv+O6sovQ==}
/@types/yargs-parser/20.2.1:
resolution: {integrity: sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==}
dev: true
/@types/yargs/15.0.14:
resolution: {integrity: sha512-yEJzHoxf6SyQGhBhIYGXQDSCkJjB6HohDShto7m8vaKg9Yp0Yn8+71J9eakh2bnPg6BfsH9PRMhiRTZnd4eXGQ==}
dependencies:
'@types/yargs-parser': 20.2.1
dev: true
/@vercel/ncc/0.33.3:
resolution: {integrity: sha512-JGZ11QV+/ZcfudW2Cz2JVp54/pJNXbsuWRgSh2ZmmZdQBKXqBtIGrwI1Wyx8nlbzAiEFe7FHi4K1zX4//jxTnQ==}
hasBin: true
dev: true
/ajv/6.12.6:
resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
dependencies:
fast-deep-equal: 3.1.3
fast-json-stable-stringify: 2.1.0
json-schema-traverse: 0.4.1
uri-js: 4.4.1
/ansi-regex/4.1.0:
resolution: {integrity: sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==}
engines: {node: '>=6'}
dev: true
/ansi-regex/5.0.1:
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
engines: {node: '>=8'}
dev: true
/ansi-styles/3.2.1:
resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}
engines: {node: '>=4'}
dependencies:
color-convert: 1.9.3
dev: true
/ansi-styles/4.3.0:
resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
engines: {node: '>=8'}
dependencies:
color-convert: 2.0.1
dev: true
/argparse/1.0.10:
resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==}
dependencies:
sprintf-js: 1.0.3
dev: true
/argparse/2.0.1:
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
dev: false
/asynckit/0.4.0:
resolution: {integrity: sha1-x57Zf380y48robyXkLzDZkdLS3k=}
dev: false
/balanced-match/1.0.2:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
dev: true
/better-path-join/0.0.1:
resolution: {integrity: sha512-JIv4V7rh19/Hg0O5I0l8eSobC3F+aUWaL9D9QQKAKFw4Qj+whdRrlRejrYICPS2NEJ/2vsDjhKur3iFhQf49QQ==}
dependencies:
'@types/node': 13.13.52
tslib: 1.14.1
dev: true
/brace-expansion/1.1.11:
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
dependencies:
balanced-match: 1.0.2
concat-map: 0.0.1
dev: true
/camelcase/5.3.1:
resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==}
engines: {node: '>=6'}
dev: true
/cliui/5.0.0:
resolution: {integrity: sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==}
dependencies:
string-width: 3.1.0
strip-ansi: 5.2.0
wrap-ansi: 5.1.0
dev: true
/cliui/6.0.0:
resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==}
dependencies:
string-width: 4.2.3
strip-ansi: 6.0.1
wrap-ansi: 6.2.0
dev: true
/color-convert/1.9.3:
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
dependencies:
color-name: 1.1.3
dev: true
/color-convert/2.0.1:
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
engines: {node: '>=7.0.0'}
dependencies:
color-name: 1.1.4
dev: true
/color-name/1.1.3:
resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=}
dev: true
/color-name/1.1.4:
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
dev: true
/combined-stream/1.0.8:
combined-stream@1.0.8:
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
engines: {node: '>= 0.8'}
delayed-stream@1.0.0:
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'}
expand-tilde@2.0.2:
resolution: {integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==}
engines: {node: '>=0.10.0'}
form-data@4.0.1:
resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==}
engines: {node: '>= 6'}
homedir-polyfill@1.0.3:
resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==}
engines: {node: '>=0.10.0'}
mime-db@1.52.0:
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
engines: {node: '>= 0.6'}
mime-types@2.1.35:
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
engines: {node: '>= 0.6'}
parse-passwd@1.0.0:
resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==}
engines: {node: '>=0.10.0'}
pnpm@8.15.9:
resolution: {integrity: sha512-SZQ0ydj90aJ5Tr9FUrOyXApjOrzuW7Fee13pDzL0e1E6ypjNXP0AHDHw20VLw4BO3M1XhQHkyik6aBYWa72fgQ==}
engines: {node: '>=16.14'}
hasBin: true
tunnel@0.0.6:
resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==}
engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'}
typescript@5.7.3:
resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==}
engines: {node: '>=14.17'}
hasBin: true
undici-types@6.19.8:
resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
yaml@2.7.0:
resolution: {integrity: sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==}
engines: {node: '>= 14'}
hasBin: true
zod@3.24.1:
resolution: {integrity: sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==}
snapshots:
'@actions/core@1.11.1':
dependencies:
'@actions/exec': 1.1.1
'@actions/http-client': 2.1.0
'@actions/exec@1.1.1':
dependencies:
'@actions/io': 1.1.3
'@actions/http-client@2.1.0':
dependencies:
tunnel: 0.0.6
'@actions/io@1.1.3': {}
'@types/expand-tilde@2.0.2': {}
'@types/node-fetch@2.6.12':
dependencies:
'@types/node': 20.17.17
form-data: 4.0.1
'@types/node@20.17.17':
dependencies:
undici-types: 6.19.8
'@vercel/ncc@0.38.3': {}
asynckit@0.4.0: {}
combined-stream@1.0.8:
dependencies:
delayed-stream: 1.0.0
dev: false
/concat-map/0.0.1:
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
dev: true
delayed-stream@1.0.0: {}
/decamelize/1.2.0:
resolution: {integrity: sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=}
engines: {node: '>=0.10.0'}
dev: true
/delayed-stream/1.0.0:
resolution: {integrity: sha1-3zrhmayt+31ECqrgsp4icrJOxhk=}
engines: {node: '>=0.4.0'}
dev: false
/emoji-regex/7.0.3:
resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==}
dev: true
/emoji-regex/8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
dev: true
/esprima/4.0.1:
resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==}
engines: {node: '>=4'}
hasBin: true
dev: true
/exec-once/0.1.8:
resolution: {integrity: sha512-zv8nmN+jF366nAEuNgOh5U2owy5MMkv+N1LCp1utCH63ujSXr92H3x2lDR+Mstm9xNmXNlo45W/Ch+TrN1jAdw==}
dependencies:
'@types/node': 14.18.10
tslib: 2.3.1
dev: true
/expand-tilde/2.0.2:
resolution: {integrity: sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=}
engines: {node: '>=0.10.0'}
expand-tilde@2.0.2:
dependencies:
homedir-polyfill: 1.0.3
dev: false
/fast-deep-equal/3.1.3:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
/fast-json-stable-stringify/2.1.0:
resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==}
/fast-traverse/0.1.7:
resolution: {integrity: sha512-gZTQvJSgrGV24F8AeeTNxip8OEkjRHwDDpGw0b51TzRVGjJsKzh6CuHf9ltVjJZzni5Ead+EEQJ0IFCuoCJUtA==}
dependencies:
'@types/node': 14.18.10
tslib: 2.3.1
dev: true
/find-up/3.0.0:
resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==}
engines: {node: '>=6'}
dependencies:
locate-path: 3.0.0
dev: true
/find-up/4.1.0:
resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==}
engines: {node: '>=8'}
dependencies:
locate-path: 5.0.0
path-exists: 4.0.0
dev: true
/form-data/3.0.1:
resolution: {integrity: sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==}
engines: {node: '>= 6'}
form-data@4.0.1:
dependencies:
asynckit: 0.4.0
combined-stream: 1.0.8
mime-types: 2.1.34
dev: false
mime-types: 2.1.35
/fs-extra/10.0.0:
resolution: {integrity: sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==}
engines: {node: '>=12'}
dependencies:
graceful-fs: 4.2.9
jsonfile: 6.1.0
universalify: 2.0.0
dev: false
/fs-extra/8.1.0:
resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==}
engines: {node: '>=6 <7 || >=8'}
dependencies:
graceful-fs: 4.2.9
jsonfile: 4.0.0
universalify: 0.1.2
dev: true
/fs.realpath/1.0.0:
resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=}
dev: true
/get-caller-file/2.0.5:
resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}
engines: {node: 6.* || 8.* || >= 10.*}
dev: true
/glob/7.1.7:
resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==}
dependencies:
fs.realpath: 1.0.0
inflight: 1.0.6
inherits: 2.0.4
minimatch: 3.0.5
once: 1.4.0
path-is-absolute: 1.0.1
dev: true
/graceful-fs/4.2.9:
resolution: {integrity: sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==}
/homedir-polyfill/1.0.3:
resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==}
engines: {node: '>=0.10.0'}
homedir-polyfill@1.0.3:
dependencies:
parse-passwd: 1.0.0
dev: false
/inflight/1.0.6:
resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=}
mime-db@1.52.0: {}
mime-types@2.1.35:
dependencies:
once: 1.4.0
wrappy: 1.0.2
dev: true
mime-db: 1.52.0
/inherits/2.0.4:
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
dev: true
parse-passwd@1.0.0: {}
/is-fullwidth-code-point/2.0.0:
resolution: {integrity: sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=}
engines: {node: '>=4'}
dev: true
pnpm@8.15.9: {}
/is-fullwidth-code-point/3.0.0:
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
engines: {node: '>=8'}
dev: true
tunnel@0.0.6: {}
/js-yaml/3.14.1:
resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==}
hasBin: true
dependencies:
argparse: 1.0.10
esprima: 4.0.1
dev: true
typescript@5.7.3: {}
/js-yaml/4.1.0:
resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
hasBin: true
dependencies:
argparse: 2.0.1
dev: false
undici-types@6.19.8: {}
/json-schema-traverse/0.4.1:
resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==}
yaml@2.7.0: {}
/json-stable-stringify/1.0.1:
resolution: {integrity: sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=}
dependencies:
jsonify: 0.0.0
dev: true
/jsonfile/4.0.0:
resolution: {integrity: sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=}
optionalDependencies:
graceful-fs: 4.2.9
dev: true
/jsonfile/6.1.0:
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
dependencies:
universalify: 2.0.0
optionalDependencies:
graceful-fs: 4.2.9
dev: false
/jsonify/0.0.0:
resolution: {integrity: sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=}
dev: true
/locate-path/3.0.0:
resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==}
engines: {node: '>=6'}
dependencies:
p-locate: 3.0.0
path-exists: 3.0.0
dev: true
/locate-path/5.0.0:
resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==}
engines: {node: '>=8'}
dependencies:
p-locate: 4.1.0
dev: true
/mime-db/1.51.0:
resolution: {integrity: sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==}
engines: {node: '>= 0.6'}
dev: false
/mime-types/2.1.34:
resolution: {integrity: sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==}
engines: {node: '>= 0.6'}
dependencies:
mime-db: 1.51.0
dev: false
/minimatch/3.0.5:
resolution: {integrity: sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==}
dependencies:
brace-expansion: 1.1.11
dev: true
/once/1.4.0:
resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=}
dependencies:
wrappy: 1.0.2
dev: true
/p-limit/2.3.0:
resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==}
engines: {node: '>=6'}
dependencies:
p-try: 2.2.0
dev: true
/p-locate/3.0.0:
resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==}
engines: {node: '>=6'}
dependencies:
p-limit: 2.3.0
dev: true
/p-locate/4.1.0:
resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==}
engines: {node: '>=8'}
dependencies:
p-limit: 2.3.0
dev: true
/p-try/2.2.0:
resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==}
engines: {node: '>=6'}
dev: true
/parse-passwd/1.0.0:
resolution: {integrity: sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=}
engines: {node: '>=0.10.0'}
dev: false
/path-exists/3.0.0:
resolution: {integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=}
engines: {node: '>=4'}
dev: true
/path-exists/4.0.0:
resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
engines: {node: '>=8'}
dev: true
/path-is-absolute/1.0.1:
resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=}
engines: {node: '>=0.10.0'}
dev: true
/punycode/2.1.1:
resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==}
engines: {node: '>=6'}
/require-directory/2.1.1:
resolution: {integrity: sha1-jGStX9MNqxyXbiNE/+f3kqam30I=}
engines: {node: '>=0.10.0'}
dev: true
/require-main-filename/2.0.0:
resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==}
dev: true
/set-blocking/2.0.0:
resolution: {integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc=}
dev: true
/sprintf-js/1.0.3:
resolution: {integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=}
dev: true
/string-width/3.1.0:
resolution: {integrity: sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==}
engines: {node: '>=6'}
dependencies:
emoji-regex: 7.0.3
is-fullwidth-code-point: 2.0.0
strip-ansi: 5.2.0
dev: true
/string-width/4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'}
dependencies:
emoji-regex: 8.0.0
is-fullwidth-code-point: 3.0.0
strip-ansi: 6.0.1
dev: true
/strip-ansi/5.2.0:
resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==}
engines: {node: '>=6'}
dependencies:
ansi-regex: 4.1.0
dev: true
/strip-ansi/6.0.1:
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
engines: {node: '>=8'}
dependencies:
ansi-regex: 5.0.1
dev: true
/tslib/1.14.1:
resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
dev: true
/tslib/2.3.1:
resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==}
dev: true
/tunnel/0.0.6:
resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==}
engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'}
dev: false
/typescript-json-schema/0.42.0:
resolution: {integrity: sha512-9WO+lVmlph7Ecb7lPd9tU84XFUQh44kpAf3cWe/Ym4G5EKw/SS6XGpi1DZDthvxqkIdNSDlWi7FhKfxuIV/3yw==}
hasBin: true
dependencies:
'@types/json-schema': 7.0.9
glob: 7.1.7
json-stable-stringify: 1.0.1
typescript: 3.9.10
yargs: 14.2.3
dev: true
/typescript/3.9.10:
resolution: {integrity: sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: true
/typescript/4.5.5:
resolution: {integrity: sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: true
/universalify/0.1.2:
resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==}
engines: {node: '>= 4.0.0'}
dev: true
/universalify/2.0.0:
resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==}
engines: {node: '>= 10.0.0'}
dev: false
/uri-js/4.4.1:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
dependencies:
punycode: 2.1.1
/utility-types/3.10.0:
resolution: {integrity: sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg==}
engines: {node: '>= 4'}
dev: true
/which-module/2.0.0:
resolution: {integrity: sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=}
dev: true
/wrap-ansi/5.1.0:
resolution: {integrity: sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==}
engines: {node: '>=6'}
dependencies:
ansi-styles: 3.2.1
string-width: 3.1.0
strip-ansi: 5.2.0
dev: true
/wrap-ansi/6.2.0:
resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==}
engines: {node: '>=8'}
dependencies:
ansi-styles: 4.3.0
string-width: 4.2.3
strip-ansi: 6.0.1
dev: true
/wrappy/1.0.2:
resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=}
dev: true
/y18n/4.0.3:
resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==}
dev: true
/yargs-parser/15.0.3:
resolution: {integrity: sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA==}
dependencies:
camelcase: 5.3.1
decamelize: 1.2.0
dev: true
/yargs-parser/18.1.3:
resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==}
engines: {node: '>=6'}
dependencies:
camelcase: 5.3.1
decamelize: 1.2.0
dev: true
/yargs/14.2.3:
resolution: {integrity: sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==}
dependencies:
cliui: 5.0.0
decamelize: 1.2.0
find-up: 3.0.0
get-caller-file: 2.0.5
require-directory: 2.1.1
require-main-filename: 2.0.0
set-blocking: 2.0.0
string-width: 3.1.0
which-module: 2.0.0
y18n: 4.0.3
yargs-parser: 15.0.3
dev: true
/yargs/15.4.1:
resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==}
engines: {node: '>=8'}
dependencies:
cliui: 6.0.0
decamelize: 1.2.0
find-up: 4.1.0
get-caller-file: 2.0.5
require-directory: 2.1.1
require-main-filename: 2.0.0
set-blocking: 2.0.0
string-width: 4.2.3
which-module: 2.0.0
y18n: 4.0.3
yargs-parser: 18.1.3
dev: true
zod@3.24.1: {}

1
run.sh
View File

@ -4,4 +4,5 @@ export HOME="$(pwd)"
export INPUT_VERSION=4.11.1
export INPUT_DEST='~/pnpm.temp'
export INPUT_RUN_INSTALL=null
export INPUT_standalone=false
exec node dist/index.js

View File

@ -1,4 +1,4 @@
import { getInput, InputOptions } from '@actions/core'
import { getBooleanInput, getInput, InputOptions } from '@actions/core'
import expandTilde from 'expand-tilde'
import { RunInstall, parseRunInstall } from './run-install'
@ -6,6 +6,8 @@ export interface Inputs {
readonly version?: string
readonly dest: string
readonly runInstall: RunInstall[]
readonly packageJsonFile: string
readonly standalone: boolean
}
const options: InputOptions = {
@ -18,6 +20,8 @@ export const getInputs = (): Inputs => ({
version: getInput('version'),
dest: parseInputPath('dest'),
runInstall: parseRunInstall('run_install'),
packageJsonFile: parseInputPath('package_json_file'),
standalone: getBooleanInput('standalone'),
})
export default getInputs

View File

@ -1,21 +0,0 @@
{
"$schema": "https://raw.githubusercontent.com/ksxnodeapps/ts-schema-autogen/master/packages/schemas/config.schema.json",
"instruction": {
"compilerOptions": {
"strict": true,
"target": "ES2018",
"lib": [
"ES2018",
"ES2019",
"ES2020",
"ESNext"
],
"moduleResolution": "Node",
"esModuleInterop": true,
"resolveJsonModule": true
},
"input": "run-install.ts",
"symbol": "RunInstallInput",
"output": "run-install-input.schema.json"
}
}

View File

@ -1,39 +0,0 @@
{
"anyOf": [
{
"$ref": "#/definitions/RunInstall"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/RunInstall"
}
},
{
"type": [
"null",
"boolean"
]
}
],
"definitions": {
"RunInstall": {
"type": "object",
"properties": {
"recursive": {
"type": "boolean"
},
"cwd": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}

View File

@ -1,39 +1,41 @@
import { getInput, error, InputOptions } from '@actions/core'
import Ajv from 'ajv'
import { load } from 'js-yaml'
import process from 'process'
import runInstallSchema from './run-install-input.schema.json'
import { getInput, error } from '@actions/core'
import * as yaml from 'yaml'
import { z, ZodError } from 'zod'
export interface RunInstall {
readonly recursive?: boolean
readonly cwd?: string
readonly args?: readonly string[]
}
const RunInstallSchema = z.object({
recursive: z.boolean().optional(),
cwd: z.string().optional(),
args: z.array(z.string()).optional(),
})
export type RunInstallInput =
| null
| boolean
| RunInstall
| RunInstall[]
const RunInstallInputSchema = z.union([
z.null(),
z.boolean(),
RunInstallSchema,
z.array(RunInstallSchema),
])
const options: InputOptions = {
required: true,
}
export type RunInstallInput = z.infer<typeof RunInstallInputSchema>
export type RunInstall = z.infer<typeof RunInstallSchema>
export function parseRunInstall(name: string): RunInstall[] {
const result: RunInstallInput = load(getInput(name, options)) as any
const ajv = new Ajv({
allErrors: true,
})
const validate = ajv.compile(runInstallSchema)
if (!validate(result)) {
for (const errorItem of validate.errors!) {
error(`with.run_install${errorItem.dataPath}: ${errorItem.message}`)
export function parseRunInstall(inputName: string): RunInstall[] {
const input = getInput(inputName, { required: true })
const parsedInput: unknown = yaml.parse(input)
try {
const result: RunInstallInput = RunInstallInputSchema.parse(parsedInput)
if (!result) return []
if (result === true) return [{ recursive: true }]
if (Array.isArray(result)) return result
return [result]
} catch (exception: unknown) {
error(`Error for input "${inputName}" = ${input}`)
if (exception instanceof ZodError) {
error(`Errors: ${exception.errors}`)
} else {
error(`Exception: ${exception}`)
}
return process.exit(1)
process.exit(1)
}
if (!result) return []
if (result === true) return [{ recursive: true }]
if (Array.isArray(result)) return result
return [result]
}

File diff suppressed because one or more lines are too long

View File

@ -1,22 +1,27 @@
import { addPath, exportVariable } from '@actions/core'
import { spawn } from 'child_process'
import { remove, ensureFile, writeFile, readFile } from 'fs-extra'
import { rm, writeFile, mkdir } from 'fs/promises'
import { readFileSync } from 'fs'
import path from 'path'
import { execPath } from 'process'
import util from 'util'
import { Inputs } from '../inputs'
import YAML from 'yaml'
export async function runSelfInstaller(inputs: Inputs): Promise<number> {
const { version, dest } = inputs
const { version, dest, packageJsonFile, standalone } = inputs
// prepare self install
await remove(dest)
await rm(dest, { recursive: true, force: true })
// create dest directory after removal
await mkdir(dest, { recursive: true })
const pkgJson = path.join(dest, 'package.json')
await ensureFile(pkgJson)
// we have ensured the dest directory exists, we can write the file directly
await writeFile(pkgJson, JSON.stringify({ private: true }))
// prepare target pnpm
const target = await readTarget(version)
const cp = spawn(execPath, [path.join(__dirname, 'pnpm.js'), 'install', target, '--no-lockfile'], {
const target = await readTarget({ version, packageJsonFile, standalone })
const cp = spawn(execPath, [path.join(__dirname, 'pnpm.cjs'), 'install', target, '--no-lockfile'], {
cwd: dest,
stdio: ['pipe', 'inherit', 'inherit'],
})
@ -33,28 +38,66 @@ export async function runSelfInstaller(inputs: Inputs): Promise<number> {
return exitCode
}
async function readTarget(version?: string | undefined) {
if (version) return `pnpm@${version}`
async function readTarget(opts: {
readonly version?: string | undefined
readonly packageJsonFile: string
readonly standalone: boolean
}) {
const { version, packageJsonFile, standalone } = opts
const { GITHUB_WORKSPACE } = process.env
let packageManager
if (GITHUB_WORKSPACE) {
try {
const content = readFileSync(path.join(GITHUB_WORKSPACE, packageJsonFile), 'utf8');
({ packageManager } = packageJsonFile.endsWith(".yaml")
? YAML.parse(content, { merge: true })
: JSON.parse(content)
)
} catch (error: unknown) {
// Swallow error if package.json doesn't exist in root
if (!util.types.isNativeError(error) || !('code' in error) || error.code !== 'ENOENT') throw error
}
}
if (version) {
if (
typeof packageManager === 'string' &&
packageManager.startsWith('pnpm@') &&
packageManager.replace('pnpm@', '') !== version
) {
throw new Error(`Multiple versions of pnpm specified:
- version ${version} in the GitHub Action config with the key "version"
- version ${packageManager} in the package.json with the key "packageManager"
Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`)
}
return `${ standalone ? '@pnpm/exe' : 'pnpm' }@${version}`
}
if (!GITHUB_WORKSPACE) {
throw new Error(`No workspace is found.
If you're intended to let pnpm/action-setup read preferred pnpm version from the "packageManager" field in the package.json file,
If you've intended to let pnpm/action-setup read preferred pnpm version from the "packageManager" field in the package.json file,
please run the actions/checkout before pnpm/action-setup.
Otherwise, please specify the pnpm version in the action configuration.`)
}
const { packageManager } = JSON.parse(await readFile(path.join(GITHUB_WORKSPACE, 'package.json'), 'utf8'))
if (typeof packageManager !== 'string') {
throw new Error(`No pnpm version is specified.
Please specify it by one of the following ways:
- in the GitHub Action config with the key "version"
- in the package.json with the key "packageManager" (See https://nodejs.org/api/corepack.html)`)
- in the package.json with the key "packageManager"`)
}
if (!packageManager.startsWith('pnpm@')) {
throw new Error('Invalid packageManager field in package.json')
}
if (standalone) {
return packageManager.replace('pnpm@', '@pnpm/exe@')
}
return packageManager
}

View File

@ -1,15 +1,11 @@
{
"compilerOptions": {
"target": "ES2018",
"module": "CommonJS",
"moduleResolution": "Node",
"target": "ES2022",
"module": "Node16",
"resolveJsonModule": true,
"lib": [
"ES2018",
"ES2019",
"ES2020",
"ESNext"
"ES2023"
],
"outDir": "./dist/tsc",
"preserveConstEnums": true,