Compare commits
14
Commits
d2f1cb9c1a
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57004edb17 | ||
|
|
9acad60d71 | ||
|
|
610706a64d | ||
|
|
cbd576b4de | ||
|
|
9138f03d35 | ||
|
|
e8a9b0906d | ||
|
|
544be86f08 | ||
|
|
97d2597552 | ||
|
|
4c45d89c83 | ||
|
|
d70ee1e8b8 | ||
|
|
bffd6ee278 | ||
|
|
0643b8ca01 | ||
|
|
26ef54930a | ||
|
|
e7e7ee53f6 |
@@ -16,7 +16,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Check Authentication
|
- name: Check Authentication
|
||||||
uses: ./check-token
|
uses: ./check-token
|
||||||
@@ -34,7 +34,8 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
repository: 'gohugoio/hugo'
|
repository: 'gohugoio/hugo'
|
||||||
file-name: '~hugo_extended_[^a-z]'
|
file-name: '~hugo_extended_[^a-z].*{{SYSTEM}}-{{ARCH}}'
|
||||||
|
file-type: 'archive'
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
update-cache: 'always'
|
update-cache: 'always'
|
||||||
|
|
||||||
@@ -42,6 +43,7 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
repository: 'rclone/rclone'
|
repository: 'rclone/rclone'
|
||||||
|
file-type: 'archive'
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
update-cache: 'always'
|
update-cache: 'always'
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
# Let's test the token first.
|
# Let's test the token first.
|
||||||
- name: Check Authentication
|
- name: Check Authentication
|
||||||
@@ -31,12 +31,14 @@ jobs:
|
|||||||
uses: skoszewski/setup-github-release@v1
|
uses: skoszewski/setup-github-release@v1
|
||||||
with:
|
with:
|
||||||
repository: 'gohugoio/hugo'
|
repository: 'gohugoio/hugo'
|
||||||
file-name: '~hugo_extended_[^a-z]'
|
file-name: '~hugo_extended_[^a-z].*{{SYSTEM}}-{{ARCH}}'
|
||||||
|
file-type: 'archive'
|
||||||
|
|
||||||
- name: Setup RClone
|
- name: Setup RClone
|
||||||
uses: skoszewski/setup-github-release@v1
|
uses: skoszewski/setup-github-release@v1
|
||||||
with:
|
with:
|
||||||
repository: 'rclone/rclone'
|
repository: 'rclone/rclone'
|
||||||
|
file-type: 'archive'
|
||||||
|
|
||||||
- name: Verify Installation
|
- name: Verify Installation
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -117,15 +117,10 @@ The following inputs are available for the GitHub Action, and as options for the
|
|||||||
- `binary-name` (optional): The name or regex pattern (prefixed with `~`) of the binary to search for within the downloaded asset. Defaults to the repository name.
|
- `binary-name` (optional): The name or regex pattern (prefixed with `~`) of the binary to search for within the downloaded asset. Defaults to the repository name.
|
||||||
- `file-type` (optional): Asset type selector.
|
- `file-type` (optional): Asset type selector.
|
||||||
|
|
||||||
- `archive`: matches `.zip`, `.tar.gz`, `.tgz`.
|
- known values: `archive`, `package`, `linux`, `macos`, `targz`.
|
||||||
- `package`: matches `.deb`, `.pkg`, `.rpm`.
|
- custom values:
|
||||||
- short forms: `zip`, `gzip`, `gz`, `tar`, `tar.gz`, `tgz`, `deb`, `pkg`, `rpm`.
|
`~<regex>` for regular expression matching (anchored to the end of file name), or
|
||||||
|
extension form such as `zip` or `.tar.gz`.
|
||||||
If not provided, selection defaults to OS-aware combined package/archive patterns:
|
|
||||||
|
|
||||||
- Linux: `.deb`, `.rpm`, `.zip`, `.tar.gz`, `.tgz`
|
|
||||||
- macOS: `.pkg`, `.zip`, `.tar.gz`, `.tgz`
|
|
||||||
- other: `.zip`, `.tar.gz`, `.tgz`
|
|
||||||
|
|
||||||
- `install-path` (optional, CLI only): Custom installation directory for the CLI tool.
|
- `install-path` (optional, CLI only): Custom installation directory for the CLI tool.
|
||||||
- `update-cache` (optional, default: 'false', Action only): When set to 'false', the action will use the cached version of the tool if it is already available. If set to 'true', the action will check the latest release and update the cache if a newer version is found. If set to 'always', it will always download and install, updating the cache regardless.
|
- `update-cache` (optional, default: 'false', Action only): When set to 'false', the action will use the cached version of the tool if it is already available. If set to 'true', the action will check the latest release and update the cache if a newer version is found. If set to 'always', it will always download and install, updating the cache regardless.
|
||||||
@@ -151,7 +146,8 @@ Options:
|
|||||||
-a, --app-name <name> Application name (optional, for output messages)
|
-a, --app-name <name> Application name (optional, for output messages)
|
||||||
-f, --file-name <name> Asset file name or regex pattern (prefixed with ~)
|
-f, --file-name <name> Asset file name or regex pattern (prefixed with ~)
|
||||||
-b, --binary-name <name> Binary name (supports source:destination form)
|
-b, --binary-name <name> Binary name (supports source:destination form)
|
||||||
-t, --file-type <type> archive|package|zip|gzip|gz|tar|tar.gz|tgz|deb|pkg|rpm
|
-t, --file-type <type> Known: archive|package|linux|macos|targz
|
||||||
|
Or custom: ~<regex> (end-of-string match) or extension (e.g. zip, .tar.gz)
|
||||||
-p, --install-path <path> Custom installation directory
|
-p, --install-path <path> Custom installation directory
|
||||||
-o, --output-directory <path>
|
-o, --output-directory <path>
|
||||||
Only download selected asset to the specified directory
|
Only download selected asset to the specified directory
|
||||||
@@ -210,7 +206,11 @@ The list of assets from the latest release is filtered based on the following ru
|
|||||||
- If it already ends with `$` or includes all three placeholders, the tool uses it as-is to match the asset name using regex.
|
- If it already ends with `$` or includes all three placeholders, the tool uses it as-is to match the asset name using regex.
|
||||||
- If only `{{SYSTEM}}` and `{{ARCH}}` placeholders are included, the tool appends `.*{{EXT_PATTERN}}$`.
|
- If only `{{SYSTEM}}` and `{{ARCH}}` placeholders are included, the tool appends `.*{{EXT_PATTERN}}$`.
|
||||||
|
|
||||||
4. If `file-type` is provided, supported values are: `archive`, `package`, `zip`, `gzip`, `gz`, `tar`, `tar.gz`, `tgz`, `deb`, `pkg`, `rpm`.
|
4. If `file-type` is provided:
|
||||||
|
|
||||||
|
- known values are: `archive`, `package`, `linux`, `macos`, `targz`.
|
||||||
|
- `~<regex>` is treated as a regex and matched at the end of the file name.
|
||||||
|
- any other value is treated as an extension selector (for example `zip` or `.tar.gz`).
|
||||||
|
|
||||||
5. The tool applies the constructed regex pattern to filter the assets from the latest release.
|
5. The tool applies the constructed regex pattern to filter the assets from the latest release.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ inputs:
|
|||||||
description: 'The name or regex pattern (prefixed with ~) of the binary to search for within the asset. Defaults to the repository name.'
|
description: 'The name or regex pattern (prefixed with ~) of the binary to search for within the asset. Defaults to the repository name.'
|
||||||
required: false
|
required: false
|
||||||
file-type:
|
file-type:
|
||||||
description: 'Asset type selector: archive, package, zip, gzip, gz, tar, tar.gz, tgz, deb, pkg, rpm.'
|
description: 'Asset type selector. Known values: archive, package, linux, macos, targz. Custom values: ~<regex> or extension (e.g. zip, .tar.gz).'
|
||||||
required: false
|
required: false
|
||||||
update-cache:
|
update-cache:
|
||||||
description: 'How to handle the tool cache (false, true, or always). Defaults to false.'
|
description: 'How to handle the tool cache (false, true, or always). Defaults to false.'
|
||||||
|
|||||||
Vendored
+9681
-10291
File diff suppressed because one or more lines are too long
Vendored
+12522
-11046
File diff suppressed because one or more lines are too long
Generated
+164
-173
@@ -1,84 +1,84 @@
|
|||||||
{
|
{
|
||||||
"name": "install-github-release",
|
"name": "@koszewscy/install-github-release",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "install-github-release",
|
"name": "@koszewscy/install-github-release",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.0",
|
"@actions/core": "3.0.0",
|
||||||
"@actions/tool-cache": "^2.0.2",
|
"@actions/tool-cache": "4.0.0",
|
||||||
"commander": "^14.0.3",
|
"commander": "14.0.3",
|
||||||
"minimatch": "^10.2.5"
|
"minimatch": "10.2.5"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"check-github-token": "dist/check-token.js",
|
"check-github-token": "dist/check-token.js",
|
||||||
"install-github-release": "dist/cli.js"
|
"install-github-release": "dist/cli.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^25.0.0",
|
"@types/node": "^24",
|
||||||
"esbuild": "^0.27.2",
|
"esbuild": "^0.28.1",
|
||||||
"typescript": "^5.9.0"
|
"typescript": "6.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=24"
|
"node": ">=24.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/core": {
|
"node_modules/@actions/core": {
|
||||||
"version": "1.11.1",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.0.tgz",
|
||||||
"integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==",
|
"integrity": "sha512-zYt6cz+ivnTmiT/ksRVriMBOiuoUpDCJJlZ5KPl2/FRdvwU3f7MPh9qftvbkXJThragzUZieit2nyHUyw53Seg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^3.0.0",
|
||||||
"@actions/http-client": "^2.0.1"
|
"@actions/http-client": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/exec": {
|
"node_modules/@actions/exec": {
|
||||||
"version": "1.1.1",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-3.0.0.tgz",
|
||||||
"integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
|
"integrity": "sha512-6xH/puSoNBXb72VPlZVm7vQ+svQpFyA96qdDBvhB8eNZOE8LtPf9L4oAsfzK/crCL8YZ+19fKYVnM63Sl+Xzlw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/io": "^1.0.1"
|
"@actions/io": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/http-client": {
|
"node_modules/@actions/http-client": {
|
||||||
"version": "2.2.3",
|
"version": "4.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.1.tgz",
|
||||||
"integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==",
|
"integrity": "sha512-+Nvd1ImaOZBSoPbsUtEhv+1z99H12xzncCkz0a3RuehINE81FZSe2QTj3uvAPTcJX/SCzUQHQ0D1GrPMbrPitg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6",
|
"tunnel": "^0.0.6",
|
||||||
"undici": "^5.25.4"
|
"undici": "^6.23.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/io": {
|
"node_modules/@actions/io": {
|
||||||
"version": "1.1.3",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz",
|
||||||
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==",
|
"integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@actions/tool-cache": {
|
"node_modules/@actions/tool-cache": {
|
||||||
"version": "2.0.2",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-4.0.0.tgz",
|
||||||
"integrity": "sha512-fBhNNOWxuoLxztQebpOaWu6WeVmuwa77Z+DxIZ1B+OYvGkGQon6kTVg6Z32Cb13WCuw0szqonK+hh03mJV7Z6w==",
|
"integrity": "sha512-L8P9HbXvpvqjZDveb/fdsa55IVC0trfPgQ4ZwGo6r5af6YDVdM9vMGPZ7rgY2fAT9gGj4PSYd6bYlg3p3jD78A==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^3.0.0",
|
||||||
"@actions/exec": "^1.0.0",
|
"@actions/exec": "^3.0.0",
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^4.0.0",
|
||||||
"@actions/io": "^1.1.1",
|
"@actions/io": "^3.0.0",
|
||||||
"semver": "^6.1.0"
|
"semver": "^7.7.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/aix-ppc64": {
|
"node_modules/@esbuild/aix-ppc64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz",
|
||||||
"integrity": "sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==",
|
"integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
@@ -93,9 +93,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/android-arm": {
|
"node_modules/@esbuild/android-arm": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz",
|
||||||
"integrity": "sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==",
|
"integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -110,9 +110,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/android-arm64": {
|
"node_modules/@esbuild/android-arm64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz",
|
||||||
"integrity": "sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==",
|
"integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -127,9 +127,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/android-x64": {
|
"node_modules/@esbuild/android-x64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz",
|
||||||
"integrity": "sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==",
|
"integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -144,9 +144,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/darwin-arm64": {
|
"node_modules/@esbuild/darwin-arm64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz",
|
||||||
"integrity": "sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==",
|
"integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -161,9 +161,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/darwin-x64": {
|
"node_modules/@esbuild/darwin-x64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz",
|
||||||
"integrity": "sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==",
|
"integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -178,9 +178,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/freebsd-arm64": {
|
"node_modules/@esbuild/freebsd-arm64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz",
|
||||||
"integrity": "sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==",
|
"integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -195,9 +195,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/freebsd-x64": {
|
"node_modules/@esbuild/freebsd-x64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz",
|
||||||
"integrity": "sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==",
|
"integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -212,9 +212,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-arm": {
|
"node_modules/@esbuild/linux-arm": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz",
|
||||||
"integrity": "sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==",
|
"integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -229,9 +229,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-arm64": {
|
"node_modules/@esbuild/linux-arm64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz",
|
||||||
"integrity": "sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==",
|
"integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -246,9 +246,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-ia32": {
|
"node_modules/@esbuild/linux-ia32": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz",
|
||||||
"integrity": "sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==",
|
"integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@@ -263,9 +263,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-loong64": {
|
"node_modules/@esbuild/linux-loong64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz",
|
||||||
"integrity": "sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==",
|
"integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"loong64"
|
"loong64"
|
||||||
],
|
],
|
||||||
@@ -280,9 +280,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-mips64el": {
|
"node_modules/@esbuild/linux-mips64el": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz",
|
||||||
"integrity": "sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==",
|
"integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"mips64el"
|
"mips64el"
|
||||||
],
|
],
|
||||||
@@ -297,9 +297,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-ppc64": {
|
"node_modules/@esbuild/linux-ppc64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz",
|
||||||
"integrity": "sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==",
|
"integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
@@ -314,9 +314,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-riscv64": {
|
"node_modules/@esbuild/linux-riscv64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz",
|
||||||
"integrity": "sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==",
|
"integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
@@ -331,9 +331,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-s390x": {
|
"node_modules/@esbuild/linux-s390x": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz",
|
||||||
"integrity": "sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==",
|
"integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
@@ -348,9 +348,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/linux-x64": {
|
"node_modules/@esbuild/linux-x64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz",
|
||||||
"integrity": "sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==",
|
"integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -365,9 +365,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/netbsd-arm64": {
|
"node_modules/@esbuild/netbsd-arm64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz",
|
||||||
"integrity": "sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==",
|
"integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -382,9 +382,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/netbsd-x64": {
|
"node_modules/@esbuild/netbsd-x64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz",
|
||||||
"integrity": "sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==",
|
"integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -399,9 +399,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/openbsd-arm64": {
|
"node_modules/@esbuild/openbsd-arm64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz",
|
||||||
"integrity": "sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==",
|
"integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -416,9 +416,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/openbsd-x64": {
|
"node_modules/@esbuild/openbsd-x64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz",
|
||||||
"integrity": "sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==",
|
"integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -433,9 +433,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/openharmony-arm64": {
|
"node_modules/@esbuild/openharmony-arm64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz",
|
||||||
"integrity": "sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==",
|
"integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -450,9 +450,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/sunos-x64": {
|
"node_modules/@esbuild/sunos-x64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz",
|
||||||
"integrity": "sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==",
|
"integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -467,9 +467,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/win32-arm64": {
|
"node_modules/@esbuild/win32-arm64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz",
|
||||||
"integrity": "sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==",
|
"integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -484,9 +484,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/win32-ia32": {
|
"node_modules/@esbuild/win32-ia32": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz",
|
||||||
"integrity": "sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==",
|
"integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@@ -501,9 +501,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@esbuild/win32-x64": {
|
"node_modules/@esbuild/win32-x64": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz",
|
||||||
"integrity": "sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==",
|
"integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -517,23 +517,14 @@
|
|||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@fastify/busboy": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
|
|
||||||
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "25.0.6",
|
"version": "24.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.2.tgz",
|
||||||
"integrity": "sha512-NNu0sjyNxpoiW3YuVFfNz7mxSQ+S4X2G28uqg2s+CzoqoQjLPsWSbsFFyztIAqt2vb8kfEAsJNepMGPTxFDx3Q==",
|
"integrity": "sha512-fRa09kZTgu8o71KFcDjUFuc7F+dEbZYZmkI0mg5YBTRs0yMKjYHsq/c0urDKeDb+D5qVgXOdFcuu+DZPKOITwA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~7.16.0"
|
"undici-types": "~7.18.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/balanced-match": {
|
"node_modules/balanced-match": {
|
||||||
@@ -546,9 +537,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/brace-expansion": {
|
"node_modules/brace-expansion": {
|
||||||
"version": "5.0.5",
|
"version": "5.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
|
||||||
"integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==",
|
"integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"balanced-match": "^4.0.2"
|
"balanced-match": "^4.0.2"
|
||||||
@@ -567,9 +558,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/esbuild": {
|
"node_modules/esbuild": {
|
||||||
"version": "0.27.2",
|
"version": "0.28.1",
|
||||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.2.tgz",
|
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz",
|
||||||
"integrity": "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==",
|
"integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -580,32 +571,32 @@
|
|||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@esbuild/aix-ppc64": "0.27.2",
|
"@esbuild/aix-ppc64": "0.28.1",
|
||||||
"@esbuild/android-arm": "0.27.2",
|
"@esbuild/android-arm": "0.28.1",
|
||||||
"@esbuild/android-arm64": "0.27.2",
|
"@esbuild/android-arm64": "0.28.1",
|
||||||
"@esbuild/android-x64": "0.27.2",
|
"@esbuild/android-x64": "0.28.1",
|
||||||
"@esbuild/darwin-arm64": "0.27.2",
|
"@esbuild/darwin-arm64": "0.28.1",
|
||||||
"@esbuild/darwin-x64": "0.27.2",
|
"@esbuild/darwin-x64": "0.28.1",
|
||||||
"@esbuild/freebsd-arm64": "0.27.2",
|
"@esbuild/freebsd-arm64": "0.28.1",
|
||||||
"@esbuild/freebsd-x64": "0.27.2",
|
"@esbuild/freebsd-x64": "0.28.1",
|
||||||
"@esbuild/linux-arm": "0.27.2",
|
"@esbuild/linux-arm": "0.28.1",
|
||||||
"@esbuild/linux-arm64": "0.27.2",
|
"@esbuild/linux-arm64": "0.28.1",
|
||||||
"@esbuild/linux-ia32": "0.27.2",
|
"@esbuild/linux-ia32": "0.28.1",
|
||||||
"@esbuild/linux-loong64": "0.27.2",
|
"@esbuild/linux-loong64": "0.28.1",
|
||||||
"@esbuild/linux-mips64el": "0.27.2",
|
"@esbuild/linux-mips64el": "0.28.1",
|
||||||
"@esbuild/linux-ppc64": "0.27.2",
|
"@esbuild/linux-ppc64": "0.28.1",
|
||||||
"@esbuild/linux-riscv64": "0.27.2",
|
"@esbuild/linux-riscv64": "0.28.1",
|
||||||
"@esbuild/linux-s390x": "0.27.2",
|
"@esbuild/linux-s390x": "0.28.1",
|
||||||
"@esbuild/linux-x64": "0.27.2",
|
"@esbuild/linux-x64": "0.28.1",
|
||||||
"@esbuild/netbsd-arm64": "0.27.2",
|
"@esbuild/netbsd-arm64": "0.28.1",
|
||||||
"@esbuild/netbsd-x64": "0.27.2",
|
"@esbuild/netbsd-x64": "0.28.1",
|
||||||
"@esbuild/openbsd-arm64": "0.27.2",
|
"@esbuild/openbsd-arm64": "0.28.1",
|
||||||
"@esbuild/openbsd-x64": "0.27.2",
|
"@esbuild/openbsd-x64": "0.28.1",
|
||||||
"@esbuild/openharmony-arm64": "0.27.2",
|
"@esbuild/openharmony-arm64": "0.28.1",
|
||||||
"@esbuild/sunos-x64": "0.27.2",
|
"@esbuild/sunos-x64": "0.28.1",
|
||||||
"@esbuild/win32-arm64": "0.27.2",
|
"@esbuild/win32-arm64": "0.28.1",
|
||||||
"@esbuild/win32-ia32": "0.27.2",
|
"@esbuild/win32-ia32": "0.28.1",
|
||||||
"@esbuild/win32-x64": "0.27.2"
|
"@esbuild/win32-x64": "0.28.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/minimatch": {
|
"node_modules/minimatch": {
|
||||||
@@ -624,12 +615,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "6.3.1",
|
"version": "7.8.5",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
|
||||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
"integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"bin": {
|
"bin": {
|
||||||
"semver": "bin/semver.js"
|
"semver": "bin/semver.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tunnel": {
|
"node_modules/tunnel": {
|
||||||
@@ -642,9 +636,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.9.3",
|
"version": "6.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.2.tgz",
|
||||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
"integrity": "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
@@ -656,21 +650,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "5.29.0",
|
"version": "6.27.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.27.0.tgz",
|
||||||
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
|
"integrity": "sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
|
||||||
"@fastify/busboy": "^2.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0"
|
"node": ">=18.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici-types": {
|
"node_modules/undici-types": {
|
||||||
"version": "7.16.0",
|
"version": "7.18.2",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
|
||||||
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
|
"integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-9
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "install-github-release",
|
"name": "@koszewscy/install-github-release",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "A GitHub Action and CLI tool to download and install binaries from GitHub releases",
|
"description": "A GitHub Action and CLI tool to download and install binaries from GitHub releases",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
@@ -22,17 +22,20 @@
|
|||||||
"author": "Sławomir Koszewski",
|
"author": "Sławomir Koszewski",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=24"
|
"node": ">=24.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.0",
|
"@actions/core": "3.0.0",
|
||||||
"@actions/tool-cache": "^2.0.2",
|
"@actions/tool-cache": "4.0.0",
|
||||||
"commander": "^14.0.3",
|
"commander": "14.0.3",
|
||||||
"minimatch": "^10.2.5"
|
"minimatch": "10.2.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^25.0.0",
|
"@types/node": "^24",
|
||||||
"esbuild": "^0.27.2",
|
"esbuild": "^0.28.1",
|
||||||
"typescript": "^5.9.0"
|
"typescript": "6.0.2"
|
||||||
|
},
|
||||||
|
"allowScripts": {
|
||||||
|
"esbuild@0.28.1": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-29
@@ -1,13 +1,13 @@
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as os from 'os';
|
import * as os from 'os';
|
||||||
import { spawnSync } from 'child_process';
|
|
||||||
import { Command } from 'commander';
|
import { Command } from 'commander';
|
||||||
import { getPlatformInfo } from './core/platform';
|
import { getPlatformInfo } from './core/platform';
|
||||||
import { getMatchingAsset } from './core/matcher';
|
import { getMatchingAsset } from './core/matcher';
|
||||||
import { findBinary } from './core/finder';
|
import { findBinary } from './core/finder';
|
||||||
import { fetchLatestRelease, fetchLatestReleaseRaw, downloadAsset } from './core/downloader';
|
import { fetchLatestRelease, fetchLatestReleaseRaw, downloadAsset } from './core/downloader';
|
||||||
import { extractAsset } from './core/extractor';
|
import { extractAsset } from './core/extractor';
|
||||||
|
import { installSystemPackage } from './core/installer';
|
||||||
|
|
||||||
interface CliOptions {
|
interface CliOptions {
|
||||||
appName?: string;
|
appName?: string;
|
||||||
@@ -58,31 +58,6 @@ function getInstallDir(installPath?: string): string {
|
|||||||
return '/usr/local/bin';
|
return '/usr/local/bin';
|
||||||
}
|
}
|
||||||
|
|
||||||
function installSystemPackage(downloadPath: string): void {
|
|
||||||
const fileName = path.basename(downloadPath).toLowerCase();
|
|
||||||
|
|
||||||
const command: { binary: string; args: string[] } | undefined = fileName.endsWith('.deb')
|
|
||||||
? { binary: 'dpkg', args: ['-i', downloadPath] }
|
|
||||||
: fileName.endsWith('.pkg')
|
|
||||||
? { binary: 'installer', args: ['-pkg', downloadPath, '-target', '/'] }
|
|
||||||
: fileName.endsWith('.rpm')
|
|
||||||
? { binary: 'rpm', args: ['-i', downloadPath] }
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
if (!command) {
|
|
||||||
throw new Error(`Unsupported package type: ${fileName}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const isRoot = process.getuid && process.getuid() === 0;
|
|
||||||
const commandToRun = isRoot ? command.binary : 'sudo';
|
|
||||||
const argsToRun = isRoot ? command.args : [command.binary, ...command.args];
|
|
||||||
|
|
||||||
const result = spawnSync(commandToRun, argsToRun, { stdio: 'inherit' });
|
|
||||||
if (result.status !== 0) {
|
|
||||||
throw new Error(`Failed to install package using ${commandToRun} ${argsToRun.join(' ')}.`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
let tempDir: string | undefined;
|
let tempDir: string | undefined;
|
||||||
const program = new Command();
|
const program = new Command();
|
||||||
@@ -180,7 +155,7 @@ async function run() {
|
|||||||
|
|
||||||
console.log(`Fetching latest release for ${repository}...`);
|
console.log(`Fetching latest release for ${repository}...`);
|
||||||
const release = await fetchLatestRelease(repository, token);
|
const release = await fetchLatestRelease(repository, token);
|
||||||
const asset = getMatchingAsset(release.assets, platformInfo, options.fileName, options.fileType);
|
const asset = getMatchingAsset(release.assets, platformInfo, options.fileName, options.fileType, options.dryRun);
|
||||||
|
|
||||||
const version = release.tag_name.replace(/^v/i, '');
|
const version = release.tag_name.replace(/^v/i, '');
|
||||||
const downloadUrl = asset.browser_download_url;
|
const downloadUrl = asset.browser_download_url;
|
||||||
@@ -214,13 +189,13 @@ async function run() {
|
|||||||
console.log(`Extracting ${asset.name}...`);
|
console.log(`Extracting ${asset.name}...`);
|
||||||
await extractAsset(downloadPath, extractDir);
|
await extractAsset(downloadPath, extractDir);
|
||||||
|
|
||||||
let binaryPattern: string | RegExp;
|
let binaryPattern: string;
|
||||||
if (binarySource.startsWith('~')) {
|
if (binarySource.startsWith('~')) {
|
||||||
const binaryRegex = binarySource
|
const binaryRegex = binarySource
|
||||||
.substring(1)
|
.substring(1)
|
||||||
.replace(/{{SYSTEM}}/g, platformInfo.systemPattern)
|
.replace(/{{SYSTEM}}/g, platformInfo.systemPattern)
|
||||||
.replace(/{{ARCH}}/g, platformInfo.archPattern);
|
.replace(/{{ARCH}}/g, platformInfo.archPattern);
|
||||||
binaryPattern = new RegExp(binaryRegex, 'i');
|
binaryPattern = `~${binaryRegex}`;
|
||||||
} else {
|
} else {
|
||||||
binaryPattern = binarySource
|
binaryPattern = binarySource
|
||||||
.replace(/{{SYSTEM}}/g, platformInfo.system)
|
.replace(/{{SYSTEM}}/g, platformInfo.system)
|
||||||
|
|||||||
+4
-3
@@ -1,7 +1,8 @@
|
|||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
export function findBinary(dir: string, pattern: string | RegExp, debug: boolean, logger: (msg: string) => void): string | undefined {
|
export function findBinary(dir: string, pattern: string, debug: boolean, logger: (msg: string) => void): string | undefined {
|
||||||
|
const regex = pattern.startsWith('~') ? new RegExp(pattern.substring(1), 'i') : undefined;
|
||||||
const items = fs.readdirSync(dir);
|
const items = fs.readdirSync(dir);
|
||||||
if (debug) {
|
if (debug) {
|
||||||
logger(`Searching for binary in ${dir}...`);
|
logger(`Searching for binary in ${dir}...`);
|
||||||
@@ -16,8 +17,8 @@ export function findBinary(dir: string, pattern: string | RegExp, debug: boolean
|
|||||||
if (found) return found;
|
if (found) return found;
|
||||||
} else {
|
} else {
|
||||||
let isMatch = false;
|
let isMatch = false;
|
||||||
if (pattern instanceof RegExp) {
|
if (regex) {
|
||||||
isMatch = pattern.test(item);
|
isMatch = regex.test(item);
|
||||||
} else {
|
} else {
|
||||||
isMatch = item === pattern;
|
isMatch = item === pattern;
|
||||||
// On Windows, also check for .exe extension if the pattern doesn't have it
|
// On Windows, also check for .exe extension if the pattern doesn't have it
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import * as path from 'path';
|
||||||
|
import { spawnSync } from 'child_process';
|
||||||
|
|
||||||
|
export function installSystemPackage(downloadPath: string): void {
|
||||||
|
const fileName = path.basename(downloadPath).toLowerCase();
|
||||||
|
|
||||||
|
const command: { binary: string; args: string[] } | undefined = fileName.endsWith('.deb')
|
||||||
|
? { binary: 'dpkg', args: ['-i', downloadPath] }
|
||||||
|
: fileName.endsWith('.pkg')
|
||||||
|
? { binary: 'installer', args: ['-pkg', downloadPath, '-target', '/'] }
|
||||||
|
: fileName.endsWith('.rpm')
|
||||||
|
? { binary: 'rpm', args: ['-i', downloadPath] }
|
||||||
|
: undefined;
|
||||||
|
|
||||||
|
if (!command) {
|
||||||
|
throw new Error(`Unsupported package type: ${fileName}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const isRoot = process.getuid && process.getuid() === 0;
|
||||||
|
const commandToRun = isRoot ? command.binary : 'sudo';
|
||||||
|
const argsToRun = isRoot ? command.args : [command.binary, ...command.args];
|
||||||
|
|
||||||
|
const result = spawnSync(commandToRun, argsToRun, { stdio: 'inherit' });
|
||||||
|
if (result.status !== 0) {
|
||||||
|
throw new Error(`Failed to install package using ${commandToRun} ${argsToRun.join(' ')}.`);
|
||||||
|
}
|
||||||
|
}
|
||||||
+19
-6
@@ -11,9 +11,22 @@ const knownFileTypes: Record<string, string> = {
|
|||||||
targz: '*.{tgz,tar.gz}',
|
targz: '*.{tgz,tar.gz}',
|
||||||
};
|
};
|
||||||
|
|
||||||
function filterByRegex(assets: ReleaseAsset[], pattern: string): ReleaseAsset[] {
|
function debugAssetList(label: string, assets: ReleaseAsset[]): void {
|
||||||
|
console.debug(label);
|
||||||
|
for (const asset of assets) {
|
||||||
|
console.debug(`- ${asset.name}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function filterByRegex(assets: ReleaseAsset[], pattern: string, dryRun?: boolean): ReleaseAsset[] {
|
||||||
const regex = new RegExp(pattern, 'i');
|
const regex = new RegExp(pattern, 'i');
|
||||||
return assets.filter((asset) => regex.test(asset.name));
|
const filtered = assets.filter((asset) => regex.test(asset.name));
|
||||||
|
if (dryRun) {
|
||||||
|
console.debug(`Filtering assets with regex: ${pattern}`);
|
||||||
|
debugAssetList('Assets:', assets);
|
||||||
|
debugAssetList('Matched assets:', filtered);
|
||||||
|
}
|
||||||
|
return filtered;
|
||||||
}
|
}
|
||||||
|
|
||||||
function replacePlatformPlaceholders(pattern: string, platform: PlatformInfo): string {
|
function replacePlatformPlaceholders(pattern: string, platform: PlatformInfo): string {
|
||||||
@@ -22,7 +35,7 @@ function replacePlatformPlaceholders(pattern: string, platform: PlatformInfo): s
|
|||||||
.replace(/{{ARCH}}/g, platform.archPattern);
|
.replace(/{{ARCH}}/g, platform.archPattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getMatchingAsset(assets: ReleaseAsset[], platform: PlatformInfo, fileName?: string, fileType?: string): ReleaseAsset {
|
export function getMatchingAsset(assets: ReleaseAsset[], platform: PlatformInfo, fileName?: string, fileType?: string, dryRun?: boolean): ReleaseAsset {
|
||||||
// Filename provided as literal string (no ~): exact match.
|
// Filename provided as literal string (no ~): exact match.
|
||||||
if (fileName && !fileName.startsWith('~')) {
|
if (fileName && !fileName.startsWith('~')) {
|
||||||
const exactMatches = assets.filter((asset) => asset.name === fileName);
|
const exactMatches = assets.filter((asset) => asset.name === fileName);
|
||||||
@@ -42,7 +55,7 @@ export function getMatchingAsset(assets: ReleaseAsset[], platform: PlatformInfo,
|
|||||||
} else if (fileType.startsWith('~')) {
|
} else if (fileType.startsWith('~')) {
|
||||||
// 3. Custom regex fileType: match regex at end of string.
|
// 3. Custom regex fileType: match regex at end of string.
|
||||||
const fileTypeRegex = `${fileType.substring(1)}$`;
|
const fileTypeRegex = `${fileType.substring(1)}$`;
|
||||||
fileTypeFilteredAssets = filterByRegex(assets, fileTypeRegex);
|
fileTypeFilteredAssets = filterByRegex(assets, fileTypeRegex, dryRun);
|
||||||
} else {
|
} else {
|
||||||
// 4. Custom extension fileType: treat as plain extension glob.
|
// 4. Custom extension fileType: treat as plain extension glob.
|
||||||
const extension = fileType.replace(/^\./, '');
|
const extension = fileType.replace(/^\./, '');
|
||||||
@@ -54,7 +67,7 @@ export function getMatchingAsset(assets: ReleaseAsset[], platform: PlatformInfo,
|
|||||||
// 4. Filename provided with ~: platform placeholder expansion and regex filtering.
|
// 4. Filename provided with ~: platform placeholder expansion and regex filtering.
|
||||||
if (fileName && fileName.startsWith('~')) {
|
if (fileName && fileName.startsWith('~')) {
|
||||||
const fileNamePattern = replacePlatformPlaceholders(fileName.substring(1), platform);
|
const fileNamePattern = replacePlatformPlaceholders(fileName.substring(1), platform);
|
||||||
const fileNameFilteredAssets = filterByRegex(fileTypeFilteredAssets, fileNamePattern);
|
const fileNameFilteredAssets = filterByRegex(fileTypeFilteredAssets, fileNamePattern, dryRun);
|
||||||
if (fileNameFilteredAssets.length !== 1) {
|
if (fileNameFilteredAssets.length !== 1) {
|
||||||
throw new Error(`Expected exactly one asset to match the filename regex, matched: ${fileNameFilteredAssets.length}`);
|
throw new Error(`Expected exactly one asset to match the filename regex, matched: ${fileNameFilteredAssets.length}`);
|
||||||
}
|
}
|
||||||
@@ -63,7 +76,7 @@ export function getMatchingAsset(assets: ReleaseAsset[], platform: PlatformInfo,
|
|||||||
|
|
||||||
// 5. No filename: use default {{SYSTEM}}-{{ARCH}} regex.
|
// 5. No filename: use default {{SYSTEM}}-{{ARCH}} regex.
|
||||||
const defaultPattern = replacePlatformPlaceholders('{{SYSTEM}}[_-]{{ARCH}}', platform);
|
const defaultPattern = replacePlatformPlaceholders('{{SYSTEM}}[_-]{{ARCH}}', platform);
|
||||||
const defaultFilteredAssets = filterByRegex(fileTypeFilteredAssets, defaultPattern);
|
const defaultFilteredAssets = filterByRegex(fileTypeFilteredAssets, defaultPattern, dryRun);
|
||||||
|
|
||||||
// 6. Zero or multiple matches are errors.
|
// 6. Zero or multiple matches are errors.
|
||||||
if (defaultFilteredAssets.length !== 1) {
|
if (defaultFilteredAssets.length !== 1) {
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ export const systemPatterns: Record<string, string> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const archPatterns: Record<string, string> = {
|
export const archPatterns: Record<string, string> = {
|
||||||
x64: '(x86_64|x64|amd64)',
|
x64: '(x86_64|x64|amd64|universal)',
|
||||||
arm64: '(aarch64|arm64)'
|
arm64: '(aarch64|arm64|universal)'
|
||||||
};
|
};
|
||||||
|
|
||||||
export function getPlatformInfo(overrides?: PlatformOverrides): PlatformInfo {
|
export function getPlatformInfo(overrides?: PlatformOverrides): PlatformInfo {
|
||||||
|
|||||||
+21
-45
@@ -7,53 +7,32 @@ import { getPlatformInfo } from './core/platform';
|
|||||||
import { getMatchingAsset } from './core/matcher';
|
import { getMatchingAsset } from './core/matcher';
|
||||||
import { findBinary } from './core/finder';
|
import { findBinary } from './core/finder';
|
||||||
import { fetchLatestRelease } from './core/downloader';
|
import { fetchLatestRelease } from './core/downloader';
|
||||||
|
import { installSystemPackage } from './core/installer';
|
||||||
function installSystemPackage(downloadPath: string): void {
|
|
||||||
const fileName = path.basename(downloadPath).toLowerCase();
|
|
||||||
|
|
||||||
const command: { binary: string; args: string[] } | undefined = fileName.endsWith('.deb')
|
|
||||||
? { binary: 'dpkg', args: ['-i', downloadPath] }
|
|
||||||
: fileName.endsWith('.pkg')
|
|
||||||
? { binary: 'installer', args: ['-pkg', downloadPath, '-target', '/'] }
|
|
||||||
: fileName.endsWith('.rpm')
|
|
||||||
? { binary: 'rpm', args: ['-i', downloadPath] }
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
if (!command) {
|
|
||||||
throw new Error(`Unsupported package type: ${fileName}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const isRoot = process.getuid && process.getuid() === 0;
|
|
||||||
const commandToRun = isRoot ? command.binary : 'sudo';
|
|
||||||
const argsToRun = isRoot ? command.args : [command.binary, ...command.args];
|
|
||||||
|
|
||||||
const result = spawnSync(commandToRun, argsToRun, { stdio: 'inherit' });
|
|
||||||
if (result.status !== 0) {
|
|
||||||
throw new Error(`Failed to install package using ${commandToRun} ${argsToRun.join(' ')}.`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function findInstalledBinary(binaryName: string): string | undefined {
|
function findInstalledBinary(binaryName: string): string | undefined {
|
||||||
const isRegex = binaryName.startsWith('~');
|
|
||||||
if (!isRegex) {
|
if (!binaryName.startsWith('~')) {
|
||||||
const whichResult = spawnSync('which', [binaryName], { encoding: 'utf8' });
|
binaryName = `~^${binaryName}$`;
|
||||||
if (whichResult.status === 0) {
|
|
||||||
const resolvedPath = (whichResult.stdout || '').trim();
|
|
||||||
if (resolvedPath) {
|
|
||||||
return resolvedPath;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const candidates = ['/usr/local/bin', '/usr/bin', '/opt/homebrew/bin', '/opt/local/bin'];
|
const dirs = [
|
||||||
const pattern: string | RegExp = isRegex ? new RegExp(binaryName.substring(1), 'i') : binaryName;
|
'/usr/local/bin',
|
||||||
for (const candidateDir of candidates) {
|
'/usr/local/sbin',
|
||||||
if (!fs.existsSync(candidateDir)) {
|
'/usr/bin',
|
||||||
|
'/usr/sbin',
|
||||||
|
'/bin',
|
||||||
|
'/sbin',
|
||||||
|
path.join(process.env.HOME || '/', 'bin'),
|
||||||
|
'/opt/homebrew/bin'
|
||||||
|
];
|
||||||
|
|
||||||
|
for (const d of dirs) {
|
||||||
|
if (!fs.existsSync(d)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const candidatePath = findBinary(candidateDir, pattern, false, () => undefined);
|
const p = findBinary(d, binaryName, false, () => undefined);
|
||||||
if (candidatePath) {
|
if (p) {
|
||||||
return candidatePath;
|
return p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,16 +135,13 @@ async function run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Find the binary within the extracted/prepared directory
|
// Find the binary within the extracted/prepared directory
|
||||||
let binaryPattern: string | RegExp;
|
|
||||||
if (binaryName.startsWith('~')) {
|
if (binaryName.startsWith('~')) {
|
||||||
binaryPattern = new RegExp(binaryName.substring(1), 'i');
|
|
||||||
core.info(`Searching for binary matching regex: ${binaryName.substring(1)}`);
|
core.info(`Searching for binary matching regex: ${binaryName.substring(1)}`);
|
||||||
} else {
|
} else {
|
||||||
binaryPattern = binaryName;
|
|
||||||
core.info(`Searching for binary named: ${binaryName}`);
|
core.info(`Searching for binary named: ${binaryName}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const binaryPath = findBinary(toolDir, binaryPattern, debug, (msg) => core.info(msg));
|
const binaryPath = findBinary(toolDir, binaryName, debug, (msg) => core.info(msg));
|
||||||
if (!binaryPath) {
|
if (!binaryPath) {
|
||||||
throw new Error(`Could not find binary "${binaryName}" in the extracted asset.`);
|
throw new Error(`Could not find binary "${binaryName}" in the extracted asset.`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"outDir": "lib",
|
"outDir": "lib",
|
||||||
|
"types": ["node"],
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user