mirror of
https://github.com/pnpm/action-setup.git
synced 2026-07-03 10:55:38 +00:00
Compare commits
2 Commits
24d83a90d8
...
2f88ccb3db
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f88ccb3db | ||
|
|
0ebf47130e |
BIN
dist/index.js
vendored
BIN
dist/index.js
vendored
Binary file not shown.
@ -15,7 +15,7 @@
|
|||||||
"@types/node": "^22.0.0",
|
"@types/node": "^22.0.0",
|
||||||
"expand-tilde": "^2.0.2",
|
"expand-tilde": "^2.0.2",
|
||||||
"yaml": "^2.3.4",
|
"yaml": "^2.3.4",
|
||||||
"zod": "^3.22.4"
|
"zod": "^4.4.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"esbuild": "^0.27.4",
|
"esbuild": "^0.27.4",
|
||||||
|
|||||||
@ -33,8 +33,8 @@ importers:
|
|||||||
specifier: ^2.3.4
|
specifier: ^2.3.4
|
||||||
version: 2.7.0
|
version: 2.7.0
|
||||||
zod:
|
zod:
|
||||||
specifier: ^3.22.4
|
specifier: ^4.4.3
|
||||||
version: 3.24.1
|
version: 4.4.3
|
||||||
devDependencies:
|
devDependencies:
|
||||||
esbuild:
|
esbuild:
|
||||||
specifier: ^0.27.4
|
specifier: ^0.27.4
|
||||||
@ -493,6 +493,7 @@ packages:
|
|||||||
|
|
||||||
uuid@8.3.2:
|
uuid@8.3.2:
|
||||||
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
|
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
|
||||||
|
deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
webidl-conversions@3.0.1:
|
webidl-conversions@3.0.1:
|
||||||
@ -514,8 +515,8 @@ packages:
|
|||||||
engines: {node: '>= 14'}
|
engines: {node: '>= 14'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
zod@3.24.1:
|
zod@4.4.3:
|
||||||
resolution: {integrity: sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==}
|
resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==}
|
||||||
|
|
||||||
snapshots:
|
snapshots:
|
||||||
|
|
||||||
@ -993,4 +994,4 @@ snapshots:
|
|||||||
|
|
||||||
yaml@2.7.0: {}
|
yaml@2.7.0: {}
|
||||||
|
|
||||||
zod@3.24.1: {}
|
zod@4.4.3: {}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { getInput, error } from '@actions/core'
|
import { getInput, error } from '@actions/core'
|
||||||
import { parse as parseYaml } from 'yaml'
|
import { parse as parseYaml } from 'yaml'
|
||||||
import { z, ZodError } from 'zod'
|
import * as z from 'zod'
|
||||||
|
|
||||||
const RunInstallSchema = z.object({
|
const RunInstallSchema = z.object({
|
||||||
recursive: z.boolean().optional(),
|
recursive: z.boolean().optional(),
|
||||||
@ -15,27 +15,22 @@ const RunInstallInputSchema = z.union([
|
|||||||
z.array(RunInstallSchema),
|
z.array(RunInstallSchema),
|
||||||
])
|
])
|
||||||
|
|
||||||
export type RunInstallInput = z.infer<typeof RunInstallInputSchema>
|
|
||||||
export type RunInstall = z.infer<typeof RunInstallSchema>
|
export type RunInstall = z.infer<typeof RunInstallSchema>
|
||||||
|
|
||||||
export function parseRunInstall(inputName: string): RunInstall[] {
|
export function parseRunInstall(inputName: string): RunInstall[] {
|
||||||
const input = getInput(inputName, { required: true })
|
const input = getInput(inputName, { required: true })
|
||||||
const parsedInput: unknown = parseYaml(input)
|
const parsedInput: unknown = parseYaml(input)
|
||||||
|
|
||||||
try {
|
const result = RunInstallInputSchema.safeParse(parsedInput)
|
||||||
const result: RunInstallInput = RunInstallInputSchema.parse(parsedInput)
|
if (!result.success) {
|
||||||
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}`)
|
error(`Error for input "${inputName}" = ${input}`)
|
||||||
|
error(z.prettifyError(result.error))
|
||||||
if (exception instanceof ZodError) {
|
|
||||||
error(`Errors: ${exception.errors}`)
|
|
||||||
} else {
|
|
||||||
error(`Exception: ${exception}`)
|
|
||||||
}
|
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { data } = result
|
||||||
|
if (!data) return []
|
||||||
|
if (data === true) return [{ recursive: true }]
|
||||||
|
if (Array.isArray(data)) return data
|
||||||
|
return [data]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,18 +5,18 @@
|
|||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pnpm/exe": "11.1.1"
|
"@pnpm/exe": "11.7.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@pnpm/exe": {
|
"node_modules/@pnpm/exe": {
|
||||||
"version": "11.1.1",
|
"version": "11.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/exe/-/exe-11.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/exe/-/exe-11.7.0.tgz",
|
||||||
"integrity": "sha512-5mQnDW1NCBRRWA+cnGhQO+tIrfSfWm3/IyGxU88LnT+tzNW5UrwwKfjsnnYJToyAjIfdfEJtJKUxCvP+mhA+nQ==",
|
"integrity": "sha512-3CujpSSp2PIDE0pwu7mWSdjhdDqaZa7OppVooECWWaNEoA/z66s9FZts1MhDO+2yq1XER4gBHh84DVbFN/r1rA==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@reflink/reflink": "0.1.19",
|
"@reflink/reflink": "0.1.19",
|
||||||
"detect-libc": "^2.0.3"
|
"detect-libc": "^2.1.2"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"pn": "pn",
|
"pn": "pn",
|
||||||
@ -28,19 +28,19 @@
|
|||||||
"url": "https://opencollective.com/pnpm"
|
"url": "https://opencollective.com/pnpm"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@pnpm/linux-arm64": "11.1.1",
|
"@pnpm/linux-arm64": "11.7.0",
|
||||||
"@pnpm/linux-x64": "11.1.1",
|
"@pnpm/linux-x64": "11.7.0",
|
||||||
"@pnpm/linuxstatic-arm64": "11.1.1",
|
"@pnpm/linuxstatic-arm64": "11.7.0",
|
||||||
"@pnpm/linuxstatic-x64": "11.1.1",
|
"@pnpm/linuxstatic-x64": "11.7.0",
|
||||||
"@pnpm/macos-arm64": "11.1.1",
|
"@pnpm/macos-arm64": "11.7.0",
|
||||||
"@pnpm/win-arm64": "11.1.1",
|
"@pnpm/win-arm64": "11.7.0",
|
||||||
"@pnpm/win-x64": "11.1.1"
|
"@pnpm/win-x64": "11.7.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@pnpm/linux-arm64": {
|
"node_modules/@pnpm/linux-arm64": {
|
||||||
"version": "11.1.1",
|
"version": "11.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/linux-arm64/-/linux-arm64-11.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/linux-arm64/-/linux-arm64-11.7.0.tgz",
|
||||||
"integrity": "sha512-u9hs51XV0/gU5LLfNLoQsozGKIxNjxsh/0xPr+8Hny0M38psa4lBtwFvarL2bLToPIrtueQYi65LdlzRxITRyg==",
|
"integrity": "sha512-ANTX2SlMO+d2y/4bYQhHCwHPX7gSSADJ5+pMUIiDFzIsybnFFaJdZboaFfq9NOxCbETcnDxqZ95Rz3+NHx1JIw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -54,9 +54,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@pnpm/linux-x64": {
|
"node_modules/@pnpm/linux-x64": {
|
||||||
"version": "11.1.1",
|
"version": "11.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/linux-x64/-/linux-x64-11.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/linux-x64/-/linux-x64-11.7.0.tgz",
|
||||||
"integrity": "sha512-yQO9i57oyJmIG22BjV7sqLUT2syKQohiku8yNZRgp7M6wsVkikpVLLVSpBifQnrI/P/roueKnWSUEESH1aPaoA==",
|
"integrity": "sha512-fr75tqixXoS8cnA81HQIomjOGEPnsOsd3xCDL5pMNY5raOXbKurtgRV+RjATvjxlJxSLIVFKegABlxAiB7q72A==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -70,9 +70,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@pnpm/linuxstatic-arm64": {
|
"node_modules/@pnpm/linuxstatic-arm64": {
|
||||||
"version": "11.1.1",
|
"version": "11.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/linuxstatic-arm64/-/linuxstatic-arm64-11.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/linuxstatic-arm64/-/linuxstatic-arm64-11.7.0.tgz",
|
||||||
"integrity": "sha512-FUZB8L9Z8L5m88G0RTx5AsHFr5yUQPW+28zQdTNUWxiLwj11FW/fOLodYdcNYHdNJFepsZyqt3aRnpiqIdZb2g==",
|
"integrity": "sha512-Q++pgzvXkGeqnVRl26/uqmpMGdttQus0rGyL3XIfYGLCi8ZfajYUaCKdZID2MH7+CNOuugWDdFDup3r7BR7Rfg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -89,9 +89,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@pnpm/linuxstatic-x64": {
|
"node_modules/@pnpm/linuxstatic-x64": {
|
||||||
"version": "11.1.1",
|
"version": "11.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/linuxstatic-x64/-/linuxstatic-x64-11.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/linuxstatic-x64/-/linuxstatic-x64-11.7.0.tgz",
|
||||||
"integrity": "sha512-I/z56hfa1zM5F/Unup/1NrgsA+dcptsKQ2TjJLFz3wHKDx0RLrfF7DB0Rkpnr5IoAZ33v0GFZjlGhkOtc9VFGw==",
|
"integrity": "sha512-z1+exW6ocU/rmOvJnmU3FUBJYaryCUqFoaXN6KZW5BqTj7BPJb7HJcAyXRlirNZMJlEiUY5rXbfStGPQJhGsVA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -108,9 +108,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@pnpm/macos-arm64": {
|
"node_modules/@pnpm/macos-arm64": {
|
||||||
"version": "11.1.1",
|
"version": "11.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/macos-arm64/-/macos-arm64-11.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/macos-arm64/-/macos-arm64-11.7.0.tgz",
|
||||||
"integrity": "sha512-YQu6fC27F4jTIpXhF+4PdzOV7uSnVVG9KUxj5W+AFj0XFlUvBw+I1NsoPCY6uV1nccxWpIAZOTZtSj8+hWPb8w==",
|
"integrity": "sha512-gD34/k3JT5oab4BYaqrUor3e4VdwXvkfLNlEI+lvDtX1MHT+2Nauc9p9NsQnpn1zE8blQEflzbF8wAUQ6Dmvkw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -124,9 +124,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@pnpm/win-arm64": {
|
"node_modules/@pnpm/win-arm64": {
|
||||||
"version": "11.1.1",
|
"version": "11.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/win-arm64/-/win-arm64-11.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/win-arm64/-/win-arm64-11.7.0.tgz",
|
||||||
"integrity": "sha512-2HvZut3IcKPxzIfOjBJ4677PaLIh57mWccL86O+q71QhO5emnQvht0CE19IoEyUIOEe1WjlN+Su/dD5k6CuGyg==",
|
"integrity": "sha512-hRTcDmm2j7KoRwbqNo0rUAu9A1kVJN98Eob7H09U0uPJbEMax85JGOmERkT3Lf6HjVJuFNBvfaJ3OTI3HmlVGg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -140,9 +140,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@pnpm/win-x64": {
|
"node_modules/@pnpm/win-x64": {
|
||||||
"version": "11.1.1",
|
"version": "11.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pnpm/win-x64/-/win-x64-11.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@pnpm/win-x64/-/win-x64-11.7.0.tgz",
|
||||||
"integrity": "sha512-QXBIBErgPhGLovOVzTRIpHsejFKebyqlcF3fea/TfH87gkhN5yWH0WuTPRBoOWvpk6aNhjDW4RPUMx8RaPqxjw==",
|
"integrity": "sha512-r/1NuKY7Z+6ZXVIzVrUEMj6TTEBdR63geV4Rlm8HKEhgQTdxyIsJoqV3FJGqoyzbRaScObqAwRfMaK9dskPddQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
|||||||
@ -5,13 +5,13 @@
|
|||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pnpm": "11.1.1"
|
"pnpm": "11.7.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/pnpm": {
|
"node_modules/pnpm": {
|
||||||
"version": "11.1.1",
|
"version": "11.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/pnpm/-/pnpm-11.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/pnpm/-/pnpm-11.7.0.tgz",
|
||||||
"integrity": "sha512-0f319zxhe2T6GlaoHDyN/g6WbjOmAQqiVrUXrne+Idk+Ba/8DeGoOw5PKdVp9otEaujwaM1yR8C7PfD7TXvfmg==",
|
"integrity": "sha512-GcyFLBIMcSV2DyRD7mvgyltA+fUFmN4aCaHxd1A+AQ5Xwjx3ZG4B52HeWb+HT7IqM5jDOrlpH8E+uUa28PTWIA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
"pn": "bin/pnpm.mjs",
|
"pn": "bin/pnpm.mjs",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user