feat: support for multiple registries (#109)
* feat: support for multiple registries * [autofix.ci] apply automated fixes * refactor: drop unnecessary check * fix: pass empty array instead undefined * [autofix.ci] apply automated fixes * fix: dont add registry set line * [autofix.ci] apply automated fixes * feat: few more tests * feat: add bun types * docs: explain registries * feat: save globally * [autofix.ci] apply automated fixes * ci: jsr registry test * ci: add , * ci: test * ci: test * ci: test * ci: test * [autofix.ci] apply automated fixes * feat: use @iarna/toml * [autofix.ci] apply automated fixes * feat: registry parsing * [autofix.ci] apply automated fixes * ci: verbose add * ci: registry install check * ci: registry install check * ci: registry install check * ci: verify registry usage * docs: registries * docs: important block * docs: show table * docs: show table * ci: shell * ci: registry test on linux * ci: registry test on linux * build: text lockfile --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
7c641390eb
commit
34f777aec1
14 files changed
+901
-117
No files matched your search
@@ -23,10 +23,26 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
tests:
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: ./
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Run tests
|
||||
run: bun test --coverage
|
||||
|
||||
setup-bun:
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
needs: [remove-cache]
|
||||
needs: [remove-cache, tests]
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -65,7 +81,7 @@ jobs:
|
||||
name: setup-bun from (${{ matrix.os }}, ${{ matrix.file.name }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
needs: [remove-cache]
|
||||
needs: [remove-cache, tests]
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
@@ -130,7 +146,7 @@ jobs:
|
||||
name: setup-bun from (${{ matrix.os }}, download url)
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
needs: [remove-cache]
|
||||
needs: [remove-cache, tests]
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -153,3 +169,47 @@ jobs:
|
||||
id: run_bun
|
||||
run: |
|
||||
bun --version
|
||||
|
||||
test-custom-registries:
|
||||
name: test installing deps from custom registries (${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
needs: [remove-cache, tests]
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🛠️ Setup Bun
|
||||
uses: ./
|
||||
id: setup_bun
|
||||
with:
|
||||
registries: |
|
||||
https://registry.npmjs.org
|
||||
@types:https://registry.yarnpkg.com
|
||||
|
||||
- name: ▶️ Install from default registry
|
||||
run: |
|
||||
output=$(bun add is-odd --verbose --force 2>&1)
|
||||
|
||||
if echo "$output" | grep -q "HTTP/1.1 GET https://registry.npmjs.org/is-odd"; then
|
||||
echo "Successfully installed from default registry"
|
||||
else
|
||||
echo "Failed to install from default registry"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: ▶️ Install from @types registry
|
||||
run: |
|
||||
output=$(bun add @types/bun --verbose --force 2>&1)
|
||||
|
||||
if echo "$output" | grep -q "HTTP/1.1 GET https://registry.yarnpkg.com/@types%2fbun"; then
|
||||
echo "Successfully installed from @types registry"
|
||||
else
|
||||
echo "Failed to install from @types registry"
|
||||
exit 1
|
||||
fi
|
||||
@@ -18,24 +18,42 @@ Download, install, and setup [Bun](https://bun.sh) in GitHub Actions.
|
||||
bun-version-file: ".bun-version"
|
||||
```
|
||||
|
||||
### Using a custom NPM registry
|
||||
## Using custom registries
|
||||
|
||||
You can configure multiple package registries using the `registries` input. This supports both default and scoped registries with various authentication methods.
|
||||
|
||||
### Registry configuration
|
||||
|
||||
```yaml
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
registry-url: "https://npm.pkg.github.com/"
|
||||
scope: "@foo"
|
||||
```
|
||||
registries: |
|
||||
https://registry.npmjs.org/
|
||||
@myorg:https://npm.pkg.github.com/|$GITHUB_TOKEN
|
||||
@internal:https://username:$INTERNAL_PASSWORD@registry.internal.com/
|
||||
|
||||
If you need to authenticate with a private registry, you can set the `BUN_AUTH_TOKEN` environment variable.
|
||||
|
||||
```yaml
|
||||
- name: Install Dependencies
|
||||
- name: Install dependencies
|
||||
env:
|
||||
BUN_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
run: bun install --frozen-lockfile
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
INTERNAL_PASSWORD: ${{ secrets.INTERNAL_PASSWORD }}
|
||||
run: bun install
|
||||
```
|
||||
|
||||
#### Registry format options
|
||||
|
||||
| Type | Format |
|
||||
| ------------------------------------ | --------------------------------------------------------- |
|
||||
| Default registry | `https://registry.example.com/` |
|
||||
| Default registry with token | `https://registry.example.com/\|$TOKEN` |
|
||||
| Scoped registry | `@scope:https://registry.example.com/` |
|
||||
| Scoped registry with token | `@scope:https://registry.example.com/\|$TOKEN` |
|
||||
| Scoped registry with URL credentials | `@scope:https://username:$PASSWORD@registry.example.com/` |
|
||||
|
||||
> [!IMPORTANT]
|
||||
> When using authentication, make sure to set the corresponding environment variables in your workflow steps that need access to the registries.
|
||||
|
||||
For more information about configuring registries in Bun, see the [official documentation](https://bun.sh/docs/install/registries).
|
||||
|
||||
### Override download url
|
||||
|
||||
If you need to override the download URL, you can use the `bun-download-url` input.
|
||||
|
||||
+12
-1
@@ -17,12 +17,23 @@ inputs:
|
||||
bun-download-url:
|
||||
description: Override the URL to download Bun from. This skips version resolution and verifying AVX2 support.
|
||||
required: false
|
||||
registries:
|
||||
description: |
|
||||
List of package registries with authentication support. Format:
|
||||
- Default registry: https://registry.npmjs.org/
|
||||
- Default with token: https://registry.npmjs.org/|token
|
||||
- Scoped registry: @scope:https://registry.example.com/
|
||||
- Scoped with token: @scope:https://registry.example.com/|token
|
||||
- Scoped with credentials: @scope:https://user:pass@registry.example.com/
|
||||
required: false
|
||||
registry-url:
|
||||
required: false
|
||||
description: The URL of the package registry to use for installing Bun. Set the $BUN_AUTH_TOKEN environment variable to authenticate with the registry.
|
||||
deprecationMessage: "Use 'registries' input instead."
|
||||
scope:
|
||||
required: false
|
||||
description: The scope for authenticating with the package registry.
|
||||
description: "The scope for authenticating with the package registry."
|
||||
deprecationMessage: "Use 'registries' input instead."
|
||||
no-cache:
|
||||
required: false
|
||||
type: boolean
|
||||
|
||||
@@ -3,14 +3,16 @@
|
||||
"workspaces": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"@actions/cache": "^3.1.4",
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/cache": "^4.0.0",
|
||||
"@actions/core": "^1.11.0",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/glob": "^0.4.0",
|
||||
"@actions/io": "^1.1.2",
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
"@iarna/toml": "^2.2.5",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "^1.1.13",
|
||||
"@types/node": "^20.8.2",
|
||||
"esbuild": "^0.19.2",
|
||||
"prettier": "^3.4.2",
|
||||
@@ -19,9 +21,9 @@
|
||||
},
|
||||
},
|
||||
"packages": {
|
||||
"@actions/cache": ["@actions/cache@3.2.4", "", { "dependencies": { "@actions/core": "^1.10.0", "@actions/exec": "^1.0.1", "@actions/glob": "^0.1.0", "@actions/http-client": "^2.1.1", "@actions/io": "^1.0.1", "@azure/abort-controller": "^1.1.0", "@azure/ms-rest-js": "^2.6.0", "@azure/storage-blob": "^12.13.0", "semver": "^6.3.1", "uuid": "^3.3.3" } }, "sha512-RuHnwfcDagtX+37s0ZWy7clbOfnZ7AlDJQ7k/9rzt2W4Gnwde3fa/qjSjVuz4vLcLIpc7fUob27CMrqiWZytYA=="],
|
||||
"@actions/cache": ["@actions/cache@4.0.3", "", { "dependencies": { "@actions/core": "^1.11.1", "@actions/exec": "^1.0.1", "@actions/glob": "^0.1.0", "@actions/http-client": "^2.1.1", "@actions/io": "^1.0.1", "@azure/abort-controller": "^1.1.0", "@azure/ms-rest-js": "^2.6.0", "@azure/storage-blob": "^12.13.0", "@protobuf-ts/plugin": "^2.9.4", "semver": "^6.3.1" } }, "sha512-SvrqFtYJ7I48A/uXNkoJrnukx5weQv1fGquhs3+4nkByZThBH109KTIqj5x/cGV7JGNvb8dLPVywUOqX1fjiXg=="],
|
||||
|
||||
"@actions/core": ["@actions/core@1.10.1", "", { "dependencies": { "@actions/http-client": "^2.0.1", "uuid": "^8.3.2" } }, "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g=="],
|
||||
"@actions/core": ["@actions/core@1.11.1", "", { "dependencies": { "@actions/exec": "^1.1.1", "@actions/http-client": "^2.0.1" } }, "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A=="],
|
||||
|
||||
"@actions/exec": ["@actions/exec@1.1.1", "", { "dependencies": { "@actions/io": "^1.0.1" } }, "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w=="],
|
||||
|
||||
@@ -53,6 +55,10 @@
|
||||
|
||||
"@azure/storage-blob": ["@azure/storage-blob@12.17.0", "", { "dependencies": { "@azure/abort-controller": "^1.0.0", "@azure/core-http": "^3.0.0", "@azure/core-lro": "^2.2.0", "@azure/core-paging": "^1.1.1", "@azure/core-tracing": "1.0.0-preview.13", "@azure/logger": "^1.0.0", "events": "^3.0.0", "tslib": "^2.2.0" } }, "sha512-sM4vpsCpcCApagRW5UIjQNlNylo02my2opgp0Emi8x888hZUvJ3dN69Oq20cEGXkMUWnoCrBaB0zyS3yeB87sQ=="],
|
||||
|
||||
"@bufbuild/protobuf": ["@bufbuild/protobuf@2.6.0", "", {}, "sha512-6cuonJVNOIL7lTj5zgo/Rc2bKAo4/GvN+rKCrUj7GdEHRzCk8zKOfFwUsL9nAVk5rSIsRmlgcpLzTRysopEeeg=="],
|
||||
|
||||
"@bufbuild/protoplugin": ["@bufbuild/protoplugin@2.6.0", "", { "dependencies": { "@bufbuild/protobuf": "2.6.0", "@typescript/vfs": "^1.5.2", "typescript": "5.4.5" } }, "sha512-mfAwI+4GqUtbw/ddfyolEHaAL86ozRIVlOg2A+SVRbjx1CjsMc1YJO+hBSkt/pqfpR+PmWBbZLstHbXP8KGtMQ=="],
|
||||
|
||||
"@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.19.12", "", { "os": "aix", "cpu": "ppc64" }, "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA=="],
|
||||
|
||||
"@esbuild/android-arm": ["@esbuild/android-arm@0.19.12", "", { "os": "android", "cpu": "arm" }, "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w=="],
|
||||
@@ -101,14 +107,30 @@
|
||||
|
||||
"@fastify/busboy": ["@fastify/busboy@2.1.1", "", {}, "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA=="],
|
||||
|
||||
"@iarna/toml": ["@iarna/toml@2.2.5", "", {}, "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg=="],
|
||||
|
||||
"@opentelemetry/api": ["@opentelemetry/api@1.6.0", "", {}, "sha512-OWlrQAnWn9577PhVgqjUvMr1pg57Bc4jv0iL4w0PRuOSRvq67rvHW9Ie/dZVMvCzhSCB+UxhcY/PmCmFj33Q+g=="],
|
||||
|
||||
"@protobuf-ts/plugin": ["@protobuf-ts/plugin@2.11.1", "", { "dependencies": { "@bufbuild/protobuf": "^2.4.0", "@bufbuild/protoplugin": "^2.4.0", "@protobuf-ts/protoc": "^2.11.1", "@protobuf-ts/runtime": "^2.11.1", "@protobuf-ts/runtime-rpc": "^2.11.1", "typescript": "^3.9" }, "bin": { "protoc-gen-ts": "bin/protoc-gen-ts", "protoc-gen-dump": "bin/protoc-gen-dump" } }, "sha512-HyuprDcw0bEEJqkOWe1rnXUP0gwYLij8YhPuZyZk6cJbIgc/Q0IFgoHQxOXNIXAcXM4Sbehh6kjVnCzasElw1A=="],
|
||||
|
||||
"@protobuf-ts/protoc": ["@protobuf-ts/protoc@2.11.1", "", { "bin": { "protoc": "protoc.js" } }, "sha512-mUZJaV0daGO6HUX90o/atzQ6A7bbN2RSuHtdwo8SSF2Qoe3zHwa4IHyCN1evftTeHfLmdz+45qo47sL+5P8nyg=="],
|
||||
|
||||
"@protobuf-ts/runtime": ["@protobuf-ts/runtime@2.11.1", "", {}, "sha512-KuDaT1IfHkugM2pyz+FwiY80ejWrkH1pAtOBOZFuR6SXEFTsnb/jiQWQ1rCIrcKx2BtyxnxW6BWwsVSA/Ie+WQ=="],
|
||||
|
||||
"@protobuf-ts/runtime-rpc": ["@protobuf-ts/runtime-rpc@2.11.1", "", { "dependencies": { "@protobuf-ts/runtime": "^2.11.1" } }, "sha512-4CqqUmNA+/uMz00+d3CYKgElXO9VrEbucjnBFEjqI4GuDrEQ32MaI3q+9qPBvIGOlL4PmHXrzM32vBPWRhQKWQ=="],
|
||||
|
||||
"@types/bun": ["@types/bun@1.2.18", "", { "dependencies": { "bun-types": "1.2.18" } }, "sha512-Xf6RaWVheyemaThV0kUfaAUvCNokFr+bH8Jxp+tTZfx7dAPA8z9ePnP9S9+Vspzuxxx9JRAXhnyccRj3GyCMdQ=="],
|
||||
|
||||
"@types/node": ["@types/node@20.12.2", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ=="],
|
||||
|
||||
"@types/node-fetch": ["@types/node-fetch@2.6.11", "", { "dependencies": { "@types/node": "*", "form-data": "^4.0.0" } }, "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g=="],
|
||||
|
||||
"@types/react": ["@types/react@19.1.8", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g=="],
|
||||
|
||||
"@types/tunnel": ["@types/tunnel@0.0.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA=="],
|
||||
|
||||
"@typescript/vfs": ["@typescript/vfs@1.6.1", "", { "dependencies": { "debug": "^4.1.1" }, "peerDependencies": { "typescript": "*" } }, "sha512-JwoxboBh7Oz1v38tPbkrZ62ZXNHAk9bJ7c9x0eI5zBfBnBYGhURdbnh7Z4smN/MV48Y5OCcZb58n972UtbazsA=="],
|
||||
|
||||
"abort-controller": ["abort-controller@3.0.0", "", { "dependencies": { "event-target-shim": "^5.0.0" } }, "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg=="],
|
||||
|
||||
"asynckit": ["asynckit@0.4.0", "", {}, "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="],
|
||||
@@ -117,10 +139,16 @@
|
||||
|
||||
"brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="],
|
||||
|
||||
"bun-types": ["bun-types@1.2.18", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-04+Eha5NP7Z0A9YgDAzMk5PHR16ZuLVa83b26kH5+cp1qZW4F6FmAURngE7INf4tKOvCE69vYvDEwoNl1tGiWw=="],
|
||||
|
||||
"combined-stream": ["combined-stream@1.0.8", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="],
|
||||
|
||||
"concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="],
|
||||
|
||||
"csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],
|
||||
|
||||
"debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="],
|
||||
|
||||
"delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="],
|
||||
|
||||
"esbuild": ["esbuild@0.19.12", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.19.12", "@esbuild/android-arm": "0.19.12", "@esbuild/android-arm64": "0.19.12", "@esbuild/android-x64": "0.19.12", "@esbuild/darwin-arm64": "0.19.12", "@esbuild/darwin-x64": "0.19.12", "@esbuild/freebsd-arm64": "0.19.12", "@esbuild/freebsd-x64": "0.19.12", "@esbuild/linux-arm": "0.19.12", "@esbuild/linux-arm64": "0.19.12", "@esbuild/linux-ia32": "0.19.12", "@esbuild/linux-loong64": "0.19.12", "@esbuild/linux-mips64el": "0.19.12", "@esbuild/linux-ppc64": "0.19.12", "@esbuild/linux-riscv64": "0.19.12", "@esbuild/linux-s390x": "0.19.12", "@esbuild/linux-x64": "0.19.12", "@esbuild/netbsd-x64": "0.19.12", "@esbuild/openbsd-x64": "0.19.12", "@esbuild/sunos-x64": "0.19.12", "@esbuild/win32-arm64": "0.19.12", "@esbuild/win32-ia32": "0.19.12", "@esbuild/win32-x64": "0.19.12" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg=="],
|
||||
@@ -137,6 +165,8 @@
|
||||
|
||||
"minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="],
|
||||
|
||||
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
|
||||
|
||||
"node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="],
|
||||
|
||||
"prettier": ["prettier@3.4.2", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ=="],
|
||||
@@ -171,9 +201,9 @@
|
||||
|
||||
"@actions/cache/@actions/glob": ["@actions/glob@0.1.2", "", { "dependencies": { "@actions/core": "^1.2.6", "minimatch": "^3.0.4" } }, "sha512-SclLR7Ia5sEqjkJTPs7Sd86maMDw43p769YxBOxvPvEWuPEhpAnBsQfENOpXjFYMmhCqd127bmf+YdvJqVqR4A=="],
|
||||
|
||||
"@actions/core/@actions/http-client": ["@actions/http-client@2.2.0", "", { "dependencies": { "tunnel": "^0.0.6", "undici": "^5.25.4" } }, "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg=="],
|
||||
"@actions/glob/@actions/core": ["@actions/core@1.10.1", "", { "dependencies": { "@actions/http-client": "^2.0.1", "uuid": "^8.3.2" } }, "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g=="],
|
||||
|
||||
"@actions/core/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
||||
"@actions/tool-cache/@actions/core": ["@actions/core@1.10.1", "", { "dependencies": { "@actions/http-client": "^2.0.1", "uuid": "^8.3.2" } }, "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g=="],
|
||||
|
||||
"@actions/tool-cache/@actions/http-client": ["@actions/http-client@2.2.0", "", { "dependencies": { "tunnel": "^0.0.6", "undici": "^5.25.4" } }, "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg=="],
|
||||
|
||||
@@ -193,11 +223,21 @@
|
||||
|
||||
"@azure/ms-rest-js/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
||||
|
||||
"@bufbuild/protoplugin/typescript": ["typescript@5.4.5", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ=="],
|
||||
|
||||
"@protobuf-ts/plugin/typescript": ["typescript@3.9.10", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q=="],
|
||||
|
||||
"@types/node-fetch/form-data": ["form-data@4.0.0", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "mime-types": "^2.1.12" } }, "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww=="],
|
||||
|
||||
"@types/tunnel/@types/node": ["@types/node@20.8.9", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg=="],
|
||||
|
||||
"@actions/core/@actions/http-client/undici": ["undici@5.26.5", "", { "dependencies": { "@fastify/busboy": "^2.0.0" } }, "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw=="],
|
||||
"@actions/cache/@actions/glob/@actions/core": ["@actions/core@1.10.1", "", { "dependencies": { "@actions/http-client": "^2.0.1", "uuid": "^8.3.2" } }, "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g=="],
|
||||
|
||||
"@actions/glob/@actions/core/@actions/http-client": ["@actions/http-client@2.2.0", "", { "dependencies": { "tunnel": "^0.0.6", "undici": "^5.25.4" } }, "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg=="],
|
||||
|
||||
"@actions/glob/@actions/core/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
||||
|
||||
"@actions/tool-cache/@actions/core/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
||||
|
||||
"@actions/tool-cache/@actions/http-client/undici": ["undici@5.26.5", "", { "dependencies": { "@fastify/busboy": "^2.0.0" } }, "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw=="],
|
||||
|
||||
@@ -205,8 +245,18 @@
|
||||
|
||||
"@azure/core-http/@azure/core-util/@azure/abort-controller": ["@azure/abort-controller@2.1.1", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-NhzeNm5zu2fPlwGXPUjzsRCRuPx5demaZyNcyNYJDqpa/Sbxzvo/RYt9IwUaAOnDW5+r7J9UOE6f22TQnb9nhQ=="],
|
||||
|
||||
"@actions/core/@actions/http-client/undici/@fastify/busboy": ["@fastify/busboy@2.0.0", "", {}, "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ=="],
|
||||
"@actions/cache/@actions/glob/@actions/core/@actions/http-client": ["@actions/http-client@2.2.0", "", { "dependencies": { "tunnel": "^0.0.6", "undici": "^5.25.4" } }, "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg=="],
|
||||
|
||||
"@actions/cache/@actions/glob/@actions/core/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
||||
|
||||
"@actions/glob/@actions/core/@actions/http-client/undici": ["undici@5.26.5", "", { "dependencies": { "@fastify/busboy": "^2.0.0" } }, "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw=="],
|
||||
|
||||
"@actions/tool-cache/@actions/http-client/undici/@fastify/busboy": ["@fastify/busboy@2.0.0", "", {}, "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ=="],
|
||||
|
||||
"@actions/cache/@actions/glob/@actions/core/@actions/http-client/undici": ["undici@5.26.5", "", { "dependencies": { "@fastify/busboy": "^2.0.0" } }, "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw=="],
|
||||
|
||||
"@actions/glob/@actions/core/@actions/http-client/undici/@fastify/busboy": ["@fastify/busboy@2.0.0", "", {}, "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ=="],
|
||||
|
||||
"@actions/cache/@actions/glob/@actions/core/@actions/http-client/undici/@fastify/busboy": ["@fastify/busboy@2.0.0", "", {}, "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ=="],
|
||||
}
|
||||
}
|
||||
+62
-45
@@ -1,56 +1,73 @@
|
||||
var XN=Object.create;var Qs=Object.defineProperty;var WN=Object.getOwnPropertyDescriptor;var KN=Object.getOwnPropertyNames;var YN=Object.getPrototypeOf,QN=Object.prototype.hasOwnProperty;var o=(t,e)=>Qs(t,"name",{value:e,configurable:!0});var qt=(t,e)=>()=>(t&&(e=t(t=0)),e);var T=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),a6=(t,e)=>{for(var a in e)Qs(t,a,{get:e[a],enumerable:!0})},i6=(t,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of KN(e))!QN.call(t,r)&&r!==a&&Qs(t,r,{get:()=>e[r],enumerable:!(i=WN(e,r))||i.enumerable});return t};var La=(t,e,a)=>(a=t!=null?XN(YN(t)):{},i6(e||!t||!t.__esModule?Qs(a,"default",{value:t,enumerable:!0}):a,t)),qp=t=>i6(Qs({},"__esModule",{value:!0}),t);var Lp=T(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.toCommandProperties=hn.toCommandValue=void 0;function JN(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}o(JN,"toCommandValue");hn.toCommandValue=JN;function ZN(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}o(ZN,"toCommandProperties");hn.toCommandProperties=ZN});var o6=T(ga=>{"use strict";var e_=ga&&ga.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),t_=ga&&ga.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a_=ga&&ga.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&e_(e,t,a);return t_(e,t),e};Object.defineProperty(ga,"__esModule",{value:!0});ga.issue=ga.issueCommand=void 0;var i_=a_(require("os")),n6=Lp();function s6(t,e,a){let i=new Om(t,e,a);process.stdout.write(i.toString()+i_.EOL)}o(s6,"issueCommand");ga.issueCommand=s6;function r_(t,e=""){s6(t,{},e)}o(r_,"issue");ga.issue=r_;var r6="::",Om=class{static{o(this,"Command")}constructor(e,a,i){e||(e="missing.command"),this.command=e,this.properties=a,this.message=i}toString(){let e=r6+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let a=!0;for(let i in this.properties)if(this.properties.hasOwnProperty(i)){let r=this.properties[i];r&&(a?a=!1:e+=",",e+=`${i}=${s_(r)}`)}}return e+=`${r6}${n_(this.message)}`,e}};function n_(t){return(0,n6.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(n_,"escapeData");function s_(t){return(0,n6.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(s_,"escapeProperty")});var l6=T(ya=>{"use strict";var o_=ya&&ya.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),p_=ya&&ya.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rm=ya&&ya.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&o_(e,t,a);return p_(e,t),e};Object.defineProperty(ya,"__esModule",{value:!0});ya.prepareKeyValueMessage=ya.issueFileCommand=void 0;var d_=Rm(require("crypto")),p6=Rm(require("fs")),Pm=Rm(require("os")),d6=Lp();function l_(t,e){let a=process.env[`GITHUB_${t}`];if(!a)throw new Error(`Unable to find environment variable for file command ${t}`);if(!p6.existsSync(a))throw new Error(`Missing file at path: ${a}`);p6.appendFileSync(a,`${(0,d6.toCommandValue)(e)}${Pm.EOL}`,{encoding:"utf8"})}o(l_,"issueFileCommand");ya.issueFileCommand=l_;function c_(t,e){let a=`ghadelimiter_${d_.randomUUID()}`,i=(0,d6.toCommandValue)(e);if(t.includes(a))throw new Error(`Unexpected input: name should not contain the delimiter "${a}"`);if(i.includes(a))throw new Error(`Unexpected input: value should not contain the delimiter "${a}"`);return`${t}<<${a}${Pm.EOL}${i}${Pm.EOL}${a}`}o(c_,"prepareKeyValueMessage");ya.prepareKeyValueMessage=c_});var m6=T(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.checkBypass=gn.getProxyUrl=void 0;function m_(t){let e=t.protocol==="https:";if(c6(t))return;let a=(()=>e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY)();if(a)try{return new URL(a)}catch{if(!a.startsWith("http://")&&!a.startsWith("https://"))return new URL(`http://${a}`)}else return}o(m_,"getProxyUrl");gn.getProxyUrl=m_;function c6(t){if(!t.hostname)return!1;let e=t.hostname;if(u_(e))return!0;let a=process.env.no_proxy||proLine truncated
|
||||
`,m.message,m.stack);var u=new Error("tunneling socket could not be established, cause="+m.message);u.code="ECONNRESET",e.request.emit("error",u),i.removeSocket(r)}o(c,"onError")},"createSocket");wi.prototype.removeSocket=o(function(e){var a=this.sockets.indexOf(e);if(a!==-1){this.sockets.splice(a,1);var i=this.requests.shift();i&&this.createSocket(i,function(r){i.request.onSocket(r)})}},"removeSocket");function f6(t,e){var a=this;wi.prototype.createSocket.call(a,t,function(i){var r=t.request.getHeader("host"),n=Im({},a.options,{socket:i,servername:r?r.replace(/:.*$/,""):t.host}),s=f_.connect(0,n);a.sockets[a.sockets.indexOf(i)]=s,e(s)})}o(f6,"createSecureSocket");function h6(t,e,a){return typeof t=="string"?{host:t,port:e,localAddress:a}:t}o(h6,"toOptions");function Im(t){for(var e=1,a=arguments.length;e<a;++e){var i=arguments[e];if(typeof i=="object")for(var r=Object.keys(i),n=0,s=r.length;n<s;++n){var p=r[n];i[p]!==void 0&&(t[p]=i[p])}}return t}o(Im,"mergeOptions");var Gi;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Gi=o(function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)},"debug"):Gi=o(function(){},"debug");yn.debug=Gi});var Bm=T((fH,y6)=>{y6.exports=g6()});var Rr=T(Pe=>{"use strict";var w_=Pe&&Pe.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),N_=Pe&&Pe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Fp=Pe&&Pe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&w_(e,t,a);return N_(e,t),e},it=Pe&&Pe.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{l(i.next(c))}catch(m){s(m)}}o(p,"fulfilled");function d(c){try{l(i.throw(c))}catch(m){s(m)}}o(d,"rejected");function l(c){c.done?n(c.value):r(c.value).then(p,d)}o(l,"step"),l((i=i.apply(t,e||[])).next())})};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.HttpClient=Pe.isHttps=Pe.HttpClientResponse=Pe.HttpClientError=Pe.getProxyUrl=Pe.MediaTypes=Pe.Headers=Pe.HttpCodes=void 0;var zp=Fp(require("http")),Am=Fp(require("https")),v6=Fp(m6()),jp=Fp(Bm()),za;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(za=Pe.HttpCodes||(Pe.HttpCodes={}));var Ut;(function(t){t.Accept="accept",t.ContentType="content-type"})(Ut=Pe.Headers||(Pe.Headers={}));var Xi;(function(t){t.ApplicationJson="application/json"})(Xi=Pe.MediaTypes||(Pe.MediaTypes={}));function __(t){let e=v6.getProxyUrl(new URL(t));return e?e.href:""}o(__,"getProxyUrl");Pe.getProxyUrl=__;var S_=[za.MovedPermanently,za.ResourceMoved,za.SeeOther,za.TemporaryRedirect,za.PermanentRedirect],E_=[za.BadGateway,za.ServiceUnavailable,za.GatewayTimeout],C_=["OPTIONS","GET","DELETE","HEAD"],T_=10,O_=5,Up=class t extends Error{static{o(this,"HttpClientError")}constructor(e,a){super(e),this.name="HttpClientError",this.statusCode=a,Object.setPrototypeOf(this,t.prototype)}};Pe.HttpClientError=Up;var Hp=class{static{o(this,"HttpClientResponse")}constructor(e){this.message=e}readBody(){return it(this,void 0,void 0,function*(){return new Promise(e=>it(this,void 0,void 0,function*(){let a=Buffer.alloc(0);this.message.on("data",i=>{a=Buffer.concat([a,i])}),this.message.on("end",()=>{e(a.toString())})}))})}readBodyBuffer(){return it(this,void 0,void 0,function*(){return new Promise(e=>it(this,void 0,void 0,function*(){let a=[];this.message.on("data",i=>{a.push(i)}),this.message.on("end",()=>{e(Buffer.concat(a))})}))})}};Pe.HttpClientResponse=Hp;function P_(t){return new URL(t).protocol==="https:"}o(P_,"isHttps");Pe.isHttps=P_;var Mm=class{static{o(this,"HttpClient")}constructor(e,a,i){this._ignoreSslError=!1
Line truncated
|
||||
var X_=Object.create;var ao=Object.defineProperty;var K_=Object.getOwnPropertyDescriptor;var Q_=Object.getOwnPropertyNames;var Y_=Object.getPrototypeOf,J_=Object.prototype.hasOwnProperty;var o=(t,e)=>ao(t,"name",{value:e,configurable:!0});var qt=(t,e)=>()=>(t&&(e=t(t=0)),e);var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),S6=(t,e)=>{for(var a in e)ao(t,a,{get:e[a],enumerable:!0})},C6=(t,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Q_(e))!J_.call(t,r)&&r!==a&&ao(t,r,{get:()=>e[r],enumerable:!(i=K_(e,r))||i.enumerable});return t};var ya=(t,e,a)=>(a=t!=null?X_(Y_(t)):{},C6(e||!t||!t.__esModule?ao(a,"default",{value:t,enumerable:!0}):a,t)),Up=t=>C6(ao({},"__esModule",{value:!0}),t);var Fp=E(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.toCommandProperties=vn.toCommandValue=void 0;function Z_(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}o(Z_,"toCommandValue");vn.toCommandValue=Z_;function eS(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}o(eS,"toCommandProperties");vn.toCommandProperties=eS});var R6=E(va=>{"use strict";var tS=va&&va.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),aS=va&&va.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),iS=va&&va.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&tS(e,t,a);return aS(e,t),e};Object.defineProperty(va,"__esModule",{value:!0});va.issue=va.issueCommand=void 0;var rS=iS(require("os")),T6=Fp();function O6(t,e,a){let i=new Uu(t,e,a);process.stdout.write(i.toString()+rS.EOL)}o(O6,"issueCommand");va.issueCommand=O6;function nS(t,e=""){O6(t,{},e)}o(nS,"issue");va.issue=nS;var E6="::",Uu=class{static{o(this,"Command")}constructor(e,a,i){e||(e="missing.command"),this.command=e,this.properties=a,this.message=i}toString(){let e=E6+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let a=!0;for(let i in this.properties)if(this.properties.hasOwnProperty(i)){let r=this.properties[i];r&&(a?a=!1:e+=",",e+=`${i}=${oS(r)}`)}}return e+=`${E6}${sS(this.message)}`,e}};function sS(t){return(0,T6.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(sS,"escapeData");function oS(t){return(0,T6.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(oS,"escapeProperty")});var D6=E(xa=>{"use strict";var pS=xa&&xa.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),lS=xa&&xa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Vu=xa&&xa.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&pS(e,t,a);return lS(e,t),e};Object.defineProperty(xa,"__esModule",{value:!0});xa.prepareKeyValueMessage=xa.issueFileCommand=void 0;var dS=Vu(require("crypto")),P6=Vu(require("fs")),Fu=Vu(require("os")),I6=Fp();function cS(t,e){let a=process.env[`GITHUB_${t}`];if(!a)throw new Error(`Unable to find environment variable for file command ${t}`);if(!P6.existsSync(a))throw new Error(`Missing file at path: ${a}`);P6.appendFileSync(a,`${(0,I6.toCommandValue)(e)}${Fu.EOL}`,{encoding:"utf8"})}o(cS,"issueFileCommand");xa.issueFileCommand=cS;function uS(t,e){let a=`ghadelimiter_${dS.randomUUID()}`,i=(0,I6.toCommandValue)(e);if(t.includes(a))throw new Error(`Unexpected input: name should not contain the delimiter "${a}"`);if(i.includes(a))throw new Error(`Unexpected input: value should not contain the delimiter "${a}"`);return`${t}<<${a}${Fu.EOL}${i}${Fu.EOL}${a}`}o(uS,"prepareKeyValueMessage");xa.prepareKeyValueMessage=uS});var B6=E(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.checkBypass=xn.getProxyUrl=void 0;function mS(t){let e=t.protocol==="https:";if(A6(t))return;let a=(()=>e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY)();if(a)try{return new URL(a)}catch{if(!a.startsWith("http://")&&!a.startsWith("https://"))return new URL(`http://${a}`)}else return}o(mS,"getProxyUrl");xn.getProxyUrl=mS;function A6(t){if(!t.hostname)return!1;let e=t.hostname;if(fS(e))return!0;let a=process.env.no_proxy||proLine truncated
|
||||
`,u.message,u.stack);var m=new Error("tunneling socket could not be established, cause="+u.message);m.code="ECONNRESET",e.request.emit("error",m),i.removeSocket(r)}o(c,"onError")},"createSocket");Ni.prototype.removeSocket=o(function(e){var a=this.sockets.indexOf(e);if(a!==-1){this.sockets.splice(a,1);var i=this.requests.shift();i&&this.createSocket(i,function(r){i.request.onSocket(r)})}},"removeSocket");function L6(t,e){var a=this;Ni.prototype.createSocket.call(a,t,function(i){var r=t.request.getHeader("host"),n=Gu({},a.options,{socket:i,servername:r?r.replace(/:.*$/,""):t.host}),s=hS.connect(0,n);a.sockets[a.sockets.indexOf(i)]=s,e(s)})}o(L6,"createSecureSocket");function q6(t,e,a){return typeof t=="string"?{host:t,port:e,localAddress:a}:t}o(q6,"toOptions");function Gu(t){for(var e=1,a=arguments.length;e<a;++e){var i=arguments[e];if(typeof i=="object")for(var r=Object.keys(i),n=0,s=r.length;n<s;++n){var p=r[n];i[p]!==void 0&&(t[p]=i[p])}}return t}o(Gu,"mergeOptions");var Wi;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Wi=o(function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)},"debug"):Wi=o(function(){},"debug");bn.debug=Wi});var Wu=E((FF,j6)=>{j6.exports=z6()});var Ir=E(Re=>{"use strict";var NS=Re&&Re.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),_S=Re&&Re.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Kp=Re&&Re.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&NS(e,t,a);return _S(e,t),e},it=Re&&Re.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(Re,"__esModule",{value:!0});Re.HttpClient=Re.isHttps=Re.HttpClientResponse=Re.HttpClientError=Re.getProxyUrl=Re.MediaTypes=Re.Headers=Re.HttpCodes=void 0;var Vp=Kp(require("http")),Xu=Kp(require("https")),k6=Kp(B6()),$p=Kp(Wu()),ja;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(ja=Re.HttpCodes||(Re.HttpCodes={}));var Ht;(function(t){t.Accept="accept",t.ContentType="content-type"})(Ht=Re.Headers||(Re.Headers={}));var Xi;(function(t){t.ApplicationJson="application/json"})(Xi=Re.MediaTypes||(Re.MediaTypes={}));function SS(t){let e=k6.getProxyUrl(new URL(t));return e?e.href:""}o(SS,"getProxyUrl");Re.getProxyUrl=SS;var CS=[ja.MovedPermanently,ja.ResourceMoved,ja.SeeOther,ja.TemporaryRedirect,ja.PermanentRedirect],ES=[ja.BadGateway,ja.ServiceUnavailable,ja.GatewayTimeout],TS=["OPTIONS","GET","DELETE","HEAD"],OS=10,RS=5,Wp=class t extends Error{static{o(this,"HttpClientError")}constructor(e,a){super(e),this.name="HttpClientError",this.statusCode=a,Object.setPrototypeOf(this,t.prototype)}};Re.HttpClientError=Wp;var Xp=class{static{o(this,"HttpClientResponse")}constructor(e){this.message=e}readBody(){return it(this,void 0,void 0,function*(){return new Promise(e=>it(this,void 0,void 0,function*(){let a=Buffer.alloc(0);this.message.on("data",i=>{a=Buffer.concat([a,i])}),this.message.on("end",()=>{e(a.toString())})}))})}readBodyBuffer(){return it(this,void 0,void 0,function*(){return new Promise(e=>it(this,void 0,void 0,function*(){let a=[];this.message.on("data",i=>{a.push(i)}),this.message.on("end",()=>{e(Buffer.concat(a))})}))})}};Re.HttpClientResponse=Xp;function PS(t){return new URL(t).protocol==="https:"}o(PS,"isHttps");Re.isHttps=PS;var Ku=class{static{o(this,"HttpClient")}constructor(e,a,i){this._ignoreSslError=!1
Line truncated
|
||||
|
||||
Error Code : ${s.statusCode}
|
||||
|
||||
Error Message: ${s.message}`)})).result)===null||a===void 0?void 0:a.value;if(!n)throw new Error("Response json body do not have ID Token field");return n})}static getIDToken(e){return b6(this,void 0,void 0,function*(){try{let a=t.getIDTokenUrl();if(e){let r=encodeURIComponent(e);a=`${a}&audience=${r}`}(0,x6.debug)(`ID token url is ${a}`);let i=yield t.getCall(a);return(0,x6.setSecret)(i),i}catch(a){throw new Error(`Error message: ${a.message}`)}})}};vn.OidcClient=km});var Vm=T(Xt=>{"use strict";var Um=Xt&&Xt.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{l(i.next(c))}catch(m){s(m)}}o(p,"fulfilled");function d(c){try{l(i.throw(c))}catch(m){s(m)}}o(d,"rejected");function l(c){c.done?n(c.value):r(c.value).then(p,d)}o(l,"step"),l((i=i.apply(t,e||[])).next())})};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.summary=Xt.markdownSummary=Xt.SUMMARY_DOCS_URL=Xt.SUMMARY_ENV_VAR=void 0;var I_=require("os"),Hm=require("fs"),{access:B_,appendFile:A_,writeFile:M_}=Hm.promises;Xt.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";Xt.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var Fm=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){return Um(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[Xt.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${Xt.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield B_(e,Hm.constants.R_OK|Hm.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,a,i={}){let r=Object.entries(i).map(([n,s])=>` ${n}="${s}"`).join("");return a?`<${e}${r}>${a}</${e}>`:`<${e}${r}>`}write(e){return Um(this,void 0,void 0,function*(){let a=!!e?.overwrite,i=yield this.filePath();return yield(a?M_:A_)(i,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return Um(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,a=!1){return this._buffer+=e,a?this.addEOL():this}addEOL(){return this.addRaw(I_.EOL)}addCodeBlock(e,a){let i=Object.assign({},a&&{lang:a}),r=this.wrap("pre",this.wrap("code",e),i);return this.addRaw(r).addEOL()}addList(e,a=!1){let i=a?"ol":"ul",r=e.map(s=>this.wrap("li",s)).join(""),n=this.wrap(i,r);return this.addRaw(n).addEOL()}addTable(e){let a=e.map(r=>{let n=r.map(s=>{if(typeof s=="string")return this.wrap("td",s);let{header:p,data:d,colspan:l,rowspan:c}=s,m=p?"th":"td",u=Object.assign(Object.assign({},l&&{colspan:l}),c&&{rowspan:c});return this.wrap(m,d,u)}).join("");return this.wrap("tr",n)}).join(""),i=this.wrap("table",a);return this.addRaw(i).addEOL()}addDetails(e,a){let i=this.wrap("details",this.wrap("summary",e)+a);return this.addRaw(i).addEOL()}addImage(e,a,i){let{width:r,height:n}=i||{},s=Object.assign(Object.assign({},r&&{width:r}),n&&{height:n}),p=this.wrap("img",null,Object.assign({src:e,alt:a},s));return this.addRaw(p).addEOL()}addHeading(e,a){let i=`h${a}`,r=["h1","h2","h3","h4","h5","h6"].includes(i)?i:"h1",n=this.wrap(r,e);return this.addRaw(n).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,a){let i=Object.assign({},a&&{cite:a}),r=this.wrap("blockquote",e,i);return this.addRaw(r).addEOL()}addLink(e,a){let i=this.wrap("a",e,{href:a});return this.addRaw(i).addEOL()}},N6=new Fm;Xt.markdownSummary=N6;Xt.summary=N6});var _6=T(Wt=>{"use strict";var q_=Wt&&Wt.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),L_=Wt&&Wt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),z_=Wt&&Wt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&q_(e,t,a);return L_(e,t),e};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.toPlatformPath=Wt.toWin32Path=Wt.toPosixPath=void 0;var j_=z_(require("path"));function k_(t){return t.replace(/[\\]/g,"/")}o(k_,"toPosixPath");Wt.toPosixPath=k_;function U_(t){return t.replace(/[/]/g,"\\")}o(U_,"toWin32Path");Wt.toWin32Path=U_;function H_(t){return t.replace(/[/\\]/g,j_.sep)}o(H_,"toPlatformPath");Wt.toPlatformPath=H_});var Gm=T(J=>{"use strict";var F_=J&&J.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Line truncated
|
||||
`);return{name:e,version:a}}),"getLinuxInfo");he.platform=U6.default.platform();he.arch=U6.default.arch();he.isWindows=he.platform==="win32";he.isMacOS=he.platform==="darwin";he.isLinux=he.platform==="linux";function wS(){return Kp(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield he.isWindows?vS():he.isMacOS?bS():xS()),{platform:he.platform,arch:he.arch,isWindows:he.isWindows,isMacOS:he.isMacOS,isLinux:he.isLinux})})}o(wS,"getDetails");he.getDetails=wS});var rt=T(X=>{"use strict";var NS=X&&X.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),_S=X&&X.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Qm=X&&X.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&NS(e,t,a);return _S(e,t),e},F6=X&&X.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{l(i.next(c))}catch(m){s(m)}}o(p,"fulfilled");function d(c){try{l(i.throw(c))}catch(m){s(m)}}o(d,"rejected");function l(c){c.done?n(c.value):r(c.value).then(p,d)}o(l,"step"),l((i=i.apply(t,e||[])).next())})};Object.defineProperty(X,"__esModule",{value:!0});X.platform=X.toPlatformPath=X.toWin32Path=X.toPosixPath=X.markdownSummary=X.summary=X.getIDToken=X.getState=X.saveState=X.group=X.endGroup=X.startGroup=X.info=X.notice=X.warning=X.error=X.debug=X.isDebug=X.setFailed=X.setCommandEcho=X.setOutput=X.getBooleanInput=X.getMultilineInput=X.getInput=X.addPath=X.setSecret=X.exportVariable=X.ExitCode=void 0;var va=o6(),Dr=l6(),wn=Lp(),V6=Qm(require("os")),SS=Qm(require("path")),ES=w6(),Ym;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(Ym||(X.ExitCode=Ym={}));function CS(t,e){let a=(0,wn.toCommandValue)(e);if(process.env[t]=a,process.env.GITHUB_ENV||"")return(0,Dr.issueFileCommand)("ENV",(0,Dr.prepareKeyValueMessage)(t,e));(0,va.issueCommand)("set-env",{name:t},a)}o(CS,"exportVariable");X.exportVariable=CS;function TS(t){(0,va.issueCommand)("add-mask",{},t)}o(TS,"setSecret");X.setSecret=TS;function OS(t){process.env.GITHUB_PATH||""?(0,Dr.issueFileCommand)("PATH",t):(0,va.issueCommand)("add-path",{},t),process.env.PATH=`${t}${SS.delimiter}${process.env.PATH}`}o(OS,"addPath");X.addPath=OS;function Jm(t,e){let a=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!a)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?a:a.trim()}o(Jm,"getInput");X.getInput=Jm;function PS(t,e){let a=Jm(t,e).split(`
|
||||
`).filter(i=>i!=="");return e&&e.trimWhitespace===!1?a:a.map(i=>i.trim())}o(PS,"getMultilineInput");X.getMultilineInput=PS;function RS(t,e){let a=["true","True","TRUE"],i=["false","False","FALSE"],r=Jm(t,e);if(a.includes(r))return!0;if(i.includes(r))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}o(RS,"getBooleanInput");X.getBooleanInput=RS;function DS(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,Dr.issueFileCommand)("OUTPUT",(0,Dr.prepareKeyValueMessage)(t,e));process.stdout.write(V6.EOL),(0,va.issueCommand)("set-output",{name:t},(0,wn.toCommandValue)(e))}o(DS,"setOutput");X.setOutput=DS;function IS(t){(0,va.issue)("echo",t?"on":"off")}o(IS,"setCommandEcho");X.setCommandEcho=IS;function BS(t){process.exitCode=Ym.Failure,$6(t)}o(BS,"setFailed");X.setFailed=BS;function AS(){return process.env.RUNNER_DEBUG==="1"}o(AS,"isDebug");X.isDebug=AS;function MS(t){(0,va.issueCommand)("debug",{},t)}o(MS,"debug");X.debug=MS;function $6(t,e={}){(0,va.issueCommand)("error",(0,wn.toCommandProperties)(e),t instanceof Error?t.toString():t)}o($6,"error");X.error=$6;function qS(t,e={}){(0,va.issueCommand)("warning",(0,wn.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(qS,"warning");X.warning=qS;function LS(t,e={}){(0,va.issueCommand)("notice",(0,wn.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(LS,"notice");X.notice=LS;function zS(t){process.stdout.write(t+V6.EOL)}o(zS,"info");X.info=zS;function G6(t){(0,va.issue)("group",t)}o(G6,"startGroup");X.startGroup=G6;function X6(){(0,va.issue)("endgroup")}o(X6,"endGroup");X.endGroup=X6;function jS(t,e){return F6(this,void 0,void 0,function*(){G6(t);let a;try{a=yield e()}finally{X6()}return a})}o(jS,"group");X.group=jS;function kS(t,e){if(process.env.GITHUB_STATE||"")return(0,Dr.issueFileCommand)("STATE",(0,Dr.prepareKeyValueMessage)(t,e));(0,va.issueCommand)("save-state",{name:t},(0,wn.toCommandValue)(e))}o(kS,"saveState");X.saveState=kS;function US(t){return process.env[`STATE_${t}`]||""}o(US,"getState");X.getState=US;function HS(t){return F6(this,void 0,void 0,function*(){return yield ES.OidcClient.getIDToken(t)})}o(HS,"getIDToken");X.getIDToken=HS;var FS=Vm();Object.defineProperty(X,"summary",{enumerable:!0,get:function(){return FS.summary}});var VS=Vm();Object.defineProperty(X,"markdownSummary",{enumerable:!0,get:function(){return VS.markdownSummary}});var Zm=_6();Object.defineProperty(X,"toPosixPath",{enumerable:!0,get:function(){return Zm.toPosixPath}});Object.defineProperty(X,"toWin32Path",{enumerable:!0,get:function(){return Zm.toWin32Path}});Object.defineProperty(X,"toPlatformPath",{enumerable:!0,get:function(){return Zm.toPlatformPath}});X.platform=Qm(H6())});var W6=T(ti=>{"use strict";var $S=ti&&ti.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),GS=ti&&ti.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),XS=ti&&ti.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&$S(e,t,a);return GS(e,t),e};Object.defineProperty(ti,"__esModule",{value:!0});ti.getOptions=void 0;var eu=XS(rt());function WS(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,omitBrokenSymbolicLinks:!0};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,eu.debug(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,eu.debug(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,eu.debug(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`))),e}o(WS,"getOptions");ti.getOptions=WS});var Qp=T(Ve=>{"use strict";var KS=Ve&&Ve.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),YS=Ve&&Ve.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),QS=Ve&&Ve.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&KS(e,t,a);return YS(e,t),e},JS=Ve&&Ve.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.safeTrimTrailingSeparator=Ve.normalizeSeparators=Ve.hasRoot=Ve.hasAbsoluteRoot=Ve.ensureAbsoluteRoot=Ve.dirname=void 0;var Yp=QS(require("path")),Ir=JS(require("assert")),Ki=process.platform==="win32";function ZS(t){if(t=au(t),Ki&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(t))return t;let e=Yp.dirname(t);return Ki&&/^\\\\[^\\]+\\[^\\]+\\$/.test(e)&&(e=au(e)),e}o(ZS,"dirname");Ve.dirname=ZS;function eE(t,e){if(Ir.default(t,"ensureAbsoluteRoot parameter 'root' must not be empty"),Ir.default(e,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),tu(e))return e;if(Ki){if(e.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let a=process.cwd();rLine truncated
|
||||
%s`,g,g,D,i);var _=D.type==="*"?su:D.type==="?"?nu:"\\"+D.type;r=!0,i=i.slice(0,D.reStart)+_+"\\("+g}h(),n&&(i+="\\\\");var O=!1;switch(i.charAt(0)){case"[":case".":case"(":O=!0}for(var N=p.length-1;N>-1;N--){var I=p[N],E=i.slice(0,I.reStart),R=i.slice(I.reStart,I.reEnd-8),A=i.slice(I.reEnd-8,I.reEnd),k=i.slice(I.reEnd);A+=k;var pe=E.split("(").length-1,ge=k;for(b=0;b<pe;b++)ge=ge.replace(/\)[+*?]?/,"");k=ge;var Q="";k===""&&e!==Zp&&(Q="$");var at=E+R+k+Q+A;i=at}if(i!==""&&r&&(i="(?=.)"+i),O&&(i=u+i),e===Zp)return[i,r];if(!r)return PE(t);var fe=a.nocase?"i":"";try{var qa=new RegExp("^"+i+"$",fe)}catch{return new RegExp("$.")}return qa._glob=t,qa._src=i,qa}o(TE,"parse");oa.makeRe=function(t,e){return new Dt(t,e||{}).makeRe()};Dt.prototype.makeRe=OE;function OE(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,a=e.noglobstar?su:e.dot?xE:wE,i=e.nocase?"i":"",r=t.map(function(n){return n.map(function(s){return s===ou?a:typeof s=="string"?RE(s):s._src}).join("\\/")}).join("|");r="^(?:"+r+")$",this.negate&&(r="^(?!"+r+").*$");try{this.regexp=new RegExp(r,i)}catch{this.regexp=!1}return this.regexp}o(OE,"makeRe");oa.match=function(t,e,a){a=a||{};var i=new Dt(e,a);return t=t.filter(function(r){return i.match(r)}),i.options.nonull&&!t.length&&t.push(e),t};Dt.prototype.match=o(function(e,a){if(typeof a>"u"&&(a=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&a)return!0;var i=this.options;to.sep!=="/"&&(e=e.split(to.sep).join("/")),e=e.split(h4),this.debug(this.pattern,"split",e);var r=this.set;this.debug(this.pattern,"set",r);var n,s;for(s=e.length-1;s>=0&&(n=e[s],!n);s--);for(s=0;s<r.length;s++){var p=r[s],d=e;i.matchBase&&p.length===1&&(d=[n]);var l=this.matchOne(d,p,a);if(l)return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate},"match");Dt.prototype.matchOne=function(t,e,a){var i=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var r=0,n=0,s=t.length,p=e.length;r<s&&n<p;r++,n++){this.debug("matchOne loop");var d=e[n],l=t[r];if(this.debug(e,d,l),d===!1)return!1;if(d===ou){this.debug("GLOBSTAR",[e,d,l]);var c=r,m=n+1;if(m===p){for(this.debug("** at the end");r<s;r++)if(t[r]==="."||t[r]===".."||!i.dot&&t[r].charAt(0)===".")return!1;return!0}for(;c<s;){var u=t[c];if(this.debug(`
|
||||
globstar while`,t,c,e,m,u),this.matchOne(t.slice(c),e.slice(m),a))return this.debug("globstar found match!",c,s,u),!0;if(u==="."||u===".."||!i.dot&&u.charAt(0)==="."){this.debug("dot detected!",t,c,e,m);break}this.debug("globstar swallow a segment, and continue"),c++}return!!(a&&(this.debug(`
|
||||
>>> no match, partial?`,t,c,e,m),c===s))}var f;if(typeof d=="string"?(f=l===d,this.debug("string match",d,l,f)):(f=l.match(d),this.debug("pattern match",d,l,f)),!f)return!1}if(r===s&&n===p)return!0;if(r===s)return a;if(n===p)return r===s-1&&t[r]==="";throw new Error("wtf?")};function PE(t){return t.replace(/\\(.)/g,"$1")}o(PE,"globUnescape");function RE(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}o(RE,"regExpEscape")});var x4=T(ba=>{"use strict";var DE=ba&&ba.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),IE=ba&&ba.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),b4=ba&&ba.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&DE(e,t,a);return IE(e,t),e},BE=ba&&ba.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ba,"__esModule",{value:!0});ba.Path=void 0;var ao=b4(require("path")),Qi=b4(Qp()),io=BE(require("assert")),AE=process.platform==="win32",pu=class{static{o(this,"Path")}constructor(e){if(this.segments=[],typeof e=="string")if(io.default(e,"Parameter 'itemPath' must not be empty"),e=Qi.safeTrimTrailingSeparator(e),!Qi.hasRoot(e))this.segments=e.split(ao.sep);else{let a=e,i=Qi.dirname(a);for(;i!==a;){let r=ao.basename(a);this.segments.unshift(r),a=i,i=Qi.dirname(a)}this.segments.unshift(a)}else{io.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let a=0;a<e.length;a++){let i=e[a];io.default(i,"Parameter 'itemPath' must not contain any empty segments"),i=Qi.normalizeSeparators(e[a]),a===0&&Qi.hasRoot(i)?(i=Qi.safeTrimTrailingSeparator(i),io.default(i===Qi.dirname(i),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(i)):(io.default(!i.includes(ao.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(i))}}}toString(){let e=this.segments[0],a=e.endsWith(ao.sep)||AE&&/^[A-Z]:$/i.test(e);for(let i=1;i<this.segments.length;i++)a?a=!1:e+=ao.sep,e+=this.segments[i];return e}};ba.Path=pu});var w4=T(xa=>{"use strict";var ME=xa&&xa.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),qE=xa&&xa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cu=xa&&xa.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&ME(e,t,a);return qE(e,t),e},LE=xa&&xa.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xa,"__esModule",{value:!0});xa.Pattern=void 0;var zE=cu(require("os")),ro=cu(require("path")),Zt=cu(Qp()),Br=LE(require("assert")),jE=v4(),du=Jp(),td=x4(),Ni=process.platform==="win32",lu=class t{static{o(this,"Pattern")}constructor(e,a=!1,i,r){this.negate=!1;let n;if(typeof e=="string")n=e.trim();else{i=i||[],Br.default(i.length,"Parameter 'segments' must not empty");let l=t.getLiteral(i[0]);Br.default(l&&Zt.hasAbsoluteRoot(l),"Parameter 'segments' first element must be a root path"),n=new td.Path(i).toString().trim(),e&&(n=`!${n}`)}for(;n.startsWith("!");)this.negate=!this.negate,n=n.substr(1).trim();n=t.fixupPattern(n,r),this.segments=new td.Path(n).segments,this.trailingSeparator=Zt.normalizeSeparators(n).endsWith(ro.sep),n=Zt.safeTrimTrailingSeparator(n);let s=!1,p=this.segments.map(l=>t.getLiteral(l)).filter(l=>!s&&!(s=l===""));this.searchPath=new td.Path(p).toString(),this.rootRegExp=new RegExp(t.regExpEscape(p[0]),Ni?"i":""),this.isImplicitPattern=a;let d={dot:!0,nobrace:!0,nocase:Ni,nocomment:!0,noext:!0,nonegate:!0};n=Ni?n.replace(/\\/g,"/"):n,this.minimatch=new jE.Minimatch(n,d)}match(e){return this.segments[this.segments.length-1]==="**"?(e=Zt.normalizeSeparators(e),!e.endsWith(ro.sep)&&this.isImplicitPattern===!1&&(e=`${e}${ro.sep}`)):e=Zt.safeTrimTrailingSeparator(e),this.minimatch.match(e)?this.trailingSeparator?du.MatchKind.Directory:du.MatchKind.All:du.MatchKind.None}partialMatch(e){return e=Zt.safeTrimTrailingSeparator(e),Zt.dirname(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(Ni?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(Ni?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,a){Br.default(e,"pattern cannot be empty");let i=new td.Path(e).segments.map(r=>t.getLiteral(r));if(Br.default(i.every((r,n)=>(r!=="."||n===0)&&r!==".."),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`),Br.default(!Zt.hasRoot(e)||i[0],`Invalid pattern '${e}'. Root segment must not contain globs.`),e=Zt.nor
Line truncated
|
||||
Error Message: ${s.message}`)})).result)===null||a===void 0?void 0:a.value;if(!n)throw new Error("Response json body do not have ID Token field");return n})}static getIDToken(e){return H6(this,void 0,void 0,function*(){try{let a=t.getIDTokenUrl();if(e){let r=encodeURIComponent(e);a=`${a}&audience=${r}`}(0,U6.debug)(`ID token url is ${a}`);let i=yield t.getCall(a);return(0,U6.setSecret)(i),i}catch(a){throw new Error(`Error message: ${a.message}`)}})}};wn.OidcClient=em});var rm=E(Wt=>{"use strict";var tm=Wt&&Wt.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.summary=Wt.markdownSummary=Wt.SUMMARY_DOCS_URL=Wt.SUMMARY_ENV_VAR=void 0;var AS=require("os"),am=require("fs"),{access:BS,appendFile:MS,writeFile:LS}=am.promises;Wt.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";Wt.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var im=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){return tm(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[Wt.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${Wt.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield BS(e,am.constants.R_OK|am.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,a,i={}){let r=Object.entries(i).map(([n,s])=>` ${n}="${s}"`).join("");return a?`<${e}${r}>${a}</${e}>`:`<${e}${r}>`}write(e){return tm(this,void 0,void 0,function*(){let a=!!e?.overwrite,i=yield this.filePath();return yield(a?LS:MS)(i,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return tm(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,a=!1){return this._buffer+=e,a?this.addEOL():this}addEOL(){return this.addRaw(AS.EOL)}addCodeBlock(e,a){let i=Object.assign({},a&&{lang:a}),r=this.wrap("pre",this.wrap("code",e),i);return this.addRaw(r).addEOL()}addList(e,a=!1){let i=a?"ol":"ul",r=e.map(s=>this.wrap("li",s)).join(""),n=this.wrap(i,r);return this.addRaw(n).addEOL()}addTable(e){let a=e.map(r=>{let n=r.map(s=>{if(typeof s=="string")return this.wrap("td",s);let{header:p,data:l,colspan:d,rowspan:c}=s,u=p?"th":"td",m=Object.assign(Object.assign({},d&&{colspan:d}),c&&{rowspan:c});return this.wrap(u,l,m)}).join("");return this.wrap("tr",n)}).join(""),i=this.wrap("table",a);return this.addRaw(i).addEOL()}addDetails(e,a){let i=this.wrap("details",this.wrap("summary",e)+a);return this.addRaw(i).addEOL()}addImage(e,a,i){let{width:r,height:n}=i||{},s=Object.assign(Object.assign({},r&&{width:r}),n&&{height:n}),p=this.wrap("img",null,Object.assign({src:e,alt:a},s));return this.addRaw(p).addEOL()}addHeading(e,a){let i=`h${a}`,r=["h1","h2","h3","h4","h5","h6"].includes(i)?i:"h1",n=this.wrap(r,e);return this.addRaw(n).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,a){let i=Object.assign({},a&&{cite:a}),r=this.wrap("blockquote",e,i);return this.addRaw(r).addEOL()}addLink(e,a){let i=this.wrap("a",e,{href:a});return this.addRaw(i).addEOL()}},V6=new im;Wt.markdownSummary=V6;Wt.summary=V6});var $6=E(Xt=>{"use strict";var qS=Xt&&Xt.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),zS=Xt&&Xt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),jS=Xt&&Xt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&qS(e,t,a);return zS(e,t),e};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.toPlatformPath=Xt.toWin32Path=Xt.toPosixPath=void 0;var kS=jS(require("path"));function HS(t){return t.replace(/[\\]/g,"/")}o(HS,"toPosixPath");Xt.toPosixPath=HS;function US(t){return t.replace(/[/]/g,"\\")}o(US,"toWin32Path");Xt.toWin32Path=US;function FS(t){return t.replace(/[/\\]/g,kS.sep)}o(FS,"toPlatformPath");Xt.toPlatformPath=FS});var sm=E(J=>{"use strict";var VS=J&&J.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Line truncated
|
||||
`);return{name:e,version:a}}),"getLinuxInfo");he.platform=l4.default.platform();he.arch=l4.default.arch();he.isWindows=he.platform==="win32";he.isMacOS=he.platform==="darwin";he.isLinux=he.platform==="linux";function NC(){return tl(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield he.isWindows?xC():he.isMacOS?bC():wC()),{platform:he.platform,arch:he.arch,isWindows:he.isWindows,isMacOS:he.isMacOS,isLinux:he.isLinux})})}o(NC,"getDetails");he.getDetails=NC});var rt=E(W=>{"use strict";var _C=W&&W.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),SC=W&&W.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),cm=W&&W.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&_C(e,t,a);return SC(e,t),e},c4=W&&W.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(W,"__esModule",{value:!0});W.platform=W.toPlatformPath=W.toWin32Path=W.toPosixPath=W.markdownSummary=W.summary=W.getIDToken=W.getState=W.saveState=W.group=W.endGroup=W.startGroup=W.info=W.notice=W.warning=W.error=W.debug=W.isDebug=W.setFailed=W.setCommandEcho=W.setOutput=W.getBooleanInput=W.getMultilineInput=W.getInput=W.addPath=W.setSecret=W.exportVariable=W.ExitCode=void 0;var ba=R6(),Dr=D6(),Sn=Fp(),u4=cm(require("os")),CC=cm(require("path")),EC=F6(),dm;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(dm||(W.ExitCode=dm={}));function TC(t,e){let a=(0,Sn.toCommandValue)(e);if(process.env[t]=a,process.env.GITHUB_ENV||"")return(0,Dr.issueFileCommand)("ENV",(0,Dr.prepareKeyValueMessage)(t,e));(0,ba.issueCommand)("set-env",{name:t},a)}o(TC,"exportVariable");W.exportVariable=TC;function OC(t){(0,ba.issueCommand)("add-mask",{},t)}o(OC,"setSecret");W.setSecret=OC;function RC(t){process.env.GITHUB_PATH||""?(0,Dr.issueFileCommand)("PATH",t):(0,ba.issueCommand)("add-path",{},t),process.env.PATH=`${t}${CC.delimiter}${process.env.PATH}`}o(RC,"addPath");W.addPath=RC;function um(t,e){let a=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!a)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?a:a.trim()}o(um,"getInput");W.getInput=um;function PC(t,e){let a=um(t,e).split(`
|
||||
`).filter(i=>i!=="");return e&&e.trimWhitespace===!1?a:a.map(i=>i.trim())}o(PC,"getMultilineInput");W.getMultilineInput=PC;function IC(t,e){let a=["true","True","TRUE"],i=["false","False","FALSE"],r=um(t,e);if(a.includes(r))return!0;if(i.includes(r))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}o(IC,"getBooleanInput");W.getBooleanInput=IC;function DC(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,Dr.issueFileCommand)("OUTPUT",(0,Dr.prepareKeyValueMessage)(t,e));process.stdout.write(u4.EOL),(0,ba.issueCommand)("set-output",{name:t},(0,Sn.toCommandValue)(e))}o(DC,"setOutput");W.setOutput=DC;function AC(t){(0,ba.issue)("echo",t?"on":"off")}o(AC,"setCommandEcho");W.setCommandEcho=AC;function BC(t){process.exitCode=dm.Failure,m4(t)}o(BC,"setFailed");W.setFailed=BC;function MC(){return process.env.RUNNER_DEBUG==="1"}o(MC,"isDebug");W.isDebug=MC;function LC(t){(0,ba.issueCommand)("debug",{},t)}o(LC,"debug");W.debug=LC;function m4(t,e={}){(0,ba.issueCommand)("error",(0,Sn.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(m4,"error");W.error=m4;function qC(t,e={}){(0,ba.issueCommand)("warning",(0,Sn.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(qC,"warning");W.warning=qC;function zC(t,e={}){(0,ba.issueCommand)("notice",(0,Sn.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(zC,"notice");W.notice=zC;function jC(t){process.stdout.write(t+u4.EOL)}o(jC,"info");W.info=jC;function f4(t){(0,ba.issue)("group",t)}o(f4,"startGroup");W.startGroup=f4;function h4(){(0,ba.issue)("endgroup")}o(h4,"endGroup");W.endGroup=h4;function kC(t,e){return c4(this,void 0,void 0,function*(){f4(t);let a;try{a=yield e()}finally{h4()}return a})}o(kC,"group");W.group=kC;function HC(t,e){if(process.env.GITHUB_STATE||"")return(0,Dr.issueFileCommand)("STATE",(0,Dr.prepareKeyValueMessage)(t,e));(0,ba.issueCommand)("save-state",{name:t},(0,Sn.toCommandValue)(e))}o(HC,"saveState");W.saveState=HC;function UC(t){return process.env[`STATE_${t}`]||""}o(UC,"getState");W.getState=UC;function FC(t){return c4(this,void 0,void 0,function*(){return yield EC.OidcClient.getIDToken(t)})}o(FC,"getIDToken");W.getIDToken=FC;var VC=rm();Object.defineProperty(W,"summary",{enumerable:!0,get:function(){return VC.summary}});var $C=rm();Object.defineProperty(W,"markdownSummary",{enumerable:!0,get:function(){return $C.markdownSummary}});var mm=$6();Object.defineProperty(W,"toPosixPath",{enumerable:!0,get:function(){return mm.toPosixPath}});Object.defineProperty(W,"toWin32Path",{enumerable:!0,get:function(){return mm.toWin32Path}});Object.defineProperty(W,"toPlatformPath",{enumerable:!0,get:function(){return mm.toPlatformPath}});W.platform=cm(d4())});var g4=E(ai=>{"use strict";var GC=ai&&ai.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),WC=ai&&ai.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),XC=ai&&ai.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&GC(e,t,a);return WC(e,t),e};Object.defineProperty(ai,"__esModule",{value:!0});ai.getOptions=void 0;var fm=XC(rt());function KC(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,omitBrokenSymbolicLinks:!0};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,fm.debug(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,fm.debug(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,fm.debug(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`))),e}o(KC,"getOptions");ai.getOptions=KC});var il=E(Ve=>{"use strict";var QC=Ve&&Ve.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),YC=Ve&&Ve.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),JC=Ve&&Ve.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&QC(e,t,a);return YC(e,t),e},ZC=Ve&&Ve.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.safeTrimTrailingSeparator=Ve.normalizeSeparators=Ve.hasRoot=Ve.hasAbsoluteRoot=Ve.ensureAbsoluteRoot=Ve.dirname=void 0;var al=JC(require("path")),Ar=ZC(require("assert")),Qi=process.platform==="win32";function eE(t){if(t=gm(t),Qi&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(t))return t;let e=al.dirname(t);return Qi&&/^\\\\[^\\]+\\[^\\]+\\$/.test(e)&&(e=gm(e)),e}o(eE,"dirname");Ve.dirname=eE;function tE(t,e){if(Ar.default(t,"ensureAbsoluteRoot parameter 'root' must not be empty"),Ar.default(e,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),hm(e))return e;if(Qi){if(e.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let a=process.cwd();rLine truncated
|
||||
%s`,g,g,I,i);var _=I.type==="*"?bm:I.type==="?"?xm:"\\"+I.type;r=!0,i=i.slice(0,I.reStart)+_+"\\("+g}h(),n&&(i+="\\\\");var O=!1;switch(i.charAt(0)){case"[":case".":case"(":O=!0}for(var N=p.length-1;N>-1;N--){var D=p[N],C=i.slice(0,D.reStart),P=i.slice(D.reStart,D.reEnd-8),B=i.slice(D.reEnd-8,D.reEnd),k=i.slice(D.reEnd);B+=k;var pe=C.split("(").length-1,ge=k;for(x=0;x<pe;x++)ge=ge.replace(/\)[+*?]?/,"");k=ge;var Y="";k===""&&e!==nl&&(Y="$");var at=C+P+k+Y+B;i=at}if(i!==""&&r&&(i="(?=.)"+i),O&&(i=m+i),e===nl)return[i,r];if(!r)return PE(t);var fe=a.nocase?"i":"";try{var za=new RegExp("^"+i+"$",fe)}catch{return new RegExp("$.")}return za._glob=t,za._src=i,za}o(OE,"parse");pa.makeRe=function(t,e){return new It(t,e||{}).makeRe()};It.prototype.makeRe=RE;function RE(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,a=e.noglobstar?bm:e.dot?wE:NE,i=e.nocase?"i":"",r=t.map(function(n){return n.map(function(s){return s===wm?a:typeof s=="string"?IE(s):s._src}).join("\\/")}).join("|");r="^(?:"+r+")$",this.negate&&(r="^(?!"+r+").*$");try{this.regexp=new RegExp(r,i)}catch{this.regexp=!1}return this.regexp}o(RE,"makeRe");pa.match=function(t,e,a){a=a||{};var i=new It(e,a);return t=t.filter(function(r){return i.match(r)}),i.options.nonull&&!t.length&&t.push(e),t};It.prototype.match=o(function(e,a){if(typeof a>"u"&&(a=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&a)return!0;var i=this.options;so.sep!=="/"&&(e=e.split(so.sep).join("/")),e=e.split(q4),this.debug(this.pattern,"split",e);var r=this.set;this.debug(this.pattern,"set",r);var n,s;for(s=e.length-1;s>=0&&(n=e[s],!n);s--);for(s=0;s<r.length;s++){var p=r[s],l=e;i.matchBase&&p.length===1&&(l=[n]);var d=this.matchOne(l,p,a);if(d)return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate},"match");It.prototype.matchOne=function(t,e,a){var i=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var r=0,n=0,s=t.length,p=e.length;r<s&&n<p;r++,n++){this.debug("matchOne loop");var l=e[n],d=t[r];if(this.debug(e,l,d),l===!1)return!1;if(l===wm){this.debug("GLOBSTAR",[e,l,d]);var c=r,u=n+1;if(u===p){for(this.debug("** at the end");r<s;r++)if(t[r]==="."||t[r]===".."||!i.dot&&t[r].charAt(0)===".")return!1;return!0}for(;c<s;){var m=t[c];if(this.debug(`
|
||||
globstar while`,t,c,e,u,m),this.matchOne(t.slice(c),e.slice(u),a))return this.debug("globstar found match!",c,s,m),!0;if(m==="."||m===".."||!i.dot&&m.charAt(0)==="."){this.debug("dot detected!",t,c,e,u);break}this.debug("globstar swallow a segment, and continue"),c++}return!!(a&&(this.debug(`
|
||||
>>> no match, partial?`,t,c,e,u),c===s))}var f;if(typeof l=="string"?(f=d===l,this.debug("string match",l,d,f)):(f=d.match(l),this.debug("pattern match",l,d,f)),!f)return!1}if(r===s&&n===p)return!0;if(r===s)return a;if(n===p)return r===s-1&&t[r]==="";throw new Error("wtf?")};function PE(t){return t.replace(/\\(.)/g,"$1")}o(PE,"globUnescape");function IE(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}o(IE,"regExpEscape")});var U4=E(wa=>{"use strict";var DE=wa&&wa.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),AE=wa&&wa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),H4=wa&&wa.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&DE(e,t,a);return AE(e,t),e},BE=wa&&wa.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wa,"__esModule",{value:!0});wa.Path=void 0;var oo=H4(require("path")),Ji=H4(il()),po=BE(require("assert")),ME=process.platform==="win32",Nm=class{static{o(this,"Path")}constructor(e){if(this.segments=[],typeof e=="string")if(po.default(e,"Parameter 'itemPath' must not be empty"),e=Ji.safeTrimTrailingSeparator(e),!Ji.hasRoot(e))this.segments=e.split(oo.sep);else{let a=e,i=Ji.dirname(a);for(;i!==a;){let r=oo.basename(a);this.segments.unshift(r),a=i,i=Ji.dirname(a)}this.segments.unshift(a)}else{po.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let a=0;a<e.length;a++){let i=e[a];po.default(i,"Parameter 'itemPath' must not contain any empty segments"),i=Ji.normalizeSeparators(e[a]),a===0&&Ji.hasRoot(i)?(i=Ji.safeTrimTrailingSeparator(i),po.default(i===Ji.dirname(i),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(i)):(po.default(!i.includes(oo.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(i))}}}toString(){let e=this.segments[0],a=e.endsWith(oo.sep)||ME&&/^[A-Z]:$/i.test(e);for(let i=1;i<this.segments.length;i++)a?a=!1:e+=oo.sep,e+=this.segments[i];return e}};wa.Path=Nm});var F4=E(Na=>{"use strict";var LE=Na&&Na.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),qE=Na&&Na.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Cm=Na&&Na.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&LE(e,t,a);return qE(e,t),e},zE=Na&&Na.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Na,"__esModule",{value:!0});Na.Pattern=void 0;var jE=Cm(require("os")),lo=Cm(require("path")),Zt=Cm(il()),Br=zE(require("assert")),kE=k4(),_m=rl(),ol=U4(),_i=process.platform==="win32",Sm=class t{static{o(this,"Pattern")}constructor(e,a=!1,i,r){this.negate=!1;let n;if(typeof e=="string")n=e.trim();else{i=i||[],Br.default(i.length,"Parameter 'segments' must not empty");let d=t.getLiteral(i[0]);Br.default(d&&Zt.hasAbsoluteRoot(d),"Parameter 'segments' first element must be a root path"),n=new ol.Path(i).toString().trim(),e&&(n=`!${n}`)}for(;n.startsWith("!");)this.negate=!this.negate,n=n.substr(1).trim();n=t.fixupPattern(n,r),this.segments=new ol.Path(n).segments,this.trailingSeparator=Zt.normalizeSeparators(n).endsWith(lo.sep),n=Zt.safeTrimTrailingSeparator(n);let s=!1,p=this.segments.map(d=>t.getLiteral(d)).filter(d=>!s&&!(s=d===""));this.searchPath=new ol.Path(p).toString(),this.rootRegExp=new RegExp(t.regExpEscape(p[0]),_i?"i":""),this.isImplicitPattern=a;let l={dot:!0,nobrace:!0,nocase:_i,nocomment:!0,noext:!0,nonegate:!0};n=_i?n.replace(/\\/g,"/"):n,this.minimatch=new kE.Minimatch(n,l)}match(e){return this.segments[this.segments.length-1]==="**"?(e=Zt.normalizeSeparators(e),!e.endsWith(lo.sep)&&this.isImplicitPattern===!1&&(e=`${e}${lo.sep}`)):e=Zt.safeTrimTrailingSeparator(e),this.minimatch.match(e)?this.trailingSeparator?_m.MatchKind.Directory:_m.MatchKind.All:_m.MatchKind.None}partialMatch(e){return e=Zt.safeTrimTrailingSeparator(e),Zt.dirname(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(_i?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(_i?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,a){Br.default(e,"pattern cannot be empty");let i=new ol.Path(e).segments.map(r=>t.getLiteral(r));if(Br.default(i.every((r,n)=>(r!=="."||n===0)&&r!==".."),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`),Br.default(!Zt.hasRoot(e)||i[0],`Invalid pattern '${e}'. Root segment must not contain globs.`),e=Zt.nor
Line truncated
|
||||
`),e=e.replace(/\r/g,`
|
||||
`));let r=e.split(`
|
||||
`).map(n=>n.trim());for(let n of r)!n||n.startsWith("#")||i.patterns.push(new E4.Pattern(n));return i.searchPaths.push(...id.getSearchPaths(i.patterns)),i})}static stat(e,a,i){return uu(this,void 0,void 0,function*(){let r;if(a.followSymbolicLinks)try{r=yield no.promises.stat(e.path)}catch(n){if(n.code==="ENOENT"){if(a.omitBrokenSymbolicLinks){fu.debug(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw n}else r=yield no.promises.lstat(e.path);if(r.isDirectory()&&a.followSymbolicLinks){let n=yield no.promises.realpath(e.path);for(;i.length>=e.level;)i.pop();if(i.some(s=>s===n)){fu.debug(`Symlink cycle detected for path '${e.path}' and realpath '${n}'`);return}i.push(n)}return r})}};vt.DefaultGlobber=hu});var O4=T(_n=>{"use strict";var GE=_n&&_n.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{l(i.next(c))}catch(m){s(m)}}o(p,"fulfilled");function d(c){try{l(i.throw(c))}catch(m){s(m)}}o(d,"rejected");function l(c){c.done?n(c.value):r(c.value).then(p,d)}o(l,"step"),l((i=i.apply(t,e||[])).next())})};Object.defineProperty(_n,"__esModule",{value:!0});_n.create=void 0;var XE=T4();function WE(t,e){return GE(this,void 0,void 0,function*(){return yield XE.DefaultGlobber.create(t,e)})}o(WE,"create");_n.create=WE});var pd=T((ie,B4)=>{ie=B4.exports=se;var Se;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?Se=o(function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)},"debug"):Se=o(function(){},"debug");ie.SEMVER_SPEC_VERSION="2.0.0";var oo=256,rd=Number.MAX_SAFE_INTEGER||9007199254740991,gu=16,KE=oo-6,Sn=ie.re=[],_e=ie.safeRe=[],M=ie.src=[],B=ie.tokens={},D4=0;function de(t){B[t]=D4++}o(de,"tok");var vu="[a-zA-Z0-9-]",yu=[["\\s",1],["\\d",oo],[vu,KE]];function lo(t){for(var e=0;e<yu.length;e++){var a=yu[e][0],i=yu[e][1];t=t.split(a+"*").join(a+"{0,"+i+"}").split(a+"+").join(a+"{1,"+i+"}")}return t}o(lo,"makeSafeRe");de("NUMERICIDENTIFIER");M[B.NUMERICIDENTIFIER]="0|[1-9]\\d*";de("NUMERICIDENTIFIERLOOSE");M[B.NUMERICIDENTIFIERLOOSE]="\\d+";de("NONNUMERICIDENTIFIER");M[B.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+vu+"*";de("MAINVERSION");M[B.MAINVERSION]="("+M[B.NUMERICIDENTIFIER]+")\\.("+M[B.NUMERICIDENTIFIER]+")\\.("+M[B.NUMERICIDENTIFIER]+")";de("MAINVERSIONLOOSE");M[B.MAINVERSIONLOOSE]="("+M[B.NUMERICIDENTIFIERLOOSE]+")\\.("+M[B.NUMERICIDENTIFIERLOOSE]+")\\.("+M[B.NUMERICIDENTIFIERLOOSE]+")";de("PRERELEASEIDENTIFIER");M[B.PRERELEASEIDENTIFIER]="(?:"+M[B.NUMERICIDENTIFIER]+"|"+M[B.NONNUMERICIDENTIFIER]+")";de("PRERELEASEIDENTIFIERLOOSE");M[B.PRERELEASEIDENTIFIERLOOSE]="(?:"+M[B.NUMERICIDENTIFIERLOOSE]+"|"+M[B.NONNUMERICIDENTIFIER]+")";de("PRERELEASE");M[B.PRERELEASE]="(?:-("+M[B.PRERELEASEIDENTIFIER]+"(?:\\."+M[B.PRERELEASEIDENTIFIER]+")*))";de("PRERELEASELOOSE");M[B.PRERELEASELOOSE]="(?:-?("+M[B.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+M[B.PRERELEASEIDENTIFIERLOOSE]+")*))";de("BUILDIDENTIFIER");M[B.BUILDIDENTIFIER]=vu+"+";de("BUILD");M[B.BUILD]="(?:\\+("+M[B.BUILDIDENTIFIER]+"(?:\\."+M[B.BUILDIDENTIFIER]+")*))";de("FULL");de("FULLPLAIN");M[B.FULLPLAIN]="v?"+M[B.MAINVERSION]+M[B.PRERELEASE]+"?"+M[B.BUILD]+"?";M[B.FULL]="^"+M[B.FULLPLAIN]+"$";de("LOOSEPLAIN");M[B.LOOSEPLAIN]="[v=\\s]*"+M[B.MAINVERSIONLOOSE]+M[B.PRERELEASELOOSE]+"?"+M[B.BUILD]+"?";de("LOOSE");M[B.LOOSE]="^"+M[B.LOOSEPLAIN]+"$";de("GTLT");M[B.GTLT]="((?:<|>)?=?)";de("XRANGEIDENTIFIERLOOSE");M[B.XRANGEIDENTIFIERLOOSE]=M[B.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";de("XRANGEIDENTIFIER");M[B.XRANGEIDENTIFIER]=M[B.NUMERICIDENTIFIER]+"|x|X|\\*";de("XRANGEPLAIN");M[B.XRANGEPLAIN]="[v=\\s]*("+M[B.XRANGEIDENTIFIER]+")(?:\\.("+M[B.XRANGEIDENTIFIER]+")(?:\\.("+M[B.XRANGEIDENTIFIER]+")(?:"+M[B.PRERELEASE]+")?"+M[B.BUILD]+"?)?)?";de("XRANGEPLAINLOOSE");M[B.XRANGEPLAINLOOSE]="[v=\\s]*("+M[B.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+M[B.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+M[B.XRANGEIDENTIFIERLOOSE]+")(?:"+M[B.PRERELEASELOOSE]+")?"+M[B.BUILD]+"?)?)?";de("XRANGE");M[B.XRANGE]="^"+M[B.GTLT]+"\\s*"+M[B.XRANGEPLAIN]+"$";de("XRANGELOOSE");M[B.XRANGELOOSE]="^"+M[B.GTLT]+"\\s*"+M[B.XRANGEPLAINLOOSE]+"$";de("COERCE");M[B.COERCE]="(^|[^\\d])(\\d{1,"+gu+"})(?:\\.(\\d{1,"+gu+"}))?(?:\\.(\\d{1,"+gu+"}))?(?:$|[^\\d])";de("COERCERTL");Sn[B.COERCERTL]=new RegExp(M[B.COERCE],"g");_e[B.COERCERTL]=new RegExp(lo(M[B.COERCE]),"g");de("LONETILDE");M[B.LONETILDE]="(?:~>?)";de("TILDETRIM");M[B.TILDETRIM]="(\\s*)"+M[B.LONETILDE]+"\\s+";Sn[B.TILDETRIM]=new RegExp(M[B.TILDETRIM],"g");_e[B.TILDETRIM]=new RegExp(lo(M[B.TILDETRIM]),"g");var YE="$1~";de("TILDE");M[B.TILDE]="^"+M[B.LONETILDE]+M[B.XRANGEPLAIN]+"$";de("TILDELOOSE");M[B.TILDELOOSE]="^"+M[B.LONETILDE]+M[B.XRANGEPLAINLOOSE]+"$";de("LONECARET");M[B.LONECARET]="(?:\\^)";de("CARETTRIM");M[B.CARETTRIM]="(\\s*)"+M[B.LONECARET]+"\\s+";Sn[B.CARETTRIM]=new
Line truncated
|
||||
`),{implicitDescendants:!1});try{for(var l=!0,c=AC(d.globGenerator()),m;m=yield c.next(),e=m.done,!e;l=!0){r=m.value,l=!1;let u=r,f=dd.relative(p,u).replace(new RegExp(`\\${dd.sep}`,"g"),"/");co.debug(`Matched: ${f}`),f===""?s.push("."):s.push(`${f}`)}}catch(u){a={error:u}}finally{try{!l&&!e&&(i=c.return)&&(yield i.call(c))}finally{if(a)throw a.error}}return s})}o(HC,"resolvePaths");be.resolvePaths=HC;function FC(t){return Tn(this,void 0,void 0,function*(){return zC.promisify(_u.unlink)(t)})}o(FC,"unlinkFile");be.unlinkFile=FC;function j4(t,e=[]){return Tn(this,void 0,void 0,function*(){let a="";e.push("--version"),co.debug(`Checking ${t} ${e.join(" ")}`);try{yield MC.exec(`${t}`,e,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i=>a+=i.toString(),stderr:i=>a+=i.toString()}})}catch(i){co.debug(i.message)}return a=a.trim(),co.debug(a),a})}o(j4,"getVersion");function VC(){return Tn(this,void 0,void 0,function*(){let t=yield j4("zstd",["--quiet"]),e=LC.clean(t);return co.debug(`zstd version: ${e}`),t===""?qr.CompressionMethod.Gzip:qr.CompressionMethod.ZstdWithoutLong})}o(VC,"getCompressionMethod");be.getCompressionMethod=VC;function $C(t){return t===qr.CompressionMethod.Gzip?qr.CacheFilename.Gzip:qr.CacheFilename.Zstd}o($C,"getCacheFileName");be.getCacheFileName=$C;function GC(){return Tn(this,void 0,void 0,function*(){return _u.existsSync(qr.GnuTarPathOnWindows)?qr.GnuTarPathOnWindows:(yield j4("tar")).toLowerCase().includes("gnu tar")?L4.which("tar"):""})}o(GC,"getGnuTarPathOnWindows");be.getGnuTarPathOnWindows=GC;function XC(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}o(XC,"assertDefined");be.assertDefined=XC;function WC(t,e,a=!1){let i=t.slice();return e&&i.push(e),process.platform==="win32"&&!a&&i.push("windows-only"),i.push(jC),z4.createHash("sha256").update(i.join("|")).digest("hex")}o(WC,"getCacheVersion");be.getCacheVersion=WC;function KC(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}o(KC,"getRuntimeToken");be.getRuntimeToken=KC});function mo(){return ld>cd.length-16&&(k4.default.randomFillSync(cd),ld=0),cd.slice(ld,ld+=16)}var k4,cd,ld,Su=qt(()=>{k4=La(require("crypto")),cd=new Uint8Array(256),ld=cd.length;o(mo,"rng")});var U4,H4=qt(()=>{U4=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function YC(t){return typeof t=="string"&&U4.test(t)}var Zi,uo=qt(()=>{H4();o(YC,"validate");Zi=YC});function QC(t,e=0){let a=(It[t[e+0]]+It[t[e+1]]+It[t[e+2]]+It[t[e+3]]+"-"+It[t[e+4]]+It[t[e+5]]+"-"+It[t[e+6]]+It[t[e+7]]+"-"+It[t[e+8]]+It[t[e+9]]+"-"+It[t[e+10]]+It[t[e+11]]+It[t[e+12]]+It[t[e+13]]+It[t[e+14]]+It[t[e+15]]).toLowerCase();if(!Zi(a))throw TypeError("Stringified UUID is invalid");return a}var It,er,fo=qt(()=>{uo();It=[];for(let t=0;t<256;++t)It.push((t+256).toString(16).substr(1));o(QC,"stringify");er=QC});function JC(t,e,a){let i=e&&a||0,r=e||new Array(16);t=t||{};let n=t.node||F4,s=t.clockseq!==void 0?t.clockseq:Eu;if(n==null||s==null){let u=t.random||(t.rng||mo)();n==null&&(n=F4=[u[0]|1,u[1],u[2],u[3],u[4],u[5]]),s==null&&(s=Eu=(u[6]<<8|u[7])&16383)}let p=t.msecs!==void 0?t.msecs:Date.now(),d=t.nsecs!==void 0?t.nsecs:Tu+1,l=p-Cu+(d-Tu)/1e4;if(l<0&&t.clockseq===void 0&&(s=s+1&16383),(l<0||p>Cu)&&t.nsecs===void 0&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Cu=p,Tu=d,Eu=s,p+=122192928e5;let c=((p&268435455)*1e4+d)%4294967296;r[i++]=c>>>24&255,r[i++]=c>>>16&255,r[i++]=c>>>8&255,r[i++]=c&255;let m=p/4294967296*1e4&268435455;r[i++]=m>>>8&255,r[i++]=m&255,r[i++]=m>>>24&15|16,r[i++]=m>>>16&255,r[i++]=s>>>8|128,r[i++]=s&255;for(let u=0;u<6;++u)r[i+u]=n[u];return e||er(r)}var F4,Eu,Cu,Tu,V4,$4=qt(()=>{Su();fo();Cu=0,Tu=0;o(JC,"v1");V4=JC});function ZC(t){if(!Zi(t))throw TypeError("Invalid UUID");let e,a=new Uint8Array(16);return a[0]=(e=parseInt(t.slice(0,8),16))>>>24,a[1]=e>>>16&255,a[2]=e>>>8&255,a[3]=e&255,a[4]=(e=parseInt(t.slice(9,13),16))>>>8,a[5]=e&255,a[6]=(e=parseInt(t.slice(14,18),16))>>>8,a[7]=e&255,a[8]=(e=parseInt(t.slice(19,23),16))>>>8,a[9]=e&255,a[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,a[11]=e/4294967296&255,a[12]=e>>>24&255,a[13]=e>>>16&255,a[14]=e>>>8&255,a[15]=e&255,a}var md,Ou=qt(()=>{uo();o(ZC,"parse");md=ZC});function eT(t){t=unescape(encodeURIComponent(t));let e=[];for(let a=0;a<t.length;++a)e.push(t.charCodeAt(a));return e}function ho(t,e,a){function i(r,n,s,p){if(typeof r=="string"&&(r=eT(r)),typeof n=="string"&&(n=md(n)),n.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let d=new Uint8Array(16+r.length);if(d.set(n),d.set(r,n.length),d=a(d),d[6]=d[6]&15|e,d[8]=d[8]&63|128,s){p=p||0;for(let l=0;l<16;++l)s[p+l]=d[l];return s}return er(d)}o(i,"generateUUID");try{i.name=t}catch{}return i.DNS=tT,i.URL=aT,i}var tT,aT,Pu=qt(()=>{fo();Ou();o(eT,"stringToBytes");tT="6ba7b810-9dad-11d1-80b4-00c04fd430c8",aT
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(Iu)});var ii=T((I3,tr)=>{(function(){var t,e,a,i,r,n,s,p=[].slice,d={}.hasOwnProperty;t=o(function(){var l,c,m,u,f,h;if(h=arguments[0],f=2<=arguments.length?p.call(arguments,1):[],r(Object.assign))Object.assign.apply(null,arguments);else for(l=0,m=f.length;l<m;l++)if(u=f[l],u!=null)for(c in u)d.call(u,c)&&(h[c]=u[c]);return h},"assign"),r=o(function(l){return!!l&&Object.prototype.toString.call(l)==="[object Function]"},"isFunction"),n=o(function(l){var c;return!!l&&((c=typeof l)=="function"||c==="object")},"isObject"),a=o(function(l){return r(Array.isArray)?Array.isArray(l):Object.prototype.toString.call(l)==="[object Array]"},"isArray"),i=o(function(l){var c;if(a(l))return!l.length;for(c in l)if(d.call(l,c))return!1;return!0},"isEmpty"),s=o(function(l){var c,m;return n(l)&&(m=Object.getPrototypeOf(l))&&(c=m.constructor)&&typeof c=="function"&&c instanceof c&&Function.prototype.toString.call(c)===Function.prototype.toString.call(Object)},"isPlainObject"),e=o(function(l){return r(l.valueOf)?l.valueOf():l},"getValue"),tr.exports.assign=t,tr.exports.isFunction=r,tr.exports.isObject=n,tr.exports.isArray=a,tr.exports.isEmpty=i,tr.exports.isPlainObject=s,tr.exports.getValue=e}).call(I3)});var Bu=T((B3,A3)=>{(function(){var t;A3.exports=t=function(){function e(){}return o(e,"XMLDOMImplementation"),e.prototype.hasFeature=function(a,i){return!0},e.prototype.createDocumentType=function(a,i,r){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(a,i,r){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(a){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(a,i){throw new Error("This DOM method is not implemented.")},e}()}).call(B3)});var L3=T((M3,q3)=>{(function(){var t;q3.exports=t=function(){function e(){}return o(e,"XMLDOMErrorHandler"),e.prototype.handleError=function(a){throw new Error(a)},e}()}).call(M3)});var k3=T((z3,j3)=>{(function(){var t;j3.exports=t=function(){function e(a){this.arr=a||[]}return o(e,"XMLDOMStringList"),Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(a){return this.arr[a]||null},e.prototype.contains=function(a){return this.arr.indexOf(a)!==-1},e}()}).call(z3)});var F3=T((U3,H3)=>{(function(){var t,e,a;e=L3(),a=k3(),H3.exports=t=function(){function i(){var r;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=r=Object.create(this.defaultParams)}return o(i,"XMLDOMConfiguration"),Object.defineProperty(i.prototype,"parameterNames",{get:function(){return new a(Object.keys(this.defaultParams))}}),i.prototype.getParameter=function(r){return this.params.hasOwnProperty(r)?this.params[r]:null},i.prototype.canSetParameter=function(r,n){return!0},i.prototype.setParameter=function(r,n){return n!=null?this.params[r]=n:delete this.params[r]},i}()}).call(U3)});var nt=T((V3,$3)=>{(function(){$3.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(V3)});var Au=T((G3,X3)=>{(function(){var t,e,a;t=nt(),a=pa(),X3.exports=e=function(){function i(r,n,s){if(this.parent=r,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),n==null)throw new Error("Missing attribute name. "+this.debugInfo(n));this.name=this.stringify.name(n),this.value=this.stringify.attValue(s),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return o(i,"XMLAttribute"),Object.defineProperty(i.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(i.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(i.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(i.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(i.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(i.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(i.prototype,"specified",{get:function(){return!0}}),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(r){return this.options.writer.attribute(this,this.options.writer.filterOptions(r))},i.prototype.debugInfo=function(r){return r=r||this.name,r==null?"parent: <"+this.parent.name+">":"attribute: {"+r+"}, parent: <"+this.parent.name+">"},i.prototype.isEqualNode=function(r){return!(r.namespaceURI!==thi
Line truncated
|
||||
`,y.offset=(O=w.offset)!=null?O:0,y.dontPrettyTextNodes=(N=(I=w.dontPrettyTextNodes)!=null?I:w.dontprettytextnodes)!=null?N:0,y.spaceBeforeSlash=(E=(R=w.spaceBeforeSlash)!=null?R:w.spacebeforeslash)!=null?E:"",y.spaceBeforeSlash===!0&&(y.spaceBeforeSlash=" "),y.suppressPrettyCount=0,y.user={},y.state=e.None,y},D.prototype.indent=function(w,y,g){var _;return!y.pretty||y.suppressPrettyCount?"":y.pretty&&(_=(g||0)+y.offset+1,_>0)?new Array(_).join(y.indent):""},D.prototype.endline=function(w,y,g){return!y.pretty||y.suppressPrettyCount?"":y.newline},D.prototype.attribute=function(w,y,g){var _;return this.openAttribute(w,y,g),_=" "+w.name+'="'+w.value+'"',this.closeAttribute(w,y,g),_},D.prototype.cdata=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g)+"<![CDATA[",y.state=e.InsideTag,_+=w.value,y.state=e.CloseTag,_+="]]>"+this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),_},D.prototype.comment=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g)+"<!-- ",y.state=e.InsideTag,_+=w.value,y.state=e.CloseTag,_+=" -->"+this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),_},D.prototype.declaration=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g)+"<?xml",y.state=e.InsideTag,_+=' version="'+w.version+'"',w.encoding!=null&&(_+=' encoding="'+w.encoding+'"'),w.standalone!=null&&(_+=' standalone="'+w.standalone+'"'),y.state=e.CloseTag,_+=y.spaceBeforeSlash+"?>",_+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),_},D.prototype.docType=function(w,y,g){var _,O,N,I,E;if(g||(g=0),this.openNode(w,y,g),y.state=e.OpenTag,I=this.indent(w,y,g),I+="<!DOCTYPE "+w.root().name,w.pubID&&w.sysID?I+=' PUBLIC "'+w.pubID+'" "'+w.sysID+'"':w.sysID&&(I+=' SYSTEM "'+w.sysID+'"'),w.children.length>0){for(I+=" [",I+=this.endline(w,y,g),y.state=e.InsideTag,E=w.children,O=0,N=E.length;O<N;O++)_=E[O],I+=this.writeChildNode(_,y,g+1);y.state=e.CloseTag,I+="]"}return y.state=e.CloseTag,I+=y.spaceBeforeSlash+">",I+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),I},D.prototype.element=function(w,y,g){var _,O,N,I,E,R,A,k,pe,ge,Q,at,fe,qa;g||(g=0),ge=!1,Q="",this.openNode(w,y,g),y.state=e.OpenTag,Q+=this.indent(w,y,g)+"<"+w.name,at=w.attribs;for(pe in at)S.call(at,pe)&&(_=at[pe],Q+=this.attribute(_,y,g));if(N=w.children.length,I=N===0?null:w.children[0],N===0||w.children.every(function($t){return($t.type===t.Text||$t.type===t.Raw)&&$t.value===""}))y.allowEmpty?(Q+=">",y.state=e.CloseTag,Q+="</"+w.name+">"+this.endline(w,y,g)):(y.state=e.CloseTag,Q+=y.spaceBeforeSlash+"/>"+this.endline(w,y,g));else if(y.pretty&&N===1&&(I.type===t.Text||I.type===t.Raw)&&I.value!=null)Q+=">",y.state=e.InsideTag,y.suppressPrettyCount++,ge=!0,Q+=this.writeChildNode(I,y,g+1),y.suppressPrettyCount--,ge=!1,y.state=e.CloseTag,Q+="</"+w.name+">"+this.endline(w,y,g);else{if(y.dontPrettyTextNodes){for(fe=w.children,E=0,A=fe.length;E<A;E++)if(O=fe[E],(O.type===t.Text||O.type===t.Raw)&&O.value!=null){y.suppressPrettyCount++,ge=!0;break}}for(Q+=">"+this.endline(w,y,g),y.state=e.InsideTag,qa=w.children,R=0,k=qa.length;R<k;R++)O=qa[R],Q+=this.writeChildNode(O,y,g+1);y.state=e.CloseTag,Q+=this.indent(w,y,g)+"</"+w.name+">",ge&&y.suppressPrettyCount--,Q+=this.endline(w,y,g),y.state=e.None}return this.closeNode(w,y,g),Q},D.prototype.writeChildNode=function(w,y,g){switch(w.type){case t.CData:return this.cdata(w,y,g);case t.Comment:return this.comment(w,y,g);case t.Element:return this.element(w,y,g);case t.Raw:return this.raw(w,y,g);case t.Text:return this.text(w,y,g);case t.ProcessingInstruction:return this.processingInstruction(w,y,g);case t.Dummy:return"";case t.Declaration:return this.declaration(w,y,g);case t.DocType:return this.docType(w,y,g);case t.AttributeDeclaration:return this.dtdAttList(w,y,g);case t.ElementDeclaration:return this.dtdElement(w,y,g);case t.EntityDeclaration:return this.dtdEntity(w,y,g);case t.NotationDeclaration:return this.dtdNotation(w,y,g);default:throw new Error("Unknown XML node type: "+w.constructor.name)}},D.prototype.processingInstruction=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g)+"<?",y.state=e.InsideTag,_+=w.target,w.value&&(_+=" "+w.value),y.state=e.CloseTag,_+=y.spaceBeforeSlash+"?>",_+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),_},D.prototype.raw=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g),y.state=e.InsideTag,_+=w.value,y.state=e.CloseTag,_+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),_},D.prototype.text=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g),y.state=e.InsideTag,_+=w.value,y.state=e.CloseTag,_+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),_},D.prototype.dtdAttList=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g)+"<!ATTLIST",y.state=e.InsideTag,_+=" "+w.elementName+" "+w.attributeName+" "+w.attribut
Line truncated
|
||||
`||x==="\r"||x===" "}o(w,"isWhitespace");function y(x){return x==='"'||x==="'"}o(y,"isQuote");function g(x){return x===">"||w(x)}o(g,"isAttribEnd");function _(x,v){return x.test(v)}o(_,"isMatch");function O(x,v){return!_(x,v)}o(O,"notMatch");var N=0;t.STATE={BEGIN:N++,BEGIN_WHITESPACE:N++,TEXT:N++,TEXT_ENTITY:N++,OPEN_WAKA:N++,SGML_DECL:N++,SGML_DECL_QUOTED:N++,DOCTYPE:N++,DOCTYPE_QUOTED:N++,DOCTYPE_DTD:N++,DOCTYPE_DTD_QUOTED:N++,COMMENT_STARTING:N++,COMMENT:N++,COMMENT_ENDING:N++,COMMENT_ENDED:N++,CDATA:N++,CDATA_ENDING:N++,CDATA_ENDING_2:N++,PROC_INST:N++,PROC_INST_BODY:N++,PROC_INST_ENDING:N++,OPEN_TAG:N++,OPEN_TAG_SLASH:N++,ATTRIB:N++,ATTRIB_NAME:N++,ATTRIB_NAME_SAW_WHITE:N++,ATTRIB_VALUE:N++,ATTRIB_VALUE_QUOTED:N++,ATTRIB_VALUE_CLOSED:N++,ATTRIB_VALUE_UNQUOTED:N++,ATTRIB_VALUE_ENTITY_Q:N++,ATTRIB_VALUE_ENTITY_U:N++,CLOSE_TAG:N++,CLOSE_TAG_SAW_WHITE:N++,SCRIPT:N++,SCRIPT_ENDING:N++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(x){var v=t.ENTITIES[x],q=typeof v=="number"?String.fromCharCode(v):v;t.ENTITIES[x]=q});for(var I in t.STATE)t.STATE[t.STATE[I]]=I;N=t.STATE;function E(x,v,q){x[v]&&x[v](q)}o(E,"emit");function R(x,v,q){x.textNode&&A(x),E(x,v,q)}o(R,"emitNode");function A(x){x.textNode=k(x.opt,x.textNode),x.textNode&&E(x,"ontext",x.textNode),x.textNode=""}o(A,"closeText");function k(x,v){return x.trim&&(v=v.trim()),x.normalize&&(v=v.replace(/\s+/g," ")),v}o(k,"textopts");function pe(x,v){return A(x),x.trackPosition&&(v+=`
|
||||
Line: `+x.line+`
|
||||
Column: `+x.column+`
|
||||
Char: `+x.c),v=new Error(v),x.error=v,E(x,"onerror",v),x}o(pe,"error");function ge(x){return x.sawRoot&&!x.closedRoot&&Q(x,"Unclosed root tag"),x.state!==N.BEGIN&&x.state!==N.BEGIN_WHITESPACE&&x.state!==N.TEXT&&pe(x,"Unexpected end"),A(x),x.c="",x.closed=!0,E(x,"onend"),a.call(x,x.strict,x.opt),x}o(ge,"end");function Q(x,v){if(typeof x!="object"||!(x instanceof a))throw new Error("bad call to strictFail");x.strict&&pe(x,v)}o(Q,"strictFail");function at(x){x.strict||(x.tagName=x.tagName[x.looseCase]());var v=x.tags[x.tags.length-1]||x,q=x.tag={name:x.tagName,attributes:{}};x.opt.xmlns&&(q.ns=v.ns),x.attribList.length=0,R(x,"onopentagstart",q)}o(at,"newTag");function fe(x,v){var q=x.indexOf(":"),P=q<0?["",x]:x.split(":"),Oe=P[0],lt=P[1];return v&&x==="xmlns"&&(Oe="xmlns",lt=""),{prefix:Oe,local:lt}}o(fe,"qname");function qa(x){if(x.strict||(x.attribName=x.attribName[x.looseCase]()),x.attribList.indexOf(x.attribName)!==-1||x.tag.attributes.hasOwnProperty(x.attribName)){x.attribName=x.attribValue="";return}if(x.opt.xmlns){var v=fe(x.attribName,!0),q=v.prefix,P=v.local;if(q==="xmlns")if(P==="xml"&&x.attribValue!==u)Q(x,"xml: prefix must be bound to "+u+`
|
||||
Actual: `+x.attribValue);else if(P==="xmlns"&&x.attribValue!==f)Q(x,"xmlns: prefix must be bound to "+f+`
|
||||
Actual: `+x.attribValue);else{var Oe=x.tag,lt=x.tags[x.tags.length-1]||x;Oe.ns===lt.ns&&(Oe.ns=Object.create(lt.ns)),Oe.ns[P]=x.attribValue}x.attribList.push([x.attribName,x.attribValue])}else x.tag.attributes[x.attribName]=x.attribValue,R(x,"onattribute",{name:x.attribName,value:x.attribValue});x.attribName=x.attribValue=""}o(qa,"attrib");function $t(x,v){if(x.opt.xmlns){var q=x.tag,P=fe(x.tagName);q.prefix=P.prefix,q.local=P.local,q.uri=q.ns[P.prefix]||"",q.prefix&&!q.uri&&(Q(x,"Unbound namespace prefix: "+JSON.stringify(x.tagName)),q.uri=P.prefix);var Oe=x.tags[x.tags.length-1]||x;q.ns&&Oe.ns!==q.ns&&Object.keys(q.ns).forEach(function(t6){R(x,"onopennamespace",{prefix:t6,uri:q.ns[t6]})});for(var lt=0,yt=x.attribList.length;lt<yt;lt++){var Gt=x.attribList[lt],Ja=Gt[0],fn=Gt[1],Rt=fe(Ja,!0),xi=Rt.prefix,GN=Rt.local,e6=xi===""?"":q.ns[xi]||"",Tm={name:Ja,value:fn,prefix:xi,local:GN,uri:e6};xi&&xi!=="xmlns"&&!e6&&(Q(x,"Unbound namespace prefix: "+JSON.stringify(xi)),Tm.uri=xi),x.tag.attributes[Ja]=Tm,R(x,"onattribute",Tm)}x.attribList.length=0}x.tag.isSelfClosing=!!v,x.sawRoot=!0,x.tags.push(x.tag),R(x,"onopentag",x.tag),v||(!x.noscript&&x.tagName.toLowerCase()==="script"?x.state=N.SCRIPT:x.state=N.TEXT,x.tag=null,x.tagName=""),x.attribName=x.attribValue="",x.attribList.length=0}o($t,"openTag");function un(x){if(!x.tagName){Q(x,"Weird empty close tag."),x.textNode+="</>",x.state=N.TEXT;return}if(x.script){if(x.tagName!=="script"){x.script+="</"+x.tagName+">",x.tagName="",x.state=N.SCRIPT;return}R(x,"onscript",x.script),x.script=""}var v=x.tags.length,q=x.tagName;x.strict||(q=q[x.looseCase]());for(var P=q;v--;){var Oe=x.tags[v];if(Oe.name!==P)Q(x,"Unexpected close tag");else break}if(v<0){Q(x,"Unmatched closing tag: "+x.tagName),x.textNode+="</"+x.tagName+">",x.state=N.TEXT;return}x.tagName=q;for(var lt=x.tags.length;lt-- >v;){var yt=x.tag=x.tags.pop();x.tagName=x.tag.name,R(x,"onclosetag",x.tagName);var Gt={};for(var Ja in yt.ns)Gt[Ja]=yt.ns[Ja];var fn=x.tags[x.tags.length-1]||x;x.opt.xmlns&&yt.ns!==fn.ns&&Object.keys(yt.ns).forEach(function(Rt){var xi=yt.ns[Rt];R(x,"onclosenamespace",{prefix:Rt,uri:xi})})}v===0&&(x.closedRoot=!0),x.tagName=x.attribValue=x.attribName="",x.attribList.length=0,x.state=N.TEXT}o(un,"closeTag");function Ys(x){var v=x.entity,q=v.toLowerCase(),P,Oe="";return x.ENTITIES[v]?x.ENTITIES[v]:x.ENTITIES[q]?x.ENTITIES[q]:(v=q,v.charAt(0)==="#"&&(v.charAt(1)==="x"?(v=v.slice(2),P=parseInt(v,16),Oe=P.toString(16)):(v=v.slice(1),P=parseInt(v,10),Oe=P.toString(10))),v=v.replace(/^0+/,""),isNaN(P)||Oe.toLowerCase()!==v?(Q(x,"Invalid character entity"),"&"+x.entity+";"):String.fromCodePoint(P))}o(Ys,"parseEntity");function Jh(x,v){v==="<"?(x.state=N.OPEN_WAKA,x.startTagPosition=x.position):w(v)||(Q(x,"Non-whitespace before first tag."),x.textNode=v,x.state=N.TEXT)}o(Jh,"beginWhiteSpace");function Zh(x,v){var q="";return v<x.length&&(q=x.charAt(v)),q}o(Zh,"charAt");function $N(x){var v=this;if(this.error)throw this.error;if(v.closed)return pe(v,"Cannot write after close. Assign an onready handler.");if(x===null)return ge(v);typeof x=="object"&&(x=x.toString());for(var q=0,P="";P=Zh(x,q++),v.c=P,!!P;)switch(v.trackPosition&&(v.position++,P===`
|
||||
`?(v.line++,v.column=0):v.column++),v.state){case N.BEGIN:if(v.state=N.BEGIN_WHITESPACE,P==="\uFEFF")continue;Jh(v,P);continue;case N.BEGIN_WHITESPACE:Jh(v,P);continue;case N.TEXT:if(v.sawRoot&&!v.closedRoot){for(var Oe=q-1;P&&P!=="<"&&P!=="&";)P=Zh(x,q++),P&&v.trackPosition&&(v.position++,P===`
|
||||
`?(v.line++,v.column=0):v.column++);v.textNode+=x.substring(Oe,q-1)}P==="<"&&!(v.sawRoot&&v.closedRoot&&!v.strict)?(v.state=N.OPEN_WAKA,v.startTagPosition=v.position):(!w(P)&&(!v.sawRoot||v.closedRoot)&&Q(v,"Text data outside of root node."),P==="&"?v.state=N.TEXT_ENTITY:v.textNode+=P);continue;case N.SCRIPT:P==="<"?v.state=N.SCRIPT_ENDING:v.script+=P;continue;case N.SCRIPT_ENDING:P==="/"?v.state=N.CLOSE_TAG:(v.script+="<"+P,v.state=N.SCRIPT);continue;case N.OPEN_WAKA:if(P==="!")v.state=N.SGML_DECL,v.sgmlDecl="";else if(!w(P))if(_(b,P))v.state=N.OPEN_TAG,v.tagName=P;else if(P==="/")v.state=N.CLOSE_TAG,v.tagName="";else if(P==="?")v.state=N.PROC_INST,v.procInstName=v.procInstBody="";else{if(Q(v,"Unencoded <"),v.startTagPosition+1<v.position){var lt=v.position-v.startTagPosition;P=new Array(lt).join(" ")+P}v.textNode+="<"+P,v.state=N.TEXT}continue;case N.SGML_DECL:(v.sgmlDecl+P).toUpperCase()===c?(R(v,"onopencdata"),v.state=N.CDATA,v.sgmlDecl="",v.cdata=""):v.sgmlDecl+P==="--"?(v.state=N.COMMENT,v.comment="",v.sgmlDecl=""):(v.sgmlDecl+P).toUpperCase()===m?(v.state=N.DOCTYPE,(v.doctype||v.sawRoot)&&Q(v,"Inappropriately located doctype declaration"),v.doctype="",v.sgmlDecl=""):P===">"?(R(v,"onsgmldeclaration",v.sgmlDecl),v.sgmlDecl="",v.state=N.TEXT):(y(P)&&(v.state=N.SGML_DECL_QUOTED),v.sgmlDecl+=P);continue;case N.SGML_DECL_QUOTED:P===v.q&&(v.state=N.SGML_DECL,v.q=""),v.sgmlDecl+=P;continue;case N.DOCTYPE:P===">"?(v.state=N.TEXT,R(v,"ondoctype",v.doctype),v.doctype=!0):(v.doctype+=P,P==="["?v.state=N.DOCTYPE_DTD:y(P)&&(v.state=N.DOCTYPE_QUOTED,v.q=P));continue;case N.DOCTYPE_QUOTED:v.doctype+=P,P===v.q&&(v.q="",v.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:v.doctype+=P,P==="]"?v.state=N.DOCTYPE:y(P)&&(v.state=N.DOCTYPE_DTD_QUOTED,v.q=P);continue;case N.DOCTYPE_DTD_QUOTED:v.doctype+=P,P===v.q&&(v.state=N.DOCTYPE_DTD,v.q="");continue;case N.COMMENT:P==="-"?v.state=N.COMMENT_ENDING:v.comment+=P;continue;case N.COMMENT_ENDING:P==="-"?(v.state=N.COMMENT_ENDED,v.comment=k(v.opt,v.comment),v.comment&&R(v,"oncomment",v.comment),v.comment=""):(v.comment+="-"+P,v.state=N.COMMENT);continue;case N.COMMENT_ENDED:P!==">"?(Q(v,"Malformed comment"),v.comment+="--"+P,v.state=N.COMMENT):v.state=N.TEXT;continue;case N.CDATA:P==="]"?v.state=N.CDATA_ENDING:v.cdata+=P;continue;case N.CDATA_ENDING:P==="]"?v.state=N.CDATA_ENDING_2:(v.cdata+="]"+P,v.state=N.CDATA);continue;case N.CDATA_ENDING_2:P===">"?(v.cdata&&R(v,"oncdata",v.cdata),R(v,"onclosecdata"),v.cdata="",v.state=N.TEXT):P==="]"?v.cdata+="]":(v.cdata+="]]"+P,v.state=N.CDATA);continue;case N.PROC_INST:P==="?"?v.state=N.PROC_INST_ENDING:w(P)?v.state=N.PROC_INST_BODY:v.procInstName+=P;continue;case N.PROC_INST_BODY:if(!v.procInstBody&&w(P))continue;P==="?"?v.state=N.PROC_INST_ENDING:v.procInstBody+=P;continue;case N.PROC_INST_ENDING:P===">"?(R(v,"onprocessinginstruction",{name:v.procInstName,body:v.procInstBody}),v.procInstName=v.procInstBody="",v.state=N.TEXT):(v.procInstBody+="?"+P,v.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:_(C,P)?v.tagName+=P:(at(v),P===">"?$t(v):P==="/"?v.state=N.OPEN_TAG_SLASH:(w(P)||Q(v,"Invalid character in tag name"),v.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:P===">"?($t(v,!0),un(v)):(Q(v,"Forward-slash in opening tag not followed by >"),v.state=N.ATTRIB);continue;case N.ATTRIB:if(w(P))continue;P===">"?$t(v):P==="/"?v.state=N.OPEN_TAG_SLASH:_(b,P)?(v.attribName=P,v.attribValue="",v.state=N.ATTRIB_NAME):Q(v,"Invalid attribute name");continue;case N.ATTRIB_NAME:P==="="?v.state=N.ATTRIB_VALUE:P===">"?(Q(v,"Attribute without value"),v.attribValue=v.attribName,qa(v),$t(v)):w(P)?v.state=N.ATTRIB_NAME_SAW_WHITE:_(C,P)?v.attribName+=P:Q(v,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if(P==="=")v.state=N.ATTRIB_VALUE;else{if(w(P))continue;Q(v,"Attribute without value"),v.tag.attributes[v.attribName]="",v.attribValue="",R(v,"onattribute",{name:v.attribName,value:""}),v.attribName="",P===">"?$t(v):_(b,P)?(v.attribName=P,v.state=N.ATTRIB_NAME):(Q(v,"Invalid attribute name"),v.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(w(P))continue;y(P)?(v.q=P,v.state=N.ATTRIB_VALUE_QUOTED):(Q(v,"Unquoted attribute value"),v.state=N.ATTRIB_VALUE_UNQUOTED,v.attribValue=P);continue;case N.ATTRIB_VALUE_QUOTED:if(P!==v.q){P==="&"?v.state=N.ATTRIB_VALUE_ENTITY_Q:v.attribValue+=P;continue}qa(v),v.q="",v.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:w(P)?v.state=N.ATTRIB:P===">"?$t(v):P==="/"?v.state=N.OPEN_TAG_SLASH:_(b,P)?(Q(v,"No whitespace between attributes"),v.attribName=P,v.attribValue="",v.state=N.ATTRIB_NAME):Q(v,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(!g(P)){P==="&"?v.state=N.ATTRIB_VALUE_ENTITY_U:v.attribValue+=P;continue}qa(v),P===">"?$t(v):v.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(v.tagName)P===">"?un(v):_(C,P)?v.tagName+=P:v.script?(v.script+="</"+v.tagName,v.tagName="",v.state=N.SCRIPT):(w(P)||Q(v,"Invalid tagname in closing tag"),v.state=N.CLOSE_TAG_SAW_WHITE);else{if(w(P))continue;O
Line truncated
|
||||
`;ye.DEFAULT_CONTENT_TYPE="application/octet-stream";ye.prototype.append=function(t,e,a){a=a||{},typeof a=="string"&&(a={filename:a});var i=h1.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),Y5.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(t,e,a),n=this._multiPartFooter();i(r),i(e),i(n),this._trackLength(r,e,a)};ye.prototype._trackLength=function(t,e,a){var i=0;a.knownLength!=null?i+=+a.knownLength:Buffer.isBuffer(e)?i=e.length:typeof e=="string"&&(i=Buffer.byteLength(e)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(t)+ye.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof BO))&&(a.knownLength||this._valuesToMeasure.push(e))};ye.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):IO.stat(t.path,function(a,i){var r;if(a){e(a);return}r=i.size-(t.start?t.start:0),e(null,r)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(a){t.pause(),e(null,+a.headers["content-length"])}),t.resume()):e("Unknown stream")};ye.prototype._multiPartHeader=function(t,e,a){if(typeof a.header=="string")return a.header;var i=this._getContentDisposition(e,a),r=this._getContentType(e,a),n="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(i||[]),"Content-Type":[].concat(r||[])};typeof a.header=="object"&&f1(s,a.header);var p;for(var d in s)s.hasOwnProperty(d)&&(p=s[d],p!=null&&(Array.isArray(p)||(p=[p]),p.length&&(n+=d+": "+p.join("; ")+ye.LINE_BREAK)));return"--"+this.getBoundary()+ye.LINE_BREAK+n+ye.LINE_BREAK};ye.prototype._getContentDisposition=function(t,e){var a,i;return typeof e.filepath=="string"?a=m1.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?a=m1.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(a=m1.basename(t.client._httpMessage.path||"")),a&&(i='filename="'+a+'"'),i};ye.prototype._getContentType=function(t,e){var a=e.contentType;return!a&&t.name&&(a=u1.lookup(t.name)),!a&&t.path&&(a=u1.lookup(t.path)),!a&&t.readable&&t.hasOwnProperty("httpVersion")&&(a=t.headers["content-type"]),!a&&(e.filepath||e.filename)&&(a=u1.lookup(e.filepath||e.filename)),!a&&typeof t=="object"&&(a=ye.DEFAULT_CONTENT_TYPE),a};ye.prototype._multiPartFooter=function(){return function(t){var e=ye.LINE_BREAK,a=this._streams.length===0;a&&(e+=this._lastBoundary()),t(e)}.bind(this)};ye.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ye.LINE_BREAK};ye.prototype.getHeaders=function(t){var e,a={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(a[e.toLowerCase()]=t[e]);return a};ye.prototype.setBoundary=function(t){this._boundary=t};ye.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};ye.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),a=0,i=this._streams.length;a<i;a++)typeof this._streams[a]!="function"&&(Buffer.isBuffer(this._streams[a])?t=Buffer.concat([t,this._streams[a]]):t=Buffer.concat([t,Buffer.from(this._streams[a])]),(typeof this._streams[a]!="string"||this._streams[a].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(ye.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};ye.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};ye.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};ye.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};ye.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}AO.parallel(this._valuesToMeasure,this._lengthRetriever,function(a,i){if(a){t(a);return}i.forEach(function(r){e+=r}),t(null,e)})};ye.prototype.submit=function(t,e){var a,i,r={method:"post"};return typeof t=="string"?(t=DO(t),i=f1({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},r)):(i=f1(t,r),i.port||(i.port=i.protocol=="https:"?443:80)),i.headers=this.getHeaders(t.headers),i.protocol=="https:"?a=RO.request(i):a=PO.request(i),this.getLength(function(n,s){if(n&&n!=="Unknown stream"){this._error(n);return}if(s&&a.setHeader("Content-Length",s),this.pipe(a),e){var p,d=o(function(l,c){return a.removeListener("error",d),a.removeListener("response",p),e.call(this,l,c)},"callback");p=d.bind(this,null),a.on("error",d),a.on("response",p)}}.bind(this)),a};ye.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit
Line truncated
|
||||
${TI.sanitize(this)}`}};la.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";la.PARSE_ERROR="PARSE_ERROR";var Va=ED.createClientLogger("core-http");function Qg(t,e){return t?e.httpsAgent:e.httpAgent}o(Qg,"getCachedAgent");var Fl=class extends RD.Transform{static{o(this,"ReportTransform")}constructor(e){super(),this.progressCallback=e,this.loadedBytes=0}_transform(e,a,i){this.push(e),this.loadedBytes+=e.length,this.progressCallback({loadedBytes:this.loadedBytes}),i(void 0)}};function ql(t){return t&&typeof t.pipe=="function"}o(ql,"isReadableStream");function Jg(t,e){return new Promise(a=>{t.once("close",()=>{e?.abort(),a()}),t.once("end",a),t.once("error",a)})}o(Jg,"isStreamComplete");function OI(t){let e=new lr;return t.forEach((a,i)=>{e.set(i,a)}),e}o(OI,"parseHeaders");var Vl=class{static{o(this,"NodeFetchHttpClient")}constructor(){this.proxyAgentMap=new Map,this.keepAliveAgents={}}async sendRequest(e){var a;if(!e&&typeof e!="object")throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.");let i=new Ll.AbortController,r;if(e.abortSignal){if(e.abortSignal.aborted)throw new Ll.AbortError("The operation was aborted.");r=o(l=>{l.type==="abort"&&i.abort()},"abortListener"),e.abortSignal.addEventListener("abort",r)}if(e.timeout&&setTimeout(()=>{i.abort()},e.timeout),e.formData){let l=e.formData,c=new BD.default,m=o((f,h)=>{typeof h=="function"&&(h=h()),h&&Object.prototype.hasOwnProperty.call(h,"value")&&Object.prototype.hasOwnProperty.call(h,"options")?c.append(f,h.value,h.options):c.append(f,h)},"appendFormValue");for(let f of Object.keys(l)){let h=l[f];if(Array.isArray(h))for(let b=0;b<h.length;b++)m(f,h[b]);else m(f,h)}e.body=c,e.formData=void 0;let u=e.headers.get("Content-Type");u&&u.indexOf("multipart/form-data")!==-1&&(typeof c.getBoundary=="function"?e.headers.set("Content-Type",`multipart/form-data; boundary=${c.getBoundary()}`):e.headers.remove("Content-Type"))}let n=e.body?typeof e.body=="function"?e.body():e.body:void 0;if(e.onUploadProgress&&e.body){let l=e.onUploadProgress,c=new Fl(l);ql(n)?n.pipe(c):c.end(n),n=c}let s=await this.prepareRequest(e),p=Object.assign({body:n,headers:e.headers.rawHeaders(),method:e.method,signal:i.signal,redirect:"manual"},s),d;try{let l=await this.fetch(e.url,p),c=OI(l.headers),m=((a=e.streamResponseStatusCodes)===null||a===void 0?void 0:a.has(l.status))||e.streamResponseBody;d={headers:c,request:e,status:l.status,readableStreamBody:m?l.body:void 0,bodyAsText:m?void 0:await l.text()};let u=e.onDownloadProgress;if(u){let f=l.body||void 0;if(ql(f)){let h=new Fl(u);f.pipe(h),d.readableStreamBody=h}else{let h=parseInt(c.get("Content-Length"))||void 0;h&&u({loadedBytes:h})}}return await this.processRequest(d),d}catch(l){let c=l;throw c.code==="ENOTFOUND"?new la(c.message,la.REQUEST_SEND_ERROR,void 0,e):c.type==="aborted"?new Ll.AbortError("The operation was aborted."):c}finally{if(e.abortSignal&&r){let l=Promise.resolve();ql(n)&&(l=Jg(n));let c=Promise.resolve();ql(d?.readableStreamBody)&&(c=Jg(d.readableStreamBody,i)),Promise.all([l,c]).then(()=>{var m;(m=e.abortSignal)===null||m===void 0||m.removeEventListener("abort",r)}).catch(m=>{Va.warning("Error when cleaning up abortListener on httpRequest",m)})}}}getOrCreateAgent(e){var a;let i=Ef(e.url);if(e.proxySettings){let{host:r,port:n,username:s,password:p}=e.proxySettings,d=`${r}:${n}:${s}:${p}`,l=(a=this.proxyAgentMap.get(d))!==null&&a!==void 0?a:{},c=Qg(i,l);if(c)return c;let m=_I(e.url,e.proxySettings,e.headers);return c=m.agent,m.isHttps?l.httpsAgent=m.agent:l.httpAgent=m.agent,this.proxyAgentMap.set(d,l),c}else if(e.keepAlive){let r=Qg(i,this.keepAliveAgents);if(r)return r;let n={keepAlive:e.keepAlive};return i?r=this.keepAliveAgents.httpsAgent=new Gg.Agent(n):r=this.keepAliveAgents.httpAgent=new $g.Agent(n),r}else return i?Gg.globalAgent:$g.globalAgent}async fetch(e,a){return AD.default(e,a)}async prepareRequest(e){let a={};return a.agent=this.getOrCreateAgent(e),a.compress=e.decompressResponse,a}async processRequest(e){}};F.HttpPipelineLogLevel=void 0;(function(t){t[t.OFF=0]="OFF",t[t.ERROR=1]="ERROR",t[t.WARNING=2]="WARNING",t[t.INFO=3]="INFO"})(F.HttpPipelineLogLevel||(F.HttpPipelineLogLevel={}));function PI(t){let{requestOptions:e,tracingOptions:a}=t,r=_D.__rest(t,["requestOptions","tracingOptions"]);return e&&(r=Object.assign(Object.assign({},r),e)),a&&(r.tracingContext=a.tracingContext,r.spanOptions=a?.spanOptions),r}o(PI,"operationOptionsToRequestOptionsBase");var ut=class{static{o(this,"BaseRequestPolicy")}constructor(e,a){this._nextPolicy=e,this._options=a}shouldLog(e){return this._options.shouldLog(e)}log(e,a){this._options.log(e,a)}},$l=class{static{o(this,"RequestPolicyOptions")}constructor(e){this._logger=e}shouldLog(e){return!!this._logger&&e!==F.HttpPipelineLogLevel.OFF&&e<=this._logger.minimumLogLevel}log(e,a){this._logger&&this.shouldLog(e)&&this._logger.log(e,a)}},vy={explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:mt,explicitArray:!0,ignore
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1},jl=Object.assign({},vy);jl.explicitArray=!1;var Uo=Object.assign({},vy);Uo.explicitArray=!1;Uo.renderOpts={pretty:!1};function Cf(t,e={}){var a;return Uo.rootName=e.rootName,Uo.charkey=(a=e.xmlCharKey)!==null&&a!==void 0?a:Bi,new oy.Builder(Uo).buildObject(t)}o(Cf,"stringifyXML");function by(t,e={}){var a;jl.explicitRoot=!!e.includeRoot,jl.charkey=(a=e.xmlCharKey)!==null&&a!==void 0?a:Bi;let i=new oy.Parser(jl);return new Promise((r,n)=>{t?i.parseString(t,(s,p)=>{s?n(s):r(p)}):n(new Error("Document is empty"))})}o(by,"parseXML");function Yf(t,e){return{create:(a,i)=>new Tf(a,i,t,e)}}o(Yf,"deserializationPolicy");var xy=["application/json","text/json"],wy=["application/xml","application/atom+xml"],RI={expectedContentTypes:{json:xy,xml:wy}},Tf=class extends ut{static{o(this,"DeserializationPolicy")}constructor(e,a,i,r={}){var n;super(e,a),this.jsonContentTypes=i&&i.json||xy,this.xmlContentTypes=i&&i.xml||wy,this.xmlCharKey=(n=r.xmlCharKey)!==null&&n!==void 0?n:Bi}async sendRequest(e){return this._nextPolicy.sendRequest(e).then(a=>Ny(this.jsonContentTypes,this.xmlContentTypes,a,{xmlCharKey:this.xmlCharKey}))}};function DI(t){let e,a=t.request,i=a.operationSpec;if(i){let r=a.operationResponseGetter;r?e=r(i,t):e=i.responses[t.status]}return e}o(DI,"getOperationResponse");function II(t){let e=t.request.shouldDeserialize,a;return e===void 0?a=!0:typeof e=="boolean"?a=e:a=e(t),a}o(II,"shouldDeserializeResponse");function Ny(t,e,a,i={}){var r,n,s;let p={rootName:(r=i.rootName)!==null&&r!==void 0?r:"",includeRoot:(n=i.includeRoot)!==null&&n!==void 0?n:!1,xmlCharKey:(s=i.xmlCharKey)!==null&&s!==void 0?s:Bi};return MI(t,e,a,p).then(d=>{if(!II(d))return d;let l=d.request.operationSpec;if(!l||!l.responses)return d;let c=DI(d),{error:m,shouldReturnResponse:u}=AI(d,l,c);if(m)throw m;if(u)return d;if(c){if(c.bodyMapper){let f=d.parsedBody;l.isXML&&c.bodyMapper.type.name===Gr.Sequence&&(f=typeof f=="object"?f[c.bodyMapper.xmlElementName]:[]);try{d.parsedBody=l.serializer.deserialize(c.bodyMapper,f,"operationRes.parsedBody",i)}catch(h){throw new la(`Error ${h} occurred in deserializing the responseBody - ${d.bodyAsText}`,void 0,d.status,d.request,d)}}else l.httpMethod==="HEAD"&&(d.parsedBody=a.status>=200&&a.status<300);c.headersMapper&&(d.parsedHeaders=l.serializer.deserialize(c.headersMapper,d.headers.toJson(),"operationRes.parsedHeaders",i))}return d})}o(Ny,"deserializeResponseBody");function BI(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}o(BI,"isOperationSpecEmpty");function AI(t,e,a){var i;let r=200<=t.status&&t.status<300;if(BI(e)?r:!!a)if(a){if(!a.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let s=a??e.responses.default,d=((i=t.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(t.status))||t.request.streamResponseBody?`Unexpected status code: ${t.status}`:t.bodyAsText,l=new la(d,void 0,t.status,t.request,t);if(!s)throw l;let c=s.bodyMapper,m=s.headersMapper;try{if(t.parsedBody){let u=t.parsedBody,f;if(c){let b=u;e.isXML&&c.type.name===Gr.Sequence&&(b=typeof u=="object"?u[c.xmlElementName]:[]),f=e.serializer.deserialize(c,b,"error.response.parsedBody")}let h=u.error||f||u;l.code=h.code,h.message&&(l.message=h.message),c&&(l.response.parsedBody=f)}t.headers&&m&&(l.response.parsedHeaders=e.serializer.deserialize(m,t.headers.toJson(),"operationRes.parsedHeaders"))}catch(u){l.message=`Error "${u.message}" occurred in deserializing the responseBody - "${t.bodyAsText}" for the default response.`}return{error:l,shouldReturnResponse:!1}}o(AI,"handleErrorResponse");function MI(t,e,a,i){var r;let n=o(p=>{let d=`Error "${p}" occurred while parsing the response body - ${a.bodyAsText}.`,l=p.code||la.PARSE_ERROR,c=new la(d,l,a.status,a.request,a);return Promise.reject(c)},"errorHandler");if(!(((r=a.request.streamResponseStatusCodes)===null||r===void 0?void 0:r.has(a.status))||a.request.streamResponseBody)&&a.bodyAsText){let p=a.bodyAsText,d=a.headers.get("Content-Type")||"",l=d?d.split(";").map(c=>c.toLowerCase()):[];if(l.length===0||l.some(c=>t.indexOf(c)!==-1))return new Promise(c=>{a.parsedBody=JSON.parse(p),c(a)}).catch(n);if(l.some(c=>e.indexOf(c)!==-1))return by(p,i).then(c=>(a.parsedBody=c,a)).catch(n)}return Promise.resolve(a)}o(MI,"parse");var _y={enable:!0};function Sy(t){return{create:(e,a)=>new Of(e,a,t||_y)}}o(Sy,"keepAlivePolicy");var Of=class extends ut{static{o(this,"KeepAlivePolicy")}constructor(e,a,i){super(e,a),this.keepAliveOptions=i}async sendRequest(e){return e.keepAlive=this.keepAliveOptions.enable,this._nextPolicy.sendRequest(e)}},Zg=["GET","HEAD"],qI={handleRedirects:!0,maxRetries:20};function Qf(t=20){return{create:(e,a)=>new Pf(e,a,t)}}o(Qf,"redirectPolicy");var Pf=class extends ut{static{o(this,"RedirectPolicy")}constructor(e,a,i=20){super(e,a),this.maxRetries=i}sendRequest(e){return this._nextPolicy.sendRequest(e).then(a=>Ey(this,a,0))}};functi
Line truncated
|
||||
`).join(""))}return this._nextPolicy.sendRequest(e)}},Dy=[],Iy=!1,KI=new Map;function YI(){if(!process)return;let t=zl(Ea.HTTPS_PROXY),e=zl(Ea.ALL_PROXY),a=zl(Ea.HTTP_PROXY);return t||e||a}o(YI,"loadEnvironmentProxyValue");function QI(t,e,a){if(e.length===0)return!1;let i=li.parse(t).getHost();if(a?.has(i))return a.get(i);let r=!1;for(let n of e)n[0]==="."?(i.endsWith(n)||i.length===n.length-1&&i===n.slice(1))&&(r=!0):i===n&&(r=!0);return a?.set(i,r),r}o(QI,"isBypassed");function JI(){let t=zl(Ea.NO_PROXY);return Iy=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}o(JI,"loadNoProxy");function By(t){if(!t&&(t=YI(),!t))return;let{username:e,password:a,urlWithoutAuth:i}=ZI(t),r=li.parse(i);return{host:(r.getScheme()?r.getScheme()+"://":"")+r.getHost(),port:Number.parseInt(r.getPort()||"80"),username:e,password:a}}o(By,"getDefaultProxySettings");function n0(t,e){return t||(t=By()),Iy||Dy.push(...JI()),{create:(a,i)=>new Lf(a,i,t,e?.customNoProxyList)}}o(n0,"proxyPolicy");function ZI(t){let e=t.indexOf("@");if(e===-1)return{urlWithoutAuth:t};let a=t.indexOf("://"),i=a!==-1?a+3:0,r=t.substring(i,e),n=r.indexOf(":"),s=n!==-1,p=s?r.substring(0,n):r,d=s?r.substring(n+1):void 0,l=t.substring(0,i)+t.substring(e+1);return{username:p,password:d,urlWithoutAuth:l}}o(ZI,"extractAuthFromUrl");var Lf=class extends ut{static{o(this,"ProxyPolicy")}constructor(e,a,i,r){super(e,a),this.proxySettings=i,this.customNoProxyList=r}sendRequest(e){var a;return!e.proxySettings&&!QI(e.url,(a=this.customNoProxyList)!==null&&a!==void 0?a:Dy,this.customNoProxyList?void 0:KI)&&(e.proxySettings=this.proxySettings),this._nextPolicy.sendRequest(e)}};function eB(t=30){return{create:(e,a)=>new zf(e,a,t)}}o(eB,"rpRegistrationPolicy");var zf=class extends ut{static{o(this,"RPRegistrationPolicy")}constructor(e,a,i=30){super(e,a),this._retryTimeout=i}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then(a=>tB(this,e,a))}};function tB(t,e,a){if(a.status===409){let i=aB(a.bodyAsText);if(i){let r=iB(e.url);return rB(t,r,i,e).catch(()=>!1).then(n=>n?(e.headers.set("x-ms-client-request-id",Wl()),t._nextPolicy.sendRequest(e.clone())):a)}}return Promise.resolve(a)}o(tB,"registerIfNeeded");function Ay(t,e=!1){let a=t.clone();return e&&(a.url=t.url),a.headers.set("x-ms-client-request-id",Wl()),a.headers.set("Content-Type","application/json; charset=utf-8"),a}o(Ay,"getRequestEssentials");function aB(t){let e,a;if(t){try{a=JSON.parse(t)}catch{}if(a&&a.error&&a.error.message&&a.error.code&&a.error.code==="MissingSubscriptionRegistration"){let i=a.error.message.match(/.*'(.*)'/i);i&&(e=i.pop())}}return e}o(aB,"checkRPNotRegisteredError");function iB(t){let e,a=t.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(a&&a[0])e=a[0];else throw new Error(`Unable to extract subscriptionId from the given url - ${t}.`);return e}o(iB,"extractSubscriptionUrl");async function rB(t,e,a,i){let r=`${e}providers/${a}/register?api-version=2016-02-01`,n=`${e}providers/${a}?api-version=2016-02-01`,s=Ay(i);if(s.method="POST",s.url=r,(await t._nextPolicy.sendRequest(s)).status!==200)throw new Error(`Autoregistration of ${a} failed. Please try registering manually.`);return My(t,n,i)}o(rB,"registerRP");async function My(t,e,a){let i=Ay(a);i.url=e,i.method="GET";let r=await t._nextPolicy.sendRequest(i),n=r.parsedBody;return r.parsedBody&&n.registrationState&&n.registrationState==="Registered"?!0:(await di.delay(t._retryTimeout*1e3),My(t,e,a))}o(My,"getRegistrationStatus");function qy(t){return{create:(e,a)=>new jf(e,a,t)}}o(qy,"signingPolicy");var jf=class extends ut{static{o(this,"SigningPolicy")}constructor(e,a,i){super(e,a),this.authenticationProvider=i}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then(a=>this._nextPolicy.sendRequest(a))}};function s0(t,e,a,i){return{create:(r,n)=>new kf(r,n,t,e,a,i)}}o(s0,"systemErrorRetryPolicy");var kf=class extends ut{static{o(this,"SystemErrorRetryPolicy")}constructor(e,a,i,r,n,s){super(e,a),this.retryCount=$r(i)?i:Jf,this.retryInterval=$r(r)?r:Zf,this.minRetryInterval=$r(n)?n:LI,this.maxRetryInterval=$r(s)?s:e0}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch(a=>Ly(this,e,a.response,a))}};async function Ly(t,e,a,i,r){r=Ty(t,r,i);function n(s,p){return!!(p&&p.code&&(p.code==="ETIMEDOUT"||p.code==="ESOCKETTIMEDOUT"||p.code==="ECONNREFUSED"||p.code==="ECONNRESET"||p.code==="ENOENT"))}if(o(n,"shouldPolicyRetry"),Cy(t.retryCount,n,r,a,i))try{return await di.delay(r.retryInterval),t._nextPolicy.sendRequest(e.clone())}catch(s){return Ly(t,e,a,s,r)}else return i?Promise.reject(r.error):a}o(Ly,"retry");var nB=3,ey=Ea.HttpConstants.StatusCodes;function o0(){return{create:(t,e)=>new Uf(t,e)}}o(o0,"throttlingRetryPolicy");var ty="The operation was aborted.",Uf=class t extends ut{static{o(this,"ThrottlingRetryPolicy")}constructor(e,a,i){super(e,a),this.numberOfRetries=0,this._handleResponse=i||this._defaultResponseHandler}async sendRequest(e){let a=await this.
Line truncated
|
||||
`).map(n=>n.trim());for(let n of r)!n||n.startsWith("#")||i.patterns.push(new W4.Pattern(n));return i.searchPaths.push(...ll.getSearchPaths(i.patterns)),i})}static stat(e,a,i){return Tm(this,void 0,void 0,function*(){let r;if(a.followSymbolicLinks)try{r=yield co.promises.stat(e.path)}catch(n){if(n.code==="ENOENT"){if(a.omitBrokenSymbolicLinks){Om.debug(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw n}else r=yield co.promises.lstat(e.path);if(r.isDirectory()&&a.followSymbolicLinks){let n=yield co.promises.realpath(e.path);for(;i.length>=e.level;)i.pop();if(i.some(s=>s===n)){Om.debug(`Symlink cycle detected for path '${e.path}' and realpath '${n}'`);return}i.push(n)}return r})}};vt.DefaultGlobber=Rm});var Q4=E(En=>{"use strict";var WE=En&&En.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(En,"__esModule",{value:!0});En.create=void 0;var XE=K4();function KE(t,e){return WE(this,void 0,void 0,function*(){return yield XE.DefaultGlobber.create(t,e)})}o(KE,"create");En.create=KE});var fl=E((ie,t3)=>{ie=t3.exports=se;var Se;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?Se=o(function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)},"debug"):Se=o(function(){},"debug");ie.SEMVER_SPEC_VERSION="2.0.0";var mo=256,dl=Number.MAX_SAFE_INTEGER||9007199254740991,Pm=16,QE=mo-6,Tn=ie.re=[],_e=ie.safeRe=[],M=ie.src=[],A=ie.tokens={},Z4=0;function le(t){A[t]=Z4++}o(le,"tok");var Dm="[a-zA-Z0-9-]",Im=[["\\s",1],["\\d",mo],[Dm,QE]];function ho(t){for(var e=0;e<Im.length;e++){var a=Im[e][0],i=Im[e][1];t=t.split(a+"*").join(a+"{0,"+i+"}").split(a+"+").join(a+"{1,"+i+"}")}return t}o(ho,"makeSafeRe");le("NUMERICIDENTIFIER");M[A.NUMERICIDENTIFIER]="0|[1-9]\\d*";le("NUMERICIDENTIFIERLOOSE");M[A.NUMERICIDENTIFIERLOOSE]="\\d+";le("NONNUMERICIDENTIFIER");M[A.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+Dm+"*";le("MAINVERSION");M[A.MAINVERSION]="("+M[A.NUMERICIDENTIFIER]+")\\.("+M[A.NUMERICIDENTIFIER]+")\\.("+M[A.NUMERICIDENTIFIER]+")";le("MAINVERSIONLOOSE");M[A.MAINVERSIONLOOSE]="("+M[A.NUMERICIDENTIFIERLOOSE]+")\\.("+M[A.NUMERICIDENTIFIERLOOSE]+")\\.("+M[A.NUMERICIDENTIFIERLOOSE]+")";le("PRERELEASEIDENTIFIER");M[A.PRERELEASEIDENTIFIER]="(?:"+M[A.NUMERICIDENTIFIER]+"|"+M[A.NONNUMERICIDENTIFIER]+")";le("PRERELEASEIDENTIFIERLOOSE");M[A.PRERELEASEIDENTIFIERLOOSE]="(?:"+M[A.NUMERICIDENTIFIERLOOSE]+"|"+M[A.NONNUMERICIDENTIFIER]+")";le("PRERELEASE");M[A.PRERELEASE]="(?:-("+M[A.PRERELEASEIDENTIFIER]+"(?:\\."+M[A.PRERELEASEIDENTIFIER]+")*))";le("PRERELEASELOOSE");M[A.PRERELEASELOOSE]="(?:-?("+M[A.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+M[A.PRERELEASEIDENTIFIERLOOSE]+")*))";le("BUILDIDENTIFIER");M[A.BUILDIDENTIFIER]=Dm+"+";le("BUILD");M[A.BUILD]="(?:\\+("+M[A.BUILDIDENTIFIER]+"(?:\\."+M[A.BUILDIDENTIFIER]+")*))";le("FULL");le("FULLPLAIN");M[A.FULLPLAIN]="v?"+M[A.MAINVERSION]+M[A.PRERELEASE]+"?"+M[A.BUILD]+"?";M[A.FULL]="^"+M[A.FULLPLAIN]+"$";le("LOOSEPLAIN");M[A.LOOSEPLAIN]="[v=\\s]*"+M[A.MAINVERSIONLOOSE]+M[A.PRERELEASELOOSE]+"?"+M[A.BUILD]+"?";le("LOOSE");M[A.LOOSE]="^"+M[A.LOOSEPLAIN]+"$";le("GTLT");M[A.GTLT]="((?:<|>)?=?)";le("XRANGEIDENTIFIERLOOSE");M[A.XRANGEIDENTIFIERLOOSE]=M[A.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";le("XRANGEIDENTIFIER");M[A.XRANGEIDENTIFIER]=M[A.NUMERICIDENTIFIER]+"|x|X|\\*";le("XRANGEPLAIN");M[A.XRANGEPLAIN]="[v=\\s]*("+M[A.XRANGEIDENTIFIER]+")(?:\\.("+M[A.XRANGEIDENTIFIER]+")(?:\\.("+M[A.XRANGEIDENTIFIER]+")(?:"+M[A.PRERELEASE]+")?"+M[A.BUILD]+"?)?)?";le("XRANGEPLAINLOOSE");M[A.XRANGEPLAINLOOSE]="[v=\\s]*("+M[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+M[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+M[A.XRANGEIDENTIFIERLOOSE]+")(?:"+M[A.PRERELEASELOOSE]+")?"+M[A.BUILD]+"?)?)?";le("XRANGE");M[A.XRANGE]="^"+M[A.GTLT]+"\\s*"+M[A.XRANGEPLAIN]+"$";le("XRANGELOOSE");M[A.XRANGELOOSE]="^"+M[A.GTLT]+"\\s*"+M[A.XRANGEPLAINLOOSE]+"$";le("COERCE");M[A.COERCE]="(^|[^\\d])(\\d{1,"+Pm+"})(?:\\.(\\d{1,"+Pm+"}))?(?:\\.(\\d{1,"+Pm+"}))?(?:$|[^\\d])";le("COERCERTL");Tn[A.COERCERTL]=new RegExp(M[A.COERCE],"g");_e[A.COERCERTL]=new RegExp(ho(M[A.COERCE]),"g");le("LONETILDE");M[A.LONETILDE]="(?:~>?)";le("TILDETRIM");M[A.TILDETRIM]="(\\s*)"+M[A.LONETILDE]+"\\s+";Tn[A.TILDETRIM]=new RegExp(M[A.TILDETRIM],"g");_e[A.TILDETRIM]=new RegExp(ho(M[A.TILDETRIM]),"g");var YE="$1~";le("TILDE");M[A.TILDE]="^"+M[A.LONETILDE]+M[A.XRANGEPLAIN]+"$";le("TILDELOOSE");M[A.TILDELOOSE]="^"+M[A.LONETILDE]+M[A.XRANGEPLAINLOOSE]+"$";le("LONECARET");M[A.LONECARET]="(?:\\^)";le("CARETTRIM");M[A.CARETTRIM]="(\\s*)"+M[A.LONECARET]+"\\s+";Tn[A.CARETTRIM]=new
Line truncated
|
||||
`),{implicitDescendants:!1});try{for(var d=!0,c=MT(l.globGenerator()),u;u=yield c.next(),e=u.done,!e;d=!0){r=u.value,d=!1;let m=r,f=hl.relative(p,m).replace(new RegExp(`\\${hl.sep}`,"g"),"/");go.debug(`Matched: ${f}`),f===""?s.push("."):s.push(`${f}`)}}catch(m){a={error:m}}finally{try{!d&&!e&&(i=c.return)&&(yield i.call(c))}finally{if(a)throw a.error}}return s})}o(FT,"resolvePaths");xe.resolvePaths=FT;function VT(t){return Pn(this,void 0,void 0,function*(){return jT.promisify(qm.unlink)(t)})}o(VT,"unlinkFile");xe.unlinkFile=VT;function o3(t,e=[]){return Pn(this,void 0,void 0,function*(){let a="";e.push("--version"),go.debug(`Checking ${t} ${e.join(" ")}`);try{yield LT.exec(`${t}`,e,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i=>a+=i.toString(),stderr:i=>a+=i.toString()}})}catch(i){go.debug(i.message)}return a=a.trim(),go.debug(a),a})}o(o3,"getVersion");function $T(){return Pn(this,void 0,void 0,function*(){let t=yield o3("zstd",["--quiet"]),e=zT.clean(t);return go.debug(`zstd version: ${e}`),t===""?qr.CompressionMethod.Gzip:qr.CompressionMethod.ZstdWithoutLong})}o($T,"getCompressionMethod");xe.getCompressionMethod=$T;function GT(t){return t===qr.CompressionMethod.Gzip?qr.CacheFilename.Gzip:qr.CacheFilename.Zstd}o(GT,"getCacheFileName");xe.getCacheFileName=GT;function WT(){return Pn(this,void 0,void 0,function*(){return qm.existsSync(qr.GnuTarPathOnWindows)?qr.GnuTarPathOnWindows:(yield o3("tar")).toLowerCase().includes("gnu tar")?n3.which("tar"):""})}o(WT,"getGnuTarPathOnWindows");xe.getGnuTarPathOnWindows=WT;function XT(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}o(XT,"assertDefined");xe.assertDefined=XT;function KT(t,e,a=!1){let i=t.slice();return e&&i.push(e),process.platform==="win32"&&!a&&i.push("windows-only"),i.push(kT),s3.createHash("sha256").update(i.join("|")).digest("hex")}o(KT,"getCacheVersion");xe.getCacheVersion=KT;function QT(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}o(QT,"getRuntimeToken");xe.getRuntimeToken=QT});function yo(){return gl>yl.length-16&&(p3.default.randomFillSync(yl),gl=0),yl.slice(gl,gl+=16)}var p3,yl,gl,zm=qt(()=>{p3=ya(require("crypto")),yl=new Uint8Array(256),gl=yl.length;o(yo,"rng")});var l3,d3=qt(()=>{l3=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function YT(t){return typeof t=="string"&&l3.test(t)}var er,vo=qt(()=>{d3();o(YT,"validate");er=YT});function JT(t,e=0){let a=(Dt[t[e+0]]+Dt[t[e+1]]+Dt[t[e+2]]+Dt[t[e+3]]+"-"+Dt[t[e+4]]+Dt[t[e+5]]+"-"+Dt[t[e+6]]+Dt[t[e+7]]+"-"+Dt[t[e+8]]+Dt[t[e+9]]+"-"+Dt[t[e+10]]+Dt[t[e+11]]+Dt[t[e+12]]+Dt[t[e+13]]+Dt[t[e+14]]+Dt[t[e+15]]).toLowerCase();if(!er(a))throw TypeError("Stringified UUID is invalid");return a}var Dt,tr,xo=qt(()=>{vo();Dt=[];for(let t=0;t<256;++t)Dt.push((t+256).toString(16).substr(1));o(JT,"stringify");tr=JT});function ZT(t,e,a){let i=e&&a||0,r=e||new Array(16);t=t||{};let n=t.node||c3,s=t.clockseq!==void 0?t.clockseq:jm;if(n==null||s==null){let m=t.random||(t.rng||yo)();n==null&&(n=c3=[m[0]|1,m[1],m[2],m[3],m[4],m[5]]),s==null&&(s=jm=(m[6]<<8|m[7])&16383)}let p=t.msecs!==void 0?t.msecs:Date.now(),l=t.nsecs!==void 0?t.nsecs:Hm+1,d=p-km+(l-Hm)/1e4;if(d<0&&t.clockseq===void 0&&(s=s+1&16383),(d<0||p>km)&&t.nsecs===void 0&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");km=p,Hm=l,jm=s,p+=122192928e5;let c=((p&268435455)*1e4+l)%4294967296;r[i++]=c>>>24&255,r[i++]=c>>>16&255,r[i++]=c>>>8&255,r[i++]=c&255;let u=p/4294967296*1e4&268435455;r[i++]=u>>>8&255,r[i++]=u&255,r[i++]=u>>>24&15|16,r[i++]=u>>>16&255,r[i++]=s>>>8|128,r[i++]=s&255;for(let m=0;m<6;++m)r[i+m]=n[m];return e||tr(r)}var c3,jm,km,Hm,u3,m3=qt(()=>{zm();xo();km=0,Hm=0;o(ZT,"v1");u3=ZT});function eO(t){if(!er(t))throw TypeError("Invalid UUID");let e,a=new Uint8Array(16);return a[0]=(e=parseInt(t.slice(0,8),16))>>>24,a[1]=e>>>16&255,a[2]=e>>>8&255,a[3]=e&255,a[4]=(e=parseInt(t.slice(9,13),16))>>>8,a[5]=e&255,a[6]=(e=parseInt(t.slice(14,18),16))>>>8,a[7]=e&255,a[8]=(e=parseInt(t.slice(19,23),16))>>>8,a[9]=e&255,a[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,a[11]=e/4294967296&255,a[12]=e>>>24&255,a[13]=e>>>16&255,a[14]=e>>>8&255,a[15]=e&255,a}var vl,Um=qt(()=>{vo();o(eO,"parse");vl=eO});function tO(t){t=unescape(encodeURIComponent(t));let e=[];for(let a=0;a<t.length;++a)e.push(t.charCodeAt(a));return e}function bo(t,e,a){function i(r,n,s,p){if(typeof r=="string"&&(r=tO(r)),typeof n=="string"&&(n=vl(n)),n.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+r.length);if(l.set(n),l.set(r,n.length),l=a(l),l[6]=l[6]&15|e,l[8]=l[8]&63|128,s){p=p||0;for(let d=0;d<16;++d)s[p+d]=l[d];return s}return tr(l)}o(i,"generateUUID");try{i.name=t}catch{}return i.DNS=aO,i.URL=iO,i}var aO,iO,Fm=qt(()=>{xo();Um();o(tO,"stringToBytes");aO="6ba7b810-9dad-11d1-80b4-00c04fd430c8",iO
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(Gm)});var ri=E((eg,ar)=>{(function(){var t,e,a,i,r,n,s,p=[].slice,l={}.hasOwnProperty;t=o(function(){var d,c,u,m,f,h;if(h=arguments[0],f=2<=arguments.length?p.call(arguments,1):[],r(Object.assign))Object.assign.apply(null,arguments);else for(d=0,u=f.length;d<u;d++)if(m=f[d],m!=null)for(c in m)l.call(m,c)&&(h[c]=m[c]);return h},"assign"),r=o(function(d){return!!d&&Object.prototype.toString.call(d)==="[object Function]"},"isFunction"),n=o(function(d){var c;return!!d&&((c=typeof d)=="function"||c==="object")},"isObject"),a=o(function(d){return r(Array.isArray)?Array.isArray(d):Object.prototype.toString.call(d)==="[object Array]"},"isArray"),i=o(function(d){var c;if(a(d))return!d.length;for(c in d)if(l.call(d,c))return!1;return!0},"isEmpty"),s=o(function(d){var c,u;return n(d)&&(u=Object.getPrototypeOf(d))&&(c=u.constructor)&&typeof c=="function"&&c instanceof c&&Function.prototype.toString.call(c)===Function.prototype.toString.call(Object)},"isPlainObject"),e=o(function(d){return r(d.valueOf)?d.valueOf():d},"getValue"),ar.exports.assign=t,ar.exports.isFunction=r,ar.exports.isObject=n,ar.exports.isArray=a,ar.exports.isEmpty=i,ar.exports.isPlainObject=s,ar.exports.getValue=e}).call(eg)});var Wm=E((tg,ag)=>{(function(){var t;ag.exports=t=function(){function e(){}return o(e,"XMLDOMImplementation"),e.prototype.hasFeature=function(a,i){return!0},e.prototype.createDocumentType=function(a,i,r){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(a,i,r){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(a){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(a,i){throw new Error("This DOM method is not implemented.")},e}()}).call(tg)});var ng=E((ig,rg)=>{(function(){var t;rg.exports=t=function(){function e(){}return o(e,"XMLDOMErrorHandler"),e.prototype.handleError=function(a){throw new Error(a)},e}()}).call(ig)});var pg=E((sg,og)=>{(function(){var t;og.exports=t=function(){function e(a){this.arr=a||[]}return o(e,"XMLDOMStringList"),Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(a){return this.arr[a]||null},e.prototype.contains=function(a){return this.arr.indexOf(a)!==-1},e}()}).call(sg)});var cg=E((lg,dg)=>{(function(){var t,e,a;e=ng(),a=pg(),dg.exports=t=function(){function i(){var r;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=r=Object.create(this.defaultParams)}return o(i,"XMLDOMConfiguration"),Object.defineProperty(i.prototype,"parameterNames",{get:function(){return new a(Object.keys(this.defaultParams))}}),i.prototype.getParameter=function(r){return this.params.hasOwnProperty(r)?this.params[r]:null},i.prototype.canSetParameter=function(r,n){return!0},i.prototype.setParameter=function(r,n){return n!=null?this.params[r]=n:delete this.params[r]},i}()}).call(lg)});var nt=E((ug,mg)=>{(function(){mg.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(ug)});var Xm=E((fg,hg)=>{(function(){var t,e,a;t=nt(),a=la(),hg.exports=e=function(){function i(r,n,s){if(this.parent=r,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),n==null)throw new Error("Missing attribute name. "+this.debugInfo(n));this.name=this.stringify.name(n),this.value=this.stringify.attValue(s),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return o(i,"XMLAttribute"),Object.defineProperty(i.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(i.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(i.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(i.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(i.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(i.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(i.prototype,"specified",{get:function(){return!0}}),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(r){return this.options.writer.attribute(this,this.options.writer.filterOptions(r))},i.prototype.debugInfo=function(r){return r=r||this.name,r==null?"parent: <"+this.parent.name+">":"attribute: {"+r+"}, parent: <"+this.parent.name+">"},i.prototype.isEqualNode=function(r){return!(r.namespaceURI!==thi
Line truncated
|
||||
`,y.offset=(O=w.offset)!=null?O:0,y.dontPrettyTextNodes=(N=(D=w.dontPrettyTextNodes)!=null?D:w.dontprettytextnodes)!=null?N:0,y.spaceBeforeSlash=(C=(P=w.spaceBeforeSlash)!=null?P:w.spacebeforeslash)!=null?C:"",y.spaceBeforeSlash===!0&&(y.spaceBeforeSlash=" "),y.suppressPrettyCount=0,y.user={},y.state=e.None,y},I.prototype.indent=function(w,y,g){var _;return!y.pretty||y.suppressPrettyCount?"":y.pretty&&(_=(g||0)+y.offset+1,_>0)?new Array(_).join(y.indent):""},I.prototype.endline=function(w,y,g){return!y.pretty||y.suppressPrettyCount?"":y.newline},I.prototype.attribute=function(w,y,g){var _;return this.openAttribute(w,y,g),_=" "+w.name+'="'+w.value+'"',this.closeAttribute(w,y,g),_},I.prototype.cdata=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g)+"<![CDATA[",y.state=e.InsideTag,_+=w.value,y.state=e.CloseTag,_+="]]>"+this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),_},I.prototype.comment=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g)+"<!-- ",y.state=e.InsideTag,_+=w.value,y.state=e.CloseTag,_+=" -->"+this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),_},I.prototype.declaration=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g)+"<?xml",y.state=e.InsideTag,_+=' version="'+w.version+'"',w.encoding!=null&&(_+=' encoding="'+w.encoding+'"'),w.standalone!=null&&(_+=' standalone="'+w.standalone+'"'),y.state=e.CloseTag,_+=y.spaceBeforeSlash+"?>",_+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),_},I.prototype.docType=function(w,y,g){var _,O,N,D,C;if(g||(g=0),this.openNode(w,y,g),y.state=e.OpenTag,D=this.indent(w,y,g),D+="<!DOCTYPE "+w.root().name,w.pubID&&w.sysID?D+=' PUBLIC "'+w.pubID+'" "'+w.sysID+'"':w.sysID&&(D+=' SYSTEM "'+w.sysID+'"'),w.children.length>0){for(D+=" [",D+=this.endline(w,y,g),y.state=e.InsideTag,C=w.children,O=0,N=C.length;O<N;O++)_=C[O],D+=this.writeChildNode(_,y,g+1);y.state=e.CloseTag,D+="]"}return y.state=e.CloseTag,D+=y.spaceBeforeSlash+">",D+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),D},I.prototype.element=function(w,y,g){var _,O,N,D,C,P,B,k,pe,ge,Y,at,fe,za;g||(g=0),ge=!1,Y="",this.openNode(w,y,g),y.state=e.OpenTag,Y+=this.indent(w,y,g)+"<"+w.name,at=w.attribs;for(pe in at)S.call(at,pe)&&(_=at[pe],Y+=this.attribute(_,y,g));if(N=w.children.length,D=N===0?null:w.children[0],N===0||w.children.every(function($t){return($t.type===t.Text||$t.type===t.Raw)&&$t.value===""}))y.allowEmpty?(Y+=">",y.state=e.CloseTag,Y+="</"+w.name+">"+this.endline(w,y,g)):(y.state=e.CloseTag,Y+=y.spaceBeforeSlash+"/>"+this.endline(w,y,g));else if(y.pretty&&N===1&&(D.type===t.Text||D.type===t.Raw)&&D.value!=null)Y+=">",y.state=e.InsideTag,y.suppressPrettyCount++,ge=!0,Y+=this.writeChildNode(D,y,g+1),y.suppressPrettyCount--,ge=!1,y.state=e.CloseTag,Y+="</"+w.name+">"+this.endline(w,y,g);else{if(y.dontPrettyTextNodes){for(fe=w.children,C=0,B=fe.length;C<B;C++)if(O=fe[C],(O.type===t.Text||O.type===t.Raw)&&O.value!=null){y.suppressPrettyCount++,ge=!0;break}}for(Y+=">"+this.endline(w,y,g),y.state=e.InsideTag,za=w.children,P=0,k=za.length;P<k;P++)O=za[P],Y+=this.writeChildNode(O,y,g+1);y.state=e.CloseTag,Y+=this.indent(w,y,g)+"</"+w.name+">",ge&&y.suppressPrettyCount--,Y+=this.endline(w,y,g),y.state=e.None}return this.closeNode(w,y,g),Y},I.prototype.writeChildNode=function(w,y,g){switch(w.type){case t.CData:return this.cdata(w,y,g);case t.Comment:return this.comment(w,y,g);case t.Element:return this.element(w,y,g);case t.Raw:return this.raw(w,y,g);case t.Text:return this.text(w,y,g);case t.ProcessingInstruction:return this.processingInstruction(w,y,g);case t.Dummy:return"";case t.Declaration:return this.declaration(w,y,g);case t.DocType:return this.docType(w,y,g);case t.AttributeDeclaration:return this.dtdAttList(w,y,g);case t.ElementDeclaration:return this.dtdElement(w,y,g);case t.EntityDeclaration:return this.dtdEntity(w,y,g);case t.NotationDeclaration:return this.dtdNotation(w,y,g);default:throw new Error("Unknown XML node type: "+w.constructor.name)}},I.prototype.processingInstruction=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g)+"<?",y.state=e.InsideTag,_+=w.target,w.value&&(_+=" "+w.value),y.state=e.CloseTag,_+=y.spaceBeforeSlash+"?>",_+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),_},I.prototype.raw=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g),y.state=e.InsideTag,_+=w.value,y.state=e.CloseTag,_+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),_},I.prototype.text=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g),y.state=e.InsideTag,_+=w.value,y.state=e.CloseTag,_+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),_},I.prototype.dtdAttList=function(w,y,g){var _;return this.openNode(w,y,g),y.state=e.OpenTag,_=this.indent(w,y,g)+"<!ATTLIST",y.state=e.InsideTag,_+=" "+w.elementName+" "+w.attributeName+" "+w.attribut
Line truncated
|
||||
`||b==="\r"||b===" "}o(w,"isWhitespace");function y(b){return b==='"'||b==="'"}o(y,"isQuote");function g(b){return b===">"||w(b)}o(g,"isAttribEnd");function _(b,v){return b.test(v)}o(_,"isMatch");function O(b,v){return!_(b,v)}o(O,"notMatch");var N=0;t.STATE={BEGIN:N++,BEGIN_WHITESPACE:N++,TEXT:N++,TEXT_ENTITY:N++,OPEN_WAKA:N++,SGML_DECL:N++,SGML_DECL_QUOTED:N++,DOCTYPE:N++,DOCTYPE_QUOTED:N++,DOCTYPE_DTD:N++,DOCTYPE_DTD_QUOTED:N++,COMMENT_STARTING:N++,COMMENT:N++,COMMENT_ENDING:N++,COMMENT_ENDED:N++,CDATA:N++,CDATA_ENDING:N++,CDATA_ENDING_2:N++,PROC_INST:N++,PROC_INST_BODY:N++,PROC_INST_ENDING:N++,OPEN_TAG:N++,OPEN_TAG_SLASH:N++,ATTRIB:N++,ATTRIB_NAME:N++,ATTRIB_NAME_SAW_WHITE:N++,ATTRIB_VALUE:N++,ATTRIB_VALUE_QUOTED:N++,ATTRIB_VALUE_CLOSED:N++,ATTRIB_VALUE_UNQUOTED:N++,ATTRIB_VALUE_ENTITY_Q:N++,ATTRIB_VALUE_ENTITY_U:N++,CLOSE_TAG:N++,CLOSE_TAG_SAW_WHITE:N++,SCRIPT:N++,SCRIPT_ENDING:N++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(b){var v=t.ENTITIES[b],L=typeof v=="number"?String.fromCharCode(v):v;t.ENTITIES[b]=L});for(var D in t.STATE)t.STATE[t.STATE[D]]=D;N=t.STATE;function C(b,v,L){b[v]&&b[v](L)}o(C,"emit");function P(b,v,L){b.textNode&&B(b),C(b,v,L)}o(P,"emitNode");function B(b){b.textNode=k(b.opt,b.textNode),b.textNode&&C(b,"ontext",b.textNode),b.textNode=""}o(B,"closeText");function k(b,v){return b.trim&&(v=v.trim()),b.normalize&&(v=v.replace(/\s+/g," ")),v}o(k,"textopts");function pe(b,v){return B(b),b.trackPosition&&(v+=`
|
||||
Line: `+b.line+`
|
||||
Column: `+b.column+`
|
||||
Char: `+b.c),v=new Error(v),b.error=v,C(b,"onerror",v),b}o(pe,"error");function ge(b){return b.sawRoot&&!b.closedRoot&&Y(b,"Unclosed root tag"),b.state!==N.BEGIN&&b.state!==N.BEGIN_WHITESPACE&&b.state!==N.TEXT&&pe(b,"Unexpected end"),B(b),b.c="",b.closed=!0,C(b,"onend"),a.call(b,b.strict,b.opt),b}o(ge,"end");function Y(b,v){if(typeof b!="object"||!(b instanceof a))throw new Error("bad call to strictFail");b.strict&&pe(b,v)}o(Y,"strictFail");function at(b){b.strict||(b.tagName=b.tagName[b.looseCase]());var v=b.tags[b.tags.length-1]||b,L=b.tag={name:b.tagName,attributes:{}};b.opt.xmlns&&(L.ns=v.ns),b.attribList.length=0,P(b,"onopentagstart",L)}o(at,"newTag");function fe(b,v){var L=b.indexOf(":"),R=L<0?["",b]:b.split(":"),Oe=R[0],dt=R[1];return v&&b==="xmlns"&&(Oe="xmlns",dt=""),{prefix:Oe,local:dt}}o(fe,"qname");function za(b){if(b.strict||(b.attribName=b.attribName[b.looseCase]()),b.attribList.indexOf(b.attribName)!==-1||b.tag.attributes.hasOwnProperty(b.attribName)){b.attribName=b.attribValue="";return}if(b.opt.xmlns){var v=fe(b.attribName,!0),L=v.prefix,R=v.local;if(L==="xmlns")if(R==="xml"&&b.attribValue!==m)Y(b,"xml: prefix must be bound to "+m+`
|
||||
Actual: `+b.attribValue);else if(R==="xmlns"&&b.attribValue!==f)Y(b,"xmlns: prefix must be bound to "+f+`
|
||||
Actual: `+b.attribValue);else{var Oe=b.tag,dt=b.tags[b.tags.length-1]||b;Oe.ns===dt.ns&&(Oe.ns=Object.create(dt.ns)),Oe.ns[R]=b.attribValue}b.attribList.push([b.attribName,b.attribValue])}else b.tag.attributes[b.attribName]=b.attribValue,P(b,"onattribute",{name:b.attribName,value:b.attribValue});b.attribName=b.attribValue=""}o(za,"attrib");function $t(b,v){if(b.opt.xmlns){var L=b.tag,R=fe(b.tagName);L.prefix=R.prefix,L.local=R.local,L.uri=L.ns[R.prefix]||"",L.prefix&&!L.uri&&(Y(b,"Unbound namespace prefix: "+JSON.stringify(b.tagName)),L.uri=R.prefix);var Oe=b.tags[b.tags.length-1]||b;L.ns&&Oe.ns!==L.ns&&Object.keys(L.ns).forEach(function(_6){P(b,"onopennamespace",{prefix:_6,uri:L.ns[_6]})});for(var dt=0,yt=b.attribList.length;dt<yt;dt++){var Gt=b.attribList[dt],Za=Gt[0],yn=Gt[1],Pt=fe(Za,!0),wi=Pt.prefix,W_=Pt.local,N6=wi===""?"":L.ns[wi]||"",Hu={name:Za,value:yn,prefix:wi,local:W_,uri:N6};wi&&wi!=="xmlns"&&!N6&&(Y(b,"Unbound namespace prefix: "+JSON.stringify(wi)),Hu.uri=wi),b.tag.attributes[Za]=Hu,P(b,"onattribute",Hu)}b.attribList.length=0}b.tag.isSelfClosing=!!v,b.sawRoot=!0,b.tags.push(b.tag),P(b,"onopentag",b.tag),v||(!b.noscript&&b.tagName.toLowerCase()==="script"?b.state=N.SCRIPT:b.state=N.TEXT,b.tag=null,b.tagName=""),b.attribName=b.attribValue="",b.attribList.length=0}o($t,"openTag");function gn(b){if(!b.tagName){Y(b,"Weird empty close tag."),b.textNode+="</>",b.state=N.TEXT;return}if(b.script){if(b.tagName!=="script"){b.script+="</"+b.tagName+">",b.tagName="",b.state=N.SCRIPT;return}P(b,"onscript",b.script),b.script=""}var v=b.tags.length,L=b.tagName;b.strict||(L=L[b.looseCase]());for(var R=L;v--;){var Oe=b.tags[v];if(Oe.name!==R)Y(b,"Unexpected close tag");else break}if(v<0){Y(b,"Unmatched closing tag: "+b.tagName),b.textNode+="</"+b.tagName+">",b.state=N.TEXT;return}b.tagName=L;for(var dt=b.tags.length;dt-- >v;){var yt=b.tag=b.tags.pop();b.tagName=b.tag.name,P(b,"onclosetag",b.tagName);var Gt={};for(var Za in yt.ns)Gt[Za]=yt.ns[Za];var yn=b.tags[b.tags.length-1]||b;b.opt.xmlns&&yt.ns!==yn.ns&&Object.keys(yt.ns).forEach(function(Pt){var wi=yt.ns[Pt];P(b,"onclosenamespace",{prefix:Pt,uri:wi})})}v===0&&(b.closedRoot=!0),b.tagName=b.attribValue=b.attribName="",b.attribList.length=0,b.state=N.TEXT}o(gn,"closeTag");function to(b){var v=b.entity,L=v.toLowerCase(),R,Oe="";return b.ENTITIES[v]?b.ENTITIES[v]:b.ENTITIES[L]?b.ENTITIES[L]:(v=L,v.charAt(0)==="#"&&(v.charAt(1)==="x"?(v=v.slice(2),R=parseInt(v,16),Oe=R.toString(16)):(v=v.slice(1),R=parseInt(v,10),Oe=R.toString(10))),v=v.replace(/^0+/,""),isNaN(R)||Oe.toLowerCase()!==v?(Y(b,"Invalid character entity"),"&"+b.entity+";"):String.fromCodePoint(R))}o(to,"parseEntity");function b6(b,v){v==="<"?(b.state=N.OPEN_WAKA,b.startTagPosition=b.position):w(v)||(Y(b,"Non-whitespace before first tag."),b.textNode=v,b.state=N.TEXT)}o(b6,"beginWhiteSpace");function w6(b,v){var L="";return v<b.length&&(L=b.charAt(v)),L}o(w6,"charAt");function G_(b){var v=this;if(this.error)throw this.error;if(v.closed)return pe(v,"Cannot write after close. Assign an onready handler.");if(b===null)return ge(v);typeof b=="object"&&(b=b.toString());for(var L=0,R="";R=w6(b,L++),v.c=R,!!R;)switch(v.trackPosition&&(v.position++,R===`
|
||||
`?(v.line++,v.column=0):v.column++),v.state){case N.BEGIN:if(v.state=N.BEGIN_WHITESPACE,R==="\uFEFF")continue;b6(v,R);continue;case N.BEGIN_WHITESPACE:b6(v,R);continue;case N.TEXT:if(v.sawRoot&&!v.closedRoot){for(var Oe=L-1;R&&R!=="<"&&R!=="&";)R=w6(b,L++),R&&v.trackPosition&&(v.position++,R===`
|
||||
`?(v.line++,v.column=0):v.column++);v.textNode+=b.substring(Oe,L-1)}R==="<"&&!(v.sawRoot&&v.closedRoot&&!v.strict)?(v.state=N.OPEN_WAKA,v.startTagPosition=v.position):(!w(R)&&(!v.sawRoot||v.closedRoot)&&Y(v,"Text data outside of root node."),R==="&"?v.state=N.TEXT_ENTITY:v.textNode+=R);continue;case N.SCRIPT:R==="<"?v.state=N.SCRIPT_ENDING:v.script+=R;continue;case N.SCRIPT_ENDING:R==="/"?v.state=N.CLOSE_TAG:(v.script+="<"+R,v.state=N.SCRIPT);continue;case N.OPEN_WAKA:if(R==="!")v.state=N.SGML_DECL,v.sgmlDecl="";else if(!w(R))if(_(x,R))v.state=N.OPEN_TAG,v.tagName=R;else if(R==="/")v.state=N.CLOSE_TAG,v.tagName="";else if(R==="?")v.state=N.PROC_INST,v.procInstName=v.procInstBody="";else{if(Y(v,"Unencoded <"),v.startTagPosition+1<v.position){var dt=v.position-v.startTagPosition;R=new Array(dt).join(" ")+R}v.textNode+="<"+R,v.state=N.TEXT}continue;case N.SGML_DECL:(v.sgmlDecl+R).toUpperCase()===c?(P(v,"onopencdata"),v.state=N.CDATA,v.sgmlDecl="",v.cdata=""):v.sgmlDecl+R==="--"?(v.state=N.COMMENT,v.comment="",v.sgmlDecl=""):(v.sgmlDecl+R).toUpperCase()===u?(v.state=N.DOCTYPE,(v.doctype||v.sawRoot)&&Y(v,"Inappropriately located doctype declaration"),v.doctype="",v.sgmlDecl=""):R===">"?(P(v,"onsgmldeclaration",v.sgmlDecl),v.sgmlDecl="",v.state=N.TEXT):(y(R)&&(v.state=N.SGML_DECL_QUOTED),v.sgmlDecl+=R);continue;case N.SGML_DECL_QUOTED:R===v.q&&(v.state=N.SGML_DECL,v.q=""),v.sgmlDecl+=R;continue;case N.DOCTYPE:R===">"?(v.state=N.TEXT,P(v,"ondoctype",v.doctype),v.doctype=!0):(v.doctype+=R,R==="["?v.state=N.DOCTYPE_DTD:y(R)&&(v.state=N.DOCTYPE_QUOTED,v.q=R));continue;case N.DOCTYPE_QUOTED:v.doctype+=R,R===v.q&&(v.q="",v.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:v.doctype+=R,R==="]"?v.state=N.DOCTYPE:y(R)&&(v.state=N.DOCTYPE_DTD_QUOTED,v.q=R);continue;case N.DOCTYPE_DTD_QUOTED:v.doctype+=R,R===v.q&&(v.state=N.DOCTYPE_DTD,v.q="");continue;case N.COMMENT:R==="-"?v.state=N.COMMENT_ENDING:v.comment+=R;continue;case N.COMMENT_ENDING:R==="-"?(v.state=N.COMMENT_ENDED,v.comment=k(v.opt,v.comment),v.comment&&P(v,"oncomment",v.comment),v.comment=""):(v.comment+="-"+R,v.state=N.COMMENT);continue;case N.COMMENT_ENDED:R!==">"?(Y(v,"Malformed comment"),v.comment+="--"+R,v.state=N.COMMENT):v.state=N.TEXT;continue;case N.CDATA:R==="]"?v.state=N.CDATA_ENDING:v.cdata+=R;continue;case N.CDATA_ENDING:R==="]"?v.state=N.CDATA_ENDING_2:(v.cdata+="]"+R,v.state=N.CDATA);continue;case N.CDATA_ENDING_2:R===">"?(v.cdata&&P(v,"oncdata",v.cdata),P(v,"onclosecdata"),v.cdata="",v.state=N.TEXT):R==="]"?v.cdata+="]":(v.cdata+="]]"+R,v.state=N.CDATA);continue;case N.PROC_INST:R==="?"?v.state=N.PROC_INST_ENDING:w(R)?v.state=N.PROC_INST_BODY:v.procInstName+=R;continue;case N.PROC_INST_BODY:if(!v.procInstBody&&w(R))continue;R==="?"?v.state=N.PROC_INST_ENDING:v.procInstBody+=R;continue;case N.PROC_INST_ENDING:R===">"?(P(v,"onprocessinginstruction",{name:v.procInstName,body:v.procInstBody}),v.procInstName=v.procInstBody="",v.state=N.TEXT):(v.procInstBody+="?"+R,v.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:_(T,R)?v.tagName+=R:(at(v),R===">"?$t(v):R==="/"?v.state=N.OPEN_TAG_SLASH:(w(R)||Y(v,"Invalid character in tag name"),v.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:R===">"?($t(v,!0),gn(v)):(Y(v,"Forward-slash in opening tag not followed by >"),v.state=N.ATTRIB);continue;case N.ATTRIB:if(w(R))continue;R===">"?$t(v):R==="/"?v.state=N.OPEN_TAG_SLASH:_(x,R)?(v.attribName=R,v.attribValue="",v.state=N.ATTRIB_NAME):Y(v,"Invalid attribute name");continue;case N.ATTRIB_NAME:R==="="?v.state=N.ATTRIB_VALUE:R===">"?(Y(v,"Attribute without value"),v.attribValue=v.attribName,za(v),$t(v)):w(R)?v.state=N.ATTRIB_NAME_SAW_WHITE:_(T,R)?v.attribName+=R:Y(v,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if(R==="=")v.state=N.ATTRIB_VALUE;else{if(w(R))continue;Y(v,"Attribute without value"),v.tag.attributes[v.attribName]="",v.attribValue="",P(v,"onattribute",{name:v.attribName,value:""}),v.attribName="",R===">"?$t(v):_(x,R)?(v.attribName=R,v.state=N.ATTRIB_NAME):(Y(v,"Invalid attribute name"),v.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(w(R))continue;y(R)?(v.q=R,v.state=N.ATTRIB_VALUE_QUOTED):(Y(v,"Unquoted attribute value"),v.state=N.ATTRIB_VALUE_UNQUOTED,v.attribValue=R);continue;case N.ATTRIB_VALUE_QUOTED:if(R!==v.q){R==="&"?v.state=N.ATTRIB_VALUE_ENTITY_Q:v.attribValue+=R;continue}za(v),v.q="",v.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:w(R)?v.state=N.ATTRIB:R===">"?$t(v):R==="/"?v.state=N.OPEN_TAG_SLASH:_(x,R)?(Y(v,"No whitespace between attributes"),v.attribName=R,v.attribValue="",v.state=N.ATTRIB_NAME):Y(v,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(!g(R)){R==="&"?v.state=N.ATTRIB_VALUE_ENTITY_U:v.attribValue+=R;continue}za(v),R===">"?$t(v):v.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(v.tagName)R===">"?gn(v):_(T,R)?v.tagName+=R:v.script?(v.script+="</"+v.tagName,v.tagName="",v.state=N.SCRIPT):(w(R)||Y(v,"Invalid tagname in closing tag"),v.state=N.CLOSE_TAG_SAW_WHITE);else{if(w(R))continue;O
Line truncated
|
||||
`;ye.DEFAULT_CONTENT_TYPE="application/octet-stream";ye.prototype.append=function(t,e,a){a=a||{},typeof a=="string"&&(a={filename:a});var i=R1.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),v5.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(t,e,a),n=this._multiPartFooter();i(r),i(e),i(n),this._trackLength(r,e,a)};ye.prototype._trackLength=function(t,e,a){var i=0;a.knownLength!=null?i+=+a.knownLength:Buffer.isBuffer(e)?i=e.length:typeof e=="string"&&(i=Buffer.byteLength(e)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(t)+ye.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof BR))&&(a.knownLength||this._valuesToMeasure.push(e))};ye.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):AR.stat(t.path,function(a,i){var r;if(a){e(a);return}r=i.size-(t.start?t.start:0),e(null,r)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(a){t.pause(),e(null,+a.headers["content-length"])}),t.resume()):e("Unknown stream")};ye.prototype._multiPartHeader=function(t,e,a){if(typeof a.header=="string")return a.header;var i=this._getContentDisposition(e,a),r=this._getContentType(e,a),n="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(i||[]),"Content-Type":[].concat(r||[])};typeof a.header=="object"&&O1(s,a.header);var p;for(var l in s)s.hasOwnProperty(l)&&(p=s[l],p!=null&&(Array.isArray(p)||(p=[p]),p.length&&(n+=l+": "+p.join("; ")+ye.LINE_BREAK)));return"--"+this.getBoundary()+ye.LINE_BREAK+n+ye.LINE_BREAK};ye.prototype._getContentDisposition=function(t,e){var a,i;return typeof e.filepath=="string"?a=E1.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?a=E1.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(a=E1.basename(t.client._httpMessage.path||"")),a&&(i='filename="'+a+'"'),i};ye.prototype._getContentType=function(t,e){var a=e.contentType;return!a&&t.name&&(a=T1.lookup(t.name)),!a&&t.path&&(a=T1.lookup(t.path)),!a&&t.readable&&t.hasOwnProperty("httpVersion")&&(a=t.headers["content-type"]),!a&&(e.filepath||e.filename)&&(a=T1.lookup(e.filepath||e.filename)),!a&&typeof t=="object"&&(a=ye.DEFAULT_CONTENT_TYPE),a};ye.prototype._multiPartFooter=function(){return function(t){var e=ye.LINE_BREAK,a=this._streams.length===0;a&&(e+=this._lastBoundary()),t(e)}.bind(this)};ye.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ye.LINE_BREAK};ye.prototype.getHeaders=function(t){var e,a={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(a[e.toLowerCase()]=t[e]);return a};ye.prototype.setBoundary=function(t){this._boundary=t};ye.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};ye.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),a=0,i=this._streams.length;a<i;a++)typeof this._streams[a]!="function"&&(Buffer.isBuffer(this._streams[a])?t=Buffer.concat([t,this._streams[a]]):t=Buffer.concat([t,Buffer.from(this._streams[a])]),(typeof this._streams[a]!="string"||this._streams[a].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(ye.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};ye.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};ye.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};ye.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};ye.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}MR.parallel(this._valuesToMeasure,this._lengthRetriever,function(a,i){if(a){t(a);return}i.forEach(function(r){e+=r}),t(null,e)})};ye.prototype.submit=function(t,e){var a,i,r={method:"post"};return typeof t=="string"?(t=DR(t),i=O1({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},r)):(i=O1(t,r),i.port||(i.port=i.protocol=="https:"?443:80)),i.headers=this.getHeaders(t.headers),i.protocol=="https:"?a=IR.request(i):a=PR.request(i),this.getLength(function(n,s){if(n&&n!=="Unknown stream"){this._error(n);return}if(s&&a.setHeader("Content-Length",s),this.pipe(a),e){var p,l=o(function(d,c){return a.removeListener("error",l),a.removeListener("response",p),e.call(this,d,c)},"callback");p=l.bind(this,null),a.on("error",l),a.on("response",p)}}.bind(this)),a};ye.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit
Line truncated
|
||||
${OA.sanitize(this)}`}};ca.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";ca.PARSE_ERROR="PARSE_ERROR";var $a=ED.createClientLogger("core-http");function xy(t,e){return t?e.httpsAgent:e.httpAgent}o(xy,"getCachedAgent");var Kd=class extends ID.Transform{static{o(this,"ReportTransform")}constructor(e){super(),this.progressCallback=e,this.loadedBytes=0}_transform(e,a,i){this.push(e),this.loadedBytes+=e.length,this.progressCallback({loadedBytes:this.loadedBytes}),i(void 0)}};function Ud(t){return t&&typeof t.pipe=="function"}o(Ud,"isReadableStream");function by(t,e){return new Promise(a=>{t.once("close",()=>{e?.abort(),a()}),t.once("end",a),t.once("error",a)})}o(by,"isStreamComplete");function RA(t){let e=new cr;return t.forEach((a,i)=>{e.set(i,a)}),e}o(RA,"parseHeaders");var Qd=class{static{o(this,"NodeFetchHttpClient")}constructor(){this.proxyAgentMap=new Map,this.keepAliveAgents={}}async sendRequest(e){var a;if(!e&&typeof e!="object")throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.");let i=new Fd.AbortController,r;if(e.abortSignal){if(e.abortSignal.aborted)throw new Fd.AbortError("The operation was aborted.");r=o(d=>{d.type==="abort"&&i.abort()},"abortListener"),e.abortSignal.addEventListener("abort",r)}if(e.timeout&&setTimeout(()=>{i.abort()},e.timeout),e.formData){let d=e.formData,c=new BD.default,u=o((f,h)=>{typeof h=="function"&&(h=h()),h&&Object.prototype.hasOwnProperty.call(h,"value")&&Object.prototype.hasOwnProperty.call(h,"options")?c.append(f,h.value,h.options):c.append(f,h)},"appendFormValue");for(let f of Object.keys(d)){let h=d[f];if(Array.isArray(h))for(let x=0;x<h.length;x++)u(f,h[x]);else u(f,h)}e.body=c,e.formData=void 0;let m=e.headers.get("Content-Type");m&&m.indexOf("multipart/form-data")!==-1&&(typeof c.getBoundary=="function"?e.headers.set("Content-Type",`multipart/form-data; boundary=${c.getBoundary()}`):e.headers.remove("Content-Type"))}let n=e.body?typeof e.body=="function"?e.body():e.body:void 0;if(e.onUploadProgress&&e.body){let d=e.onUploadProgress,c=new Kd(d);Ud(n)?n.pipe(c):c.end(n),n=c}let s=await this.prepareRequest(e),p=Object.assign({body:n,headers:e.headers.rawHeaders(),method:e.method,signal:i.signal,redirect:"manual"},s),l;try{let d=await this.fetch(e.url,p),c=RA(d.headers),u=((a=e.streamResponseStatusCodes)===null||a===void 0?void 0:a.has(d.status))||e.streamResponseBody;l={headers:c,request:e,status:d.status,readableStreamBody:u?d.body:void 0,bodyAsText:u?void 0:await d.text()};let m=e.onDownloadProgress;if(m){let f=d.body||void 0;if(Ud(f)){let h=new Kd(m);f.pipe(h),l.readableStreamBody=h}else{let h=parseInt(c.get("Content-Length"))||void 0;h&&m({loadedBytes:h})}}return await this.processRequest(l),l}catch(d){let c=d;throw c.code==="ENOTFOUND"?new ca(c.message,ca.REQUEST_SEND_ERROR,void 0,e):c.type==="aborted"?new Fd.AbortError("The operation was aborted."):c}finally{if(e.abortSignal&&r){let d=Promise.resolve();Ud(n)&&(d=by(n));let c=Promise.resolve();Ud(l?.readableStreamBody)&&(c=by(l.readableStreamBody,i)),Promise.all([d,c]).then(()=>{var u;(u=e.abortSignal)===null||u===void 0||u.removeEventListener("abort",r)}).catch(u=>{$a.warning("Error when cleaning up abortListener on httpRequest",u)})}}}getOrCreateAgent(e){var a;let i=jf(e.url);if(e.proxySettings){let{host:r,port:n,username:s,password:p}=e.proxySettings,l=`${r}:${n}:${s}:${p}`,d=(a=this.proxyAgentMap.get(l))!==null&&a!==void 0?a:{},c=xy(i,d);if(c)return c;let u=SA(e.url,e.proxySettings,e.headers);return c=u.agent,u.isHttps?d.httpsAgent=u.agent:d.httpAgent=u.agent,this.proxyAgentMap.set(l,d),c}else if(e.keepAlive){let r=xy(i,this.keepAliveAgents);if(r)return r;let n={keepAlive:e.keepAlive};return i?r=this.keepAliveAgents.httpsAgent=new fy.Agent(n):r=this.keepAliveAgents.httpAgent=new my.Agent(n),r}else return i?fy.globalAgent:my.globalAgent}async fetch(e,a){return MD.default(e,a)}async prepareRequest(e){let a={};return a.agent=this.getOrCreateAgent(e),a.compress=e.decompressResponse,a}async processRequest(e){}};F.HttpPipelineLogLevel=void 0;(function(t){t[t.OFF=0]="OFF",t[t.ERROR=1]="ERROR",t[t.WARNING=2]="WARNING",t[t.INFO=3]="INFO"})(F.HttpPipelineLogLevel||(F.HttpPipelineLogLevel={}));function PA(t){let{requestOptions:e,tracingOptions:a}=t,r=SD.__rest(t,["requestOptions","tracingOptions"]);return e&&(r=Object.assign(Object.assign({},r),e)),a&&(r.tracingContext=a.tracingContext,r.spanOptions=a?.spanOptions),r}o(PA,"operationOptionsToRequestOptionsBase");var mt=class{static{o(this,"BaseRequestPolicy")}constructor(e,a){this._nextPolicy=e,this._options=a}shouldLog(e){return this._options.shouldLog(e)}log(e,a){this._options.log(e,a)}},Yd=class{static{o(this,"RequestPolicyOptions")}constructor(e){this._logger=e}shouldLog(e){return!!this._logger&&e!==F.HttpPipelineLogLevel.OFF&&e<=this._logger.minimumLogLevel}log(e,a){this._logger&&this.shouldLog(e)&&this._logger.log(e,a)}},ky={explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:ut,explicitArray:!0,ignore
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1},$d=Object.assign({},ky);$d.explicitArray=!1;var Go=Object.assign({},ky);Go.explicitArray=!1;Go.renderOpts={pretty:!1};function kf(t,e={}){var a;return Go.rootName=e.rootName,Go.charkey=(a=e.xmlCharKey)!==null&&a!==void 0?a:Bi,new Ry.Builder(Go).buildObject(t)}o(kf,"stringifyXML");function Hy(t,e={}){var a;$d.explicitRoot=!!e.includeRoot,$d.charkey=(a=e.xmlCharKey)!==null&&a!==void 0?a:Bi;let i=new Ry.Parser($d);return new Promise((r,n)=>{t?i.parseString(t,(s,p)=>{s?n(s):r(p)}):n(new Error("Document is empty"))})}o(Hy,"parseXML");function dh(t,e){return{create:(a,i)=>new Hf(a,i,t,e)}}o(dh,"deserializationPolicy");var Uy=["application/json","text/json"],Fy=["application/xml","application/atom+xml"],IA={expectedContentTypes:{json:Uy,xml:Fy}},Hf=class extends mt{static{o(this,"DeserializationPolicy")}constructor(e,a,i,r={}){var n;super(e,a),this.jsonContentTypes=i&&i.json||Uy,this.xmlContentTypes=i&&i.xml||Fy,this.xmlCharKey=(n=r.xmlCharKey)!==null&&n!==void 0?n:Bi}async sendRequest(e){return this._nextPolicy.sendRequest(e).then(a=>Vy(this.jsonContentTypes,this.xmlContentTypes,a,{xmlCharKey:this.xmlCharKey}))}};function DA(t){let e,a=t.request,i=a.operationSpec;if(i){let r=a.operationResponseGetter;r?e=r(i,t):e=i.responses[t.status]}return e}o(DA,"getOperationResponse");function AA(t){let e=t.request.shouldDeserialize,a;return e===void 0?a=!0:typeof e=="boolean"?a=e:a=e(t),a}o(AA,"shouldDeserializeResponse");function Vy(t,e,a,i={}){var r,n,s;let p={rootName:(r=i.rootName)!==null&&r!==void 0?r:"",includeRoot:(n=i.includeRoot)!==null&&n!==void 0?n:!1,xmlCharKey:(s=i.xmlCharKey)!==null&&s!==void 0?s:Bi};return LA(t,e,a,p).then(l=>{if(!AA(l))return l;let d=l.request.operationSpec;if(!d||!d.responses)return l;let c=DA(l),{error:u,shouldReturnResponse:m}=MA(l,d,c);if(u)throw u;if(m)return l;if(c){if(c.bodyMapper){let f=l.parsedBody;d.isXML&&c.bodyMapper.type.name===Wr.Sequence&&(f=typeof f=="object"?f[c.bodyMapper.xmlElementName]:[]);try{l.parsedBody=d.serializer.deserialize(c.bodyMapper,f,"operationRes.parsedBody",i)}catch(h){throw new ca(`Error ${h} occurred in deserializing the responseBody - ${l.bodyAsText}`,void 0,l.status,l.request,l)}}else d.httpMethod==="HEAD"&&(l.parsedBody=a.status>=200&&a.status<300);c.headersMapper&&(l.parsedHeaders=d.serializer.deserialize(c.headersMapper,l.headers.toJson(),"operationRes.parsedHeaders",i))}return l})}o(Vy,"deserializeResponseBody");function BA(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}o(BA,"isOperationSpecEmpty");function MA(t,e,a){var i;let r=200<=t.status&&t.status<300;if(BA(e)?r:!!a)if(a){if(!a.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let s=a??e.responses.default,l=((i=t.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(t.status))||t.request.streamResponseBody?`Unexpected status code: ${t.status}`:t.bodyAsText,d=new ca(l,void 0,t.status,t.request,t);if(!s)throw d;let c=s.bodyMapper,u=s.headersMapper;try{if(t.parsedBody){let m=t.parsedBody,f;if(c){let x=m;e.isXML&&c.type.name===Wr.Sequence&&(x=typeof m=="object"?m[c.xmlElementName]:[]),f=e.serializer.deserialize(c,x,"error.response.parsedBody")}let h=m.error||f||m;d.code=h.code,h.message&&(d.message=h.message),c&&(d.response.parsedBody=f)}t.headers&&u&&(d.response.parsedHeaders=e.serializer.deserialize(u,t.headers.toJson(),"operationRes.parsedHeaders"))}catch(m){d.message=`Error "${m.message}" occurred in deserializing the responseBody - "${t.bodyAsText}" for the default response.`}return{error:d,shouldReturnResponse:!1}}o(MA,"handleErrorResponse");function LA(t,e,a,i){var r;let n=o(p=>{let l=`Error "${p}" occurred while parsing the response body - ${a.bodyAsText}.`,d=p.code||ca.PARSE_ERROR,c=new ca(l,d,a.status,a.request,a);return Promise.reject(c)},"errorHandler");if(!(((r=a.request.streamResponseStatusCodes)===null||r===void 0?void 0:r.has(a.status))||a.request.streamResponseBody)&&a.bodyAsText){let p=a.bodyAsText,l=a.headers.get("Content-Type")||"",d=l?l.split(";").map(c=>c.toLowerCase()):[];if(d.length===0||d.some(c=>t.indexOf(c)!==-1))return new Promise(c=>{a.parsedBody=JSON.parse(p),c(a)}).catch(n);if(d.some(c=>e.indexOf(c)!==-1))return Hy(p,i).then(c=>(a.parsedBody=c,a)).catch(n)}return Promise.resolve(a)}o(LA,"parse");var $y={enable:!0};function Gy(t){return{create:(e,a)=>new Uf(e,a,t||$y)}}o(Gy,"keepAlivePolicy");var Uf=class extends mt{static{o(this,"KeepAlivePolicy")}constructor(e,a,i){super(e,a),this.keepAliveOptions=i}async sendRequest(e){return e.keepAlive=this.keepAliveOptions.enable,this._nextPolicy.sendRequest(e)}},wy=["GET","HEAD"],qA={handleRedirects:!0,maxRetries:20};function ch(t=20){return{create:(e,a)=>new Ff(e,a,t)}}o(ch,"redirectPolicy");var Ff=class extends mt{static{o(this,"RedirectPolicy")}constructor(e,a,i=20){super(e,a),this.maxRetries=i}sendRequest(e){return this._nextPolicy.sendRequest(e).then(a=>Wy(this,a,0))}};functi
Line truncated
|
||||
`).join(""))}return this._nextPolicy.sendRequest(e)}},Zy=[],e7=!1,QA=new Map;function YA(){if(!process)return;let t=Vd(Ta.HTTPS_PROXY),e=Vd(Ta.ALL_PROXY),a=Vd(Ta.HTTP_PROXY);return t||e||a}o(YA,"loadEnvironmentProxyValue");function JA(t,e,a){if(e.length===0)return!1;let i=ci.parse(t).getHost();if(a?.has(i))return a.get(i);let r=!1;for(let n of e)n[0]==="."?(i.endsWith(n)||i.length===n.length-1&&i===n.slice(1))&&(r=!0):i===n&&(r=!0);return a?.set(i,r),r}o(JA,"isBypassed");function ZA(){let t=Vd(Ta.NO_PROXY);return e7=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}o(ZA,"loadNoProxy");function t7(t){if(!t&&(t=YA(),!t))return;let{username:e,password:a,urlWithoutAuth:i}=eB(t),r=ci.parse(i);return{host:(r.getScheme()?r.getScheme()+"://":"")+r.getHost(),port:Number.parseInt(r.getPort()||"80"),username:e,password:a}}o(t7,"getDefaultProxySettings");function xh(t,e){return t||(t=t7()),e7||Zy.push(...ZA()),{create:(a,i)=>new Yf(a,i,t,e?.customNoProxyList)}}o(xh,"proxyPolicy");function eB(t){let e=t.indexOf("@");if(e===-1)return{urlWithoutAuth:t};let a=t.indexOf("://"),i=a!==-1?a+3:0,r=t.substring(i,e),n=r.indexOf(":"),s=n!==-1,p=s?r.substring(0,n):r,l=s?r.substring(n+1):void 0,d=t.substring(0,i)+t.substring(e+1);return{username:p,password:l,urlWithoutAuth:d}}o(eB,"extractAuthFromUrl");var Yf=class extends mt{static{o(this,"ProxyPolicy")}constructor(e,a,i,r){super(e,a),this.proxySettings=i,this.customNoProxyList=r}sendRequest(e){var a;return!e.proxySettings&&!JA(e.url,(a=this.customNoProxyList)!==null&&a!==void 0?a:Zy,this.customNoProxyList?void 0:QA)&&(e.proxySettings=this.proxySettings),this._nextPolicy.sendRequest(e)}};function tB(t=30){return{create:(e,a)=>new Jf(e,a,t)}}o(tB,"rpRegistrationPolicy");var Jf=class extends mt{static{o(this,"RPRegistrationPolicy")}constructor(e,a,i=30){super(e,a),this._retryTimeout=i}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then(a=>aB(this,e,a))}};function aB(t,e,a){if(a.status===409){let i=iB(a.bodyAsText);if(i){let r=rB(e.url);return nB(t,r,i,e).catch(()=>!1).then(n=>n?(e.headers.set("x-ms-client-request-id",ec()),t._nextPolicy.sendRequest(e.clone())):a)}}return Promise.resolve(a)}o(aB,"registerIfNeeded");function a7(t,e=!1){let a=t.clone();return e&&(a.url=t.url),a.headers.set("x-ms-client-request-id",ec()),a.headers.set("Content-Type","application/json; charset=utf-8"),a}o(a7,"getRequestEssentials");function iB(t){let e,a;if(t){try{a=JSON.parse(t)}catch{}if(a&&a.error&&a.error.message&&a.error.code&&a.error.code==="MissingSubscriptionRegistration"){let i=a.error.message.match(/.*'(.*)'/i);i&&(e=i.pop())}}return e}o(iB,"checkRPNotRegisteredError");function rB(t){let e,a=t.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(a&&a[0])e=a[0];else throw new Error(`Unable to extract subscriptionId from the given url - ${t}.`);return e}o(rB,"extractSubscriptionUrl");async function nB(t,e,a,i){let r=`${e}providers/${a}/register?api-version=2016-02-01`,n=`${e}providers/${a}?api-version=2016-02-01`,s=a7(i);if(s.method="POST",s.url=r,(await t._nextPolicy.sendRequest(s)).status!==200)throw new Error(`Autoregistration of ${a} failed. Please try registering manually.`);return i7(t,n,i)}o(nB,"registerRP");async function i7(t,e,a){let i=a7(a);i.url=e,i.method="GET";let r=await t._nextPolicy.sendRequest(i),n=r.parsedBody;return r.parsedBody&&n.registrationState&&n.registrationState==="Registered"?!0:(await di.delay(t._retryTimeout*1e3),i7(t,e,a))}o(i7,"getRegistrationStatus");function r7(t){return{create:(e,a)=>new Zf(e,a,t)}}o(r7,"signingPolicy");var Zf=class extends mt{static{o(this,"SigningPolicy")}constructor(e,a,i){super(e,a),this.authenticationProvider=i}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then(a=>this._nextPolicy.sendRequest(a))}};function bh(t,e,a,i){return{create:(r,n)=>new eh(r,n,t,e,a,i)}}o(bh,"systemErrorRetryPolicy");var eh=class extends mt{static{o(this,"SystemErrorRetryPolicy")}constructor(e,a,i,r,n,s){super(e,a),this.retryCount=Gr(i)?i:uh,this.retryInterval=Gr(r)?r:mh,this.minRetryInterval=Gr(n)?n:zA,this.maxRetryInterval=Gr(s)?s:fh}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch(a=>n7(this,e,a.response,a))}};async function n7(t,e,a,i,r){r=Ky(t,r,i);function n(s,p){return!!(p&&p.code&&(p.code==="ETIMEDOUT"||p.code==="ESOCKETTIMEDOUT"||p.code==="ECONNREFUSED"||p.code==="ECONNRESET"||p.code==="ENOENT"))}if(o(n,"shouldPolicyRetry"),Xy(t.retryCount,n,r,a,i))try{return await di.delay(r.retryInterval),t._nextPolicy.sendRequest(e.clone())}catch(s){return n7(t,e,a,s,r)}else return i?Promise.reject(r.error):a}o(n7,"retry");var sB=3,Ny=Ta.HttpConstants.StatusCodes;function wh(){return{create:(t,e)=>new th(t,e)}}o(wh,"throttlingRetryPolicy");var _y="The operation was aborted.",th=class t extends mt{static{o(this,"ThrottlingRetryPolicy")}constructor(e,a,i){super(e,a),this.numberOfRetries=0,this._handleResponse=i||this._defaultResponseHandler}async sendRequest(e){let a=await this.
Line truncated
|
||||
Polling from: ${a.config.operationLocation}
|
||||
Operation status: ${c}
|
||||
Polling status: ${Gy.includes(c)?"Stopped":"Running"}`),c==="succeeded"){let m=s(l,a);if(m!==void 0)return{response:await e(m).catch(Vy({state:a,stateProxy:i,isOperationError:p})),status:c}}return{response:l,status:c}}o(NB,"pollOperationHelper");async function Yy(t){let{poll:e,state:a,stateProxy:i,options:r,getOperationStatus:n,getResourceLocation:s,getOperationLocation:p,isOperationError:d,withOperationLocation:l,getPollingInterval:c,processResult:m,getError:u,updateState:f,setDelay:h,isDone:b,setErrorAsResult:C}=t,{operationLocation:S}=a.config;if(S!==void 0){let{response:D,status:w}=await NB({poll:e,getOperationStatus:n,state:a,stateProxy:i,operationLocation:S,getResourceLocation:s,isOperationError:d,options:r});if(Wy({status:w,response:D,state:a,stateProxy:i,isDone:b,processResult:m,getError:u,setErrorAsResult:C}),!Gy.includes(w)){let y=c?.(D);y&&h(y);let g=p?.(D,a);if(g!==void 0){let _=S!==g;a.config.operationLocation=g,l?.(g,_)}else l?.(S,!1)}f?.(a,D)}}o(Yy,"pollOperation");function Qy(t){let{azureAsyncOperation:e,operationLocation:a}=t;return a??e}o(Qy,"getOperationLocationPollingUrl");function Jy(t){return t.headers.location}o(Jy,"getLocationHeader");function Zy(t){return t.headers["operation-location"]}o(Zy,"getOperationLocationHeader");function e7(t){return t.headers["azure-asyncoperation"]}o(e7,"getAzureAsyncOperationHeader");function _B(t){var e;let{location:a,requestMethod:i,requestPath:r,resourceLocationConfig:n}=t;switch(i){case"PUT":return r;case"DELETE":return;case"PATCH":return(e=s())!==null&&e!==void 0?e:r;default:return s()}function s(){switch(n){case"azure-async-operation":return;case"original-uri":return r;case"location":default:return a}}o(s,"getDefault")}o(_B,"findResourceLocation");function t7(t){let{rawResponse:e,requestMethod:a,requestPath:i,resourceLocationConfig:r}=t,n=Zy(e),s=e7(e),p=Qy({operationLocation:n,azureAsyncOperation:s}),d=Jy(e),l=a?.toLocaleUpperCase();return p!==void 0?{mode:"OperationLocation",operationLocation:p,resourceLocation:_B({requestMethod:l,location:d,requestPath:i,resourceLocationConfig:r})}:d!==void 0?{mode:"ResourceLocation",operationLocation:d}:l==="PUT"&&i?{mode:"Body",operationLocation:i}:void 0}o(t7,"inferLroMode");function a7(t){let{status:e,statusCode:a}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return c0(a);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return Wr.verbose(`LRO: unrecognized operation status: ${e}`),e}}o(a7,"transformStatus");function SB(t){var e;let{status:a}=(e=t.body)!==null&&e!==void 0?e:{};return a7({status:a,statusCode:t.statusCode})}o(SB,"getStatus");function EB(t){var e,a;let{properties:i,provisioningState:r}=(e=t.body)!==null&&e!==void 0?e:{},n=(a=i?.provisioningState)!==null&&a!==void 0?a:r;return a7({status:n,statusCode:t.statusCode})}o(EB,"getProvisioningState");function c0(t){return t===202?"running":t<300?"succeeded":"failed"}o(c0,"toOperationStatus");function i7({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let a=parseInt(e);return isNaN(a)?CB(new Date(e)):a*1e3}}o(i7,"parseRetryAfter");function r7(t){let e=t.flatResponse.error;if(!e){Wr.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){Wr.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}o(r7,"getErrorFromResponse");function CB(t){let e=Math.floor(new Date().getTime()),a=t.getTime();if(e<a)return a-e}o(CB,"calculatePollingIntervalFromDate");function n7(t){let{response:e,state:a,operationLocation:i}=t;function r(){var s;switch((s=a.config.metadata)===null||s===void 0?void 0:s.mode){case void 0:return c0(e.rawResponse.statusCode);case"Body":return m0(e,a);default:return"running"}}o(r,"helper");let n=r();return n==="running"&&i===void 0?"succeeded":n}o(n7,"getStatusFromInitialResponse");async function TB(t){let{stateProxy:e,resourceLocationConfig:a,processResult:i,lro:r,setErrorAsResult:n}=t;return Ky({init:async()=>{let s=await r.sendInitialRequest(),p=t7({rawResponse:s.rawResponse,requestPath:r.requestPath,requestMethod:r.requestMethod,resourceLocationConfig:a});return Object.assign({response:s,operationLocation:p?.operationLocation,resourceLocation:p?.resourceLocation},p?.mode?{metadata:{mode:p.mode}}:{})},stateProxy:e,processResult:i?({flatResponse:s},p)=>i(s,p):({flatResponse:s})=>s,getOperationStatus:n7,setErrorAsResult:n})}o(TB,"initHttpOperation");function s7({rawResponse:t},e){var a;switch((a=e.config.metadata)===null||a===void 0?vLine truncated
|
||||
`,Vx="HTTP/1.1",Pq="AES256",Rq="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",Dq=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-if-tags","x-ms-source-if-tags"],Iq=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],Bq="BlobUsesCustomerSpecifiedEncryption",Aq="BlobDoesNotUseCustomerSpecifiedEncryption",Mq=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function qq(t){let e=L.URLBuilder.parse(t),a=e.getPath();return a=a||"/",a=zq(a),e.setPath(a),e.toString()}o(qq,"escapeURLPath");function Lq(t){let e="";if(t.search("DevelopmentStorageProxyUri=")!==-1){let a=t.split(";");for(let i of a)i.trim().startsWith("DevelopmentStorageProxyUri=")&&(e=i.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return e}o(Lq,"getProxyUriFromDevConnString");function Kn(t,e){let a=t.split(";");for(let i of a)if(i.trim().startsWith(e))return i.trim().match(e+"=(.*)")[1];return""}o(Kn,"getValueInConnString");function hs(t){let e="";t.startsWith("UseDevelopmentStorage=true")&&(e=Lq(t),t=Rq);let a=Kn(t,"BlobEndpoint");if(a=a.endsWith("/")?a.slice(0,-1):a,t.search("DefaultEndpointsProtocol=")!==-1&&t.search("AccountKey=")!==-1){let i="",r="",n=Buffer.from("accountKey","base64"),s="";if(r=Kn(t,"AccountName"),n=Buffer.from(Kn(t,"AccountKey"),"base64"),!a){i=Kn(t,"DefaultEndpointsProtocol");let p=i.toLowerCase();if(p!=="https"&&p!=="http")throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(s=Kn(t,"EndpointSuffix"),!s)throw new Error("Invalid EndpointSuffix in the provided Connection String");a=`${i}://${r}.blob.${s}`}if(r){if(n.length===0)throw new Error("Invalid AccountKey in the provided Connection String")}else throw new Error("Invalid AccountName in the provided Connection String");return{kind:"AccountConnString",url:a,accountName:r,accountKey:n,proxyUri:e}}else{let i=Kn(t,"SharedAccessSignature"),r=Gx(a);if(a){if(!i)throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String")}else throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");return{kind:"SASConnString",url:a,accountName:r,accountSas:i}}}o(hs,"extractConnectionStringParts");function zq(t){return encodeURIComponent(t).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}o(zq,"escape");function He(t,e){let a=L.URLBuilder.parse(t),i=a.getPath();return i=i?i.endsWith("/")?`${i}${e}`:`${i}/${e}`:e,a.setPath(i),new URL(a.toString()).toString()}o(He,"appendToURLPath");function en(t,e
Line truncated
|
||||
Polling status: ${f7.includes(c)?"Stopped":"Running"}`),c==="succeeded"){let u=s(d,a);if(u!==void 0)return{response:await e(u).catch(u7({state:a,stateProxy:i,isOperationError:p})),status:c}}return{response:d,status:c}}o(_B,"pollOperationHelper");async function v7(t){let{poll:e,state:a,stateProxy:i,options:r,getOperationStatus:n,getResourceLocation:s,getOperationLocation:p,isOperationError:l,withOperationLocation:d,getPollingInterval:c,processResult:u,getError:m,updateState:f,setDelay:h,isDone:x,setErrorAsResult:T}=t,{operationLocation:S}=a.config;if(S!==void 0){let{response:I,status:w}=await _B({poll:e,getOperationStatus:n,state:a,stateProxy:i,operationLocation:S,getResourceLocation:s,isOperationError:l,options:r});if(g7({status:w,response:I,state:a,stateProxy:i,isDone:x,processResult:u,getError:m,setErrorAsResult:T}),!f7.includes(w)){let y=c?.(I);y&&h(y);let g=p?.(I,a);if(g!==void 0){let _=S!==g;a.config.operationLocation=g,d?.(g,_)}else d?.(S,!1)}f?.(a,I)}}o(v7,"pollOperation");function x7(t){let{azureAsyncOperation:e,operationLocation:a}=t;return a??e}o(x7,"getOperationLocationPollingUrl");function b7(t){return t.headers.location}o(b7,"getLocationHeader");function w7(t){return t.headers["operation-location"]}o(w7,"getOperationLocationHeader");function N7(t){return t.headers["azure-asyncoperation"]}o(N7,"getAzureAsyncOperationHeader");function SB(t){var e;let{location:a,requestMethod:i,requestPath:r,resourceLocationConfig:n}=t;switch(i){case"PUT":return r;case"DELETE":return;case"PATCH":return(e=s())!==null&&e!==void 0?e:r;default:return s()}function s(){switch(n){case"azure-async-operation":return;case"original-uri":return r;case"location":default:return a}}o(s,"getDefault")}o(SB,"findResourceLocation");function _7(t){let{rawResponse:e,requestMethod:a,requestPath:i,resourceLocationConfig:r}=t,n=w7(e),s=N7(e),p=x7({operationLocation:n,azureAsyncOperation:s}),l=b7(e),d=a?.toLocaleUpperCase();return p!==void 0?{mode:"OperationLocation",operationLocation:p,resourceLocation:SB({requestMethod:d,location:l,requestPath:i,resourceLocationConfig:r})}:l!==void 0?{mode:"ResourceLocation",operationLocation:l}:d==="PUT"&&i?{mode:"Body",operationLocation:i}:void 0}o(_7,"inferLroMode");function S7(t){let{status:e,statusCode:a}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return Ch(a);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return Kr.verbose(`LRO: unrecognized operation status: ${e}`),e}}o(S7,"transformStatus");function CB(t){var e;let{status:a}=(e=t.body)!==null&&e!==void 0?e:{};return S7({status:a,statusCode:t.statusCode})}o(CB,"getStatus");function EB(t){var e,a;let{properties:i,provisioningState:r}=(e=t.body)!==null&&e!==void 0?e:{},n=(a=i?.provisioningState)!==null&&a!==void 0?a:r;return S7({status:n,statusCode:t.statusCode})}o(EB,"getProvisioningState");function Ch(t){return t===202?"running":t<300?"succeeded":"failed"}o(Ch,"toOperationStatus");function C7({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let a=parseInt(e);return isNaN(a)?TB(new Date(e)):a*1e3}}o(C7,"parseRetryAfter");function E7(t){let e=t.flatResponse.error;if(!e){Kr.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){Kr.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}o(E7,"getErrorFromResponse");function TB(t){let e=Math.floor(new Date().getTime()),a=t.getTime();if(e<a)return a-e}o(TB,"calculatePollingIntervalFromDate");function T7(t){let{response:e,state:a,operationLocation:i}=t;function r(){var s;switch((s=a.config.metadata)===null||s===void 0?void 0:s.mode){case void 0:return Ch(e.rawResponse.statusCode);case"Body":return Eh(e,a);default:return"running"}}o(r,"helper");let n=r();return n==="running"&&i===void 0?"succeeded":n}o(T7,"getStatusFromInitialResponse");async function OB(t){let{stateProxy:e,resourceLocationConfig:a,processResult:i,lro:r,setErrorAsResult:n}=t;return y7({init:async()=>{let s=await r.sendInitialRequest(),p=_7({rawResponse:s.rawResponse,requestPath:r.requestPath,requestMethod:r.requestMethod,resourceLocationConfig:a});return Object.assign({response:s,operationLocation:p?.operationLocation,resourceLocation:p?.resourceLocation},p?.mode?{metadata:{mode:p.mode}}:{})},stateProxy:e,processResult:i?({flatResponse:s},p)=>i(s,p):({flatResponse:s})=>s,getOperationStatus:T7,setErrorAsResult:n})}o(OB,"initHttpOperation");function O7({rawResponse:t},e){var a;switch((a=e.config.metadata)===null||a===void 0?vLine truncated
|
||||
`,uw="HTTP/1.1",Pq="AES256",Iq="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",Dq=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-if-tags","x-ms-source-if-tags"],Aq=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],Bq="BlobUsesCustomerSpecifiedEncryption",Mq="BlobDoesNotUseCustomerSpecifiedEncryption",Lq=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function qq(t){let e=q.URLBuilder.parse(t),a=e.getPath();return a=a||"/",a=jq(a),e.setPath(a),e.toString()}o(qq,"escapeURLPath");function zq(t){let e="";if(t.search("DevelopmentStorageProxyUri=")!==-1){let a=t.split(";");for(let i of a)i.trim().startsWith("DevelopmentStorageProxyUri=")&&(e=i.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return e}o(zq,"getProxyUriFromDevConnString");function Jn(t,e){let a=t.split(";");for(let i of a)if(i.trim().startsWith(e))return i.trim().match(e+"=(.*)")[1];return""}o(Jn,"getValueInConnString");function vs(t){let e="";t.startsWith("UseDevelopmentStorage=true")&&(e=zq(t),t=Iq);let a=Jn(t,"BlobEndpoint");if(a=a.endsWith("/")?a.slice(0,-1):a,t.search("DefaultEndpointsProtocol=")!==-1&&t.search("AccountKey=")!==-1){let i="",r="",n=Buffer.from("accountKey","base64"),s="";if(r=Jn(t,"AccountName"),n=Buffer.from(Jn(t,"AccountKey"),"base64"),!a){i=Jn(t,"DefaultEndpointsProtocol");let p=i.toLowerCase();if(p!=="https"&&p!=="http")throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(s=Jn(t,"EndpointSuffix"),!s)throw new Error("Invalid EndpointSuffix in the provided Connection String");a=`${i}://${r}.blob.${s}`}if(r){if(n.length===0)throw new Error("Invalid AccountKey in the provided Connection String")}else throw new Error("Invalid AccountName in the provided Connection String");return{kind:"AccountConnString",url:a,accountName:r,accountKey:n,proxyUri:e}}else{let i=Jn(t,"SharedAccessSignature"),r=fw(a);if(a){if(!i)throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String")}else throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");return{kind:"SASConnString",url:a,accountName:r,accountSas:i}}}o(vs,"extractConnectionStringParts");function jq(t){return encodeURIComponent(t).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}o(jq,"escape");function Ue(t,e){let a=q.URLBuilder.parse(t),i=a.getPath();return i=i?i.endsWith("/")?`${i}${e}`:`${i}/${e}`:e,a.setPath(i),new URL(a.toString()).toString()}o(Ue,"appendToURLPath");function tn(t,e
Line truncated
|
||||
`)+`
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),i=this.factory.computeHMACSHA256(a);return e.headers.set(Ae.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${i}`),e}getHeaderValueToSign(e,a){let i=e.headers.get(a);return!i||a===Ae.CONTENT_LENGTH&&i==="0"?"":i}getCanonicalizedHeadersString(e){let a=e.headers.headersArray().filter(r=>r.name.toLowerCase().startsWith(Ae.PREFIX_FOR_STORAGE));a.sort((r,n)=>r.name.toLowerCase().localeCompare(n.name.toLowerCase())),a=a.filter((r,n,s)=>!(n>0&&r.name.toLowerCase()===s[n-1].name.toLowerCase()));let i="";return a.forEach(r=>{i+=`${r.name.toLowerCase().trimRight()}:${r.value.trimLeft()}
|
||||
`}),i}getCanonicalizedResourceString(e){let a=g2(e.url)||"/",i="";i+=`/${this.factory.accountName}${a}`;let r=Hq(e.url),n={};if(r){let s=[];for(let p in r)if(Object.prototype.hasOwnProperty.call(r,p)){let d=p.toLowerCase();n[d]=r[p],s.push(d)}s.sort();for(let p of s)i+=`
|
||||
${p}:${decodeURIComponent(n[p])}`}return i}},Qe=class extends Qo{static{o(this,"StorageSharedKeyCredential")}constructor(e,a){super(),this.accountName=e,this.accountKey=Buffer.from(a,"base64")}create(e,a){return new mc(e,a,this)}computeHMACSHA256(e){return _7.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}},iL="azure-storage-blob",rL="12.15.0",Zo=class extends H.ServiceClient{static{o(this,"StorageClientContext")}constructor(e,a){if(e===void 0)throw new Error("'url' cannot be null");if(a||(a={}),!a.userAgent){let i=H.getDefaultUserAgentValue();a.userAgent=`${iL}/${rL} ${i}`}super(void 0,a),this.requestContentType="application/json; charset=utf-8",this.baseUri=a.endpoint||"{url}",this.url=e,this.version=a.version||"2023-01-03"}},ep=class{static{o(this,"StorageClient")}constructor(e,a){this.url=qq(e),this.accountName=Gx(e),this.pipeline=a,this.storageClientContext=new Zo(this.url,a.toServiceClientOptions()),this.isHttps=$x(kq(this.url)||"","https"),this.credential=new Re;for(let r of this.pipeline.factories)L.isNode&&r instanceof Qe||r instanceof Re?this.credential=r:L.isTokenCredential(r.credential)&&(this.credential=r.credential);let i=this.storageClientContext;i.requestContentType=void 0}},j=z.createSpanFunction({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function W(t){var e,a;return{spanOptions:(e=t?.tracingOptions)===null||e===void 0?void 0:e.spanOptions,tracingContext:(a=t?.tracingOptions)===null||a===void 0?void 0:a.tracingContext}}o(W,"convertTracingToRequestOptionsBase");var qi=class t{static{o(this,"BlobSASPermissions")}constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){let a=new t;for(let i of e)switch(i){case"r":a.read=!0;break;case"a":a.add=!0;break;case"c":a.create=!0;break;case"w":a.write=!0;break;case"d":a.delete=!0;break;case"x":a.deleteVersion=!0;break;case"t":a.tag=!0;break;case"m":a.move=!0;break;case"e":a.execute=!0;break;case"i":a.setImmutabilityPolicy=!0;break;case"y":a.permanentDelete=!0;break;default:throw new RangeError(`Invalid permission: ${i}`)}return a}static from(e){let a=new t;return e.read&&(a.read=!0),e.add&&(a.add=!0),e.create&&(a.create=!0),e.write&&(a.write=!0),e.delete&&(a.delete=!0),e.deleteVersion&&(a.deleteVersion=!0),e.tag&&(a.tag=!0),e.move&&(a.move=!0),e.execute&&(a.execute=!0),e.setImmutabilityPolicy&&(a.setImmutabilityPolicy=!0),e.permanentDelete&&(a.permanentDelete=!0),a}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}},Li=class t{static{o(this,"ContainerSASPermissions")}constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1,this.filterByTags=!1}static parse(e){let a=new t;for(let i of e)switch(i){case"r":a.read=!0;break;case"a":a.add=!0;break;case"c":a.create=!0;break;case"w":a.write=!0;break;case"d":a.delete=!0;break;case"l":a.list=!0;break;case"t":a.tag=!0;break;case"x":a.deleteVersion=!0;break;case"m":a.move=!0;break;case"e":a.execute=!0;break;case"i":a.setImmutabilityPolicy=!0;break;case"y":a.permanentDelete=!0;break;case"f":a.filterByTags=!0;break;default:throw new RangeError(`Invalid permission ${i}`)}return a}static from(e){let a=new t;return e.read&&(a.read=!0),e.add&&(a.add=!0),e.create&&(a.create=!0),e.write&&(a.write=!0),e.delete&&(a.delete=!0),e.list&&(a.list=!0),e.deleteVersion&&(a.deleteVersion=!0),e.tag&&(a.tag=!0),e.move&&(a.move=!0),e.execute&&(a.execute=!0),e.setImmutabilityPolicy&&(a.setImmutabilityPolicy=!0),e.permanentDelete&&(a.permanentDelete=!0),e.filterByTags&&(a.filterByTags=!0),a}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.list&&e.push("l"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),this.filterByTags&&e.push("f"),e.join("")}},T0=class{static{o(this,"UserDelegationKeyCredential")}constructor(e,a){this.accountName=e,this.userDelegationKey=a,this.key=Buffer.from(a.value,"base64")}computeHMACSHA256(e){return _7.createHmac("sha256",this.key).update(e,"utf8").digest("base64")}};function zi(t){return t.end?`${t.start}-${t.end}`:t.start}o(zi,"ipRangeToString");Z.SASProtocol=void 0;(function(t){t.Https="https",t.HttpsAndHttp="https,http"})(Z.SASProtocol||(Z.SASProtocol={}));var mi=class{static{o(this,"SASQueryParameters")}constructor(e,a,i,r,n,s,p,d,l,c,m,u,f,h,b
Line truncated
|
||||
`),n=e.computeHMACSHA256(r);return new mi(t.version,n,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}o(nL,"generateBlobSASQueryParameters20150405");function sL(t,e){if(t=ys(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=qi.parse(t.permissions.toString()).toString():r=Li.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ee(t.startsOn,!1):"",t.expiresOn?Ee(t.expiresOn,!1):"",gs(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?zi(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new mi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}o(sL,"generateBlobSASQueryParameters20181109");function oL(t,e){if(t=ys(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=qi.parse(t.permissions.toString()).toString():r=Li.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ee(t.startsOn,!1):"",t.expiresOn?Ee(t.expiresOn,!1):"",gs(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?zi(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new mi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope)}o(oL,"generateBlobSASQueryParameters20201206");function pL(t,e){if(t=ys(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=qi.parse(t.permissions.toString()).toString():r=Li.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ee(t.startsOn,!1):"",t.expiresOn?Ee(t.expiresOn,!1):"",gs(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ee(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ee(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?zi(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new mi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey)}o(pL,"generateBlobSASQueryParametersUDK20181109");function dL(t,e){if(t=ys(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=qi.parse(t.permissions.toString()).toString():r=Li.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ee(t.startsOn,!1):"",t.expiresOn?Ee(t.expiresOn,!1):"",gs(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ee(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ee(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?zi(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new mi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId)}o(dL,"generateBlobSASQueryParametersUDK20200210");function lL(t,e){if(t=ys(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=qi.parse(t.permissions.toString()).toString():r=Li.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ee(t.startsOn,!1):"",t.expiresOn?Ee(t.expiresOn,!1):"",gs(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ee(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ee(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?zi(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new mi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope)}o(lL,"generateBlobSASQueryParametersUDK20201206");function gs(t,e,a){let i=[`/blob/${t}/${e}`];return a&&i.push(`/${a}`),i.join("")}o(gs,"getCanonicalName");function ys(t){let e=t.version?t.version:f2;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}o(ys,"SASSignatureValuesSanityCheckAndAutofill");var tp=class{static{o(this,"BlobLeaseClient")}constructor(e,a){let i=new Zo(e.url,e.pipeline.toServiceClientOptions());this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=new Zr(i)):(this._isContainer=!1,this._containerOrBlobOperation=new Wo(i)),a||(a=L.generateUuid()),this._leaseId=a}get leaseId(){return this._leaseId}get url(){return this._url}async acquireLease(e,a={}){var i,r,n,s,p,d;let{span:l,updatedOptions:c}=j("BlobLeaseClient-acquireLease",a);if(this._isContainer&&(!((i=a.conditions)===null||i===void 0)&&i.ifMatch&&((r=a.conditions)===null||r===void 0?void 0:r.ifMatch)!==ci||!((n=a.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=a.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==ci||!((p=a.conditions)===null||p===void 0)&&p.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{return await this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:a.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(d=a.conditions)===null||d===void 0?void 0:d.tagConditions}),proposedLeaseId:this._leaseId},W(c)))}catch(m){throw l.setStatus({code:z.SpanStatusCode.ERROR,message:m.message}),m}finally{l.end()}}async changeLease(e,a={}){var i,r,n,s,p,d;let{span:l,updatedOptions:c}=j("BlobLeaseClient-changeLease",a);if(this._isContainer&&(!((i=a.conditions)===null||i===void 0)&&i.ifMatch&&((r=a.conditions)===null||r===void 0?void 0:r.ifMatch)!==ci||!((n=a.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=a.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==ci||!((p=a.conditions)===null||p===void 0)&&p.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{let m=await this._containerOrBlobOperation.changeLease(this._leaseId,e,Object.assign({abortSignal:a.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(d=a.conditions)===null||d===void 0?void 0:d.tagConditions})},W(c)));return this._leaseId=e,m}catch(m){throw l.setStatus({code:z.SpanStatusCode.ERROR,message:m.message}),m}finally{l.end()}}async releaseLease(e={}){var a,i,r,n,s,p;let{span:d,updatedOptions:l}=j("BlobLeaseClient-releaseLease",e);if(this._isContainer&&(!((a=e.conditions)===null||a===void 0)&&a.ifMatch&&((i=e.conditions)===null||i===void 0?void 0:i.ifMatch)!==ci||!((r=e.conditions)===null||r===void 0)&&r.ifNoneMatch&&((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==ci||!((s=e.conditions)===null||s===void 0)&&s.tagCon
Line truncated
|
||||
`):s=[e.accountName,i,r,n,t.startsOn?Ee(t.startsOn,!1):"",Ee(t.expiresOn,!1),t.ipRange?zi(t.ipRange):"",t.protocol?t.protocol:"",a,""].join(`
|
||||
`);let p=e.computeHMACSHA256(s);return new mi(a,p,i.toString(),r,n,t.protocol,t.startsOn,t.expiresOn,t.ipRange,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.encryptionScope)}o(Wx,"generateAccountSASQueryParameters");var Y0=class t extends ep{static{o(this,"BlobServiceClient")}constructor(e,a,i){let r;wr(a)?r=a:L.isNode&&a instanceof Qe||a instanceof Re||L.isTokenCredential(a)?r=Ie(a,i):r=Ie(new Re,i),super(e,r),this.serviceContext=new nc(this.storageClientContext)}static fromConnectionString(e,a){a=a||{};let i=hs(e);if(i.kind==="AccountConnString")if(L.isNode){let r=new Qe(i.accountName,i.accountKey);a.proxyOptions||(a.proxyOptions=L.getDefaultProxySettings(i.proxyUri));let n=Ie(r,a);return new t(i.url,n)}else throw new Error("Account connection string is only supported in Node.js environment");else if(i.kind==="SASConnString"){let r=Ie(new Re,a);return new t(i.url+"?"+i.accountSas,r)}else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}getContainerClient(e){return new fc(He(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-createContainer",a);try{let n=this.getContainerClient(e),s=await n.create(r);return{containerClient:n,containerCreateResponse:s}}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async deleteContainer(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-deleteContainer",a);try{return await this.getContainerClient(e).delete(r)}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async undeleteContainer(e,a,i={}){let{span:r,updatedOptions:n}=j("BlobServiceClient-undeleteContainer",i);try{let s=this.getContainerClient(i.destinationContainerName||e),d=await new Zr(s.storageClientContext).restore(Object.assign({deletedContainerName:e,deletedContainerVersion:a},n));return{containerClient:s,containerUndeleteResponse:d}}catch(s){throw r.setStatus({code:z.SpanStatusCode.ERROR,message:s.message}),s}finally{r.end()}}async renameContainer(e,a,i={}){var r;let{span:n,updatedOptions:s}=j("BlobServiceClient-renameContainer",i);try{let p=this.getContainerClient(a),l=await new Zr(p.storageClientContext).rename(e,Object.assign(Object.assign({},s),{sourceLeaseId:(r=i.sourceCondition)===null||r===void 0?void 0:r.leaseId}));return{containerClient:p,containerRenameResponse:l}}catch(p){throw n.setStatus({code:z.SpanStatusCode.ERROR,message:p.message}),p}finally{n.end()}}async getProperties(e={}){let{span:a,updatedOptions:i}=j("BlobServiceClient-getProperties",e);try{return await this.serviceContext.getProperties(Object.assign({abortSignal:e.abortSignal},W(i)))}catch(r){throw a.setStatus({code:z.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async setProperties(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-setProperties",a);try{return await this.serviceContext.setProperties(e,Object.assign({abortSignal:a.abortSignal},W(r)))}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async getStatistics(e={}){let{span:a,updatedOptions:i}=j("BlobServiceClient-getStatistics",e);try{return await this.serviceContext.getStatistics(Object.assign({abortSignal:e.abortSignal},W(i)))}catch(r){throw a.setStatus({code:z.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async getAccountInfo(e={}){let{span:a,updatedOptions:i}=j("BlobServiceClient-getAccountInfo",e);try{return await this.serviceContext.getAccountInfo(Object.assign({abortSignal:e.abortSignal},W(i)))}catch(r){throw a.setStatus({code:z.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async listContainersSegment(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-listContainersSegment",a);try{return await this.serviceContext.listContainersSegment(Object.assign(Object.assign(Object.assign({abortSignal:a.abortSignal,marker:e},a),{include:typeof a.include=="string"?[a.include]:a.include}),W(r)))}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async findBlobsByTagsSegment(e,a,i={}){let{span:r,updatedOptions:n}=j("BlobServiceClient-findBlobsByTagsSegment",i);try{let s=await this.serviceContext.filterBlobs(Object.assign({abortSignal:i.abortSignal,where:e,marker:a,maxPageSize:i.maxPageSize},W(n)));return Object.assign(Object.assign({},s),{_response:s._response,blobs:s.blobs.map(d=>{var l;let c="";return((l=d.tags)===null||l===void 0?void 0:l.blobTagSet.length)===1&&(c=d.tags.blobTagSet[0].value),Object.assign(Object.assign({},d),{tags:$o(d.tags),tagValue:c})})})}catch(s){throw r.setStatus({code:z.SpanStatusCode.ERROR,message:s.message}),s}finally{r.end()}}findBlobsByTagsSegments(e,a,i={}){return U.__asyncGenerator(this,arguments,o(function*(){let n;if(a||a===void 0)do n=yield U.__await(this.findBlobsByTagsSegment(e,a,i)),n.blobs=n.blobs||[],a=n.continuationToken,yield yield U.__await(n);wh
Line truncated
|
||||
If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(a),this.code=e,this.name="NetworkError"}};aa.NetworkError=_c;_c.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Sc=class extends Error{static{o(this,"UsageError")}constructor(){let e=`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`;super(e),this.name="UsageError"}};aa.UsageError=Sc;Sc.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1});var Kx=T(ia=>{"use strict";var _L=ia&&ia.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),SL=ia&&ia.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),EL=ia&&ia.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&_L(e,t,a);return SL(e,t),e},CL=ia&&ia.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{l(i.next(c))}catch(m){s(m)}}o(p,"fulfilled");function d(c){try{l(i.throw(c))}catch(m){s(m)}}o(d,"rejected");function l(c){c.done?n(c.value):r(c.value).then(p,d)}o(l,"step"),l((i=i.apply(t,e||[])).next())})};Object.defineProperty(ia,"__esModule",{value:!0});ia.uploadCacheArchiveSDK=ia.UploadProgress=void 0;var C2=EL(rt()),TL=x2(),OL=E2(),Ec=class{static{o(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,a=(100*(e/this.contentLength)).toFixed(1),i=Date.now()-this.startTime,r=(e/(1024*1024)/(i/1e3)).toFixed(1);C2.info(`Sent ${e} of ${this.contentLength} (${a}%), ${r} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let a=o(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(a,e))},"displayCallback");this.timeoutHandle=setTimeout(a,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};ia.UploadProgress=Ec;function PL(t,e,a){var i;return CL(this,void 0,void 0,function*(){let r=new TL.BlobClient(t),n=r.getBlockBlobClient(),s=new Ec((i=a?.archiveSizeBytes)!==null&&i!==void 0?i:0),p={blockSize:a?.uploadChunkSize,concurrency:a?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:s.onProgress()};try{s.startDisplayTimer(),C2.debug(`BlobClient: ${r.name}:${r.accountName}:${r.containerName}`);let d=yield n.uploadFile(e,p);if(d._response.status>=400)throw new OL.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${d._response.status}`);return d}catch(d){throw C2.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${d.message}`),d}finally{s.stopDisplayTimer()}})}o(PL,"uploadCacheArchiveSDK");ia.uploadCacheArchiveSDK=PL});var O2=T(Je=>{"use strict";var RL=Je&&Je.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),DL=Je&&Je.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),IL=Je&&Je.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&RL(e,t,a);return DL(e,t),e},Tc=Je&&Je.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{l(i.next(c))}catch(m){s(m)}}o(p,"fulfilled");function d(c){try{l(i.throw(c))}catch(m){s(m)}}o(d,"rejected");function l(c){c.done?n(c.value):r(c.value).then(p,d)}o(l,"step"),l((i=i.apply(t,e||[])).next())})};Object.defineProperty(Je,"__esModule",{value:!0});Je.retryHttpClientResponse=Je.retryTypedResponse=Je.retry=Je.isRetryableStatusCode=Je.isServerErrorStatusCode=Je.isSuccessStatusCode=void 0;var Yx=IL(rt()),Cc=Rr(),vs=Cn();function BL(t){return t?t>=200&&t<300:!1}o(BL,"isSuccessStatusCode");Je.isSuccessStatusCode=BL;function Qx(t){return t?t>=500:!0}o(Qx,"isServerErrorStatusCode");Je.isServerErrorStatusCode=Qx;function Jx(t){return t?[Cc.HttpCodes.BadGateway,Cc.HttpCodes.ServiceUnavailable,Cc.HttpCodes.GatewayTimeout].includes(t):!1}o(Jx,"isRetryableStatusCode");Je.isRetryableStatusCode=Jx;function AL(t){return Tc(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(AL,"sleep");function T2(t,e,a,i=vs.DefaultRetryAttempts,r=vs.DefaultRetryDelay,n=
Line truncated
|
||||
Other caches with similar key:`);for(let p of n?.artifactCaches||[])ua.debug(`Cache Key: ${p?.cacheKey}, Cache Version: ${p?.cacheVersion}, Cache Scope: ${p?.scope}, Cache Created: ${p?.creationTime}`)}}})}o(gz,"printCachesListForDiagnostics");function yz(t,e,a){return ra(this,void 0,void 0,function*(){let i=new dz.URL(t),r=(0,B2.getDownloadOptions)(a);i.hostname.endsWith(".blob.core.windows.net")?r.useAzureSdk?yield(0,Rc.downloadCacheStorageSDK)(t,e,r):r.concurrentBlobDownloads?yield(0,Rc.downloadCacheHttpClientConcurrent)(t,e,r):yield(0,Rc.downloadCacheHttpClient)(t,e):yield(0,Rc.downloadCacheHttpClient)(t,e)})}o(yz,"downloadCache");Tt.downloadCache=yz;function vz(t,e,a){return ra(this,void 0,void 0,function*(){let i=A2(),r=xs.getCacheVersion(e,a?.compressionMethod,a?.enableCrossOsArchive),n={key:t,version:r,cacheSize:a?.cacheSize};return yield(0,_r.retryTypedResponse)("reserveCache",()=>ra(this,void 0,void 0,function*(){return i.postJson(fp("caches"),n)}))})}o(vz,"reserveCache");Tt.reserveCache=vz;function pw(t,e){return`bytes ${t}-${e}/*`}o(pw,"getContentRange");function bz(t,e,a,i,r){return ra(this,void 0,void 0,function*(){ua.debug(`Uploading chunk of size ${r-i+1} bytes at offset ${i} with content range: ${pw(i,r)}`);let n={"Content-Type":"application/octet-stream","Content-Range":pw(i,r)},s=yield(0,_r.retryHttpClientResponse)(`uploadChunk (start: ${i}, end: ${r})`,()=>ra(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,a(),n)}));if(!(0,_r.isSuccessStatusCode)(s.message.statusCode))throw new Error(`Cache service responded with ${s.message.statusCode} during upload chunk.`)})}o(bz,"uploadChunk");function xz(t,e,a,i){return ra(this,void 0,void 0,function*(){let r=xs.getArchiveFileSizeInBytes(a),n=fp(`caches/${e.toString()}`),s=D2.openSync(a,"r"),p=(0,B2.getUploadOptions)(i),d=xs.assertDefined("uploadConcurrency",p.uploadConcurrency),l=xs.assertDefined("uploadChunkSize",p.uploadChunkSize),c=[...new Array(d).keys()];ua.debug("Awaiting all uploads");let m=0;try{yield Promise.all(c.map(()=>ra(this,void 0,void 0,function*(){for(;m<r;){let u=Math.min(r-m,l),f=m,h=m+u-1;m+=l,yield bz(t,n,()=>D2.createReadStream(a,{fd:s,start:f,end:h,autoClose:!1}).on("error",b=>{throw new Error(`Cache upload failed because file read failed with ${b.message}`)}),f,h)}})))}finally{D2.closeSync(s)}})}o(xz,"uploadFile");function wz(t,e,a){return ra(this,void 0,void 0,function*(){let i={size:a};return yield(0,_r.retryTypedResponse)("commitCache",()=>ra(this,void 0,void 0,function*(){return t.postJson(fp(`caches/${e.toString()}`),i)}))})}o(wz,"commitCache");function Nz(t,e,a,i){return ra(this,void 0,void 0,function*(){if((0,B2.getUploadOptions)(i).useAzureSdk){if(!a)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield(0,lz.uploadCacheArchiveSDK)(a,e,i)}else{let n=A2();ua.debug("Upload cache"),yield xz(n,t,e,i),ua.debug("Commiting cache");let s=xs.getArchiveFileSizeInBytes(e);ua.info(`Cache Size: ~${Math.round(s/(1024*1024))} MB (${s} B)`);let p=yield wz(n,t,s);if(!(0,_r.isSuccessStatusCode)(p.statusCode))throw new Error(`Cache service responded with ${p.statusCode} during commit cache.`);ua.info("Cache saved successfully")}})}o(Nz,"saveCache");Tt.saveCache=Nz});var Dc=T(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});ws.isJsonObject=ws.typeofJsonValue=void 0;function _z(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}o(_z,"typeofJsonValue");ws.typeofJsonValue=_z;function Sz(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}o(Sz,"isJsonObject");ws.isJsonObject=Sz});var Bc=T(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});Ns.base64encode=Ns.base64decode=void 0;var Hi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Ic=[];for(let t=0;t<Hi.length;t++)Ic[Hi[t].charCodeAt(0)]=t;Ic["-".charCodeAt(0)]=Hi.indexOf("+");Ic["_".charCodeAt(0)]=Hi.indexOf("/");function Ez(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let a=new Uint8Array(e),i=0,r=0,n,s=0;for(let p=0;p<t.length;p++){if(n=Ic[t.charCodeAt(p)],n===void 0)switch(t[p]){case"=":r=0;case`
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(r){case 0:s=n,r=1;break;case 1:a[i++]=s<<2|(n&48)>>4,s=n,r=2;break;case 2:a[i++]=(s&15)<<4|(n&60)>>2,s=n,r=3;break;case 3:a[i++]=(s&3)<<6|n,r=0;break}}if(r==1)throw Error("invalid base64 string.");return a.subarray(0,i)}o(Ez,"base64decode");Ns.base64decode=Ez;function Cz(t){let e="",a=0,i,r=0;for(let n=0;n<t.length;n++)switch(i=t[n],a){case 0:e+=Hi[i>>2],r=(i&3)<<4,a=1;break;case 1:e+=Hi[r|i>>4],r=(i&15)<<2,a=2;break;case 2:e+=Hi[r|i>>6],e+=Hi[i&63],a=0;break}return a&&(e+=Hi[r],e+="=",a==1&&(e+="=")),e}o(Cz,"base64encode");Ns.base64encode=Cz});var lw=T(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});Ac.utf8read=void 0;var M2=o(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function Tz(t){if(t.length<1)return"";let e=0,a=[],i=[],r=0,n,s=t.length;for(;e<s;)n=t[e++],n<128?i[r++]=n:n>191&&n<224?i[r++]=(n&31)<<6|t[e++]&63:n>239&&n<365?(n=((n&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,i[r++]=55296+(n>>10),i[r++]=56320+(n&1023)):i[r++]=(n&15)<<12|(t[e++]&63)<<6|t[e++]&63,r>8191&&(a.push(M2(i)),r=0);return a.length?(r&&a.push(M2(i.slice(0,r))),a.join("")):M2(i.slice(0,r))}o(Tz,"utf8read");Ac.utf8read=Tz});var hp=T(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.WireType=fi.mergeBinaryOptions=fi.UnknownFieldHandler=void 0;var Oz;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(a,i,r,n,s)=>{(e(i)?i[t.symbol]:i[t.symbol]=[]).push({no:r,wireType:n,data:s})},t.onWrite=(a,i,r)=>{for(let{no:n,wireType:s,data:p}of t.list(i))r.tag(n,s).raw(p)},t.list=(a,i)=>{if(e(a)){let r=a[t.symbol];return i?r.filter(n=>n.no==i):r}return[]},t.last=(a,i)=>t.list(a,i).slice(-1)[0];let e=o(a=>a&&Array.isArray(a[t.symbol]),"is")})(Oz=fi.UnknownFieldHandler||(fi.UnknownFieldHandler={}));function Pz(t,e){return Object.assign(Object.assign({},t),e)}o(Pz,"mergeBinaryOptions");fi.mergeBinaryOptions=Pz;var Rz;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(Rz=fi.WireType||(fi.WireType={}))});var qc=T(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.varint32read=na.varint32write=na.int64toString=na.int64fromString=na.varint64write=na.varint64read=void 0;function Dz(){let t=0,e=0;for(let i=0;i<28;i+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<i,!(r&128))return this.assertBounds(),[t,e]}let a=this.buf[this.pos++];if(t|=(a&15)<<28,e=(a&112)>>4,!(a&128))return this.assertBounds(),[t,e];for(let i=3;i<=31;i+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<i,!(r&128))return this.assertBounds(),[t,e]}throw new Error("invalid varint")}o(Dz,"varint64read");na.varint64read=Dz;function Iz(t,e,a){for(let n=0;n<28;n=n+7){let s=t>>>n,p=!(!(s>>>7)&&e==0),d=(p?s|128:s)&255;if(a.push(d),!p)return}let i=t>>>28&15|(e&7)<<4,r=!!(e>>3);if(a.push((r?i|128:i)&255),!!r){for(let n=3;n<31;n=n+7){let s=e>>>n,p=!!(s>>>7),d=(p?s|128:s)&255;if(a.push(d),!p)return}a.push(e>>>31&1)}}o(Iz,"varint64write");na.varint64write=Iz;var Mc=65536*65536;function Bz(t){let e=t[0]=="-";e&&(t=t.slice(1));let a=1e6,i=0,r=0;function n(s,p){let d=Number(t.slice(s,p));r*=a,i=i*a+d,i>=Mc&&(r=r+(i/Mc|0),i=i%Mc)}return o(n,"add1e6digit"),n(-24,-18),n(-18,-12),n(-12,-6),n(-6),[e,i,r]}o(Bz,"int64fromString");na.int64fromString=Bz;function Az(t,e){if(e>>>0<=2097151)return""+(Mc*e+(t>>>0));let a=t&16777215,i=(t>>>24|e<<8)>>>0&16777215,r=e>>16&65535,n=a+i*6777216+r*6710656,s=i+r*8147497,p=r*2,d=1e7;n>=d&&(s+=Math.floor(n/d),n%=d),s>=d&&(p+=Math.floor(s/d),s%=d);function l(c,m){let u=c?String(c):"";return m?"0000000".slice(u.length)+u:u}return o(l,"decimalFrom1e7"),l(p,0)+l(s,p)+l(n,1)}o(Az,"int64toString");na.int64toString=Az;function Mz(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let a=0;a<9;a++)e.push(t&127|128),t=t>>7;e.push(1)}}o(Mz,"varint32write");na.varint32write=Mz;function qz(){let t=this.buf[this.pos++],e=t&127;if(!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,!(t&128))return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let a=5;t&128&&a<10;a++)t=this.buf[this.pos++];if(t&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}o(qz,"varint32read");na.varint32read=qz});var Er=T(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.PbLong=Sr.PbULong=Sr.detectBi=void 0;var gp=qc(),Be;function cw(){let t=new DataView(new ArrayBuffer(8));Be=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:
Line truncated
|
||||
`)}};dm.RpcError=ph});var lh=T(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});cm.mergeRpcOptions=void 0;var Hw=pt();function rk(t,e){if(!e)return t;let a={};lm(t,a),lm(e,a);for(let i of Object.keys(e)){let r=e[i];switch(i){case"jsonOptions":a.jsonOptions=Hw.mergeJsonOptions(t.jsonOptions,a.jsonOptions);break;case"binaryOptions":a.binaryOptions=Hw.mergeBinaryOptions(t.binaryOptions,a.binaryOptions);break;case"meta":a.meta={},lm(t.meta,a.meta),lm(e.meta,a.meta);break;case"interceptors":a.interceptors=t.interceptors?t.interceptors.concat(r):r.concat();break}}return a}o(rk,"mergeRpcOptions");cm.mergeRpcOptions=rk;function lm(t,e){if(!t)return;let a=e;for(let[i,r]of Object.entries(t))r instanceof Date?a[i]=new Date(r.getTime()):Array.isArray(r)?a[i]=r.concat():a[i]=r}o(lm,"copy")});var mh=T(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.Deferred=dn.DeferredState=void 0;var yi;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(yi=dn.DeferredState||(dn.DeferredState={}));var ch=class{static{o(this,"Deferred")}constructor(e=!0){this._state=yi.PENDING,this._promise=new Promise((a,i)=>{this._resolve=a,this._reject=i}),e&&this._promise.catch(a=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==yi.PENDING)throw new Error(`cannot resolve ${yi[this.state].toLowerCase()}`);this._resolve(e),this._state=yi.RESOLVED}reject(e){if(this.state!==yi.PENDING)throw new Error(`cannot reject ${yi[this.state].toLowerCase()}`);this._reject(e),this._state=yi.REJECTED}resolvePending(e){this._state===yi.PENDING&&this.resolve(e)}rejectPending(e){this._state===yi.PENDING&&this.reject(e)}};dn.Deferred=ch});var fh=T(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});mm.RpcOutputStreamController=void 0;var Fw=mh(),ln=pt(),uh=class{static{o(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,a){return a.push(e),()=>{let i=a.indexOf(e);i>=0&&a.splice(i,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,a,i){ln.assert((e?1:0)+(a?1:0)+(i?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),a&&this.notifyError(a),i&&this.notifyComplete()}notifyMessage(e){ln.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(a=>a(e)),this._lis.nxt.forEach(a=>a(e,void 0,!1))}notifyError(e){ln.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(a=>a(e)),this._lis.nxt.forEach(a=>a(void 0,e,!1)),this.clearLis()}notifyComplete(){ln.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._itState||(this._itState={q:[]}),this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{let e=this._itState;ln.assert(e,"bad state"),ln.assert(!e.p,"iterator contract broken");let a=e.q.shift();return a?"value"in a?Promise.resolve(a):Promise.reject(a):(e.p=new Fw.Deferred,e.p.promise)}}}pushIt(e){let a=this._itState;if(a)if(a.p){let i=a.p;ln.assert(i.state==Fw.DeferredState.PENDING,"iterator contract broken"),"value"in e?i.resolve(e):i.reject(e),delete a.p}else a.q.push(e)}};mm.RpcOutputStreamController=uh});var gh=T(Ps=>{"use strict";var nk=Ps&&Ps.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{l(i.next(c))}catch(m){s(m)}}o(p,"fulfilled");function d(c){try{l(i.throw(c))}catch(m){s(m)}}o(d,"rejected");function l(c){c.done?n(c.value):r(c.value).then(p,d)}o(l,"step"),l((i=i.apply(t,e||[])).next())})};Object.defineProperty(Ps,"__esModule",{value:!0});Ps.UnaryCall=void 0;var hh=class{static{o(this,"UnaryCall")}constructor(e,a,i,r,n,s,p){this.method=e,this.requestHeaders=a,this.request=i,this.headers=r,this.response=n,this.status=s,this.trailers=p}then(e,a){return this.promiseFinished().then(i=>e?Promise.resolve(e(i)):i,i=>a?Promise.resolve(a(i)):Promise.reject(i))}promiseFinished(){return nk(this,void 0,void 0,function*(){let[e,a,i,r]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:a,status:i,trailers:r}})}};Ps.UnaryCall=hh});var vh=T(Rs=>{"use strict";var sk=Rs&&Rs.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{l(i.next(c))}catch(m){s(m)}}o(p,"fulfilled");function
Line truncated
|
||||
`));let i=yield kh(a,"create");yield Uh(i,t)})}o(eU,"createTar");zt.createTar=eU});var cN=T(dt=>{"use strict";var tU=dt&&dt.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),aU=dt&&dt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rp=dt&&dt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&tU(e,t,a);return aU(e,t),e},$s=dt&&dt.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{l(i.next(c))}catch(m){s(m)}}o(p,"fulfilled");function d(c){try{l(i.throw(c))}catch(m){s(m)}}o(d,"rejected");function l(c){c.done?n(c.value):r(c.value).then(p,d)}o(l,"step"),l((i=i.apply(t,e||[])).next())})};Object.defineProperty(dt,"__esModule",{value:!0});dt.saveCache=dt.restoreCache=dt.isFeatureAvailable=dt.ReserveCacheError=dt.ValidationError=void 0;var re=Rp(rt()),xm=Rp(require("path")),ke=Rp(On()),Vs=Rp(dw()),dN=Rp(nN()),wm=Oc(),Or=pN(),iU=Cn(),Ba=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};dt.ValidationError=Ba;var cn=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};dt.ReserveCacheError=cn;function lN(t){if(!t||t.length===0)throw new Ba("Path Validation Error: At least one directory or file path is required")}o(lN,"checkPaths");function Hh(t){if(t.length>512)throw new Ba(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Ba(`Key Validation Error: ${t} cannot contain commas.`)}o(Hh,"checkKey");function rU(){return!!process.env.ACTIONS_CACHE_URL}o(rU,"isFeatureAvailable");dt.isFeatureAvailable=rU;function nU(t,e,a,i,r=!1){return $s(this,void 0,void 0,function*(){let n=(0,wm.getCacheServiceVersion)();switch(re.debug(`Cache service version: ${n}`),lN(t),n){case"v2":return yield oU(t,e,a,i,r);case"v1":default:return yield sU(t,e,a,i,r)}})}o(nU,"restoreCache");dt.restoreCache=nU;function sU(t,e,a,i,r=!1){return $s(this,void 0,void 0,function*(){a=a||[];let n=[e,...a];if(re.debug("Resolved Keys:"),re.debug(JSON.stringify(n)),n.length>10)throw new Ba("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of n)Hh(d);let s=yield ke.getCompressionMethod(),p="";try{let d=yield Vs.getCacheEntry(n,t,{compressionMethod:s,enableCrossOsArchive:r});if(!d?.archiveLocation)return;if(i?.lookupOnly)return re.info("Lookup only - skipping download"),d.cacheKey;p=xm.join(yield ke.createTempDirectory(),ke.getCacheFileName(s)),re.debug(`Archive Path: ${p}`),yield Vs.downloadCache(d.archiveLocation,p,i),re.isDebug()&&(yield(0,Or.listTar)(p,s));let l=ke.getArchiveFileSizeInBytes(p);return re.info(`Cache Size: ~${Math.round(l/(1024*1024))} MB (${l} B)`),yield(0,Or.extractTar)(p,s),re.info("Cache restored successfully"),d.cacheKey}catch(d){if(d.name===Ba.name)throw d;re.warning(`Failed to restore: ${d.message}`)}finally{try{yield ke.unlinkFile(p)}catch(d){re.debug(`Failed to delete archive: ${d}`)}}})}o(sU,"restoreCacheV1");function oU(t,e,a,i,r=!1){return $s(this,void 0,void 0,function*(){i=Object.assign(Object.assign({},i),{useAzureSdk:!0}),a=a||[];let n=[e,...a];if(re.debug("Resolved Keys:"),re.debug(JSON.stringify(n)),n.length>10)throw new Ba("Key Validation Error: Keys are limited to a maximum of 10.");for(let p of n)Hh(p);let s="";try{let p=dN.internalCacheTwirpClient(),d=yield ke.getCompressionMethod(),l={key:e,restoreKeys:a,version:ke.getCacheVersion(t,d,r)},c=yield p.GetCacheEntryDownloadURL(l);if(!c.ok){re.debug(`Cache not found for version ${l.version} of keys: ${n.join(", ")}`);return}if(re.info(`Cache hit for: ${l.key}`),i?.lookupOnly)return re.info("Lookup only - skipping download"),c.matchedKey;s=xm.join(yield ke.createTempDirectory(),ke.getCacheFileName(d)),re.debug(`Archive path: ${s}`),re.debug(`Starting download of archive to: ${s}`),yield Vs.downloadCache(c.signedDownloadUrl,s,i);let m=ke.getArchiveFileSizeInBytes(s);return re.info(`Cache Size: ~${Math.round(m/(1024*1024))} MB (${m} B)`),re.isDebug()&&(yield(0,Or.listTar)(s,d)),yield(0,Or.extractTar)(s,d),re.info("Cache restored successfully"),c.matchedKey}catch(p){if(p.name===Ba.name)throw p;re.warning(`Failed to restore: ${p.message}`)}finally{try{s&&(yield ke.unlinkFile(s))}catch(p){re.debug(`Failed to delete archive: ${p}`)}}})}o(oU,"restoreCacheV2");function pU(t,e,a,i=!1){return $s(this,void 0,void 0,function*(){let r=(0,wm.getCacheServiceVersion)();switch(re.debug(`Cache servLine truncated
|
||||
`);for(let r of i){let n=r.split("=");if(n.length===2&&(n[0].trim()==="VERSION_ID"||n[0].trim()==="DISTRIB_RELEASE")){e=n[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return e}o(yU,"_getOsVersion");jt._getOsVersion=yU;function vU(){let t="/etc/lsb-release",e="/etc/os-release",a="";return Nm.existsSync(t)?a=Nm.readFileSync(t).toString():Nm.existsSync(e)&&(a=Nm.readFileSync(e).toString()),a}o(vU,"_readLinuxVersionFile");jt._readLinuxVersionFile=vU});var gN=T((PK,hN)=>{var bU=require("crypto");hN.exports=o(function(){return bU.randomBytes(16)},"nodeRNG")});var bN=T((DK,vN)=>{var yN=[];for(Dp=0;Dp<256;++Dp)yN[Dp]=(Dp+256).toString(16).substr(1);var Dp;function xU(t,e){var a=e||0,i=yN;return[i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]]].join("")}o(xU,"bytesToUuid");vN.exports=xU});var wN=T((BK,xN)=>{var wU=gN(),NU=bN();function _U(t,e,a){var i=e&&a||0;typeof t=="string"&&(e=t==="binary"?new Array(16):null,t=null),t=t||{};var r=t.random||(t.rng||wU)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e)for(var n=0;n<16;++n)e[i+n]=r[n];return e||NU(r)}o(_U,"v4");xN.exports=_U});var SN=T(Aa=>{"use strict";var SU=Aa&&Aa.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),EU=Aa&&Aa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),CU=Aa&&Aa.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&SU(e,t,a);return EU(e,t),e},NN=Aa&&Aa.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{l(i.next(c))}catch(m){s(m)}}o(p,"fulfilled");function d(c){try{l(i.throw(c))}catch(m){s(m)}}o(d,"rejected");function l(c){c.done?n(c.value):r(c.value).then(p,d)}o(l,"step"),l((i=i.apply(t,e||[])).next())})};Object.defineProperty(Aa,"__esModule",{value:!0});Aa.RetryHelper=void 0;var _N=CU(rt()),$h=class{static{o(this,"RetryHelper")}constructor(e,a,i){if(e<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(a),this.maxSeconds=Math.floor(i),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(e,a){return NN(this,void 0,void 0,function*(){let i=1;for(;i<this.maxAttempts;){try{return yield e()}catch(n){if(a&&!a(n))throw n;_N.info(n.message)}let r=this.getSleepAmount();_N.info(`Waiting ${r} seconds before trying again`),yield this.sleep(r),i++}return yield e()})}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return NN(this,void 0,void 0,function*(){return new Promise(a=>setTimeout(a,e*1e3))})}};Aa.RetryHelper=$h});var IN=T(oe=>{"use strict";var TU=oe&&oe.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),OU=oe&&oe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vi=oe&&oe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&TU(e,t,a);return OU(e,t),e},Vt=oe&&oe.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{l(i.next(c))}catch(m){s(m)}}o(p,"fulfilled");function d(c){try{l(i.throw(c))}catch(m){s(m)}}o(d,"rejected");function l(c){c.done?n(c.value):r(c.value).then(p,d)}o(l,"step"),l((i=i.apply(t,e||[])).next())})},PU=oe&&oe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oe,"__esModule",{value:!0});oe.evaluateVersions=oe.isExplicitVersion=oe.findFromManifest=oe.getManifestFromRepo=oe.findAllVersions=oe.find=oe.cacheFile=oe.cacheDir=oe.extractZip=oe.extractXar=oe.extractTar=oe.extract7z=oe.downloadTool=oe.HTTPError=void 0;var xe=vi(rt()),ha=vi(Js()),Ma=vi(require("fs")),RU=vi(fN()),Bp=vi(require("os")),Qa=vi(require("path")),EN=vi(Rr()),$i=vi(pd()),DU=vi(require("stream")),IU=vi(require("util")),Gs=require("assert"),CN=PU(wN()),Pr=xn(),BU=SN(),Ip=class extends Error{static{o(this,"HTTPError")}constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}};oe.HTTPError=Ip;var Xh=process.platform==="win32",AU=process.platform==="darwin",MU="actions/tool-cache";function qU(t,e,a,i){return Vt(this,void 0,void 0,function*(){e=e||Qa.join(DN(),CN.default()),yield ha.mkdirP(Qa.dirname(e)),xe.debug(`Downloading ${tLine truncated
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),i=this.factory.computeHMACSHA256(a);return e.headers.set(Be.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${i}`),e}getHeaderValueToSign(e,a){let i=e.headers.get(a);return!i||a===Be.CONTENT_LENGTH&&i==="0"?"":i}getCanonicalizedHeadersString(e){let a=e.headers.headersArray().filter(r=>r.name.toLowerCase().startsWith(Be.PREFIX_FOR_STORAGE));a.sort((r,n)=>r.name.toLowerCase().localeCompare(n.name.toLowerCase())),a=a.filter((r,n,s)=>!(n>0&&r.name.toLowerCase()===s[n-1].name.toLowerCase()));let i="";return a.forEach(r=>{i+=`${r.name.toLowerCase().trimRight()}:${r.value.trimLeft()}
|
||||
`}),i}getCanonicalizedResourceString(e){let a=P0(e.url)||"/",i="";i+=`/${this.factory.accountName}${a}`;let r=Fq(e.url),n={};if(r){let s=[];for(let p in r)if(Object.prototype.hasOwnProperty.call(r,p)){let l=p.toLowerCase();n[l]=r[p],s.push(l)}s.sort();for(let p of s)i+=`
|
||||
${p}:${decodeURIComponent(n[p])}`}return i}},Ye=class extends ap{static{o(this,"StorageSharedKeyCredential")}constructor(e,a){super(),this.accountName=e,this.accountKey=Buffer.from(a,"base64")}create(e,a){return new vc(e,a,this)}computeHMACSHA256(e){return $7.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}},rz="azure-storage-blob",nz="12.15.0",rp=class extends U.ServiceClient{static{o(this,"StorageClientContext")}constructor(e,a){if(e===void 0)throw new Error("'url' cannot be null");if(a||(a={}),!a.userAgent){let i=U.getDefaultUserAgentValue();a.userAgent=`${rz}/${nz} ${i}`}super(void 0,a),this.requestContentType="application/json; charset=utf-8",this.baseUri=a.endpoint||"{url}",this.url=e,this.version=a.version||"2023-01-03"}},np=class{static{o(this,"StorageClient")}constructor(e,a){this.url=qq(e),this.accountName=fw(e),this.pipeline=a,this.storageClientContext=new rp(this.url,a.toServiceClientOptions()),this.isHttps=mw(Hq(this.url)||"","https"),this.credential=new Pe;for(let r of this.pipeline.factories)q.isNode&&r instanceof Ye||r instanceof Pe?this.credential=r:q.isTokenCredential(r.credential)&&(this.credential=r.credential);let i=this.storageClientContext;i.requestContentType=void 0}},j=z.createSpanFunction({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function X(t){var e,a;return{spanOptions:(e=t?.tracingOptions)===null||e===void 0?void 0:e.spanOptions,tracingContext:(a=t?.tracingOptions)===null||a===void 0?void 0:a.tracingContext}}o(X,"convertTracingToRequestOptionsBase");var qi=class t{static{o(this,"BlobSASPermissions")}constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){let a=new t;for(let i of e)switch(i){case"r":a.read=!0;break;case"a":a.add=!0;break;case"c":a.create=!0;break;case"w":a.write=!0;break;case"d":a.delete=!0;break;case"x":a.deleteVersion=!0;break;case"t":a.tag=!0;break;case"m":a.move=!0;break;case"e":a.execute=!0;break;case"i":a.setImmutabilityPolicy=!0;break;case"y":a.permanentDelete=!0;break;default:throw new RangeError(`Invalid permission: ${i}`)}return a}static from(e){let a=new t;return e.read&&(a.read=!0),e.add&&(a.add=!0),e.create&&(a.create=!0),e.write&&(a.write=!0),e.delete&&(a.delete=!0),e.deleteVersion&&(a.deleteVersion=!0),e.tag&&(a.tag=!0),e.move&&(a.move=!0),e.execute&&(a.execute=!0),e.setImmutabilityPolicy&&(a.setImmutabilityPolicy=!0),e.permanentDelete&&(a.permanentDelete=!0),a}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}},zi=class t{static{o(this,"ContainerSASPermissions")}constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1,this.filterByTags=!1}static parse(e){let a=new t;for(let i of e)switch(i){case"r":a.read=!0;break;case"a":a.add=!0;break;case"c":a.create=!0;break;case"w":a.write=!0;break;case"d":a.delete=!0;break;case"l":a.list=!0;break;case"t":a.tag=!0;break;case"x":a.deleteVersion=!0;break;case"m":a.move=!0;break;case"e":a.execute=!0;break;case"i":a.setImmutabilityPolicy=!0;break;case"y":a.permanentDelete=!0;break;case"f":a.filterByTags=!0;break;default:throw new RangeError(`Invalid permission ${i}`)}return a}static from(e){let a=new t;return e.read&&(a.read=!0),e.add&&(a.add=!0),e.create&&(a.create=!0),e.write&&(a.write=!0),e.delete&&(a.delete=!0),e.list&&(a.list=!0),e.deleteVersion&&(a.deleteVersion=!0),e.tag&&(a.tag=!0),e.move&&(a.move=!0),e.execute&&(a.execute=!0),e.setImmutabilityPolicy&&(a.setImmutabilityPolicy=!0),e.permanentDelete&&(a.permanentDelete=!0),e.filterByTags&&(a.filterByTags=!0),a}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.list&&e.push("l"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),this.filterByTags&&e.push("f"),e.join("")}},Hh=class{static{o(this,"UserDelegationKeyCredential")}constructor(e,a){this.accountName=e,this.userDelegationKey=a,this.key=Buffer.from(a.value,"base64")}computeHMACSHA256(e){return $7.createHmac("sha256",this.key).update(e,"utf8").digest("base64")}};function ji(t){return t.end?`${t.start}-${t.end}`:t.start}o(ji,"ipRangeToString");Z.SASProtocol=void 0;(function(t){t.Https="https",t.HttpsAndHttp="https,http"})(Z.SASProtocol||(Z.SASProtocol={}));var mi=class{static{o(this,"SASQueryParameters")}constructor(e,a,i,r,n,s,p,l,d,c,u,m,f,h,x
Line truncated
|
||||
`),n=e.computeHMACSHA256(r);return new mi(t.version,n,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}o(sz,"generateBlobSASQueryParameters20150405");function oz(t,e){if(t=bs(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=qi.parse(t.permissions.toString()).toString():r=zi.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",xs(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?ji(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new mi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}o(oz,"generateBlobSASQueryParameters20181109");function pz(t,e){if(t=bs(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=qi.parse(t.permissions.toString()).toString():r=zi.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",xs(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?ji(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new mi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope)}o(pz,"generateBlobSASQueryParameters20201206");function lz(t,e){if(t=bs(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=qi.parse(t.permissions.toString()).toString():r=zi.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",xs(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ce(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ce(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?ji(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new mi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey)}o(lz,"generateBlobSASQueryParametersUDK20181109");function dz(t,e){if(t=bs(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=qi.parse(t.permissions.toString()).toString():r=zi.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",xs(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ce(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ce(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?ji(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new mi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId)}o(dz,"generateBlobSASQueryParametersUDK20200210");function cz(t,e){if(t=bs(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=qi.parse(t.permissions.toString()).toString():r=zi.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",xs(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ce(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ce(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?ji(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new mi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope)}o(cz,"generateBlobSASQueryParametersUDK20201206");function xs(t,e,a){let i=[`/blob/${t}/${e}`];return a&&i.push(`/${a}`),i.join("")}o(xs,"getCanonicalName");function bs(t){let e=t.version?t.version:O0;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}o(bs,"SASSignatureValuesSanityCheckAndAutofill");var sp=class{static{o(this,"BlobLeaseClient")}constructor(e,a){let i=new rp(e.url,e.pipeline.toServiceClientOptions());this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=new en(i)):(this._isContainer=!1,this._containerOrBlobOperation=new Zo(i)),a||(a=q.generateUuid()),this._leaseId=a}get leaseId(){return this._leaseId}get url(){return this._url}async acquireLease(e,a={}){var i,r,n,s,p,l;let{span:d,updatedOptions:c}=j("BlobLeaseClient-acquireLease",a);if(this._isContainer&&(!((i=a.conditions)===null||i===void 0)&&i.ifMatch&&((r=a.conditions)===null||r===void 0?void 0:r.ifMatch)!==ui||!((n=a.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=a.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==ui||!((p=a.conditions)===null||p===void 0)&&p.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{return await this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:a.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(l=a.conditions)===null||l===void 0?void 0:l.tagConditions}),proposedLeaseId:this._leaseId},X(c)))}catch(u){throw d.setStatus({code:z.SpanStatusCode.ERROR,message:u.message}),u}finally{d.end()}}async changeLease(e,a={}){var i,r,n,s,p,l;let{span:d,updatedOptions:c}=j("BlobLeaseClient-changeLease",a);if(this._isContainer&&(!((i=a.conditions)===null||i===void 0)&&i.ifMatch&&((r=a.conditions)===null||r===void 0?void 0:r.ifMatch)!==ui||!((n=a.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=a.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==ui||!((p=a.conditions)===null||p===void 0)&&p.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{let u=await this._containerOrBlobOperation.changeLease(this._leaseId,e,Object.assign({abortSignal:a.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(l=a.conditions)===null||l===void 0?void 0:l.tagConditions})},X(c)));return this._leaseId=e,u}catch(u){throw d.setStatus({code:z.SpanStatusCode.ERROR,message:u.message}),u}finally{d.end()}}async releaseLease(e={}){var a,i,r,n,s,p;let{span:l,updatedOptions:d}=j("BlobLeaseClient-releaseLease",e);if(this._isContainer&&(!((a=e.conditions)===null||a===void 0)&&a.ifMatch&&((i=e.conditions)===null||i===void 0?void 0:i.ifMatch)!==ui||!((r=e.conditions)===null||r===void 0)&&r.ifNoneMatch&&((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==ui||!((s=e.conditions)===null||s===void 0)&&s.tagCon
Line truncated
|
||||
`):s=[e.accountName,i,r,n,t.startsOn?Ce(t.startsOn,!1):"",Ce(t.expiresOn,!1),t.ipRange?ji(t.ipRange):"",t.protocol?t.protocol:"",a,""].join(`
|
||||
`);let p=e.computeHMACSHA256(s);return new mi(a,p,i.toString(),r,n,t.protocol,t.startsOn,t.expiresOn,t.ipRange,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.encryptionScope)}o(gw,"generateAccountSASQueryParameters");var d0=class t extends np{static{o(this,"BlobServiceClient")}constructor(e,a,i){let r;Nr(a)?r=a:q.isNode&&a instanceof Ye||a instanceof Pe||q.isTokenCredential(a)?r=De(a,i):r=De(new Pe,i),super(e,r),this.serviceContext=new cc(this.storageClientContext)}static fromConnectionString(e,a){a=a||{};let i=vs(e);if(i.kind==="AccountConnString")if(q.isNode){let r=new Ye(i.accountName,i.accountKey);a.proxyOptions||(a.proxyOptions=q.getDefaultProxySettings(i.proxyUri));let n=De(r,a);return new t(i.url,n)}else throw new Error("Account connection string is only supported in Node.js environment");else if(i.kind==="SASConnString"){let r=De(new Pe,a);return new t(i.url+"?"+i.accountSas,r)}else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}getContainerClient(e){return new bc(Ue(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-createContainer",a);try{let n=this.getContainerClient(e),s=await n.create(r);return{containerClient:n,containerCreateResponse:s}}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async deleteContainer(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-deleteContainer",a);try{return await this.getContainerClient(e).delete(r)}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async undeleteContainer(e,a,i={}){let{span:r,updatedOptions:n}=j("BlobServiceClient-undeleteContainer",i);try{let s=this.getContainerClient(i.destinationContainerName||e),l=await new en(s.storageClientContext).restore(Object.assign({deletedContainerName:e,deletedContainerVersion:a},n));return{containerClient:s,containerUndeleteResponse:l}}catch(s){throw r.setStatus({code:z.SpanStatusCode.ERROR,message:s.message}),s}finally{r.end()}}async renameContainer(e,a,i={}){var r;let{span:n,updatedOptions:s}=j("BlobServiceClient-renameContainer",i);try{let p=this.getContainerClient(a),d=await new en(p.storageClientContext).rename(e,Object.assign(Object.assign({},s),{sourceLeaseId:(r=i.sourceCondition)===null||r===void 0?void 0:r.leaseId}));return{containerClient:p,containerRenameResponse:d}}catch(p){throw n.setStatus({code:z.SpanStatusCode.ERROR,message:p.message}),p}finally{n.end()}}async getProperties(e={}){let{span:a,updatedOptions:i}=j("BlobServiceClient-getProperties",e);try{return await this.serviceContext.getProperties(Object.assign({abortSignal:e.abortSignal},X(i)))}catch(r){throw a.setStatus({code:z.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async setProperties(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-setProperties",a);try{return await this.serviceContext.setProperties(e,Object.assign({abortSignal:a.abortSignal},X(r)))}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async getStatistics(e={}){let{span:a,updatedOptions:i}=j("BlobServiceClient-getStatistics",e);try{return await this.serviceContext.getStatistics(Object.assign({abortSignal:e.abortSignal},X(i)))}catch(r){throw a.setStatus({code:z.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async getAccountInfo(e={}){let{span:a,updatedOptions:i}=j("BlobServiceClient-getAccountInfo",e);try{return await this.serviceContext.getAccountInfo(Object.assign({abortSignal:e.abortSignal},X(i)))}catch(r){throw a.setStatus({code:z.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async listContainersSegment(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-listContainersSegment",a);try{return await this.serviceContext.listContainersSegment(Object.assign(Object.assign(Object.assign({abortSignal:a.abortSignal,marker:e},a),{include:typeof a.include=="string"?[a.include]:a.include}),X(r)))}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async findBlobsByTagsSegment(e,a,i={}){let{span:r,updatedOptions:n}=j("BlobServiceClient-findBlobsByTagsSegment",i);try{let s=await this.serviceContext.filterBlobs(Object.assign({abortSignal:i.abortSignal,where:e,marker:a,maxPageSize:i.maxPageSize},X(n)));return Object.assign(Object.assign({},s),{_response:s._response,blobs:s.blobs.map(l=>{var d;let c="";return((d=l.tags)===null||d===void 0?void 0:d.blobTagSet.length)===1&&(c=l.tags.blobTagSet[0].value),Object.assign(Object.assign({},l),{tags:Qo(l.tags),tagValue:c})})})}catch(s){throw r.setStatus({code:z.SpanStatusCode.ERROR,message:s.message}),s}finally{r.end()}}findBlobsByTagsSegments(e,a,i={}){return H.__asyncGenerator(this,arguments,o(function*(){let n;if(a||a===void 0)do n=yield H.__await(this.findBlobsByTagsSegment(e,a,i)),n.blobs=n.blobs||[],a=n.continuationToken,yield yield H.__await(n);wh
Line truncated
|
||||
If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(a),this.code=e,this.name="NetworkError"}};aa.NetworkError=Rc;Rc.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Pc=class extends Error{static{o(this,"UsageError")}constructor(){let e=`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`;super(e),this.name="UsageError"}};aa.UsageError=Pc;Pc.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1});var yw=E(ia=>{"use strict";var Sz=ia&&ia.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),Cz=ia&&ia.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ez=ia&&ia.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&Sz(e,t,a);return Cz(e,t),e},Tz=ia&&ia.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(ia,"__esModule",{value:!0});ia.uploadCacheArchiveSDK=ia.UploadProgress=void 0;var k0=Ez(rt()),Oz=B0(),Rz=j0(),Ic=class{static{o(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,a=(100*(e/this.contentLength)).toFixed(1),i=Date.now()-this.startTime,r=(e/(1024*1024)/(i/1e3)).toFixed(1);k0.info(`Sent ${e} of ${this.contentLength} (${a}%), ${r} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let a=o(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(a,e))},"displayCallback");this.timeoutHandle=setTimeout(a,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};ia.UploadProgress=Ic;function Pz(t,e,a){var i;return Tz(this,void 0,void 0,function*(){let r=new Oz.BlobClient(t),n=r.getBlockBlobClient(),s=new Ic((i=a?.archiveSizeBytes)!==null&&i!==void 0?i:0),p={blockSize:a?.uploadChunkSize,concurrency:a?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:s.onProgress()};try{s.startDisplayTimer(),k0.debug(`BlobClient: ${r.name}:${r.accountName}:${r.containerName}`);let l=yield n.uploadFile(e,p);if(l._response.status>=400)throw new Rz.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw k0.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{s.stopDisplayTimer()}})}o(Pz,"uploadCacheArchiveSDK");ia.uploadCacheArchiveSDK=Pz});var U0=E(Je=>{"use strict";var Iz=Je&&Je.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),Dz=Je&&Je.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Az=Je&&Je.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&Iz(e,t,a);return Dz(e,t),e},Ac=Je&&Je.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(Je,"__esModule",{value:!0});Je.retryHttpClientResponse=Je.retryTypedResponse=Je.retry=Je.isRetryableStatusCode=Je.isServerErrorStatusCode=Je.isSuccessStatusCode=void 0;var vw=Az(rt()),Dc=Ir(),ws=Rn();function Bz(t){return t?t>=200&&t<300:!1}o(Bz,"isSuccessStatusCode");Je.isSuccessStatusCode=Bz;function xw(t){return t?t>=500:!0}o(xw,"isServerErrorStatusCode");Je.isServerErrorStatusCode=xw;function bw(t){return t?[Dc.HttpCodes.BadGateway,Dc.HttpCodes.ServiceUnavailable,Dc.HttpCodes.GatewayTimeout].includes(t):!1}o(bw,"isRetryableStatusCode");Je.isRetryableStatusCode=bw;function Mz(t){return Ac(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(Mz,"sleep");function H0(t,e,a,i=ws.DefaultRetryAttempts,r=ws.DefaultRetryDelay,n=
Line truncated
|
||||
Other caches with similar key:`);for(let p of n?.artifactCaches||[])fa.debug(`Cache Key: ${p?.cacheKey}, Cache Version: ${p?.cacheVersion}, Cache Scope: ${p?.scope}, Cache Created: ${p?.creationTime}`)}}})}o(yj,"printCachesListForDiagnostics");function vj(t,e,a){return ra(this,void 0,void 0,function*(){let i=new dj.URL(t),r=(0,W0.getDownloadOptions)(a);i.hostname.endsWith(".blob.core.windows.net")?r.useAzureSdk?yield(0,Lc.downloadCacheStorageSDK)(t,e,r):r.concurrentBlobDownloads?yield(0,Lc.downloadCacheHttpClientConcurrent)(t,e,r):yield(0,Lc.downloadCacheHttpClient)(t,e):yield(0,Lc.downloadCacheHttpClient)(t,e)})}o(vj,"downloadCache");Tt.downloadCache=vj;function xj(t,e,a){return ra(this,void 0,void 0,function*(){let i=X0(),r=_s.getCacheVersion(e,a?.compressionMethod,a?.enableCrossOsArchive),n={key:t,version:r,cacheSize:a?.cacheSize};return yield(0,Sr.retryTypedResponse)("reserveCache",()=>ra(this,void 0,void 0,function*(){return i.postJson(xp("caches"),n)}))})}o(xj,"reserveCache");Tt.reserveCache=xj;function Pw(t,e){return`bytes ${t}-${e}/*`}o(Pw,"getContentRange");function bj(t,e,a,i,r){return ra(this,void 0,void 0,function*(){fa.debug(`Uploading chunk of size ${r-i+1} bytes at offset ${i} with content range: ${Pw(i,r)}`);let n={"Content-Type":"application/octet-stream","Content-Range":Pw(i,r)},s=yield(0,Sr.retryHttpClientResponse)(`uploadChunk (start: ${i}, end: ${r})`,()=>ra(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,a(),n)}));if(!(0,Sr.isSuccessStatusCode)(s.message.statusCode))throw new Error(`Cache service responded with ${s.message.statusCode} during upload chunk.`)})}o(bj,"uploadChunk");function wj(t,e,a,i){return ra(this,void 0,void 0,function*(){let r=_s.getArchiveFileSizeInBytes(a),n=xp(`caches/${e.toString()}`),s=$0.openSync(a,"r"),p=(0,W0.getUploadOptions)(i),l=_s.assertDefined("uploadConcurrency",p.uploadConcurrency),d=_s.assertDefined("uploadChunkSize",p.uploadChunkSize),c=[...new Array(l).keys()];fa.debug("Awaiting all uploads");let u=0;try{yield Promise.all(c.map(()=>ra(this,void 0,void 0,function*(){for(;u<r;){let m=Math.min(r-u,d),f=u,h=u+m-1;u+=d,yield bj(t,n,()=>$0.createReadStream(a,{fd:s,start:f,end:h,autoClose:!1}).on("error",x=>{throw new Error(`Cache upload failed because file read failed with ${x.message}`)}),f,h)}})))}finally{$0.closeSync(s)}})}o(wj,"uploadFile");function Nj(t,e,a){return ra(this,void 0,void 0,function*(){let i={size:a};return yield(0,Sr.retryTypedResponse)("commitCache",()=>ra(this,void 0,void 0,function*(){return t.postJson(xp(`caches/${e.toString()}`),i)}))})}o(Nj,"commitCache");function _j(t,e,a,i){return ra(this,void 0,void 0,function*(){if((0,W0.getUploadOptions)(i).useAzureSdk){if(!a)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield(0,cj.uploadCacheArchiveSDK)(a,e,i)}else{let n=X0();fa.debug("Upload cache"),yield wj(n,t,e,i),fa.debug("Commiting cache");let s=_s.getArchiveFileSizeInBytes(e);fa.info(`Cache Size: ~${Math.round(s/(1024*1024))} MB (${s} B)`);let p=yield Nj(n,t,s);if(!(0,Sr.isSuccessStatusCode)(p.statusCode))throw new Error(`Cache service responded with ${p.statusCode} during commit cache.`);fa.info("Cache saved successfully")}})}o(_j,"saveCache");Tt.saveCache=_j});var qc=E(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});Ss.isJsonObject=Ss.typeofJsonValue=void 0;function Sj(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}o(Sj,"typeofJsonValue");Ss.typeofJsonValue=Sj;function Cj(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}o(Cj,"isJsonObject");Ss.isJsonObject=Cj});var jc=E(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.base64encode=Cs.base64decode=void 0;var Fi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),zc=[];for(let t=0;t<Fi.length;t++)zc[Fi[t].charCodeAt(0)]=t;zc["-".charCodeAt(0)]=Fi.indexOf("+");zc["_".charCodeAt(0)]=Fi.indexOf("/");function Ej(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let a=new Uint8Array(e),i=0,r=0,n,s=0;for(let p=0;p<t.length;p++){if(n=zc[t.charCodeAt(p)],n===void 0)switch(t[p]){case"=":r=0;case`
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(r){case 0:s=n,r=1;break;case 1:a[i++]=s<<2|(n&48)>>4,s=n,r=2;break;case 2:a[i++]=(s&15)<<4|(n&60)>>2,s=n,r=3;break;case 3:a[i++]=(s&3)<<6|n,r=0;break}}if(r==1)throw Error("invalid base64 string.");return a.subarray(0,i)}o(Ej,"base64decode");Cs.base64decode=Ej;function Tj(t){let e="",a=0,i,r=0;for(let n=0;n<t.length;n++)switch(i=t[n],a){case 0:e+=Fi[i>>2],r=(i&3)<<4,a=1;break;case 1:e+=Fi[r|i>>4],r=(i&15)<<2,a=2;break;case 2:e+=Fi[r|i>>6],e+=Fi[i&63],a=0;break}return a&&(e+=Fi[r],e+="=",a==1&&(e+="=")),e}o(Tj,"base64encode");Cs.base64encode=Tj});var Dw=E(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.utf8read=void 0;var K0=o(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function Oj(t){if(t.length<1)return"";let e=0,a=[],i=[],r=0,n,s=t.length;for(;e<s;)n=t[e++],n<128?i[r++]=n:n>191&&n<224?i[r++]=(n&31)<<6|t[e++]&63:n>239&&n<365?(n=((n&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,i[r++]=55296+(n>>10),i[r++]=56320+(n&1023)):i[r++]=(n&15)<<12|(t[e++]&63)<<6|t[e++]&63,r>8191&&(a.push(K0(i)),r=0);return a.length?(r&&a.push(K0(i.slice(0,r))),a.join("")):K0(i.slice(0,r))}o(Oj,"utf8read");kc.utf8read=Oj});var bp=E(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.WireType=hi.mergeBinaryOptions=hi.UnknownFieldHandler=void 0;var Rj;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(a,i,r,n,s)=>{(e(i)?i[t.symbol]:i[t.symbol]=[]).push({no:r,wireType:n,data:s})},t.onWrite=(a,i,r)=>{for(let{no:n,wireType:s,data:p}of t.list(i))r.tag(n,s).raw(p)},t.list=(a,i)=>{if(e(a)){let r=a[t.symbol];return i?r.filter(n=>n.no==i):r}return[]},t.last=(a,i)=>t.list(a,i).slice(-1)[0];let e=o(a=>a&&Array.isArray(a[t.symbol]),"is")})(Rj=hi.UnknownFieldHandler||(hi.UnknownFieldHandler={}));function Pj(t,e){return Object.assign(Object.assign({},t),e)}o(Pj,"mergeBinaryOptions");hi.mergeBinaryOptions=Pj;var Ij;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(Ij=hi.WireType||(hi.WireType={}))});var Uc=E(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.varint32read=na.varint32write=na.int64toString=na.int64fromString=na.varint64write=na.varint64read=void 0;function Dj(){let t=0,e=0;for(let i=0;i<28;i+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<i,!(r&128))return this.assertBounds(),[t,e]}let a=this.buf[this.pos++];if(t|=(a&15)<<28,e=(a&112)>>4,!(a&128))return this.assertBounds(),[t,e];for(let i=3;i<=31;i+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<i,!(r&128))return this.assertBounds(),[t,e]}throw new Error("invalid varint")}o(Dj,"varint64read");na.varint64read=Dj;function Aj(t,e,a){for(let n=0;n<28;n=n+7){let s=t>>>n,p=!(!(s>>>7)&&e==0),l=(p?s|128:s)&255;if(a.push(l),!p)return}let i=t>>>28&15|(e&7)<<4,r=!!(e>>3);if(a.push((r?i|128:i)&255),!!r){for(let n=3;n<31;n=n+7){let s=e>>>n,p=!!(s>>>7),l=(p?s|128:s)&255;if(a.push(l),!p)return}a.push(e>>>31&1)}}o(Aj,"varint64write");na.varint64write=Aj;var Hc=65536*65536;function Bj(t){let e=t[0]=="-";e&&(t=t.slice(1));let a=1e6,i=0,r=0;function n(s,p){let l=Number(t.slice(s,p));r*=a,i=i*a+l,i>=Hc&&(r=r+(i/Hc|0),i=i%Hc)}return o(n,"add1e6digit"),n(-24,-18),n(-18,-12),n(-12,-6),n(-6),[e,i,r]}o(Bj,"int64fromString");na.int64fromString=Bj;function Mj(t,e){if(e>>>0<=2097151)return""+(Hc*e+(t>>>0));let a=t&16777215,i=(t>>>24|e<<8)>>>0&16777215,r=e>>16&65535,n=a+i*6777216+r*6710656,s=i+r*8147497,p=r*2,l=1e7;n>=l&&(s+=Math.floor(n/l),n%=l),s>=l&&(p+=Math.floor(s/l),s%=l);function d(c,u){let m=c?String(c):"";return u?"0000000".slice(m.length)+m:m}return o(d,"decimalFrom1e7"),d(p,0)+d(s,p)+d(n,1)}o(Mj,"int64toString");na.int64toString=Mj;function Lj(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let a=0;a<9;a++)e.push(t&127|128),t=t>>7;e.push(1)}}o(Lj,"varint32write");na.varint32write=Lj;function qj(){let t=this.buf[this.pos++],e=t&127;if(!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,!(t&128))return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let a=5;t&128&&a<10;a++)t=this.buf[this.pos++];if(t&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}o(qj,"varint32read");na.varint32read=qj});var Er=E(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.PbLong=Cr.PbULong=Cr.detectBi=void 0;var wp=Uc(),Ae;function Aw(){let t=new DataView(new ArrayBuffer(8));Ae=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:
Line truncated
|
||||
`)}};hu.RpcError=N2});var S2=E(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.mergeRpcOptions=void 0;var dN=pt();function nH(t,e){if(!e)return t;let a={};gu(t,a),gu(e,a);for(let i of Object.keys(e)){let r=e[i];switch(i){case"jsonOptions":a.jsonOptions=dN.mergeJsonOptions(t.jsonOptions,a.jsonOptions);break;case"binaryOptions":a.binaryOptions=dN.mergeBinaryOptions(t.binaryOptions,a.binaryOptions);break;case"meta":a.meta={},gu(t.meta,a.meta),gu(e.meta,a.meta);break;case"interceptors":a.interceptors=t.interceptors?t.interceptors.concat(r):r.concat();break}}return a}o(nH,"mergeRpcOptions");yu.mergeRpcOptions=nH;function gu(t,e){if(!t)return;let a=e;for(let[i,r]of Object.entries(t))r instanceof Date?a[i]=new Date(r.getTime()):Array.isArray(r)?a[i]=r.concat():a[i]=r}o(gu,"copy")});var E2=E(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.Deferred=dn.DeferredState=void 0;var vi;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(vi=dn.DeferredState||(dn.DeferredState={}));var C2=class{static{o(this,"Deferred")}constructor(e=!0){this._state=vi.PENDING,this._promise=new Promise((a,i)=>{this._resolve=a,this._reject=i}),e&&this._promise.catch(a=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==vi.PENDING)throw new Error(`cannot resolve ${vi[this.state].toLowerCase()}`);this._resolve(e),this._state=vi.RESOLVED}reject(e){if(this.state!==vi.PENDING)throw new Error(`cannot reject ${vi[this.state].toLowerCase()}`);this._reject(e),this._state=vi.REJECTED}resolvePending(e){this._state===vi.PENDING&&this.resolve(e)}rejectPending(e){this._state===vi.PENDING&&this.reject(e)}};dn.Deferred=C2});var O2=E(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.RpcOutputStreamController=void 0;var cN=E2(),cn=pt(),T2=class{static{o(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,a){return a.push(e),()=>{let i=a.indexOf(e);i>=0&&a.splice(i,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,a,i){cn.assert((e?1:0)+(a?1:0)+(i?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),a&&this.notifyError(a),i&&this.notifyComplete()}notifyMessage(e){cn.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(a=>a(e)),this._lis.nxt.forEach(a=>a(e,void 0,!1))}notifyError(e){cn.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(a=>a(e)),this._lis.nxt.forEach(a=>a(void 0,e,!1)),this.clearLis()}notifyComplete(){cn.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._itState||(this._itState={q:[]}),this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{let e=this._itState;cn.assert(e,"bad state"),cn.assert(!e.p,"iterator contract broken");let a=e.q.shift();return a?"value"in a?Promise.resolve(a):Promise.reject(a):(e.p=new cN.Deferred,e.p.promise)}}}pushIt(e){let a=this._itState;if(a)if(a.p){let i=a.p;cn.assert(i.state==cN.DeferredState.PENDING,"iterator contract broken"),"value"in e?i.resolve(e):i.reject(e),delete a.p}else a.q.push(e)}};vu.RpcOutputStreamController=T2});var P2=E(Ds=>{"use strict";var sH=Ds&&Ds.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(Ds,"__esModule",{value:!0});Ds.UnaryCall=void 0;var R2=class{static{o(this,"UnaryCall")}constructor(e,a,i,r,n,s,p){this.method=e,this.requestHeaders=a,this.request=i,this.headers=r,this.response=n,this.status=s,this.trailers=p}then(e,a){return this.promiseFinished().then(i=>e?Promise.resolve(e(i)):i,i=>a?Promise.resolve(a(i)):Promise.reject(i))}promiseFinished(){return sH(this,void 0,void 0,function*(){let[e,a,i,r]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:a,status:i,trailers:r}})}};Ds.UnaryCall=R2});var D2=E(As=>{"use strict";var oH=As&&As.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function
Line truncated
|
||||
`));let i=yield e6(a,"create");yield t6(i,t)})}o(tU,"createTar");jt.createTar=tU});var AN=E(lt=>{"use strict";var aU=lt&<.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),iU=lt&<.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Mp=lt&<.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&aU(e,t,a);return iU(e,t),e},Xs=lt&<.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(lt,"__esModule",{value:!0});lt.saveCache=lt.restoreCache=lt.isFeatureAvailable=lt.ReserveCacheError=lt.ValidationError=void 0;var re=Mp(rt()),Eu=Mp(require("path")),ke=Mp(In()),Ws=Mp(Iw()),IN=Mp(TN()),Tu=Bc(),Rr=PN(),rU=Rn(),Ma=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};lt.ValidationError=Ma;var un=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};lt.ReserveCacheError=un;function DN(t){if(!t||t.length===0)throw new Ma("Path Validation Error: At least one directory or file path is required")}o(DN,"checkPaths");function a6(t){if(t.length>512)throw new Ma(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Ma(`Key Validation Error: ${t} cannot contain commas.`)}o(a6,"checkKey");function nU(){return!!process.env.ACTIONS_CACHE_URL}o(nU,"isFeatureAvailable");lt.isFeatureAvailable=nU;function sU(t,e,a,i,r=!1){return Xs(this,void 0,void 0,function*(){let n=(0,Tu.getCacheServiceVersion)();switch(re.debug(`Cache service version: ${n}`),DN(t),n){case"v2":return yield pU(t,e,a,i,r);case"v1":default:return yield oU(t,e,a,i,r)}})}o(sU,"restoreCache");lt.restoreCache=sU;function oU(t,e,a,i,r=!1){return Xs(this,void 0,void 0,function*(){a=a||[];let n=[e,...a];if(re.debug("Resolved Keys:"),re.debug(JSON.stringify(n)),n.length>10)throw new Ma("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of n)a6(l);let s=yield ke.getCompressionMethod(),p="";try{let l=yield Ws.getCacheEntry(n,t,{compressionMethod:s,enableCrossOsArchive:r});if(!l?.archiveLocation)return;if(i?.lookupOnly)return re.info("Lookup only - skipping download"),l.cacheKey;p=Eu.join(yield ke.createTempDirectory(),ke.getCacheFileName(s)),re.debug(`Archive Path: ${p}`),yield Ws.downloadCache(l.archiveLocation,p,i),re.isDebug()&&(yield(0,Rr.listTar)(p,s));let d=ke.getArchiveFileSizeInBytes(p);return re.info(`Cache Size: ~${Math.round(d/(1024*1024))} MB (${d} B)`),yield(0,Rr.extractTar)(p,s),re.info("Cache restored successfully"),l.cacheKey}catch(l){if(l.name===Ma.name)throw l;re.warning(`Failed to restore: ${l.message}`)}finally{try{yield ke.unlinkFile(p)}catch(l){re.debug(`Failed to delete archive: ${l}`)}}})}o(oU,"restoreCacheV1");function pU(t,e,a,i,r=!1){return Xs(this,void 0,void 0,function*(){i=Object.assign(Object.assign({},i),{useAzureSdk:!0}),a=a||[];let n=[e,...a];if(re.debug("Resolved Keys:"),re.debug(JSON.stringify(n)),n.length>10)throw new Ma("Key Validation Error: Keys are limited to a maximum of 10.");for(let p of n)a6(p);let s="";try{let p=IN.internalCacheTwirpClient(),l=yield ke.getCompressionMethod(),d={key:e,restoreKeys:a,version:ke.getCacheVersion(t,l,r)},c=yield p.GetCacheEntryDownloadURL(d);if(!c.ok){re.debug(`Cache not found for version ${d.version} of keys: ${n.join(", ")}`);return}if(re.info(`Cache hit for: ${d.key}`),i?.lookupOnly)return re.info("Lookup only - skipping download"),c.matchedKey;s=Eu.join(yield ke.createTempDirectory(),ke.getCacheFileName(l)),re.debug(`Archive path: ${s}`),re.debug(`Starting download of archive to: ${s}`),yield Ws.downloadCache(c.signedDownloadUrl,s,i);let u=ke.getArchiveFileSizeInBytes(s);return re.info(`Cache Size: ~${Math.round(u/(1024*1024))} MB (${u} B)`),re.isDebug()&&(yield(0,Rr.listTar)(s,l)),yield(0,Rr.extractTar)(s,l),re.info("Cache restored successfully"),c.matchedKey}catch(p){if(p.name===Ma.name)throw p;re.warning(`Failed to restore: ${p.message}`)}finally{try{s&&(yield ke.unlinkFile(s))}catch(p){re.debug(`Failed to delete archive: ${p}`)}}})}o(pU,"restoreCacheV2");function lU(t,e,a,i=!1){return Xs(this,void 0,void 0,function*(){let r=(0,Tu.getCacheServiceVersion)();switch(re.debug(`Cache servLine truncated
|
||||
`);for(let r of i){let n=r.split("=");if(n.length===2&&(n[0].trim()==="VERSION_ID"||n[0].trim()==="DISTRIB_RELEASE")){e=n[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return e}o(vU,"_getOsVersion");kt._getOsVersion=vU;function xU(){let t="/etc/lsb-release",e="/etc/os-release",a="";return Ou.existsSync(t)?a=Ou.readFileSync(t).toString():Ou.existsSync(e)&&(a=Ou.readFileSync(e).toString()),a}o(xU,"_readLinuxVersionFile");kt._readLinuxVersionFile=xU});var zN=E((rY,qN)=>{var bU=require("crypto");qN.exports=o(function(){return bU.randomBytes(16)},"nodeRNG")});var HN=E((sY,kN)=>{var jN=[];for(Lp=0;Lp<256;++Lp)jN[Lp]=(Lp+256).toString(16).substr(1);var Lp;function wU(t,e){var a=e||0,i=jN;return[i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]]].join("")}o(wU,"bytesToUuid");kN.exports=wU});var FN=E((pY,UN)=>{var NU=zN(),_U=HN();function SU(t,e,a){var i=e&&a||0;typeof t=="string"&&(e=t==="binary"?new Array(16):null,t=null),t=t||{};var r=t.random||(t.rng||NU)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e)for(var n=0;n<16;++n)e[i+n]=r[n];return e||_U(r)}o(SU,"v4");UN.exports=SU});var GN=E(La=>{"use strict";var CU=La&&La.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),EU=La&&La.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),TU=La&&La.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&CU(e,t,a);return EU(e,t),e},VN=La&&La.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(La,"__esModule",{value:!0});La.RetryHelper=void 0;var $N=TU(rt()),n6=class{static{o(this,"RetryHelper")}constructor(e,a,i){if(e<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(a),this.maxSeconds=Math.floor(i),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(e,a){return VN(this,void 0,void 0,function*(){let i=1;for(;i<this.maxAttempts;){try{return yield e()}catch(n){if(a&&!a(n))throw n;$N.info(n.message)}let r=this.getSleepAmount();$N.info(`Waiting ${r} seconds before trying again`),yield this.sleep(r),i++}return yield e()})}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return VN(this,void 0,void 0,function*(){return new Promise(a=>setTimeout(a,e*1e3))})}};La.RetryHelper=n6});var e_=E(oe=>{"use strict";var OU=oe&&oe.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),RU=oe&&oe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xi=oe&&oe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&OU(e,t,a);return RU(e,t),e},Vt=oe&&oe.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})},PU=oe&&oe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oe,"__esModule",{value:!0});oe.evaluateVersions=oe.isExplicitVersion=oe.findFromManifest=oe.getManifestFromRepo=oe.findAllVersions=oe.find=oe.cacheFile=oe.cacheDir=oe.extractZip=oe.extractXar=oe.extractTar=oe.extract7z=oe.downloadTool=oe.HTTPError=void 0;var be=xi(rt()),ga=xi(io()),qa=xi(require("fs")),IU=xi(LN()),zp=xi(require("os")),Ja=xi(require("path")),WN=xi(Ir()),Gi=xi(fl()),DU=xi(require("stream")),AU=xi(require("util")),Ks=require("assert"),XN=PU(FN()),Pr=_n(),BU=GN(),qp=class extends Error{static{o(this,"HTTPError")}constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}};oe.HTTPError=qp;var o6=process.platform==="win32",MU=process.platform==="darwin",LU="actions/tool-cache";function qU(t,e,a,i){return Vt(this,void 0,void 0,function*(){e=e||Ja.join(ZN(),XN.default()),yield ga.mkdirP(Ja.dirname(e)),be.debug(`Downloading ${tLine truncated
|
||||
`,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(t){return t>=CHAR_0&&t<=CHAR_9}o(isDigit,"isDigit");function isHexit(t){return t>=CHAR_A&&t<=CHAR_F||t>=CHAR_a&&t<=CHAR_f||t>=CHAR_0&&t<=CHAR_9}o(isHexit,"isHexit");function isBit(t){return t===CHAR_1||t===CHAR_0}o(isBit,"isBit");function isOctit(t){return t>=CHAR_0&&t<=CHAR_7}o(isOctit,"isOctit");function isAlphaNumQuoteHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_APOS||t===CHAR_QUOT||t===CHAR_LOWBAR||t===CHAR_HYPHEN}o(isAlphaNumQuoteHyphen,"isAlphaNumQuoteHyphen");function isAlphaNumHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_LOWBAR||t===CHAR_HYPHEN}o(isAlphaNumHyphen,"isAlphaNumHyphen");var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(t,e){return hasOwnProperty.call(t,e)?!0:(e==="__proto__"&&defineProperty(t,"__proto__",descriptor),!1)}o(hasKey,"hasKey");var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}o(InlineTable,"InlineTable");function isInlineTable(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_TABLE}o(isInlineTable,"isInlineTable");var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}o(Table,"Table");function isTable(t){return t===null||typeof t!="object"?!1:t[_type]===TABLE}o(isTable,"isTable");var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(t){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:t}})}o(InlineList,"InlineList");function isInlineList(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_LIST}o(isInlineList,"isInlineList");var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}o(List,"List");function isList(t){return t===null||typeof t!="object"?!1:t[_type]===LIST}o(isList,"isList");var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(t){}var _inspect=_custom||"inspect",BoxedBigInt=class{static{o(this,"BoxedBigInt")}constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(t){let e=Number(t);return Object.is(e,-0)&&(e=0),global.BigInt&&!Number.isSafeInteger(e)?new BoxedBigInt(t):Object.defineProperties(new Number(e),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${t}]`}})}o(Integer,"Integer");function isInteger(t){return t===null||typeof t!="object"?!1:t[_type]===INTEGER}o(isInteger,"isInteger");var FLOAT=Symbol("float");function Float(t){return Object.defineProperties(new Number(t),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${t}]`}})}o(Float,"Float");function isFloat(t){return t===null||typeof t!="object"?!1:t[_type]===FLOAT}o(isFloat,"isFloat");function tomlType(t){let e=typeof t;if(e==="object"){if(t===null)return"null";if(t instanceof Date)return"datetime";if(_type in t)switch(t[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return e}o(tomlType,"tomlType");function makeParserClass(t){class e extends t{static{o(this,"TOMLParser")}constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===t.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===t.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===t.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(i){let r=this.ctx,n=i.key.pop();for(let s of i.key){if(hasKey(r,s)&&(!isTable(r[s])||r[s][_declared]))throw this.error(new TomlError("Can'
Line truncated
|
||||
`,e&&e.split){let i=e.split(/\n/),r=String(Math.min(i.length,t.line+3)).length,n=" ";for(;n.length<r;)n+=" ";for(let s=Math.max(0,t.line-1);s<Math.min(i.length,t.line+2);++s){let p=String(s+1);if(p.length<r&&(p=" "+p),t.line===s){a+=p+"> "+i[s]+`
|
||||
`,a+=n+" ";for(let l=0;l<t.col;++l)a+=" ";a+=`^
|
||||
`}else a+=p+": "+i[s]+`
|
||||
`}}return t.message=a+`
|
||||
`,t}o(JU,"prettyError")});var h_=E((TY,f_)=>{"use strict";f_.exports=tF;var ZU=Bu(),eF=Mu();function tF(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new ZU;try{return e.parse(t),e.finish()}catch(a){throw eF(a,t)}}o(tF,"parseString")});var v_=E((RY,y_)=>{"use strict";y_.exports=iF;var aF=Bu(),g_=Mu();function iF(t,e){e||(e={});let a=0,i=e.blocksize||40960,r=new aF;return new Promise((s,p)=>{setImmediate(n,a,i,s,p)});function n(s,p,l,d){if(s>=t.length)try{return l(r.finish())}catch(c){return d(g_(c,t))}try{r.parse(t.slice(s,s+p)),setImmediate(n,s+p,p,l,d)}catch(c){d(g_(c,t))}}}o(iF,"parseAsync")});var w_=E((IY,b_)=>{"use strict";b_.exports=nF;var rF=require("stream"),x_=Bu();function nF(t){return t?sF(t):oF(t)}o(nF,"parseStream");function sF(t){let e=new x_;return t.setEncoding("utf8"),new Promise((a,i)=>{let r,n=!1,s=!1;function p(){if(n=!0,!r)try{a(e.finish())}catch(c){i(c)}}o(p,"finish");function l(c){s=!0,i(c)}o(l,"error"),t.once("end",p),t.once("error",l),d();function d(){r=!0;let c;for(;(c=t.read())!==null;)try{e.parse(c)}catch(u){return l(u)}if(r=!1,n)return p();s||t.once("readable",d)}o(d,"readNext")})}o(sF,"parseReadable");function oF(){let t=new x_;return new rF.Transform({objectMode:!0,transform(e,a,i){try{t.parse(e.toString(a))}catch(r){this.emit("error",r)}i()},flush(e){try{this.push(t.finish())}catch(a){this.emit("error",a)}e()}})}o(oF,"parseTransform")});var N_=E((AY,kp)=>{"use strict";kp.exports=h_();kp.exports.async=v_();kp.exports.stream=w_();kp.exports.prettyError=Mu()});var P_=E((BY,f6)=>{"use strict";f6.exports=pF;f6.exports.value=m6;function pF(t){if(t===null)throw fn("null");if(t===void 0)throw fn("undefined");if(typeof t!="object")throw fn(typeof t);if(typeof t.toJSON=="function"&&(t=t.toJSON()),t==null)return null;let e=oa(t);if(e!=="table")throw fn(e);return u6("","",t)}o(pF,"stringify");function fn(t){return new Error("Can only stringify objects, not "+t)}o(fn,"typeError");function lF(){return new Error("Array values can't have mixed types")}o(lF,"arrayOneTypeError");function __(t){return Object.keys(t).filter(e=>S_(t[e]))}o(__,"getInlineKeys");function dF(t){return Object.keys(t).filter(e=>!S_(t[e]))}o(dF,"getComplexKeys");function Lu(t){let e=Array.isArray(t)?[]:Object.prototype.hasOwnProperty.call(t,"__proto__")?{["__proto__"]:void 0}:{};for(let a of Object.keys(t))t[a]&&typeof t[a].toJSON=="function"&&!("toISOString"in t[a])?e[a]=t[a].toJSON():e[a]=t[a];return e}o(Lu,"toJSON");function u6(t,e,a){a=Lu(a);var i,r;i=__(a),r=dF(a);var n=[],s=e||"";i.forEach(l=>{var d=oa(a[l]);d!=="undefined"&&d!=="null"&&n.push(s+qu(l)+" = "+T_(a[l],!0))}),n.length>0&&n.push("");var p=t&&i.length>0?e+" ":"";return r.forEach(l=>{n.push(wF(t,p,l,a[l]))}),n.join(`
|
||||
`)}o(u6,"stringifyObject");function S_(t){switch(oa(t)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return t.length===0||oa(t[0])!=="table";case"table":return Object.keys(t).length===0;default:return!1}}o(S_,"isInline");function oa(t){return t===void 0?"undefined":t===null?"null":typeof t=="bigint"||Number.isInteger(t)&&!Object.is(t,-0)?"integer":typeof t=="number"?"float":typeof t=="boolean"?"boolean":typeof t=="string"?"string":"toISOString"in t?isNaN(t)?"undefined":"datetime":Array.isArray(t)?"array":"table"}o(oa,"tomlType");function qu(t){var e=String(t);return/^[-A-Za-z0-9_]+$/.test(e)?e:C_(e)}o(qu,"stringifyKey");function C_(t){return'"'+E_(t).replace(/"/g,'\\"')+'"'}o(C_,"stringifyBasicString");function cF(t){return"'"+t+"'"}o(cF,"stringifyLiteralString");function uF(t,e){for(;e.length<t;)e="0"+e;return e}o(uF,"numpad");function E_(t){return t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,e=>"\\u"+uF(4,e.codePointAt(0).toString(16)))}o(E_,"escapeString");function mF(t){let e=t.split(/\n/).map(a=>E_(a).replace(/"(?="")/g,'\\"')).join(`
|
||||
`);return e.slice(-1)==='"'&&(e+=`\\
|
||||
`),`"""
|
||||
`+e+'"""'}o(mF,"stringifyMultilineString");function T_(t,e){let a=oa(t);return a==="string"&&(e&&/\n/.test(t)?a="string-multiline":!/[\b\t\n\f\r']/.test(t)&&/"/.test(t)&&(a="string-literal")),m6(t,a)}o(T_,"stringifyAnyInline");function m6(t,e){switch(e||(e=oa(t)),e){case"string-multiline":return mF(t);case"string":return C_(t);case"string-literal":return cF(t);case"integer":return O_(t);case"float":return fF(t);case"boolean":return hF(t);case"datetime":return gF(t);case"array":return xF(t.filter(a=>oa(a)!=="null"&&oa(a)!=="undefined"&&oa(a)!=="nan"));case"table":return bF(t);default:throw fn(e)}}o(m6,"stringifyInline");function O_(t){return String(t).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}o(O_,"stringifyInteger");function fF(t){if(t===1/0)return"inf";if(t===-1/0)return"-inf";if(Object.is(t,NaN))return"nan";if(Object.is(t,-0))return"-0.0";var e=String(t).split("."),a=e[0],i=e[1]||0;return O_(a)+"."+i}o(fF,"stringifyFloat");function hF(t){return String(t)}o(hF,"stringifyBoolean");function gF(t){return t.toISOString()}o(gF,"stringifyDatetime");function yF(t){return t==="float"||t==="integer"}o(yF,"isNumber");function vF(t){var e=oa(t[0]);return t.every(a=>oa(a)===e)?e:t.every(a=>yF(oa(a)))?"float":"mixed"}o(vF,"arrayType");function R_(t){let e=vF(t);if(e==="mixed")throw lF();return e}o(R_,"validateArray");function xF(t){t=Lu(t);let e=R_(t);var a="[",i=t.map(r=>m6(r,e));return i.join(", ").length>60||/\n/.test(i)?a+=`
|
||||
`+i.join(`,
|
||||
`)+`
|
||||
`:a+=" "+i.join(", ")+(i.length>0?" ":""),a+"]"}o(xF,"stringifyInlineArray");function bF(t){t=Lu(t);var e=[];return Object.keys(t).forEach(a=>{e.push(qu(a)+" = "+T_(t[a],!1))}),"{ "+e.join(", ")+(e.length>0?" ":"")+"}"}o(bF,"stringifyInlineTable");function wF(t,e,a,i){var r=oa(i);if(r==="array")return NF(t,e,a,i);if(r==="table")return _F(t,e,a,i);throw fn(r)}o(wF,"stringifyComplex");function NF(t,e,a,i){i=Lu(i),R_(i);var r=oa(i[0]);if(r!=="table")throw fn(r);var n=t+qu(a),s="";return i.forEach(p=>{s.length>0&&(s+=`
|
||||
`),s+=e+"[["+n+`]]
|
||||
`,s+=u6(n+".",e,p)}),s}o(NF,"stringifyArrayOfTables");function _F(t,e,a,i){var r=t+qu(a),n="";return __(i).length>0&&(n+=e+"["+r+`]
|
||||
`),n+u6(r+".",e,i)}o(_F,"stringifyComplexTable")});var I_=E(h6=>{"use strict";h6.parse=N_();h6.stringify=P_()});var V_=require("node:os"),Lt=ya(rt());var L_=require("node:crypto"),q_=require("node:os"),eo=require("node:path"),bi=require("node:fs"),hn=ya(rt()),ku=ya(AN()),Hp=ya(e_()),v6=ya(_n());var Ys=require("node:fs"),g6=ya(rt()),zu=ya(I_());function D_(t,e){if(!e.length)return;let a=0;if(e.forEach(n=>{try{new URL(n.url)}catch{throw new Error(`Invalid registry URL: ${n.url}`)}n.scope||a++}),a>1)throw new Error("You can't have more than one global registry.");(0,g6.info)(`Writing bunfig.toml to '${t}'.`);let i={};if((0,Ys.existsSync)(t))try{let n=(0,Ys.readFileSync)(t,{encoding:"utf-8"});i=(0,zu.parse)(n)}catch(n){(0,g6.info)(`Error reading existing bunfig: ${n.message}`),i={}}i.install=i?.install||{},i.install.scopes=i?.install.scopes||{};let r=e.find(n=>!n.scope);r&&(i.install.registry={url:r.url,...r.token?{token:r.token}:{}});for(let n of e)if(n.scope){let s=n.scope.startsWith("@")?n.scope.toLowerCase():`@${n.scope.toLowerCase()}`;i.install.scopes[s]={url:n.url,...n.token?{token:n.token}:{}}}Object.keys(i.install.scopes).length===0&&delete i.install.scopes,(0,Ys.writeFileSync)(t,(0,zu.stringify)(i),{encoding:"utf8"})}o(D_,"writeBunfig");var z_=ya(rt());var Js=ya(rt()),A_=require("node:console"),Zs=require("node:fs"),ju=require("node:path");function y6(t,e,a=1e4){return t().catch(i=>{if(e<=0)throw i;return new Promise(r=>setTimeout(r,a)).then(()=>y6(t,e-1,a))})}o(y6,"retry");function B_(t,e){return t.endsWith(e)?t:((0,Zs.renameSync)(t,t+e),t+e)}o(B_,"addExtension");var SF={"package.json":t=>JSON.parse(t).packageManager?.split("bun@")?.[1],".tool-versions":t=>t.match(/^bun\s*(?<version>.*?)$/m)?.groups?.version,".bumrc":t=>t,".bun-version":t=>t};function M_(t){let e=process.env.GITHUB_WORKSPACE;if(!e||!t)return;(0,Js.debug)(`Reading version from ${t}`);let a=(0,ju.resolve)(e,t),i=(0,ju.basename)(t);if(!(0,Zs.existsSync)(a)){(0,Js.warning)(`File ${a} not found`);return}let r=SF[i]??(()=>{}),n;try{if(n=r((0,Zs.readFileSync)(a,"utf8"))?.trim(),!n){(0,Js.warning)(`Failed to read version from ${t}`);return}}catch(s){let{message:p}=s;(0,Js.warning)(`Failed to read ${t}: ${p}`)}finally{if(n)return(0,A_.info)(`Obtained version ${n} from ${t}`),n}}o(M_,"readVersionFromFile");var j_=require("node:process");var k_=o(async t=>{let e=(0,eo.join)((0,j_.cwd)(),"bunfig.toml");D_(e,t.registries);let a=TF(t),i=EF(t),r=(0,eo.join)((0,q_.homedir)(),".bun","bin");try{(0,bi.mkdirSync)(r,{recursive:!0})}catch(u){if(u.code!=="EEXIST")throw u}(0,hn.addPath)(r);let n=o(u=>process.platform==="win32"?`${u}.exe`:u,"exe"),s=(0,eo.join)(r,n("bun"));try{(0,bi.symlinkSync)(s,(0,eo.join)(r,n("bunx")))}catch(u){if(u.code!=="EEXIST")throw u}let p,l=!1;if(i){let u=(0,L_.createHash)("sha1").update(a).digest("base64");await(0,ku.restoreCache)([s],u)&&(p=await H_(s),p?(l=!0,(0,hn.info)(`Using a cached version of Bun: ${p}`)):(0,hn.warning)(`Found a cached version of Bun: ${p} (but it appears to be corrupted?)`))}if(l||((0,hn.info)(`Downloading a new version of Bun: ${a}`),p=await y6(async()=>await CF(a,s),3)),!p)throw new Error("Downloaded a new version of Bun, but failed to check its version? Try again.");let[d]=p.split("+");return(0,z_.saveState)("cache",JSON.stringify({cacheEnabled:i,cacheHit:l,bunPath:s,url:a})),{version:d,revision:p,bunPath:s,url:a,cacheHit:l}},"default");async function CF(t,e){let a=B_(await(0,Hp.downloadTool)(t),".zip"),i=await(0,Hp.extractZip)(a),r=await x6(i);try{(0,bi.renameSync)(r,e)}catch{(0,bi.copyFileSync)(r,e)}return await H_(e)}o(CF,"downloadBun");function EF(t){let{customUrl:e,version:a,noCache:i}=t;return i||e||!a||/latest|canary|action/i.test(a)?!1:(0,ku.isFeatureAvailable)()}o(EF,"isCacheEnabled");function TF(t){let{customUrl:e}=t;if(e)return e;let{version:a,os:i,arch:r,avx2:n,profile:s}=t,p=encodeURIComponent(a??"latest"),l=encodeURIComponent(i??process.platform),d=encodeURIComponent(r??process.arch),c=encodeURIComponent(n??!0),u=encodeURIComponent(s??!1),{href:m}=new URL(`${p}/${l}/${d}?avx2=${c}&profile=${u}`,"https://bun.sh/download/");return m}o(TF,"getDownloadUrl");async function x6(t){for(let e of(0,bi.readdirSync)(t,{withFileTypes:!0})){let{name:a}=e,i=(0,eo.join)(t,a);if(e.isFile()){if(a==="bun"||a==="bun.exe")return i;if(/^bun.*\.zip/.test(a)){let r=await(0,Hp.extractZip)(i);return x6(r)}}if(/^bun/.test(a)&&e.isDirectory())return x6(i)}throw new Error("Could not find executable: bun")}o(x6,"extractBun");async function H_(t){let e=await(0,v6.getExecOutput)(t,["--revision"],{ignoreReturnCode:!0});if(e.exitCode===0&&/^\d+\.\d+\.\d+/.test(e.stdout))return e.stdout.trim();let a=await(0,v6.getExecOutput)(t,["--version"],{ignoreReturnCode:!0});if(a.exitCode===0&&/^\d+\.\d+\.\d+/.test(a.stdout))return a.stdout.trim()}o(H_,"getRevision");function U_(t){return t?.trim()?t.split(`
|
||||
`).map(e=>e.trim()).filter(Boolean).map(OF).filter(Boolean):[]}o(U_,"parseRegistries");function OF(t){let e=t.match(/^(@[a-z0-9-_.]+|[a-z0-9-_.]+(?=:[a-z]+:\/\/)):(.+)$/i);if(e){let a=e[1],i=e[2].trim(),[r,n]=i.split("|",2).map(s=>s?.trim());try{return new URL(r),{url:r,scope:a,...n&&{token:n}}}catch{throw new Error(`Invalid URL in registry configuration: ${r}`)}}else{let[a,i]=t.split("|",2).map(r=>r?.trim());try{return new URL(a),{url:a,scope:"",...i&&{token:i}}}catch{throw new Error(`Invalid URL in registry configuration: ${a}`)}}}o(OF,"parseLine");process.env.RUNNER_TEMP||(process.env.RUNNER_TEMP=(0,V_.tmpdir)());var $_=U_((0,Lt.getInput)("registries")),F_=(0,Lt.getInput)("registry-url"),RF=(0,Lt.getInput)("scope");F_&&$_.push({url:F_,scope:RF,token:"$BUN_AUTH_TOKEN"});k_({version:(0,Lt.getInput)("bun-version")||M_((0,Lt.getInput)("bun-version-file"))||void 0,customUrl:(0,Lt.getInput)("bun-download-url")||void 0,registries:$_,noCache:(0,Lt.getBooleanInput)("no-cache")||!1}).then(({version:t,revision:e,bunPath:a,url:i,cacheHit:r})=>{(0,Lt.setOutput)("bun-version",t),(0,Lt.setOutput)("bun-revision",e),(0,Lt.setOutput)("bun-path",a),(0,Lt.setOutput)("bun-download-url",i),(0,Lt.setOutput)("cache-hit",r),process.exit(0)}).catch(t=>{(0,Lt.setFailed)(t),process.exit(1)});
|
||||
/*! Bundled license information:
|
||||
|
||||
sax/lib/sax.js:
|
||||
|
||||
Generated
+51
-1
@@ -14,9 +14,11 @@
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/glob": "^0.4.0",
|
||||
"@actions/io": "^1.1.2",
|
||||
"@actions/tool-cache": "^2.0.1"
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
"@iarna/toml": "^2.2.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "^1.1.13",
|
||||
"@types/node": "^20.8.2",
|
||||
"esbuild": "^0.19.2",
|
||||
"prettier": "^3.4.2",
|
||||
@@ -271,6 +273,12 @@
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@iarna/toml": {
|
||||
"version": "2.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
|
||||
"integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/@opentelemetry/api": {
|
||||
"version": "1.5.0",
|
||||
"license": "Apache-2.0",
|
||||
@@ -348,6 +356,16 @@
|
||||
"@protobuf-ts/runtime": "^2.9.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/bun": {
|
||||
"version": "1.2.18",
|
||||
"resolved": "https://registry.npmjs.org/@types/bun/-/bun-1.2.18.tgz",
|
||||
"integrity": "sha512-Xf6RaWVheyemaThV0kUfaAUvCNokFr+bH8Jxp+tTZfx7dAPA8z9ePnP9S9+Vspzuxxx9JRAXhnyccRj3GyCMdQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bun-types": "1.2.18"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.1.tgz",
|
||||
@@ -376,6 +394,17 @@
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/react": {
|
||||
"version": "19.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.8.tgz",
|
||||
"integrity": "sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"csstype": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/tunnel": {
|
||||
"version": "0.0.3",
|
||||
"license": "MIT",
|
||||
@@ -409,6 +438,19 @@
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/bun-types": {
|
||||
"version": "1.2.18",
|
||||
"resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.2.18.tgz",
|
||||
"integrity": "sha512-04+Eha5NP7Z0A9YgDAzMk5PHR16ZuLVa83b26kH5+cp1qZW4F6FmAURngE7INf4tKOvCE69vYvDEwoNl1tGiWw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^19"
|
||||
}
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"license": "MIT",
|
||||
@@ -423,6 +465,14 @@
|
||||
"version": "0.0.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/csstype": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
|
||||
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
|
||||
+3
-1
@@ -27,9 +27,11 @@
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/glob": "^0.4.0",
|
||||
"@actions/io": "^1.1.2",
|
||||
"@actions/tool-cache": "^2.0.1"
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
"@iarna/toml": "^2.2.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "^1.1.13",
|
||||
"@types/node": "^20.8.2",
|
||||
"esbuild": "^0.19.2",
|
||||
"prettier": "^3.4.2",
|
||||
|
||||
+5
-5
@@ -12,9 +12,10 @@ import { addPath, info, warning } from "@actions/core";
|
||||
import { isFeatureAvailable, restoreCache } from "@actions/cache";
|
||||
import { downloadTool, extractZip } from "@actions/tool-cache";
|
||||
import { getExecOutput } from "@actions/exec";
|
||||
import { writeBunfig } from "./bunfig";
|
||||
import { writeBunfig, Registry } from "./bunfig";
|
||||
import { saveState } from "@actions/core";
|
||||
import { addExtension, retry } from "./utils";
|
||||
import { cwd } from "node:process";
|
||||
|
||||
export type Input = {
|
||||
customUrl?: string;
|
||||
@@ -23,8 +24,7 @@ export type Input = {
|
||||
arch?: string;
|
||||
avx2?: boolean;
|
||||
profile?: boolean;
|
||||
scope?: string;
|
||||
registryUrl?: string;
|
||||
registries?: Registry[];
|
||||
noCache?: boolean;
|
||||
};
|
||||
|
||||
@@ -44,8 +44,8 @@ export type CacheState = {
|
||||
};
|
||||
|
||||
export default async (options: Input): Promise<Output> => {
|
||||
const bunfigPath = join(process.cwd(), "bunfig.toml");
|
||||
writeBunfig(bunfigPath, options);
|
||||
const bunfigPath = join(cwd(), "bunfig.toml");
|
||||
writeBunfig(bunfigPath, options.registries);
|
||||
|
||||
const url = getDownloadUrl(options);
|
||||
const cacheEnabled = isCacheEnabled(options);
|
||||
|
||||
+72
-41
@@ -1,50 +1,81 @@
|
||||
import { EOL } from "node:os";
|
||||
import { appendFileSync } from "node:fs";
|
||||
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
||||
import { info } from "@actions/core";
|
||||
import { parse, stringify } from "@iarna/toml";
|
||||
import { Registry } from "./registry";
|
||||
|
||||
type BunfigOptions = {
|
||||
registryUrl?: string;
|
||||
scope?: string;
|
||||
type BunfigConfig = {
|
||||
install?: {
|
||||
registry?: {
|
||||
url: string;
|
||||
token?: string;
|
||||
};
|
||||
scopes?: Record<string, { url: string; token?: string }>;
|
||||
};
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
export function createBunfig(options: BunfigOptions): string | null {
|
||||
const { registryUrl, scope } = options;
|
||||
|
||||
let url: URL | undefined;
|
||||
if (registryUrl) {
|
||||
try {
|
||||
url = new URL(registryUrl);
|
||||
} catch {
|
||||
throw new Error(`Invalid registry-url: ${registryUrl}`);
|
||||
}
|
||||
}
|
||||
|
||||
let owner: string | undefined;
|
||||
if (scope) {
|
||||
owner = scope.startsWith("@")
|
||||
? scope.toLocaleLowerCase()
|
||||
: `@${scope.toLocaleLowerCase()}`;
|
||||
}
|
||||
|
||||
if (url && owner) {
|
||||
return `[install.scopes]${EOL}'${owner}' = { token = "$BUN_AUTH_TOKEN", url = "${url}"}${EOL}`;
|
||||
}
|
||||
|
||||
if (url && !owner) {
|
||||
return `[install]${EOL}registry = "${url}"${EOL}`;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export function writeBunfig(path: string, options: BunfigOptions): void {
|
||||
const bunfig = createBunfig(options);
|
||||
if (!bunfig) {
|
||||
export function writeBunfig(path: string, registries: Registry[]): void {
|
||||
if (!registries.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
info(`Writing bunfig.toml to '${path}'.`);
|
||||
appendFileSync(path, bunfig, {
|
||||
encoding: "utf8",
|
||||
let globalRegistryCount = 0;
|
||||
registries.forEach((registry) => {
|
||||
try {
|
||||
new URL(registry.url);
|
||||
} catch {
|
||||
throw new Error(`Invalid registry URL: ${registry.url}`);
|
||||
}
|
||||
|
||||
if (!registry.scope) {
|
||||
globalRegistryCount++;
|
||||
}
|
||||
});
|
||||
|
||||
if (globalRegistryCount > 1) {
|
||||
throw new Error("You can't have more than one global registry.");
|
||||
}
|
||||
|
||||
info(`Writing bunfig.toml to '${path}'.`);
|
||||
|
||||
let config: BunfigConfig = {};
|
||||
if (existsSync(path)) {
|
||||
try {
|
||||
const content = readFileSync(path, { encoding: "utf-8" });
|
||||
config = parse(content) as BunfigConfig;
|
||||
} catch (error) {
|
||||
info(`Error reading existing bunfig: ${error.message}`);
|
||||
config = {};
|
||||
}
|
||||
}
|
||||
|
||||
config.install = config?.install || {};
|
||||
config.install.scopes = config?.install.scopes || {};
|
||||
|
||||
const globalRegistry = registries.find((r) => !r.scope);
|
||||
if (globalRegistry) {
|
||||
config.install.registry = {
|
||||
url: globalRegistry.url,
|
||||
...(globalRegistry.token ? { token: globalRegistry.token } : {}),
|
||||
};
|
||||
}
|
||||
|
||||
for (const registry of registries) {
|
||||
if (registry.scope) {
|
||||
const scopeName = registry.scope.startsWith("@")
|
||||
? registry.scope.toLowerCase()
|
||||
: `@${registry.scope.toLowerCase()}`;
|
||||
|
||||
config.install.scopes[scopeName] = {
|
||||
url: registry.url,
|
||||
...(registry.token ? { token: registry.token } : {}),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.keys(config.install.scopes).length === 0) {
|
||||
delete config.install.scopes;
|
||||
}
|
||||
|
||||
writeFileSync(path, stringify(config), { encoding: "utf8" });
|
||||
}
|
||||
+16
-2
@@ -2,19 +2,33 @@ import { tmpdir } from "node:os";
|
||||
import { getInput, setOutput, setFailed, getBooleanInput } from "@actions/core";
|
||||
import runAction from "./action.js";
|
||||
import { readVersionFromFile } from "./utils.js";
|
||||
import { parseRegistries } from "./registry.js";
|
||||
|
||||
if (!process.env.RUNNER_TEMP) {
|
||||
process.env.RUNNER_TEMP = tmpdir();
|
||||
}
|
||||
|
||||
const registries = parseRegistries(getInput("registries"));
|
||||
|
||||
// Backwards compatibility for the `registry-url` and `scope` inputs
|
||||
const registryUrl = getInput("registry-url");
|
||||
const scope = getInput("scope");
|
||||
|
||||
if (registryUrl) {
|
||||
registries.push({
|
||||
url: registryUrl,
|
||||
scope: scope,
|
||||
token: "$BUN_AUTH_TOKEN",
|
||||
});
|
||||
}
|
||||
|
||||
runAction({
|
||||
version:
|
||||
getInput("bun-version") ||
|
||||
readVersionFromFile(getInput("bun-version-file")) ||
|
||||
undefined,
|
||||
customUrl: getInput("bun-download-url") || undefined,
|
||||
registryUrl: getInput("registry-url") || undefined,
|
||||
scope: getInput("scope") || undefined,
|
||||
registries: registries,
|
||||
noCache: getBooleanInput("no-cache") || false,
|
||||
})
|
||||
.then(({ version, revision, bunPath, url, cacheHit }) => {
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
export type Registry = {
|
||||
url: string;
|
||||
scope: string;
|
||||
token?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse registries from the simplified format:
|
||||
* - Default registry: https://registry.npmjs.org/
|
||||
* - Default registry with token: https://registry.npmjs.org/|token123
|
||||
* - With scope and credentials in URL: @myorg:https://username:password@registry.myorg.com/
|
||||
* - With scope and separate token: @partner:https://registry.partner.com/|basic_token
|
||||
*/
|
||||
export function parseRegistries(input: string): Registry[] {
|
||||
if (!input?.trim()) return [];
|
||||
|
||||
return input
|
||||
.split("\n")
|
||||
.map((line) => line.trim())
|
||||
.filter(Boolean)
|
||||
.map(parseLine)
|
||||
.filter(Boolean) as Registry[];
|
||||
}
|
||||
|
||||
function parseLine(line: string): Registry | null {
|
||||
const scopeMatch = line.match(
|
||||
/^(@[a-z0-9-_.]+|[a-z0-9-_.]+(?=:[a-z]+:\/\/)):(.+)$/i,
|
||||
);
|
||||
|
||||
if (scopeMatch) {
|
||||
const scope = scopeMatch[1];
|
||||
const urlPart = scopeMatch[2].trim();
|
||||
|
||||
const [url, token] = urlPart.split("|", 2).map((p) => p?.trim());
|
||||
|
||||
try {
|
||||
new URL(url);
|
||||
|
||||
return {
|
||||
url,
|
||||
scope,
|
||||
...(token && { token }),
|
||||
};
|
||||
} catch (e) {
|
||||
throw new Error(`Invalid URL in registry configuration: ${url}`);
|
||||
}
|
||||
} else {
|
||||
const [url, token] = line.split("|", 2).map((p) => p?.trim());
|
||||
|
||||
try {
|
||||
new URL(url);
|
||||
|
||||
return {
|
||||
url,
|
||||
scope: "",
|
||||
...(token && { token }),
|
||||
};
|
||||
} catch (e) {
|
||||
throw new Error(`Invalid URL in registry configuration: ${url}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,291 @@
|
||||
import { afterEach, describe, expect, it } from "bun:test";
|
||||
import { existsSync, unlinkSync } from "node:fs";
|
||||
import { writeBunfig } from "../src/bunfig";
|
||||
import { EOL } from "os";
|
||||
|
||||
describe("writeBunfig", () => {
|
||||
const filePath = "bunfig_test.toml";
|
||||
|
||||
async function getFileAndContents() {
|
||||
const file = Bun.file(filePath);
|
||||
const contents = (await file.text()).split(EOL);
|
||||
|
||||
return { file, contents };
|
||||
}
|
||||
|
||||
afterEach(() => {
|
||||
if (existsSync(filePath)) unlinkSync(filePath);
|
||||
console.log(`${filePath} was deleted`);
|
||||
});
|
||||
|
||||
describe("when no bunfig_test.toml file exists", () => {
|
||||
it("should create a new file with scopes content", async () => {
|
||||
writeBunfig(filePath, [
|
||||
{
|
||||
url: "https://npm.pkg.github.com",
|
||||
scope: "foo-bar",
|
||||
token: "$BUN_AUTH_TOKEN",
|
||||
},
|
||||
]);
|
||||
|
||||
const { file, contents } = await getFileAndContents();
|
||||
|
||||
expect(file.exists()).resolves.toBeTrue();
|
||||
|
||||
const expectedContents = [
|
||||
'[install.scopes."@foo-bar"]',
|
||||
'url = "https://npm.pkg.github.com"',
|
||||
'token = "$BUN_AUTH_TOKEN"',
|
||||
"",
|
||||
];
|
||||
|
||||
contents.forEach((content, index) =>
|
||||
expect(content).toBe(expectedContents[index])
|
||||
);
|
||||
|
||||
expect(contents.length).toBe(expectedContents.length);
|
||||
});
|
||||
|
||||
it("should create a new file with global registry", async () => {
|
||||
writeBunfig(filePath, [
|
||||
{
|
||||
url: "https://npm.pkg.github.com",
|
||||
scope: "",
|
||||
},
|
||||
]);
|
||||
|
||||
const { file, contents } = await getFileAndContents();
|
||||
|
||||
expect(file.exists()).resolves.toBeTrue();
|
||||
|
||||
const expectedContents = [
|
||||
"[install.registry]",
|
||||
'url = "https://npm.pkg.github.com"',
|
||||
"",
|
||||
];
|
||||
|
||||
contents.forEach((content, index) =>
|
||||
expect(content).toBe(expectedContents[index])
|
||||
);
|
||||
|
||||
expect(contents.length).toBe(expectedContents.length);
|
||||
});
|
||||
|
||||
it("should create a new file with global registry & token", async () => {
|
||||
writeBunfig(filePath, [
|
||||
{
|
||||
url: "https://npm.pkg.github.com",
|
||||
scope: "",
|
||||
token: "$BUN_AUTH_TOKEN",
|
||||
},
|
||||
]);
|
||||
|
||||
const { file, contents } = await getFileAndContents();
|
||||
|
||||
expect(file.exists()).resolves.toBeTrue();
|
||||
|
||||
const expectedContents = [
|
||||
"[install.registry]",
|
||||
'url = "https://npm.pkg.github.com"',
|
||||
'token = "$BUN_AUTH_TOKEN"',
|
||||
"",
|
||||
];
|
||||
|
||||
contents.forEach((content, index) =>
|
||||
expect(content).toBe(expectedContents[index])
|
||||
);
|
||||
|
||||
expect(contents.length).toBe(expectedContents.length);
|
||||
});
|
||||
});
|
||||
|
||||
describe("when local bunfig_test.toml file exists", () => {
|
||||
it("and no [install.scopes] exists, should concatenate file correctly", async () => {
|
||||
const bunfig = `[install]${EOL}optional = true${EOL}${EOL}[install.cache]${EOL}disable = true`;
|
||||
|
||||
await Bun.write(filePath, bunfig);
|
||||
|
||||
writeBunfig(filePath, [
|
||||
{
|
||||
url: "https://npm.pkg.github.com",
|
||||
scope: "foo-bar",
|
||||
token: "$BUN_AUTH_TOKEN",
|
||||
},
|
||||
]);
|
||||
|
||||
const { file, contents } = await getFileAndContents();
|
||||
|
||||
expect(file.exists()).resolves.toBeTrue();
|
||||
|
||||
const expectedContents = [
|
||||
"[install]",
|
||||
"optional = true",
|
||||
"",
|
||||
" [install.cache]",
|
||||
" disable = true",
|
||||
"",
|
||||
'[install.scopes."@foo-bar"]',
|
||||
'url = "https://npm.pkg.github.com"',
|
||||
'token = "$BUN_AUTH_TOKEN"',
|
||||
"",
|
||||
];
|
||||
|
||||
contents.forEach((content, index) =>
|
||||
expect(content).toBe(expectedContents[index])
|
||||
);
|
||||
|
||||
expect(contents.length).toBe(expectedContents.length);
|
||||
});
|
||||
|
||||
it("and [install.scopes] exists and it's not the same registry, should concatenate file correctly", async () => {
|
||||
const bunfig = `[install]${EOL}optional = true${EOL}${EOL}[install.scopes]${EOL}'@bla-ble' = { token = "$BUN_AUTH_TOKEN", url = "https://npm.pkg.github.com/" }${EOL}${EOL}[install.cache]${EOL}disable = true`;
|
||||
|
||||
await Bun.write(filePath, bunfig);
|
||||
|
||||
writeBunfig(filePath, [
|
||||
{
|
||||
url: "https://npm.pkg.github.com",
|
||||
scope: "foo-bar",
|
||||
token: "$BUN_AUTH_TOKEN",
|
||||
},
|
||||
]);
|
||||
|
||||
const { file, contents } = await getFileAndContents();
|
||||
|
||||
expect(file.exists()).resolves.toBeTrue();
|
||||
|
||||
const expectedContents = [
|
||||
"[install]",
|
||||
"optional = true",
|
||||
"",
|
||||
'[install.scopes."@bla-ble"]',
|
||||
'token = "$BUN_AUTH_TOKEN"',
|
||||
'url = "https://npm.pkg.github.com/"',
|
||||
"",
|
||||
'[install.scopes."@foo-bar"]',
|
||||
'url = "https://npm.pkg.github.com"',
|
||||
'token = "$BUN_AUTH_TOKEN"',
|
||||
"",
|
||||
" [install.cache]",
|
||||
" disable = true",
|
||||
"",
|
||||
];
|
||||
|
||||
contents.forEach((content, index) =>
|
||||
expect(content).toBe(expectedContents[index])
|
||||
);
|
||||
|
||||
expect(contents.length).toBe(expectedContents.length);
|
||||
});
|
||||
|
||||
it("and [install.scopes] exists and it's the same registry, should concatenate file correctly", async () => {
|
||||
const bunfig = `[install]${EOL}optional = true${EOL}${EOL}[install.scopes]${EOL}'@foo-bar' = { token = "$BUN_AUTH_TOKEN", url = "https://npm.pkg.github.com/" }${EOL}'@bla-ble' = { token = "$BUN_AUTH_TOKEN", url = "https://npm.pkg.github.com/" }${EOL}${EOL}[install.cache]${EOL}disable = true`;
|
||||
|
||||
await Bun.write(filePath, bunfig);
|
||||
|
||||
writeBunfig(filePath, [
|
||||
{
|
||||
url: "https://npm.pkg.github.com",
|
||||
scope: "foo-bar",
|
||||
token: "$BUN_AUTH_TOKEN",
|
||||
},
|
||||
]);
|
||||
|
||||
const { file, contents } = await getFileAndContents();
|
||||
|
||||
expect(file.exists()).resolves.toBeTrue();
|
||||
|
||||
const expectedContents = [
|
||||
"[install]",
|
||||
"optional = true",
|
||||
"",
|
||||
'[install.scopes."@foo-bar"]',
|
||||
'url = "https://npm.pkg.github.com"',
|
||||
'token = "$BUN_AUTH_TOKEN"',
|
||||
"",
|
||||
'[install.scopes."@bla-ble"]',
|
||||
'token = "$BUN_AUTH_TOKEN"',
|
||||
'url = "https://npm.pkg.github.com/"',
|
||||
"",
|
||||
" [install.cache]",
|
||||
" disable = true",
|
||||
"",
|
||||
];
|
||||
|
||||
contents.forEach((content, index) =>
|
||||
expect(content).toBe(expectedContents[index])
|
||||
);
|
||||
|
||||
expect(contents.length).toBe(expectedContents.length);
|
||||
});
|
||||
|
||||
it("and [install.scopes] and [install] exists, should concantenate file correctly", async () => {
|
||||
const bunfig = `[install]${EOL}optional = true${EOL}${EOL}[install.scopes]${EOL}'@foo-bar' = { token = "$BUN_AUTH_TOKEN", url = "https://npm.pkg.github.com/" }${EOL}'@bla-ble' = { token = "$BUN_AUTH_TOKEN", url = "https://npm.pkg.github.com/" }${EOL}${EOL}[install.cache]${EOL}disable = true`;
|
||||
|
||||
await Bun.write(filePath, bunfig);
|
||||
|
||||
writeBunfig(filePath, [
|
||||
{
|
||||
url: "https://npm.pkg.github.com",
|
||||
scope: "foo-bar",
|
||||
token: "$BUN_AUTH_TOKEN",
|
||||
},
|
||||
{
|
||||
url: "https://bun.sh",
|
||||
scope: "",
|
||||
token: "$BUN_AUTH_TOKEN",
|
||||
}, // global registry
|
||||
]);
|
||||
|
||||
const { file, contents } = await getFileAndContents();
|
||||
|
||||
expect(file.exists()).resolves.toBeTrue();
|
||||
|
||||
const expectedContents = [
|
||||
"[install]",
|
||||
"optional = true",
|
||||
"",
|
||||
'[install.scopes."@foo-bar"]',
|
||||
'url = "https://npm.pkg.github.com"',
|
||||
'token = "$BUN_AUTH_TOKEN"',
|
||||
"",
|
||||
'[install.scopes."@bla-ble"]',
|
||||
'token = "$BUN_AUTH_TOKEN"',
|
||||
'url = "https://npm.pkg.github.com/"',
|
||||
"",
|
||||
" [install.cache]",
|
||||
" disable = true",
|
||||
"",
|
||||
" [install.registry]",
|
||||
' url = "https://bun.sh"',
|
||||
' token = "$BUN_AUTH_TOKEN"',
|
||||
"",
|
||||
];
|
||||
|
||||
contents.forEach((content, index) =>
|
||||
expect(content).toBe(expectedContents[index])
|
||||
);
|
||||
|
||||
expect(contents.length).toBe(expectedContents.length);
|
||||
});
|
||||
});
|
||||
|
||||
describe("when multiple global registries are provided", () => {
|
||||
it("should throw an error", () => {
|
||||
expect(() => {
|
||||
writeBunfig(filePath, [
|
||||
{
|
||||
url: "https://npm.pkg.github.com",
|
||||
scope: "",
|
||||
token: "$BUN_AUTH_TOKEN",
|
||||
},
|
||||
{
|
||||
url: "https://bun.sh",
|
||||
scope: "",
|
||||
token: "$BUN_AUTH_TOKEN",
|
||||
},
|
||||
]);
|
||||
}).toThrow("You can't have more than one global registry.");
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,170 @@
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import { parseRegistries } from "../src/registry";
|
||||
|
||||
describe("registry", () => {
|
||||
describe("parseRegistries", () => {
|
||||
it("should return an empty array for empty input", () => {
|
||||
expect(parseRegistries("")).toEqual([]);
|
||||
expect(parseRegistries(" ")).toEqual([]);
|
||||
expect(parseRegistries(null as any)).toEqual([]);
|
||||
expect(parseRegistries(undefined as any)).toEqual([]);
|
||||
});
|
||||
|
||||
it("should parse default registry without token", () => {
|
||||
const input = "https://registry.npmjs.org/";
|
||||
const result = parseRegistries(input);
|
||||
|
||||
expect(result).toEqual([
|
||||
{
|
||||
url: "https://registry.npmjs.org/",
|
||||
scope: "",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("should parse default registry with token", () => {
|
||||
const input = "https://registry.npmjs.org/|npm_token123";
|
||||
const result = parseRegistries(input);
|
||||
|
||||
expect(result).toEqual([
|
||||
{
|
||||
url: "https://registry.npmjs.org/",
|
||||
scope: "",
|
||||
token: "npm_token123",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("should parse scoped registry with URL credentials", () => {
|
||||
const input = "@myorg:https://username:password@registry.myorg.com/";
|
||||
const result = parseRegistries(input);
|
||||
|
||||
expect(result).toEqual([
|
||||
{
|
||||
url: "https://username:password@registry.myorg.com/",
|
||||
scope: "@myorg",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("should parse scoped registry with separate token", () => {
|
||||
const input = "@partner:https://registry.partner.com/|token_abc123";
|
||||
const result = parseRegistries(input);
|
||||
|
||||
expect(result).toEqual([
|
||||
{
|
||||
url: "https://registry.partner.com/",
|
||||
scope: "@partner",
|
||||
token: "token_abc123",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("should parse multiple registries", () => {
|
||||
const input = `
|
||||
https://registry.npmjs.org/
|
||||
@myorg:https://username:password@registry.myorg.com/
|
||||
@partner:https://registry.partner.com/|token_abc123
|
||||
`;
|
||||
|
||||
const result = parseRegistries(input);
|
||||
|
||||
expect(result).toEqual([
|
||||
{
|
||||
url: "https://registry.npmjs.org/",
|
||||
scope: "",
|
||||
},
|
||||
{
|
||||
url: "https://username:password@registry.myorg.com/",
|
||||
scope: "@myorg",
|
||||
},
|
||||
{
|
||||
url: "https://registry.partner.com/",
|
||||
scope: "@partner",
|
||||
token: "token_abc123",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("should handle scope names without @ prefix", () => {
|
||||
const input = "myorg:https://registry.myorg.com/|token123";
|
||||
const result = parseRegistries(input);
|
||||
|
||||
expect(result).toEqual([
|
||||
{
|
||||
url: "https://registry.myorg.com/",
|
||||
scope: "myorg",
|
||||
token: "token123",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("should throw error for invalid URLs", () => {
|
||||
expect(() => {
|
||||
parseRegistries("@myorg:not-a-valid-url");
|
||||
}).toThrow("Invalid URL in registry configuration: not-a-valid-url");
|
||||
|
||||
expect(() => {
|
||||
parseRegistries("also-not-a-valid-url");
|
||||
}).toThrow("Invalid URL in registry configuration: also-not-a-valid-url");
|
||||
});
|
||||
|
||||
it("should handle whitespace and empty lines", () => {
|
||||
const input = `
|
||||
|
||||
https://registry.npmjs.org/
|
||||
|
||||
@myorg:https://registry.myorg.com/|token123
|
||||
|
||||
`;
|
||||
|
||||
const result = parseRegistries(input);
|
||||
|
||||
expect(result).toEqual([
|
||||
{
|
||||
url: "https://registry.npmjs.org/",
|
||||
scope: "",
|
||||
},
|
||||
{
|
||||
url: "https://registry.myorg.com/",
|
||||
scope: "@myorg",
|
||||
token: "token123",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("should handle URLs with paths and query parameters", () => {
|
||||
const input =
|
||||
"@myorg:https://registry.myorg.com/npm/registry/?timeout=5000|token123";
|
||||
const result = parseRegistries(input);
|
||||
|
||||
expect(result).toEqual([
|
||||
{
|
||||
url: "https://registry.myorg.com/npm/registry/?timeout=5000",
|
||||
scope: "@myorg",
|
||||
token: "token123",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("should correctly handle scopes with hyphens and underscores", () => {
|
||||
const input = `
|
||||
@my-org:https://registry.myorg.com/
|
||||
@my_org:https://registry.myorg.com/
|
||||
`;
|
||||
|
||||
const result = parseRegistries(input);
|
||||
|
||||
expect(result).toEqual([
|
||||
{
|
||||
url: "https://registry.myorg.com/",
|
||||
scope: "@my-org",
|
||||
},
|
||||
{
|
||||
url: "https://registry.myorg.com/",
|
||||
scope: "@my_org",
|
||||
},
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"types": [
|
||||
"bun"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user