Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c5077e514 | ||
|
|
1255e43b02 | ||
|
|
61861d1f6a | ||
|
|
6f5bd063f5 | ||
|
|
e3914758a4 | ||
|
|
ecf28ddc73 | ||
|
|
95edc153a3 | ||
|
|
4c32875876 | ||
|
|
0ff83bfc51 | ||
|
|
ab8cb4e8f8 | ||
|
|
196aaa2bd2 | ||
|
|
3d267786b1 | ||
|
|
db6bcf6eb8 | ||
|
|
4a638a4fad | ||
|
|
563911925f | ||
|
|
b02f8a8a6e | ||
|
|
8c296f9cb7 | ||
|
|
b7a1c7ccf2 | ||
|
|
ad1208bf19 | ||
|
|
bc6f04ce3b | ||
|
|
1dbab0699e | ||
|
|
635640504f | ||
|
|
22457c87c1 | ||
|
|
237a6a77d8 | ||
|
|
53e6487b6e | ||
|
|
68643ea879 | ||
|
|
56169ab7b0 | ||
|
|
34f777aec1 | ||
|
|
7c641390eb |
No files matched your search
@@ -1,28 +1,86 @@
|
||||
name: ⚖️ Compare Bun Version
|
||||
description: Compare the version of Bun to a specified version
|
||||
description: Compare the installed Bun version against a version specification.
|
||||
|
||||
inputs:
|
||||
bun-version:
|
||||
description: The version of Bun to compare against
|
||||
description: The version spec to compare against (e.g., '1.1.0', 'canary', '>1.2.0', '1.x').
|
||||
required: true
|
||||
default: "1.1.0"
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 🛠️ Get installed Bun version
|
||||
- name: 🛠️ Get installed Bun version and revision
|
||||
id: bun
|
||||
shell: bash
|
||||
run: |
|
||||
bun --version
|
||||
echo "version=$(bun --version)" >> $GITHUB_OUTPUT
|
||||
echo "version=$(bun --version | tr -d '\r\n')" >> $GITHUB_OUTPUT
|
||||
echo "revision=$(bun --revision 2>/dev/null || true)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: ⚖️ Compare versions
|
||||
shell: bash
|
||||
env:
|
||||
REQUESTED_SPEC: ${{ inputs.bun-version }}
|
||||
ACTUAL_VERSION: ${{ steps.bun.outputs.version }}
|
||||
ACTUAL_REVISION: ${{ steps.bun.outputs.revision }}
|
||||
run: |
|
||||
if [[ "${{ steps.bun.outputs.version }}" == "${{ inputs.bun-version }}" ]]; then
|
||||
echo "Version is ${{ inputs.bun-version }}"
|
||||
else
|
||||
echo "Expected version to be ${{ inputs.bun-version }}, got ${{ steps.bun.outputs.version }}"
|
||||
exit 1
|
||||
set -euo pipefail
|
||||
|
||||
# Function to compare two semantic versions (e.g., version_compare 1.2.3 1.10.0)
|
||||
# Returns: 0 if v1 == v2, 1 if v1 > v2, 2 if v1 < v2
|
||||
version_compare() {
|
||||
if [[ "$1" == "$2" ]]; then return 0; fi
|
||||
local lowest=$(printf '%s\n' "$1" "$2" | sort -V | head -n1)
|
||||
if [[ "$1" == "$lowest" ]]; then return 2; else return 1; fi
|
||||
}
|
||||
|
||||
echo "Requested spec: ${REQUESTED_SPEC}"
|
||||
echo "Actual version: ${ACTUAL_VERSION}"
|
||||
|
||||
# Case 1: 'latest' - always passes
|
||||
if [[ "${REQUESTED_SPEC}" == "latest" ]]; then
|
||||
echo "OK: Skipping explicit version check for 'latest'."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Case 2: 'canary' - check for 'canary' in revision or version string
|
||||
if [[ "${REQUESTED_SPEC}" == "canary" ]]; then
|
||||
if [[ "${ACTUAL_REVISION}" == *canary* ]] || [[ "${ACTUAL_VERSION}" == *canary* ]]; then
|
||||
echo "OK: Detected canary build (version: ${ACTUAL_VERSION}, revision: ${ACTUAL_REVISION:-n/a})."
|
||||
exit 0
|
||||
else
|
||||
echo "Error: Expected a canary build, but got ${ACTUAL_VERSION} (revision: ${ACTUAL_REVISION:-n/a})."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Case 3: Semver ranges (e.g., >1.0.0, <2, 1.x, 1.1.0)
|
||||
op_part=$(echo "${REQUESTED_SPEC}" | sed -E 's/^([><=]*).*/\1/')
|
||||
version_part=$(echo "${REQUESTED_SPEC}" | sed -E 's/^[><= ]*//')
|
||||
|
||||
op="${op_part:-==}"
|
||||
version_base="${version_part//.x/}"
|
||||
|
||||
# Handle wildcards like '1.x' or '1'
|
||||
if [[ "${version_part}" == *.x* ]] || { [[ ! "${version_part}" == *.* ]] && [[ "${op}" == "==" ]]; }; then
|
||||
if [[ "${ACTUAL_VERSION}" == "${version_base}" || "${ACTUAL_VERSION}" == "${version_base}".* ]]; then
|
||||
echo "OK: Version ${ACTUAL_VERSION} matches wildcard spec '${REQUESTED_SPEC}'."
|
||||
exit 0
|
||||
else
|
||||
echo "Error: Version ${ACTUAL_VERSION} does not match wildcard spec '${REQUESTED_SPEC}'."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Perform comparison for >, <, >=, <=, ==
|
||||
version_compare "${ACTUAL_VERSION}" "${version_part}" && result=0 || result=$?
|
||||
|
||||
case "${op}" in
|
||||
'==') if [[ ${result} -ne 0 ]]; then echo "Error: Expected version ${version_part}, but got ${ACTUAL_VERSION}." && exit 1; fi ;;
|
||||
'>') if [[ ${result} -ne 1 ]]; then echo "Error: Expected version > ${version_part}, but got ${ACTUAL_VERSION}." && exit 1; fi ;;
|
||||
'<') if [[ ${result} -ne 2 ]]; then echo "Error: Expected version < ${version_part}, but got ${ACTUAL_VERSION}." && exit 1; fi ;;
|
||||
'>=') if [[ ${result} -eq 2 ]]; then echo "Error: Expected version >= ${version_part}, but got ${ACTUAL_VERSION}." && exit 1; fi ;;
|
||||
'<=') if [[ ${result} -eq 1 ]]; then echo "Error: Expected version <= ${version_part}, but got ${ACTUAL_VERSION}." && exit 1; fi ;;
|
||||
*) echo "Error: Unsupported operator '${op}' in spec '${REQUESTED_SPEC}'." && exit 1 ;;
|
||||
esac
|
||||
|
||||
echo "OK: Version ${ACTUAL_VERSION} satisfies spec '${REQUESTED_SPEC}'."
|
||||
@@ -15,20 +15,18 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 📥 Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: 🛠️ Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
- name: 🛠️ Setup Bun
|
||||
uses: ./
|
||||
|
||||
- name: 📦 Install Dependencies
|
||||
run: npm install
|
||||
run: bun install
|
||||
|
||||
- name: 🧹 Format
|
||||
run: |
|
||||
npm run format
|
||||
npm run build
|
||||
bun run format
|
||||
bun run build
|
||||
|
||||
- name: 💾 Commit
|
||||
uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef
|
||||
uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # v1.3.2
|
||||
@@ -18,9 +18,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- uses: actions/publish-action@v0.3.0
|
||||
- uses: actions/publish-action@23f4c6f12633a2da8f44938b71fde9afec138fb4 # v0.4.0
|
||||
env:
|
||||
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
|
||||
with:
|
||||
|
||||
+141
-12
@@ -16,17 +16,35 @@ jobs:
|
||||
permissions: write-all
|
||||
steps:
|
||||
- name: 📥 Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: 🗑️ Remove cache
|
||||
run: gh cache delete --all || true
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
tests:
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Setup Bun
|
||||
uses: ./
|
||||
with:
|
||||
no-cache: true
|
||||
|
||||
- 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:
|
||||
@@ -34,61 +52,81 @@ jobs:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
- windows-11-arm
|
||||
bun-version:
|
||||
- latest
|
||||
- canary
|
||||
- "1.1.0"
|
||||
- "1.3.10"
|
||||
- "1.x"
|
||||
- "1"
|
||||
- "> 1.0.0"
|
||||
- "< 2"
|
||||
# https://github.com/oven-sh/setup-bun/issues/37
|
||||
# - "1.x"
|
||||
# - "1"
|
||||
# - "> 1.0.0"
|
||||
# - "< 2"
|
||||
# Disable <sha> support for now. This is because Github Artifacts
|
||||
# expire after 90 days, and we don't have another source of truth yet.
|
||||
# - "822a00c4d508b54f650933a73ca5f4a3af9a7983" # 1.0.0 commit
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: 🛠️ Setup Bun
|
||||
uses: ./
|
||||
id: setup_bun
|
||||
with:
|
||||
bun-version: ${{ matrix.bun-version }}
|
||||
no-cache: true
|
||||
|
||||
- name: ▶️ Run Bun
|
||||
id: run_bun
|
||||
run: |
|
||||
bun --version
|
||||
|
||||
- name: ⚖️ Verify Bun version
|
||||
uses: ./.github/actions/compare-bun-version
|
||||
with:
|
||||
bun-version: ${{ matrix.bun-version }}
|
||||
|
||||
setup-bun-from-file:
|
||||
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:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
- windows-11-arm
|
||||
|
||||
file:
|
||||
- name: package.json (bun@1.1.0)
|
||||
- name: package.json (packageManager bun@1.1.0)
|
||||
file: package.json
|
||||
run: |
|
||||
echo "$(jq '. += {"packageManager": "bun@1.1.0"}' package.json)" > package.json
|
||||
|
||||
- name: /foo/package.json (bun@1.1.0)
|
||||
file: /foo/package.json
|
||||
- name: foo/package.json (packageManager bun@1.1.0)
|
||||
file: foo/package.json
|
||||
run: |
|
||||
echo "$(jq '. += {"packageManager": "bun@1.1.0"}' package.json)" > /foo/package.json
|
||||
mkdir -p foo
|
||||
echo "$(jq '. += {"packageManager": "bun@1.1.0"}' package.json)" > foo/package.json
|
||||
|
||||
- name: package.json (yarn@bun@1.1.0)
|
||||
- name: package.json (packageManager yarn@bun@1.1.0)
|
||||
file: package.json
|
||||
run: |
|
||||
echo "$(jq '. += {"packageManager": "yarn@bun@1.1.0"}' package.json)" > package.json
|
||||
|
||||
- name: package.json (engines bun@1.1.0)
|
||||
file: package.json
|
||||
run: |
|
||||
echo "$(jq '.engines = {"bun": "1.1.0"}' package.json)" > package.json
|
||||
|
||||
- name: .tool-versions (bun 1.1.0)
|
||||
file: .tool-versions
|
||||
run: echo "bun 1.1.0" > .tool-versions
|
||||
@@ -111,7 +149,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: 📄 Setup file
|
||||
run: ${{ matrix.file.run }}
|
||||
@@ -120,6 +158,53 @@ jobs:
|
||||
uses: ./
|
||||
with:
|
||||
bun-version-file: ${{ matrix.file.file }}
|
||||
no-cache: true
|
||||
|
||||
- name: ⚖️ Compare versions
|
||||
uses: ./.github/actions/compare-bun-version
|
||||
with:
|
||||
bun-version: "1.1.0"
|
||||
|
||||
setup-bun-from-package-json-without-specified-field:
|
||||
name: setup-bun from (${{ matrix.os }}, ${{ matrix.file.name }}) without specified field
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
needs: [remove-cache, tests]
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
- windows-11-arm
|
||||
|
||||
file:
|
||||
- name: package.json (packageManager bun@1.1.0)
|
||||
file: package.json
|
||||
run: |
|
||||
echo "$(jq '. += {"packageManager": "bun@1.1.0"}' package.json)" > package.json
|
||||
|
||||
- name: package.json (packageManager yarn@bun@1.1.0)
|
||||
file: package.json
|
||||
run: |
|
||||
echo "$(jq '. += {"packageManager": "yarn@bun@1.1.0"}' package.json)" > package.json
|
||||
|
||||
- name: package.json (engines bun@1.1.0)
|
||||
file: package.json
|
||||
run: |
|
||||
echo "$(jq '.engines = {"bun": "1.1.0"}' package.json)" > package.json
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: 📄 Setup file
|
||||
run: ${{ matrix.file.run }}
|
||||
|
||||
- name: 🛠️ Setup Bun
|
||||
uses: ./
|
||||
with:
|
||||
no-cache: true
|
||||
|
||||
- name: ⚖️ Compare versions
|
||||
uses: ./.github/actions/compare-bun-version
|
||||
@@ -130,7 +215,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:
|
||||
@@ -141,7 +226,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: 🛠️ Setup Bun
|
||||
uses: ./
|
||||
@@ -153,3 +238,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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- 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
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"semi": true,
|
||||
"quoteProps": "preserve"
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"recommendations": ["esbenp.prettier-vscode", "github.vscode-github-actions"]
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"search.exclude": {
|
||||
"dist/**": true
|
||||
},
|
||||
// Lock changes to these files
|
||||
"files.readonlyInclude": {
|
||||
"dist/**": true,
|
||||
"bun.lock": true,
|
||||
"package-lock.json": true
|
||||
},
|
||||
}
|
||||
@@ -4,6 +4,18 @@ Download, install, and setup [Bun](https://bun.sh) in GitHub Actions.
|
||||
|
||||
## Usage
|
||||
|
||||
```yaml
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
```
|
||||
|
||||
By default, if no version is specified, the action will:
|
||||
|
||||
1. Check `package.json` for the `packageManager` field (e.g., `"packageManager": "bun@1.0.25"`)
|
||||
2. If `packageManager` doesn't exist, check `package.json` for `engines.bun`
|
||||
3. If neither exists or `package.json` is not found, use `latest`
|
||||
|
||||
You can also explicitly specify a version:
|
||||
|
||||
```yaml
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
@@ -18,24 +30,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.
|
||||
@@ -46,19 +76,17 @@ If you need to override the download URL, you can use the `bun-download-url` inp
|
||||
bun-download-url: "https://github.com/oven-sh/bun/releases/latest/download/bun-linux-x64.zip"
|
||||
```
|
||||
|
||||
### Node.js not needed
|
||||
|
||||
In most cases, you shouldn't need to use the [setup-node](https://github.com/actions/setup-node) GitHub Action.
|
||||
|
||||
## Inputs
|
||||
|
||||
| Name | Description | Default | Examples |
|
||||
| ------------------ | ----------------------------------------------------- | ----------- | ------------------------------------------------ |
|
||||
| `bun-version` | The version of Bun to download and install. | `latest` | `canary`, `1.0.0` |
|
||||
| `bun-version-file` | The version of Bun to download and install from file. | `undefined` | `package.json`, `.bun-version`, `.tool-versions` |
|
||||
| `bun-download-url` | URL to download .zip file for Bun release | | |
|
||||
| `registry-url` | Registry URL where some private package is stored. | `undefined` | `"https://npm.pkg.github.com/"` |
|
||||
| `scope` | Scope for private packages. | `undefined` | `"@foo"`, `"@orgname"` |
|
||||
| Name | Description | Default | Examples |
|
||||
| ------------------ | --------------------------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------------ |
|
||||
| `bun-version` | The version of Bun to download and install. | Version from `package.json`, or `latest` | `canary`, `1.0.0`, `1.0.x` |
|
||||
| `bun-version-file` | The version of Bun to download and install from file. | `undefined` | `package.json`, `.bun-version`, `.tool-versions` |
|
||||
| `bun-download-url` | URL to download .zip file for Bun release | | |
|
||||
| `registry-url` | Registry URL where some private package is stored. | `undefined` | `"https://npm.pkg.github.com/"` |
|
||||
| `scope` | Scope for private packages. | `undefined` | `"@foo"`, `"@orgname"` |
|
||||
| `no-cache` | Disable caching of the downloaded executable. | `false` | `true`, `false` |
|
||||
| `token` | Personal access token (PAT) used to fetch tags from the `oven-sh/bun` repository. | `${{ github.token }}` | `${{ secrets.GITHUB_TOKEN }}` |
|
||||
|
||||
## Outputs
|
||||
|
||||
|
||||
+17
-2
@@ -17,17 +17,32 @@ 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
|
||||
default: false
|
||||
description: Disable caching of bun executable.
|
||||
token:
|
||||
required: false
|
||||
default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
|
||||
description: Personal access token (PAT) used to fetch tags from oven-sh/bun repository. Recommended for resolving wildcard/range versions to avoid GitHub API rate limiting. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
|
||||
|
||||
outputs:
|
||||
bun-version:
|
||||
@@ -42,7 +57,7 @@ outputs:
|
||||
description: If the version of Bun was cached.
|
||||
|
||||
runs:
|
||||
using: "node20"
|
||||
using: "node24"
|
||||
main: "dist/setup/index.js"
|
||||
post: "dist/cache-save/index.js"
|
||||
post-if: success()
|
||||
@@ -1,57 +1,74 @@
|
||||
{
|
||||
"lockfileVersion": 0,
|
||||
"lockfileVersion": 1,
|
||||
"configVersion": 0,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "setup-bun",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^3.1.4",
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/glob": "^0.4.0",
|
||||
"@actions/io": "^1.1.2",
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
"@actions/cache": "^5.0.5",
|
||||
"@actions/core": "^2.0.3",
|
||||
"@actions/exec": "^2.0.0",
|
||||
"@actions/glob": "^0.5.0",
|
||||
"@actions/io": "^2.0.0",
|
||||
"@actions/tool-cache": "^3.0.0",
|
||||
"@iarna/toml": "^2.2.5",
|
||||
"compare-versions": "^6.1.1",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.8.2",
|
||||
"esbuild": "^0.19.2",
|
||||
"prettier": "^2.8.4",
|
||||
"@types/bun": "^1.3.10",
|
||||
"@types/node": "^24.0.0",
|
||||
"esbuild": "^0.19.12",
|
||||
"prettier": "^3.8.1",
|
||||
"typescript": "^4.9.5",
|
||||
},
|
||||
},
|
||||
},
|
||||
"patchedDependencies": {
|
||||
"compare-versions@6.1.1": "patches/compare-versions@6.1.1.patch",
|
||||
},
|
||||
"overrides": {
|
||||
"form-data": "^4.0.4",
|
||||
},
|
||||
"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@5.0.5", "", { "dependencies": { "@actions/core": "^2.0.0", "@actions/exec": "^2.0.0", "@actions/glob": "^0.5.1", "@actions/http-client": "^3.0.2", "@actions/io": "^2.0.0", "@azure/abort-controller": "^1.1.0", "@azure/core-rest-pipeline": "^1.22.0", "@azure/storage-blob": "^12.29.1", "@protobuf-ts/runtime-rpc": "^2.11.1", "semver": "^6.3.1" } }, "sha512-jiQSg0gfd+C2KPgcmdCOq7dCuCIQQWQ4b1YfGIRaaA9w7PJbRwTOcCz4LiFEUnqZGf0ha/8OKL3BeNwetHzYsQ=="],
|
||||
|
||||
"@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@2.0.3", "", { "dependencies": { "@actions/exec": "^2.0.0", "@actions/http-client": "^3.0.2" } }, "sha512-Od9Thc3T1mQJYddvVPM4QGiLUewdh+3txmDYHHxoNdkqysR1MbCT+rFOtNUxYAz+7+6RIsqipVahY2GJqGPyxA=="],
|
||||
|
||||
"@actions/exec": ["@actions/exec@1.1.1", "", { "dependencies": { "@actions/io": "^1.0.1" } }, "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w=="],
|
||||
"@actions/exec": ["@actions/exec@2.0.0", "", { "dependencies": { "@actions/io": "^2.0.0" } }, "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw=="],
|
||||
|
||||
"@actions/glob": ["@actions/glob@0.4.0", "", { "dependencies": { "@actions/core": "^1.9.1", "minimatch": "^3.0.4" } }, "sha512-+eKIGFhsFa4EBwaf/GMyzCdWrXWymGXfFmZU3FHQvYS8mPcHtTtZONbkcqqUMzw9mJ/pImEBFET1JNifhqGsAQ=="],
|
||||
"@actions/glob": ["@actions/glob@0.5.1", "", { "dependencies": { "@actions/core": "^2.0.3", "minimatch": "^3.0.4" } }, "sha512-+dv/t2aKQdKp9WWSp+1yIXVJzH5Q38M0Mta26pzIbeec14EcIleMB7UU6N7sNgbEuYfyuVGpE5pOKjl6j1WXkA=="],
|
||||
|
||||
"@actions/http-client": ["@actions/http-client@2.2.1", "", { "dependencies": { "tunnel": "^0.0.6", "undici": "^5.25.4" } }, "sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw=="],
|
||||
"@actions/http-client": ["@actions/http-client@3.0.2", "", { "dependencies": { "tunnel": "^0.0.6", "undici": "^6.23.0" } }, "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA=="],
|
||||
|
||||
"@actions/io": ["@actions/io@1.1.3", "", {}, "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q=="],
|
||||
"@actions/io": ["@actions/io@2.0.0", "", {}, "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg=="],
|
||||
|
||||
"@actions/tool-cache": ["@actions/tool-cache@2.0.1", "", { "dependencies": { "@actions/core": "^1.2.6", "@actions/exec": "^1.0.0", "@actions/http-client": "^2.0.1", "@actions/io": "^1.1.1", "semver": "^6.1.0", "uuid": "^3.3.2" } }, "sha512-iPU+mNwrbA8jodY8eyo/0S/QqCKDajiR8OxWTnSk/SnYg0sj8Hp4QcUEVC1YFpHWXtrfbQrE13Jz4k4HXJQKcA=="],
|
||||
"@actions/tool-cache": ["@actions/tool-cache@3.0.1", "", { "dependencies": { "@actions/core": "^2.0.1", "@actions/exec": "^2.0.0", "@actions/http-client": "^3.0.2", "@actions/io": "^2.0.0", "semver": "^6.1.0" } }, "sha512-euK7sID37jMg1yWGkdXkLPI5Te7x/+2QMUPeHXogcpzUZ81mqlDZ+CgYhQo3LtB8LpVnnQyjs+hTTU0Ir4Y0RQ=="],
|
||||
|
||||
"@azure/abort-controller": ["@azure/abort-controller@1.1.0", "", { "dependencies": { "tslib": "^2.2.0" } }, "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw=="],
|
||||
"@azure/abort-controller": ["@azure/abort-controller@1.1.0", "", { "dependencies": { "tslib": "^2.2.0" } }, ""],
|
||||
|
||||
"@azure/core-auth": ["@azure/core-auth@1.5.0", "", { "dependencies": { "@azure/abort-controller": "^1.0.0", "@azure/core-util": "^1.1.0", "tslib": "^2.2.0" } }, "sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw=="],
|
||||
"@azure/core-auth": ["@azure/core-auth@1.10.1", "", { "dependencies": { "@azure/abort-controller": "^2.1.2", "@azure/core-util": "^1.13.0", "tslib": "^2.6.2" } }, "sha512-ykRMW8PjVAn+RS6ww5cmK9U2CyH9p4Q88YJwvUslfuMmN98w/2rdGRLPqJYObapBCdzBVeDgYWdJnFPFb7qzpg=="],
|
||||
|
||||
"@azure/core-http": ["@azure/core-http@3.0.4", "", { "dependencies": { "@azure/abort-controller": "^1.0.0", "@azure/core-auth": "^1.3.0", "@azure/core-tracing": "1.0.0-preview.13", "@azure/core-util": "^1.1.1", "@azure/logger": "^1.0.0", "@types/node-fetch": "^2.5.0", "@types/tunnel": "^0.0.3", "form-data": "^4.0.0", "node-fetch": "^2.6.7", "process": "^0.11.10", "tslib": "^2.2.0", "tunnel": "^0.0.6", "uuid": "^8.3.0", "xml2js": "^0.5.0" } }, "sha512-Fok9VVhMdxAFOtqiiAtg74fL0UJkt0z3D+ouUUxcRLzZNBioPRAMJFVxiWoJljYpXsRi4GDQHzQHDc9AiYaIUQ=="],
|
||||
"@azure/core-client": ["@azure/core-client@1.10.1", "", { "dependencies": { "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.10.0", "@azure/core-rest-pipeline": "^1.22.0", "@azure/core-tracing": "^1.3.0", "@azure/core-util": "^1.13.0", "@azure/logger": "^1.3.0", "tslib": "^2.6.2" } }, "sha512-Nh5PhEOeY6PrnxNPsEHRr9eimxLwgLlpmguQaHKBinFYA/RU9+kOYVOQqOrTsCL+KSxrLLl1gD8Dk5BFW/7l/w=="],
|
||||
|
||||
"@azure/core-lro": ["@azure/core-lro@2.7.1", "", { "dependencies": { "@azure/abort-controller": "^2.0.0", "@azure/core-util": "^1.2.0", "@azure/logger": "^1.0.0", "tslib": "^2.6.2" } }, "sha512-kXSlrNHOCTVZMxpXNRqzgh9/j4cnNXU5Hf2YjMyjddRhCXFiFRzmNaqwN+XO9rGTsCOIaaG7M67zZdyliXZG9g=="],
|
||||
"@azure/core-http-compat": ["@azure/core-http-compat@2.3.2", "", { "dependencies": { "@azure/abort-controller": "^2.1.2" }, "peerDependencies": { "@azure/core-client": "^1.10.0", "@azure/core-rest-pipeline": "^1.22.0" } }, "sha512-Tf6ltdKzOJEgxZeWLCjMxrxbodB/ZeCbzzA1A2qHbhzAjzjHoBVSUeSl/baT/oHAxhc4qdqVaDKnc2+iE932gw=="],
|
||||
|
||||
"@azure/core-paging": ["@azure/core-paging@1.6.1", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-3tKIQXSU3mlN+ITz0m2pXLnKK3oQ6/EVcW8ud011Iq+M0rx6Wnm7NUEpoMeOAEedeKlPtemrQzO6YWoDR71O5w=="],
|
||||
"@azure/core-lro": ["@azure/core-lro@2.5.4", "", { "dependencies": { "@azure/abort-controller": "^1.0.0", "@azure/core-util": "^1.2.0", "@azure/logger": "^1.0.0", "tslib": "^2.2.0" } }, ""],
|
||||
|
||||
"@azure/core-tracing": ["@azure/core-tracing@1.0.0-preview.13", "", { "dependencies": { "@opentelemetry/api": "^1.0.1", "tslib": "^2.2.0" } }, "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ=="],
|
||||
"@azure/core-paging": ["@azure/core-paging@1.6.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA=="],
|
||||
|
||||
"@azure/core-util": ["@azure/core-util@1.6.1", "", { "dependencies": { "@azure/abort-controller": "^1.0.0", "tslib": "^2.2.0" } }, "sha512-h5taHeySlsV9qxuK64KZxy4iln1BtMYlNt5jbuEFN3UFSAd1EwKg/Gjl5a6tZ/W8t6li3xPnutOx7zbDyXnPmQ=="],
|
||||
"@azure/core-rest-pipeline": ["@azure/core-rest-pipeline@1.23.0", "", { "dependencies": { "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.10.0", "@azure/core-tracing": "^1.3.0", "@azure/core-util": "^1.13.0", "@azure/logger": "^1.3.0", "@typespec/ts-http-runtime": "^0.3.4", "tslib": "^2.6.2" } }, "sha512-Evs1INHo+jUjwHi1T6SG6Ua/LHOQBCLuKEEE6efIpt4ZOoNonaT1kP32GoOcdNDbfqsD2445CPri3MubBy5DEQ=="],
|
||||
|
||||
"@azure/logger": ["@azure/logger@1.1.1", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-/+4TtokaGgC+MnThdf6HyIH9Wrjp+CnCn3Nx3ggevN7FFjjNyjqg0yLlc2i9S+Z2uAzI8GYOo35Nzb1MhQ89MA=="],
|
||||
"@azure/core-tracing": ["@azure/core-tracing@1.3.1", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-9MWKevR7Hz8kNzzPLfX4EAtGM2b8mr50HPDBvio96bURP/9C+HjdH3sBlLSNNrvRAr5/k/svoH457gB5IKpmwQ=="],
|
||||
|
||||
"@azure/ms-rest-js": ["@azure/ms-rest-js@2.7.0", "", { "dependencies": { "@azure/core-auth": "^1.1.4", "abort-controller": "^3.0.0", "form-data": "^2.5.0", "node-fetch": "^2.6.7", "tslib": "^1.10.0", "tunnel": "0.0.6", "uuid": "^8.3.2", "xml2js": "^0.5.0" } }, "sha512-ngbzWbqF+NmztDOpLBVDxYM+XLcUj7nKhxGbSU9WtIsXfRB//cf2ZbAG5HkOrhU9/wd/ORRB6lM/d69RKVjiyA=="],
|
||||
"@azure/core-util": ["@azure/core-util@1.13.1", "", { "dependencies": { "@azure/abort-controller": "^2.1.2", "@typespec/ts-http-runtime": "^0.3.0", "tslib": "^2.6.2" } }, "sha512-XPArKLzsvl0Hf0CaGyKHUyVgF7oDnhKoP85Xv6M4StF/1AhfORhZudHtOyf2s+FcbuQ9dPRAjB8J2KvRRMUK2A=="],
|
||||
|
||||
"@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=="],
|
||||
"@azure/core-xml": ["@azure/core-xml@1.5.0", "", { "dependencies": { "fast-xml-parser": "^5.0.7", "tslib": "^2.8.1" } }, "sha512-D/sdlJBMJfx7gqoj66PKVmhDDaU6TKA49ptcolxdas29X7AfvLTmfAGLjAcIMBK7UZ2o4lygHIqVckOlQU3xWw=="],
|
||||
|
||||
"@azure/logger": ["@azure/logger@1.3.0", "", { "dependencies": { "@typespec/ts-http-runtime": "^0.3.0", "tslib": "^2.6.2" } }, "sha512-fCqPIfOcLE+CGqGPd66c8bZpwAji98tZ4JI9i/mlTNTlsIWslCfpg48s/ypyLxZTump5sypjrKn2/kY7q8oAbA=="],
|
||||
|
||||
"@azure/storage-blob": ["@azure/storage-blob@12.31.0", "", { "dependencies": { "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.9.0", "@azure/core-client": "^1.9.3", "@azure/core-http-compat": "^2.2.0", "@azure/core-lro": "^2.2.0", "@azure/core-paging": "^1.6.2", "@azure/core-rest-pipeline": "^1.19.1", "@azure/core-tracing": "^1.2.0", "@azure/core-util": "^1.11.0", "@azure/core-xml": "^1.4.5", "@azure/logger": "^1.1.4", "@azure/storage-common": "^12.3.0", "events": "^3.0.0", "tslib": "^2.8.1" } }, "sha512-DBgNv10aCSxopt92DkTDD0o9xScXeBqPKGmR50FPZQaEcH4JLQ+GEOGEDv19V5BMkB7kxr+m4h6il/cCDPvmHg=="],
|
||||
|
||||
"@azure/storage-common": ["@azure/storage-common@12.3.0", "", { "dependencies": { "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.9.0", "@azure/core-http-compat": "^2.2.0", "@azure/core-rest-pipeline": "^1.19.1", "@azure/core-tracing": "^1.2.0", "@azure/core-util": "^1.11.0", "@azure/logger": "^1.1.4", "events": "^3.3.0", "tslib": "^2.8.1" } }, "sha512-/OFHhy86aG5Pe8dP5tsp+BuJ25JOAl9yaMU3WZbkeoiFMHFtJ7tu5ili7qEdBXNW9G5lDB19trwyI6V49F/8iQ=="],
|
||||
|
||||
"@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.19.12", "", { "os": "aix", "cpu": "ppc64" }, "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA=="],
|
||||
|
||||
@@ -99,114 +116,110 @@
|
||||
|
||||
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.19.12", "", { "os": "win32", "cpu": "x64" }, "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA=="],
|
||||
|
||||
"@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/runtime": ["@protobuf-ts/runtime@2.11.1", "", {}, "sha512-KuDaT1IfHkugM2pyz+FwiY80ejWrkH1pAtOBOZFuR6SXEFTsnb/jiQWQ1rCIrcKx2BtyxnxW6BWwsVSA/Ie+WQ=="],
|
||||
|
||||
"@types/node": ["@types/node@20.12.2", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ=="],
|
||||
"@protobuf-ts/runtime-rpc": ["@protobuf-ts/runtime-rpc@2.11.1", "", { "dependencies": { "@protobuf-ts/runtime": "^2.11.1" } }, "sha512-4CqqUmNA+/uMz00+d3CYKgElXO9VrEbucjnBFEjqI4GuDrEQ32MaI3q+9qPBvIGOlL4PmHXrzM32vBPWRhQKWQ=="],
|
||||
|
||||
"@types/node-fetch": ["@types/node-fetch@2.6.11", "", { "dependencies": { "@types/node": "*", "form-data": "^4.0.0" } }, "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g=="],
|
||||
"@types/bun": ["@types/bun@1.3.10", "", { "dependencies": { "bun-types": "1.3.10" } }, "sha512-0+rlrUrOrTSskibryHbvQkDOWRJwJZqZlxrUs1u4oOoTln8+WIXBPmAuCF35SWB2z4Zl3E84Nl/D0P7803nigQ=="],
|
||||
|
||||
"@types/tunnel": ["@types/tunnel@0.0.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA=="],
|
||||
"@types/node": ["@types/node@24.12.0", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-GYDxsZi3ChgmckRT9HPU0WEhKLP08ev/Yfcq2AstjrDASOYCSXeyjDsHg4v5t4jOj7cyDX3vmprafKlWIG9MXQ=="],
|
||||
|
||||
"abort-controller": ["abort-controller@3.0.0", "", { "dependencies": { "event-target-shim": "^5.0.0" } }, "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg=="],
|
||||
"@typespec/ts-http-runtime": ["@typespec/ts-http-runtime@0.3.4", "", { "dependencies": { "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.0", "tslib": "^2.6.2" } }, "sha512-CI0NhTrz4EBaa0U+HaaUZrJhPoso8sG7ZFya8uQoBA57fjzrjRSv87ekCjLZOFExN+gXE/z0xuN2QfH4H2HrLQ=="],
|
||||
|
||||
"asynckit": ["asynckit@0.4.0", "", {}, "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="],
|
||||
"agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="],
|
||||
|
||||
"balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
|
||||
"balanced-match": ["balanced-match@1.0.2", "", {}, ""],
|
||||
|
||||
"brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="],
|
||||
"brace-expansion": ["brace-expansion@1.1.11", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, ""],
|
||||
|
||||
"combined-stream": ["combined-stream@1.0.8", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="],
|
||||
"bun-types": ["bun-types@1.3.10", "", { "dependencies": { "@types/node": "*" } }, "sha512-tcpfCCl6XWo6nCVnpcVrxQ+9AYN1iqMIzgrSKYMB/fjLtV2eyAVEg7AxQJuCq/26R6HpKWykQXuSOq/21RYcbg=="],
|
||||
|
||||
"concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="],
|
||||
"compare-versions": ["compare-versions@6.1.1", "", {}, "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg=="],
|
||||
|
||||
"delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="],
|
||||
"concat-map": ["concat-map@0.0.1", "", {}, ""],
|
||||
|
||||
"debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],
|
||||
|
||||
"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=="],
|
||||
|
||||
"event-target-shim": ["event-target-shim@5.0.1", "", {}, "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="],
|
||||
"events": ["events@3.3.0", "", {}, ""],
|
||||
|
||||
"events": ["events@3.3.0", "", {}, "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="],
|
||||
"fast-xml-builder": ["fast-xml-builder@1.1.1", "", { "dependencies": { "path-expression-matcher": "^1.1.3" } }, "sha512-t2IsJo7bUteacw/QxmvjAJUGRWZZJHfj1/0tP3+tm5DteIIXEJb0rcasgFD81cxk4lhzcSzTBgTKlwfcKlB5tA=="],
|
||||
|
||||
"form-data": ["form-data@2.5.1", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", "mime-types": "^2.1.12" } }, "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA=="],
|
||||
"fast-xml-parser": ["fast-xml-parser@5.5.2", "", { "dependencies": { "fast-xml-builder": "^1.1.1", "path-expression-matcher": "^1.1.3", "strnum": "^2.1.2" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-kA6Txdt1cHsk+/qWKuV1jZUHBD6QUXWKhWVBuSmfP5YElW5HvJ/yC7eFCS+DQg7LphBPuUoEBMQ+m1z6UlF24w=="],
|
||||
|
||||
"mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="],
|
||||
"http-proxy-agent": ["http-proxy-agent@7.0.2", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="],
|
||||
|
||||
"mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="],
|
||||
"https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
|
||||
|
||||
"minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="],
|
||||
"minimatch": ["minimatch@3.0.8", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, ""],
|
||||
|
||||
"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=="],
|
||||
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
|
||||
|
||||
"prettier": ["prettier@2.8.8", "", { "bin": { "prettier": "bin-prettier.js" } }, "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q=="],
|
||||
"path-expression-matcher": ["path-expression-matcher@1.1.3", "", {}, "sha512-qdVgY8KXmVdJZRSS1JdEPOKPdTiEK/pi0RkcT2sw1RhXxohdujUlJFPuS1TSkevZ9vzd3ZlL7ULl1MHGTApKzQ=="],
|
||||
|
||||
"process": ["process@0.11.10", "", {}, "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A=="],
|
||||
"prettier": ["prettier@3.8.1", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg=="],
|
||||
|
||||
"sax": ["sax@1.3.0", "", {}, "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA=="],
|
||||
"semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, ""],
|
||||
|
||||
"semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
|
||||
"strnum": ["strnum@2.2.0", "", {}, "sha512-Y7Bj8XyJxnPAORMZj/xltsfo55uOiyHcU2tnAVzHUnSJR/KsEX+9RoDeXEnsXtl/CX4fAcrt64gZ13aGaWPeBg=="],
|
||||
|
||||
"tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="],
|
||||
"tslib": ["tslib@2.6.2", "", {}, ""],
|
||||
|
||||
"tslib": ["tslib@2.6.2", "", {}, "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="],
|
||||
"tunnel": ["tunnel@0.0.6", "", {}, ""],
|
||||
|
||||
"tunnel": ["tunnel@0.0.6", "", {}, "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="],
|
||||
"typescript": ["typescript@4.9.5", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, ""],
|
||||
|
||||
"typescript": ["typescript@4.9.5", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g=="],
|
||||
"undici": ["undici@6.23.0", "", {}, "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g=="],
|
||||
|
||||
"undici": ["undici@5.28.3", "", { "dependencies": { "@fastify/busboy": "^2.0.0" } }, "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA=="],
|
||||
"undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
||||
|
||||
"undici-types": ["undici-types@5.26.5", "", {}, "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="],
|
||||
"@azure/core-auth/@azure/abort-controller": ["@azure/abort-controller@2.1.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA=="],
|
||||
|
||||
"uuid": ["uuid@3.4.0", "", { "bin": { "uuid": "./bin/uuid" } }, "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="],
|
||||
"@azure/core-auth/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="],
|
||||
"@azure/core-client/@azure/abort-controller": ["@azure/abort-controller@2.1.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA=="],
|
||||
|
||||
"whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="],
|
||||
"@azure/core-client/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"xml2js": ["xml2js@0.5.0", "", { "dependencies": { "sax": ">=0.6.0", "xmlbuilder": "~11.0.0" } }, "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA=="],
|
||||
"@azure/core-http-compat/@azure/abort-controller": ["@azure/abort-controller@2.1.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA=="],
|
||||
|
||||
"xmlbuilder": ["xmlbuilder@11.0.1", "", {}, "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA=="],
|
||||
"@azure/core-lro/@azure/core-util": ["@azure/core-util@1.4.0", "", { "dependencies": { "@azure/abort-controller": "^1.0.0", "tslib": "^2.2.0" } }, ""],
|
||||
|
||||
"@actions/cache/@actions/glob": ["@actions/glob@0.1.2", "", { "dependencies": { "@actions/core": "^1.2.6", "minimatch": "^3.0.4" } }, "sha512-SclLR7Ia5sEqjkJTPs7Sd86maMDw43p769YxBOxvPvEWuPEhpAnBsQfENOpXjFYMmhCqd127bmf+YdvJqVqR4A=="],
|
||||
"@azure/core-lro/@azure/logger": ["@azure/logger@1.0.4", "", { "dependencies": { "tslib": "^2.2.0" } }, ""],
|
||||
|
||||
"@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=="],
|
||||
"@azure/core-paging/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@actions/core/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
||||
"@azure/core-rest-pipeline/@azure/abort-controller": ["@azure/abort-controller@2.1.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA=="],
|
||||
|
||||
"@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=="],
|
||||
"@azure/core-rest-pipeline/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@azure/core-http/@azure/core-auth": ["@azure/core-auth@1.7.1", "", { "dependencies": { "@azure/abort-controller": "^2.0.0", "@azure/core-util": "^1.1.0", "tslib": "^2.6.2" } }, "sha512-dyeQwvgthqs/SlPVQbZQetpslXceHd4i5a7M/7z/lGEAVwnSluabnQOjF2/dk/hhWgMISusv1Ytp4mQ8JNy62A=="],
|
||||
"@azure/core-tracing/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@azure/core-http/@azure/core-util": ["@azure/core-util@1.8.1", "", { "dependencies": { "@azure/abort-controller": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-L3voj0StUdJ+YKomvwnTv7gHzguJO+a6h30pmmZdRprJCM+RJlGMPxzuh4R7lhQu1jNmEtaHX5wvTgWLDAmbGQ=="],
|
||||
"@azure/core-util/@azure/abort-controller": ["@azure/abort-controller@2.1.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA=="],
|
||||
|
||||
"@azure/core-http/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=="],
|
||||
"@azure/core-util/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@azure/core-http/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
||||
"@azure/core-xml/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@azure/core-lro/@azure/abort-controller": ["@azure/abort-controller@2.1.1", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-NhzeNm5zu2fPlwGXPUjzsRCRuPx5demaZyNcyNYJDqpa/Sbxzvo/RYt9IwUaAOnDW5+r7J9UOE6f22TQnb9nhQ=="],
|
||||
"@azure/logger/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@azure/core-lro/@azure/core-util": ["@azure/core-util@1.8.1", "", { "dependencies": { "@azure/abort-controller": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-L3voj0StUdJ+YKomvwnTv7gHzguJO+a6h30pmmZdRprJCM+RJlGMPxzuh4R7lhQu1jNmEtaHX5wvTgWLDAmbGQ=="],
|
||||
"@azure/storage-blob/@azure/abort-controller": ["@azure/abort-controller@2.1.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA=="],
|
||||
|
||||
"@azure/ms-rest-js/tslib": ["tslib@1.14.1", "", {}, "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="],
|
||||
"@azure/storage-blob/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@azure/ms-rest-js/uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
||||
"@azure/storage-common/@azure/abort-controller": ["@azure/abort-controller@2.1.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA=="],
|
||||
|
||||
"@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=="],
|
||||
"@azure/storage-common/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@types/tunnel/@types/node": ["@types/node@20.8.9", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg=="],
|
||||
"@typespec/ts-http-runtime/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@actions/core/@actions/http-client/undici": ["undici@5.26.5", "", { "dependencies": { "@fastify/busboy": "^2.0.0" } }, "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw=="],
|
||||
"bun-types/@types/node": ["@types/node@20.19.35", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-Uarfe6J91b9HAUXxjvSOdiO2UPOKLm07Q1oh0JHxoZ1y8HoqxDAu3gVrsrOHeiio0kSsoVBt4wFrKOm0dKxVPQ=="],
|
||||
|
||||
"@actions/tool-cache/@actions/http-client/undici": ["undici@5.26.5", "", { "dependencies": { "@fastify/busboy": "^2.0.0" } }, "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw=="],
|
||||
"@azure/core-http-compat/@azure/abort-controller/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"@azure/core-http/@azure/core-auth/@azure/abort-controller": ["@azure/abort-controller@2.1.1", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-NhzeNm5zu2fPlwGXPUjzsRCRuPx5demaZyNcyNYJDqpa/Sbxzvo/RYt9IwUaAOnDW5+r7J9UOE6f22TQnb9nhQ=="],
|
||||
|
||||
"@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/tool-cache/@actions/http-client/undici/@fastify/busboy": ["@fastify/busboy@2.0.0", "", {}, "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ=="],
|
||||
"bun-types/@types/node/undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
|
||||
}
|
||||
}
|
||||
+115
-65
@@ -1,73 +1,123 @@
|
||||
var Aw=Object.create;var Ds=Object.defineProperty;var Mw=Object.getOwnPropertyDescriptor;var qw=Object.getOwnPropertyNames;var zw=Object.getPrototypeOf,Lw=Object.prototype.hasOwnProperty;var o=(t,e)=>Ds(t,"name",{value:e,configurable:!0});var Bt=(t,e)=>()=>(t&&(e=t(t=0)),e);var T=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),bh=(t,e)=>{for(var a in e)Ds(t,a,{get:e[a],enumerable:!0})},xh=(t,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of qw(e))!Lw.call(t,r)&&r!==a&&Ds(t,r,{get:()=>e[r],enumerable:!(i=Mw(e,r))||i.enumerable});return t};var Is=(t,e,a)=>(a=t!=null?Aw(zw(t)):{},xh(e||!t||!t.__esModule?Ds(a,"default",{value:t,enumerable:!0}):a,t)),cp=t=>xh(Ds({},"__esModule",{value:!0}),t);var mp=T(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.toCommandProperties=Jr.toCommandValue=void 0;function kw(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}o(kw,"toCommandValue");Jr.toCommandValue=kw;function jw(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(jw,"toCommandProperties");Jr.toCommandProperties=jw});var Sh=T(la=>{"use strict";var Uw=la&&la.__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]}),Hw=la&&la.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Fw=la&&la.__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)&&Uw(e,t,a);return Hw(e,t),e};Object.defineProperty(la,"__esModule",{value:!0});la.issue=la.issueCommand=void 0;var Vw=Fw(require("os")),Nh=mp();function _h(t,e,a){let i=new em(t,e,a);process.stdout.write(i.toString()+Vw.EOL)}o(_h,"issueCommand");la.issueCommand=_h;function $w(t,e=""){_h(t,{},e)}o($w,"issue");la.issue=$w;var wh="::",em=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=wh+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}=${Xw(r)}`)}}return e+=`${wh}${Gw(this.message)}`,e}};function Gw(t){return(0,Nh.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(Gw,"escapeData");function Xw(t){return(0,Nh.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(Xw,"escapeProperty")});var Th=T(ca=>{"use strict";var Ww=ca&&ca.__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]}),Kw=ca&&ca.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),am=ca&&ca.__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)&&Ww(e,t,a);return Kw(e,t),e};Object.defineProperty(ca,"__esModule",{value:!0});ca.prepareKeyValueMessage=ca.issueFileCommand=void 0;var Yw=am(require("crypto")),Eh=am(require("fs")),tm=am(require("os")),Ch=mp();function Qw(t,e){let a=process.env[`GITHUB_${t}`];if(!a)throw new Error(`Unable to find environment variable for file command ${t}`);if(!Eh.existsSync(a))throw new Error(`Missing file at path: ${a}`);Eh.appendFileSync(a,`${(0,Ch.toCommandValue)(e)}${tm.EOL}`,{encoding:"utf8"})}o(Qw,"issueFileCommand");ca.issueFileCommand=Qw;function Jw(t,e){let a=`ghadelimiter_${Yw.randomUUID()}`,i=(0,Ch.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}${tm.EOL}${i}${tm.EOL}${a}`}o(Jw,"prepareKeyValueMessage");ca.prepareKeyValueMessage=Jw});var Ph=T(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.checkBypass=Zr.getProxyUrl=void 0;function Zw(t){let e=t.protocol==="https:";if(Oh(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(Zw,"getProxyUrl");Zr.getProxyUrl=Zw;function Oh(t){if(!t.hostname)return!1;let e=t.hostname;if(eN(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");di.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 Dh(t,e){var a=this;di.prototype.createSocket.call(a,t,function(i){var r=t.request.getHeader("host"),n=rm({},a.options,{socket:i,servername:r?r.replace(/:.*$/,""):t.host}),s=tN.connect(0,n);a.sockets[a.sockets.indexOf(i)]=s,e(s)})}o(Dh,"createSecureSocket");function Ih(t,e,a){return typeof t=="string"?{host:t,port:e,localAddress:a}:t}o(Ih,"toOptions");function rm(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(rm,"mergeOptions");var Bi;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Bi=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"):Bi=o(function(){},"debug");en.debug=Bi});var nm=T((cj,Ah)=>{Ah.exports=Bh()});var tn=T(Te=>{"use strict";var pN=Te&&Te.__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]}),dN=Te&&Te.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vp=Te&&Te.__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)&&pN(e,t,a);return dN(e,t),e},tt=Te&&Te.__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(Te,"__esModule",{value:!0});Te.HttpClient=Te.isHttps=Te.HttpClientResponse=Te.HttpClientError=Te.getProxyUrl=Te.MediaTypes=Te.Headers=Te.HttpCodes=void 0;var up=vp(require("http")),sm=vp(require("https")),Mh=vp(Ph()),fp=vp(nm()),Pa;(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"})(Pa=Te.HttpCodes||(Te.HttpCodes={}));var qt;(function(t){t.Accept="accept",t.ContentType="content-type"})(qt=Te.Headers||(Te.Headers={}));var Ai;(function(t){t.ApplicationJson="application/json"})(Ai=Te.MediaTypes||(Te.MediaTypes={}));function lN(t){let e=Mh.getProxyUrl(new URL(t));return e?e.href:""}o(lN,"getProxyUrl");Te.getProxyUrl=lN;var cN=[Pa.MovedPermanently,Pa.ResourceMoved,Pa.SeeOther,Pa.TemporaryRedirect,Pa.PermanentRedirect],mN=[Pa.BadGateway,Pa.ServiceUnavailable,Pa.GatewayTimeout],uN=["OPTIONS","GET","DELETE","HEAD"],fN=10,hN=5,gp=class t extends Error{static{o(this,"HttpClientError")}constructor(e,a){super(e),this.name="HttpClientError",this.statusCode=a,Object.setPrototypeOf(this,t.prototype)}};Te.HttpClientError=gp;var yp=class{static{o(this,"HttpClientResponse")}constructor(e){this.message=e}readBody(){return tt(this,void 0,void 0,function*(){return new Promise(e=>tt(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 tt(this,void 0,void 0,function*(){return new Promise(e=>tt(this,void 0,void 0,function*(){let a=[];this.message.on("data",i=>{a.push(i)}),this.message.on("end",()=>{e(Buffer.concat(a))})}))})}};Te.HttpClientResponse=yp;function gN(t){return new URL(t).protocol==="https:"}o(gN,"isHttps");Te.isHttps=gN;var om=class{static{o(this,"HttpClient")}constructor(e,a,i){this._ignoreSslError=!1
Line truncated
|
||||
var k8=Object.create;var _l=Object.defineProperty;var L8=Object.getOwnPropertyDescriptor;var F8=Object.getOwnPropertyNames;var U8=Object.getPrototypeOf,q8=Object.prototype.hasOwnProperty;var o=(t,e)=>_l(t,"name",{value:e,configurable:!0});var Wu=(t,e)=>()=>(t&&(e=t(t=0)),e);var h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ku=(t,e)=>{for(var r in e)_l(t,r,{get:e[r],enumerable:!0})},qv=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of F8(e))!q8.call(t,i)&&i!==r&&_l(t,i,{get:()=>e[i],enumerable:!(n=L8(e,i))||n.enumerable});return t};var Uy=(t,e,r)=>(r=t!=null?k8(U8(t)):{},qv(e||!t||!t.__esModule?_l(r,"default",{value:t,enumerable:!0}):r,t)),Wt=t=>qv(_l({},"__esModule",{value:!0}),t);var Xu=h($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.toCommandValue=H8;$u.toCommandProperties=z8;function H8(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}o(H8,"toCommandValue");function z8(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(z8,"toCommandProperties")});var Gv=h($n=>{"use strict";var j8=$n&&$n.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),G8=$n&&$n.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Y8=$n&&$n.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&j8(r,e,n[i]);return G8(r,e),r}}();Object.defineProperty($n,"__esModule",{value:!0});$n.issueCommand=jv;$n.issue=V8;var J8=Y8(require("os")),zv=Xu();function jv(t,e,r){let n=new qy(t,e,r);process.stdout.write(n.toString()+J8.EOL)}o(jv,"issueCommand");function V8(t,e=""){jv(t,{},e)}o(V8,"issue");var Hv="::",qy=class{static{o(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=Hv+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let i=this.properties[n];i&&(r?r=!1:e+=",",e+=`${n}=${K8(i)}`)}}return e+=`${Hv}${W8(this.message)}`,e}};function W8(t){return(0,zv.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(W8,"escapeData");function K8(t){return(0,zv.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(K8,"escapeProperty")});var Vv=h(Xn=>{"use strict";var $8=Xn&&Xn.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),X8=Xn&&Xn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zy=Xn&&Xn.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&$8(r,e,n[i]);return X8(r,e),r}}();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.issueFileCommand=e4;Xn.prepareKeyValueMessage=t4;var Z8=zy(require("crypto")),Yv=zy(require("fs")),Hy=zy(require("os")),Jv=Xu();function e4(t,e){let r=process.env[`GITHUB_${t}`];if(!r)throw new Error(`Unable to find environment variable for file command ${t}`);if(!Yv.existsSync(r))throw new Error(`Missing file at path: ${r}`);Yv.appendFileSync(r,`${(0,Jv.toCommandValue)(e)}${Hy.EOL}`,{encoding:"utf8"})}o(e4,"issueFileCommand");function t4(t,e){let r=`ghadelimiter_${Z8.randomUUID()}`,n=(0,Jv.toCommandValue)(e);if(t.includes(r))throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${t}<<${r}${Hy.EOL}${n}${Hy.EOL}${r}`}o(t4,"prepareKeyValueMessage")});var Kv=h(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.getProxyUrl=r4;ed.checkBypass=Wv;function r4(t){let e=t.protocol==="https:";if(Wv(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new Zu(r)}catch{if(!r.startsWith("hLine truncated
|
||||
`,d.message,d.stack);var g=new Error("tunneling socket could not be established, cause="+d.message);g.code="ECONNRESET",e.request.emit("error",g),n.removeSocket(i)}o(u,"onError")},"createSocket");Ti.prototype.removeSocket=o(function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(i){n.request.onSocket(i)})}},"removeSocket");function Xv(t,e){var r=this;Ti.prototype.createSocket.call(r,t,function(n){var i=t.request.getHeader("host"),s=Gy({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):t.host}),a=i4.connect(0,s);r.sockets[r.sockets.indexOf(n)]=a,e(a)})}o(Xv,"createSecureSocket");function Zv(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}o(Zv,"toOptions");function Gy(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var i=Object.keys(n),s=0,a=i.length;s<a;++s){var c=i[s];n[c]!==void 0&&(t[c]=n[c])}}return t}o(Gy,"mergeOptions");var as;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?as=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"):as=o(function(){},"debug");oa.debug=as});var rR=h((uUe,tR)=>{tR.exports=eR()});var tt=h((dUe,nR)=>{nR.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var _e=h((pUe,SR)=>{"use strict";var iR=Symbol.for("undici.error.UND_ERR"),ct=class extends Error{static{o(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[iR]===!0}[iR]=!0},sR=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),Yy=class extends ct{static{o(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[sR]===!0}[sR]=!0},oR=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),Jy=class extends ct{static{o(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[oR]===!0}[oR]=!0},aR=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),Vy=class extends ct{static{o(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[aR]===!0}[aR]=!0},cR=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),Wy=class extends ct{static{o(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}
Line truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}o(q_,"isValidHeaderValue");function NX(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),i="";if(n.length>0)for(let s=n.length;s!==0;s--){let a=n[s-1].trim();if(AX.has(a)){i=a;break}}i!==""&&(t.referrerPolicy=i)}o(NX,"setRequestReferrerPolicyOnRedirect");function SX(){return"allowed"}o(SX,"crossOriginResourcePolicyCheck");function xX(){return"success"}o(xX,"corsCheck");function vX(){return"success"}o(vX,"TAOCheck");function RX(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}o(RX,"appendFetchMetadata");function _X(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&FC(t.origin)&&!FC(Ul(t))&&(e=null);break;case"same-origin":Bd(t,Ul(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}o(_X,"appendRequestOriginHeader");function fa(t,e){return t}o(fa,"coarsenTime");function PX(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:fa(t.domainLookupStartTime,r),domainLookupEndTime:fa(t.domainLookupEndTime,r),connectionStartTime:fa(t.connectionStartTime,r),connectionEndTime:fa(t.connectionEndTime,r),secureConnectionStartTime:fa(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}o(PX,"clampAndCoarsenConnectionTimingInfo");function DX(t){return fa(gX.now(),t)}o(DX,"coarsenedSharedCurrentTime");function TX(t){return{startTime:t.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:t.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}o(TX,"createOpaqueTimingInfo");function H_(){return{referrerPolicy:"strict-origin-when-cross-origin"}}o(H_,"makePolicyContainer");function OX(t){return{referrerPolicy:t.referrerPolicy}}o(OX,"clonePolicyContainer");function MX(t){let e=t.referrerPolicy;io(e);let r=null;if(t.referrer==="client"){let c=M_();if(!c||c.origin==="null")return"no-referrer";r=new URL(c)}else t.referrer instanceof URL&&(r=t.referrer);let n=LC(r),i=LC(r,!0);n.toString().length>4096&&(n=i);let s=Bd(t,n),a=Fl(n)&&!Fl(t.url);switch(e){case"origin":return i??LC(r,!0);case"unsafe-url":return n;case"same-origin":return s?i:"no-referrer";case"origin-when-cross-origin":return s?n:i;case"strict-origin-when-cross-origin":{let c=Ul(t);return Bd(n,c)?n:Fl(n)&&!Fl(c)?"no-referrer":i}case"strict-origin":case"no-referrer-when-downgrade":default:return a?"no-referrer":i}}o(MX,"determineRequestsReferrer");function LC(t,e){return io(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}o(LC,"stripURLForReferrer");function Fl(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}o(Fl,"isURLPotentiallyTrustworthy");function kX(t,e){if(Ed===void 0)return!0;let r=z_(e);if(r==="no metadata"||r.length===0)return!0;let n=FX(r),i=UX(r,n);for(let s of i){let a=s.algo,c=s.hash,l=Ed.createHash(a).update(t).digest("base64");if(l[l.length-1]==="="&&(l[l.length-2]==="="?l=l.slice(0,-2):l=l.slice(0,-1)),qX(l,c))return!0}return!1}o(kX,"bytesMatch");var LX=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function z_(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let i=LX.exec(n);if(i===null||i.groups===void 0||i.groups.algo===void 0)continue;let s=i.groups.algo.toLowerCase();L_.includes(s)&&e.push(i.groups)}return r===!0?"no metadata":e}o(z_,"parseMetadata");function FX(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let n=t[r];if(n.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;n.algo[3]==="3"&&(e="sha384")}}return e}o(FX,"getStrongestMetadata");function UX(t,e){if(t.length===1)return t;let r=0;for(let n=0;n<t.length;++n)t[n].algo===e&&(t[r++]=t[n]);return t.length=r,t}o(UX,"filterMetadataListByAlgorithm");function qX(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r]){if(t[r]==="+"&&e[r]==="-"||t[r]==="/"&&e[r]==="_")continue;return!1}return!0}o(qX,"compareBase64Mixed");function HX(t){}o(HX,"t
Line truncated
|
||||
`);function Q9(t){for(let e=0;e<t.length;++e)if(t.charCodeAt(e)&-128)return!1;return!0}o(Q9,"isAsciiString");function w9(t){let e=t.length;if(e<27||e>70)return!1;for(let r=0;r<e;++r){let n=t.charCodeAt(r);if(!(n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}o(w9,"validateBoundary");function N9(t,e){bd(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),i=[],s={position:0};for(;t[s.position]===13&&t[s.position+1]===10;)s.position+=2;let a=t.length;for(;t[a-1]===10&&t[a-2]===13;)a-=2;for(a!==t.length&&(t=t.subarray(0,a));;){if(t.subarray(s.position,s.position+n.length).equals(n))s.position+=n.length;else return"failure";if(s.position===t.length-2&&Qd(t,I9,s)||s.position===t.length-4&&Qd(t,b9,s))return i;if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let c=S9(t,s);if(c==="failure")return"failure";let{name:l,filename:A,contentType:u,encoding:d}=c;s.position+=2;let g;{let C=t.indexOf(n.subarray(2),s.position);if(C===-1)return"failure";g=t.subarray(s.position,C-4),s.position+=g.length,d==="base64"&&(g=Buffer.from(g.toString(),"base64"))}if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let f;A!==null?(u??="text/plain",Q9(u)||(u=""),f=new E9([g],A,{type:u})):f=g9(Buffer.from(g)),bd(rP(l)),bd(typeof f=="string"&&rP(f)||h9(f)),i.push(y9(l,f,A))}}o(N9,"multipartFormDataParser");function S9(t,e){let r=null,n=null,i=null,s=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:i,encoding:s};let a=ya(c=>c!==10&&c!==13&&c!==58,t,e);if(a=YC(a,!0,!0,c=>c===9||c===32),!f9.test(a.toString())||t[e.position]!==58)return"failure";switch(e.position++,ya(c=>c===32||c===9,t,e),m9(a)){case"content-disposition":{if(r=n=null,!Qd(t,B9,e)||(e.position+=17,r=sP(t,e),r===null))return"failure";if(Qd(t,iP,e)){let c=e.position+iP.length;if(t[c]===42&&(e.position+=1,c+=1),t[c]!==61||t[c+1]!==34||(e.position+=12,n=sP(t,e),n===null))return"failure"}break}case"content-type":{let c=ya(l=>l!==10&&l!==13,t,e);c=YC(c,!1,!0,l=>l===9||l===32),i=nP(c);break}case"content-transfer-encoding":{let c=ya(l=>l!==10&&l!==13,t,e);c=YC(c,!1,!0,l=>l===9||l===32),s=nP(c);break}default:ya(c=>c!==10&&c!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}o(S9,"parseMultipartFormDataHeaders");function sP(t,e){bd(t[e.position-1]===34);let r=ya(n=>n!==10&&n!==13&&n!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,`
|
||||
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}o(sP,"parseMultipartFormDataName");function ya(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}o(ya,"collectASequenceOfBytes");function YC(t,e,r,n){let i=0,s=t.length-1;if(e)for(;i<t.length&&n(t[i]);)i++;if(r)for(;s>0&&n(t[s]);)s--;return i===0&&s===t.length-1?t:t.subarray(i,s+1)}o(YC,"removeChars");function Qd(t,e,r){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[r.position+n])return!1;return!0}o(Qd,"bufferStartsWith");oP.exports={multipartFormDataParser:N9,validateBoundary:w9}});var Ba=h((ZUe,hP)=>{"use strict";var zl=Ee(),{ReadableStreamFrom:x9,isBlobLike:cP,isReadableStreamLike:v9,readableStreamClose:R9,createDeferredPromise:_9,fullyReadBody:P9,extractMimeType:D9,utf8DecodeBytes:uP}=Tr(),{FormData:lP}=Hl(),{kState:Ea}=cs(),{webidl:T9}=Yt(),{Blob:O9}=require("node:buffer"),JC=require("node:assert"),{isErrored:dP,isDisturbed:M9}=require("node:stream"),{isArrayBuffer:k9}=require("node:util/types"),{serializeAMimeType:L9}=hr(),{multipartFormDataParser:F9}=aP(),VC;try{let t=require("node:crypto");VC=o(e=>t.randomInt(0,e),"random")}catch{VC=o(t=>Math.floor(Math.random(t)),"random")}var wd=new TextEncoder;function U9(){}o(U9,"noop");var pP=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,mP;pP&&(mP=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!M9(e)&&!dP(e)&&e.cancel("Response object has been garbage collected").catch(U9)}));function gP(t,e=!1){let r=null;t instanceof ReadableStream?r=t:cP(t)?r=t.stream():r=new ReadableStream({async pull(l){let A=typeof i=="string"?wd.encode(i):i;A.byteLength&&l.enqueue(A),queueMicrotask(()=>R9(l))},start(){},type:"bytes"}),JC(v9(r));let n=null,i=null,s=null,a=null;if(typeof t=="string")i=t,a="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)i=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(k9(t))i=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))i=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(zl.isFormDataLike(t)){let l=`----formdata-undici-0${`${VC(1e11)}`.padStart(11,"0")}`,A=`--${l}\r
|
||||
Content-Disposition: form-data`;let u=o(x=>x.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),d=o(x=>x.replace(/\r?\n|\r/g,`\r
|
||||
`),"normalizeLinefeeds"),g=[],f=new Uint8Array([13,10]);s=0;let C=!1;for(let[x,w]of t)if(typeof w=="string"){let v=wd.encode(A+`; name="${u(d(x))}"\r
|
||||
\r
|
||||
${d(w)}\r
|
||||
`);g.push(v),s+=v.byteLength}else{let v=wd.encode(`${A}; name="${u(d(x))}"`+(w.name?`; filename="${u(w.name)}"`:"")+`\r
|
||||
Content-Type: ${w.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);g.push(v,w,f),typeof w.size=="number"?s+=v.byteLength+w.size+f.byteLength:C=!0}let Q=wd.encode(`--${l}--\r
|
||||
`);g.push(Q),s+=Q.byteLength,C&&(s=null),i=t,n=o(async function*(){for(let x of g)x.stream?yield*x.stream():yield x},"action"),a=`multipart/form-data; boundary=${l}`}else if(cP(t))i=t,s=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(zl.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:x9(t)}if((typeof i=="string"||zl.isBuffer(i))&&(s=Buffer.byteLength(i)),n!=null){let l;r=new ReadableStream({async start(){l=n(t)[Symbol.asyncIterator]()},async pull(A){let{value:u,done:d}=await l.next();if(d)queueMicrotask(()=>{A.close(),A.byobRequest?.respond(0)});else if(!dP(r)){let g=new Uint8Array(u);g.byteLength&&A.enqueue(g)}return A.desiredSize>0},async cancel(A){await l.return()},type:"bytes"})}return[{stream:r,source:i,length:s},a]}o(gP,"extractBody");function q9(t,e=!1){return t instanceof ReadableStream&&(JC(!zl.isDisturbed(t),"The body has already been consumed."),JC(!t.locked,"The stream is locked.")),gP(t,e)}o(q9,"safelyExtractBody");function H9(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}o(H9,"cloneBody");function z9(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}o(z9,"throwIfAborted");function j9(t){return{blob(){return Ca(this,r=>{let n=AP(this);return n===null?n="":n&&(n=L9(n)),new O9([r],{type:n})},t)},arrayBuffer(){return Ca(this,r=>new Uint8Array(r).buffer,t)},text(){return Ca(this,uP,t)},json(){return Ca(this,Y9,t)},formData(){return Ca(this,r=>{let n=AP(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let i=F9(r,n);if(i==="failure")throw new TypeError("Failed to parse body as FormData.");let s=new lP;return s[Ea]=i,s}case"application/x-www-form-urlencoded":{let i=new URLSearchParams(r.toString()),s=new lP;for(let[a,c]of i)s.append(a,c);return s}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return Ca(this,r=>new Uint8Array(r),t)}}}o(j9,"bodyMixinMethods");function G9(t){Object.assign(t.prototype,j9(t))}o(G9,"mixinBody");async function Ca(t,e,r){if(T9.brandCheck(t,r),fP(t))throw new TypeError("Body is unusable: Body has already been read");z9(t[Ea]);let n=_9(),i=o(a=>n.reject(a),"errorSteps"),s=o(a=>{try{n.resolve(e(a))}catch(c){i(c)}},"successSteps");return t[Ea].body==null?(s(Buffer.allocUnsafe(0)),n.promise):(await P9(t[Ea].body,s,i),n.promise)}o(Ca,"consumeBody");function fP(t){let e=t[Ea].body;return e!=null&&(e.stream.locked||zl.isDisturbed(e.stream))}o(fP,"bodyUnusable");function Y9(t){return JSON.parse(uP(t))}o(Y9,"parseJSONFromBytes");function AP(t){let e=t[Ea].headersList,r=D9(e);return r==="failure"?null:r}o(AP,"bodyMimeType");hP.exports={extractBody:gP,safelyExtractBody:q9,cloneBody:H9,mixinBody:G9,streamRegistry:mP,hasFinalizationRegistry:pP,bodyUnusable:fP}});var xP=h((tqe,SP)=>{"use strict";var oe=require("node:assert"),pe=Ee(),{channels:yP}=ca(),WC=RC(),{RequestContentLengthMismatchError:so,ResponseContentLengthMismatchError:J9,RequestAbortedError:QP,HeadersTimeoutError:V9,HeadersOverflowError:W9,SocketError:_d,InformationalError:Ia,BodyTimeoutError:K9,HTTPParserError:$9,ResponseExceededMaxSizeError:X9}=_e(),{kUrl:wP,kReset:yr,kClient:ZC,kParser:dt,kBlocking:Yl,kRunning:Kt,kPending:Z9,kSize:CP,kWriting:As,kQueue:Pn,kNoRef:jl,kKeepAliveDefaultTimeout:e6,kHostHeader:t6,kPendingIdx:r6,kRunningIdx:on,kError:an,kPipelining:vd,kSocket:ba,kKeepAliveTimeoutValue:Pd,kMaxHeadersSize:KC,kKeepAliveMaxTimeout:n6,kKeepAliveTimeoutThreshold:i6,kHeadersTimeout:s6,kBodyTimeout:o6,kStrictContentLength:eE,kMaxRequests:EP,kCounter:a6,kMaxResponseSize:c6,kOnError:l6,kResume:ls,kHTTPContext:NP}=tt(),ri=m_(),A6=Buffer.alloc(0),Nd=Buffer[Symbol.species],Sd=pe.addListener,u6=pe.removeAllListeners,$C;async function d6(){let t=process.env.JEST_WORKER_ID?DC():void 0,e;try{e=await WebAssembly.compile(h_())}catch{e=await WebAssembly.compile(t||DC())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,i)=>0,wasm_on_status:(r,n,i)=>{oe(_t.ptr===r);let s=n-ii+ni.byteOffset;return _t.onStatus(new Nd(ni.buffer,s,i))||0},wasm_on_message_begin:r=>(oe(_t.ptr===r),_t.onMessageBegin()||0),wasm_on_header_field:(r,n,i)=>{oe(_t.ptr===r);let s=n-ii+ni.byteOffset;return _t.onHeaderField(new Nd(ni.buffer,s,i))||0},wasm_on_header_value:(r,n,i)=>{oe(_t.ptr===r);let s=n-ii+ni.byteOffset;return _t.onHeaderValue(new Nd(ni.buffer,s,i))||0},wasm_on_headers_complete:(r,n,i,s)=>(oe(_t.ptr===r),_t.onHeadersComplete(n,!!i,!!s)||0),wasm_on_body:(r,n,i)=>{oe(_t.ptr===r);let s=n-ii+ni.byteOffset;return _t.onBody(new Nd(ni.buffer,s,i))||0},wasm_on_message_complete:r=>(oe(_t.ptr===r),_t.onMessageComplete()||0)}})}o(d6,"lazyllhttp");var XC=null,tE=d6();tE.catch();var _t=null,ni=null,xd=0,ii=null,p6=0,Gl=1,Qa=2|Gl,Rd=4|Gl,rE=8|p6,nE=class{static{o(this,"Parser")}constructor(e,r,{exports:n}){oe(Number.isFinite(e[KC]
Line truncated
|
||||
`;if(typeof i=="string"?Q+=`host: ${i}\r
|
||||
`:Q+=t[t6],s?Q+=`connection: upgrade\r
|
||||
upgrade: ${s}\r
|
||||
`:t[vd]&&!f[yr]?Q+=`connection: keep-alive\r
|
||||
`:Q+=`connection: close\r
|
||||
`,Array.isArray(A))for(let x=0;x<A.length;x+=2){let w=A[x+0],v=A[x+1];if(Array.isArray(v))for(let T=0;T<v.length;T++)Q+=`${w}: ${v[T]}\r
|
||||
`;else Q+=`${w}: ${v}\r
|
||||
`}return yP.sendHeaders.hasSubscribers&&yP.sendHeaders.publish({request:e,headers:Q,socket:f}),!l||g===0?IP(C,null,t,e,f,u,Q,d):pe.isBuffer(l)?IP(C,l,t,e,f,u,Q,d):pe.isBlobLike(l)?typeof l.stream=="function"?bP(C,l.stream(),t,e,f,u,Q,d):C6(C,l,t,e,f,u,Q,d):pe.isStream(l)?y6(C,l,t,e,f,u,Q,d):pe.isIterable(l)?bP(C,l,t,e,f,u,Q,d):oe(!1),!0}o(h6,"writeH1");function y6(t,e,r,n,i,s,a,c){oe(s!==0||r[Kt]===0,"stream body cannot be pipelined");let l=!1,A=new Dd({abort:t,socket:i,request:n,contentLength:s,client:r,expectsPayload:c,header:a}),u=o(function(C){if(!l)try{!A.write(C)&&this.pause&&this.pause()}catch(Q){pe.destroy(this,Q)}},"onData"),d=o(function(){l||e.resume&&e.resume()},"onDrain"),g=o(function(){if(queueMicrotask(()=>{e.removeListener("error",f)}),!l){let C=new QP;queueMicrotask(()=>f(C))}},"onClose"),f=o(function(C){if(!l){if(l=!0,oe(i.destroyed||i[As]&&r[Kt]<=1),i.off("drain",d).off("error",f),e.removeListener("data",u).removeListener("end",f).removeListener("close",g),!C)try{A.end()}catch(Q){C=Q}A.destroy(C),C&&(C.code!=="UND_ERR_INFO"||C.message!=="reset")?pe.destroy(e,C):pe.destroy(e)}},"onFinished");e.on("data",u).on("end",f).on("error",f).on("close",g),e.resume&&e.resume(),i.on("drain",d).on("error",f),e.errorEmitted??e.errored?setImmediate(()=>f(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>f(null)),(e.closeEmitted??e.closed)&&setImmediate(g)}o(y6,"writeStream");function IP(t,e,r,n,i,s,a,c){try{e?pe.isBuffer(e)&&(oe(s===e.byteLength,"buffer body must have content length"),i.cork(),i.write(`${a}content-length: ${s}\r
|
||||
\r
|
||||
`,"latin1"),i.write(e),i.uncork(),n.onBodySent(e),!c&&n.reset!==!1&&(i[yr]=!0)):s===0?i.write(`${a}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):(oe(s===null,"no body must not have content length"),i.write(`${a}\r
|
||||
`,"latin1")),n.onRequestSent(),r[ls]()}catch(l){t(l)}}o(IP,"writeBuffer");async function C6(t,e,r,n,i,s,a,c){oe(s===e.size,"blob body must have content length");try{if(s!=null&&s!==e.size)throw new so;let l=Buffer.from(await e.arrayBuffer());i.cork(),i.write(`${a}content-length: ${s}\r
|
||||
\r
|
||||
`,"latin1"),i.write(l),i.uncork(),n.onBodySent(l),n.onRequestSent(),!c&&n.reset!==!1&&(i[yr]=!0),r[ls]()}catch(l){t(l)}}o(C6,"writeBlob");async function bP(t,e,r,n,i,s,a,c){oe(s!==0||r[Kt]===0,"iterator body cannot be pipelined");let l=null;function A(){if(l){let g=l;l=null,g()}}o(A,"onDrain");let u=o(()=>new Promise((g,f)=>{oe(l===null),i[an]?f(i[an]):l=g}),"waitForDrain");i.on("close",A).on("drain",A);let d=new Dd({abort:t,socket:i,request:n,contentLength:s,client:r,expectsPayload:c,header:a});try{for await(let g of e){if(i[an])throw i[an];d.write(g)||await u()}d.end()}catch(g){d.destroy(g)}finally{i.off("close",A).off("drain",A)}}o(bP,"writeIterable");var Dd=class{static{o(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:i,client:s,expectsPayload:a,header:c}){this.socket=r,this.request=n,this.contentLength=i,this.client=s,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[As]=!0}write(e){let{socket:r,request:n,contentLength:i,client:s,bytesWritten:a,expectsPayload:c,header:l}=this;if(r[an])throw r[an];if(r.destroyed)return!1;let A=Buffer.byteLength(e);if(!A)return!0;if(i!==null&&a+A>i){if(s[eE])throw new so;process.emitWarning(new so)}r.cork(),a===0&&(!c&&n.reset!==!1&&(r[yr]=!0),i===null?r.write(`${l}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${l}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1")),i===null&&r.write(`\r
|
||||
${A.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=A;let u=r.write(e);return r.uncork(),n.onBodySent(e),u||r[dt].timeout&&r[dt].timeoutType===Qa&&r[dt].timeout.refresh&&r[dt].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:n,bytesWritten:i,expectsPayload:s,header:a,request:c}=this;if(c.onRequestSent(),e[As]=!1,e[an])throw e[an];if(!e.destroyed){if(i===0?s?e.write(`${a}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):e.write(`${a}\r
|
||||
`,"latin1"):r===null&&e.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),r!==null&&i!==r){if(n[eE])throw new so;process.emitWarning(new so)}e[dt].timeout&&e[dt].timeoutType===Qa&&e[dt].timeout.refresh&&e[dt].timeout.refresh(),n[ls]()}}destroy(e){let{socket:r,client:n,abort:i}=this;r[As]=!1,e&&(oe(n[Kt]<=1,"pipeline should only contain this request"),i(e))}};SP.exports=m6});var MP=h((nqe,OP)=>{"use strict";var cn=require("node:assert"),{pipeline:E6}=require("node:stream"),we=Ee(),{RequestContentLengthMismatchError:iE,RequestAbortedError:vP,SocketError:Jl,InformationalError:sE}=_e(),{kUrl:Td,kReset:Md,kClient:wa,kRunning:kd,kPending:B6,kQueue:us,kPendingIdx:oE,kRunningIdx:Dn,kError:On,kSocket:Lt,kStrictContentLength:I6,kOnError:aE,kMaxConcurrentStreams:TP,kHTTP2Session:Tn,kResume:ds,kSize:b6,kHTTPContext:Q6}=tt(),Ui=Symbol("open streams"),RP,_P=!1,Od;try{Od=require("node:http2")}catch{Od={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:w6,HTTP2_HEADER_METHOD:N6,HTTP2_HEADER_PATH:S6,HTTP2_HEADER_SCHEME:x6,HTTP2_HEADER_CONTENT_LENGTH:v6,HTTP2_HEADER_EXPECT:R6,HTTP2_HEADER_STATUS:_6}}=Od;function P6(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let i of n)e.push(Buffer.from(r),Buffer.from(i));else e.push(Buffer.from(r),Buffer.from(n));return e}o(P6,"parseH2Headers");async function D6(t,e){t[Lt]=e,_P||(_P=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=Od.connect(t[Td],{createConnection:()=>e,peerMaxConcurrentStreams:t[TP]});r[Ui]=0,r[wa]=t,r[Lt]=e,we.addListener(r,"error",O6),we.addListener(r,"frameError",M6),we.addListener(r,"end",k6),we.addListener(r,"goaway",L6),we.addListener(r,"close",function(){let{[wa]:i}=this,{[Lt]:s}=i,a=this[Lt][On]||this[On]||new Jl("closed",we.getSocketInfo(s));if(i[Tn]=null,i.destroyed){cn(i[B6]===0);let c=i[us].splice(i[Dn]);for(let l=0;l<c.length;l++){let A=c[l];we.errorRequest(i,A,a)}}}),r.unref(),t[Tn]=r,e[Tn]=r,we.addListener(e,"error",function(i){cn(i.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[On]=i,this[wa][aE](i)}),we.addListener(e,"end",function(){we.destroy(this,new Jl("other side closed",we.getSocketInfo(this)))}),we.addListener(e,"close",function(){let i=this[On]||new Jl("closed",we.getSocketInfo(this));t[Lt]=null,this[Tn]!=null&&this[Tn].destroy(i),t[oE]=t[Dn],cn(t[kd]===0),t.emit("disconnect",t[Td],[t],i),t[ds]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...i){return U6(t,...i)},resume(){T6(t)},destroy(i,s){n?queueMicrotask(s):e.destroy(i).on("close",s)},get destroyed(){return e.destroyed},busy(){return!1}}}o(D6,"connectH2");function T6(t){let e=t[Lt];e?.destroyed===!1&&(t[b6]===0&&t[TP]===0?(e.unref(),t[Tn].unref()):(e.ref(),t[Tn].ref()))}o(T6,"resumeH2");function O6(t){cn(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Lt][On]=t,this[wa][aE](t)}o(O6,"onHttp2SessionError");function M6(t,e,r){if(r===0){let n=new sE(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[Lt][On]=n,this[wa][aE](n)}}o(M6,"onHttp2FrameError");function k6(){let t=new Jl("other side closed",we.getSocketInfo(this[Lt]));this.destroy(t),we.destroy(this[Lt],t)}o(k6,"onHttp2SessionEnd");function L6(t){let e=this[On]||new Jl(`HTTP/2: "GOAWAY" frame received with code ${t}`,we.getSocketInfo(this)),r=this[wa];if(r[Lt]=null,r[Q6]=null,this[Tn]!=null&&(this[Tn].destroy(e),this[Tn]=null),we.destroy(this[Lt],e),r[Dn]<r[us].length){let n=r[us][r[Dn]];r[us][r[Dn]++]=null,we.errorRequest(r,n,e),r[oE]=r[Dn]}cn(r[kd]===0),r.emit("disconnect",r[Td],[r],e),r[ds]()}o(L6,"onHTTP2GoAway");function F6(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}o(F6,"shouldSendContentLength");function U6(t,e){let r=t[Tn],{method:n,path:i,host:s,upgrade:a,expectContinue:c,signal:l,headers:A}=e,{body:u}=e;if(a)return we.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let d={};for(let L=0;L<A.length;L+=2){let W=A[L+0],de=A[L+1];if(Array.isArray(de))for(let le=0;le<de.length;le++)d[W]?d[W]+=`,${de[le]}`:d[W]=de[le];else d[W]=de}let g,{hostname:f,port:C}=t[Td];d[w6]=s||`${f}${C?`:${C}`:""}`,d[N6]=n;let Q=o(L=>{e.aborted||e.completed||(L=L||new vP,we.errorRequest(t,e,L),g!=null&&we.destroy(g,L),we.destroy(u,L),t[us][t[Dn]++]=null,t[ds]())},"abort");try{e.onConnect(Q)}catch(L){we.errorRequest(t,e,L)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),g=r.request(d,{endStream:!1,signal:l}),g.id&&!g.pending?(e.onUpgrade(null,null,g),++r[Ui],t[us][t[Dn]++]=null):g.once("ready",()=>{e.onUpgrade(null,null,g),++r[Ui],t[us][t[Dn]++]=null}),g.once("close",()=>{r[Ui]-=1,r[Ui]===0&&r.unref()}),!0;d[S6]=i,d[x6]="https";let x=n==="PUT"||n==="POST"||n==="PATCH";u&&typeof u.read=="function"&&u.read(0);let w=we.bodyLength(u);if(we.isFormDataLike(u)){RP??=Ba().extractBody;let[L,W]=RP(u);d["content-type"]=W,u=L.stream,w=L.length}if(w==null&&(w=e.contentLength),(w===0||!x)&&(w=null),F6(n)&&w>0&&e.contentLength!=null&&e.contentLength!==w){if(t[I6])return we.errorRequest(t,e,new iE),!1;process.emitWarning(new iE)}w!=null&&(cn(u,"n
Line truncated
|
||||
`,this[dZ]=l??3e5,this[uZ]=i??3e5,this[pZ]=v??!0,this[mZ]=L,this[uE]=de,this[ms]=null,this[CZ]=De>-1?De:-1,this[BZ]=$e??100,this[It]=null,this[Mn]=[],this[Hi]=0,this[kn]=0,this[$l]=je=>pE(this,je),this[EZ]=je=>VP(this,je)}get pipelining(){return this[qd]}set pipelining(e){this[qd]=e,this[$l](!0)}get[eA](){return this[Mn].length-this[kn]}get[Zl](){return this[kn]-this[Hi]}get[Xl](){return this[Mn].length-this[Hi]}get[iZ](){return!!this[It]&&!this[Sa]&&!this[It].destroyed}get[AE](){return!!(this[It]?.busy(null)||this[Xl]>=(JP(this)||1)||this[eA]>0)}[nZ](e){WP(this),this.once("connect",e)}[yZ](e,r){let n=e.origin||this[oi].origin,i=new $6(n,e,r);return this[Mn].push(i),this[ao]||(oo.bodyLength(i.body)==null&&oo.isIterable(i.body)?(this[ao]=1,queueMicrotask(()=>pE(this))):this[$l](!0)),this[ao]&&this[gs]!==2&&this[AE]&&(this[gs]=2),this[gs]<2}async[fZ](){return new Promise(e=>{this[Xl]?this[ms]=e:e(null)})}async[hZ](e){return new Promise(r=>{let n=this[Mn].splice(this[kn]);for(let s=0;s<n.length;s++){let a=n[s];oo.errorRequest(this,a,e)}let i=o(()=>{this[ms]&&(this[ms](),this[ms]=null),r(null)},"callback");this[It]?(this[It].destroy(e,i),this[It]=null):queueMicrotask(i),this[$l]()})}},QZ=Ud();function VP(t,e){if(t[Zl]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){qi(t[kn]===t[Hi]);let r=t[Mn].splice(t[Hi]);for(let n=0;n<r.length;n++){let i=r[n];oo.errorRequest(t,i,e)}qi(t[Xl]===0)}}o(VP,"onError");async function WP(t){qi(!t[Sa]),qi(!t[It]);let{host:e,hostname:r,protocol:n,port:i}=t[oi];if(r[0]==="["){let s=r.indexOf("]");qi(s!==-1);let a=r.substring(1,s);qi(YP.isIP(a)),r=a}t[Sa]=!0,Na.beforeConnect.hasSubscribers&&Na.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:i,version:t[It]?.version,servername:t[ps],localAddress:t[Kl]},connector:t[Wl]});try{let s=await new Promise((a,c)=>{t[Wl]({host:e,hostname:r,protocol:n,port:i,servername:t[ps],localAddress:t[Kl]},(l,A)=>{l?c(l):a(A)})});if(t.destroyed){oo.destroy(s.on("error",jP),new eZ);return}qi(s);try{t[It]=s.alpnProtocol==="h2"?await bZ(t,s):await IZ(t,s)}catch(a){throw s.destroy().on("error",jP),a}t[Sa]=!1,s[gZ]=0,s[uE]=t[uE],s[rZ]=t,s[oZ]=null,Na.connected.hasSubscribers&&Na.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:i,version:t[It]?.version,servername:t[ps],localAddress:t[Kl]},connector:t[Wl],socket:s}),t.emit("connect",t[oi],[t])}catch(s){if(t.destroyed)return;if(t[Sa]=!1,Na.connectError.hasSubscribers&&Na.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:i,version:t[It]?.version,servername:t[ps],localAddress:t[Kl]},connector:t[Wl],error:s}),s.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(qi(t[Zl]===0);t[eA]>0&&t[Mn][t[kn]].servername===t[ps];){let a=t[Mn][t[kn]++];oo.errorRequest(t,a,s)}else VP(t,s);t.emit("connectionError",t[oi],[t],s)}t[$l]()}o(WP,"connect");function GP(t){t[gs]=0,t.emit("drain",t[oi],[t])}o(GP,"emitDrain");function pE(t,e){t[ao]!==2&&(t[ao]=2,wZ(t,e),t[ao]=0,t[Hi]>256&&(t[Mn].splice(0,t[Hi]),t[kn]-=t[Hi],t[Hi]=0))}o(pE,"resume");function wZ(t,e){for(;;){if(t.destroyed){qi(t[eA]===0);return}if(t[ms]&&!t[Xl]){t[ms](),t[ms]=null;return}if(t[It]&&t[It].resume(),t[AE])t[gs]=2;else if(t[gs]===2){e?(t[gs]=1,queueMicrotask(()=>GP(t))):GP(t);continue}if(t[eA]===0||t[Zl]>=(JP(t)||1))return;let r=t[Mn][t[kn]];if(t[oi].protocol==="https:"&&t[ps]!==r.servername){if(t[Zl]>0)return;t[ps]=r.servername,t[It]?.destroy(new Z6("servername changed"),()=>{t[It]=null,pE(t)})}if(t[Sa])return;if(!t[It]){WP(t);return}if(t[It].destroyed||t[It].busy(r))return;!r.aborted&&t[It].write(r)?t[kn]++:t[Mn].splice(t[kn],1)}}o(wZ,"_resume");KP.exports=dE});var mE=h((dqe,$P)=>{"use strict";var Hd=class{static{o(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};$P.exports=class{static{o(this,"FixedQueue")}constructor(){this.head=this.tail=new Hd}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new Hd),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var ZP=h((mqe,XP)=>{var{kFree:NZ,kConnected:SZ,kPending:xZ,kQueued:vZ,kRunning:RZ,kSize:_Z}=tt(),co=Symbol("pool"),gE=class{static{o(this,"PoolStats")}constructor(e){this[co]=e}get connected(){return this[co][SZ]}get free(){return this[co][NZ]}get pending(){return this[co][xZ]}get queued(){return this[co][vZ]}get running(){return this[co][RZ]}get size(){return this[co][_Z]}};XP.exports=gE});var BE=h((fqe,lD)=>{"use strict";var PZ=da(),DZ=mE(),{kConnected:fE,kSize:eD,kRunning:tD,kPending:rD,kQueued:tA,kBusy:TZ,kFree:OZ,kUrl:MZ,kClose:kZ,kDestroy:LZ,kDispatch:FZ}=tt(),UZ=ZP(),Cr=Symbol("clients"),Ar=Symbol("needDrain"),rA=Symbol("qu
Line truncated
|
||||
${n.count} ${n.noun} ${n.is} pending:
|
||||
|
||||
${e.format(r)}
|
||||
`.trim())}};gO.exports=BB});var op=h((m1e,EO)=>{"use strict";var hO=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:dte}=_e(),pte=Ra();CO()===void 0&&yO(new pte);function yO(t){if(!t||typeof t.dispatch!="function")throw new dte("Argument agent must implement Agent");Object.defineProperty(globalThis,hO,{value:t,writable:!0,enumerable:!1,configurable:!1})}o(yO,"setGlobalDispatcher");function CO(){return globalThis[hO]}o(CO,"getGlobalDispatcher");EO.exports={setGlobalDispatcher:yO,getGlobalDispatcher:CO}});var ap=h((h1e,BO)=>{"use strict";BO.exports=class{static{o(this,"DecoratorHandler")}#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var bO=h((C1e,IO)=>{"use strict";var mte=Fd();IO.exports=t=>{let e=t?.maxRedirections;return r=>o(function(i,s){let{maxRedirections:a=e,...c}=i;if(!a)return r(i,s);let l=new mte(r,a,i,s);return r(c,l)},"redirectInterceptor")}});var wO=h((B1e,QO)=>{"use strict";var gte=Kd();QO.exports=t=>e=>o(function(n,i){return e(n,new gte({...n,retryOptions:{...t,...n.retryOptions}},{handler:i,dispatch:e}))},"retryInterceptor")});var SO=h((b1e,NO)=>{"use strict";var fte=Ee(),{InvalidArgumentError:hte,RequestAbortedError:yte}=_e(),Cte=ap(),IB=class extends Cte{static{o(this,"DumpHandler")}#e=1024*1024;#t=null;#i=!1;#n=!1;#r=0;#s=null;#o=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new hte("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#o=r}onConnect(e){this.#t=e,this.#o.onConnect(this.#a.bind(this))}#a(e){this.#n=!0,this.#s=e}onHeaders(e,r,n,i){let a=fte.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new yte(`Response size (${a}) larger than maxSize (${this.#e})`);return this.#n?!0:this.#o.onHeaders(e,r,n,i)}onError(e){this.#i||(e=this.#s??e,this.#o.onError(e))}onData(e){return this.#r=this.#r+e.length,this.#r>=this.#e&&(this.#i=!0,this.#n?this.#o.onError(this.#s):this.#o.onComplete([])),!0}onComplete(e){if(!this.#i){if(this.#n){this.#o.onError(this.reason);return}this.#o.onComplete(e)}}};function Ete({maxSize:t}={maxSize:1024*1024}){return e=>o(function(n,i){let{dumpMaxSize:s=t}=n,a=new IB({maxSize:s},i);return e(n,a)},"Intercept")}o(Ete,"createDumpInterceptor");NO.exports=Ete});var RO=h((w1e,vO)=>{"use strict";var{isIP:Bte}=require("node:net"),{lookup:Ite}=require("node:dns"),bte=ap(),{InvalidArgumentError:Ua,InformationalError:Qte}=_e(),xO=Math.pow(2,31)-1,bB=class{static{o(this,"DNSInstance")}#e=0;#t=0;#i=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#n,this.pick=e.pick??this.#r}get full(){return this.#i.size===this.#t}runLookup(e,r,n){let i=this.#i.get(e.hostname);if(i==null&&this.full){n(null,e.origin);return}let s={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(i==null)this.lookup(e,s,(a,c)=>{if(a||c==null||c.length===0){n(a??new Qte("No DNS entries found"));return}this.setRecords(e,c);let l=this.#i.get(e.hostname),A=this.pick(e,l,s.affinity),u;typeof A.port=="number"?u=`:${A.port}`:e.port!==""?u=`:${e.port}`:u="",n(null,`${e.protocol}//${A.family===6?`[${A.address}]`:A.address}${u}`)});else{let a=this.pick(e,i,s.affinity);if(a==null){this.#i.delete(e.hostname),this.runLookup(e,r,n);return}let c;typeof a.port=="number"?c=`:${a.port}`:e.port!==""?c=`:${e.port}`:c="",n(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${c}`)}}#n(e,r,n){Ite(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(i,s)=>{if(i)return n(i);let a=new Map;for(let c of s)a.set(`${c.address}:${c.family}`,c);n(null,a.values())})}#r(e,r,n){let i=null,{records:s,offset:a}=r,c;if(this.dualStack?(n==null&&(a==null||a===xO?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),s[n]!=null&&s[n].ips.length>0?c=s[n]:c=s[n===4?6:4]):c=s[n],c==null||c.ips.length===0)return i;c.offset==null||c.offset===xO?c.offset=0:c.offset++;let l=c.offset%c.ips.length;return i=c.ips[l]??null,i==null?i:Date.now()-i.timestamp>i.ttl?(c.ips.splice(l,1),this.pick(e,r,n)):i}setRecords(e,r){let n=Date.now(),i={records:{4:null,6:null}};for(let s of r){s.timestamp=n,typeof s.ttl=="number"?s.ttl=Math.min(s.ttl,this.#e):s.ttl=this.#e;let a=i.records[s.family]??{ips:[]};a.ips.push(s),i.records[s.family]=a}this.#i.set(e.hostname,i)}getHandler(e,r){return new QB(this,e,r)}},QB=class extends bte{static{o(this,"DNSDispatchHandler")}#e=null;#t=null;#i=null
Line truncated
|
||||
${s}`;break;case"retry":lL(s)&&(r[i]=s);break;case"id":AL(s)&&(r[i]=s);break;case"event":s.length>0&&(r[i]=s);break}}processEvent(e){e.retry&&lL(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&AL(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};uL.exports={EventSourceStream:lI}});var EL=h((xHe,CL)=>{"use strict";var{pipeline:Pse}=require("node:stream"),{fetching:Dse}=gA(),{makeRequest:Tse}=za(),{webidl:Ji}=Yt(),{EventSourceStream:Ose}=dL(),{parseMIMEType:Mse}=hr(),{createFastMessageEvent:kse}=Wa(),{isNetworkError:pL}=pA(),{delay:Lse}=aI(),{kEnumerableProperty:Qo}=Ee(),{environmentSettingsObject:mL}=Tr(),gL=!1,fL=3e3,SA=0,hL=1,xA=2,Fse="anonymous",Use="use-credentials",ec=class t extends EventTarget{static{o(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#i=!1;#n=SA;#r=null;#s=null;#o;#a;constructor(e,r={}){super(),Ji.util.markAsUncloneable(this);let n="EventSource constructor";Ji.argumentLengthCheck(arguments,1,n),gL||(gL=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Ji.converters.USVString(e,n,"url"),r=Ji.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#o=r.dispatcher,this.#a={lastEventId:"",reconnectionTime:fL};let i=mL,s;try{s=new URL(e,i.settingsObject.baseUrl),this.#a.origin=s.origin}catch(l){throw new DOMException(l,"SyntaxError")}this.#t=s.href;let a=Fse;r.withCredentials&&(a=Use,this.#i=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=mL.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#t)],this.#r=Tse(c),this.#c()}get readyState(){return this.#n}get url(){return this.#t}get withCredentials(){return this.#i}#c(){if(this.#n===xA)return;this.#n=SA;let e={request:this.#r,dispatcher:this.#o},r=o(n=>{pL(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#l()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(pL(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#l();return}let i=n.headersList.get("content-type",!0),s=i!==null?Mse(i):"failure",a=s!=="failure"&&s.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#n=hL,this.dispatchEvent(new Event("open")),this.#a.origin=n.urlList[n.urlList.length-1].origin;let c=new Ose({eventSourceSettings:this.#a,push:l=>{this.dispatchEvent(kse(l.type,l.options))}});Pse(n.body.stream,c,l=>{l?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#s=Dse(e)}async#l(){this.#n!==xA&&(this.#n=SA,this.dispatchEvent(new Event("error")),await Lse(this.#a.reconnectionTime),this.#n===SA&&(this.#a.lastEventId.length&&this.#r.headersList.set("last-event-id",this.#a.lastEventId,!0),this.#c()))}close(){Ji.brandCheck(this,t),this.#n!==xA&&(this.#n=xA,this.#s.abort(),this.#r=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},yL={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:SA,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:hL,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:xA,writable:!1}};Object.defineProperties(ec,yL);Object.defineProperties(ec.prototype,yL);Object.defineProperties(ec.prototype,{close:Qo,onerror:Qo,onmessage:Qo,onopen:Qo,readyState:Qo,url:Qo,withCredentials:Qo});Ji.converters.EventSourceInitDict=Ji.dictionaryConverter([{key:"withCredentials",converter:Ji.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:Ji.converters.any}]);CL.exports={EventSource:ec,defaultReconnectionTime:fL}});var QL=h((RHe,ce)=>{"use strict";var qse=xa(),BL=Dl(),Hse=va(),zse=yD(),jse=Ra(),Gse=TE(),Yse=HD(),Jse=VD(),IL=_e(),Wp=Ee(),{InvalidArgumentError:Vp}=IL,tc=TT(),Vse=Ol(),Wse=gB(),Kse=fO(),$se=yB(),Xse=rB(),Zse=Kd(),{getGlobalDispatcher:bL,setGlobalDispatcher:eoe}=op(),toe=ap(),roe=Fd(),noe=Ud();Object.assign(BL.prototype,tc);ce.exports.Dispatcher=BL;ce.exports.Client=qse;ce.exports.Pool=Hse;ce.exports.BalancedPool=zse;ce.exports.Agent=jse;ce.exports.ProxyAgent=Gse;ce.exports.En
Line truncated
|
||||
|
||||
Error Code : ${s.statusCode}
|
||||
Error Code : ${a.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 qh(this,void 0,void 0,function*(){try{let a=t.getIDTokenUrl();if(e){let r=encodeURIComponent(e);a=`${a}&audience=${r}`}(0,zh.debug)(`ID token url is ${a}`);let i=yield t.getCall(a);return(0,zh.setSecret)(i),i}catch(a){throw new Error(`Error message: ${a.message}`)}})}};an.OidcClient=mm});var gm=T(Ht=>{"use strict";var um=Ht&&Ht.__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(Ht,"__esModule",{value:!0});Ht.summary=Ht.markdownSummary=Ht.SUMMARY_DOCS_URL=Ht.SUMMARY_ENV_VAR=void 0;var bN=require("os"),fm=require("fs"),{access:xN,appendFile:wN,writeFile:NN}=fm.promises;Ht.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";Ht.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var hm=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[Ht.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${Ht.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield xN(e,fm.constants.R_OK|fm.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?NN:wN)(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(bN.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()}},kh=new hm;Ht.markdownSummary=kh;Ht.summary=kh});var jh=T(Ft=>{"use strict";var _N=Ft&&Ft.__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]}),SN=Ft&&Ft.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),EN=Ft&&Ft.__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)&&_N(e,t,a);return SN(e,t),e};Object.defineProperty(Ft,"__esModule",{value:!0});Ft.toPlatformPath=Ft.toWin32Path=Ft.toPosixPath=void 0;var CN=EN(require("path"));function TN(t){return t.replace(/[\\]/g,"/")}o(TN,"toPosixPath");Ft.toPosixPath=TN;function ON(t){return t.replace(/[/]/g,"\\")}o(ON,"toWin32Path");Ft.toWin32Path=ON;function PN(t){return t.replace(/[/\\]/g,CN.sep)}o(PN,"toPlatformPath");Ft.toPlatformPath=PN});var vm=T(J=>{"use strict";var RN=J&&J.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Line truncated
|
||||
`);return{name:e,version:a}}),"getLinuxInfo");fe.platform=r6.default.platform();fe.arch=r6.default.arch();fe.isWindows=fe.platform==="win32";fe.isMacOS=fe.platform==="darwin";fe.isLinux=fe.platform==="linux";function p_(){return Cp(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield fe.isWindows?n_():fe.isMacOS?s_():o_()),{platform:fe.platform,arch:fe.arch,isWindows:fe.isWindows,isMacOS:fe.isMacOS,isLinux:fe.isLinux})})}o(p_,"getDetails");fe.getDetails=p_});var Ut=T(X=>{"use strict";var d_=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]}),l_=X&&X.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_m=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)&&d_(e,t,a);return l_(e,t),e},s6=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 ma=Sh(),gr=Th(),nn=mp(),o6=_m(require("os")),c_=_m(require("path")),m_=Lh(),Nm;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(Nm||(X.ExitCode=Nm={}));function u_(t,e){let a=(0,nn.toCommandValue)(e);if(process.env[t]=a,process.env.GITHUB_ENV||"")return(0,gr.issueFileCommand)("ENV",(0,gr.prepareKeyValueMessage)(t,e));(0,ma.issueCommand)("set-env",{name:t},a)}o(u_,"exportVariable");X.exportVariable=u_;function f_(t){(0,ma.issueCommand)("add-mask",{},t)}o(f_,"setSecret");X.setSecret=f_;function h_(t){process.env.GITHUB_PATH||""?(0,gr.issueFileCommand)("PATH",t):(0,ma.issueCommand)("add-path",{},t),process.env.PATH=`${t}${c_.delimiter}${process.env.PATH}`}o(h_,"addPath");X.addPath=h_;function Sm(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(Sm,"getInput");X.getInput=Sm;function g_(t,e){let a=Sm(t,e).split(`
|
||||
`).filter(i=>i!=="");return e&&e.trimWhitespace===!1?a:a.map(i=>i.trim())}o(g_,"getMultilineInput");X.getMultilineInput=g_;function y_(t,e){let a=["true","True","TRUE"],i=["false","False","FALSE"],r=Sm(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(y_,"getBooleanInput");X.getBooleanInput=y_;function v_(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,gr.issueFileCommand)("OUTPUT",(0,gr.prepareKeyValueMessage)(t,e));process.stdout.write(o6.EOL),(0,ma.issueCommand)("set-output",{name:t},(0,nn.toCommandValue)(e))}o(v_,"setOutput");X.setOutput=v_;function b_(t){(0,ma.issue)("echo",t?"on":"off")}o(b_,"setCommandEcho");X.setCommandEcho=b_;function x_(t){process.exitCode=Nm.Failure,p6(t)}o(x_,"setFailed");X.setFailed=x_;function w_(){return process.env.RUNNER_DEBUG==="1"}o(w_,"isDebug");X.isDebug=w_;function N_(t){(0,ma.issueCommand)("debug",{},t)}o(N_,"debug");X.debug=N_;function p6(t,e={}){(0,ma.issueCommand)("error",(0,nn.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(p6,"error");X.error=p6;function __(t,e={}){(0,ma.issueCommand)("warning",(0,nn.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(__,"warning");X.warning=__;function S_(t,e={}){(0,ma.issueCommand)("notice",(0,nn.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(S_,"notice");X.notice=S_;function E_(t){process.stdout.write(t+o6.EOL)}o(E_,"info");X.info=E_;function d6(t){(0,ma.issue)("group",t)}o(d6,"startGroup");X.startGroup=d6;function l6(){(0,ma.issue)("endgroup")}o(l6,"endGroup");X.endGroup=l6;function C_(t,e){return s6(this,void 0,void 0,function*(){d6(t);let a;try{a=yield e()}finally{l6()}return a})}o(C_,"group");X.group=C_;function T_(t,e){if(process.env.GITHUB_STATE||"")return(0,gr.issueFileCommand)("STATE",(0,gr.prepareKeyValueMessage)(t,e));(0,ma.issueCommand)("save-state",{name:t},(0,nn.toCommandValue)(e))}o(T_,"saveState");X.saveState=T_;function O_(t){return process.env[`STATE_${t}`]||""}o(O_,"getState");X.getState=O_;function P_(t){return s6(this,void 0,void 0,function*(){return yield m_.OidcClient.getIDToken(t)})}o(P_,"getIDToken");X.getIDToken=P_;var R_=gm();Object.defineProperty(X,"summary",{enumerable:!0,get:function(){return R_.summary}});var D_=gm();Object.defineProperty(X,"markdownSummary",{enumerable:!0,get:function(){return D_.markdownSummary}});var Em=jh();Object.defineProperty(X,"toPosixPath",{enumerable:!0,get:function(){return Em.toPosixPath}});Object.defineProperty(X,"toWin32Path",{enumerable:!0,get:function(){return Em.toWin32Path}});Object.defineProperty(X,"toPlatformPath",{enumerable:!0,get:function(){return Em.toPlatformPath}});X.platform=_m(n6())});var c6=T($a=>{"use strict";var I_=$a&&$a.__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]}),B_=$a&&$a.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),A_=$a&&$a.__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)&&I_(e,t,a);return B_(e,t),e};Object.defineProperty($a,"__esModule",{value:!0});$a.getOptions=void 0;var Cm=A_(Ut());function M_(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,omitBrokenSymbolicLinks:!0};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,Cm.debug(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,Cm.debug(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,Cm.debug(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`))),e}o(M_,"getOptions");$a.getOptions=M_});var Op=T(He=>{"use strict";var q_=He&&He.__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]}),z_=He&&He.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),L_=He&&He.__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)&&q_(e,t,a);return z_(e,t),e},k_=He&&He.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(He,"__esModule",{value:!0});He.safeTrimTrailingSeparator=He.normalizeSeparators=He.hasRoot=He.hasAbsoluteRoot=He.ensureAbsoluteRoot=He.dirname=void 0;var Tp=L_(require("path")),yr=k_(require("assert")),qi=process.platform==="win32";function j_(t){if(t=Om(t),qi&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(t))return t;let e=Tp.dirname(t);return qi&&/^\\\\[^\\]+\\[^\\]+\\$/.test(e)&&(e=Om(e)),e}o(j_,"dirname");He.dirname=j_;function U_(t,e){if(yr.default(t,"ensureAbsoluteRoot parameter 'root' must not be empty"),yr.default(e,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),Tm(e))return e;if(qi){if(e.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let a=process.cwd();rLine truncated
|
||||
%s`,g,g,D,i);var _=D.type==="*"?Im:D.type==="?"?Dm:"\\"+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),j=i.slice(I.reEnd);A+=j;var oe=E.split("(").length-1,he=j;for(b=0;b<oe;b++)he=he.replace(/\)[+*?]?/,"");j=he;var Q="";j===""&&e!==Rp&&(Q="$");var et=E+R+j+Q+A;i=et}if(i!==""&&r&&(i="(?=.)"+i),O&&(i=u+i),e===Rp)return[i,r];if(!r)return gS(t);var ue=a.nocase?"i":"";try{var Oa=new RegExp("^"+i+"$",ue)}catch{return new RegExp("$.")}return Oa._glob=t,Oa._src=i,Oa}o(fS,"parse");aa.makeRe=function(t,e){return new Ot(t,e||{}).makeRe()};Ot.prototype.makeRe=hS;function hS(){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?Im:e.dot?oS:pS,i=e.nocase?"i":"",r=t.map(function(n){return n.map(function(s){return s===Bm?a:typeof s=="string"?yS(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(hS,"makeRe");aa.match=function(t,e,a){a=a||{};var i=new Ot(e,a);return t=t.filter(function(r){return i.match(r)}),i.options.nonull&&!t.length&&t.push(e),t};Ot.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;Ms.sep!=="/"&&(e=e.split(Ms.sep).join("/")),e=e.split(I6),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");Ot.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===Bm){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 gS(t){return t.replace(/\\(.)/g,"$1")}o(gS,"globUnescape");function yS(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}o(yS,"regExpEscape")});var z6=T(ua=>{"use strict";var vS=ua&&ua.__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]}),bS=ua&&ua.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),q6=ua&&ua.__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)&&vS(e,t,a);return bS(e,t),e},xS=ua&&ua.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ua,"__esModule",{value:!0});ua.Path=void 0;var qs=q6(require("path")),Li=q6(Op()),zs=xS(require("assert")),wS=process.platform==="win32",Am=class{static{o(this,"Path")}constructor(e){if(this.segments=[],typeof e=="string")if(zs.default(e,"Parameter 'itemPath' must not be empty"),e=Li.safeTrimTrailingSeparator(e),!Li.hasRoot(e))this.segments=e.split(qs.sep);else{let a=e,i=Li.dirname(a);for(;i!==a;){let r=qs.basename(a);this.segments.unshift(r),a=i,i=Li.dirname(a)}this.segments.unshift(a)}else{zs.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let a=0;a<e.length;a++){let i=e[a];zs.default(i,"Parameter 'itemPath' must not contain any empty segments"),i=Li.normalizeSeparators(e[a]),a===0&&Li.hasRoot(i)?(i=Li.safeTrimTrailingSeparator(i),zs.default(i===Li.dirname(i),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(i)):(zs.default(!i.includes(qs.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(i))}}}toString(){let e=this.segments[0],a=e.endsWith(qs.sep)||wS&&/^[A-Z]:$/i.test(e);for(let i=1;i<this.segments.length;i++)a?a=!1:e+=qs.sep,e+=this.segments[i];return e}};ua.Path=Am});var L6=T(fa=>{"use strict";var NS=fa&&fa.__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=fa&&fa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zm=fa&&fa.__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},SS=fa&&fa.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fa,"__esModule",{value:!0});fa.Pattern=void 0;var ES=zm(require("os")),Ls=zm(require("path")),Wt=zm(Op()),vr=SS(require("assert")),CS=M6(),Mm=Pp(),Ip=z6(),li=process.platform==="win32",qm=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||[],vr.default(i.length,"Parameter 'segments' must not empty");let l=t.getLiteral(i[0]);vr.default(l&&Wt.hasAbsoluteRoot(l),"Parameter 'segments' first element must be a root path"),n=new Ip.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 Ip.Path(n).segments,this.trailingSeparator=Wt.normalizeSeparators(n).endsWith(Ls.sep),n=Wt.safeTrimTrailingSeparator(n);let s=!1,p=this.segments.map(l=>t.getLiteral(l)).filter(l=>!s&&!(s=l===""));this.searchPath=new Ip.Path(p).toString(),this.rootRegExp=new RegExp(t.regExpEscape(p[0]),li?"i":""),this.isImplicitPattern=a;let d={dot:!0,nobrace:!0,nocase:li,nocomment:!0,noext:!0,nonegate:!0};n=li?n.replace(/\\/g,"/"):n,this.minimatch=new CS.Minimatch(n,d)}match(e){return this.segments[this.segments.length-1]==="**"?(e=Wt.normalizeSeparators(e),!e.endsWith(Ls.sep)&&this.isImplicitPattern===!1&&(e=`${e}${Ls.sep}`)):e=Wt.safeTrimTrailingSeparator(e),this.minimatch.match(e)?this.trailingSeparator?Mm.MatchKind.Directory:Mm.MatchKind.All:Mm.MatchKind.None}partialMatch(e){return e=Wt.safeTrimTrailingSeparator(e),Wt.dirname(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(li?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(li?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,a){vr.default(e,"pattern cannot be empty");let i=new Ip.Path(e).segments.map(r=>t.getLiteral(r));if(vr.default(i.every((r,n)=>(r!=="."||n===0)&&r!==".."),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`),vr.default(!Wt.hasRoot(e)||i[0],`Invalid pattern '${e}'. Root segment must not contain globs.`),e=Wt.nor
Line truncated
|
||||
Error Message: ${a.message}`)})).result)===null||r===void 0?void 0:r.value;if(!s)throw new Error("Response json body do not have ID Token field");return s})}static getIDToken(e){return NL(this,void 0,void 0,function*(){try{let r=t.getIDTokenUrl();if(e){let i=encodeURIComponent(e);r=`${r}&audience=${i}`}(0,SL.debug)(`ID token url is ${r}`);let n=yield t.getCall(r);return(0,SL.setSecret)(n),n}catch(r){throw new Error(`Error message: ${r.message}`)}})}};rc.OidcClient=hI});var BI=h(br=>{"use strict";var yI=br&&br.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(br,"__esModule",{value:!0});br.summary=br.markdownSummary=br.SUMMARY_DOCS_URL=br.SUMMARY_ENV_VAR=void 0;var _oe=require("os"),CI=require("fs"),{access:Poe,appendFile:Doe,writeFile:Toe}=CI.promises;br.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";br.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var EI=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){return yI(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[br.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${br.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield Poe(e,CI.constants.R_OK|CI.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,r,n={}){let i=Object.entries(n).map(([s,a])=>` ${s}="${a}"`).join("");return r?`<${e}${i}>${r}</${e}>`:`<${e}${i}>`}write(e){return yI(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?Toe:Doe)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return yI(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,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(_oe.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),i=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(i).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",i=e.map(a=>this.wrap("li",a)).join(""),s=this.wrap(n,i);return this.addRaw(s).addEOL()}addTable(e){let r=e.map(i=>{let s=i.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:l,colspan:A,rowspan:u}=a,d=c?"th":"td",g=Object.assign(Object.assign({},A&&{colspan:A}),u&&{rowspan:u});return this.wrap(d,l,g)}).join("");return this.wrap("tr",s)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:i,height:s}=n||{},a=Object.assign(Object.assign({},i&&{width:i}),s&&{height:s}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,i=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",s=this.wrap(i,e);return this.addRaw(s).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,r){let n=Object.assign({},r&&{cite:r}),i=this.wrap("blockquote",e,n);return this.addRaw(i).addEOL()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},vL=new EI;br.markdownSummary=vL;br.summary=vL});var RL=h(Hn=>{"use strict";var Ooe=Hn&&Hn.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Moe=Hn&&Hn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),koe=Hn&&Hn.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Ooe(r,e,n[i]);return Moe(r,e),r}}();Object.defineProperty(Hn,"__esModule",{value:!0});Hn.toPosixPath=Foe;Hn.toWin32Path=Uoe;Hn.toPlatformPath=qoe;var Loe=koe(require("path"));function Foe(t){return t.replace(/[\\]/g,"/")}o(Foe,"toPosixPath");function Uoe(t){return t.replace(/[/]/g,"\\")}o(Uoe,"toWin32Path");function qoe(t){return t.replacLine truncated
|
||||
`);return{name:e,version:r}}),"getLinuxInfo");ve.platform=JL.default.platform();ve.arch=JL.default.arch();ve.isWindows=ve.platform==="win32";ve.isMacOS=ve.platform==="darwin";ve.isLinux=ve.platform==="linux";function Bae(){return cm(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield ve.isWindows?yae():ve.isMacOS?Cae():Eae()),{platform:ve.platform,arch:ve.arch,isWindows:ve.isWindows,isMacOS:ve.isMacOS,isLinux:ve.isLinux})})}o(Bae,"getDetails")});var Zt=h(me=>{"use strict";var Iae=me&&me.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),bae=me&&me.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),xI=me&&me.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Iae(r,e,n[i]);return bae(r,e),r}}(),WL=me&&me.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(me,"__esModule",{value:!0});me.platform=me.toPlatformPath=me.toWin32Path=me.toPosixPath=me.markdownSummary=me.summary=me.ExitCode=void 0;me.exportVariable=Nae;me.setSecret=Sae;me.addPath=xae;me.getInput=vI;me.getMultilineInput=vae;me.getBooleanInput=Rae;me.setOutput=_ae;me.setCommandEcho=Pae;me.setFailed=Dae;me.isDebug=Tae;me.debug=Oae;me.error=$L;me.warning=Mae;me.notice=kae;me.info=Lae;me.startGroup=XL;me.endGroup=ZL;me.group=Fae;me.saveState=Uae;me.getState=qae;me.getIDToken=Hae;var gn=Gv(),No=Vv(),ic=Xu(),KL=xI(require("os")),Qae=xI(require("path")),wae=xL(),SI;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(SI||(me.ExitCode=SI={}));function Nae(t,e){let r=(0,ic.toCommandValue)(e);if(process.env[t]=r,process.env.GITHUB_ENV||"")return(0,No.issueFileCommand)("ENV",(0,No.prepareKeyValueMessage)(t,e));(0,gn.issueCommand)("set-env",{name:t},r)}o(Nae,"exportVariable");function Sae(t){(0,gn.issueCommand)("add-mask",{},t)}o(Sae,"setSecret");function xae(t){process.env.GITHUB_PATH||""?(0,No.issueFileCommand)("PATH",t):(0,gn.issueCommand)("add-path",{},t),process.env.PATH=`${t}${Qae.delimiter}${process.env.PATH}`}o(xae,"addPath");function vI(t,e){let r=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!r)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?r:r.trim()}o(vI,"getInput");function vae(t,e){let r=vI(t,e).split(`
|
||||
`).filter(n=>n!=="");return e&&e.trimWhitespace===!1?r:r.map(n=>n.trim())}o(vae,"getMultilineInput");function Rae(t,e){let r=["true","True","TRUE"],n=["false","False","FALSE"],i=vI(t,e);if(r.includes(i))return!0;if(n.includes(i))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(Rae,"getBooleanInput");function _ae(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,No.issueFileCommand)("OUTPUT",(0,No.prepareKeyValueMessage)(t,e));process.stdout.write(KL.EOL),(0,gn.issueCommand)("set-output",{name:t},(0,ic.toCommandValue)(e))}o(_ae,"setOutput");function Pae(t){(0,gn.issue)("echo",t?"on":"off")}o(Pae,"setCommandEcho");function Dae(t){process.exitCode=SI.Failure,$L(t)}o(Dae,"setFailed");function Tae(){return process.env.RUNNER_DEBUG==="1"}o(Tae,"isDebug");function Oae(t){(0,gn.issueCommand)("debug",{},t)}o(Oae,"debug");function $L(t,e={}){(0,gn.issueCommand)("error",(0,ic.toCommandProperties)(e),t instanceof Error?t.toString():t)}o($L,"error");function Mae(t,e={}){(0,gn.issueCommand)("warning",(0,ic.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(Mae,"warning");function kae(t,e={}){(0,gn.issueCommand)("notice",(0,ic.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(kae,"notice");function Lae(t){process.stdout.write(t+KL.EOL)}o(Lae,"info");function XL(t){(0,gn.issue)("group",t)}o(XL,"startGroup");function ZL(){(0,gn.issue)("endgroup")}o(ZL,"endGroup");function Fae(t,e){return WL(this,void 0,void 0,function*(){XL(t);let r;try{r=yield e()}finally{ZL()}return r})}o(Fae,"group");function Uae(t,e){if(process.env.GITHUB_STATE||"")return(0,No.issueFileCommand)("STATE",(0,No.prepareKeyValueMessage)(t,e));(0,gn.issueCommand)("save-state",{name:t},(0,ic.toCommandValue)(e))}o(Uae,"saveState");function qae(t){return process.env[`STATE_${t}`]||""}o(qae,"getState");function Hae(t){return WL(this,void 0,void 0,function*(){return yield wae.OidcClient.getIDToken(t)})}o(Hae,"getIDToken");var zae=BI();Object.defineProperty(me,"summary",{enumerable:!0,get:function(){return zae.summary}});var jae=BI();Object.defineProperty(me,"markdownSummary",{enumerable:!0,get:function(){return jae.markdownSummary}});var RI=RL();Object.defineProperty(me,"toPosixPath",{enumerable:!0,get:function(){return RI.toPosixPath}});Object.defineProperty(me,"toWin32Path",{enumerable:!0,get:function(){return RI.toWin32Path}});Object.defineProperty(me,"toPlatformPath",{enumerable:!0,get:function(){return RI.toPlatformPath}});me.platform=xI(VL())});var eF=h(Wi=>{"use strict";var Gae=Wi&&Wi.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Yae=Wi&&Wi.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Jae=Wi&&Wi.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Gae(r,e,n[i]);return Yae(r,e),r}}();Object.defineProperty(Wi,"__esModule",{value:!0});Wi.getOptions=Vae;var _A=Jae(Zt());function Vae(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,matchDirectories:!0,omitBrokenSymbolicLinks:!0,excludeHiddenFiles:!1};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,_A.debug(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,_A.debug(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.matchDirectories=="boolean"&&(e.matchDirectories=t.matchDirectories,_A.debug(`matchDirectories '${e.matchDirectories}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,_A.debug(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`)),typeof t.excludeHiddenFiles=="boolean"&&(e.excludeHiddenFiles=t.excludeHiddenFiles,_A.debug(`excludeHiddenFiles '${e.excludeHiddenFiles}'`))),e}o(Vae,"getOptions")});var Am=h(tr=>{"use strict";var Wae=tr&&tr.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Kae=tr&&tr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$ae=tr&&tr.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Wae(r,e,n[i]);return Kae(r,e),r}}(),Xae=tr&&tr.__importDefault||function(t)Line truncated
|
||||
%s`,W,W,v,n);var de=v.type==="*"?MI:v.type==="?"?OI:"\\"+v.type;i=!0,n=n.slice(0,v.reStart)+de+"\\("+W}C(),s&&(n+="\\\\");var le=!1;switch(n.charAt(0)){case"[":case".":case"(":le=!0}for(var De=c.length-1;De>-1;De--){var Te=c[De],qe=n.slice(0,Te.reStart),$e=n.slice(Te.reStart,Te.reEnd-8),ge=n.slice(Te.reEnd-8,Te.reEnd),je=n.slice(Te.reEnd);ge+=je;var Wn=qe.split("(").length-1,_i=je;for(Q=0;Q<Wn;Q++)_i=_i.replace(/\)[+*?]?/,"");je=_i;var Pi="";je===""&&e!==pm&&(Pi="$");var Ty=qe+$e+je+Pi+ge;n=Ty}if(n!==""&&i&&(n="(?=.)"+n),le&&(n=g+n),e===pm)return[n,i];if(!i)return xce(t);var Oy=r.nocase?"i":"";try{var Zs=new RegExp("^"+n+"$",Oy)}catch{return new RegExp("$.")}return Zs._glob=t,Zs._src=n,Zs}o(Nce,"parse");jr.makeRe=function(t,e){return new Jt(t,e||{}).makeRe()};Jt.prototype.makeRe=Sce;function Sce(){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,r=e.noglobstar?MI:e.dot?Cce:Ece,n=e.nocase?"i":"",i=t.map(function(s){return s.map(function(a){return a===kI?r:typeof a=="string"?vce(a):a._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch{this.regexp=!1}return this.regexp}o(Sce,"makeRe");jr.match=function(t,e,r){r=r||{};var n=new Jt(e,r);return t=t.filter(function(i){return n.match(i)}),n.options.nonull&&!t.length&&t.push(e),t};Jt.prototype.match=o(function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;DA.sep!=="/"&&(e=e.split(DA.sep).join("/")),e=e.split(IF),this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var s,a;for(a=e.length-1;a>=0&&(s=e[a],!s);a--);for(a=0;a<i.length;a++){var c=i[a],l=e;n.matchBase&&c.length===1&&(l=[s]);var A=this.matchOne(l,c,r);if(A)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate},"match");Jt.prototype.matchOne=function(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,s=0,a=t.length,c=e.length;i<a&&s<c;i++,s++){this.debug("matchOne loop");var l=e[s],A=t[i];if(this.debug(e,l,A),l===!1)return!1;if(l===kI){this.debug("GLOBSTAR",[e,l,A]);var u=i,d=s+1;if(d===c){for(this.debug("** at the end");i<a;i++)if(t[i]==="."||t[i]===".."||!n.dot&&t[i].charAt(0)===".")return!1;return!0}for(;u<a;){var g=t[u];if(this.debug(`
|
||||
globstar while`,t,u,e,d,g),this.matchOne(t.slice(u),e.slice(d),r))return this.debug("globstar found match!",u,a,g),!0;if(g==="."||g===".."||!n.dot&&g.charAt(0)==="."){this.debug("dot detected!",t,u,e,d);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(r&&(this.debug(`
|
||||
>>> no match, partial?`,t,u,e,d),u===a))}var f;if(typeof l=="string"?(f=A===l,this.debug("string match",l,A,f)):(f=A.match(l),this.debug("pattern match",l,A,f)),!f)return!1}if(i===a&&s===c)return!0;if(i===a)return r;if(s===c)return i===a-1&&t[i]==="";throw new Error("wtf?")};function xce(t){return t.replace(/\\(.)/g,"$1")}o(xce,"globUnescape");function vce(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}o(vce,"regExpEscape")});var SF=h(fn=>{"use strict";var Rce=fn&&fn.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),_ce=fn&&fn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),NF=fn&&fn.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Rce(r,e,n[i]);return _ce(r,e),r}}(),Pce=fn&&fn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fn,"__esModule",{value:!0});fn.Path=void 0;var TA=NF(require("path")),vs=NF(Am()),OA=Pce(require("assert")),Dce=process.platform==="win32",LI=class{static{o(this,"Path")}constructor(e){if(this.segments=[],typeof e=="string")if((0,OA.default)(e,"Parameter 'itemPath' must not be empty"),e=vs.safeTrimTrailingSeparator(e),!vs.hasRoot(e))this.segments=e.split(TA.sep);else{let r=e,n=vs.dirname(r);for(;n!==r;){let i=TA.basename(r);this.segments.unshift(i),r=n,n=vs.dirname(r)}this.segments.unshift(r)}else{(0,OA.default)(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let r=0;r<e.length;r++){let n=e[r];(0,OA.default)(n,"Parameter 'itemPath' must not contain any empty segments"),n=vs.normalizeSeparators(e[r]),r===0&&vs.hasRoot(n)?(n=vs.safeTrimTrailingSeparator(n),(0,OA.default)(n===vs.dirname(n),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(n)):((0,OA.default)(!n.includes(TA.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(n))}}}toString(){let e=this.segments[0],r=e.endsWith(TA.sep)||Dce&&/^[A-Z]:$/i.test(e);for(let n=1;n<this.segments.length;n++)r?r=!1:e+=TA.sep,e+=this.segments[n];return e}};fn.Path=LI});var xF=h(hn=>{"use strict";var Tce=hn&&hn.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Oce=hn&&hn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qI=hn&&hn.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Tce(r,e,n[i]);return Oce(r,e),r}}(),Mce=hn&&hn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hn,"__esModule",{value:!0});hn.Pattern=void 0;var kce=qI(require("os")),MA=qI(require("path")),Qr=qI(Am()),xo=Mce(require("assert")),Lce=wF(),FI=dm(),gm=SF(),Ki=process.platform==="win32",UI=class t{static{o(this,"Pattern")}constructor(e,r=!1,n,i){this.negate=!1;let s;if(typeof e=="string")s=e.trim();else{n=n||[],(0,xo.default)(n.length,"Parameter 'segments' must not empty");let A=t.getLiteral(n[0]);(0,xo.default)(A&&Qr.hasAbsoluteRoot(A),"Parameter 'segments' first element must be a root path"),s=new gm.Path(n).toString().trim(),e&&(s=`!${s}`)}for(;s.startsWith("!");)this.negate=!this.negate,s=s.substr(1).trim();s=t.fixupPattern(s,i),this.segments=new gm.Path(s).segments,this.trailingSeparator=Qr.normalizeSeparators(s).endsWith(MA.sep),s=Qr.safeTrimTrailingSeparator(s);let a=!1,c=this.segments.map(A=>t.getLiteral(A)).filter(A=>!a&&!(a=A===""));this.searchPath=new gm.Path(c).toString(),this.rootRegExp=new RegExp(t.regExpEscape(c[0]),Ki?"i":""),this.isImplicitPattern=r;let l={dot:!0,nobrace:!0,nocase:Ki,nocomment:!0,noext:!0,nonegate:!0};s=Ki?s.replace(/\\/g,"/"):s,this.minimatch=new Lce.Minimatch(s,l)}match(e){return this.segments[this.segments.length-1]==="**"?(e=Qr.normalizeSeparators(e),!e.endsWith(MA.sep)&&this.isImplicitPattern===!1&&(e=`${e}${MA.sep}`)):e=Qr.safeTrimTrailingSeparator(e),this.minimatch.match(e)?this.trailingSeparator?FI.MatchKind.Directory:FI.MatchKind.All:FI.MatchKind.None}partialMa
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 H6.Pattern(n));return i.searchPaths.push(...Ap.getSearchPaths(i.patterns)),i})}static stat(e,a,i){return km(this,void 0,void 0,function*(){let r;if(a.followSymbolicLinks)try{r=yield ks.promises.stat(e.path)}catch(n){if(n.code==="ENOENT"){if(a.omitBrokenSymbolicLinks){jm.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 ks.promises.lstat(e.path);if(r.isDirectory()&&a.followSymbolicLinks){let n=yield ks.promises.realpath(e.path);for(;i.length>=e.level;)i.pop();if(i.some(s=>s===n)){jm.debug(`Symlink cycle detected for path '${e.path}' and realpath '${n}'`);return}i.push(n)}return r})}};ht.DefaultGlobber=Um});var $6=T(on=>{"use strict";var BS=on&&on.__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(on,"__esModule",{value:!0});on.create=void 0;var AS=V6();function MS(t,e){return BS(this,void 0,void 0,function*(){return yield AS.DefaultGlobber.create(t,e)})}o(MS,"create");on.create=MS});var Q6=T((ie,Y6)=>{ie=Y6.exports=se;var Ne;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?Ne=o(function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)},"debug"):Ne=o(function(){},"debug");ie.SEMVER_SPEC_VERSION="2.0.0";var Us=256,Mp=Number.MAX_SAFE_INTEGER||9007199254740991,Hm=16,qS=Us-6,pn=ie.re=[],we=ie.safeRe=[],M=ie.src=[],B=ie.tokens={},W6=0;function pe(t){B[t]=W6++}o(pe,"tok");var Vm="[a-zA-Z0-9-]",Fm=[["\\s",1],["\\d",Us],[Vm,qS]];function Fs(t){for(var e=0;e<Fm.length;e++){var a=Fm[e][0],i=Fm[e][1];t=t.split(a+"*").join(a+"{0,"+i+"}").split(a+"+").join(a+"{1,"+i+"}")}return t}o(Fs,"makeSafeRe");pe("NUMERICIDENTIFIER");M[B.NUMERICIDENTIFIER]="0|[1-9]\\d*";pe("NUMERICIDENTIFIERLOOSE");M[B.NUMERICIDENTIFIERLOOSE]="\\d+";pe("NONNUMERICIDENTIFIER");M[B.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+Vm+"*";pe("MAINVERSION");M[B.MAINVERSION]="("+M[B.NUMERICIDENTIFIER]+")\\.("+M[B.NUMERICIDENTIFIER]+")\\.("+M[B.NUMERICIDENTIFIER]+")";pe("MAINVERSIONLOOSE");M[B.MAINVERSIONLOOSE]="("+M[B.NUMERICIDENTIFIERLOOSE]+")\\.("+M[B.NUMERICIDENTIFIERLOOSE]+")\\.("+M[B.NUMERICIDENTIFIERLOOSE]+")";pe("PRERELEASEIDENTIFIER");M[B.PRERELEASEIDENTIFIER]="(?:"+M[B.NUMERICIDENTIFIER]+"|"+M[B.NONNUMERICIDENTIFIER]+")";pe("PRERELEASEIDENTIFIERLOOSE");M[B.PRERELEASEIDENTIFIERLOOSE]="(?:"+M[B.NUMERICIDENTIFIERLOOSE]+"|"+M[B.NONNUMERICIDENTIFIER]+")";pe("PRERELEASE");M[B.PRERELEASE]="(?:-("+M[B.PRERELEASEIDENTIFIER]+"(?:\\."+M[B.PRERELEASEIDENTIFIER]+")*))";pe("PRERELEASELOOSE");M[B.PRERELEASELOOSE]="(?:-?("+M[B.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+M[B.PRERELEASEIDENTIFIERLOOSE]+")*))";pe("BUILDIDENTIFIER");M[B.BUILDIDENTIFIER]=Vm+"+";pe("BUILD");M[B.BUILD]="(?:\\+("+M[B.BUILDIDENTIFIER]+"(?:\\."+M[B.BUILDIDENTIFIER]+")*))";pe("FULL");pe("FULLPLAIN");M[B.FULLPLAIN]="v?"+M[B.MAINVERSION]+M[B.PRERELEASE]+"?"+M[B.BUILD]+"?";M[B.FULL]="^"+M[B.FULLPLAIN]+"$";pe("LOOSEPLAIN");M[B.LOOSEPLAIN]="[v=\\s]*"+M[B.MAINVERSIONLOOSE]+M[B.PRERELEASELOOSE]+"?"+M[B.BUILD]+"?";pe("LOOSE");M[B.LOOSE]="^"+M[B.LOOSEPLAIN]+"$";pe("GTLT");M[B.GTLT]="((?:<|>)?=?)";pe("XRANGEIDENTIFIERLOOSE");M[B.XRANGEIDENTIFIERLOOSE]=M[B.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";pe("XRANGEIDENTIFIER");M[B.XRANGEIDENTIFIER]=M[B.NUMERICIDENTIFIER]+"|x|X|\\*";pe("XRANGEPLAIN");M[B.XRANGEPLAIN]="[v=\\s]*("+M[B.XRANGEIDENTIFIER]+")(?:\\.("+M[B.XRANGEIDENTIFIER]+")(?:\\.("+M[B.XRANGEIDENTIFIER]+")(?:"+M[B.PRERELEASE]+")?"+M[B.BUILD]+"?)?)?";pe("XRANGEPLAINLOOSE");M[B.XRANGEPLAINLOOSE]="[v=\\s]*("+M[B.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+M[B.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+M[B.XRANGEIDENTIFIERLOOSE]+")(?:"+M[B.PRERELEASELOOSE]+")?"+M[B.BUILD]+"?)?)?";pe("XRANGE");M[B.XRANGE]="^"+M[B.GTLT]+"\\s*"+M[B.XRANGEPLAIN]+"$";pe("XRANGELOOSE");M[B.XRANGELOOSE]="^"+M[B.GTLT]+"\\s*"+M[B.XRANGEPLAINLOOSE]+"$";pe("COERCE");M[B.COERCE]="(^|[^\\d])(\\d{1,"+Hm+"})(?:\\.(\\d{1,"+Hm+"}))?(?:\\.(\\d{1,"+Hm+"}))?(?:$|[^\\d])";pe("COERCERTL");pn[B.COERCERTL]=new RegExp(M[B.COERCE],"g");we[B.COERCERTL]=new RegExp(Fs(M[B.COERCE]),"g");pe("LONETILDE");M[B.LONETILDE]="(?:~>?)";pe("TILDETRIM");M[B.TILDETRIM]="(\\s*)"+M[B.LONETILDE]+"\\s+";pn[B.TILDETRIM]=new RegExp(M[B.TILDETRIM],"g");we[B.TILDETRIM]=new RegExp(Fs(M[B.TILDETRIM]),"g");var zS="$1~";pe("TILDE");M[B.TILDE]="^"+M[B.LONETILDE]+M[B.XRANGEPLAIN]+"$";pe("TILDELOOSE");M[B.TILDELOOSE]="^"+M[B.LONETILDE]+M[B.XRANGEPLAINLOOSE]+"$";pe("LONECARET");M[B.LONECARET]="(?:\\^)";pe("CARETTRIM");M[B.CARETTRIM]="(\\s*)"+M[B.LONECARET]+"\\s+";pn[B.CARETTRIM]=new
Line truncated
|
||||
`),{implicitDescendants:!1});try{for(var l=!0,c=wE(d.globGenerator()),m;m=yield c.next(),e=m.done,!e;l=!0){r=m.value,l=!1;let u=r,f=kp.relative(p,u).replace(new RegExp(`\\${kp.sep}`,"g"),"/");Vs.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(PE,"resolvePaths");ve.resolvePaths=PE;function RE(t){return cn(this,void 0,void 0,function*(){return EE.promisify(Km.unlink)(t)})}o(RE,"unlinkFile");ve.unlinkFile=RE;function i4(t,e=[]){return cn(this,void 0,void 0,function*(){let a="";e.push("--version"),Vs.debug(`Checking ${t} ${e.join(" ")}`);try{yield NE.exec(`${t}`,e,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i=>a+=i.toString(),stderr:i=>a+=i.toString()}})}catch(i){Vs.debug(i.message)}return a=a.trim(),Vs.debug(a),a})}o(i4,"getVersion");function DE(){return cn(this,void 0,void 0,function*(){let t=yield i4("zstd",["--quiet"]),e=SE.clean(t);return Vs.debug(`zstd version: ${e}`),t===""?wr.CompressionMethod.Gzip:wr.CompressionMethod.ZstdWithoutLong})}o(DE,"getCompressionMethod");ve.getCompressionMethod=DE;function IE(t){return t===wr.CompressionMethod.Gzip?wr.CacheFilename.Gzip:wr.CacheFilename.Zstd}o(IE,"getCacheFileName");ve.getCacheFileName=IE;function BE(){return cn(this,void 0,void 0,function*(){return Km.existsSync(wr.GnuTarPathOnWindows)?wr.GnuTarPathOnWindows:(yield i4("tar")).toLowerCase().includes("gnu tar")?t4.which("tar"):""})}o(BE,"getGnuTarPathOnWindows");ve.getGnuTarPathOnWindows=BE;function AE(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}o(AE,"assertDefined");ve.assertDefined=AE;function ME(t,e,a=!1){let i=t.slice();return e&&i.push(e),process.platform==="win32"&&!a&&i.push("windows-only"),i.push(CE),a4.createHash("sha256").update(i.join("|")).digest("hex")}o(ME,"getCacheVersion");ve.getCacheVersion=ME;function qE(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}o(qE,"getRuntimeToken");ve.getRuntimeToken=qE});function $s(){return jp>Up.length-16&&(r4.default.randomFillSync(Up),jp=0),Up.slice(jp,jp+=16)}var r4,Up,jp,Ym=Bt(()=>{r4=Is(require("crypto")),Up=new Uint8Array(256),jp=Up.length;o($s,"rng")});var n4,s4=Bt(()=>{n4=/^(?:[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 zE(t){return typeof t=="string"&&n4.test(t)}var ji,Gs=Bt(()=>{s4();o(zE,"validate");ji=zE});function LE(t,e=0){let a=(Pt[t[e+0]]+Pt[t[e+1]]+Pt[t[e+2]]+Pt[t[e+3]]+"-"+Pt[t[e+4]]+Pt[t[e+5]]+"-"+Pt[t[e+6]]+Pt[t[e+7]]+"-"+Pt[t[e+8]]+Pt[t[e+9]]+"-"+Pt[t[e+10]]+Pt[t[e+11]]+Pt[t[e+12]]+Pt[t[e+13]]+Pt[t[e+14]]+Pt[t[e+15]]).toLowerCase();if(!ji(a))throw TypeError("Stringified UUID is invalid");return a}var Pt,Ui,Xs=Bt(()=>{Gs();Pt=[];for(let t=0;t<256;++t)Pt.push((t+256).toString(16).substr(1));o(LE,"stringify");Ui=LE});function kE(t,e,a){let i=e&&a||0,r=e||new Array(16);t=t||{};let n=t.node||o4,s=t.clockseq!==void 0?t.clockseq:Qm;if(n==null||s==null){let u=t.random||(t.rng||$s)();n==null&&(n=o4=[u[0]|1,u[1],u[2],u[3],u[4],u[5]]),s==null&&(s=Qm=(u[6]<<8|u[7])&16383)}let p=t.msecs!==void 0?t.msecs:Date.now(),d=t.nsecs!==void 0?t.nsecs:Zm+1,l=p-Jm+(d-Zm)/1e4;if(l<0&&t.clockseq===void 0&&(s=s+1&16383),(l<0||p>Jm)&&t.nsecs===void 0&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Jm=p,Zm=d,Qm=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||Ui(r)}var o4,Qm,Jm,Zm,p4,d4=Bt(()=>{Ym();Xs();Jm=0,Zm=0;o(kE,"v1");p4=kE});function jE(t){if(!ji(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 Hp,eu=Bt(()=>{Gs();o(jE,"parse");Hp=jE});function UE(t){t=unescape(encodeURIComponent(t));let e=[];for(let a=0;a<t.length;++a)e.push(t.charCodeAt(a));return e}function Ws(t,e,a){function i(r,n,s,p){if(typeof r=="string"&&(r=UE(r)),typeof n=="string"&&(n=Hp(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 Ui(d)}o(i,"generateUUID");try{i.name=t}catch{}return i.DNS=HE,i.URL=FE,i}var HE,FE,tu=Bt(()=>{Xs();eu();o(UE,"stringToBytes");HE="6ba7b810-9dad-11d1-80b4-00c04fd430c8",FE
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(ru)});var Xa=T((Y4,Hi)=>{(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"),Hi.exports.assign=t,Hi.exports.isFunction=r,Hi.exports.isObject=n,Hi.exports.isArray=a,Hi.exports.isEmpty=i,Hi.exports.isPlainObject=s,Hi.exports.getValue=e}).call(Y4)});var nu=T((Q4,J4)=>{(function(){var t;J4.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(Q4)});var t3=T((Z4,e3)=>{(function(){var t;e3.exports=t=function(){function e(){}return o(e,"XMLDOMErrorHandler"),e.prototype.handleError=function(a){throw new Error(a)},e}()}).call(Z4)});var r3=T((a3,i3)=>{(function(){var t;i3.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(a3)});var o3=T((n3,s3)=>{(function(){var t,e,a;e=t3(),a=r3(),s3.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(n3)});var at=T((p3,d3)=>{(function(){d3.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(p3)});var su=T((l3,c3)=>{(function(){var t,e,a;t=at(),a=ia(),c3.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,j,oe,he,Q,et,ue,Oa;g||(g=0),he=!1,Q="",this.openNode(w,y,g),y.state=e.OpenTag,Q+=this.indent(w,y,g)+"<"+w.name,et=w.attribs;for(oe in et)S.call(et,oe)&&(_=et[oe],Q+=this.attribute(_,y,g));if(N=w.children.length,I=N===0?null:w.children[0],N===0||w.children.every(function(kt){return(kt.type===t.Text||kt.type===t.Raw)&&kt.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++,he=!0,Q+=this.writeChildNode(I,y,g+1),y.suppressPrettyCount--,he=!1,y.state=e.CloseTag,Q+="</"+w.name+">"+this.endline(w,y,g);else{if(y.dontPrettyTextNodes){for(ue=w.children,E=0,A=ue.length;E<A;E++)if(O=ue[E],(O.type===t.Text||O.type===t.Raw)&&O.value!=null){y.suppressPrettyCount++,he=!0;break}}for(Q+=">"+this.endline(w,y,g),y.state=e.InsideTag,Oa=w.children,R=0,j=Oa.length;R<j;R++)O=Oa[R],Q+=this.writeChildNode(O,y,g+1);y.state=e.CloseTag,Q+=this.indent(w,y,g)+"</"+w.name+">",he&&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=j(x.opt,x.textNode),x.textNode&&E(x,"ontext",x.textNode),x.textNode=""}o(A,"closeText");function j(x,v){return x.trim&&(v=v.trim()),x.normalize&&(v=v.replace(/\s+/g," ")),v}o(j,"textopts");function oe(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(oe,"error");function he(x){return x.sawRoot&&!x.closedRoot&&Q(x,"Unclosed root tag"),x.state!==N.BEGIN&&x.state!==N.BEGIN_WHITESPACE&&x.state!==N.TEXT&&oe(x,"Unexpected end"),A(x),x.c="",x.closed=!0,E(x,"onend"),a.call(x,x.strict,x.opt),x}o(he,"end");function Q(x,v){if(typeof x!="object"||!(x instanceof a))throw new Error("bad call to strictFail");x.strict&&oe(x,v)}o(Q,"strictFail");function et(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(et,"newTag");function ue(x,v){var q=x.indexOf(":"),P=q<0?["",x]:x.split(":"),Ce=P[0],ot=P[1];return v&&x==="xmlns"&&(Ce="xmlns",ot=""),{prefix:Ce,local:ot}}o(ue,"qname");function Oa(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=ue(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 Ce=x.tag,ot=x.tags[x.tags.length-1]||x;Ce.ns===ot.ns&&(Ce.ns=Object.create(ot.ns)),Ce.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(Oa,"attrib");function kt(x,v){if(x.opt.xmlns){var q=x.tag,P=ue(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 Ce=x.tags[x.tags.length-1]||x;q.ns&&Ce.ns!==q.ns&&Object.keys(q.ns).forEach(function(vh){R(x,"onopennamespace",{prefix:vh,uri:q.ns[vh]})});for(var ot=0,ft=x.attribList.length;ot<ft;ot++){var jt=x.attribList[ot],Ha=jt[0],Qr=jt[1],Tt=ue(Ha,!0),pi=Tt.prefix,Bw=Tt.local,yh=pi===""?"":q.ns[pi]||"",Zc={name:Ha,value:Qr,prefix:pi,local:Bw,uri:yh};pi&&pi!=="xmlns"&&!yh&&(Q(x,"Unbound namespace prefix: "+JSON.stringify(pi)),Zc.uri=pi),x.tag.attributes[Ha]=Zc,R(x,"onattribute",Zc)}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(kt,"openTag");function Yr(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 Ce=x.tags[v];if(Ce.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 ot=x.tags.length;ot-- >v;){var ft=x.tag=x.tags.pop();x.tagName=x.tag.name,R(x,"onclosetag",x.tagName);var jt={};for(var Ha in ft.ns)jt[Ha]=ft.ns[Ha];var Qr=x.tags[x.tags.length-1]||x;x.opt.xmlns&&ft.ns!==Qr.ns&&Object.keys(ft.ns).forEach(function(Tt){var pi=ft.ns[Tt];R(x,"onclosenamespace",{prefix:Tt,uri:pi})})}v===0&&(x.closedRoot=!0),x.tagName=x.attribValue=x.attribName="",x.attribList.length=0,x.state=N.TEXT}o(Yr,"closeTag");function Rs(x){var v=x.entity,q=v.toLowerCase(),P,Ce="";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),Ce=P.toString(16)):(v=v.slice(1),P=parseInt(v,10),Ce=P.toString(10))),v=v.replace(/^0+/,""),isNaN(P)||Ce.toLowerCase()!==v?(Q(x,"Invalid character entity"),"&"+x.entity+";"):String.fromCodePoint(P))}o(Rs,"parseEntity");function hh(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(hh,"beginWhiteSpace");function gh(x,v){var q="";return v<x.length&&(q=x.charAt(v)),q}o(gh,"charAt");function Iw(x){var v=this;if(this.error)throw this.error;if(v.closed)return oe(v,"Cannot write after close. Assign an onready handler.");if(x===null)return he(v);typeof x=="object"&&(x=x.toString());for(var q=0,P="";P=gh(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;hh(v,P);continue;case N.BEGIN_WHITESPACE:hh(v,P);continue;case N.TEXT:if(v.sawRoot&&!v.closedRoot){for(var Ce=q-1;P&&P!=="<"&&P!=="&";)P=gh(x,q++),P&&v.trackPosition&&(v.position++,P===`
|
||||
`?(v.line++,v.column=0):v.column++);v.textNode+=x.substring(Ce,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 ot=v.position-v.startTagPosition;P=new Array(ot).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=j(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:(et(v),P===">"?kt(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===">"?(kt(v,!0),Yr(v)):(Q(v,"Forward-slash in opening tag not followed by >"),v.state=N.ATTRIB);continue;case N.ATTRIB:if(w(P))continue;P===">"?kt(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,Oa(v),kt(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===">"?kt(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}Oa(v),v.q="",v.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:w(P)?v.state=N.ATTRIB:P===">"?kt(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}Oa(v),P===">"?kt(v):v.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(v.tagName)P===">"?Yr(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
|
||||
`;ge.DEFAULT_CONTENT_TYPE="application/octet-stream";ge.prototype.append=function(t,e,a){a=a||{},typeof a=="string"&&(a={filename:a});var i=Uu.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),f5.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)};ge.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)+ge.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof xT))&&(a.knownLength||this._valuesToMeasure.push(e))};ge.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)):bT.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")};ge.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"&&ju(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("; ")+ge.LINE_BREAK)));return"--"+this.getBoundary()+ge.LINE_BREAK+n+ge.LINE_BREAK};ge.prototype._getContentDisposition=function(t,e){var a,i;return typeof e.filepath=="string"?a=Lu.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?a=Lu.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(a=Lu.basename(t.client._httpMessage.path||"")),a&&(i='filename="'+a+'"'),i};ge.prototype._getContentType=function(t,e){var a=e.contentType;return!a&&t.name&&(a=ku.lookup(t.name)),!a&&t.path&&(a=ku.lookup(t.path)),!a&&t.readable&&t.hasOwnProperty("httpVersion")&&(a=t.headers["content-type"]),!a&&(e.filepath||e.filename)&&(a=ku.lookup(e.filepath||e.filename)),!a&&typeof t=="object"&&(a=ge.DEFAULT_CONTENT_TYPE),a};ge.prototype._multiPartFooter=function(){return function(t){var e=ge.LINE_BREAK,a=this._streams.length===0;a&&(e+=this._lastBoundary()),t(e)}.bind(this)};ge.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ge.LINE_BREAK};ge.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};ge.prototype.setBoundary=function(t){this._boundary=t};ge.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};ge.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(ge.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};ge.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};ge.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};ge.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};ge.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}wT.parallel(this._valuesToMeasure,this._lengthRetriever,function(a,i){if(a){t(a);return}i.forEach(function(r){e+=r}),t(null,e)})};ge.prototype.submit=function(t,e){var a,i,r={method:"post"};return typeof t=="string"?(t=vT(t),i=ju({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},r)):(i=ju(t,r),i.port||(i.port=i.protocol=="https:"?443:80)),i.headers=this.getHeaders(t.headers),i.protocol=="https:"?a=yT.request(i):a=gT.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};ge.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit
Line truncated
|
||||
${fD.sanitize(this)}`}};na.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";na.PARSE_ERROR="PARSE_ERROR";var Ma=mR.createClientLogger("core-http");function hg(t,e){return t?e.httpsAgent:e.httpAgent}o(hg,"getCachedAgent");var bl=class extends yR.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 ml(t){return t&&typeof t.pipe=="function"}o(ml,"isReadableStream");function gg(t,e){return new Promise(a=>{t.once("close",()=>{e?.abort(),a()}),t.once("end",a),t.once("error",a)})}o(gg,"isStreamComplete");function hD(t){let e=new Qi;return t.forEach((a,i)=>{e.set(i,a)}),e}o(hD,"parseHeaders");var xl=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 ul.AbortController,r;if(e.abortSignal){if(e.abortSignal.aborted)throw new ul.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 xR.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 bl(l);ml(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=hD(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(ml(f)){let h=new bl(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 na(c.message,na.REQUEST_SEND_ERROR,void 0,e):c.type==="aborted"?new ul.AbortError("The operation was aborted."):c}finally{if(e.abortSignal&&r){let l=Promise.resolve();ml(n)&&(l=gg(n));let c=Promise.resolve();ml(d?.readableStreamBody)&&(c=gg(d.readableStreamBody,i)),Promise.all([l,c]).then(()=>{var m;(m=e.abortSignal)===null||m===void 0||m.removeEventListener("abort",r)}).catch(m=>{Ma.warning("Error when cleaning up abortListener on httpRequest",m)})}}}getOrCreateAgent(e){var a;let i=Y1(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=hg(i,l);if(c)return c;let m=lD(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=hg(i,this.keepAliveAgents);if(r)return r;let n={keepAlive:e.keepAlive};return i?r=this.keepAliveAgents.httpsAgent=new lg.Agent(n):r=this.keepAliveAgents.httpAgent=new dg.Agent(n),r}else return i?lg.globalAgent:dg.globalAgent}async fetch(e,a){return wR.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 gD(t){let{requestOptions:e,tracingOptions:a}=t,r=lR.__rest(t,["requestOptions","tracingOptions"]);return e&&(r=Object.assign(Object.assign({},r),e)),a&&(r.tracingContext=a.tracingContext,r.spanOptions=a?.spanOptions),r}o(gD,"operationOptionsToRequestOptionsBase");var lt=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)}},wl=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)}},qg={explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:dt,explicitArray:!0,ignore
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1},hl=Object.assign({},qg);hl.explicitArray=!1;var wo=Object.assign({},qg);wo.explicitArray=!1;wo.renderOpts={pretty:!1};function Q1(t,e={}){var a;return wo.rootName=e.rootName,wo.charkey=(a=e.xmlCharKey)!==null&&a!==void 0?a:wi,new Eg.Builder(wo).buildObject(t)}o(Q1,"stringifyXML");function zg(t,e={}){var a;hl.explicitRoot=!!e.includeRoot,hl.charkey=(a=e.xmlCharKey)!==null&&a!==void 0?a:wi;let i=new Eg.Parser(hl);return new Promise((r,n)=>{t?i.parseString(t,(s,p)=>{s?n(s):r(p)}):n(new Error("Document is empty"))})}o(zg,"parseXML");function Nf(t,e){return{create:(a,i)=>new J1(a,i,t,e)}}o(Nf,"deserializationPolicy");var Lg=["application/json","text/json"],kg=["application/xml","application/atom+xml"],yD={expectedContentTypes:{json:Lg,xml:kg}},J1=class extends lt{static{o(this,"DeserializationPolicy")}constructor(e,a,i,r={}){var n;super(e,a),this.jsonContentTypes=i&&i.json||Lg,this.xmlContentTypes=i&&i.xml||kg,this.xmlCharKey=(n=r.xmlCharKey)!==null&&n!==void 0?n:wi}async sendRequest(e){return this._nextPolicy.sendRequest(e).then(a=>jg(this.jsonContentTypes,this.xmlContentTypes,a,{xmlCharKey:this.xmlCharKey}))}};function vD(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(vD,"getOperationResponse");function bD(t){let e=t.request.shouldDeserialize,a;return e===void 0?a=!0:typeof e=="boolean"?a=e:a=e(t),a}o(bD,"shouldDeserializeResponse");function jg(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:wi};return ND(t,e,a,p).then(d=>{if(!bD(d))return d;let l=d.request.operationSpec;if(!l||!l.responses)return d;let c=vD(d),{error:m,shouldReturnResponse:u}=wD(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===Dr.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 na(`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(jg,"deserializeResponseBody");function xD(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}o(xD,"isOperationSpecEmpty");function wD(t,e,a){var i;let r=200<=t.status&&t.status<300;if(xD(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 na(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===Dr.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(wD,"handleErrorResponse");function ND(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||na.PARSE_ERROR,c=new na(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 zg(p,i).then(c=>(a.parsedBody=c,a)).catch(n)}return Promise.resolve(a)}o(ND,"parse");var Ug={enable:!0};function Hg(t){return{create:(e,a)=>new Z1(e,a,t||Ug)}}o(Hg,"keepAlivePolicy");var Z1=class extends lt{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)}},yg=["GET","HEAD"],_D={handleRedirects:!0,maxRetries:20};function _f(t=20){return{create:(e,a)=>new ef(e,a,t)}}o(_f,"redirectPolicy");var ef=class extends lt{static{o(this,"RedirectPolicy")}constructor(e,a,i=20){super(e,a),this.maxRetries=i}sendRequest(e){return this._nextPolicy.sendRequest(e).then(a=>Fg(this,a,0))}};functi
Line truncated
|
||||
`).join(""))}return this._nextPolicy.sendRequest(e)}},Kg=[],Yg=!1,qD=new Map;function zD(){if(!process)return;let t=fl(ba.HTTPS_PROXY),e=fl(ba.ALL_PROXY),a=fl(ba.HTTP_PROXY);return t||e||a}o(zD,"loadEnvironmentProxyValue");function LD(t,e,a){if(e.length===0)return!1;let i=ei.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(LD,"isBypassed");function kD(){let t=fl(ba.NO_PROXY);return Yg=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}o(kD,"loadNoProxy");function Qg(t){if(!t&&(t=zD(),!t))return;let{username:e,password:a,urlWithoutAuth:i}=jD(t),r=ei.parse(i);return{host:(r.getScheme()?r.getScheme()+"://":"")+r.getHost(),port:Number.parseInt(r.getPort()||"80"),username:e,password:a}}o(Qg,"getDefaultProxySettings");function Df(t,e){return t||(t=Qg()),Yg||Kg.push(...kD()),{create:(a,i)=>new df(a,i,t,e?.customNoProxyList)}}o(Df,"proxyPolicy");function jD(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(jD,"extractAuthFromUrl");var df=class extends lt{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&&!LD(e.url,(a=this.customNoProxyList)!==null&&a!==void 0?a:Kg,this.customNoProxyList?void 0:qD)&&(e.proxySettings=this.proxySettings),this._nextPolicy.sendRequest(e)}};function UD(t=30){return{create:(e,a)=>new lf(e,a,t)}}o(UD,"rpRegistrationPolicy");var lf=class extends lt{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=>HD(this,e,a))}};function HD(t,e,a){if(a.status===409){let i=FD(a.bodyAsText);if(i){let r=VD(e.url);return $D(t,r,i,e).catch(()=>!1).then(n=>n?(e.headers.set("x-ms-client-request-id",Sl()),t._nextPolicy.sendRequest(e.clone())):a)}}return Promise.resolve(a)}o(HD,"registerIfNeeded");function Jg(t,e=!1){let a=t.clone();return e&&(a.url=t.url),a.headers.set("x-ms-client-request-id",Sl()),a.headers.set("Content-Type","application/json; charset=utf-8"),a}o(Jg,"getRequestEssentials");function FD(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(FD,"checkRPNotRegisteredError");function VD(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(VD,"extractSubscriptionUrl");async function $D(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=Jg(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 Zg(t,n,i)}o($D,"registerRP");async function Zg(t,e,a){let i=Jg(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 Za.delay(t._retryTimeout*1e3),Zg(t,e,a))}o(Zg,"getRegistrationStatus");function ey(t){return{create:(e,a)=>new cf(e,a,t)}}o(ey,"signingPolicy");var cf=class extends lt{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 If(t,e,a,i){return{create:(r,n)=>new mf(r,n,t,e,a,i)}}o(If,"systemErrorRetryPolicy");var mf=class extends lt{static{o(this,"SystemErrorRetryPolicy")}constructor(e,a,i,r,n,s){super(e,a),this.retryCount=Rr(i)?i:Sf,this.retryInterval=Rr(r)?r:Ef,this.minRetryInterval=Rr(n)?n:SD,this.maxRetryInterval=Rr(s)?s:Cf}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch(a=>ty(this,e,a.response,a))}};async function ty(t,e,a,i,r){r=$g(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"),Vg(t.retryCount,n,r,a,i))try{return await Za.delay(r.retryInterval),t._nextPolicy.sendRequest(e.clone())}catch(s){return ty(t,e,a,s,r)}else return i?Promise.reject(r.error):a}o(ty,"retry");var GD=3,vg=ba.HttpConstants.StatusCodes;function Bf(){return{create:(t,e)=>new uf(t,e)}}o(Bf,"throttlingRetryPolicy");var bg="The operation was aborted.",uf=class t extends lt{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: ${ly.includes(c)?"Stopped":"Running"}`),c==="succeeded"){let m=s(l,a);if(m!==void 0)return{response:await e(m).catch(py({state:a,stateProxy:i,isOperationError:p})),status:c}}return{response:l,status:c}}o(dI,"pollOperationHelper");async function fy(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 dI({poll:e,getOperationStatus:n,state:a,stateProxy:i,operationLocation:S,getResourceLocation:s,isOperationError:d,options:r});if(my({status:w,response:D,state:a,stateProxy:i,isDone:b,processResult:m,getError:u,setErrorAsResult:C}),!ly.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(fy,"pollOperation");function hy(t){let{azureAsyncOperation:e,operationLocation:a}=t;return a??e}o(hy,"getOperationLocationPollingUrl");function gy(t){return t.headers.location}o(gy,"getLocationHeader");function yy(t){return t.headers["operation-location"]}o(yy,"getOperationLocationHeader");function vy(t){return t.headers["azure-asyncoperation"]}o(vy,"getAzureAsyncOperationHeader");function lI(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(lI,"findResourceLocation");function by(t){let{rawResponse:e,requestMethod:a,requestPath:i,resourceLocationConfig:r}=t,n=yy(e),s=vy(e),p=hy({operationLocation:n,azureAsyncOperation:s}),d=gy(e),l=a?.toLocaleUpperCase();return p!==void 0?{mode:"OperationLocation",operationLocation:p,resourceLocation:lI({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(by,"inferLroMode");function xy(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 zf(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 Br.verbose(`LRO: unrecognized operation status: ${e}`),e}}o(xy,"transformStatus");function cI(t){var e;let{status:a}=(e=t.body)!==null&&e!==void 0?e:{};return xy({status:a,statusCode:t.statusCode})}o(cI,"getStatus");function mI(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 xy({status:n,statusCode:t.statusCode})}o(mI,"getProvisioningState");function zf(t){return t===202?"running":t<300?"succeeded":"failed"}o(zf,"toOperationStatus");function wy({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let a=parseInt(e);return isNaN(a)?uI(new Date(e)):a*1e3}}o(wy,"parseRetryAfter");function Ny(t){let e=t.flatResponse.error;if(!e){Br.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){Br.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(Ny,"getErrorFromResponse");function uI(t){let e=Math.floor(new Date().getTime()),a=t.getTime();if(e<a)return a-e}o(uI,"calculatePollingIntervalFromDate");function _y(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 zf(e.rawResponse.statusCode);case"Body":return Lf(e,a);default:return"running"}}o(r,"helper");let n=r();return n==="running"&&i===void 0?"succeeded":n}o(_y,"getStatusFromInitialResponse");async function fI(t){let{stateProxy:e,resourceLocationConfig:a,processResult:i,lro:r,setErrorAsResult:n}=t;return uy({init:async()=>{let s=await r.sendInitialRequest(),p=by({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:_y,setErrorAsResult:n})}o(fI,"initHttpOperation");function Sy({rawResponse:t},e){var a;switch((a=e.config.metadata)===null||a===void 0?vLine truncated
|
||||
`,px="HTTP/1.1",gM="AES256",yM="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",vM=["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"],bM=["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"],xM="BlobUsesCustomerSpecifiedEncryption",wM="BlobDoesNotUseCustomerSpecifiedEncryption",NM=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function _M(t){let e=z.URLBuilder.parse(t),a=e.getPath();return a=a||"/",a=EM(a),e.setPath(a),e.toString()}o(_M,"escapeURLPath");function SM(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(SM,"getProxyUriFromDevConnString");function Bn(t,e){let a=t.split(";");for(let i of a)if(i.trim().startsWith(e))return i.trim().match(e+"=(.*)")[1];return""}o(Bn,"getValueInConnString");function Zn(t){let e="";t.startsWith("UseDevelopmentStorage=true")&&(e=SM(t),t=yM);let a=Bn(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=Bn(t,"AccountName"),n=Buffer.from(Bn(t,"AccountKey"),"base64"),!a){i=Bn(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=Bn(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=Bn(t,"SharedAccessSignature"),r=lx(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(Zn,"extractConnectionStringParts");function EM(t){return encodeURIComponent(t).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}o(EM,"escape");function je(t,e){let a=z.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(je,"appendToURLPath");function kr(t,e
Line truncated
|
||||
`));let i=e.split(`
|
||||
`).map(s=>s.trim());for(let s of i)!s||s.startsWith("#")||n.patterns.push(new DF.Pattern(s));return n.searchPaths.push(...hm.getSearchPaths(n.patterns)),n})}static stat(e,r,n){return zI(this,void 0,void 0,function*(){let i;if(r.followSymbolicLinks)try{i=yield kA.promises.stat(e.path)}catch(s){if(s.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){jI.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 s}else i=yield kA.promises.lstat(e.path);if(i.isDirectory()&&r.followSymbolicLinks){let s=yield kA.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(a=>a===s)){jI.debug(`Symlink cycle detected for path '${e.path}' and realpath '${s}'`);return}n.push(s)}return i})}};Ft.DefaultGlobber=GI});var FF=h(Gr=>{"use strict";var jce=Gr&&Gr.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Gce=Gr&&Gr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),oc=Gr&&Gr.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&jce(r,e,n[i]);return Gce(r,e),r}}(),Yce=Gr&&Gr.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})},Jce=Gr&&Gr.__asyncValues||function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(a){return new Promise(function(c,l){a=t[s](a),i(c,l,a.done,a.value)})}}function i(s,a,c,l){Promise.resolve(l).then(function(A){s({value:A,done:c})},a)}};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.hashFiles=$ce;var MF=oc(require("crypto")),kF=oc(Zt()),LF=oc(require("fs")),Vce=oc(require("stream")),Wce=oc(require("util")),Kce=oc(require("path"));function $ce(t,e){return Yce(this,arguments,void 0,function*(r,n,i=!1){var s,a,c,l,A;let u=i?kF.info:kF.debug,d=!1,g=n||((A=process.env.GITHUB_WORKSPACE)!==null&&A!==void 0?A:process.cwd()),f=MF.createHash("sha256"),C=0;try{for(var Q=!0,x=Jce(r.globGenerator()),w;w=yield x.next(),s=w.done,!s;Q=!0){l=w.value,Q=!1;let v=l;if(u(v),!v.startsWith(`${g}${Kce.sep}`)){u(`Ignore '${v}' since it is not under GITHUB_WORKSPACE.`);continue}if(LF.statSync(v).isDirectory()){u(`Skip directory '${v}'.`);continue}let T=MF.createHash("sha256");yield Wce.promisify(Vce.pipeline)(LF.createReadStream(v),T),f.write(T.digest()),C++,d||(d=!0)}}catch(v){a={error:v}}finally{try{!Q&&!s&&(c=x.return)&&(yield c.call(x))}finally{if(a)throw a.error}}return f.end(),d?(u(`Found ${C} files to hash.`),f.digest("hex")):(u("No matches found for glob"),"")})}o($ce,"hashFiles")});var HF=h(ac=>{"use strict";var UF=ac&&ac.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(ac,"__esModule",{value:!0});ac.create=qF;ac.hashFiles=ele;var Xce=OF(),Zce=FF();function qF(t,e){return UF(this,void 0,void 0,function*(){return yield Xce.DefaultGlobber.create(t,e)})}o(qF,"create");function ele(t){return UF(this,arguments,void 0,function*(e,r="",n,i=!1){let s=!0;n&&typeof n.followSymbolicLinks=="boolean"&&(s=n.followSymbolicLinks);let a=yield qF(e,{followSymbolicLinks:s});return(0,Zce.hashFiles)(a,r,i)})}o(ele,"hashFiles")});var VF=h((ue,JF)=>{ue=JF.exports=Ce;var Le;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?Le=o(function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)},"debug"):Le=o(function(){},"debug");ue.SEMVER_SPEC_VERSION="2.0.0";var FA=256,ym=Number.MAX_SAFE_INTEGER||9007199254740991,YI=16,tle=FA-6,cc=ue.re=[],ke=ue.safeRe=[],F=ue.src=[],O=ue.tokens={},GF=0;function Be(t){O[t]=GF++}o(Be,"tok");va
Line truncated
|
||||
`),{implicitDescendants:!1});try{for(var A=!0,u=Ule(l.globGenerator()),d;d=yield u.next(),e=d.done,!e;A=!0){i=d.value,A=!1;let g=i,f=Im.relative(c,g).replace(new RegExp(`\\${Im.sep}`,"g"),"/");zA.debug(`Matched: ${f}`),f===""?a.push("."):a.push(`${f}`)}}catch(g){r={error:g}}finally{try{!A&&!e&&(n=u.return)&&(yield n.call(u))}finally{if(r)throw r.error}}return a})}o(Vle,"resolvePaths");function Wle(t){return Ac(this,void 0,void 0,function*(){return jle.promisify(ZI.unlink)(t)})}o(Wle,"unlinkFile");function eU(t){return Ac(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),zA.debug(`Checking ${e} ${r.join(" ")}`);try{yield qle.exec(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i=>n+=i.toString(),stderr:i=>n+=i.toString()}})}catch(i){zA.debug(i.message)}return n=n.trim(),zA.debug(n),n})}o(eU,"getVersion");function Kle(){return Ac(this,void 0,void 0,function*(){let t=yield eU("zstd",["--quiet"]),e=zle.clean(t);return zA.debug(`zstd version: ${e}`),t===""?_o.CompressionMethod.Gzip:_o.CompressionMethod.ZstdWithoutLong})}o(Kle,"getCompressionMethod");function $le(t){return t===_o.CompressionMethod.Gzip?_o.CacheFilename.Gzip:_o.CacheFilename.Zstd}o($le,"getCacheFileName");function Xle(){return Ac(this,void 0,void 0,function*(){return ZI.existsSync(_o.GnuTarPathOnWindows)?_o.GnuTarPathOnWindows:(yield eU("tar")).toLowerCase().includes("gnu tar")?XF.which("tar"):""})}o(Xle,"getGnuTarPathOnWindows");function Zle(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}o(Zle,"assertDefined");function eAe(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(Gle),ZF.createHash("sha256").update(n.join("|")).digest("hex")}o(eAe,"getCacheVersion");function tAe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}o(tAe,"getRuntimeToken")});var Yr={};Ku(Yr,{__addDisposableResource:()=>wU,__assign:()=>bm,__asyncDelegator:()=>hU,__asyncGenerator:()=>fU,__asyncValues:()=>yU,__await:()=>dc,__awaiter:()=>AU,__classPrivateFieldGet:()=>IU,__classPrivateFieldIn:()=>QU,__classPrivateFieldSet:()=>bU,__createBinding:()=>wm,__decorate:()=>nU,__disposeResources:()=>NU,__esDecorate:()=>sU,__exportStar:()=>dU,__extends:()=>tU,__generator:()=>uU,__importDefault:()=>BU,__importStar:()=>EU,__makeTemplateObject:()=>CU,__metadata:()=>lU,__param:()=>iU,__propKey:()=>aU,__read:()=>rb,__rest:()=>rU,__rewriteRelativeImportExtension:()=>SU,__runInitializers:()=>oU,__setFunctionName:()=>cU,__spread:()=>pU,__spreadArray:()=>gU,__spreadArrays:()=>mU,__values:()=>Qm,default:()=>iAe});function tU(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");eb(t,e);function r(){this.constructor=t}o(r,"__"),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function rU(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function nU(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(s=(i<3?a(s):i>3?a(e,r,s):a(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function iU(t,e){return function(r,n){e(r,n,t)}}function sU(t,e,r,n,i,s){function a(w){if(w!==void 0&&typeof w!="function")throw new TypeError("Function expected");return w}o(a,"accept");for(var c=n.kind,l=c==="getter"?"get":c==="setter"?"set":"value",A=!e&&t?n.static?t:t.prototype:null,u=e||(A?Object.getOwnPropertyDescriptor(A,n.name):{}),d,g=!1,f=r.length-1;f>=0;f--){var C={};for(var Q in n)C[Q]=Q==="access"?{}:n[Q];for(var Q in n.access)C.access[Q]=n.access[Q];C.addInitializer=function(w){if(g)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(w||null))};var x=(0,r[f])(c==="accessor"?{get:u.get,set:u.set}:u[l],C);if(c==="accessor"){if(x===void 0)continue;if(x===null||typeof x!="object")throw new TypeError("Object expected");(d=a(x.get))&&(u.get=d),(d=a(x.set))&&(u.set=d),(d=a(x.init))&&i.unshift(d)}else(d=a(x))&&(c==="field"?i.unshift(d):u[l]=d)}A&&Object.defineProperty(A,n.name,u),g=!0}function oU(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0}function aU(t){return typeof t=="symbol"?t:"".concat(t)}function cU(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function lU(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function AU(t,e,r,n)
Line truncated
|
||||
${lde.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function Ade(t){return t instanceof Dm?!0:(0,ode.isError)(t)&&t.name==="RestError"}o(Ade,"isRestError")});var Po=h((nze,hq)=>{var xb=Object.defineProperty,ude=Object.getOwnPropertyDescriptor,dde=Object.getOwnPropertyNames,pde=Object.prototype.hasOwnProperty,mde=o((t,e)=>{for(var r in e)xb(t,r,{get:e[r],enumerable:!0})},"__export"),gde=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of dde(e))!pde.call(t,i)&&i!==r&&xb(t,i,{get:()=>e[i],enumerable:!(n=ude(e,i))||n.enumerable});return t},"__copyProps"),fde=o(t=>gde(xb({},"__esModule",{value:!0}),t),"__toCommonJS"),fq={};mde(fq,{stringToUint8Array:()=>yde,uint8ArrayToString:()=>hde});hq.exports=fde(fq);function hde(t,e){return Buffer.from(t).toString(e)}o(hde,"uint8ArrayToString");function yde(t,e){return Buffer.from(t,e)}o(yde,"stringToUint8Array")});var mc=h((sze,Cq)=>{var vb=Object.defineProperty,Cde=Object.getOwnPropertyDescriptor,Ede=Object.getOwnPropertyNames,Bde=Object.prototype.hasOwnProperty,Ide=o((t,e)=>{for(var r in e)vb(t,r,{get:e[r],enumerable:!0})},"__export"),bde=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ede(e))!Bde.call(t,i)&&i!==r&&vb(t,i,{get:()=>e[i],enumerable:!(n=Cde(e,i))||n.enumerable});return t},"__copyProps"),Qde=o(t=>bde(vb({},"__esModule",{value:!0}),t),"__toCommonJS"),yq={};Ide(yq,{logger:()=>Nde});Cq.exports=Qde(yq);var wde=YA(),Nde=(0,wde.createClientLogger)("ts-http-runtime")});var xq=h((aze,Sq)=>{var Sde=Object.create,Om=Object.defineProperty,xde=Object.getOwnPropertyDescriptor,vde=Object.getOwnPropertyNames,Rde=Object.getPrototypeOf,_de=Object.prototype.hasOwnProperty,Pde=o((t,e)=>{for(var r in e)Om(t,r,{get:e[r],enumerable:!0})},"__export"),bq=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of vde(e))!_de.call(t,i)&&i!==r&&Om(t,i,{get:()=>e[i],enumerable:!(n=xde(e,i))||n.enumerable});return t},"__copyProps"),Db=o((t,e,r)=>(r=t!=null?Sde(Rde(t)):{},bq(e||!t||!t.__esModule?Om(r,"default",{value:t,enumerable:!0}):r,t)),"__toESM"),Dde=o(t=>bq(Om({},"__esModule",{value:!0}),t),"__toCommonJS"),Qq={};Pde(Qq,{createNodeHttpClient:()=>qde,getBodyLength:()=>Nq});Sq.exports=Dde(Qq);var Rb=Db(require("node:http")),_b=Db(require("node:https")),Eq=Db(require("node:zlib")),Tde=require("node:stream"),Bq=jA(),Ode=_s(),WA=pc(),gc=mc(),Mde=JA(),kde={};function VA(t){return t&&typeof t.pipe=="function"}o(VA,"isReadableStream");function Iq(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=o(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}o(Iq,"isStreamComplete");function wq(t){return t&&typeof t.byteLength=="number"}o(wq,"isArrayBuffer");var Tm=class extends Tde.Transform{static{o(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(i){n(i)}}constructor(e){super(),this.progressCallback=e}},Pb=class{static{o(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new Bq.AbortError("The operation was aborted. Request has already been canceled.");n=o(A=>{A.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let i;e.timeout>0&&(i=setTimeout(()=>{let A=new Mde.Sanitizer;gc.logger.info(`request to '${A.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let s=e.headers.get("Accept-Encoding"),a=s?.includes("gzip")||s?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let A=Nq(c);A!==null&&e.headers.set("Content-Length",A)}let l;try{if(c&&e.onUploadProgress){let C=e.onUploadProgress,Q=new Tm(C);Q.on("error",x=>{gc.logger.error("Error in upload progress",x)}),VA(c)?c.pipe(Q):Q.end(c),c=Q}let A=await this.makeRequest(e,r,c);i!==void 0&&clearTimeout(i);let u=Lde(A),g={status:A.statusCode??0,headers:u,request:e};if(e.method==="HEAD")return A.resume(),g;l=a?Fde(A,u):A;let f=e.onDownloadProgress;if(f){let C=new Tm(f);C.on("error",Q=>{gc.logger.error("Error in download progress",Q)}),l.pipe(C),l=C}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(g.status)?g.readableStreamBody=l:g.bodyAsText=await Ude(l),g}finally{if(e.abortSignal&&n){let A=Promise.resolve();VA(c)&&(A=Iq(c));let u=Promise.resolve();VA(l)&&(u=Iq(l)),Promise.all([A,u]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(d=>{gc.logger.warning("Error when cleaning up abortListener on httpRequest",d)})}}}makeRequest(e,r,n){let i=new URL(e.url),s=i.protocol!=="https:";if(s&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureCoLine truncated
|
||||
`).join(`
|
||||
`+s),t.push(i+"m+"+Hm.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Xge()+e+" "+t[0]}o($ge,"formatArgs");function Xge(){return Ut.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(Xge,"getDate");function Zge(...t){return process.stderr.write(qm.formatWithOptions(Ut.inspectOpts,...t)+`
|
||||
`)}o(Zge,"log");function efe(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(efe,"save");function tfe(){return process.env.DEBUG}o(tfe,"load");function rfe(t){t.inspectOpts={};let e=Object.keys(Ut.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Ut.inspectOpts[e[r]]}o(rfe,"init");Hm.exports=lQ()(Ut);var{formatters:M1}=Hm.exports;M1.o=function(t){return this.inspectOpts.colors=this.useColors,qm.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};M1.O=function(t){return this.inspectOpts.colors=this.useColors,qm.inspect(t,this.inspectOpts)}});var zm=h((Wze,AQ)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?AQ.exports=O1():AQ.exports=k1()});var U1=h(Nr=>{"use strict";var nfe=Nr&&Nr.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),ife=Nr&&Nr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),L1=Nr&&Nr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&nfe(e,t,r);return ife(e,t),e};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.req=Nr.json=Nr.toBuffer=void 0;var sfe=L1(require("http")),ofe=L1(require("https"));async function F1(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}o(F1,"toBuffer");Nr.toBuffer=F1;async function afe(t){let r=(await F1(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let i=n;throw i.message+=` (input: ${r})`,i}}o(afe,"json");Nr.json=afe;function cfe(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?ofe:sfe).request(t,e),i=new Promise((s,a)=>{n.once("response",s).once("error",a).end()});return n.then=i.then.bind(i),n}o(cfe,"req");Nr.req=cfe});var dQ=h(Vr=>{"use strict";var H1=Vr&&Vr.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),lfe=Vr&&Vr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),z1=Vr&&Vr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&H1(e,t,r);return lfe(e,t),e},Afe=Vr&&Vr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&H1(e,t,r)};Object.defineProperty(Vr,"__esModule",{value:!0});Vr.Agent=void 0;var ufe=z1(require("net")),q1=z1(require("http")),dfe=require("https");Afe(U1(),Vr);var pi=Symbol("AgentBaseInternalState"),uQ=class extends q1.Agent{static{o(this,"Agent")}constructor(e){super(e),this[pi]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
||||
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new ufe.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],i=n.indexOf(r);i!==-1&&(n.splice(i,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?dfe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let i={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(i),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,i)).then(c=>{if(this.decrementSockets(s,a),c instanceof q1.Agent)try{return c.addRequest(e,i)}catch(l){return n(l)}this[pi].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(s,a),n(c)})}createConnection(){let e=this[pi].currentSocket;if(this[pi].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[pi].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[pi]&&(this[pi].defaultPort=e)}get protocol(){return this[pi].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[pi]&&(this[pi].protocol=e)}};Vr.Agent=uQ});var j1=h(Ec=>{"use strict";var pfe=Ec&&Ec.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ec,"__esModule",{value:!0});Ec.parseProxyResponse=void 0;var mfe=pfe(zm()),jm=(0,mfe.default)("https-proxy-agent:parse-proxy-response");function gfe(t){return new Promise((e,r)=>{let n=0,i=[];function s(){let u=t.read();u?A(u):t.once("readable",s)}o(s,"read");function a(){t.removeListener("end",c),t.removeListener("error",l),t.removeListener("readable",s)}o(a,"cleanup");function c(){a(),jm("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}o(c,"onend");function l(u){a(),jm("onerror %o",u),r(u)}o(l,"onerror");function A(u){i.push(u),n+=u.length;let d=Buffer.concat(i,n),g=d.indexOf(`\r
|
||||
\r
|
||||
`);if(g===-1){jm("have not received end of HTTP headers yet..."),s();return}let f=d.slice(0,g).toString("ascii").split(`\r
|
||||
`),C=f.shift();if(!C)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let Q=C.split(" "),x=+Q[1],w=Q.slice(2).join(" "),v={};for(let T of f){if(!T)continue;let L=T.indexOf(":");if(L===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${T}"`));let W=T.slice(0,L).toLowerCase(),de=T.slice(L+1).trimStart(),le=v[W];typeof le=="string"?v[W]=[le,de]:Array.isArray(le)?le.push(de):v[W]=de}jm("got proxy server response: %o %o",C,v),a(),e({connect:{statusCode:x,statusText:w,headers:v},buffered:d})}o(A,"ondata"),t.on("error",l),t.on("end",c),s()})}o(gfe,"parseProxyResponse");Ec.parseProxyResponse=gfe});var K1=h(Cn=>{"use strict";var ffe=Cn&&Cn.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),hfe=Cn&&Cn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),V1=Cn&&Cn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ffe(e,t,r);return hfe(e,t),e},W1=Cn&&Cn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.HttpsProxyAgent=void 0;var Gm=V1(require("net")),G1=V1(require("tls")),yfe=W1(require("assert")),Cfe=W1(zm()),Efe=dQ(),Bfe=require("url"),Ife=j1(),$A=(0,Cfe.default)("https-proxy-agent"),Y1=o(t=>t.servername===void 0&&t.host&&!Gm.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),Ym=class extends Efe.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new Bfe.URL(e):e,this.proxyHeaders=r?.headers??{},$A("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?J1(r,"headers"):null,host:n,port:i}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let i;n.protocol==="https:"?($A("Creating `tls.Socket`: %o",this.connectOpts),i=G1.connect(Y1(this.connectOpts))):($A("Creating `net.Socket`: %o",this.connectOpts),i=Gm.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=Gm.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
||||
`;if(n.username||n.password){let g=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(g).toString("base64")}`}s.Host=`${a}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let g of Object.keys(s))c+=`${g}: ${s[g]}\r
|
||||
`;let l=(0,Ife.parseProxyResponse)(i);i.write(`${c}\r
|
||||
`);let{connect:A,buffered:u}=await l;if(e.emit("proxyConnect",A),this.emit("proxyConnect",A,e),A.statusCode===200)return e.once("socket",bfe),r.secureEndpoint?($A("Upgrading socket connection to TLS"),G1.connect({...J1(Y1(r),"host","path","port"),socket:i})):i;i.destroy();let d=new Gm.Socket({writable:!1});return d.readable=!0,e.once("socket",g=>{$A("Replaying proxy buffer for failed request"),(0,yfe.default)(g.listenerCount("data")>0),g.push(u),g.push(null)}),d}};Ym.protocols=["http","https"];Cn.HttpsProxyAgent=Ym;function bfe(t){t.resume()}o(bfe,"resume");function J1(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(J1,"omit")});var Z1=h(En=>{"use strict";var Qfe=En&&En.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),wfe=En&&En.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),X1=En&&En.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Qfe(e,t,r);return wfe(e,t),e},Nfe=En&&En.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(En,"__esModule",{value:!0});En.HttpProxyAgent=void 0;var Sfe=X1(require("net")),xfe=X1(require("tls")),vfe=Nfe(zm()),Rfe=require("events"),_fe=dQ(),$1=require("url"),Bc=(0,vfe.default)("http-proxy-agent"),Jm=class extends _fe.Agent{static{o(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new $1.URL(e):e,this.proxyHeaders=r?.headers??{},Bc("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?Pfe(r,"headers"):null,host:n,port:i}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,i=r.secureEndpoint?"https:":"http:",s=e.getHeader("host")||"localhost",a=`${i}//${s}`,c=new $1.URL(e.path,a);r.port!==80&&(c.port=String(r.port)),e.path=String(c);let l=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let A=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;l["Proxy-Authorization"]=`Basic ${Buffer.from(A).toString("base64")}`}l["Proxy-Connection"]||(l["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let A of Object.keys(l)){let u=l[A];u&&e.setHeader(A,u)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,i;Bc("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(Bc("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,i=n.indexOf(`\r
|
||||
\r
|
||||
`)+4,e.outputData[0].data=e._header+n.substring(i),Bc("Output buffer: %o",e.outputData[0].data));let s;return this.proxy.protocol==="https:"?(Bc("Creating `tls.Socket`: %o",this.connectOpts),s=xfe.connect(this.connectOpts)):(Bc("Creating `net.Socket`: %o",this.connectOpts),s=Sfe.connect(this.connectOpts)),await(0,Rfe.once)(s,"connect"),s}};Jm.protocols=["http","https"];En.HttpProxyAgent=Jm;function Pfe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(Pfe,"omit")});var gQ=h((oje,aH)=>{var mQ=Object.defineProperty,Dfe=Object.getOwnPropertyDescriptor,Tfe=Object.getOwnPropertyNames,Ofe=Object.prototype.hasOwnProperty,Mfe=o((t,e)=>{for(var r in e)mQ(t,r,{get:e[r],enumerable:!0})},"__export"),kfe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Tfe(e))!Ofe.call(t,i)&&i!==r&&mQ(t,i,{get:()=>e[i],enumerable:!(n=Dfe(e,i))||n.enumerable});return t},"__copyProps"),Lfe=o(t=>kfe(mQ({},"__esModule",{value:!0}),t),"__toCommonJS"),rH={};Mfe(rH,{getDefaultProxySettings:()=>Vfe,globalNoProxyList:()=>pQ,loadNoProxy:()=>oH,proxyPolicy:()=>Kfe,proxyPolicyName:()=>nH});aH.exports=Lfe(rH);var Ffe=K1(),Ufe=Z1(),qfe=mc(),Hfe="HTTPS_PROXY",zfe="HTTP_PROXY",jfe="ALL_PROXY",Gfe="NO_PROXY",nH="proxyPolicy",pQ=[],iH=!1,Yfe=new Map;function Vm(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}o(Vm,"getEnvironmentValue");function sH(){if(!process)return;let t=Vm(Hfe),e=Vm(jfe),r=Vm(zfe);return t||e||r}o(sH,"loadEnvironmentProxyValue");function Jfe(t,e,r){if(e.length===0)return!1;let n=new URL(t).hostname;if(r?.has(n))return r.get(n);let i=!1;for(let s of e)s[0]==="."?(n.endsWith(s)||n.length===s.length-1&&n===s.slice(1))&&(i=!0):n===s&&(i=!0);return r?.set(n,i),i}o(Jfe,"isBypassed");function oH(){let t=Vm(Gfe);return iH=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}o(oH,"loadNoProxy");function Vfe(t){if(!t&&(t=sH(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}o(Vfe,"getDefaultProxySettings");function Wfe(){let t=sH();return t?new URL(t):void 0}o(Wfe,"getDefaultProxySettingsInternal");function eH(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}o(eH,"getUrlFromProxySettings");function tH(t,e,r){if(t.agent)return;let i=new URL(t.url).protocol!=="https:";t.tlsSettings&&qfe.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let s=t.headers.toJSON();i?(e.httpProxyAgent||(e.httpProxyAgent=new Ufe.HttpProxyAgent(r,{headers:s})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new Ffe.HttpsProxyAgent(r,{headers:s})),t.agent=e.httpsProxyAgent)}o(tH,"setProxyAgentOnRequest");function Kfe(t,e){iH||pQ.push(...oH());let r=t?eH(t):Wfe(),n={};return{name:nH,async sendRequest(i,s){return!i.proxySettings&&r&&!Jfe(i.url,e?.customNoProxyList??pQ,e?.customNoProxyList?void 0:Yfe)?tH(i,n,r):i.proxySettings&&tH(i,n,eH(i.proxySettings)),s(i)}}}o(Kfe,"proxyPolicy")});var hQ=h((cje,AH)=>{var fQ=Object.defineProperty,$fe=Object.getOwnPropertyDescriptor,Xfe=Object.getOwnPropertyNames,Zfe=Object.prototype.hasOwnProperty,ehe=o((t,e)=>{for(var r in e)fQ(t,r,{get:e[r],enumerable:!0})},"__export"),the=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Xfe(e))!Zfe.call(t,i)&&i!==r&&fQ(t,i,{get:()=>e[i],enumerable:!(n=$fe(e,i))||n.enumerable});return t},"__copyProps"),rhe=o(t=>the(fQ({},"__esModule",{value:!0}),t),"__toCommonJS"),cH={};ehe(cH,{agentPolicy:()=>nhe,agentPolicyName:()=>lH});AH.exports=rhe(cH);var lH="agentPolicy";function nhe(t){return{name:lH,sendRequest:async(e,r)=>(e.agent||(e.agent=t),r(e))}}o(nhe,"agentPolicy")});var CQ=h((Aje,pH)=>{var yQ=Object.defineProperty,ihe=Object.getOwnPropertyDescriptor,she=Object.getOwnPropertyNames,ohe=Object.prototype.hasOwnProperty,ahe=o((t,e)=>{for(var r in e)yQ(t,r,{get:e[r],enumerable:!0})},"__export"),che=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of she(e))!ohe.call(t,i)&&i!==r&&yQ(t,i,{get:()=>e[i],enumerable:!(n=ihe(e,i))||n.enumerable});return t},"__copyProps"),lhe=o(t=>che(yQ({},"__esModule",{value:!0}),t),"__toCommonJS"),uH={};ahe(uH,{tlsPolicy:()=>Ahe,tlsPolicyName:()=>dH});pH.exports=lhe(uH);var dH="tlsPolicy";function Ahe(t){return{name:dH,sendRequest:async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e))}}o(Ahe,"tlsPolicy")});var XA=h((dje,yH)=>{var EQ=Object.defineProperty,uhe=Object.getOwnPropertyDescriptor,dhe=Object.getOwnPropertyNames,phe=Object.prototype.hasOwnProperty,mhe=o((t,e)=>{for(var r in e)EQ(t,r,{get:e[r],enumerable:!0})},"__export"),ghe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of dhe(e))!phe.call(t,i)&&i!==r&&EQ(
Line truncated
|
||||
`;return e}o(Fhe,"encodeHeaders");function Uhe(t){return t instanceof Uint8Array?t.byteLength:(0,Ohe.isBlob)(t)?t.size===-1?void 0:t.size:void 0}o(Uhe,"getLength");function qhe(t){let e=0;for(let r of t){let n=Uhe(r);if(n===void 0)return;e+=n}return e}o(qhe,"getTotalLength");async function Hhe(t,e,r){let n=[(0,Ic.stringToUint8Array)(`--${r}`,"utf-8"),...e.flatMap(s=>[(0,Ic.stringToUint8Array)(`\r
|
||||
`,"utf-8"),(0,Ic.stringToUint8Array)(Fhe(s.headers),"utf-8"),(0,Ic.stringToUint8Array)(`\r
|
||||
`,"utf-8"),s.body,(0,Ic.stringToUint8Array)(`\r
|
||||
--${r}`,"utf-8")]),(0,Ic.stringToUint8Array)(`--\r
|
||||
\r
|
||||
`,"utf-8")],i=qhe(n);i&&t.headers.set("Content-Length",i),t.body=await(0,khe.concat)(n)}o(Hhe,"buildRequestBody");var wH="multipartPolicy",zhe=70,jhe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Ghe(t){if(t.length>zhe)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!jhe.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}o(Ghe,"assertValidBoundary");function Yhe(){return{name:wH,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",i=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,s,a]=i;if(a&&r&&a!==r)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);return r??=a,r?Ghe(r):r=Lhe(),t.headers.set("Content-Type",`${s}; boundary=${r}`),await Hhe(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}o(Yhe,"multipartPolicy")});var _H=h((yje,RH)=>{var wQ=Object.defineProperty,Jhe=Object.getOwnPropertyDescriptor,Vhe=Object.getOwnPropertyNames,Whe=Object.prototype.hasOwnProperty,Khe=o((t,e)=>{for(var r in e)wQ(t,r,{get:e[r],enumerable:!0})},"__export"),$he=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Vhe(e))!Whe.call(t,i)&&i!==r&&wQ(t,i,{get:()=>e[i],enumerable:!(n=Jhe(e,i))||n.enumerable});return t},"__copyProps"),Xhe=o(t=>$he(wQ({},"__esModule",{value:!0}),t),"__toCommonJS"),vH={};Khe(vH,{createPipelineFromOptions:()=>lye});RH.exports=Xhe(vH);var Zhe=kb(),eye=Cb(),tye=Fb(),rye=Gb(),nye=Jb(),iye=sQ(),sye=cQ(),SH=KA(),oye=gQ(),aye=hQ(),cye=CQ(),xH=QQ();function lye(t){let e=(0,eye.createEmptyPipeline)();return SH.isNodeLike&&(t.agent&&e.addPolicy((0,aye.agentPolicy)(t.agent)),t.tlsOptions&&e.addPolicy((0,cye.tlsPolicy)(t.tlsOptions)),e.addPolicy((0,oye.proxyPolicy)(t.proxyOptions)),e.addPolicy((0,nye.decompressResponsePolicy)())),e.addPolicy((0,sye.formDataPolicy)(),{beforePolicies:[xH.multipartPolicyName]}),e.addPolicy((0,rye.userAgentPolicy)(t.userAgentOptions)),e.addPolicy((0,xH.multipartPolicy)(),{afterPhase:"Deserialize"}),e.addPolicy((0,iye.defaultRetryPolicy)(t.retryOptions),{phase:"Retry"}),SH.isNodeLike&&e.addPolicy((0,tye.redirectPolicy)(t.redirectOptions),{afterPhase:"Retry"}),e.addPolicy((0,Zhe.logPolicy)(t.loggingOptions),{afterPhase:"Sign"}),e}o(lye,"createPipelineFromOptions")});var OH=h((Eje,TH)=>{var NQ=Object.defineProperty,Aye=Object.getOwnPropertyDescriptor,uye=Object.getOwnPropertyNames,dye=Object.prototype.hasOwnProperty,pye=o((t,e)=>{for(var r in e)NQ(t,r,{get:e[r],enumerable:!0})},"__export"),mye=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of uye(e))!dye.call(t,i)&&i!==r&&NQ(t,i,{get:()=>e[i],enumerable:!(n=Aye(e,i))||n.enumerable});return t},"__copyProps"),gye=o(t=>mye(NQ({},"__esModule",{value:!0}),t),"__toCommonJS"),PH={};pye(PH,{apiVersionPolicy:()=>fye,apiVersionPolicyName:()=>DH});TH.exports=gye(PH);var DH="ApiVersionPolicy";function fye(t){return{name:DH,sendRequest:(e,r)=>{let n=new URL(e.url);return!n.searchParams.get("api-version")&&t.apiVersion&&(e.url=`${e.url}${Array.from(n.searchParams.keys()).length>0?"&":"?"}api-version=${t.apiVersion}`),r(e)}}}o(fye,"apiVersionPolicy")});var LH=h((Ije,kH)=>{var SQ=Object.defineProperty,hye=Object.getOwnPropertyDescriptor,yye=Object.getOwnPropertyNames,Cye=Object.prototype.hasOwnProperty,Eye=o((t,e)=>{for(var r in e)SQ(t,r,{get:e[r],enumerable:!0})},"__export"),Bye=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of yye(e))!Cye.call(t,i)&&i!==r&&SQ(t,i,{get:()=>e[i],enumerable:!(n=hye(e,i))||n.enumerable});return t},"__copyProps"),Iye=o(t=>Bye(SQ({},"__esModule",{value:!0}),t),"__toCommonJS"),MH={};Eye(MH,{isApiKeyCredential:()=>Nye,isBasicCredential:()=>wye,isBearerTokenCredential:()=>Qye,isOAuth2TokenCredential:()=>bye});kH.exports=Iye(MH);function bye(t){return"getOAuth2Token"in t}o(bye,"isOAuth2TokenCredential");function Qye(t){return"getBearerToken"in t}o(Qye,"isBearerTokenCredential");function wye(t){return"username"in t&&"password"in t}o(wye,"isBasicCredential");function Nye(t){return"key"in t}o(Nye,"isApiKeyCredential")});var ZA=h((Qje,qH)=>{var xQ=Object.defineProperty,Sye=Object.getOwnPropertyDescriptor,xye=Object.getOwnPropertyNames,vye=Object.prototype.hasOwnProperty,Rye=o((t,e)=>{for(var r in e)xQ(t,r,{get:e[r],enumerable:!0})},"__export"),_ye=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of xye(e))!vye.call(t,i)&&i!==r&&xQ(t,i,{get:()=>e[i],enumerable:!(n=Sye(e,i))||n.enumerable});return t},"__copyProps"),Pye=o(t=>_ye(xQ({},"__esModule",{value:!0}),t),"__toCommonJS"),UH={};Rye(UH,{ensureSecureConnection:()=>Mye});qH.exports=Pye(UH);var Dye=mc(),FH=!1
Line truncated
|
||||
`).join(""))}return e(t)}}}o(pSe,"ndJsonPolicy")});var pY=h((YYe,dY)=>{var mN=Object.defineProperty,mSe=Object.getOwnPropertyDescriptor,gSe=Object.getOwnPropertyNames,fSe=Object.prototype.hasOwnProperty,hSe=o((t,e)=>{for(var r in e)mN(t,r,{get:e[r],enumerable:!0})},"__export"),ySe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of gSe(e))!fSe.call(t,i)&&i!==r&&mN(t,i,{get:()=>e[i],enumerable:!(n=mSe(e,i))||n.enumerable});return t},"__copyProps"),CSe=o(t=>ySe(mN({},"__esModule",{value:!0}),t),"__toCommonJS"),uY={};hSe(uY,{auxiliaryAuthenticationHeaderPolicy:()=>bSe,auxiliaryAuthenticationHeaderPolicyName:()=>pN});dY.exports=CSe(uY);var ESe=AN(),BSe=eu(),pN="auxiliaryAuthenticationHeaderPolicy",AY="x-ms-authorization-auxiliary";async function ISe(t){let{scopes:e,getAccessToken:r,request:n}=t,i={abortSignal:n.abortSignal,tracingOptions:n.tracingOptions};return(await r(e,i))?.token??""}o(ISe,"sendAuthorizeRequest");function bSe(t){let{credentials:e,scopes:r}=t,n=t.logger||BSe.logger,i=new WeakMap;return{name:pN,async sendRequest(s,a){if(!s.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs.");if(!e||e.length===0)return n.info(`${pN} header will not be set due to empty credentials.`),a(s);let c=[];for(let A of e){let u=i.get(A);u||(u=(0,ESe.createTokenCycler)(A),i.set(A,u)),c.push(ISe({scopes:Array.isArray(r)?r:[r],request:s,getAccessToken:u,logger:n}))}let l=(await Promise.all(c)).filter(A=>!!A);return l.length===0?(n.warning(`None of the auxiliary tokens are valid. ${AY} header will not be set.`),a(s)):(s.headers.set(AY,l.map(A=>`Bearer ${A}`).join(", ")),a(s))}}}o(bSe,"auxiliaryAuthenticationHeaderPolicy")});var Pt=h((VYe,DY)=>{var fN=Object.defineProperty,QSe=Object.getOwnPropertyDescriptor,wSe=Object.getOwnPropertyNames,NSe=Object.prototype.hasOwnProperty,SSe=o((t,e)=>{for(var r in e)fN(t,r,{get:e[r],enumerable:!0})},"__export"),xSe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of wSe(e))!NSe.call(t,i)&&i!==r&&fN(t,i,{get:()=>e[i],enumerable:!(n=QSe(e,i))||n.enumerable});return t},"__copyProps"),vSe=o(t=>xSe(fN({},"__esModule",{value:!0}),t),"__toCommonJS"),PY={};SSe(PY,{RestError:()=>mY.RestError,agentPolicy:()=>RY.agentPolicy,agentPolicyName:()=>RY.agentPolicyName,auxiliaryAuthenticationHeaderPolicy:()=>vY.auxiliaryAuthenticationHeaderPolicy,auxiliaryAuthenticationHeaderPolicyName:()=>vY.auxiliaryAuthenticationHeaderPolicyName,bearerTokenAuthenticationPolicy:()=>SY.bearerTokenAuthenticationPolicy,bearerTokenAuthenticationPolicyName:()=>SY.bearerTokenAuthenticationPolicyName,createDefaultHttpClient:()=>PSe.createDefaultHttpClient,createEmptyPipeline:()=>RSe.createEmptyPipeline,createFile:()=>_Y.createFile,createFileFromStream:()=>_Y.createFileFromStream,createHttpHeaders:()=>DSe.createHttpHeaders,createPipelineFromOptions:()=>_Se.createPipelineFromOptions,createPipelineRequest:()=>TSe.createPipelineRequest,decompressResponsePolicy:()=>gY.decompressResponsePolicy,decompressResponsePolicyName:()=>gY.decompressResponsePolicyName,defaultRetryPolicy:()=>MSe.defaultRetryPolicy,exponentialRetryPolicy:()=>fY.exponentialRetryPolicy,exponentialRetryPolicyName:()=>fY.exponentialRetryPolicyName,formDataPolicy:()=>NY.formDataPolicy,formDataPolicyName:()=>NY.formDataPolicyName,getDefaultProxySettings:()=>gN.getDefaultProxySettings,isRestError:()=>mY.isRestError,logPolicy:()=>yY.logPolicy,logPolicyName:()=>yY.logPolicyName,multipartPolicy:()=>CY.multipartPolicy,multipartPolicyName:()=>CY.multipartPolicyName,ndJsonPolicy:()=>xY.ndJsonPolicy,ndJsonPolicyName:()=>xY.ndJsonPolicyName,proxyPolicy:()=>gN.proxyPolicy,proxyPolicyName:()=>gN.proxyPolicyName,redirectPolicy:()=>EY.redirectPolicy,redirectPolicyName:()=>EY.redirectPolicyName,retryPolicy:()=>OSe.retryPolicy,setClientRequestIdPolicy:()=>hY.setClientRequestIdPolicy,setClientRequestIdPolicyName:()=>hY.setClientRequestIdPolicyName,systemErrorRetryPolicy:()=>BY.systemErrorRetryPolicy,systemErrorRetryPolicyName:()=>BY.systemErrorRetryPolicyName,throttlingRetryPolicy:()=>IY.throttlingRetryPolicy,throttlingRetryPolicyName:()=>IY.throttlingRetryPolicyName,tlsPolicy:()=>wY.tlsPolicy,tlsPolicyName:()=>wY.tlsPolicyName,tracingPolicy:()=>bY.tracingPolicy,tracingPolicyName:()=>bY.tracingPolicyName,userAgentPolicy:()=>QY.userAgentPolicy,userAgentPolicyName:()=>QY.userAgentPolicyName});DY.exports=vSe(PY);var RSe=VQ(),_Se=QG(),PSe=SG(),DSe=RG(),TSe=DG(),mY=ug(),gY=Rw(),fY=kG(),hY=Fw(),yY=nw(),CY=xw(),gN=kw(),EY=sw(),BY=qG(),IY=GG(),OSe=VG(),bY=$w(),MSe=Pw(),QY=dw(),wY=zw(),NY=Tw(),SY=sY(),xY=lY(),vY=pY(),RY=qw(),_Y=Nw()});var TY=h(mg=>{"use strict";Object.defineProperty(mg,"__esModule",{value:!0});mg.AzureKeyCredential=void 0;var hN=class{static{o(this,"AzureKeyCredential")}_key;get key(){return this._key}constructor(e){if(!e)throw new Error("key must be a non-empty string");this._key=e}update(e){this._key=e}};mg.AzureKeyCrede
Line truncated
|
||||
`&&y[N]!=="\r";N++)M+=y[N];if(M=M.trim(),M[M.length-1]==="/"&&(M=M.substring(0,M.length-1),N--),!T(M)){let K;return K=M.trim().length===0?"Invalid space after '<'.":"Tag '"+M+"' is an invalid name.",w("InvalidTag",K,L(y,N))}let q=f(y,N);if(q===!1)return w("InvalidAttr","Attributes for '"+M+"' have open quote.",L(y,N));let G=q.value;if(N=q.index,G[G.length-1]==="/"){let K=N-G.length;G=G.substring(0,G.length-1);let be=Q(G,p);if(be!==!0)return w(be.err.code,be.err.msg,L(y,K+be.err.line));b=!0}else if(R){if(!q.tagClosed)return w("InvalidTag","Closing tag '"+M+"' doesn't have proper closing.",L(y,N));if(G.trim().length>0)return w("InvalidTag","Closing tag '"+M+"' can't have attributes or invalid starting.",L(y,k));if(m.length===0)return w("InvalidTag","Closing tag '"+M+"' has not been opened.",L(y,k));{let K=m.pop();if(M!==K.tagName){let be=L(y,K.tagStartPos);return w("InvalidTag","Expected closing tag '"+K.tagName+"' (opened in line "+be.line+", col "+be.col+") instead of closing tag '"+M+"'.",L(y,k))}m.length==0&&(S=!0)}}else{let K=Q(G,p);if(K!==!0)return w(K.err.code,K.err.msg,L(y,N-G.length+K.err.line));if(S===!0)return w("InvalidXml","Multiple possible root nodes found.",L(y,N));p.unpairedTags.indexOf(M)!==-1||m.push({tagName:M,tagStartPos:k}),b=!0}for(N++;N<y.length;N++)if(y[N]==="<"){if(y[N+1]==="!"){N++,N=u(y,N);continue}if(y[N+1]!=="?")break;if(N=A(y,++N),N.err)return N}else if(y[N]==="&"){let K=x(y,N);if(K==-1)return w("InvalidChar","char '&' is not expected.",L(y,N));N=K}else if(S===!0&&!l(y[N]))return w("InvalidXml","Extra text at the end",L(y,N));y[N]==="<"&&N--}}}return b?m.length==1?w("InvalidTag","Unclosed tag '"+m[0].tagName+"'.",L(y,m[0].tagStartPos)):!(m.length>0)||w("InvalidXml","Invalid '"+JSON.stringify(m.map(N=>N.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):w("InvalidXml","Start tag expected.",1)}o(c,"a");function l(y){return y===" "||y===" "||y===`
|
||||
`||y==="\r"}o(l,"h");function A(y,p){let m=p;for(;p<y.length;p++)if(y[p]=="?"||y[p]==" "){let b=y.substr(m,p-m);if(p>5&&b==="xml")return w("InvalidXml","XML declaration allowed only at the start of the document.",L(y,p));if(y[p]=="?"&&y[p+1]==">"){p++;break}continue}return p}o(A,"l");function u(y,p){if(y.length>p+5&&y[p+1]==="-"&&y[p+2]==="-"){for(p+=3;p<y.length;p++)if(y[p]==="-"&&y[p+1]==="-"&&y[p+2]===">"){p+=2;break}}else if(y.length>p+8&&y[p+1]==="D"&&y[p+2]==="O"&&y[p+3]==="C"&&y[p+4]==="T"&&y[p+5]==="Y"&&y[p+6]==="P"&&y[p+7]==="E"){let m=1;for(p+=8;p<y.length;p++)if(y[p]==="<")m++;else if(y[p]===">"&&(m--,m===0))break}else if(y.length>p+9&&y[p+1]==="["&&y[p+2]==="C"&&y[p+3]==="D"&&y[p+4]==="A"&&y[p+5]==="T"&&y[p+6]==="A"&&y[p+7]==="["){for(p+=8;p<y.length;p++)if(y[p]==="]"&&y[p+1]==="]"&&y[p+2]===">"){p+=2;break}}return p}o(u,"p");let d='"',g="'";function f(y,p){let m="",b="",S=!1;for(;p<y.length;p++){if(y[p]===d||y[p]===g)b===""?b=y[p]:b!==y[p]||(b="");else if(y[p]===">"&&b===""){S=!0;break}m+=y[p]}return b===""&&{value:m,index:p,tagClosed:S}}o(f,"d");let C=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Q(y,p){let m=i(y,C),b={};for(let S=0;S<m.length;S++){if(m[S][1].length===0)return w("InvalidAttr","Attribute '"+m[S][2]+"' has no space in starting.",W(m[S]));if(m[S][3]!==void 0&&m[S][4]===void 0)return w("InvalidAttr","Attribute '"+m[S][2]+"' is without value.",W(m[S]));if(m[S][3]===void 0&&!p.allowBooleanAttributes)return w("InvalidAttr","boolean attribute '"+m[S][2]+"' is not allowed.",W(m[S]));let N=m[S][2];if(!v(N))return w("InvalidAttr","Attribute '"+N+"' is an invalid name.",W(m[S]));if(Object.prototype.hasOwnProperty.call(b,N))return w("InvalidAttr","Attribute '"+N+"' is repeated.",W(m[S]));b[N]=1}return!0}o(Q,"g");function x(y,p){if(y[++p]===";")return-1;if(y[p]==="#")return function(b,S){let N=/\d/;for(b[S]==="x"&&(S++,N=/[\da-fA-F]/);S<b.length;S++){if(b[S]===";")return S;if(!b[S].match(N))break}return-1}(y,++p);let m=0;for(;p<y.length;p++,m++)if(!(y[p].match(/\w/)&&m<20)){if(y[p]===";")break;return-1}return p}o(x,"m");function w(y,p,m){return{err:{code:y,msg:p,line:m.line||m,col:m.col}}}o(w,"x");function v(y){return s(y)}o(v,"N");function T(y){return s(y)}o(T,"b");function L(y,p){let m=y.substring(0,p).split(/\r?\n/);return{line:m.length,col:m[m.length-1].length+1}}o(L,"E");function W(y){return y.startIndex+y[1].length}o(W,"y");let de={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(y,p){return p},attributeValueProcessor:function(y,p){return p},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(y,p,m){return y},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0};function le(y){return typeof y=="boolean"?{enabled:y,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof y=="object"&&y!==null?{enabled:y.enabled!==!1,maxEntitySize:y.maxEntitySize??1e4,maxExpansionDepth:y.maxExpansionDepth??10,maxTotalExpansions:y.maxTotalExpansions??1e3,maxExpandedLength:y.maxExpandedLength??1e5,maxEntityCount:y.maxEntityCount??100,allowedTags:y.allowedTags??null,tagFilter:y.tagFilter??null}:le(!0)}o(le,"v");let De=o(function(y){let p=Object.assign({},de,y);return p.processEntities=le(p.processEntities),p.stopNodes&&Array.isArray(p.stopNodes)&&(p.stopNodes=p.stopNodes.map(m=>typeof m=="string"&&m.startsWith("*.")?".."+m.substring(2):m)),p},"T"),Te;Te=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class qe{static{o(this,"S")}constructor(p){this.tagname=p,this.child=[],this[":@"]=Object.create(null)}add(p,m){p==="__proto__"&&(p="#__proto__"),this.child.push({[p]:m})}addChild(p,m){p.tagname==="__proto__"&&(p.tagname="#__proto__"),p[":@"]&&Object.keys(p[":@"]).length>0?this.child.push({[p.tagname]:p.child,":@":p[":@"]}):this.child.push({[p.tagname]:p.child}),m!==void 0&&(this.child[this.child.length-1][Te]={startIndex:m})}static getMetaDataSymbol(){return Te}}class $e{static{o(this,"A")}constructor(p){this.suppressValidationErr=!p,this.options=p}readDocType(p,m){let b=Object.create(null),S=0;if(p[m+3]!=="O"||p[m+4]!=="C"||p[m+5]!=="T"||p[m+6]!=="Y"||p[m+7]!=="P"||p[m+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{m+=9;let N=1,k=!1,R=!1,M="";for(;m<p.length;m++)if(p[m]!=="<"||R)if(p[m]===">"){if(R?p[m-1]==="-"&&p[m-2]==="-"&&(R=!1,N--):N--,N===0)break}else p[m]==="["?k=!0:M+=p[m];else{if(k&&je(p,"!ENTITY",m)){let q,G;if(m+=7,[q,G,m]=this.readEntityExp(p,m+1,this.suppressValidationErr),G.indexOf("&")===-1){if(this.optLine truncated
|
||||
`);let p=new qe("!xml"),m=p,b="";this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let S=new $e(this.options.processEntities);for(let N=0;N<y.length;N++)if(y[N]==="<")if(y[N+1]==="/"){let k=eo(y,">",N,"Closing Tag is not closed."),R=y.substring(N+2,k).trim();if(this.options.removeNSPrefix){let q=R.indexOf(":");q!==-1&&(R=R.substr(q+1))}this.options.transformTagName&&(R=this.options.transformTagName(R)),m&&(b=this.saveTextToParentTag(b,m,this.matcher));let M=this.matcher.getCurrentTag();if(R&&this.options.unpairedTags.indexOf(R)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${R}>`);M&&this.options.unpairedTags.indexOf(M)!==-1&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,m=this.tagsNodeStack.pop(),b="",N=k}else if(y[N+1]==="?"){let k=My(y,N,!1,"?>");if(!k)throw new Error("Pi Tag is not closed.");if(b=this.saveTextToParentTag(b,m,this.matcher),!(this.options.ignoreDeclaration&&k.tagName==="?xml"||this.options.ignorePiTags)){let R=new qe(k.tagName);R.add(this.options.textNodeName,""),k.tagName!==k.tagExp&&k.attrExpPresent&&(R[":@"]=this.buildAttributesMap(k.tagExp,this.matcher,k.tagName)),this.addChild(m,R,this.matcher,N)}N=k.closeIndex+1}else if(y.substr(N+1,3)==="!--"){let k=eo(y,"-->",N+4,"Comment is not closed.");if(this.options.commentPropName){let R=y.substring(N+4,k-2);b=this.saveTextToParentTag(b,m,this.matcher),m.add(this.options.commentPropName,[{[this.options.textNodeName]:R}])}N=k}else if(y.substr(N+1,2)==="!D"){let k=S.readDocType(y,N);this.docTypeEntities=k.entities,N=k.i}else if(y.substr(N+1,2)==="!["){let k=eo(y,"]]>",N,"CDATA is not closed.")-2,R=y.substring(N+9,k);b=this.saveTextToParentTag(b,m,this.matcher);let M=this.parseTextData(R,m.tagname,this.matcher,!0,!1,!0,!0);M==null&&(M=""),this.options.cdataPropName?m.add(this.options.cdataPropName,[{[this.options.textNodeName]:R}]):m.add(this.options.textNodeName,M),N=k+2}else{let k=My(y,N,this.options.removeNSPrefix);if(!k){let Gt=y.substring(Math.max(0,N-50),Math.min(y.length,N+50));throw new Error(`readTagExp returned undefined at position ${N}. Context: "${Gt}"`)}let R=k.tagName,M=k.rawTagName,q=k.tagExp,G=k.attrExpPresent,K=k.closeIndex;if(this.options.transformTagName){let Gt=this.options.transformTagName(R);q===R&&(q=Gt),R=Gt}if(this.options.strictReservedNames&&(R===this.options.commentPropName||R===this.options.cdataPropName))throw new Error(`Invalid tag name: ${R}`);m&&b&&m.tagname!=="!xml"&&(b=this.saveTextToParentTag(b,m,this.matcher,!1));let be=m;be&&this.options.unpairedTags.indexOf(be.tagname)!==-1&&(m=this.tagsNodeStack.pop(),this.matcher.pop());let ye=!1;q.length>0&&q.lastIndexOf("/")===q.length-1&&(ye=!0,R[R.length-1]==="/"?(R=R.substr(0,R.length-1),q=R):q=q.substr(0,q.length-1),G=R!==q);let Qe,Re=null,Kn={};Qe=Rl(M),R!==p.tagname&&this.matcher.push(R,{},Qe),R!==q&&G&&(Re=this.buildAttributesMap(q,this.matcher,R),Re&&(Kn=Vu(Re,this.options))),R!==p.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));let Mt=N;if(this.isCurrentNodeStopNode){let Gt="";if(ye)N=k.closeIndex;else if(this.options.unpairedTags.indexOf(R)!==-1)N=k.closeIndex;else{let Fy=this.readStopNodeData(y,M,K+1);if(!Fy)throw new Error(`Unexpected end of ${M}`);N=Fy.i,Gt=Fy.tagContent}let sa=new qe(R);Re&&(sa[":@"]=Re),sa.add(this.options.textNodeName,Gt),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(m,sa,this.matcher,Mt)}else{if(ye){if(this.options.transformTagName){let sa=this.options.transformTagName(R);q===R&&(q=sa),R=sa}let Gt=new qe(R);Re&&(Gt[":@"]=Re),this.addChild(m,Gt,this.matcher,Mt),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(this.options.unpairedTags.indexOf(R)!==-1){let Gt=new qe(R);Re&&(Gt[":@"]=Re),this.addChild(m,Gt,this.matcher,Mt),this.matcher.pop(),this.isCurrentNodeStopNode=!1,N=k.closeIndex;continue}{let Gt=new qe(R);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(m),Re&&(Gt[":@"]=Re),this.addChild(m,Gt,this.matcher,Mt),m=Gt}}b="",N=K}}else b+=y[N];return p.child},"Y");function f8(y,p,m,b){this.options.captureMetaData||(b=void 0);let S=this.options.jPath?m.toString():m,N=this.options.updateTag(p.tagname,S,p[":@"]);N===!1||(typeof N=="string"&&(p.tagname=N),y.addChild(p,b))}o(f8,"X");function h8(y,p,m){let b=this.options.processEntities;if(!b||!b.enabled)return y;if(b.allowedTags){let S=this.options.jPath?m.toString():m;if(!(Array.isArray(b.allowedTags)?b.allowedTags.includes(p):b.allowedTags(p,S)))return y}if(b.tagFilter){let S=this.options.jPath?m.toString():m;if(!b.tagFilter(p,S))return y}for(let S in this.docTypeEntities){let N=this.docTypeEntities[S],k=y.match(N.regx);if(k){if(this.entityExpansionCount+=k.length,b.maxTotalExpansions&&this.entityExpansionCount>b.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${b.maxTotalExpansions}`);let RLine truncated
|
||||
`);let b=[];if(p.stopNodes&&Array.isArray(p.stopNodes))for(let S=0;S<p.stopNodes.length;S++){let N=p.stopNodes[S];typeof N=="string"?b.push(new Di(N)):N instanceof Di&&b.push(N)}return kv(y,p,m,new Zs,b)}o(S8,"lt");function kv(y,p,m,b,S){let N="",k=!1;if(!Array.isArray(y)){if(y!=null){let R=y.toString();return R=Ly(R,p),R}return""}for(let R=0;R<y.length;R++){let M=y[R],q=Fv(M);if(q===void 0)continue;let G=x8(M[":@"],p);b.push(q,G);let K=R8(b,S);if(q===p.textNodeName){let Re=M[q];K||(Re=p.tagValueProcessor(q,Re),Re=Ly(Re,p)),k&&(N+=m),N+=Re,k=!1,b.pop();continue}if(q===p.cdataPropName){k&&(N+=m),N+=`<![CDATA[${M[q][0][p.textNodeName]}]]>`,k=!1,b.pop();continue}if(q===p.commentPropName){N+=m+`<!--${M[q][0][p.textNodeName]}-->`,k=!0,b.pop();continue}if(q[0]==="?"){let Re=Uv(M[":@"],p,K),Kn=q==="?xml"?"":m,Mt=M[q][0][p.textNodeName];Mt=Mt.length!==0?" "+Mt:"",N+=Kn+`<${q}${Mt}${Re}?>`,k=!0,b.pop();continue}let be=m;be!==""&&(be+=p.indentBy);let ye=m+`<${q}${Uv(M[":@"],p,K)}`,Qe;Qe=K?Lv(M[q],p):kv(M[q],p,be,b,S),p.unpairedTags.indexOf(q)!==-1?p.suppressUnpairedNode?N+=ye+">":N+=ye+"/>":Qe&&Qe.length!==0||!p.suppressEmptyNode?Qe&&Qe.endsWith(">")?N+=ye+`>${Qe}${m}</${q}>`:(N+=ye+">",Qe&&m!==""&&(Qe.includes("/>")||Qe.includes("</"))?N+=m+p.indentBy+Qe+m:N+=Qe,N+=`</${q}>`):N+=ye+"/>",k=!0,b.pop()}return N}o(kv,"pt");function x8(y,p){if(!y||p.ignoreAttributes)return null;let m={},b=!1;for(let S in y)Object.prototype.hasOwnProperty.call(y,S)&&(m[S.startsWith(p.attributeNamePrefix)?S.substr(p.attributeNamePrefix.length):S]=y[S],b=!0);return b?m:null}o(x8,"ut");function Lv(y,p){if(!Array.isArray(y))return y!=null?y.toString():"";let m="";for(let b=0;b<y.length;b++){let S=y[b],N=Fv(S);if(N===p.textNodeName)m+=S[N];else if(N===p.cdataPropName)m+=S[N][0][p.textNodeName];else if(N===p.commentPropName)m+=S[N][0][p.textNodeName];else{if(N&&N[0]==="?")continue;if(N){let k=v8(S[":@"],p),R=Lv(S[N],p);R&&R.length!==0?m+=`<${N}${k}>${R}</${N}>`:m+=`<${N}${k}/>`}}}return m}o(Lv,"ct");function v8(y,p){let m="";if(y&&!p.ignoreAttributes)for(let b in y){if(!Object.prototype.hasOwnProperty.call(y,b))continue;let S=y[b];S===!0&&p.suppressBooleanAttributes?m+=` ${b.substr(p.attributeNamePrefix.length)}`:m+=` ${b.substr(p.attributeNamePrefix.length)}="${S}"`}return m}o(v8,"dt");function Fv(y){let p=Object.keys(y);for(let m=0;m<p.length;m++){let b=p[m];if(Object.prototype.hasOwnProperty.call(y,b)&&b!==":@")return b}}o(Fv,"ft");function Uv(y,p,m){let b="";if(y&&!p.ignoreAttributes)for(let S in y){if(!Object.prototype.hasOwnProperty.call(y,S))continue;let N;m?N=y[S]:(N=p.attributeValueProcessor(S,y[S]),N=Ly(N,p)),N===!0&&p.suppressBooleanAttributes?b+=` ${S.substr(p.attributeNamePrefix.length)}`:b+=` ${S.substr(p.attributeNamePrefix.length)}="${N}"`}return b}o(Uv,"gt");function R8(y,p){if(!p||p.length===0)return!1;for(let m=0;m<p.length;m++)if(y.matches(p[m]))return!0;return!1}o(R8,"mt");function Ly(y,p){if(y&&y.length>0&&p.processEntities)for(let m=0;m<p.entities.length;m++){let b=p.entities[m];y=y.replace(b.regex,b.val)}return y}o(Ly,"xt");let _8={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(y,p){return p},attributeValueProcessor:function(y,p){return p},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,jPath:!0};function nn(y){if(this.options=Object.assign({},_8,y),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(m=>typeof m=="string"&&m.startsWith("*.")?".."+m.substring(2):m)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let m=0;m<this.options.stopNodes.length;m++){let b=this.options.stopNodes[m];typeof b=="string"?this.stopNodeExpressions.push(new Di(b)):b instanceof Di&&this.stopNodeExpressions.push(b)}var p;this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=typeof(p=this.options.ignoreAttributes)=="function"?p:Array.isArray(p)?m=>{for(let b of p)if(typeof b=="string"&&m===b||b instanceof RegExp&&b.test(m))return!0}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=T8),this.processTextOrObjNode=P8,this.options.format?(this.indentate=D8,this.tagEndChar=`>
|
||||
`,this.newLine=`
|
||||
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}o(nn,"bt");function P8(y,p,m,b){let S=this.extractAttributes(y);if(b.push(p,S),this.checkStopNode(b)){let k=this.buildRawContent(y),R=this.buildAttributesForStopNode(y);return b.pop(),this.buildObjectNode(k,p,R,m)}let N=this.j2x(y,m+1,b);return b.pop(),y[this.options.textNodeName]!==void 0&&Object.keys(y).length===1?this.buildTextValNode(y[this.options.textNodeName],p,N.attrStr,m,b):this.buildObjectNode(N.val,p,N.attrStr,m)}o(P8,"Et");function D8(y){return this.options.indentBy.repeat(y)}o(D8,"yt");function T8(y){return!(!y.startsWith(this.options.attributeNamePrefix)||y===this.options.textNodeName)&&y.substr(this.attrPrefixLen)}o(T8,"wt"),nn.prototype.build=function(y){if(this.options.preserveOrder)return S8(y,this.options);{Array.isArray(y)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(y={[this.options.arrayNodeName]:y});let p=new Zs;return this.j2x(y,0,p).val}},nn.prototype.j2x=function(y,p,m){let b="",S="",N=this.options.jPath?m.toString():m,k=this.checkStopNode(m);for(let R in y)if(Object.prototype.hasOwnProperty.call(y,R))if(y[R]===void 0)this.isAttribute(R)&&(S+="");else if(y[R]===null)this.isAttribute(R)||R===this.options.cdataPropName?S+="":R[0]==="?"?S+=this.indentate(p)+"<"+R+"?"+this.tagEndChar:S+=this.indentate(p)+"<"+R+"/"+this.tagEndChar;else if(y[R]instanceof Date)S+=this.buildTextValNode(y[R],R,"",p,m);else if(typeof y[R]!="object"){let M=this.isAttribute(R);if(M&&!this.ignoreAttributesFn(M,N))b+=this.buildAttrPairStr(M,""+y[R],k);else if(!M)if(R===this.options.textNodeName){let q=this.options.tagValueProcessor(R,""+y[R]);S+=this.replaceEntitiesValue(q)}else{m.push(R);let q=this.checkStopNode(m);if(m.pop(),q){let G=""+y[R];S+=G===""?this.indentate(p)+"<"+R+this.closeTag(R)+this.tagEndChar:this.indentate(p)+"<"+R+">"+G+"</"+R+this.tagEndChar}else S+=this.buildTextValNode(y[R],R,"",p,m)}}else if(Array.isArray(y[R])){let M=y[R].length,q="",G="";for(let K=0;K<M;K++){let be=y[R][K];if(be!==void 0)if(be===null)R[0]==="?"?S+=this.indentate(p)+"<"+R+"?"+this.tagEndChar:S+=this.indentate(p)+"<"+R+"/"+this.tagEndChar;else if(typeof be=="object")if(this.options.oneListGroup){m.push(R);let ye=this.j2x(be,p+1,m);m.pop(),q+=ye.val,this.options.attributesGroupName&&be.hasOwnProperty(this.options.attributesGroupName)&&(G+=ye.attrStr)}else q+=this.processTextOrObjNode(be,R,p,m);else if(this.options.oneListGroup){let ye=this.options.tagValueProcessor(R,be);ye=this.replaceEntitiesValue(ye),q+=ye}else{m.push(R);let ye=this.checkStopNode(m);if(m.pop(),ye){let Qe=""+be;q+=Qe===""?this.indentate(p)+"<"+R+this.closeTag(R)+this.tagEndChar:this.indentate(p)+"<"+R+">"+Qe+"</"+R+this.tagEndChar}else q+=this.buildTextValNode(be,R,"",p,m)}}this.options.oneListGroup&&(q=this.buildObjectNode(q,R,G,p)),S+=q}else if(this.options.attributesGroupName&&R===this.options.attributesGroupName){let M=Object.keys(y[R]),q=M.length;for(let G=0;G<q;G++)b+=this.buildAttrPairStr(M[G],""+y[R][M[G]],k)}else S+=this.processTextOrObjNode(y[R],R,p,m);return{attrStr:b,val:S}},nn.prototype.buildAttrPairStr=function(y,p,m){return m||(p=this.options.attributeValueProcessor(y,""+p),p=this.replaceEntitiesValue(p)),this.options.suppressBooleanAttributes&&p==="true"?" "+y:" "+y+'="'+p+'"'},nn.prototype.extractAttributes=function(y){if(!y||typeof y!="object")return null;let p={},m=!1;if(this.options.attributesGroupName&&y[this.options.attributesGroupName]){let b=y[this.options.attributesGroupName];for(let S in b)Object.prototype.hasOwnProperty.call(b,S)&&(p[S.startsWith(this.options.attributeNamePrefix)?S.substring(this.options.attributeNamePrefix.length):S]=b[S],m=!0)}else for(let b in y){if(!Object.prototype.hasOwnProperty.call(y,b))continue;let S=this.isAttribute(b);S&&(p[S]=y[b],m=!0)}return m?p:null},nn.prototype.buildRawContent=function(y){if(typeof y=="string")return y;if(typeof y!="object"||y===null)return String(y);if(y[this.options.textNodeName]!==void 0)return y[this.options.textNodeName];let p="";for(let m in y){if(!Object.prototype.hasOwnProperty.call(y,m)||this.isAttribute(m)||this.options.attributesGroupName&&m===this.options.attributesGroupName)continue;let b=y[m];if(m===this.options.textNodeName)p+=b;else if(Array.isArray(b)){for(let S of b)if(typeof S=="string"||typeof S=="number")p+=`<${m}>${S}</${m}>`;else if(typeof S=="object"&&S!==null){let N=this.buildRawContent(S),k=this.buildAttributesForStopNode(S);p+=N===""?`<${m}${k}/>`:`<${m}${k}>${N}</${m}>`}}else if(typeof b=="object"&&b!==null){let S=this.buildRawContent(b),N=this.buildAttributesForStopNode(b);p+=S===""?`<${m}${N}/>`:`<${m}${N}>${S}</${m}>`}else p+=`<${m}>${b}</${m}>`}return p},nn.prototype.buildAttributesForStopNode=function(y){if(!y||typeof y!="object")return"";let p="";if(this.options.attributesGroupName&&y[this.options.attributesGroupName]){let m=y[this.options.attributesGroupName];for(let b in m){if(!Object.prototype.hasOwnProperty.call(m,b))continue;let S=b.startsWit
Line truncated
|
||||
`)+`
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),i=this.factory.computeHMACSHA256(a);return e.headers.set(Ie.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${i}`),e}getHeaderValueToSign(e,a){let i=e.headers.get(a);return!i||a===Ie.CONTENT_LENGTH&&i==="0"?"":i}getCanonicalizedHeadersString(e){let a=e.headers.headersArray().filter(r=>r.name.toLowerCase().startsWith(Ie.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=H0(e.url)||"/",i="";i+=`/${this.factory.accountName}${a}`;let r=PM(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}},Ke=class extends Do{static{o(this,"StorageSharedKeyCredential")}constructor(e,a){super(),this.accountName=e,this.accountKey=Buffer.from(a,"base64")}create(e,a){return new Hl(e,a,this)}computeHMACSHA256(e){return Uy.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}},VM="azure-storage-blob",$M="12.15.0",Bo=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=`${VM}/${$M} ${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"}},Ao=class{static{o(this,"StorageClient")}constructor(e,a){this.url=_M(e),this.accountName=lx(e),this.pipeline=a,this.storageClientContext=new Bo(this.url,a.toServiceClientOptions()),this.isHttps=dx(TM(this.url)||"","https"),this.credential=new Oe;for(let r of this.pipeline.factories)z.isNode&&r instanceof Ke||r instanceof Oe?this.credential=r:z.isTokenCredential(r.credential)&&(this.credential=r.credential);let i=this.storageClientContext;i.requestContentType=void 0}},k=L.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 Si=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("")}},Ei=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("")}},Zf=class{static{o(this,"UserDelegationKeyCredential")}constructor(e,a){this.accountName=e,this.userDelegationKey=a,this.key=Buffer.from(a.value,"base64")}computeHMACSHA256(e){return Uy.createHmac("sha256",this.key).update(e,"utf8").digest("base64")}};function Ci(t){return t.end?`${t.start}-${t.end}`:t.start}o(Ci,"ipRangeToString");Z.SASProtocol=void 0;(function(t){t.Https="https",t.HttpsAndHttp="https,http"})(Z.SASProtocol||(Z.SASProtocol={}));var ai=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 ai(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(GM,"generateBlobSASQueryParameters20150405");function XM(t,e){if(t=ts(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=Si.parse(t.permissions.toString()).toString():r=Ei.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?_e(t.startsOn,!1):"",t.expiresOn?_e(t.expiresOn,!1):"",es(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ci(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 ai(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(XM,"generateBlobSASQueryParameters20181109");function WM(t,e){if(t=ts(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=Si.parse(t.permissions.toString()).toString():r=Ei.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?_e(t.startsOn,!1):"",t.expiresOn?_e(t.expiresOn,!1):"",es(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ci(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 ai(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(WM,"generateBlobSASQueryParameters20201206");function KM(t,e){if(t=ts(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=Si.parse(t.permissions.toString()).toString():r=Ei.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?_e(t.startsOn,!1):"",t.expiresOn?_e(t.expiresOn,!1):"",es(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?_e(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?_e(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Ci(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 ai(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(KM,"generateBlobSASQueryParametersUDK20181109");function YM(t,e){if(t=ts(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=Si.parse(t.permissions.toString()).toString():r=Ei.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?_e(t.startsOn,!1):"",t.expiresOn?_e(t.expiresOn,!1):"",es(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?_e(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?_e(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ci(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 ai(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(YM,"generateBlobSASQueryParametersUDK20200210");function QM(t,e){if(t=ts(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=Si.parse(t.permissions.toString()).toString():r=Ei.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?_e(t.startsOn,!1):"",t.expiresOn?_e(t.expiresOn,!1):"",es(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?_e(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?_e(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ci(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 ai(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(QM,"generateBlobSASQueryParametersUDK20201206");function es(t,e,a){let i=[`/blob/${t}/${e}`];return a&&i.push(`/${a}`),i.join("")}o(es,"getCanonicalName");function ts(t){let e=t.version?t.version:j0;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(ts,"SASSignatureValuesSanityCheckAndAutofill");var Mo=class{static{o(this,"BlobLeaseClient")}constructor(e,a){let i=new Bo(e.url,e.pipeline.toServiceClientOptions());this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=new Lr(i)):(this._isContainer=!1,this._containerOrBlobOperation=new Oo(i)),a||(a=z.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}=k("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)!==ti||!((n=a.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=a.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==ti||!((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:L.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}=k("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)!==ti||!((n=a.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=a.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==ti||!((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:L.SpanStatusCode.ERROR,message:m.message}),m}finally{l.end()}}async releaseLease(e={}){var a,i,r,n,s,p;let{span:d,updatedOptions:l}=k("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)!==ti||!((r=e.conditions)===null||r===void 0)&&r.ifNoneMatch&&((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==ti||!((s=e.conditions)===null||s===void 0)&&s.tagCon
Line truncated
|
||||
`):s=[e.accountName,i,r,n,t.startsOn?_e(t.startsOn,!1):"",_e(t.expiresOn,!1),t.ipRange?Ci(t.ipRange):"",t.protocol?t.protocol:"",a,""].join(`
|
||||
`);let p=e.computeHMACSHA256(s);return new ai(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(mx,"generateAccountSASQueryParameters");var N0=class t extends Ao{static{o(this,"BlobServiceClient")}constructor(e,a,i){let r;pr(a)?r=a:z.isNode&&a instanceof Ke||a instanceof Oe||z.isTokenCredential(a)?r=Re(a,i):r=Re(new Oe,i),super(e,r),this.serviceContext=new Ml(this.storageClientContext)}static fromConnectionString(e,a){a=a||{};let i=Zn(e);if(i.kind==="AccountConnString")if(z.isNode){let r=new Ke(i.accountName,i.accountKey);a.proxyOptions||(a.proxyOptions=z.getDefaultProxySettings(i.proxyUri));let n=Re(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=Re(new Oe,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 Vl(je(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,a={}){let{span:i,updatedOptions:r}=k("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:L.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async deleteContainer(e,a={}){let{span:i,updatedOptions:r}=k("BlobServiceClient-deleteContainer",a);try{return await this.getContainerClient(e).delete(r)}catch(n){throw i.setStatus({code:L.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async undeleteContainer(e,a,i={}){let{span:r,updatedOptions:n}=k("BlobServiceClient-undeleteContainer",i);try{let s=this.getContainerClient(i.destinationContainerName||e),d=await new Lr(s.storageClientContext).restore(Object.assign({deletedContainerName:e,deletedContainerVersion:a},n));return{containerClient:s,containerUndeleteResponse:d}}catch(s){throw r.setStatus({code:L.SpanStatusCode.ERROR,message:s.message}),s}finally{r.end()}}async renameContainer(e,a,i={}){var r;let{span:n,updatedOptions:s}=k("BlobServiceClient-renameContainer",i);try{let p=this.getContainerClient(a),l=await new Lr(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:L.SpanStatusCode.ERROR,message:p.message}),p}finally{n.end()}}async getProperties(e={}){let{span:a,updatedOptions:i}=k("BlobServiceClient-getProperties",e);try{return await this.serviceContext.getProperties(Object.assign({abortSignal:e.abortSignal},W(i)))}catch(r){throw a.setStatus({code:L.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async setProperties(e,a={}){let{span:i,updatedOptions:r}=k("BlobServiceClient-setProperties",a);try{return await this.serviceContext.setProperties(e,Object.assign({abortSignal:a.abortSignal},W(r)))}catch(n){throw i.setStatus({code:L.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async getStatistics(e={}){let{span:a,updatedOptions:i}=k("BlobServiceClient-getStatistics",e);try{return await this.serviceContext.getStatistics(Object.assign({abortSignal:e.abortSignal},W(i)))}catch(r){throw a.setStatus({code:L.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async getAccountInfo(e={}){let{span:a,updatedOptions:i}=k("BlobServiceClient-getAccountInfo",e);try{return await this.serviceContext.getAccountInfo(Object.assign({abortSignal:e.abortSignal},W(i)))}catch(r){throw a.setStatus({code:L.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async listContainersSegment(e,a={}){let{span:i,updatedOptions:r}=k("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:L.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async findBlobsByTagsSegment(e,a,i={}){let{span:r,updatedOptions:n}=k("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:Eo(d.tags),tagValue:c})})})}catch(s){throw r.setStatus({code:L.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"}};Qt.NetworkError=Zl;Zl.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var ec=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"}};Qt.UsageError=ec;ec.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1});var ux=T(Jt=>{"use strict";var lq=Jt&&Jt.__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]}),cq=Jt&&Jt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mq=Jt&&Jt.__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)&&lq(e,t,a);return cq(e,t),e},uq=Jt&&Jt.__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(Jt,"__esModule",{value:!0});Jt.uploadCacheArchiveSDK=Jt.UploadProgress=void 0;var J0=mq(Ut()),fq=G0(),hq=Q0(),tc=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);J0.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()}};Jt.UploadProgress=tc;function gq(t,e,a){var i;return uq(this,void 0,void 0,function*(){let r=new fq.BlobClient(t),n=r.getBlockBlobClient(),s=new tc((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(),J0.debug(`BlobClient: ${r.name}:${r.accountName}:${r.containerName}`);let d=yield n.uploadFile(e,p);if(d._response.status>=400)throw new hq.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${d._response.status}`);return d}catch(d){throw J0.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${d.message}`),d}finally{s.stopDisplayTimer()}})}o(gq,"uploadCacheArchiveSDK");Jt.uploadCacheArchiveSDK=gq});var e2=T(Ye=>{"use strict";var yq=Ye&&Ye.__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]}),vq=Ye&&Ye.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bq=Ye&&Ye.__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)&&yq(e,t,a);return vq(e,t),e},ic=Ye&&Ye.__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(Ye,"__esModule",{value:!0});Ye.retryHttpClientResponse=Ye.retryTypedResponse=Ye.retry=Ye.isRetryableStatusCode=Ye.isServerErrorStatusCode=Ye.isSuccessStatusCode=void 0;var fx=bq(Ut()),ac=tn(),as=ln();function xq(t){return t?t>=200&&t<300:!1}o(xq,"isSuccessStatusCode");Ye.isSuccessStatusCode=xq;function hx(t){return t?t>=500:!0}o(hx,"isServerErrorStatusCode");Ye.isServerErrorStatusCode=hx;function gx(t){return t?[ac.HttpCodes.BadGateway,ac.HttpCodes.ServiceUnavailable,ac.HttpCodes.GatewayTimeout].includes(t):!1}o(gx,"isRetryableStatusCode");Ye.isRetryableStatusCode=gx;function wq(t){return ic(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(wq,"sleep");function Z0(t,e,a,i=as.DefaultRetryAttempts,r=as.DefaultRetryDelay,n=
Line truncated
|
||||
Other caches with similar key:`);for(let p of n?.artifactCaches||[])pa.debug(`Cache Key: ${p?.cacheKey}, Cache Version: ${p?.cacheVersion}, Cache Scope: ${p?.scope}, Cache Created: ${p?.creationTime}`)}}})}o(iz,"printCachesListForDiagnostics");function rz(t,e,a){return Zt(this,void 0,void 0,function*(){let i=new Yq.URL(t),r=(0,n2.getDownloadOptions)(a);i.hostname.endsWith(".blob.core.windows.net")?r.useAzureSdk?yield(0,sc.downloadCacheStorageSDK)(t,e,r):r.concurrentBlobDownloads?yield(0,sc.downloadCacheHttpClientConcurrent)(t,e,r):yield(0,sc.downloadCacheHttpClient)(t,e):yield(0,sc.downloadCacheHttpClient)(t,e)})}o(rz,"downloadCache");St.downloadCache=rz;function nz(t,e,a){return Zt(this,void 0,void 0,function*(){let i=s2(),r=rs.getCacheVersion(e,a?.compressionMethod,a?.enableCrossOsArchive),n={key:t,version:r,cacheSize:a?.cacheSize};return yield(0,lr.retryTypedResponse)("reserveCache",()=>Zt(this,void 0,void 0,function*(){return i.postJson(Wo("caches"),n)}))})}o(nz,"reserveCache");St.reserveCache=nz;function Cx(t,e){return`bytes ${t}-${e}/*`}o(Cx,"getContentRange");function sz(t,e,a,i,r){return Zt(this,void 0,void 0,function*(){pa.debug(`Uploading chunk of size ${r-i+1} bytes at offset ${i} with content range: ${Cx(i,r)}`);let n={"Content-Type":"application/octet-stream","Content-Range":Cx(i,r)},s=yield(0,lr.retryHttpClientResponse)(`uploadChunk (start: ${i}, end: ${r})`,()=>Zt(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,a(),n)}));if(!(0,lr.isSuccessStatusCode)(s.message.statusCode))throw new Error(`Cache service responded with ${s.message.statusCode} during upload chunk.`)})}o(sz,"uploadChunk");function oz(t,e,a,i){return Zt(this,void 0,void 0,function*(){let r=rs.getArchiveFileSizeInBytes(a),n=Wo(`caches/${e.toString()}`),s=i2.openSync(a,"r"),p=(0,n2.getUploadOptions)(i),d=rs.assertDefined("uploadConcurrency",p.uploadConcurrency),l=rs.assertDefined("uploadChunkSize",p.uploadChunkSize),c=[...new Array(d).keys()];pa.debug("Awaiting all uploads");let m=0;try{yield Promise.all(c.map(()=>Zt(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 sz(t,n,()=>i2.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{i2.closeSync(s)}})}o(oz,"uploadFile");function pz(t,e,a){return Zt(this,void 0,void 0,function*(){let i={size:a};return yield(0,lr.retryTypedResponse)("commitCache",()=>Zt(this,void 0,void 0,function*(){return t.postJson(Wo(`caches/${e.toString()}`),i)}))})}o(pz,"commitCache");function dz(t,e,a,i){return Zt(this,void 0,void 0,function*(){if((0,n2.getUploadOptions)(i).useAzureSdk){if(!a)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield(0,Qq.uploadCacheArchiveSDK)(a,e,i)}else{let n=s2();pa.debug("Upload cache"),yield oz(n,t,e,i),pa.debug("Commiting cache");let s=rs.getArchiveFileSizeInBytes(e);pa.info(`Cache Size: ~${Math.round(s/(1024*1024))} MB (${s} B)`);let p=yield pz(n,t,s);if(!(0,lr.isSuccessStatusCode)(p.statusCode))throw new Error(`Cache service responded with ${p.statusCode} during commit cache.`);pa.info("Cache saved successfully")}})}o(dz,"saveCache");St.saveCache=dz});var oc=T(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.isJsonObject=ns.typeofJsonValue=void 0;function lz(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}o(lz,"typeofJsonValue");ns.typeofJsonValue=lz;function cz(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}o(cz,"isJsonObject");ns.isJsonObject=cz});var dc=T(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.base64encode=ss.base64decode=void 0;var Ri="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),pc=[];for(let t=0;t<Ri.length;t++)pc[Ri[t].charCodeAt(0)]=t;pc["-".charCodeAt(0)]=Ri.indexOf("+");pc["_".charCodeAt(0)]=Ri.indexOf("/");function mz(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=pc[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(mz,"base64decode");ss.base64decode=mz;function uz(t){let e="",a=0,i,r=0;for(let n=0;n<t.length;n++)switch(i=t[n],a){case 0:e+=Ri[i>>2],r=(i&3)<<4,a=1;break;case 1:e+=Ri[r|i>>4],r=(i&15)<<2,a=2;break;case 2:e+=Ri[r|i>>6],e+=Ri[i&63],a=0;break}return a&&(e+=Ri[r],e+="=",a==1&&(e+="=")),e}o(uz,"base64encode");ss.base64encode=uz});var Ox=T(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});lc.utf8read=void 0;var o2=o(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function fz(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(o2(i)),r=0);return a.length?(r&&a.push(o2(i.slice(0,r))),a.join("")):o2(i.slice(0,r))}o(fz,"utf8read");lc.utf8read=fz});var Ko=T(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.WireType=ri.mergeBinaryOptions=ri.UnknownFieldHandler=void 0;var hz;(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")})(hz=ri.UnknownFieldHandler||(ri.UnknownFieldHandler={}));function gz(t,e){return Object.assign(Object.assign({},t),e)}o(gz,"mergeBinaryOptions");ri.mergeBinaryOptions=gz;var yz;(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"})(yz=ri.WireType||(ri.WireType={}))});var mc=T(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.varint32read=ea.varint32write=ea.int64toString=ea.int64fromString=ea.varint64write=ea.varint64read=void 0;function vz(){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(vz,"varint64read");ea.varint64read=vz;function bz(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(bz,"varint64write");ea.varint64write=bz;var cc=65536*65536;function xz(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>=cc&&(r=r+(i/cc|0),i=i%cc)}return o(n,"add1e6digit"),n(-24,-18),n(-18,-12),n(-12,-6),n(-6),[e,i,r]}o(xz,"int64fromString");ea.int64fromString=xz;function wz(t,e){if(e>>>0<=2097151)return""+(cc*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(wz,"int64toString");ea.int64toString=wz;function Nz(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(Nz,"varint32write");ea.varint32write=Nz;function _z(){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(_z,"varint32read");ea.varint32read=_z});var mr=T(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.PbLong=cr.PbULong=cr.detectBi=void 0;var Yo=mc(),De;function Px(){let t=new DataView(new ArrayBuffer(8));De=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
|
||||
`)}};kc.RpcError=A2});var q2=T(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.mergeRpcOptions=void 0;var sw=nt();function $L(t,e){if(!e)return t;let a={};jc(t,a),jc(e,a);for(let i of Object.keys(e)){let r=e[i];switch(i){case"jsonOptions":a.jsonOptions=sw.mergeJsonOptions(t.jsonOptions,a.jsonOptions);break;case"binaryOptions":a.binaryOptions=sw.mergeBinaryOptions(t.binaryOptions,a.binaryOptions);break;case"meta":a.meta={},jc(t.meta,a.meta),jc(e.meta,a.meta);break;case"interceptors":a.interceptors=t.interceptors?t.interceptors.concat(r):r.concat();break}}return a}o($L,"mergeRpcOptions");Uc.mergeRpcOptions=$L;function jc(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(jc,"copy")});var L2=T(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.Deferred=Xr.DeferredState=void 0;var oi;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(oi=Xr.DeferredState||(Xr.DeferredState={}));var z2=class{static{o(this,"Deferred")}constructor(e=!0){this._state=oi.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!==oi.PENDING)throw new Error(`cannot resolve ${oi[this.state].toLowerCase()}`);this._resolve(e),this._state=oi.RESOLVED}reject(e){if(this.state!==oi.PENDING)throw new Error(`cannot reject ${oi[this.state].toLowerCase()}`);this._reject(e),this._state=oi.REJECTED}resolvePending(e){this._state===oi.PENDING&&this.resolve(e)}rejectPending(e){this._state===oi.PENDING&&this.reject(e)}};Xr.Deferred=z2});var j2=T(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.RpcOutputStreamController=void 0;var ow=L2(),Wr=nt(),k2=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){Wr.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){Wr.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){Wr.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(){Wr.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;Wr.assert(e,"bad state"),Wr.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 ow.Deferred,e.p.promise)}}}pushIt(e){let a=this._itState;if(a)if(a.p){let i=a.p;Wr.assert(i.state==ow.DeferredState.PENDING,"iterator contract broken"),"value"in e?i.resolve(e):i.reject(e),delete a.p}else a.q.push(e)}};Hc.RpcOutputStreamController=k2});var H2=T(us=>{"use strict";var GL=us&&us.__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(us,"__esModule",{value:!0});us.UnaryCall=void 0;var U2=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 GL(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}})}};us.UnaryCall=U2});var V2=T(fs=>{"use strict";var XL=fs&&fs.__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 mh(a,"create");yield uh(i,t)})}o(Uk,"createTar");Mt.createTar=Uk});var Pw=T(st=>{"use strict";var Hk=st&&st.__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]}),Fk=st&&st.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lp=st&&st.__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)&&Hk(e,t,a);return Fk(e,t),e},Ps=st&&st.__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(st,"__esModule",{value:!0});st.saveCache=st.restoreCache=st.isFeatureAvailable=st.ReserveCacheError=st.ValidationError=void 0;var re=lp(Ut()),Yc=lp(require("path")),Le=lp(mn()),Os=lp(Tx()),Tw=lp(_w()),Qc=rc(),hr=Cw(),Vk=ln(),Ta=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};st.ValidationError=Ta;var Kr=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};st.ReserveCacheError=Kr;function Ow(t){if(!t||t.length===0)throw new Ta("Path Validation Error: At least one directory or file path is required")}o(Ow,"checkPaths");function fh(t){if(t.length>512)throw new Ta(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Ta(`Key Validation Error: ${t} cannot contain commas.`)}o(fh,"checkKey");function $k(){return!!process.env.ACTIONS_CACHE_URL}o($k,"isFeatureAvailable");st.isFeatureAvailable=$k;function Gk(t,e,a,i,r=!1){return Ps(this,void 0,void 0,function*(){let n=(0,Qc.getCacheServiceVersion)();switch(re.debug(`Cache service version: ${n}`),Ow(t),n){case"v2":return yield Wk(t,e,a,i,r);case"v1":default:return yield Xk(t,e,a,i,r)}})}o(Gk,"restoreCache");st.restoreCache=Gk;function Xk(t,e,a,i,r=!1){return Ps(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 Ta("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of n)fh(d);let s=yield Le.getCompressionMethod(),p="";try{let d=yield Os.getCacheEntry(n,t,{compressionMethod:s,enableCrossOsArchive:r});if(!d?.archiveLocation)return;if(i?.lookupOnly)return re.info("Lookup only - skipping download"),d.cacheKey;p=Yc.join(yield Le.createTempDirectory(),Le.getCacheFileName(s)),re.debug(`Archive Path: ${p}`),yield Os.downloadCache(d.archiveLocation,p,i),re.isDebug()&&(yield(0,hr.listTar)(p,s));let l=Le.getArchiveFileSizeInBytes(p);return re.info(`Cache Size: ~${Math.round(l/(1024*1024))} MB (${l} B)`),yield(0,hr.extractTar)(p,s),re.info("Cache restored successfully"),d.cacheKey}catch(d){if(d.name===Ta.name)throw d;re.warning(`Failed to restore: ${d.message}`)}finally{try{yield Le.unlinkFile(p)}catch(d){re.debug(`Failed to delete archive: ${d}`)}}})}o(Xk,"restoreCacheV1");function Wk(t,e,a,i,r=!1){return Ps(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 Ta("Key Validation Error: Keys are limited to a maximum of 10.");for(let p of n)fh(p);let s="";try{let p=Tw.internalCacheTwirpClient(),d=yield Le.getCompressionMethod(),l={key:e,restoreKeys:a,version:Le.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=Yc.join(yield Le.createTempDirectory(),Le.getCacheFileName(d)),re.debug(`Archive path: ${s}`),re.debug(`Starting download of archive to: ${s}`),yield Os.downloadCache(c.signedDownloadUrl,s,i);let m=Le.getArchiveFileSizeInBytes(s);return re.info(`Cache Size: ~${Math.round(m/(1024*1024))} MB (${m} B)`),re.isDebug()&&(yield(0,hr.listTar)(s,d)),yield(0,hr.extractTar)(s,d),re.info("Cache restored successfully"),c.matchedKey}catch(p){if(p.name===Ta.name)throw p;re.warning(`Failed to restore: ${p.message}`)}finally{try{s&&(yield Le.unlinkFile(s))}catch(p){re.debug(`Failed to delete archive: ${p}`)}}})}o(Wk,"restoreCacheV2");function Kk(t,e,a,i=!1){return Ps(this,void 0,void 0,function*(){let r=(0,Qc.getCacheServiceVersion)();switch(re.debug(`Cache servLine truncated
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(ir.HeaderConstants.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===ir.HeaderConstants.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(i=>i.name.toLowerCase().startsWith(ir.HeaderConstants.PREFIX_FOR_STORAGE));r.sort((i,s)=>(0,zRe.compareHeader)(i.name.toLowerCase(),s.name.toLowerCase())),r=r.filter((i,s,a)=>!(s>0&&i.name.toLowerCase()===a[s-1].name.toLowerCase()));let n="";return r.forEach(i=>{n+=`${i.name.toLowerCase().trimRight()}:${i.value.trimLeft()}
|
||||
`}),n}getCanonicalizedResourceString(e){let r=(0,sW.getURLPath)(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let i=(0,sW.getURLQueries)(e.url),s={};if(i){let a=[];for(let c in i)if(Object.prototype.hasOwnProperty.call(i,c)){let l=c.toLowerCase();s[l]=i[c],a.push(l)}a.sort();for(let c of a)n+=`
|
||||
${c}:${decodeURIComponent(s[c])}`}return n}};ef.StorageSharedKeyCredentialPolicy=g0});var oW=h(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.StorageSharedKeyCredential=void 0;var jRe=require("node:crypto"),GRe=f0(),YRe=Xg(),h0=class extends YRe.Credential{static{o(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new GRe.StorageSharedKeyCredentialPolicy(e,r,this)}computeHMACSHA256(e){return(0,jRe.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};tf.StorageSharedKeyCredential=h0});var aW=h(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.AbortError=void 0;var y0=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};rf.AbortError=y0});var C0=h(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.AbortError=void 0;var JRe=aW();Object.defineProperty(nf,"AbortError",{enumerable:!0,get:function(){return JRe.AbortError}})});var E0=h(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.logger=void 0;var VRe=Qc();sf.logger=(0,VRe.createClientLogger)("storage-common")});var B0=h(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.StorageRetryPolicyType=void 0;var cW;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(cW||(of.StorageRetryPolicyType=cW={}))});var AW=h(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.StorageRetryPolicy=void 0;gu.NewRetryPolicyFactory=$Re;var WRe=C0(),KRe=mu(),lW=es(),I0=Lo(),ks=E0(),b0=B0();function $Re(t){return{create:(e,r)=>new af(e,r,t)}}o($Re,"NewRetryPolicyFactory");var Ls={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:b0.StorageRetryPolicyType.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},XRe=new WRe.AbortError("The operation was aborted."),af=class extends KRe.BaseRequestPolicy{static{o(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,n=Ls){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:Ls.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):Ls.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:Ls.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:Ls.maxRetryDelayInMs):Ls.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:Ls.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:Ls.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let i=e.clone(),s=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;s||(i.url=(0,I0.setURLHost)(i.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(i.url=(0,I0.setURLParameter)(i.url,lW.URLConstants.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(ks.logger.info(`RetryPolicy: =====> Try=${n} ${s?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(i),!this.shouldRetry(s,n,a))return a;r=r||!s&&a.status===404}catch(c){if(ks.logger.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(s,n,a,c))throw c}return await this.delay(s,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,i){if(r>=this.retryOptions.maxTries)return ks.logger.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let s=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(i){for(let a of s)if(i.name.toUpperCase().includes(a)||i.message.toUpperCase().includes(a)||i.code&&i.code.toString().toUpperCase()===a)return ks.logger.info(`RetryPolicy: Network error ${a} found, will retry.`),!0}if(n||i){let a=n?n.status:i?i.statusCode:0;if(!e&&a===404)return ks.logger.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return ks.logger.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(n&&n?.status>=400){let a=n.headers.get(lW.HeaderConstants.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return i?.code==="PARSE_ERROR"&&i?.message.startsWith('Error "Error: Unclosed root tag')?(ks.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let i=0;if(e)switch(this.retryOptions.retryPolicyType){case b0.StorageRetryPolicyType.EXPONENTIAL:i=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case b0.StorageRetryPolicyType.FIXED:i=this.retryOptions.retryDelayInMs;break}else i=Math.random()*1e3;return ks.logger.info(`RetryPolicy: Delay for ${i}ms`),(0,I0.
Line truncated
|
||||
`)+`
|
||||
`+n(s)+i(s),c=(0,A_e.createHmac)("sha256",t.accountKey).update(a,"utf8").digest("base64");s.headers.set(sr.HeaderConstants.AUTHORIZATION,`SharedKey ${t.accountName}:${c}`)}o(e,"signRequest");function r(s,a){let c=s.headers.get(a);return!c||a===sr.HeaderConstants.CONTENT_LENGTH&&c==="0"?"":c}o(r,"getHeaderValueToSign");function n(s){let a=[];for(let[l,A]of s.headers)l.toLowerCase().startsWith(sr.HeaderConstants.PREFIX_FOR_STORAGE)&&a.push({name:l,value:A});a.sort((l,A)=>(0,u_e.compareHeader)(l.name.toLowerCase(),A.name.toLowerCase())),a=a.filter((l,A,u)=>!(A>0&&l.name.toLowerCase()===u[A-1].name.toLowerCase()));let c="";return a.forEach(l=>{c+=`${l.name.toLowerCase().trimRight()}:${l.value.trimLeft()}
|
||||
`}),c}o(n,"getCanonicalizedHeadersString");function i(s){let a=(0,fW.getURLPath)(s.url)||"/",c="";c+=`/${t.accountName}${a}`;let l=(0,fW.getURLQueries)(s.url),A={};if(l){let u=[];for(let d in l)if(Object.prototype.hasOwnProperty.call(l,d)){let g=d.toLowerCase();A[g]=l[d],u.push(g)}u.sort();for(let d of u)c+=`
|
||||
${d}:${decodeURIComponent(A[d])}`}return c}return o(i,"getCanonicalizedResourceString"),{name:Hc.storageSharedKeyCredentialPolicyName,async sendRequest(s,a){return e(s),a(s)}}}o(d_e,"storageSharedKeyCredentialPolicy")});var yW=h(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.storageRequestFailureDetailsParserPolicyName=void 0;zc.storageRequestFailureDetailsParserPolicy=p_e;zc.storageRequestFailureDetailsParserPolicyName="storageRequestFailureDetailsParserPolicy";function p_e(){return{name:zc.storageRequestFailureDetailsParserPolicyName,async sendRequest(t,e){try{return await e(t)}catch(r){throw typeof r=="object"&&r!==null&&r.response&&r.response.parsedBody&&r.response.parsedBody.code==="InvalidHeaderValue"&&r.response.parsedBody.HeaderName==="x-ms-version"&&(r.message=`The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.
|
||||
`),r}}}}o(p_e,"storageRequestFailureDetailsParserPolicy")});var CW=h(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.UserDelegationKeyCredential=void 0;var m_e=require("node:crypto"),R0=class{static{o(this,"UserDelegationKeyCredential")}accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return(0,m_e.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};cf.UserDelegationKeyCredential=R0});var jn=h(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.BaseRequestPolicy=mt.getCachedDefaultHttpClient=void 0;var or=(XN(),Wt($N));or.__exportStar(zV(),mt);var g_e=jV();Object.defineProperty(mt,"getCachedDefaultHttpClient",{enumerable:!0,get:function(){return g_e.getCachedDefaultHttpClient}});or.__exportStar(YV(),mt);or.__exportStar(nW(),mt);or.__exportStar(iW(),mt);or.__exportStar(Xg(),mt);or.__exportStar(oW(),mt);or.__exportStar(N0(),mt);var f_e=mu();Object.defineProperty(mt,"BaseRequestPolicy",{enumerable:!0,get:function(){return f_e.BaseRequestPolicy}});or.__exportStar(A0(),mt);or.__exportStar(Wg(),mt);or.__exportStar(uW(),mt);or.__exportStar(dW(),mt);or.__exportStar(gW(),mt);or.__exportStar(f0(),mt);or.__exportStar(hW(),mt);or.__exportStar(yW(),mt);or.__exportStar(CW(),mt)});var Wr=h(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.PathStylePorts=Z.BlobDoesNotUseCustomerSpecifiedEncryption=Z.BlobUsesCustomerSpecifiedEncryptionMsg=Z.StorageBlobLoggingAllowedQueryParameters=Z.StorageBlobLoggingAllowedHeaderNames=Z.DevelopmentConnectionString=Z.EncryptionAlgorithmAES25=Z.HTTP_VERSION_1_1=Z.HTTP_LINE_ENDING=Z.BATCH_MAX_PAYLOAD_IN_BYTES=Z.BATCH_MAX_REQUEST=Z.SIZE_1_MB=Z.ETagAny=Z.ETagNone=Z.HeaderConstants=Z.HTTPURLConnection=Z.URLConstants=Z.StorageOAuthScopes=Z.REQUEST_TIMEOUT=Z.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS=Z.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES=Z.DEFAULT_BLOCK_BUFFER_SIZE_BYTES=Z.BLOCK_BLOB_MAX_BLOCKS=Z.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES=Z.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES=Z.SERVICE_VERSION=Z.SDK_VERSION=void 0;Z.SDK_VERSION="12.31.0";Z.SERVICE_VERSION="2026-02-06";Z.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES=256*1024*1024;Z.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES=4e3*1024*1024;Z.BLOCK_BLOB_MAX_BLOCKS=5e4;Z.DEFAULT_BLOCK_BUFFER_SIZE_BYTES=8*1024*1024;Z.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES=4*1024*1024;Z.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS=5;Z.REQUEST_TIMEOUT=100*1e3;Z.StorageOAuthScopes="https://storage.azure.com/.default";Z.URLConstants={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};Z.HTTPURLConnection={HTTP_ACCEPTED:202,HTTP_CONFLICT:409,HTTP_NOT_FOUND:404,HTTP_PRECON_FAILED:412,HTTP_RANGE_NOT_SATISFIABLE:416};Z.HeaderConstants={AUTHORIZATION:"Authorization",AUTHORIZATION_SCHEME:"Bearer",CONTENT_ENCODING:"Content-Encoding",CONTENT_ID:"Content-ID",CONTENT_LANGUAGE:"Content-Language",CONTENT_LENGTH:"Content-Length",CONTENT_MD5:"Content-Md5",CONTENT_TRANSFER_ENCODING:"Content-Transfer-Encoding",CONTENT_TYPE:"Content-Type",COOKIE:"Cookie",DATE:"date",IF_MATCH:"if-match",IF_MODIFIED_SINCE:"if-modified-since",IF_NONE_MATCH:"if-none-match",IF_UNMODIFIED_SINCE:"if-unmodified-since",PREFIX_FOR_STORAGE:"x-ms-",RANGE:"Range",USER_AGENT:"User-Agent",X_MS_CLIENT_REQUEST_ID:"x-ms-client-request-id",X_MS_COPY_SOURCE:"x-ms-copy-source",X_MS_DATE:"x-ms-date",X_MS_ERROR_CODE:"x-ms-error-code",X_MS_VERSION:"x-ms-version",X_MS_CopySourceErrorCode:"x-ms-copy-source-error-code"};Z.ETagNone="";Z.ETagAny="*";Z.SIZE_1_MB=1*1024*1024;Z.BATCH_MAX_REQUEST=256;Z.BATCH_MAX_PAYLOAD_IN_BYTES=4*Z.SIZE_1_MB;Z.HTTP_LINE_ENDING=`\r
|
||||
`;Z.HTTP_VERSION_1_1="HTTP/1.1";Z.EncryptionAlgorithmAES25="AES256";Z.DevelopmentConnectionString="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;";Z.StorageBlobLoggingAllowedHeaderNames=["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-copy-source-error-code","x-ms-copy-source-status-code","x-ms-if-tags","x-ms-source-if-tags"];Z.StorageBlobLoggingAllowedQueryParameters=["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"];Z.BlobUsesCustomerSpecifiedEncryptionMsg="BlobUsesCustomerSpecifiedEncryption";Z.BlobDoesNotUseCustomerSpecifiedEncryption="BlobDoesNotUseCustomerSpecifiedEncryption";Z.PathStylePorts=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"]});var Fs=h(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.Pipeline=hi.StorageOAuthScopes=void 0;hi.isPipelineLike=y_e;hi.newPipeline=C_e;hi.getCoreClientOptions=B_e;hi.getCredentialFromPipeline=QW;var bW=Og(),EW=Pt(),BW=mi(),IW=JN(),_0=xc(),h_e=Lg(),Kr=jn(),fu=Wr();Object.defineProperty(hi,"StorageOAuthScopes",{enumerable:!0,get:function(){return fu.StorageOAuthScopes}});function y_e(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}o(y_e,"isPipelineLike");var lf=class{static{o(this,"Pipeline")}factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};hi.Pipeline=lf;function C_e(t,e={}){t||(t=new Kr.AnonymousCredential);let r=new lf([],e);return r._credential=t,r}o(C_e,"newPipeline");function E_e(t){let e=[I_e,wW,b_e,Q_e,w_e,N_e,x_e];if(t.factories.length){let r=t.factories.filter(n=>!e.some(i=>i(n)));if(r.length){let n=r.some(i=>S_e(i));return{wrappedPolicies:(0,bW.createRequestPolicyFactoryPolicy)(r),afterRetry:n}}}}o(E_e,"processDownlevelPipeline");function B_e(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?(0,bW.convertHttpClient)(e):(0,Kr.getCachedDefaultHttpClient)(),t._coreHttpClient=n);let i=t._corePipeline;if(!i){let s=`azsdk-js-azure-storage-blob/${fu.SDK_VERSION}`,a=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${s}`:`${s}`;i=(0,BW.createClientPipeline)({...r,loggingOptions:{additionalAllowedHeaderNames:fu.StorageBlobLoggingAllowedHeaderNames,additionalAllowedQueryParameters:fu.StorageBlobLoggingAllowedQueryParameters,logger:h_e.logger.info},userAgentOptions:{userAgentPrefix:a},serializationOpt
Line truncated
|
||||
`),s=e.computeHMACSHA256(i);return{sasQueryParameters:new jo.SASQueryParameters(t.version,s,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}o(LDe,"generateBlobSASQueryParameters20150405");function FDe(t,e){if(t=Yo(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 r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=qo.BlobSASPermissions.parse(t.permissions.toString()).toString():i=Ho.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,gt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,gt.truncatedISO8061Date)(t.expiresOn,!1):"",Go(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?(0,zo.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new jo.SASQueryParameters(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}o(FDe,"generateBlobSASQueryParameters20181109");function UDe(t,e){if(t=Yo(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 r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=qo.BlobSASPermissions.parse(t.permissions.toString()).toString():i=Ho.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,gt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,gt.truncatedISO8061Date)(t.expiresOn,!1):"",Go(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?(0,zo.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new jo.SASQueryParameters(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:s}}o(UDe,"generateBlobSASQueryParameters20201206");function qDe(t,e){if(t=Yo(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=qo.BlobSASPermissions.parse(t.permissions.toString()).toString():i=Ho.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,gt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,gt.truncatedISO8061Date)(t.expiresOn,!1):"",Go(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,gt.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,gt.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?(0,zo.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new jo.SASQueryParameters(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:s}}o(qDe,"generateBlobSASQueryParametersUDK20181109");function HDe(t,e){if(t=Yo(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=qo.BlobSASPermissions.parse(t.permissions.toString()).toString():i=Ho.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,gt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,gt.truncatedISO8061Date)(t.expiresOn,!1):"",Go(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,gt.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,gt.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?(0,zo.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new jo.SASQueryParameters(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:s}}o(HDe,"generateBlobSASQueryParametersUDK20200210");function zDe(t,e){if(t=Yo(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=qo.BlobSASPermissions.parse(t.permissions.toString()).toString():i=Ho.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,gt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,gt.truncatedISO8061Date)(t.expiresOn,!1):"",Go(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,gt.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,gt.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?(0,zo.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new jo.SASQueryParameters(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:s}}o(zDe,"generateBlobSASQueryParametersUDK20201206");function jDe(t,e){if(t=Yo(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=qo.BlobSASPermissions.parse(t.permissions.toString()).toString():i=Ho.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,gt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,gt.truncatedISO8061Date)(t.expiresOn,!1):"",Go(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,gt.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,gt.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?(0,zo.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new jo.SASQueryParameters(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:s}}o(jDe,"generateBlobSASQueryParametersUDK20250705");function Go(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}o(Go,"getCanonicalName");function Yo(t){let e=t.version?t.version:A3.SERVICE_VERSION;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(Yo,"SASSignatureValuesSanityCheckAndAutofill")});var Df=h(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.BlobLeaseClient=void 0;var GDe=ut(),Ci=Wr(),yu=Uo(),_f=In(),eS=class{static{o(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=(0,GDe.randomUUID)()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Ci.ETagNone||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Ci.ETagNone||r.conditions?.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.");return yu.tracingClient.withSpan("BlobLeaseClient-acquireLease",r,async n=>(0,_f.assertResponse)(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Ci.ETagNone||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Ci.ETagNone||r.conditions?.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.");return yu.tracingClient.withSpan("BlobLeaseClient-changeLease",r,async n=>{let i=(0,_f.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,i})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==Ci.ETagNone||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Ci.ETagNone||e.conditions?.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.");return yu.tracingClient.withSpan("BlobLeaseClient-releaseLease",e,async r=>(0,_f.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:r.tracingOptio
Line truncated
|
||||
Polling from: ${r.config.operationLocation}
|
||||
Operation status: ${u}
|
||||
Polling status: ${K3.includes(u)?"Stopped":"Running"}`),u==="succeeded"){let d=a(A,r);if(d!==void 0)return{response:await e(d).catch(V3({state:r,stateProxy:n,isOperationError:c})),status:u}}return{response:A,status:u}}o($Te,"pollOperationHelper");async function eK(t){let{poll:e,state:r,stateProxy:n,options:i,getOperationStatus:s,getResourceLocation:a,getOperationLocation:c,isOperationError:l,withOperationLocation:A,getPollingInterval:u,processResult:d,getError:g,updateState:f,setDelay:C,isDone:Q,setErrorAsResult:x}=t,{operationLocation:w}=r.config;if(w!==void 0){let{response:v,status:T}=await $Te({poll:e,getOperationStatus:s,state:r,stateProxy:n,operationLocation:w,getResourceLocation:a,isOperationError:l,options:i});if(X3({status:T,response:v,state:r,stateProxy:n,isDone:Q,processResult:d,getError:g,setErrorAsResult:x}),!K3.includes(T)){let L=u?.(v);L&&C(L);let W=c?.(v,r);if(W!==void 0){let de=w!==W;r.config.operationLocation=W,A?.(W,de)}else A?.(w,!1)}f?.(r,v)}}o(eK,"pollOperation");function tK(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}o(tK,"getOperationLocationPollingUrl");function rK(t){return t.headers.location}o(rK,"getLocationHeader");function nK(t){return t.headers["operation-location"]}o(nK,"getOperationLocationHeader");function iK(t){return t.headers["azure-asyncoperation"]}o(iK,"getAzureAsyncOperationHeader");function XTe(t){var e;let{location:r,requestMethod:n,requestPath:i,resourceLocationConfig:s}=t;switch(n){case"PUT":return i;case"DELETE":return;case"PATCH":return(e=a())!==null&&e!==void 0?e:i;default:return a()}function a(){switch(s){case"azure-async-operation":return;case"original-uri":return i;case"location":default:return r}}o(a,"getDefault")}o(XTe,"findResourceLocation");function sK(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:i}=t,s=nK(e),a=iK(e),c=tK({operationLocation:s,azureAsyncOperation:a}),l=rK(e),A=r?.toLocaleUpperCase();return c!==void 0?{mode:"OperationLocation",operationLocation:c,resourceLocation:XTe({requestMethod:A,location:l,requestPath:n,resourceLocationConfig:i})}:l!==void 0?{mode:"ResourceLocation",operationLocation:l}:A==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}o(sK,"inferLroMode");function oK(t){let{status:e,statusCode:r}=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 MS(r);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 Vo.verbose(`LRO: unrecognized operation status: ${e}`),e}}o(oK,"transformStatus");function ZTe(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return oK({status:r,statusCode:t.statusCode})}o(ZTe,"getStatus");function eOe(t){var e,r;let{properties:n,provisioningState:i}=(e=t.body)!==null&&e!==void 0?e:{},s=(r=n?.provisioningState)!==null&&r!==void 0?r:i;return oK({status:s,statusCode:t.statusCode})}o(eOe,"getProvisioningState");function MS(t){return t===202?"running":t<300?"succeeded":"failed"}o(MS,"toOperationStatus");function aK({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?tOe(new Date(e)):r*1e3}}o(aK,"parseRetryAfter");function cK(t){let e=t.flatResponse.error;if(!e){Vo.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){Vo.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(cK,"getErrorFromResponse");function tOe(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}o(tOe,"calculatePollingIntervalFromDate");function lK(t){let{response:e,state:r,operationLocation:n}=t;function i(){var a;switch((a=r.config.metadata)===null||a===void 0?void 0:a.mode){case void 0:return MS(e.rawResponse.statusCode);case"Body":return kS(e,r);default:return"running"}}o(i,"helper");let s=i();return s==="running"&&n===void 0?"succeeded":s}o(lK,"getStatusFromInitialResponse");async function rOe(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:i,setErrorAsResult:s}=t;return Z3({init:async()=>{let a=await i.sendInitialRequest(),c=sK({rawResponse:a.rawResponse,requestPath:i.requestPath,requestMethod:i.requestMethod,resourceLocationConfig:r});return Object.assign({response:a,operationLocation:c?.operationLocation,resourceLocation:c?.resourceLocation},c?.mode?{metadata:{mode:c.mode}}:{})},stateProxy:e,processResult:n?({flatResponse:a},c)=>n(a,c):({flatResponse:a})=>a,getOperationStatus:lK,setErrorAsResult:s})}o(rOe,"initHttpOperation");function AK({rawResponse:t},e){var r;switch((r=e.config.metadata)===nuLine truncated
|
||||
`):a=[e.accountName,n,i,s,t.startsOn?(0,Nh.truncatedISO8061Date)(t.startsOn,!1):"",(0,Nh.truncatedISO8061Date)(t.expiresOn,!1),t.ipRange?(0,RK.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",r,""].join(`
|
||||
`);let c=e.computeHMACSHA256(a);return{sasQueryParameters:new ZOe.SASQueryParameters(r,c,n.toString(),i,s,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),stringToSign:a}}o(_K,"generateAccountSASQueryParametersInternal")});var MK=h(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});vh.BlobServiceClient=void 0;var rMe=xc(),nMe=Pt(),PK=ut(),wu=Fs(),iMe=rx(),xh=In(),$o=jn(),Qi=In(),wi=Uo(),sMe=hh(),oMe=If(),DK=Ih(),TK=ax(),OK=wh(),cx=class t extends oMe.StorageClient{static{o(this,"BlobServiceClient")}serviceContext;static fromConnectionString(e,r){r=r||{};let n=(0,xh.extractConnectionStringParts)(e);if(n.kind==="AccountConnString")if(PK.isNodeLike){let i=new $o.StorageSharedKeyCredential(n.accountName,n.accountKey);r.proxyOptions||(r.proxyOptions=(0,nMe.getDefaultProxySettings)(n.proxyUri));let s=(0,wu.newPipeline)(i,r);return new t(n.url,s)}else throw new Error("Account connection string is only supported in Node.js environment");else if(n.kind==="SASConnString"){let i=(0,wu.newPipeline)(new $o.AnonymousCredential,r);return new t(n.url+"?"+n.accountSas,i)}else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}constructor(e,r,n){let i;(0,wu.isPipelineLike)(r)?i=r:PK.isNodeLike&&r instanceof $o.StorageSharedKeyCredential||r instanceof $o.AnonymousCredential||(0,rMe.isTokenCredential)(r)?i=(0,wu.newPipeline)(r,n):i=(0,wu.newPipeline)(new $o.AnonymousCredential,n),super(e,i),this.serviceContext=this.storageClientContext.service}getContainerClient(e){return new iMe.ContainerClient((0,xh.appendToURLPath)(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,r={}){return wi.tracingClient.withSpan("BlobServiceClient-createContainer",r,async n=>{let i=this.getContainerClient(e),s=await i.create(n);return{containerClient:i,containerCreateResponse:s}})}async deleteContainer(e,r={}){return wi.tracingClient.withSpan("BlobServiceClient-deleteContainer",r,async n=>this.getContainerClient(e).delete(n))}async undeleteContainer(e,r,n={}){return wi.tracingClient.withSpan("BlobServiceClient-undeleteContainer",n,async i=>{let s=this.getContainerClient(n.destinationContainerName||e),a=s.storageClientContext.container,c=(0,Qi.assertResponse)(await a.restore({deletedContainerName:e,deletedContainerVersion:r,tracingOptions:i.tracingOptions}));return{containerClient:s,containerUndeleteResponse:c}})}async getProperties(e={}){return wi.tracingClient.withSpan("BlobServiceClient-getProperties",e,async r=>(0,Qi.assertResponse)(await this.serviceContext.getProperties({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async setProperties(e,r={}){return wi.tracingClient.withSpan("BlobServiceClient-setProperties",r,async n=>(0,Qi.assertResponse)(await this.serviceContext.setProperties(e,{abortSignal:r.abortSignal,tracingOptions:n.tracingOptions})))}async getStatistics(e={}){return wi.tracingClient.withSpan("BlobServiceClient-getStatistics",e,async r=>(0,Qi.assertResponse)(await this.serviceContext.getStatistics({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async getAccountInfo(e={}){return wi.tracingClient.withSpan("BlobServiceClient-getAccountInfo",e,async r=>(0,Qi.assertResponse)(await this.serviceContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async listContainersSegment(e,r={}){return wi.tracingClient.withSpan("BlobServiceClient-listContainersSegment",r,async n=>(0,Qi.assertResponse)(await this.serviceContext.listContainersSegment({abortSignal:r.abortSignal,marker:e,...r,include:typeof r.include=="string"?[r.include]:r.include,tracingOptions:n.tracingOptions})))}async findBlobsByTagsSegment(e,r,n={}){return wi.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment",n,async i=>{let s=(0,Qi.assertResponse)(await this.serviceContext.filterBlobs({abortSignal:n.abortSignal,where:e,marker:r,maxPageSize:n.maxPageSize,tracingOptions:i.tracingOptions}));return{...s,_response:s._response,blobs:s.blobs.map(c=>{let l="";return c.tags?.blobTagSet.length===1&&(l=c.tags.blobTagSet[0].value),{...c,tags:(0,xh.toTags)(c.tags),tagValue:l}})}})}async*findBlobsByTagsSegments(e,r,n={}){let i;if(r||r===void 0)do i=await this.findBlobsByTagsSegment(e,r,n),i.blobs=i.blobs||[],r=i.continuationToken,yield i;while(r)}async*findBlobsByTagsItems(e,r={}){let n;for await(let i of this.findBlobsByTagsSegments(e,n,r))yield*i.blobs}findBlobsByTags(e,r={}){let n={...r},i=this.findBlobsByTagsItems(e,n);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(s={})=>this.findBlobsByTagsSegments(e,s.continuationToken,{maxPageSize:s.maxPageSize,...n})}}async*listSegments(e,r={}){let n;if(e||e===void 0)do n=await this.listContainersSegment(e,r),n.containerItems=n.containerItems||[],e=n.continuationToken,yield await n;while(e)}async*listItems(e={}){let r;for await(let n of this.listSegments(r,e))yield*n.contain
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(r),this.code=e,this.name="NetworkError"}};ar.NetworkError=Dh;Dh.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Th=class extends Error{static{o(this,"UsageError")}constructor(){super(`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`),this.name="UsageError"}};ar.UsageError=Th;Th.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var mx=class extends Error{static{o(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};ar.RateLimitError=mx});var qK=h(Zr=>{"use strict";var uMe=Zr&&Zr.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),dMe=Zr&&Zr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),pMe=Zr&&Zr.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&uMe(r,e,n[i]);return dMe(r,e),r}}(),mMe=Zr&&Zr.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(Zr,"__esModule",{value:!0});Zr.UploadProgress=void 0;Zr.uploadCacheArchiveSDK=hMe;var fx=pMe(Zt()),gMe=lx(),fMe=gx(),Oh=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,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,i=(e/(1024*1024)/(n/1e3)).toFixed(1);fx.info(`Sent ${e} of ${this.contentLength} (${r}%), ${i} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=o(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};Zr.UploadProgress=Oh;function hMe(t,e,r){return mMe(this,void 0,void 0,function*(){var n;let i=new gMe.BlobClient(t),s=i.getBlockBlobClient(),a=new Oh((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),fx.debug(`BlobClient: ${i.name}:${i.accountName}:${i.containerName}`);let l=yield s.uploadFile(e,c);if(l._response.status>=400)throw new fMe.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw fx.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{a.stopDisplayTimer()}})}o(hMe,"uploadCacheArchiveSDK")});var yx=h(cr=>{"use strict";var yMe=cr&&cr.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),CMe=cr&&cr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),EMe=cr&&cr.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&yMe(r,e,n[i]);return CMe(r,e),r}}(),kh=cr&&cr.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(cr,"__esModule",{value:!0});cr.isSuccessStatusCode=BMe;cr.isServerErrorStatusCode=zK;cr.isRetryableStatusCode=jK;cr.retry=hx;cr.retryTypedResponse=bMe;cr.retryHttpClientResponse=QMe;var HK=EMe(Zt()),Mh=wo(),sl=HA();function BMe(t){return t?t>=200&&t<300:!1}o(BMe,"isSucc
Line truncated
|
||||
Other caches with similar key:`);for(let c of s?.artifactCaches||[])en.debug(`Cache Key: ${c?.cacheKey}, Cache Version: ${c?.cacheVersion}, Cache Scope: ${c?.scope}, Cache Created: ${c?.creationTime}`)}}})}o(ike,"printCachesListForDiagnostics");function ske(t,e,r){return Rr(this,void 0,void 0,function*(){let n=new $Me.URL(t),i=(0,Qx.getDownloadOptions)(r);n.hostname.endsWith(".blob.core.windows.net")?i.useAzureSdk?yield(0,Fh.downloadCacheStorageSDK)(t,e,i):i.concurrentBlobDownloads?yield(0,Fh.downloadCacheHttpClientConcurrent)(t,e,i):yield(0,Fh.downloadCacheHttpClient)(t,e):yield(0,Fh.downloadCacheHttpClient)(t,e)})}o(ske,"downloadCache");function oke(t,e,r){return Rr(this,void 0,void 0,function*(){let n=wx(),i=al.getCacheVersion(e,r?.compressionMethod,r?.enableCrossOsArchive),s={key:t,version:i,cacheSize:r?.cacheSize};return yield(0,Js.retryTypedResponse)("reserveCache",()=>Rr(this,void 0,void 0,function*(){return n.postJson(Ru("caches"),s)}))})}o(oke,"reserveCache");function e$(t,e){return`bytes ${t}-${e}/*`}o(e$,"getContentRange");function ake(t,e,r,n,i){return Rr(this,void 0,void 0,function*(){en.debug(`Uploading chunk of size ${i-n+1} bytes at offset ${n} with content range: ${e$(n,i)}`);let s={"Content-Type":"application/octet-stream","Content-Range":e$(n,i)},a=yield(0,Js.retryHttpClientResponse)(`uploadChunk (start: ${n}, end: ${i})`,()=>Rr(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),s)}));if(!(0,Js.isSuccessStatusCode)(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}o(ake,"uploadChunk");function cke(t,e,r,n){return Rr(this,void 0,void 0,function*(){let i=al.getArchiveFileSizeInBytes(r),s=Ru(`caches/${e.toString()}`),a=Ix.openSync(r,"r"),c=(0,Qx.getUploadOptions)(n),l=al.assertDefined("uploadConcurrency",c.uploadConcurrency),A=al.assertDefined("uploadChunkSize",c.uploadChunkSize),u=[...new Array(l).keys()];en.debug("Awaiting all uploads");let d=0;try{yield Promise.all(u.map(()=>Rr(this,void 0,void 0,function*(){for(;d<i;){let g=Math.min(i-d,A),f=d,C=d+g-1;d+=A,yield ake(t,s,()=>Ix.createReadStream(r,{fd:a,start:f,end:C,autoClose:!1}).on("error",Q=>{throw new Error(`Cache upload failed because file read failed with ${Q.message}`)}),f,C)}})))}finally{Ix.closeSync(a)}})}o(cke,"uploadFile");function lke(t,e,r){return Rr(this,void 0,void 0,function*(){let n={size:r};return yield(0,Js.retryTypedResponse)("commitCache",()=>Rr(this,void 0,void 0,function*(){return t.postJson(Ru(`caches/${e.toString()}`),n)}))})}o(lke,"commitCache");function Ake(t,e,r,n){return Rr(this,void 0,void 0,function*(){if((0,Qx.getUploadOptions)(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield(0,XMe.uploadCacheArchiveSDK)(r,e,n)}else{let s=wx();en.debug("Upload cache"),yield cke(s,t,e,n),en.debug("Commiting cache");let a=al.getArchiveFileSizeInBytes(e);en.info(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield lke(s,t,a);if(!(0,Js.isSuccessStatusCode)(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);en.info("Cache saved successfully")}})}o(Ake,"saveCache")});var Uh=h(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.isJsonObject=cl.typeofJsonValue=void 0;function uke(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}o(uke,"typeofJsonValue");cl.typeofJsonValue=uke;function dke(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}o(dke,"isJsonObject");cl.isJsonObject=dke});var Hh=h(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.base64encode=ll.base64decode=void 0;var is="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),qh=[];for(let t=0;t<is.length;t++)qh[is[t].charCodeAt(0)]=t;qh[45]=is.indexOf("+");qh[95]=is.indexOf("/");function pke(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let r=new Uint8Array(e),n=0,i=0,s,a=0;for(let c=0;c<t.length;c++){if(s=qh[t.charCodeAt(c)],s===void 0)switch(t[c]){case"=":i=0;case`
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:a=s,i=1;break;case 1:r[n++]=a<<2|(s&48)>>4,a=s,i=2;break;case 2:r[n++]=(a&15)<<4|(s&60)>>2,a=s,i=3;break;case 3:r[n++]=(a&3)<<6|s,i=0;break}}if(i==1)throw Error("invalid base64 string.");return r.subarray(0,n)}o(pke,"base64decode");ll.base64decode=pke;function mke(t){let e="",r=0,n,i=0;for(let s=0;s<t.length;s++)switch(n=t[s],r){case 0:e+=is[n>>2],i=(n&3)<<4,r=1;break;case 1:e+=is[i|n>>4],i=(n&15)<<2,r=2;break;case 2:e+=is[i|n>>6],e+=is[n&63],r=0;break}return r&&(e+=is[i],e+="=",r==1&&(e+="=")),e}o(mke,"base64encode");ll.base64encode=mke});var r$=h(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});zh.utf8read=void 0;var Nx=o(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function gke(t){if(t.length<1)return"";let e=0,r=[],n=[],i=0,s,a=t.length;for(;e<a;)s=t[e++],s<128?n[i++]=s:s>191&&s<224?n[i++]=(s&31)<<6|t[e++]&63:s>239&&s<365?(s=((s&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[i++]=55296+(s>>10),n[i++]=56320+(s&1023)):n[i++]=(s&15)<<12|(t[e++]&63)<<6|t[e++]&63,i>8191&&(r.push(Nx(n)),i=0);return r.length?(i&&r.push(Nx(n.slice(0,i))),r.join("")):Nx(n.slice(0,i))}o(gke,"utf8read");zh.utf8read=gke});var _u=h(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.WireType=Si.mergeBinaryOptions=Si.UnknownFieldHandler=void 0;var fke;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,i,s,a)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:i,wireType:s,data:a})},t.onWrite=(r,n,i)=>{for(let{no:s,wireType:a,data:c}of t.list(n))i.tag(s,a).raw(c)},t.list=(r,n)=>{if(e(r)){let i=r[t.symbol];return n?i.filter(s=>s.no==n):i}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=o(r=>r&&Array.isArray(r[t.symbol]),"is")})(fke=Si.UnknownFieldHandler||(Si.UnknownFieldHandler={}));function hke(t,e){return Object.assign(Object.assign({},t),e)}o(hke,"mergeBinaryOptions");Si.mergeBinaryOptions=hke;var yke;(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"})(yke=Si.WireType||(Si.WireType={}))});var Gh=h(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.varint32read=Pr.varint32write=Pr.int64toString=Pr.int64fromString=Pr.varint64write=Pr.varint64read=void 0;function Cke(){let t=0,e=0;for(let n=0;n<28;n+=7){let i=this.buf[this.pos++];if(t|=(i&127)<<n,!(i&128))return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,!(r&128))return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let i=this.buf[this.pos++];if(e|=(i&127)<<n,!(i&128))return this.assertBounds(),[t,e]}throw new Error("invalid varint")}o(Cke,"varint64read");Pr.varint64read=Cke;function Eke(t,e,r){for(let s=0;s<28;s=s+7){let a=t>>>s,c=!(!(a>>>7)&&e==0),l=(c?a|128:a)&255;if(r.push(l),!c)return}let n=t>>>28&15|(e&7)<<4,i=!!(e>>3);if(r.push((i?n|128:n)&255),!!i){for(let s=3;s<31;s=s+7){let a=e>>>s,c=!!(a>>>7),l=(c?a|128:a)&255;if(r.push(l),!c)return}r.push(e>>>31&1)}}o(Eke,"varint64write");Pr.varint64write=Eke;var jh=65536*65536;function Bke(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,i=0;function s(a,c){let l=Number(t.slice(a,c));i*=r,n=n*r+l,n>=jh&&(i=i+(n/jh|0),n=n%jh)}return o(s,"add1e6digit"),s(-24,-18),s(-18,-12),s(-12,-6),s(-6),[e,n,i]}o(Bke,"int64fromString");Pr.int64fromString=Bke;function Ike(t,e){if(e>>>0<=2097151)return""+(jh*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,i=e>>16&65535,s=r+n*6777216+i*6710656,a=n+i*8147497,c=i*2,l=1e7;s>=l&&(a+=Math.floor(s/l),s%=l),a>=l&&(c+=Math.floor(a/l),a%=l);function A(u,d){let g=u?String(u):"";return d?"0000000".slice(g.length)+g:g}return o(A,"decimalFrom1e7"),A(c,0)+A(a,c)+A(s,1)}o(Ike,"int64toString");Pr.int64toString=Ike;function bke(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}o(bke,"varint32write");Pr.varint32write=bke;function Qke(){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 r=5;t&128&&r<10;r++)t=this.buf[this.pos++];if(t&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}o(Qke,"varint32read");Pr.varint32read=Qke});var Ws=h(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.PbLong=Vs.PbULong=Vs.detectBi=void 0;var Pu=Gh(),Ye;function n$(){let t=new DataView(new ArrayBuffer(8));Ye=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:
Line truncated
|
||||
`)}};yy.RpcError=Zx});var tv=h(Ey=>{"use strict";Object.defineProperty(Ey,"__esModule",{value:!0});Ey.mergeRpcOptions=void 0;var O$=wt();function YLe(t,e){if(!e)return t;let r={};Cy(t,r),Cy(e,r);for(let n of Object.keys(e)){let i=e[n];switch(n){case"jsonOptions":r.jsonOptions=O$.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=O$.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},Cy(t.meta,r.meta),Cy(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(i):i.concat();break}}return r}o(YLe,"mergeRpcOptions");Ey.mergeRpcOptions=YLe;function Cy(t,e){if(!t)return;let r=e;for(let[n,i]of Object.entries(t))i instanceof Date?r[n]=new Date(i.getTime()):Array.isArray(i)?r[n]=i.concat():r[n]=i}o(Cy,"copy")});var nv=h(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.Deferred=ea.DeferredState=void 0;var Ri;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(Ri=ea.DeferredState||(ea.DeferredState={}));var rv=class{static{o(this,"Deferred")}constructor(e=!0){this._state=Ri.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==Ri.PENDING)throw new Error(`cannot resolve ${Ri[this.state].toLowerCase()}`);this._resolve(e),this._state=Ri.RESOLVED}reject(e){if(this.state!==Ri.PENDING)throw new Error(`cannot reject ${Ri[this.state].toLowerCase()}`);this._reject(e),this._state=Ri.REJECTED}resolvePending(e){this._state===Ri.PENDING&&this.resolve(e)}rejectPending(e){this._state===Ri.PENDING&&this.reject(e)}};ea.Deferred=rv});var sv=h(By=>{"use strict";Object.defineProperty(By,"__esModule",{value:!0});By.RpcOutputStreamController=void 0;var M$=nv(),ta=wt(),iv=class{static{o(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}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,r){return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){ta.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){ta.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){ta.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){ta.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._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{let e=this._itState;ta.assert(e,"bad state"),ta.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new M$.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;ta.assert(n.state==M$.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};By.RpcOutputStreamController=iv});var av=h(fl=>{"use strict";var JLe=fl&&fl.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(fl,"__esModule",{value:!0});fl.UnaryCall=void 0;var ov=class{static{o(this,"UnaryCall")}constructor(e,r,n,i,s,a,c){this.method=e,this.requestHeaders=r,this.request=n,this.headers=i,this.response=s,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return JLe(this,void 0,void 0,function*(){let[e,r,n,i]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:i}})}};fl.UnaryCall=ov});var lv=h(hl=>{"use strict";var VLe=hl&&hl.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.thr
Line truncated
|
||||
`));let n=yield _v(r,"create");yield Pv(n,t)})}o(HFe,"createTar")});var i8=h(Ot=>{"use strict";var zFe=Ot&&Ot.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),jFe=Ot&&Ot.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ju=Ot&&Ot.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&zFe(r,e,n[i]);return jFe(r,e),r}}(),vl=Ot&&Ot.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.FinalizeCacheError=Ot.ReserveCacheError=Ot.ValidationError=void 0;Ot.isFeatureAvailable=GFe;Ot.restoreCache=YFe;Ot.saveCache=WFe;var ie=Ju(Zt()),Ry=Ju(require("path")),at=Ju(uc()),xl=Ju(t$()),r8=Ju(X$()),_y=Lh(),Xs=t8(),Py=wo(),_n=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};Ot.ValidationError=_n;var ia=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};Ot.ReserveCacheError=ia;var Yu=class t extends Error{static{o(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};Ot.FinalizeCacheError=Yu;function n8(t){if(!t||t.length===0)throw new _n("Path Validation Error: At least one directory or file path is required")}o(n8,"checkPaths");function Dv(t){if(t.length>512)throw new _n(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new _n(`Key Validation Error: ${t} cannot contain commas.`)}o(Dv,"checkKey");function GFe(){switch((0,_y.getCacheServiceVersion)()){case"v2":return!!process.env.ACTIONS_RESULTS_URL;case"v1":default:return!!process.env.ACTIONS_CACHE_URL}}o(GFe,"isFeatureAvailable");function YFe(t,e,r,n){return vl(this,arguments,void 0,function*(i,s,a,c,l=!1){let A=(0,_y.getCacheServiceVersion)();switch(ie.debug(`Cache service version: ${A}`),n8(i),A){case"v2":return yield VFe(i,s,a,c,l);case"v1":default:return yield JFe(i,s,a,c,l)}})}o(YFe,"restoreCache");function JFe(t,e,r,n){return vl(this,arguments,void 0,function*(i,s,a,c,l=!1){a=a||[];let A=[s,...a];if(ie.debug("Resolved Keys:"),ie.debug(JSON.stringify(A)),A.length>10)throw new _n("Key Validation Error: Keys are limited to a maximum of 10.");for(let g of A)Dv(g);let u=yield at.getCompressionMethod(),d="";try{let g=yield xl.getCacheEntry(A,i,{compressionMethod:u,enableCrossOsArchive:l});if(!g?.archiveLocation)return;if(c?.lookupOnly)return ie.info("Lookup only - skipping download"),g.cacheKey;d=Ry.join(yield at.createTempDirectory(),at.getCacheFileName(u)),ie.debug(`Archive Path: ${d}`),yield xl.downloadCache(g.archiveLocation,d,c),ie.isDebug()&&(yield(0,Xs.listTar)(d,u));let f=at.getArchiveFileSizeInBytes(d);return ie.info(`Cache Size: ~${Math.round(f/(1024*1024))} MB (${f} B)`),yield(0,Xs.extractTar)(d,u),ie.info("Cache restored successfully"),g.cacheKey}catch(g){let f=g;if(f.name===_n.name)throw g;f instanceof Py.HttpClientError&&typeof f.statusCode=="number"&&f.statusCode>=500?ie.error(`Failed to restore: ${g.message}`):ie.warning(`Failed to restore: ${g.message}`)}finally{try{yield at.unlinkFile(d)}catch(g){ie.debug(`Failed to delete archive: ${g}`)}}})}o(JFe,"restoreCacheV1");function VFe(t,e,r,n){return vl(this,arguments,void 0,function*(i,s,a,c,l=!1){c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let A=[s,...a];if(ie.debug("Resolved Keys:"),ie.debug(JSON.stringify(A)),A.length>10)throw new _n("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of A)Dv(d);let u="";try{let d=r8.internalCacheTwirpClient(),g=yield at.getCompressionMethod(),f={key:s,restoreKeys:a,version:at.getCacheVersion(i,g,l)},C=yield d.GetCacheEntryDownloadURL(f);if(!C.ok){ie.debug(`Cache not found for version ${f.version} of keys: ${A.join(", ")}`);return}if(f.key!==C.matchedKey?ie.info(`Cache hit for restore-key: ${C.matchedKey}`):ie.info(`Cache hit for: ${C.matchedKey}`),c?.lookupOnly)return ie.info("Lookup only - skipping download"),C.matchedKey;u=Ry.join(yield at.createTempDirectory(),at.get
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
sax/lib/sax.js:
|
||||
(*! http://mths.be/fromcodepoint v0.1.0 by @mathias *)
|
||||
undici/lib/web/fetch/body.js:
|
||||
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
|
||||
|
||||
mime-db/index.js:
|
||||
(*!
|
||||
* mime-db
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*)
|
||||
|
||||
mime-types/index.js:
|
||||
(*!
|
||||
* mime-types
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*)
|
||||
undici/lib/web/websocket/frame.js:
|
||||
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
||||
*/
|
||||
+135
-66
@@ -1,74 +1,143 @@
|
||||
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 o9=Object.create;var aA=Object.defineProperty;var a9=Object.getOwnPropertyDescriptor;var c9=Object.getOwnPropertyNames;var l9=Object.getPrototypeOf,A9=Object.prototype.hasOwnProperty;var o=(t,e)=>aA(t,"name",{value:e,configurable:!0});var vd=(t,e)=>()=>(t&&(e=t(t=0)),e);var g=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Pd=(t,e)=>{for(var r in e)aA(t,r,{get:e[r],enumerable:!0})},ev=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of c9(e))!A9.call(t,i)&&i!==r&&aA(t,i,{get:()=>e[i],enumerable:!(n=a9(e,i))||n.enumerable});return t};var Ji=(t,e,r)=>(r=t!=null?o9(l9(t)):{},ev(e||!t||!t.__esModule?aA(r,"default",{value:t,enumerable:!0}):r,t)),Zt=t=>ev(aA({},"__esModule",{value:!0}),t);var Td=g(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});Dd.toCommandValue=u9;Dd.toCommandProperties=d9;function u9(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}o(u9,"toCommandValue");function d9(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(d9,"toCommandProperties")});var iv=g(li=>{"use strict";var p9=li&&li.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),h9=li&&li.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),f9=li&&li.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&p9(r,e,n[i]);return h9(r,e),r}}();Object.defineProperty(li,"__esModule",{value:!0});li.issueCommand=nv;li.issue=g9;var m9=f9(require("os")),rv=Td();function nv(t,e,r){let n=new TC(t,e,r);process.stdout.write(n.toString()+m9.EOL)}o(nv,"issueCommand");function g9(t,e=""){nv(t,{},e)}o(g9,"issue");var tv="::",TC=class{static{o(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=tv+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let i=this.properties[n];i&&(r?r=!1:e+=",",e+=`${n}=${C9(i)}`)}}return e+=`${tv}${y9(this.message)}`,e}};function y9(t){return(0,rv.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(y9,"escapeData");function C9(t){return(0,rv.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(C9,"escapeProperty")});var av=g(Ai=>{"use strict";var E9=Ai&&Ai.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),B9=Ai&&Ai.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),MC=Ai&&Ai.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&E9(r,e,n[i]);return B9(r,e),r}}();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.issueFileCommand=b9;Ai.prepareKeyValueMessage=Q9;var I9=MC(require("crypto")),sv=MC(require("fs")),OC=MC(require("os")),ov=Td();function b9(t,e){let r=process.env[`GITHUB_${t}`];if(!r)throw new Error(`Unable to find environment variable for file command ${t}`);if(!sv.existsSync(r))throw new Error(`Missing file at path: ${r}`);sv.appendFileSync(r,`${(0,ov.toCommandValue)(e)}${OC.EOL}`,{encoding:"utf8"})}o(b9,"issueFileCommand");function Q9(t,e){let r=`ghadelimiter_${I9.randomUUID()}`,n=(0,ov.toCommandValue)(e);if(t.includes(r))throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${t}<<${r}${OC.EOL}${n}${OC.EOL}${r}`}o(Q9,"prepareKeyValueMessage")});var lv=g(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.getProxyUrl=w9;Md.checkBypass=cv;function w9(t){let e=t.protocol==="https:";if(cv(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new Od(r)}catch{if(!r.startsWith("hLine truncated
|
||||
`,d.message,d.stack);var f=new Error("tunneling socket could not be established, cause="+d.message);f.code="ECONNRESET",e.request.emit("error",f),n.removeSocket(i)}o(u,"onError")},"createSocket");Vi.prototype.removeSocket=o(function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(i){n.request.onSocket(i)})}},"removeSocket");function uv(t,e){var r=this;Vi.prototype.createSocket.call(r,t,function(n){var i=t.request.getHeader("host"),s=LC({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):t.host}),a=x9.connect(0,s);r.sockets[r.sockets.indexOf(n)]=a,e(a)})}o(uv,"createSecureSocket");function dv(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}o(dv,"toOptions");function LC(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var i=Object.keys(n),s=0,a=i.length;s<a;++s){var c=i[s];n[c]!==void 0&&(t[c]=n[c])}}return t}o(LC,"mergeOptions");var Is;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Is=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"):Is=o(function(){},"debug");Sa.debug=Is});var fv=g((KHe,hv)=>{hv.exports=pv()});var nt=g((XHe,mv)=>{mv.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var Pe=g((ZHe,Fv)=>{"use strict";var gv=Symbol.for("undici.error.UND_ERR"),At=class extends Error{static{o(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[gv]===!0}[gv]=!0},yv=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),UC=class extends At{static{o(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[yv]===!0}[yv]=!0},Cv=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),FC=class extends At{static{o(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[Cv]===!0}[Cv]=!0},Ev=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),qC=class extends At{static{o(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[Ev]===!0}[Ev]=!0},Bv=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),HC=class extends At{static{o(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}
Line truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}o(eD,"isValidHeaderValue");function W6(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),i="";if(n.length>0)for(let s=n.length;s!==0;s--){let a=n[s-1].trim();if(D6.has(a)){i=a;break}}i!==""&&(t.referrerPolicy=i)}o(W6,"setRequestReferrerPolicyOnRedirect");function $6(){return"allowed"}o($6,"crossOriginResourcePolicyCheck");function K6(){return"success"}o(K6,"corsCheck");function X6(){return"success"}o(X6,"TAOCheck");function Z6(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}o(Z6,"appendFetchMetadata");function eZ(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&PE(t.origin)&&!PE(mA(t))&&(e=null);break;case"same-origin":np(t,mA(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}o(eZ,"appendRequestOriginHeader");function La(t,e){return t}o(La,"coarsenTime");function tZ(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:La(t.domainLookupStartTime,r),domainLookupEndTime:La(t.domainLookupEndTime,r),connectionStartTime:La(t.connectionStartTime,r),connectionEndTime:La(t.connectionEndTime,r),secureConnectionStartTime:La(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}o(tZ,"clampAndCoarsenConnectionTimingInfo");function rZ(t){return La(L6.now(),t)}o(rZ,"coarsenedSharedCurrentTime");function nZ(t){return{startTime:t.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:t.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}o(nZ,"createOpaqueTimingInfo");function tD(){return{referrerPolicy:"strict-origin-when-cross-origin"}}o(tD,"makePolicyContainer");function iZ(t){return{referrerPolicy:t.referrerPolicy}}o(iZ,"clonePolicyContainer");function sZ(t){let e=t.referrerPolicy;Qo(e);let r=null;if(t.referrer==="client"){let c=WP();if(!c||c.origin==="null")return"no-referrer";r=new URL(c)}else t.referrer instanceof URL&&(r=t.referrer);let n=vE(r),i=vE(r,!0);n.toString().length>4096&&(n=i);let s=np(t,n),a=fA(n)&&!fA(t.url);switch(e){case"origin":return i??vE(r,!0);case"unsafe-url":return n;case"same-origin":return s?i:"no-referrer";case"origin-when-cross-origin":return s?n:i;case"strict-origin-when-cross-origin":{let c=mA(t);return np(n,c)?n:fA(n)&&!fA(c)?"no-referrer":i}case"strict-origin":case"no-referrer-when-downgrade":default:return a?"no-referrer":i}}o(sZ,"determineRequestsReferrer");function vE(t,e){return Qo(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}o(vE,"stripURLForReferrer");function fA(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}o(fA,"isURLPotentiallyTrustworthy");function oZ(t,e){if(rp===void 0)return!0;let r=rD(e);if(r==="no metadata"||r.length===0)return!0;let n=cZ(r),i=lZ(r,n);for(let s of i){let a=s.algo,c=s.hash,l=rp.createHash(a).update(t).digest("base64");if(l[l.length-1]==="="&&(l[l.length-2]==="="?l=l.slice(0,-2):l=l.slice(0,-1)),AZ(l,c))return!0}return!1}o(oZ,"bytesMatch");var aZ=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function rD(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let i=aZ.exec(n);if(i===null||i.groups===void 0||i.groups.algo===void 0)continue;let s=i.groups.algo.toLowerCase();KP.includes(s)&&e.push(i.groups)}return r===!0?"no metadata":e}o(rD,"parseMetadata");function cZ(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let n=t[r];if(n.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;n.algo[3]==="3"&&(e="sha384")}}return e}o(cZ,"getStrongestMetadata");function lZ(t,e){if(t.length===1)return t;let r=0;for(let n=0;n<t.length;++n)t[n].algo===e&&(t[r++]=t[n]);return t.length=r,t}o(lZ,"filterMetadataListByAlgorithm");function AZ(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r]){if(t[r]==="+"&&e[r]==="-"||t[r]==="/"&&e[r]==="_")continue;return!1}return!0}o(AZ,"compareBase64Mixed");function uZ(t){}o(uZ,"t
Line truncated
|
||||
`);function JZ(t){for(let e=0;e<t.length;++e)if(t.charCodeAt(e)&-128)return!1;return!0}o(JZ,"isAsciiString");function VZ(t){let e=t.length;if(e<27||e>70)return!1;for(let r=0;r<e;++r){let n=t.charCodeAt(r);if(!(n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}o(VZ,"validateBoundary");function WZ(t,e){sp(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),i=[],s={position:0};for(;t[s.position]===13&&t[s.position+1]===10;)s.position+=2;let a=t.length;for(;t[a-1]===10&&t[a-2]===13;)a-=2;for(a!==t.length&&(t=t.subarray(0,a));;){if(t.subarray(s.position,s.position+n.length).equals(n))s.position+=n.length;else return"failure";if(s.position===t.length-2&&op(t,GZ,s)||s.position===t.length-4&&op(t,YZ,s))return i;if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let c=$Z(t,s);if(c==="failure")return"failure";let{name:l,filename:A,contentType:u,encoding:d}=c;s.position+=2;let f;{let C=t.indexOf(n.subarray(2),s.position);if(C===-1)return"failure";f=t.subarray(s.position,C-4),s.position+=f.length,d==="base64"&&(f=Buffer.from(f.toString(),"base64"))}if(t[s.position]!==13||t[s.position+1]!==10)return"failure";s.position+=2;let m;A!==null?(u??="text/plain",JZ(u)||(u=""),m=new zZ([f],A,{type:u})):m=LZ(Buffer.from(f)),sp(fD(l)),sp(typeof m=="string"&&fD(m)||FZ(m)),i.push(qZ(l,m,A))}}o(WZ,"multipartFormDataParser");function $Z(t,e){let r=null,n=null,i=null,s=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:i,encoding:s};let a=Fa(c=>c!==10&&c!==13&&c!==58,t,e);if(a=UE(a,!0,!0,c=>c===9||c===32),!UZ.test(a.toString())||t[e.position]!==58)return"failure";switch(e.position++,Fa(c=>c===32||c===9,t,e),kZ(a)){case"content-disposition":{if(r=n=null,!op(t,jZ,e)||(e.position+=17,r=yD(t,e),r===null))return"failure";if(op(t,gD,e)){let c=e.position+gD.length;if(t[c]===42&&(e.position+=1,c+=1),t[c]!==61||t[c+1]!==34||(e.position+=12,n=yD(t,e),n===null))return"failure"}break}case"content-type":{let c=Fa(l=>l!==10&&l!==13,t,e);c=UE(c,!1,!0,l=>l===9||l===32),i=mD(c);break}case"content-transfer-encoding":{let c=Fa(l=>l!==10&&l!==13,t,e);c=UE(c,!1,!0,l=>l===9||l===32),s=mD(c);break}default:Fa(c=>c!==10&&c!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}o($Z,"parseMultipartFormDataHeaders");function yD(t,e){sp(t[e.position-1]===34);let r=Fa(n=>n!==10&&n!==13&&n!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,`
|
||||
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}o(yD,"parseMultipartFormDataName");function Fa(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}o(Fa,"collectASequenceOfBytes");function UE(t,e,r,n){let i=0,s=t.length-1;if(e)for(;i<t.length&&n(t[i]);)i++;if(r)for(;s>0&&n(t[s]);)s--;return i===0&&s===t.length-1?t:t.subarray(i,s+1)}o(UE,"removeChars");function op(t,e,r){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[r.position+n])return!1;return!0}o(op,"bufferStartsWith");CD.exports={multipartFormDataParser:WZ,validateBoundary:VZ}});var za=g((U2e,_D)=>{"use strict";var CA=Ee(),{ReadableStreamFrom:KZ,isBlobLike:BD,isReadableStreamLike:XZ,readableStreamClose:ZZ,createDeferredPromise:e7,fullyReadBody:t7,extractMimeType:r7,utf8DecodeBytes:QD}=Ur(),{FormData:ID}=yA(),{kState:Ha}=bs(),{webidl:n7}=$t(),{Blob:i7}=require("node:buffer"),FE=require("node:assert"),{isErrored:wD,isDisturbed:s7}=require("node:stream"),{isArrayBuffer:o7}=require("node:util/types"),{serializeAMimeType:a7}=Br(),{multipartFormDataParser:c7}=ED(),qE;try{let t=require("node:crypto");qE=o(e=>t.randomInt(0,e),"random")}catch{qE=o(t=>Math.floor(Math.random(t)),"random")}var ap=new TextEncoder;function l7(){}o(l7,"noop");var ND=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,xD;ND&&(xD=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!s7(e)&&!wD(e)&&e.cancel("Response object has been garbage collected").catch(l7)}));function SD(t,e=!1){let r=null;t instanceof ReadableStream?r=t:BD(t)?r=t.stream():r=new ReadableStream({async pull(l){let A=typeof i=="string"?ap.encode(i):i;A.byteLength&&l.enqueue(A),queueMicrotask(()=>ZZ(l))},start(){},type:"bytes"}),FE(XZ(r));let n=null,i=null,s=null,a=null;if(typeof t=="string")i=t,a="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)i=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(o7(t))i=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))i=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(CA.isFormDataLike(t)){let l=`----formdata-undici-0${`${qE(1e11)}`.padStart(11,"0")}`,A=`--${l}\r
|
||||
Content-Disposition: form-data`;let u=o(S=>S.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),d=o(S=>S.replace(/\r?\n|\r/g,`\r
|
||||
`),"normalizeLinefeeds"),f=[],m=new Uint8Array([13,10]);s=0;let C=!1;for(let[S,w]of t)if(typeof w=="string"){let R=ap.encode(A+`; name="${u(d(S))}"\r
|
||||
\r
|
||||
${d(w)}\r
|
||||
`);f.push(R),s+=R.byteLength}else{let R=ap.encode(`${A}; name="${u(d(S))}"`+(w.name?`; filename="${u(w.name)}"`:"")+`\r
|
||||
Content-Type: ${w.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);f.push(R,w,m),typeof w.size=="number"?s+=R.byteLength+w.size+m.byteLength:C=!0}let Q=ap.encode(`--${l}--\r
|
||||
`);f.push(Q),s+=Q.byteLength,C&&(s=null),i=t,n=o(async function*(){for(let S of f)S.stream?yield*S.stream():yield S},"action"),a=`multipart/form-data; boundary=${l}`}else if(BD(t))i=t,s=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(CA.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:KZ(t)}if((typeof i=="string"||CA.isBuffer(i))&&(s=Buffer.byteLength(i)),n!=null){let l;r=new ReadableStream({async start(){l=n(t)[Symbol.asyncIterator]()},async pull(A){let{value:u,done:d}=await l.next();if(d)queueMicrotask(()=>{A.close(),A.byobRequest?.respond(0)});else if(!wD(r)){let f=new Uint8Array(u);f.byteLength&&A.enqueue(f)}return A.desiredSize>0},async cancel(A){await l.return()},type:"bytes"})}return[{stream:r,source:i,length:s},a]}o(SD,"extractBody");function A7(t,e=!1){return t instanceof ReadableStream&&(FE(!CA.isDisturbed(t),"The body has already been consumed."),FE(!t.locked,"The stream is locked.")),SD(t,e)}o(A7,"safelyExtractBody");function u7(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}o(u7,"cloneBody");function d7(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}o(d7,"throwIfAborted");function p7(t){return{blob(){return qa(this,r=>{let n=bD(this);return n===null?n="":n&&(n=a7(n)),new i7([r],{type:n})},t)},arrayBuffer(){return qa(this,r=>new Uint8Array(r).buffer,t)},text(){return qa(this,QD,t)},json(){return qa(this,f7,t)},formData(){return qa(this,r=>{let n=bD(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let i=c7(r,n);if(i==="failure")throw new TypeError("Failed to parse body as FormData.");let s=new ID;return s[Ha]=i,s}case"application/x-www-form-urlencoded":{let i=new URLSearchParams(r.toString()),s=new ID;for(let[a,c]of i)s.append(a,c);return s}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return qa(this,r=>new Uint8Array(r),t)}}}o(p7,"bodyMixinMethods");function h7(t){Object.assign(t.prototype,p7(t))}o(h7,"mixinBody");async function qa(t,e,r){if(n7.brandCheck(t,r),RD(t))throw new TypeError("Body is unusable: Body has already been read");d7(t[Ha]);let n=e7(),i=o(a=>n.reject(a),"errorSteps"),s=o(a=>{try{n.resolve(e(a))}catch(c){i(c)}},"successSteps");return t[Ha].body==null?(s(Buffer.allocUnsafe(0)),n.promise):(await t7(t[Ha].body,s,i),n.promise)}o(qa,"consumeBody");function RD(t){let e=t[Ha].body;return e!=null&&(e.stream.locked||CA.isDisturbed(e.stream))}o(RD,"bodyUnusable");function f7(t){return JSON.parse(QD(t))}o(f7,"parseJSONFromBytes");function bD(t){let e=t[Ha].headersList,r=r7(e);return r==="failure"?null:r}o(bD,"bodyMimeType");_D.exports={extractBody:SD,safelyExtractBody:A7,cloneBody:u7,mixinBody:h7,streamRegistry:xD,hasFinalizationRegistry:ND,bodyUnusable:RD}});var qD=g((q2e,FD)=>{"use strict";var oe=require("node:assert"),pe=Ee(),{channels:vD}=_a(),HE=bE(),{RequestContentLengthMismatchError:wo,ResponseContentLengthMismatchError:m7,RequestAbortedError:kD,HeadersTimeoutError:g7,HeadersOverflowError:y7,SocketError:pp,InformationalError:ja,BodyTimeoutError:C7,HTTPParserError:E7,ResponseExceededMaxSizeError:B7}=Pe(),{kUrl:LD,kReset:Ir,kClient:YE,kParser:ht,kBlocking:IA,kRunning:er,kPending:I7,kSize:PD,kWriting:ws,kQueue:Hn,kNoRef:EA,kKeepAliveDefaultTimeout:b7,kHostHeader:Q7,kPendingIdx:w7,kRunningIdx:pn,kError:hn,kPipelining:up,kSocket:Ga,kKeepAliveTimeoutValue:hp,kMaxHeadersSize:zE,kKeepAliveMaxTimeout:N7,kKeepAliveTimeoutThreshold:x7,kHeadersTimeout:S7,kBodyTimeout:R7,kStrictContentLength:JE,kMaxRequests:DD,kCounter:_7,kMaxResponseSize:v7,kOnError:P7,kResume:Qs,kHTTPContext:UD}=nt(),hi=xP(),D7=Buffer.alloc(0),cp=Buffer[Symbol.species],lp=pe.addListener,T7=pe.removeAllListeners,jE;async function O7(){let t=process.env.JEST_WORKER_ID?NE():void 0,e;try{e=await WebAssembly.compile(_P())}catch{e=await WebAssembly.compile(t||NE())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,i)=>0,wasm_on_status:(r,n,i)=>{oe(Tt.ptr===r);let s=n-mi+fi.byteOffset;return Tt.onStatus(new cp(fi.buffer,s,i))||0},wasm_on_message_begin:r=>(oe(Tt.ptr===r),Tt.onMessageBegin()||0),wasm_on_header_field:(r,n,i)=>{oe(Tt.ptr===r);let s=n-mi+fi.byteOffset;return Tt.onHeaderField(new cp(fi.buffer,s,i))||0},wasm_on_header_value:(r,n,i)=>{oe(Tt.ptr===r);let s=n-mi+fi.byteOffset;return Tt.onHeaderValue(new cp(fi.buffer,s,i))||0},wasm_on_headers_complete:(r,n,i,s)=>(oe(Tt.ptr===r),Tt.onHeadersComplete(n,!!i,!!s)||0),wasm_on_body:(r,n,i)=>{oe(Tt.ptr===r);let s=n-mi+fi.byteOffset;return Tt.onBody(new cp(fi.buffer,s,i))||0},wasm_on_message_complete:r=>(oe(Tt.ptr===r),Tt.onMessageComplete()||0)}})}o(O7,"lazyllhttp");var GE=null,VE=O7();VE.catch();var Tt=null,fi=null,Ap=0,mi=null,M7=0,BA=1,Ya=2|BA,dp=4|BA,WE=8|M7,$E=class{static{o(this,"Parser")}constructor(e,r,{exports:n}){oe(Number.isFinite(e[zE]
Line truncated
|
||||
`;if(typeof i=="string"?Q+=`host: ${i}\r
|
||||
`:Q+=t[Q7],s?Q+=`connection: upgrade\r
|
||||
upgrade: ${s}\r
|
||||
`:t[up]&&!m[Ir]?Q+=`connection: keep-alive\r
|
||||
`:Q+=`connection: close\r
|
||||
`,Array.isArray(A))for(let S=0;S<A.length;S+=2){let w=A[S+0],R=A[S+1];if(Array.isArray(R))for(let T=0;T<R.length;T++)Q+=`${w}: ${R[T]}\r
|
||||
`;else Q+=`${w}: ${R}\r
|
||||
`}return vD.sendHeaders.hasSubscribers&&vD.sendHeaders.publish({request:e,headers:Q,socket:m}),!l||f===0?OD(C,null,t,e,m,u,Q,d):pe.isBuffer(l)?OD(C,l,t,e,m,u,Q,d):pe.isBlobLike(l)?typeof l.stream=="function"?MD(C,l.stream(),t,e,m,u,Q,d):H7(C,l,t,e,m,u,Q,d):pe.isStream(l)?q7(C,l,t,e,m,u,Q,d):pe.isIterable(l)?MD(C,l,t,e,m,u,Q,d):oe(!1),!0}o(F7,"writeH1");function q7(t,e,r,n,i,s,a,c){oe(s!==0||r[er]===0,"stream body cannot be pipelined");let l=!1,A=new fp({abort:t,socket:i,request:n,contentLength:s,client:r,expectsPayload:c,header:a}),u=o(function(C){if(!l)try{!A.write(C)&&this.pause&&this.pause()}catch(Q){pe.destroy(this,Q)}},"onData"),d=o(function(){l||e.resume&&e.resume()},"onDrain"),f=o(function(){if(queueMicrotask(()=>{e.removeListener("error",m)}),!l){let C=new kD;queueMicrotask(()=>m(C))}},"onClose"),m=o(function(C){if(!l){if(l=!0,oe(i.destroyed||i[ws]&&r[er]<=1),i.off("drain",d).off("error",m),e.removeListener("data",u).removeListener("end",m).removeListener("close",f),!C)try{A.end()}catch(Q){C=Q}A.destroy(C),C&&(C.code!=="UND_ERR_INFO"||C.message!=="reset")?pe.destroy(e,C):pe.destroy(e)}},"onFinished");e.on("data",u).on("end",m).on("error",m).on("close",f),e.resume&&e.resume(),i.on("drain",d).on("error",m),e.errorEmitted??e.errored?setImmediate(()=>m(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>m(null)),(e.closeEmitted??e.closed)&&setImmediate(f)}o(q7,"writeStream");function OD(t,e,r,n,i,s,a,c){try{e?pe.isBuffer(e)&&(oe(s===e.byteLength,"buffer body must have content length"),i.cork(),i.write(`${a}content-length: ${s}\r
|
||||
\r
|
||||
`,"latin1"),i.write(e),i.uncork(),n.onBodySent(e),!c&&n.reset!==!1&&(i[Ir]=!0)):s===0?i.write(`${a}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):(oe(s===null,"no body must not have content length"),i.write(`${a}\r
|
||||
`,"latin1")),n.onRequestSent(),r[Qs]()}catch(l){t(l)}}o(OD,"writeBuffer");async function H7(t,e,r,n,i,s,a,c){oe(s===e.size,"blob body must have content length");try{if(s!=null&&s!==e.size)throw new wo;let l=Buffer.from(await e.arrayBuffer());i.cork(),i.write(`${a}content-length: ${s}\r
|
||||
\r
|
||||
`,"latin1"),i.write(l),i.uncork(),n.onBodySent(l),n.onRequestSent(),!c&&n.reset!==!1&&(i[Ir]=!0),r[Qs]()}catch(l){t(l)}}o(H7,"writeBlob");async function MD(t,e,r,n,i,s,a,c){oe(s!==0||r[er]===0,"iterator body cannot be pipelined");let l=null;function A(){if(l){let f=l;l=null,f()}}o(A,"onDrain");let u=o(()=>new Promise((f,m)=>{oe(l===null),i[hn]?m(i[hn]):l=f}),"waitForDrain");i.on("close",A).on("drain",A);let d=new fp({abort:t,socket:i,request:n,contentLength:s,client:r,expectsPayload:c,header:a});try{for await(let f of e){if(i[hn])throw i[hn];d.write(f)||await u()}d.end()}catch(f){d.destroy(f)}finally{i.off("close",A).off("drain",A)}}o(MD,"writeIterable");var fp=class{static{o(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:i,client:s,expectsPayload:a,header:c}){this.socket=r,this.request=n,this.contentLength=i,this.client=s,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[ws]=!0}write(e){let{socket:r,request:n,contentLength:i,client:s,bytesWritten:a,expectsPayload:c,header:l}=this;if(r[hn])throw r[hn];if(r.destroyed)return!1;let A=Buffer.byteLength(e);if(!A)return!0;if(i!==null&&a+A>i){if(s[JE])throw new wo;process.emitWarning(new wo)}r.cork(),a===0&&(!c&&n.reset!==!1&&(r[Ir]=!0),i===null?r.write(`${l}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${l}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1")),i===null&&r.write(`\r
|
||||
${A.toString(16)}\r
|
||||
`,"latin1"),this.bytesWritten+=A;let u=r.write(e);return r.uncork(),n.onBodySent(e),u||r[ht].timeout&&r[ht].timeoutType===Ya&&r[ht].timeout.refresh&&r[ht].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:n,bytesWritten:i,expectsPayload:s,header:a,request:c}=this;if(c.onRequestSent(),e[ws]=!1,e[hn])throw e[hn];if(!e.destroyed){if(i===0?s?e.write(`${a}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):e.write(`${a}\r
|
||||
`,"latin1"):r===null&&e.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),r!==null&&i!==r){if(n[JE])throw new wo;process.emitWarning(new wo)}e[ht].timeout&&e[ht].timeoutType===Ya&&e[ht].timeout.refresh&&e[ht].timeout.refresh(),n[Qs]()}}destroy(e){let{socket:r,client:n,abort:i}=this;r[ws]=!1,e&&(oe(n[er]<=1,"pipeline should only contain this request"),i(e))}};FD.exports=k7});var WD=g((z2e,VD)=>{"use strict";var fn=require("node:assert"),{pipeline:z7}=require("node:stream"),we=Ee(),{RequestContentLengthMismatchError:KE,RequestAbortedError:HD,SocketError:bA,InformationalError:XE}=Pe(),{kUrl:mp,kReset:yp,kClient:Ja,kRunning:Cp,kPending:j7,kQueue:Ns,kPendingIdx:ZE,kRunningIdx:zn,kError:Gn,kSocket:qt,kStrictContentLength:G7,kOnError:eB,kMaxConcurrentStreams:JD,kHTTP2Session:jn,kResume:xs,kSize:Y7,kHTTPContext:J7}=nt(),es=Symbol("open streams"),zD,jD=!1,gp;try{gp=require("node:http2")}catch{gp={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:V7,HTTP2_HEADER_METHOD:W7,HTTP2_HEADER_PATH:$7,HTTP2_HEADER_SCHEME:K7,HTTP2_HEADER_CONTENT_LENGTH:X7,HTTP2_HEADER_EXPECT:Z7,HTTP2_HEADER_STATUS:eee}}=gp;function tee(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let i of n)e.push(Buffer.from(r),Buffer.from(i));else e.push(Buffer.from(r),Buffer.from(n));return e}o(tee,"parseH2Headers");async function ree(t,e){t[qt]=e,jD||(jD=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=gp.connect(t[mp],{createConnection:()=>e,peerMaxConcurrentStreams:t[JD]});r[es]=0,r[Ja]=t,r[qt]=e,we.addListener(r,"error",iee),we.addListener(r,"frameError",see),we.addListener(r,"end",oee),we.addListener(r,"goaway",aee),we.addListener(r,"close",function(){let{[Ja]:i}=this,{[qt]:s}=i,a=this[qt][Gn]||this[Gn]||new bA("closed",we.getSocketInfo(s));if(i[jn]=null,i.destroyed){fn(i[j7]===0);let c=i[Ns].splice(i[zn]);for(let l=0;l<c.length;l++){let A=c[l];we.errorRequest(i,A,a)}}}),r.unref(),t[jn]=r,e[jn]=r,we.addListener(e,"error",function(i){fn(i.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Gn]=i,this[Ja][eB](i)}),we.addListener(e,"end",function(){we.destroy(this,new bA("other side closed",we.getSocketInfo(this)))}),we.addListener(e,"close",function(){let i=this[Gn]||new bA("closed",we.getSocketInfo(this));t[qt]=null,this[jn]!=null&&this[jn].destroy(i),t[ZE]=t[zn],fn(t[Cp]===0),t.emit("disconnect",t[mp],[t],i),t[xs]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...i){return lee(t,...i)},resume(){nee(t)},destroy(i,s){n?queueMicrotask(s):e.destroy(i).on("close",s)},get destroyed(){return e.destroyed},busy(){return!1}}}o(ree,"connectH2");function nee(t){let e=t[qt];e?.destroyed===!1&&(t[Y7]===0&&t[JD]===0?(e.unref(),t[jn].unref()):(e.ref(),t[jn].ref()))}o(nee,"resumeH2");function iee(t){fn(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[qt][Gn]=t,this[Ja][eB](t)}o(iee,"onHttp2SessionError");function see(t,e,r){if(r===0){let n=new XE(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[qt][Gn]=n,this[Ja][eB](n)}}o(see,"onHttp2FrameError");function oee(){let t=new bA("other side closed",we.getSocketInfo(this[qt]));this.destroy(t),we.destroy(this[qt],t)}o(oee,"onHttp2SessionEnd");function aee(t){let e=this[Gn]||new bA(`HTTP/2: "GOAWAY" frame received with code ${t}`,we.getSocketInfo(this)),r=this[Ja];if(r[qt]=null,r[J7]=null,this[jn]!=null&&(this[jn].destroy(e),this[jn]=null),we.destroy(this[qt],e),r[zn]<r[Ns].length){let n=r[Ns][r[zn]];r[Ns][r[zn]++]=null,we.errorRequest(r,n,e),r[ZE]=r[zn]}fn(r[Cp]===0),r.emit("disconnect",r[mp],[r],e),r[xs]()}o(aee,"onHTTP2GoAway");function cee(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}o(cee,"shouldSendContentLength");function lee(t,e){let r=t[jn],{method:n,path:i,host:s,upgrade:a,expectContinue:c,signal:l,headers:A}=e,{body:u}=e;if(a)return we.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let d={};for(let L=0;L<A.length;L+=2){let W=A[L+0],de=A[L+1];if(Array.isArray(de))for(let le=0;le<de.length;le++)d[W]?d[W]+=`,${de[le]}`:d[W]=de[le];else d[W]=de}let f,{hostname:m,port:C}=t[mp];d[V7]=s||`${m}${C?`:${C}`:""}`,d[W7]=n;let Q=o(L=>{e.aborted||e.completed||(L=L||new HD,we.errorRequest(t,e,L),f!=null&&we.destroy(f,L),we.destroy(u,L),t[Ns][t[zn]++]=null,t[xs]())},"abort");try{e.onConnect(Q)}catch(L){we.errorRequest(t,e,L)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),f=r.request(d,{endStream:!1,signal:l}),f.id&&!f.pending?(e.onUpgrade(null,null,f),++r[es],t[Ns][t[zn]++]=null):f.once("ready",()=>{e.onUpgrade(null,null,f),++r[es],t[Ns][t[zn]++]=null}),f.once("close",()=>{r[es]-=1,r[es]===0&&r.unref()}),!0;d[$7]=i,d[K7]="https";let S=n==="PUT"||n==="POST"||n==="PATCH";u&&typeof u.read=="function"&&u.read(0);let w=we.bodyLength(u);if(we.isFormDataLike(u)){zD??=za().extractBody;let[L,W]=zD(u);d["content-type"]=W,u=L.stream,w=L.length}if(w==null&&(w=e.contentLength),(w===0||!S)&&(w=null),cee(n)&&w>0&&e.contentLength!=null&&e.contentLength!==w){if(t[G7])return we.errorRequest(t,e,new KE),!1;process.emitWarning(
Line truncated
|
||||
`,this[Oee]=l??3e5,this[Tee]=i??3e5,this[Mee]=R??!0,this[kee]=L,this[iB]=de,this[Rs]=null,this[Hee]=Te>-1?Te:-1,this[jee]=Xe??100,this[wt]=null,this[Yn]=[],this[rs]=0,this[Jn]=0,this[xA]=Ge=>oB(this,Ge),this[zee]=Ge=>aT(this,Ge)}get pipelining(){return this[bp]}set pipelining(e){this[bp]=e,this[xA](!0)}get[_A](){return this[Yn].length-this[Jn]}get[RA](){return this[Jn]-this[rs]}get[SA](){return this[Yn].length-this[rs]}get[xee](){return!!this[wt]&&!this[Wa]&&!this[wt].destroyed}get[nB](){return!!(this[wt]?.busy(null)||this[SA]>=(oT(this)||1)||this[_A]>0)}[Nee](e){cT(this),this.once("connect",e)}[qee](e,r){let n=e.origin||this[yi].origin,i=new Eee(n,e,r);return this[Yn].push(i),this[xo]||(No.bodyLength(i.body)==null&&No.isIterable(i.body)?(this[xo]=1,queueMicrotask(()=>oB(this))):this[xA](!0)),this[xo]&&this[_s]!==2&&this[nB]&&(this[_s]=2),this[_s]<2}async[Uee](){return new Promise(e=>{this[SA]?this[Rs]=e:e(null)})}async[Fee](e){return new Promise(r=>{let n=this[Yn].splice(this[Jn]);for(let s=0;s<n.length;s++){let a=n[s];No.errorRequest(this,a,e)}let i=o(()=>{this[Rs]&&(this[Rs](),this[Rs]=null),r(null)},"callback");this[wt]?(this[wt].destroy(e,i),this[wt]=null):queueMicrotask(i),this[xA]()})}},Jee=Ip();function aT(t,e){if(t[RA]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){ts(t[Jn]===t[rs]);let r=t[Yn].splice(t[rs]);for(let n=0;n<r.length;n++){let i=r[n];No.errorRequest(t,i,e)}ts(t[SA]===0)}}o(aT,"onError");async function cT(t){ts(!t[Wa]),ts(!t[wt]);let{host:e,hostname:r,protocol:n,port:i}=t[yi];if(r[0]==="["){let s=r.indexOf("]");ts(s!==-1);let a=r.substring(1,s);ts(sT.isIP(a)),r=a}t[Wa]=!0,Va.beforeConnect.hasSubscribers&&Va.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:i,version:t[wt]?.version,servername:t[Ss],localAddress:t[NA]},connector:t[wA]});try{let s=await new Promise((a,c)=>{t[wA]({host:e,hostname:r,protocol:n,port:i,servername:t[Ss],localAddress:t[NA]},(l,A)=>{l?c(l):a(A)})});if(t.destroyed){No.destroy(s.on("error",nT),new bee);return}ts(s);try{t[wt]=s.alpnProtocol==="h2"?await Yee(t,s):await Gee(t,s)}catch(a){throw s.destroy().on("error",nT),a}t[Wa]=!1,s[Lee]=0,s[iB]=t[iB],s[wee]=t,s[Ree]=null,Va.connected.hasSubscribers&&Va.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:i,version:t[wt]?.version,servername:t[Ss],localAddress:t[NA]},connector:t[wA],socket:s}),t.emit("connect",t[yi],[t])}catch(s){if(t.destroyed)return;if(t[Wa]=!1,Va.connectError.hasSubscribers&&Va.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:i,version:t[wt]?.version,servername:t[Ss],localAddress:t[NA]},connector:t[wA],error:s}),s.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(ts(t[RA]===0);t[_A]>0&&t[Yn][t[Jn]].servername===t[Ss];){let a=t[Yn][t[Jn]++];No.errorRequest(t,a,s)}else aT(t,s);t.emit("connectionError",t[yi],[t],s)}t[xA]()}o(cT,"connect");function iT(t){t[_s]=0,t.emit("drain",t[yi],[t])}o(iT,"emitDrain");function oB(t,e){t[xo]!==2&&(t[xo]=2,Vee(t,e),t[xo]=0,t[rs]>256&&(t[Yn].splice(0,t[rs]),t[Jn]-=t[rs],t[rs]=0))}o(oB,"resume");function Vee(t,e){for(;;){if(t.destroyed){ts(t[_A]===0);return}if(t[Rs]&&!t[SA]){t[Rs](),t[Rs]=null;return}if(t[wt]&&t[wt].resume(),t[nB])t[_s]=2;else if(t[_s]===2){e?(t[_s]=1,queueMicrotask(()=>iT(t))):iT(t);continue}if(t[_A]===0||t[RA]>=(oT(t)||1))return;let r=t[Yn][t[Jn]];if(t[yi].protocol==="https:"&&t[Ss]!==r.servername){if(t[RA]>0)return;t[Ss]=r.servername,t[wt]?.destroy(new Iee("servername changed"),()=>{t[wt]=null,oB(t)})}if(t[Wa])return;if(!t[wt]){cT(t);return}if(t[wt].destroyed||t[wt].busy(r))return;!r.aborted&&t[wt].write(r)?t[Jn]++:t[Yn].splice(t[Jn],1)}}o(Vee,"_resume");lT.exports=sB});var aB=g((X2e,AT)=>{"use strict";var Qp=class{static{o(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};AT.exports=class{static{o(this,"FixedQueue")}constructor(){this.head=this.tail=new Qp}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new Qp),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var dT=g((eze,uT)=>{var{kFree:Wee,kConnected:$ee,kPending:Kee,kQueued:Xee,kRunning:Zee,kSize:ete}=nt(),So=Symbol("pool"),cB=class{static{o(this,"PoolStats")}constructor(e){this[So]=e}get connected(){return this[So][$ee]}get free(){return this[So][Wee]}get pending(){return this[So][Kee]}get queued(){return this[So][Xee]}get running(){return this[So][Zee]}get size(){return this[So][ete]}};uT.exports=cB});var hB=g((rze,IT)=>{"use strict";var tte=Ta(),rte=aB(),{kConnected:lB,kSize:pT,kRunning:hT,kPending:fT,kQueued:vA,kBusy:nte,kFree:ite,kUrl:ste,kClose:ote,kDestroy:ate,kDispatch:cte}=nt(),lte=dT(),br=Symbol("c
Line truncated
|
||||
${n.count} ${n.noun} ${n.is} pending:
|
||||
|
||||
${e.format(r)}
|
||||
`.trim())}};SM.exports=hI});var Hp=g((eje,DM)=>{"use strict";var _M=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:One}=Pe(),Mne=Xa();PM()===void 0&&vM(new Mne);function vM(t){if(!t||typeof t.dispatch!="function")throw new One("Argument agent must implement Agent");Object.defineProperty(globalThis,_M,{value:t,writable:!0,enumerable:!1,configurable:!1})}o(vM,"setGlobalDispatcher");function PM(){return globalThis[_M]}o(PM,"getGlobalDispatcher");DM.exports={setGlobalDispatcher:vM,getGlobalDispatcher:PM}});var zp=g((nje,TM)=>{"use strict";TM.exports=class{static{o(this,"DecoratorHandler")}#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var MM=g((sje,OM)=>{"use strict";var kne=Bp();OM.exports=t=>{let e=t?.maxRedirections;return r=>o(function(i,s){let{maxRedirections:a=e,...c}=i;if(!a)return r(i,s);let l=new kne(r,a,i,s);return r(c,l)},"redirectInterceptor")}});var LM=g((aje,kM)=>{"use strict";var Lne=Pp();kM.exports=t=>e=>o(function(n,i){return e(n,new Lne({...n,retryOptions:{...t,...n.retryOptions}},{handler:i,dispatch:e}))},"retryInterceptor")});var FM=g((lje,UM)=>{"use strict";var Une=Ee(),{InvalidArgumentError:Fne,RequestAbortedError:qne}=Pe(),Hne=zp(),fI=class extends Hne{static{o(this,"DumpHandler")}#e=1024*1024;#t=null;#i=!1;#n=!1;#r=0;#s=null;#o=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new Fne("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#o=r}onConnect(e){this.#t=e,this.#o.onConnect(this.#a.bind(this))}#a(e){this.#n=!0,this.#s=e}onHeaders(e,r,n,i){let a=Une.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new qne(`Response size (${a}) larger than maxSize (${this.#e})`);return this.#n?!0:this.#o.onHeaders(e,r,n,i)}onError(e){this.#i||(e=this.#s??e,this.#o.onError(e))}onData(e){return this.#r=this.#r+e.length,this.#r>=this.#e&&(this.#i=!0,this.#n?this.#o.onError(this.#s):this.#o.onComplete([])),!0}onComplete(e){if(!this.#i){if(this.#n){this.#o.onError(this.reason);return}this.#o.onComplete(e)}}};function zne({maxSize:t}={maxSize:1024*1024}){return e=>o(function(n,i){let{dumpMaxSize:s=t}=n,a=new fI({maxSize:s},i);return e(n,a)},"Intercept")}o(zne,"createDumpInterceptor");UM.exports=zne});var zM=g((uje,HM)=>{"use strict";var{isIP:jne}=require("node:net"),{lookup:Gne}=require("node:dns"),Yne=zp(),{InvalidArgumentError:cc,InformationalError:Jne}=Pe(),qM=Math.pow(2,31)-1,mI=class{static{o(this,"DNSInstance")}#e=0;#t=0;#i=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#n,this.pick=e.pick??this.#r}get full(){return this.#i.size===this.#t}runLookup(e,r,n){let i=this.#i.get(e.hostname);if(i==null&&this.full){n(null,e.origin);return}let s={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(i==null)this.lookup(e,s,(a,c)=>{if(a||c==null||c.length===0){n(a??new Jne("No DNS entries found"));return}this.setRecords(e,c);let l=this.#i.get(e.hostname),A=this.pick(e,l,s.affinity),u;typeof A.port=="number"?u=`:${A.port}`:e.port!==""?u=`:${e.port}`:u="",n(null,`${e.protocol}//${A.family===6?`[${A.address}]`:A.address}${u}`)});else{let a=this.pick(e,i,s.affinity);if(a==null){this.#i.delete(e.hostname),this.runLookup(e,r,n);return}let c;typeof a.port=="number"?c=`:${a.port}`:e.port!==""?c=`:${e.port}`:c="",n(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${c}`)}}#n(e,r,n){Gne(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(i,s)=>{if(i)return n(i);let a=new Map;for(let c of s)a.set(`${c.address}:${c.family}`,c);n(null,a.values())})}#r(e,r,n){let i=null,{records:s,offset:a}=r,c;if(this.dualStack?(n==null&&(a==null||a===qM?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),s[n]!=null&&s[n].ips.length>0?c=s[n]:c=s[n===4?6:4]):c=s[n],c==null||c.ips.length===0)return i;c.offset==null||c.offset===qM?c.offset=0:c.offset++;let l=c.offset%c.ips.length;return i=c.ips[l]??null,i==null?i:Date.now()-i.timestamp>i.ttl?(c.ips.splice(l,1),this.pick(e,r,n)):i}setRecords(e,r){let n=Date.now(),i={records:{4:null,6:null}};for(let s of r){s.timestamp=n,typeof s.ttl=="number"?s.ttl=Math.min(s.ttl,this.#e):s.ttl=this.#e;let a=i.records[s.family]??{ips:[]};a.ips.push(s),i.records[s.family]=a}this.#i.set(e.hostname,i)}getHandler(e,r){return new gI(this,e,r)}},gI=class extends Yne{static{o(this,"DNSDispatchHandler")}#e=null;#t=null;#i=null
Line truncated
|
||||
${s}`;break;case"retry":IU(s)&&(r[i]=s);break;case"id":bU(s)&&(r[i]=s);break;case"event":s.length>0&&(r[i]=s);break}}processEvent(e){e.retry&&IU(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&bU(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};QU.exports={EventSourceStream:rb}});var DU=g((hGe,PU)=>{"use strict";var{pipeline:tce}=require("node:stream"),{fetching:rce}=GA(),{makeRequest:nce}=uc(),{webidl:as}=$t(),{EventSourceStream:ice}=wU(),{parseMIMEType:sce}=Br(),{createFastMessageEvent:oce}=gc(),{isNetworkError:NU}=zA(),{delay:ace}=eb(),{kEnumerableProperty:zo}=Ee(),{environmentSettingsObject:xU}=Ur(),SU=!1,RU=3e3,nu=0,_U=1,iu=2,cce="anonymous",lce="use-credentials",Ic=class t extends EventTarget{static{o(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#i=!1;#n=nu;#r=null;#s=null;#o;#a;constructor(e,r={}){super(),as.util.markAsUncloneable(this);let n="EventSource constructor";as.argumentLengthCheck(arguments,1,n),SU||(SU=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=as.converters.USVString(e,n,"url"),r=as.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#o=r.dispatcher,this.#a={lastEventId:"",reconnectionTime:RU};let i=xU,s;try{s=new URL(e,i.settingsObject.baseUrl),this.#a.origin=s.origin}catch(l){throw new DOMException(l,"SyntaxError")}this.#t=s.href;let a=cce;r.withCredentials&&(a=lce,this.#i=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=xU.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#t)],this.#r=nce(c),this.#c()}get readyState(){return this.#n}get url(){return this.#t}get withCredentials(){return this.#i}#c(){if(this.#n===iu)return;this.#n=nu;let e={request:this.#r,dispatcher:this.#o},r=o(n=>{NU(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#l()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(NU(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#l();return}let i=n.headersList.get("content-type",!0),s=i!==null?sce(i):"failure",a=s!=="failure"&&s.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#n=_U,this.dispatchEvent(new Event("open")),this.#a.origin=n.urlList[n.urlList.length-1].origin;let c=new ice({eventSourceSettings:this.#a,push:l=>{this.dispatchEvent(oce(l.type,l.options))}});tce(n.body.stream,c,l=>{l?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#s=rce(e)}async#l(){this.#n!==iu&&(this.#n=nu,this.dispatchEvent(new Event("error")),await ace(this.#a.reconnectionTime),this.#n===nu&&(this.#a.lastEventId.length&&this.#r.headersList.set("last-event-id",this.#a.lastEventId,!0),this.#c()))}close(){as.brandCheck(this,t),this.#n!==iu&&(this.#n=iu,this.#s.abort(),this.#r=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},vU={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:nu,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:_U,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:iu,writable:!1}};Object.defineProperties(Ic,vU);Object.defineProperties(Ic.prototype,vU);Object.defineProperties(Ic.prototype,{close:zo,onerror:zo,onmessage:zo,onopen:zo,readyState:zo,url:zo,withCredentials:zo});as.converters.EventSourceInitDict=as.dictionaryConverter([{key:"withCredentials",converter:as.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:as.converters.any}]);PU.exports={EventSource:Ic,defaultReconnectionTime:RU}});var kU=g((mGe,ce)=>{"use strict";var Ace=$a(),TU=lA(),uce=Ka(),dce=vT(),pce=Xa(),hce=xB(),fce=tO(),mce=aO(),OU=Pe(),vh=Ee(),{InvalidArgumentError:_h}=OU,bc=JO(),gce=uA(),yce=cI(),Cce=RM(),Ece=uI(),Bce=WB(),Ice=Pp(),{getGlobalDispatcher:MU,setGlobalDispatcher:bce}=Hp(),Qce=zp(),wce=Bp(),Nce=Ip();Object.assign(TU.prototype,bc);ce.exports.Dispatcher=TU;ce.exports.Client=Ace;ce.exports.Pool=uce;ce.exports.BalancedPool=dce;ce.exports.Agent=pce;ce.exports.ProxyAgent=hce;ce.exports.En
Line truncated
|
||||
|
||||
Error Code : ${s.statusCode}
|
||||
Error Code : ${a.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: ${a.message}`)})).result)===null||r===void 0?void 0:r.value;if(!s)throw new Error("Response json body do not have ID Token field");return s})}static getIDToken(e){return UU(this,void 0,void 0,function*(){try{let r=t.getIDTokenUrl();if(e){let i=encodeURIComponent(e);r=`${r}&audience=${i}`}(0,FU.debug)(`ID token url is ${r}`);let n=yield t.getCall(r);return(0,FU.setSecret)(n),n}catch(r){throw new Error(`Error message: ${r.message}`)}})}};Qc.OidcClient=Ab});var hb=g(xr=>{"use strict";var ub=xr&&xr.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(xr,"__esModule",{value:!0});xr.summary=xr.markdownSummary=xr.SUMMARY_DOCS_URL=xr.SUMMARY_ENV_VAR=void 0;var ele=require("os"),db=require("fs"),{access:tle,appendFile:rle,writeFile:nle}=db.promises;xr.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";xr.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var pb=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){return ub(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[xr.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${xr.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield tle(e,db.constants.R_OK|db.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,r,n={}){let i=Object.entries(n).map(([s,a])=>` ${s}="${a}"`).join("");return r?`<${e}${i}>${r}</${e}>`:`<${e}${i}>`}write(e){return ub(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?nle:rle)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return ub(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,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(ele.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),i=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(i).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",i=e.map(a=>this.wrap("li",a)).join(""),s=this.wrap(n,i);return this.addRaw(s).addEOL()}addTable(e){let r=e.map(i=>{let s=i.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:l,colspan:A,rowspan:u}=a,d=c?"th":"td",f=Object.assign(Object.assign({},A&&{colspan:A}),u&&{rowspan:u});return this.wrap(d,l,f)}).join("");return this.wrap("tr",s)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:i,height:s}=n||{},a=Object.assign(Object.assign({},i&&{width:i}),s&&{height:s}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,i=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",s=this.wrap(i,e);return this.addRaw(s).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,r){let n=Object.assign({},r&&{cite:r}),i=this.wrap("blockquote",e,n);return this.addRaw(i).addEOL()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},HU=new pb;xr.markdownSummary=HU;xr.summary=HU});var zU=g(Xn=>{"use strict";var ile=Xn&&Xn.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),sle=Xn&&Xn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ole=Xn&&Xn.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&ile(r,e,n[i]);return sle(r,e),r}}();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.toPosixPath=cle;Xn.toWin32Path=lle;Xn.toPlatformPath=Ale;var ale=ole(require("path"));function cle(t){return t.replace(/[\\]/g,"/")}o(cle,"toPosixPath");function lle(t){return t.replace(/[/]/g,"\\")}o(lle,"toWin32Path");function Ale(t){return t.replacLine truncated
|
||||
`);return{name:e,version:r}}),"getLinuxInfo");Re.platform=oF.default.platform();Re.arch=oF.default.arch();Re.isWindows=Re.platform==="win32";Re.isMacOS=Re.platform==="darwin";Re.isLinux=Re.platform==="linux";function jle(){return Hh(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield Re.isWindows?qle():Re.isMacOS?Hle():zle()),{platform:Re.platform,arch:Re.arch,isWindows:Re.isWindows,isMacOS:Re.isMacOS,isLinux:Re.isLinux})})}o(jle,"getDetails")});var ft=g(he=>{"use strict";var Gle=he&&he.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Yle=he&&he.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Bb=he&&he.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Gle(r,e,n[i]);return Yle(r,e),r}}(),cF=he&&he.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(he,"__esModule",{value:!0});he.platform=he.toPlatformPath=he.toWin32Path=he.toPosixPath=he.markdownSummary=he.summary=he.ExitCode=void 0;he.exportVariable=Wle;he.setSecret=$le;he.addPath=Kle;he.getInput=Ib;he.getMultilineInput=Xle;he.getBooleanInput=Zle;he.setOutput=eAe;he.setCommandEcho=tAe;he.setFailed=rAe;he.isDebug=nAe;he.debug=iAe;he.error=AF;he.warning=sAe;he.notice=oAe;he.info=aAe;he.startGroup=uF;he.endGroup=dF;he.group=cAe;he.saveState=lAe;he.getState=AAe;he.getIDToken=uAe;var In=iv(),jo=av(),xc=Td(),lF=Bb(require("os")),Jle=Bb(require("path")),Vle=qU(),Eb;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(Eb||(he.ExitCode=Eb={}));function Wle(t,e){let r=(0,xc.toCommandValue)(e);if(process.env[t]=r,process.env.GITHUB_ENV||"")return(0,jo.issueFileCommand)("ENV",(0,jo.prepareKeyValueMessage)(t,e));(0,In.issueCommand)("set-env",{name:t},r)}o(Wle,"exportVariable");function $le(t){(0,In.issueCommand)("add-mask",{},t)}o($le,"setSecret");function Kle(t){process.env.GITHUB_PATH||""?(0,jo.issueFileCommand)("PATH",t):(0,In.issueCommand)("add-path",{},t),process.env.PATH=`${t}${Jle.delimiter}${process.env.PATH}`}o(Kle,"addPath");function Ib(t,e){let r=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!r)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?r:r.trim()}o(Ib,"getInput");function Xle(t,e){let r=Ib(t,e).split(`
|
||||
`).filter(n=>n!=="");return e&&e.trimWhitespace===!1?r:r.map(n=>n.trim())}o(Xle,"getMultilineInput");function Zle(t,e){let r=["true","True","TRUE"],n=["false","False","FALSE"],i=Ib(t,e);if(r.includes(i))return!0;if(n.includes(i))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(Zle,"getBooleanInput");function eAe(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,jo.issueFileCommand)("OUTPUT",(0,jo.prepareKeyValueMessage)(t,e));process.stdout.write(lF.EOL),(0,In.issueCommand)("set-output",{name:t},(0,xc.toCommandValue)(e))}o(eAe,"setOutput");function tAe(t){(0,In.issue)("echo",t?"on":"off")}o(tAe,"setCommandEcho");function rAe(t){process.exitCode=Eb.Failure,AF(t)}o(rAe,"setFailed");function nAe(){return process.env.RUNNER_DEBUG==="1"}o(nAe,"isDebug");function iAe(t){(0,In.issueCommand)("debug",{},t)}o(iAe,"debug");function AF(t,e={}){(0,In.issueCommand)("error",(0,xc.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(AF,"error");function sAe(t,e={}){(0,In.issueCommand)("warning",(0,xc.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(sAe,"warning");function oAe(t,e={}){(0,In.issueCommand)("notice",(0,xc.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(oAe,"notice");function aAe(t){process.stdout.write(t+lF.EOL)}o(aAe,"info");function uF(t){(0,In.issue)("group",t)}o(uF,"startGroup");function dF(){(0,In.issue)("endgroup")}o(dF,"endGroup");function cAe(t,e){return cF(this,void 0,void 0,function*(){uF(t);let r;try{r=yield e()}finally{dF()}return r})}o(cAe,"group");function lAe(t,e){if(process.env.GITHUB_STATE||"")return(0,jo.issueFileCommand)("STATE",(0,jo.prepareKeyValueMessage)(t,e));(0,In.issueCommand)("save-state",{name:t},(0,xc.toCommandValue)(e))}o(lAe,"saveState");function AAe(t){return process.env[`STATE_${t}`]||""}o(AAe,"getState");function uAe(t){return cF(this,void 0,void 0,function*(){return yield Vle.OidcClient.getIDToken(t)})}o(uAe,"getIDToken");var dAe=hb();Object.defineProperty(he,"summary",{enumerable:!0,get:function(){return dAe.summary}});var pAe=hb();Object.defineProperty(he,"markdownSummary",{enumerable:!0,get:function(){return pAe.markdownSummary}});var bb=zU();Object.defineProperty(he,"toPosixPath",{enumerable:!0,get:function(){return bb.toPosixPath}});Object.defineProperty(he,"toWin32Path",{enumerable:!0,get:function(){return bb.toWin32Path}});Object.defineProperty(he,"toPlatformPath",{enumerable:!0,get:function(){return bb.toPlatformPath}});he.platform=Bb(aF())});var pF=g(ls=>{"use strict";var hAe=ls&&ls.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),fAe=ls&&ls.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mAe=ls&&ls.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&hAe(r,e,n[i]);return fAe(r,e),r}}();Object.defineProperty(ls,"__esModule",{value:!0});ls.getOptions=gAe;var cu=mAe(ft());function gAe(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,matchDirectories:!0,omitBrokenSymbolicLinks:!0,excludeHiddenFiles:!1};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,cu.debug(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,cu.debug(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.matchDirectories=="boolean"&&(e.matchDirectories=t.matchDirectories,cu.debug(`matchDirectories '${e.matchDirectories}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,cu.debug(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`)),typeof t.excludeHiddenFiles=="boolean"&&(e.excludeHiddenFiles=t.excludeHiddenFiles,cu.debug(`excludeHiddenFiles '${e.excludeHiddenFiles}'`))),e}o(gAe,"getOptions")});var jh=g(ir=>{"use strict";var yAe=ir&&ir.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),CAe=ir&&ir.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),EAe=ir&&ir.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&yAe(r,e,n[i]);return CAe(r,e),r}}(),BAe=ir&&ir.__importDefault||function(t)Line truncated
|
||||
%s`,W,W,R,n);var de=R.type==="*"?Rb:R.type==="?"?Sb:"\\"+R.type;i=!0,n=n.slice(0,R.reStart)+de+"\\("+W}C(),s&&(n+="\\\\");var le=!1;switch(n.charAt(0)){case"[":case".":case"(":le=!0}for(var Te=c.length-1;Te>-1;Te--){var Oe=c[Te],He=n.slice(0,Oe.reStart),Xe=n.slice(Oe.reStart,Oe.reEnd-8),fe=n.slice(Oe.reEnd-8,Oe.reEnd),Ge=n.slice(Oe.reEnd);fe+=Ge;var ai=He.split("(").length-1,ji=Ge;for(Q=0;Q<ai;Q++)ji=ji.replace(/\)[+*?]?/,"");Ge=ji;var Gi="";Ge===""&&e!==Jh&&(Gi="$");var SC=He+Xe+Ge+Gi+fe;n=SC}if(n!==""&&i&&(n="(?=.)"+n),le&&(n=f+n),e===Jh)return[n,i];if(!i)return KAe(t);var RC=r.nocase?"i":"";try{var Co=new RegExp("^"+n+"$",RC)}catch{return new RegExp("$.")}return Co._glob=t,Co._src=n,Co}o(WAe,"parse");Wr.makeRe=function(t,e){return new Kt(t,e||{}).makeRe()};Kt.prototype.makeRe=$Ae;function $Ae(){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,r=e.noglobstar?Rb:e.dot?HAe:zAe,n=e.nocase?"i":"",i=t.map(function(s){return s.map(function(a){return a===_b?r:typeof a=="string"?XAe(a):a._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch{this.regexp=!1}return this.regexp}o($Ae,"makeRe");Wr.match=function(t,e,r){r=r||{};var n=new Kt(e,r);return t=t.filter(function(i){return n.match(i)}),n.options.nonull&&!t.length&&t.push(e),t};Kt.prototype.match=o(function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;Au.sep!=="/"&&(e=e.split(Au.sep).join("/")),e=e.split(OF),this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var s,a;for(a=e.length-1;a>=0&&(s=e[a],!s);a--);for(a=0;a<i.length;a++){var c=i[a],l=e;n.matchBase&&c.length===1&&(l=[s]);var A=this.matchOne(l,c,r);if(A)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate},"match");Kt.prototype.matchOne=function(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,s=0,a=t.length,c=e.length;i<a&&s<c;i++,s++){this.debug("matchOne loop");var l=e[s],A=t[i];if(this.debug(e,l,A),l===!1)return!1;if(l===_b){this.debug("GLOBSTAR",[e,l,A]);var u=i,d=s+1;if(d===c){for(this.debug("** at the end");i<a;i++)if(t[i]==="."||t[i]===".."||!n.dot&&t[i].charAt(0)===".")return!1;return!0}for(;u<a;){var f=t[u];if(this.debug(`
|
||||
globstar while`,t,u,e,d,f),this.matchOne(t.slice(u),e.slice(d),r))return this.debug("globstar found match!",u,a,f),!0;if(f==="."||f===".."||!n.dot&&f.charAt(0)==="."){this.debug("dot detected!",t,u,e,d);break}this.debug("globstar swallow a segment, and continue"),u++}return!!(r&&(this.debug(`
|
||||
>>> no match, partial?`,t,u,e,d),u===a))}var m;if(typeof l=="string"?(m=A===l,this.debug("string match",l,A,m)):(m=A.match(l),this.debug("pattern match",l,A,m)),!m)return!1}if(i===a&&s===c)return!0;if(i===a)return r;if(s===c)return i===a-1&&t[i]==="";throw new Error("wtf?")};function KAe(t){return t.replace(/\\(.)/g,"$1")}o(KAe,"globUnescape");function XAe(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}o(XAe,"regExpEscape")});var FF=g(bn=>{"use strict";var ZAe=bn&&bn.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),eue=bn&&bn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),UF=bn&&bn.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&ZAe(r,e,n[i]);return eue(r,e),r}}(),tue=bn&&bn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bn,"__esModule",{value:!0});bn.Path=void 0;var uu=UF(require("path")),Gs=UF(jh()),du=tue(require("assert")),rue=process.platform==="win32",vb=class{static{o(this,"Path")}constructor(e){if(this.segments=[],typeof e=="string")if((0,du.default)(e,"Parameter 'itemPath' must not be empty"),e=Gs.safeTrimTrailingSeparator(e),!Gs.hasRoot(e))this.segments=e.split(uu.sep);else{let r=e,n=Gs.dirname(r);for(;n!==r;){let i=uu.basename(r);this.segments.unshift(i),r=n,n=Gs.dirname(r)}this.segments.unshift(r)}else{(0,du.default)(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let r=0;r<e.length;r++){let n=e[r];(0,du.default)(n,"Parameter 'itemPath' must not contain any empty segments"),n=Gs.normalizeSeparators(e[r]),r===0&&Gs.hasRoot(n)?(n=Gs.safeTrimTrailingSeparator(n),(0,du.default)(n===Gs.dirname(n),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(n)):((0,du.default)(!n.includes(uu.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(n))}}}toString(){let e=this.segments[0],r=e.endsWith(uu.sep)||rue&&/^[A-Z]:$/i.test(e);for(let n=1;n<this.segments.length;n++)r?r=!1:e+=uu.sep,e+=this.segments[n];return e}};bn.Path=vb});var qF=g(Qn=>{"use strict";var nue=Qn&&Qn.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),iue=Qn&&Qn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Tb=Qn&&Qn.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&nue(r,e,n[i]);return iue(r,e),r}}(),sue=Qn&&Qn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.Pattern=void 0;var oue=Tb(require("os")),pu=Tb(require("path")),Sr=Tb(jh()),Yo=sue(require("assert")),aue=LF(),Pb=Yh(),Wh=FF(),As=process.platform==="win32",Db=class t{static{o(this,"Pattern")}constructor(e,r=!1,n,i){this.negate=!1;let s;if(typeof e=="string")s=e.trim();else{n=n||[],(0,Yo.default)(n.length,"Parameter 'segments' must not empty");let A=t.getLiteral(n[0]);(0,Yo.default)(A&&Sr.hasAbsoluteRoot(A),"Parameter 'segments' first element must be a root path"),s=new Wh.Path(n).toString().trim(),e&&(s=`!${s}`)}for(;s.startsWith("!");)this.negate=!this.negate,s=s.substr(1).trim();s=t.fixupPattern(s,i),this.segments=new Wh.Path(s).segments,this.trailingSeparator=Sr.normalizeSeparators(s).endsWith(pu.sep),s=Sr.safeTrimTrailingSeparator(s);let a=!1,c=this.segments.map(A=>t.getLiteral(A)).filter(A=>!a&&!(a=A===""));this.searchPath=new Wh.Path(c).toString(),this.rootRegExp=new RegExp(t.regExpEscape(c[0]),As?"i":""),this.isImplicitPattern=r;let l={dot:!0,nobrace:!0,nocase:As,nocomment:!0,noext:!0,nonegate:!0};s=As?s.replace(/\\/g,"/"):s,this.minimatch=new aue.Minimatch(s,l)}match(e){return this.segments[this.segments.length-1]==="**"?(e=Sr.normalizeSeparators(e),!e.endsWith(pu.sep)&&this.isImplicitPattern===!1&&(e=`${e}${pu.sep}`)):e=Sr.safeTrimTrailingSeparator(e),this.minimatch.match(e)?this.trailingSeparator?Pb.MatchKind.Directory:Pb.MatchKind.All:Pb.MatchKind.None}partialMa
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
|
||||
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
|
||||
`));let i=e.split(`
|
||||
`).map(s=>s.trim());for(let s of i)!s||s.startsWith("#")||n.patterns.push(new YF.Pattern(s));return n.searchPaths.push(...Kh.getSearchPaths(n.patterns)),n})}static stat(e,r,n){return Mb(this,void 0,void 0,function*(){let i;if(r.followSymbolicLinks)try{i=yield hu.promises.stat(e.path)}catch(s){if(s.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){kb.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 s}else i=yield hu.promises.lstat(e.path);if(i.isDirectory()&&r.followSymbolicLinks){let s=yield hu.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(a=>a===s)){kb.debug(`Symlink cycle detected for path '${e.path}' and realpath '${s}'`);return}n.push(s)}return i})}};Ht.DefaultGlobber=Lb});var XF=g($r=>{"use strict";var pue=$r&&$r.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),hue=$r&&$r.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Rc=$r&&$r.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&pue(r,e,n[i]);return hue(r,e),r}}(),fue=$r&&$r.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})},mue=$r&&$r.__asyncValues||function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(a){return new Promise(function(c,l){a=t[s](a),i(c,l,a.done,a.value)})}}function i(s,a,c,l){Promise.resolve(l).then(function(A){s({value:A,done:c})},a)}};Object.defineProperty($r,"__esModule",{value:!0});$r.hashFiles=Eue;var WF=Rc(require("crypto")),$F=Rc(ft()),KF=Rc(require("fs")),gue=Rc(require("stream")),yue=Rc(require("util")),Cue=Rc(require("path"));function Eue(t,e){return fue(this,arguments,void 0,function*(r,n,i=!1){var s,a,c,l,A;let u=i?$F.info:$F.debug,d=!1,f=n||((A=process.env.GITHUB_WORKSPACE)!==null&&A!==void 0?A:process.cwd()),m=WF.createHash("sha256"),C=0;try{for(var Q=!0,S=mue(r.globGenerator()),w;w=yield S.next(),s=w.done,!s;Q=!0){l=w.value,Q=!1;let R=l;if(u(R),!R.startsWith(`${f}${Cue.sep}`)){u(`Ignore '${R}' since it is not under GITHUB_WORKSPACE.`);continue}if(KF.statSync(R).isDirectory()){u(`Skip directory '${R}'.`);continue}let T=WF.createHash("sha256");yield yue.promisify(gue.pipeline)(KF.createReadStream(R),T),m.write(T.digest()),C++,d||(d=!0)}}catch(R){a={error:R}}finally{try{!Q&&!s&&(c=S.return)&&(yield c.call(S))}finally{if(a)throw a.error}}return m.end(),d?(u(`Found ${C} files to hash.`),m.digest("hex")):(u("No matches found for glob"),"")})}o(Eue,"hashFiles")});var tq=g(_c=>{"use strict";var ZF=_c&&_c.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(_c,"__esModule",{value:!0});_c.create=eq;_c.hashFiles=bue;var Bue=VF(),Iue=XF();function eq(t,e){return ZF(this,void 0,void 0,function*(){return yield Bue.DefaultGlobber.create(t,e)})}o(eq,"create");function bue(t){return ZF(this,arguments,void 0,function*(e,r="",n,i=!1){let s=!0;n&&typeof n.followSymbolicLinks=="boolean"&&(s=n.followSymbolicLinks);let a=yield eq(e,{followSymbolicLinks:s});return(0,Iue.hashFiles)(a,r,i)})}o(bue,"hashFiles")});var rf=g((ue,oq)=>{ue=oq.exports=Ce;var Ue;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?Ue=o(function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)},"debug"):Ue=o(function(){},"debug");ue.SEMVER_SPEC_VERSION="2.0.0";var mu=256,Xh=Number.MAX_SAFE_INTEGER||9007199254740991,Ub=16,Que=mu-6,vc=ue.re=[],Le=ue.safeRe=[],U=ue.src=[],O=ue.tokens={},iq=0;function Be(t){O[t]=iq++}o(Be,"tok");va
Line truncated
|
||||
`),{implicitDescendants:!1});try{for(var A=!0,u=lde(l.globGenerator()),d;d=yield u.next(),e=d.done,!e;A=!0){i=d.value,A=!1;let f=i,m=nf.relative(c,f).replace(new RegExp(`\\${nf.sep}`,"g"),"/");Eu.debug(`Matched: ${m}`),m===""?a.push("."):a.push(`${m}`)}}catch(f){r={error:f}}finally{try{!A&&!e&&(n=u.return)&&(yield n.call(u))}finally{if(r)throw r.error}}return a})}o(gde,"resolvePaths");function yde(t){return Dc(this,void 0,void 0,function*(){return pde.promisify(Yb.unlink)(t)})}o(yde,"unlinkFile");function dq(t){return Dc(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),Eu.debug(`Checking ${e} ${r.join(" ")}`);try{yield Ade.exec(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i=>n+=i.toString(),stderr:i=>n+=i.toString()}})}catch(i){Eu.debug(i.message)}return n=n.trim(),Eu.debug(n),n})}o(dq,"getVersion");function Cde(){return Dc(this,void 0,void 0,function*(){let t=yield dq("zstd",["--quiet"]),e=dde.clean(t);return Eu.debug(`zstd version: ${e}`),t===""?Wo.CompressionMethod.Gzip:Wo.CompressionMethod.ZstdWithoutLong})}o(Cde,"getCompressionMethod");function Ede(t){return t===Wo.CompressionMethod.Gzip?Wo.CacheFilename.Gzip:Wo.CacheFilename.Zstd}o(Ede,"getCacheFileName");function Bde(){return Dc(this,void 0,void 0,function*(){return Yb.existsSync(Wo.GnuTarPathOnWindows)?Wo.GnuTarPathOnWindows:(yield dq("tar")).toLowerCase().includes("gnu tar")?Aq.which("tar"):""})}o(Bde,"getGnuTarPathOnWindows");function Ide(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}o(Ide,"assertDefined");function bde(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(hde),uq.createHash("sha256").update(n.join("|")).digest("hex")}o(bde,"getCacheVersion");function Qde(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}o(Qde,"getRuntimeToken")});var Kr={};Pd(Kr,{__addDisposableResource:()=>kq,__assign:()=>sf,__asyncDelegator:()=>Rq,__asyncGenerator:()=>Sq,__asyncValues:()=>_q,__await:()=>Oc,__awaiter:()=>Iq,__classPrivateFieldGet:()=>Tq,__classPrivateFieldIn:()=>Mq,__classPrivateFieldSet:()=>Oq,__createBinding:()=>af,__decorate:()=>fq,__disposeResources:()=>Lq,__esDecorate:()=>gq,__exportStar:()=>Qq,__extends:()=>pq,__generator:()=>bq,__importDefault:()=>Dq,__importStar:()=>Pq,__makeTemplateObject:()=>vq,__metadata:()=>Bq,__param:()=>mq,__propKey:()=>Cq,__read:()=>Wb,__rest:()=>hq,__rewriteRelativeImportExtension:()=>Uq,__runInitializers:()=>yq,__setFunctionName:()=>Eq,__spread:()=>wq,__spreadArray:()=>xq,__spreadArrays:()=>Nq,__values:()=>of,default:()=>xde});function pq(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Jb(t,e);function r(){this.constructor=t}o(r,"__"),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function hq(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function fq(t,e,r,n){var i=arguments.length,s=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(s=(i<3?a(s):i>3?a(e,r,s):a(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function mq(t,e){return function(r,n){e(r,n,t)}}function gq(t,e,r,n,i,s){function a(w){if(w!==void 0&&typeof w!="function")throw new TypeError("Function expected");return w}o(a,"accept");for(var c=n.kind,l=c==="getter"?"get":c==="setter"?"set":"value",A=!e&&t?n.static?t:t.prototype:null,u=e||(A?Object.getOwnPropertyDescriptor(A,n.name):{}),d,f=!1,m=r.length-1;m>=0;m--){var C={};for(var Q in n)C[Q]=Q==="access"?{}:n[Q];for(var Q in n.access)C.access[Q]=n.access[Q];C.addInitializer=function(w){if(f)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(w||null))};var S=(0,r[m])(c==="accessor"?{get:u.get,set:u.set}:u[l],C);if(c==="accessor"){if(S===void 0)continue;if(S===null||typeof S!="object")throw new TypeError("Object expected");(d=a(S.get))&&(u.get=d),(d=a(S.set))&&(u.set=d),(d=a(S.init))&&i.unshift(d)}else(d=a(S))&&(c==="field"?i.unshift(d):u[l]=d)}A&&Object.defineProperty(A,n.name,u),f=!0}function yq(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0}function Cq(t){return typeof t=="symbol"?t:"".concat(t)}function Eq(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function Bq(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Iq(t,e,r,n)
Line truncated
|
||||
${Phe.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function Dhe(t){return t instanceof ff?!0:(0,Rhe.isError)(t)&&t.name==="RestError"}o(Dhe,"isRestError")});var $o=g((zYe,R1)=>{var BQ=Object.defineProperty,The=Object.getOwnPropertyDescriptor,Ohe=Object.getOwnPropertyNames,Mhe=Object.prototype.hasOwnProperty,khe=o((t,e)=>{for(var r in e)BQ(t,r,{get:e[r],enumerable:!0})},"__export"),Lhe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ohe(e))!Mhe.call(t,i)&&i!==r&&BQ(t,i,{get:()=>e[i],enumerable:!(n=The(e,i))||n.enumerable});return t},"__copyProps"),Uhe=o(t=>Lhe(BQ({},"__esModule",{value:!0}),t),"__toCommonJS"),S1={};khe(S1,{stringToUint8Array:()=>qhe,uint8ArrayToString:()=>Fhe});R1.exports=Uhe(S1);function Fhe(t,e){return Buffer.from(t).toString(e)}o(Fhe,"uint8ArrayToString");function qhe(t,e){return Buffer.from(t,e)}o(qhe,"stringToUint8Array")});var kc=g((GYe,v1)=>{var IQ=Object.defineProperty,Hhe=Object.getOwnPropertyDescriptor,zhe=Object.getOwnPropertyNames,jhe=Object.prototype.hasOwnProperty,Ghe=o((t,e)=>{for(var r in e)IQ(t,r,{get:e[r],enumerable:!0})},"__export"),Yhe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of zhe(e))!jhe.call(t,i)&&i!==r&&IQ(t,i,{get:()=>e[i],enumerable:!(n=Hhe(e,i))||n.enumerable});return t},"__copyProps"),Jhe=o(t=>Yhe(IQ({},"__esModule",{value:!0}),t),"__toCommonJS"),_1={};Ghe(_1,{logger:()=>Whe});v1.exports=Jhe(_1);var Vhe=bu(),Whe=(0,Vhe.createClientLogger)("ts-http-runtime")});var F1=g((JYe,U1)=>{var $he=Object.create,gf=Object.defineProperty,Khe=Object.getOwnPropertyDescriptor,Xhe=Object.getOwnPropertyNames,Zhe=Object.getPrototypeOf,efe=Object.prototype.hasOwnProperty,tfe=o((t,e)=>{for(var r in e)gf(t,r,{get:e[r],enumerable:!0})},"__export"),O1=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Xhe(e))!efe.call(t,i)&&i!==r&&gf(t,i,{get:()=>e[i],enumerable:!(n=Khe(e,i))||n.enumerable});return t},"__copyProps"),NQ=o((t,e,r)=>(r=t!=null?$he(Zhe(t)):{},O1(e||!t||!t.__esModule?gf(r,"default",{value:t,enumerable:!0}):r,t)),"__toESM"),rfe=o(t=>O1(gf({},"__esModule",{value:!0}),t),"__toCommonJS"),M1={};tfe(M1,{createNodeHttpClient:()=>Afe,getBodyLength:()=>L1});U1.exports=rfe(M1);var bQ=NQ(require("node:http")),QQ=NQ(require("node:https")),P1=NQ(require("node:zlib")),nfe=require("node:stream"),D1=Bu(),ife=Js(),Nu=Mc(),Lc=kc(),sfe=Qu(),ofe={};function wu(t){return t&&typeof t.pipe=="function"}o(wu,"isReadableStream");function T1(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=o(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}o(T1,"isStreamComplete");function k1(t){return t&&typeof t.byteLength=="number"}o(k1,"isArrayBuffer");var mf=class extends nfe.Transform{static{o(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(i){n(i)}}constructor(e){super(),this.progressCallback=e}},wQ=class{static{o(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new D1.AbortError("The operation was aborted. Request has already been canceled.");n=o(A=>{A.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let i;e.timeout>0&&(i=setTimeout(()=>{let A=new sfe.Sanitizer;Lc.logger.info(`request to '${A.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let s=e.headers.get("Accept-Encoding"),a=s?.includes("gzip")||s?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let A=L1(c);A!==null&&e.headers.set("Content-Length",A)}let l;try{if(c&&e.onUploadProgress){let C=e.onUploadProgress,Q=new mf(C);Q.on("error",S=>{Lc.logger.error("Error in upload progress",S)}),wu(c)?c.pipe(Q):Q.end(c),c=Q}let A=await this.makeRequest(e,r,c);i!==void 0&&clearTimeout(i);let u=afe(A),f={status:A.statusCode??0,headers:u,request:e};if(e.method==="HEAD")return A.resume(),f;l=a?cfe(A,u):A;let m=e.onDownloadProgress;if(m){let C=new mf(m);C.on("error",Q=>{Lc.logger.error("Error in download progress",Q)}),l.pipe(C),l=C}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(f.status)?f.readableStreamBody=l:f.bodyAsText=await lfe(l),f}finally{if(e.abortSignal&&n){let A=Promise.resolve();wu(c)&&(A=T1(c));let u=Promise.resolve();wu(l)&&(u=T1(l)),Promise.all([A,u]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(d=>{Lc.logger.warning("Error when cleaning up abortListener on httpRequest",d)})}}}makeRequest(e,r,n){let i=new URL(e.url),s=i.protocol!=="https:";if(s&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureCoLine truncated
|
||||
`).join(`
|
||||
`+s),t.push(i+"m+"+Qf.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Bye()+e+" "+t[0]}o(Eye,"formatArgs");function Bye(){return zt.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(Bye,"getDate");function Iye(...t){return process.stderr.write(bf.formatWithOptions(zt.inspectOpts,...t)+`
|
||||
`)}o(Iye,"log");function bye(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(bye,"save");function Qye(){return process.env.DEBUG}o(Qye,"load");function wye(t){t.inspectOpts={};let e=Object.keys(zt.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=zt.inspectOpts[e[r]]}o(wye,"init");Qf.exports=rw()(zt);var{formatters:VH}=Qf.exports;VH.o=function(t){return this.inspectOpts.colors=this.useColors,bf.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};VH.O=function(t){return this.inspectOpts.colors=this.useColors,bf.inspect(t,this.inspectOpts)}});var wf=g((OJe,nw)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?nw.exports=JH():nw.exports=WH()});var XH=g(_r=>{"use strict";var Nye=_r&&_r.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),xye=_r&&_r.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$H=_r&&_r.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Nye(e,t,r);return xye(e,t),e};Object.defineProperty(_r,"__esModule",{value:!0});_r.req=_r.json=_r.toBuffer=void 0;var Sye=$H(require("http")),Rye=$H(require("https"));async function KH(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}o(KH,"toBuffer");_r.toBuffer=KH;async function _ye(t){let r=(await KH(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let i=n;throw i.message+=` (input: ${r})`,i}}o(_ye,"json");_r.json=_ye;function vye(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?Rye:Sye).request(t,e),i=new Promise((s,a)=>{n.once("response",s).once("error",a).end()});return n.then=i.then.bind(i),n}o(vye,"req");_r.req=vye});var sw=g(Zr=>{"use strict";var e2=Zr&&Zr.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Pye=Zr&&Zr.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),t2=Zr&&Zr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&e2(e,t,r);return Pye(e,t),e},Dye=Zr&&Zr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&e2(e,t,r)};Object.defineProperty(Zr,"__esModule",{value:!0});Zr.Agent=void 0;var Tye=t2(require("net")),ZH=t2(require("http")),Oye=require("https");Dye(XH(),Zr);var wi=Symbol("AgentBaseInternalState"),iw=class extends ZH.Agent{static{o(this,"Agent")}constructor(e){super(e),this[wi]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
||||
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new Tye.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],i=n.indexOf(r);i!==-1&&(n.splice(i,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?Oye.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let i={...r,secureEndpoint:this.isSecureEndpoint(r)},s=this.getName(i),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,i)).then(c=>{if(this.decrementSockets(s,a),c instanceof ZH.Agent)try{return c.addRequest(e,i)}catch(l){return n(l)}this[wi].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(s,a),n(c)})}createConnection(){let e=this[wi].currentSocket;if(this[wi].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[wi].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[wi]&&(this[wi].defaultPort=e)}get protocol(){return this[wi].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[wi]&&(this[wi].protocol=e)}};Zr.Agent=iw});var r2=g(zc=>{"use strict";var Mye=zc&&zc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zc,"__esModule",{value:!0});zc.parseProxyResponse=void 0;var kye=Mye(wf()),Nf=(0,kye.default)("https-proxy-agent:parse-proxy-response");function Lye(t){return new Promise((e,r)=>{let n=0,i=[];function s(){let u=t.read();u?A(u):t.once("readable",s)}o(s,"read");function a(){t.removeListener("end",c),t.removeListener("error",l),t.removeListener("readable",s)}o(a,"cleanup");function c(){a(),Nf("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}o(c,"onend");function l(u){a(),Nf("onerror %o",u),r(u)}o(l,"onerror");function A(u){i.push(u),n+=u.length;let d=Buffer.concat(i,n),f=d.indexOf(`\r
|
||||
\r
|
||||
`);if(f===-1){Nf("have not received end of HTTP headers yet..."),s();return}let m=d.slice(0,f).toString("ascii").split(`\r
|
||||
`),C=m.shift();if(!C)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let Q=C.split(" "),S=+Q[1],w=Q.slice(2).join(" "),R={};for(let T of m){if(!T)continue;let L=T.indexOf(":");if(L===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${T}"`));let W=T.slice(0,L).toLowerCase(),de=T.slice(L+1).trimStart(),le=R[W];typeof le=="string"?R[W]=[le,de]:Array.isArray(le)?le.push(de):R[W]=de}Nf("got proxy server response: %o %o",C,R),a(),e({connect:{statusCode:S,statusText:w,headers:R},buffered:d})}o(A,"ondata"),t.on("error",l),t.on("end",c),s()})}o(Lye,"parseProxyResponse");zc.parseProxyResponse=Lye});var c2=g(Nn=>{"use strict";var Uye=Nn&&Nn.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Fye=Nn&&Nn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o2=Nn&&Nn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Uye(e,t,r);return Fye(e,t),e},a2=Nn&&Nn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.HttpsProxyAgent=void 0;var xf=o2(require("net")),n2=o2(require("tls")),qye=a2(require("assert")),Hye=a2(wf()),zye=sw(),jye=require("url"),Gye=r2(),Su=(0,Hye.default)("https-proxy-agent"),i2=o(t=>t.servername===void 0&&t.host&&!xf.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),Sf=class extends zye.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new jye.URL(e):e,this.proxyHeaders=r?.headers??{},Su("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?s2(r,"headers"):null,host:n,port:i}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let i;n.protocol==="https:"?(Su("Creating `tls.Socket`: %o",this.connectOpts),i=n2.connect(i2(this.connectOpts))):(Su("Creating `net.Socket`: %o",this.connectOpts),i=xf.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=xf.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
||||
`;if(n.username||n.password){let f=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(f).toString("base64")}`}s.Host=`${a}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let f of Object.keys(s))c+=`${f}: ${s[f]}\r
|
||||
`;let l=(0,Gye.parseProxyResponse)(i);i.write(`${c}\r
|
||||
`);let{connect:A,buffered:u}=await l;if(e.emit("proxyConnect",A),this.emit("proxyConnect",A,e),A.statusCode===200)return e.once("socket",Yye),r.secureEndpoint?(Su("Upgrading socket connection to TLS"),n2.connect({...s2(i2(r),"host","path","port"),socket:i})):i;i.destroy();let d=new xf.Socket({writable:!1});return d.readable=!0,e.once("socket",f=>{Su("Replaying proxy buffer for failed request"),(0,qye.default)(f.listenerCount("data")>0),f.push(u),f.push(null)}),d}};Sf.protocols=["http","https"];Nn.HttpsProxyAgent=Sf;function Yye(t){t.resume()}o(Yye,"resume");function s2(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(s2,"omit")});var u2=g(xn=>{"use strict";var Jye=xn&&xn.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Vye=xn&&xn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),A2=xn&&xn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Jye(e,t,r);return Vye(e,t),e},Wye=xn&&xn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xn,"__esModule",{value:!0});xn.HttpProxyAgent=void 0;var $ye=A2(require("net")),Kye=A2(require("tls")),Xye=Wye(wf()),Zye=require("events"),eCe=sw(),l2=require("url"),jc=(0,Xye.default)("http-proxy-agent"),Rf=class extends eCe.Agent{static{o(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new l2.URL(e):e,this.proxyHeaders=r?.headers??{},jc("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?tCe(r,"headers"):null,host:n,port:i}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,i=r.secureEndpoint?"https:":"http:",s=e.getHeader("host")||"localhost",a=`${i}//${s}`,c=new l2.URL(e.path,a);r.port!==80&&(c.port=String(r.port)),e.path=String(c);let l=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let A=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;l["Proxy-Authorization"]=`Basic ${Buffer.from(A).toString("base64")}`}l["Proxy-Connection"]||(l["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let A of Object.keys(l)){let u=l[A];u&&e.setHeader(A,u)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,i;jc("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(jc("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,i=n.indexOf(`\r
|
||||
\r
|
||||
`)+4,e.outputData[0].data=e._header+n.substring(i),jc("Output buffer: %o",e.outputData[0].data));let s;return this.proxy.protocol==="https:"?(jc("Creating `tls.Socket`: %o",this.connectOpts),s=Kye.connect(this.connectOpts)):(jc("Creating `net.Socket`: %o",this.connectOpts),s=$ye.connect(this.connectOpts)),await(0,Zye.once)(s,"connect"),s}};Rf.protocols=["http","https"];xn.HttpProxyAgent=Rf;function tCe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(tCe,"omit")});var cw=g((YJe,C2)=>{var aw=Object.defineProperty,rCe=Object.getOwnPropertyDescriptor,nCe=Object.getOwnPropertyNames,iCe=Object.prototype.hasOwnProperty,sCe=o((t,e)=>{for(var r in e)aw(t,r,{get:e[r],enumerable:!0})},"__export"),oCe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of nCe(e))!iCe.call(t,i)&&i!==r&&aw(t,i,{get:()=>e[i],enumerable:!(n=rCe(e,i))||n.enumerable});return t},"__copyProps"),aCe=o(t=>oCe(aw({},"__esModule",{value:!0}),t),"__toCommonJS"),h2={};sCe(h2,{getDefaultProxySettings:()=>gCe,globalNoProxyList:()=>ow,loadNoProxy:()=>y2,proxyPolicy:()=>CCe,proxyPolicyName:()=>f2});C2.exports=aCe(h2);var cCe=c2(),lCe=u2(),ACe=kc(),uCe="HTTPS_PROXY",dCe="HTTP_PROXY",pCe="ALL_PROXY",hCe="NO_PROXY",f2="proxyPolicy",ow=[],m2=!1,fCe=new Map;function _f(t){if(process.env[t])return process.env[t];if(process.env[t.toLowerCase()])return process.env[t.toLowerCase()]}o(_f,"getEnvironmentValue");function g2(){if(!process)return;let t=_f(uCe),e=_f(pCe),r=_f(dCe);return t||e||r}o(g2,"loadEnvironmentProxyValue");function mCe(t,e,r){if(e.length===0)return!1;let n=new URL(t).hostname;if(r?.has(n))return r.get(n);let i=!1;for(let s of e)s[0]==="."?(n.endsWith(s)||n.length===s.length-1&&n===s.slice(1))&&(i=!0):n===s&&(i=!0);return r?.set(n,i),i}o(mCe,"isBypassed");function y2(){let t=_f(hCe);return m2=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}o(y2,"loadNoProxy");function gCe(t){if(!t&&(t=g2(),!t))return;let e=new URL(t);return{host:(e.protocol?e.protocol+"//":"")+e.hostname,port:Number.parseInt(e.port||"80"),username:e.username,password:e.password}}o(gCe,"getDefaultProxySettings");function yCe(){let t=g2();return t?new URL(t):void 0}o(yCe,"getDefaultProxySettingsInternal");function d2(t){let e;try{e=new URL(t.host)}catch{throw new Error(`Expecting a valid host string in proxy settings, but found "${t.host}".`)}return e.port=String(t.port),t.username&&(e.username=t.username),t.password&&(e.password=t.password),e}o(d2,"getUrlFromProxySettings");function p2(t,e,r){if(t.agent)return;let i=new URL(t.url).protocol!=="https:";t.tlsSettings&&ACe.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");let s=t.headers.toJSON();i?(e.httpProxyAgent||(e.httpProxyAgent=new lCe.HttpProxyAgent(r,{headers:s})),t.agent=e.httpProxyAgent):(e.httpsProxyAgent||(e.httpsProxyAgent=new cCe.HttpsProxyAgent(r,{headers:s})),t.agent=e.httpsProxyAgent)}o(p2,"setProxyAgentOnRequest");function CCe(t,e){m2||ow.push(...y2());let r=t?d2(t):yCe(),n={};return{name:f2,async sendRequest(i,s){return!i.proxySettings&&r&&!mCe(i.url,e?.customNoProxyList??ow,e?.customNoProxyList?void 0:fCe)?p2(i,n,r):i.proxySettings&&p2(i,n,d2(i.proxySettings)),s(i)}}}o(CCe,"proxyPolicy")});var Aw=g((VJe,I2)=>{var lw=Object.defineProperty,ECe=Object.getOwnPropertyDescriptor,BCe=Object.getOwnPropertyNames,ICe=Object.prototype.hasOwnProperty,bCe=o((t,e)=>{for(var r in e)lw(t,r,{get:e[r],enumerable:!0})},"__export"),QCe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of BCe(e))!ICe.call(t,i)&&i!==r&&lw(t,i,{get:()=>e[i],enumerable:!(n=ECe(e,i))||n.enumerable});return t},"__copyProps"),wCe=o(t=>QCe(lw({},"__esModule",{value:!0}),t),"__toCommonJS"),E2={};bCe(E2,{agentPolicy:()=>NCe,agentPolicyName:()=>B2});I2.exports=wCe(E2);var B2="agentPolicy";function NCe(t){return{name:B2,sendRequest:async(e,r)=>(e.agent||(e.agent=t),r(e))}}o(NCe,"agentPolicy")});var dw=g(($Je,w2)=>{var uw=Object.defineProperty,xCe=Object.getOwnPropertyDescriptor,SCe=Object.getOwnPropertyNames,RCe=Object.prototype.hasOwnProperty,_Ce=o((t,e)=>{for(var r in e)uw(t,r,{get:e[r],enumerable:!0})},"__export"),vCe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of SCe(e))!RCe.call(t,i)&&i!==r&&uw(t,i,{get:()=>e[i],enumerable:!(n=xCe(e,i))||n.enumerable});return t},"__copyProps"),PCe=o(t=>vCe(uw({},"__esModule",{value:!0}),t),"__toCommonJS"),b2={};_Ce(b2,{tlsPolicy:()=>DCe,tlsPolicyName:()=>Q2});w2.exports=PCe(b2);var Q2="tlsPolicy";function DCe(t){return{name:Q2,sendRequest:async(e,r)=>(e.tlsSettings||(e.tlsSettings=t),r(e))}}o(DCe,"tlsPolicy")});var Ru=g((XJe,_2)=>{var pw=Object.defineProperty,TCe=Object.getOwnPropertyDescriptor,OCe=Object.getOwnPropertyNames,MCe=Object.prototype.hasOwnProperty,kCe=o((t,e)=>{for(var r in e)pw(t,r,{get:e[r],enumerable:!0})},"__export"),LCe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of OCe(e))!MCe.call(t,i)&&i!==r&&pw(
Line truncated
|
||||
`;return e}o(cEe,"encodeHeaders");function lEe(t){return t instanceof Uint8Array?t.byteLength:(0,iEe.isBlob)(t)?t.size===-1?void 0:t.size:void 0}o(lEe,"getLength");function AEe(t){let e=0;for(let r of t){let n=lEe(r);if(n===void 0)return;e+=n}return e}o(AEe,"getTotalLength");async function uEe(t,e,r){let n=[(0,Gc.stringToUint8Array)(`--${r}`,"utf-8"),...e.flatMap(s=>[(0,Gc.stringToUint8Array)(`\r
|
||||
`,"utf-8"),(0,Gc.stringToUint8Array)(cEe(s.headers),"utf-8"),(0,Gc.stringToUint8Array)(`\r
|
||||
`,"utf-8"),s.body,(0,Gc.stringToUint8Array)(`\r
|
||||
--${r}`,"utf-8")]),(0,Gc.stringToUint8Array)(`--\r
|
||||
\r
|
||||
`,"utf-8")],i=AEe(n);i&&t.headers.set("Content-Length",i),t.body=await(0,oEe.concat)(n)}o(uEe,"buildRequestBody");var k2="multipartPolicy",dEe=70,pEe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function hEe(t){if(t.length>dEe)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!pEe.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}o(hEe,"assertValidBoundary");function fEe(){return{name:k2,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",i=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,s,a]=i;if(a&&r&&a!==r)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);return r??=a,r?hEe(r):r=aEe(),t.headers.set("Content-Type",`${s}; boundary=${r}`),await uEe(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}o(fEe,"multipartPolicy")});var z2=g((iVe,H2)=>{var yw=Object.defineProperty,mEe=Object.getOwnPropertyDescriptor,gEe=Object.getOwnPropertyNames,yEe=Object.prototype.hasOwnProperty,CEe=o((t,e)=>{for(var r in e)yw(t,r,{get:e[r],enumerable:!0})},"__export"),EEe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of gEe(e))!yEe.call(t,i)&&i!==r&&yw(t,i,{get:()=>e[i],enumerable:!(n=mEe(e,i))||n.enumerable});return t},"__copyProps"),BEe=o(t=>EEe(yw({},"__esModule",{value:!0}),t),"__toCommonJS"),q2={};CEe(q2,{createPipelineFromOptions:()=>PEe});H2.exports=BEe(q2);var IEe=_Q(),bEe=dQ(),QEe=PQ(),wEe=LQ(),NEe=FQ(),xEe=XQ(),SEe=tw(),U2=xu(),REe=cw(),_Ee=Aw(),vEe=dw(),F2=gw();function PEe(t){let e=(0,bEe.createEmptyPipeline)();return U2.isNodeLike&&(t.agent&&e.addPolicy((0,_Ee.agentPolicy)(t.agent)),t.tlsOptions&&e.addPolicy((0,vEe.tlsPolicy)(t.tlsOptions)),e.addPolicy((0,REe.proxyPolicy)(t.proxyOptions)),e.addPolicy((0,NEe.decompressResponsePolicy)())),e.addPolicy((0,SEe.formDataPolicy)(),{beforePolicies:[F2.multipartPolicyName]}),e.addPolicy((0,wEe.userAgentPolicy)(t.userAgentOptions)),e.addPolicy((0,F2.multipartPolicy)(),{afterPhase:"Deserialize"}),e.addPolicy((0,xEe.defaultRetryPolicy)(t.retryOptions),{phase:"Retry"}),U2.isNodeLike&&e.addPolicy((0,QEe.redirectPolicy)(t.redirectOptions),{afterPhase:"Retry"}),e.addPolicy((0,IEe.logPolicy)(t.loggingOptions),{afterPhase:"Sign"}),e}o(PEe,"createPipelineFromOptions")});var J2=g((oVe,Y2)=>{var Cw=Object.defineProperty,DEe=Object.getOwnPropertyDescriptor,TEe=Object.getOwnPropertyNames,OEe=Object.prototype.hasOwnProperty,MEe=o((t,e)=>{for(var r in e)Cw(t,r,{get:e[r],enumerable:!0})},"__export"),kEe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of TEe(e))!OEe.call(t,i)&&i!==r&&Cw(t,i,{get:()=>e[i],enumerable:!(n=DEe(e,i))||n.enumerable});return t},"__copyProps"),LEe=o(t=>kEe(Cw({},"__esModule",{value:!0}),t),"__toCommonJS"),j2={};MEe(j2,{apiVersionPolicy:()=>UEe,apiVersionPolicyName:()=>G2});Y2.exports=LEe(j2);var G2="ApiVersionPolicy";function UEe(t){return{name:G2,sendRequest:(e,r)=>{let n=new URL(e.url);return!n.searchParams.get("api-version")&&t.apiVersion&&(e.url=`${e.url}${Array.from(n.searchParams.keys()).length>0?"&":"?"}api-version=${t.apiVersion}`),r(e)}}}o(UEe,"apiVersionPolicy")});var $2=g((cVe,W2)=>{var Ew=Object.defineProperty,FEe=Object.getOwnPropertyDescriptor,qEe=Object.getOwnPropertyNames,HEe=Object.prototype.hasOwnProperty,zEe=o((t,e)=>{for(var r in e)Ew(t,r,{get:e[r],enumerable:!0})},"__export"),jEe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of qEe(e))!HEe.call(t,i)&&i!==r&&Ew(t,i,{get:()=>e[i],enumerable:!(n=FEe(e,i))||n.enumerable});return t},"__copyProps"),GEe=o(t=>jEe(Ew({},"__esModule",{value:!0}),t),"__toCommonJS"),V2={};zEe(V2,{isApiKeyCredential:()=>WEe,isBasicCredential:()=>VEe,isBearerTokenCredential:()=>JEe,isOAuth2TokenCredential:()=>YEe});W2.exports=GEe(V2);function YEe(t){return"getOAuth2Token"in t}o(YEe,"isOAuth2TokenCredential");function JEe(t){return"getBearerToken"in t}o(JEe,"isBearerTokenCredential");function VEe(t){return"username"in t&&"password"in t}o(VEe,"isBasicCredential");function WEe(t){return"key"in t}o(WEe,"isApiKeyCredential")});var _u=g((AVe,Z2)=>{var Bw=Object.defineProperty,$Ee=Object.getOwnPropertyDescriptor,KEe=Object.getOwnPropertyNames,XEe=Object.prototype.hasOwnProperty,ZEe=o((t,e)=>{for(var r in e)Bw(t,r,{get:e[r],enumerable:!0})},"__export"),eBe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of KEe(e))!XEe.call(t,i)&&i!==r&&Bw(t,i,{get:()=>e[i],enumerable:!(n=$Ee(e,i))||n.enumerable});return t},"__copyProps"),tBe=o(t=>eBe(Bw({},"__esModule",{value:!0}),t),"__toCommonJS"),X2={};ZEe(X2,{ensureSecureConnection:()=>sBe});Z2.exports=tBe(X2);var rBe=kc(),K2=!1
Line truncated
|
||||
`).join(""))}return e(t)}}}o(MRe,"ndJsonPolicy")});var wJ=g((P$e,QJ)=>{var a0=Object.defineProperty,kRe=Object.getOwnPropertyDescriptor,LRe=Object.getOwnPropertyNames,URe=Object.prototype.hasOwnProperty,FRe=o((t,e)=>{for(var r in e)a0(t,r,{get:e[r],enumerable:!0})},"__export"),qRe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of LRe(e))!URe.call(t,i)&&i!==r&&a0(t,i,{get:()=>e[i],enumerable:!(n=kRe(e,i))||n.enumerable});return t},"__copyProps"),HRe=o(t=>qRe(a0({},"__esModule",{value:!0}),t),"__toCommonJS"),bJ={};FRe(bJ,{auxiliaryAuthenticationHeaderPolicy:()=>YRe,auxiliaryAuthenticationHeaderPolicyName:()=>o0});QJ.exports=HRe(bJ);var zRe=n0(),jRe=vu(),o0="auxiliaryAuthenticationHeaderPolicy",IJ="x-ms-authorization-auxiliary";async function GRe(t){let{scopes:e,getAccessToken:r,request:n}=t,i={abortSignal:n.abortSignal,tracingOptions:n.tracingOptions};return(await r(e,i))?.token??""}o(GRe,"sendAuthorizeRequest");function YRe(t){let{credentials:e,scopes:r}=t,n=t.logger||jRe.logger,i=new WeakMap;return{name:o0,async sendRequest(s,a){if(!s.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs.");if(!e||e.length===0)return n.info(`${o0} header will not be set due to empty credentials.`),a(s);let c=[];for(let A of e){let u=i.get(A);u||(u=(0,zRe.createTokenCycler)(A),i.set(A,u)),c.push(GRe({scopes:Array.isArray(r)?r:[r],request:s,getAccessToken:u,logger:n}))}let l=(await Promise.all(c)).filter(A=>!!A);return l.length===0?(n.warning(`None of the auxiliary tokens are valid. ${IJ} header will not be set.`),a(s)):(s.headers.set(IJ,l.map(A=>`Bearer ${A}`).join(", ")),a(s))}}}o(YRe,"auxiliaryAuthenticationHeaderPolicy")});var Ot=g((T$e,GJ)=>{var l0=Object.defineProperty,JRe=Object.getOwnPropertyDescriptor,VRe=Object.getOwnPropertyNames,WRe=Object.prototype.hasOwnProperty,$Re=o((t,e)=>{for(var r in e)l0(t,r,{get:e[r],enumerable:!0})},"__export"),KRe=o((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of VRe(e))!WRe.call(t,i)&&i!==r&&l0(t,i,{get:()=>e[i],enumerable:!(n=JRe(e,i))||n.enumerable});return t},"__copyProps"),XRe=o(t=>KRe(l0({},"__esModule",{value:!0}),t),"__toCommonJS"),jJ={};$Re(jJ,{RestError:()=>NJ.RestError,agentPolicy:()=>HJ.agentPolicy,agentPolicyName:()=>HJ.agentPolicyName,auxiliaryAuthenticationHeaderPolicy:()=>qJ.auxiliaryAuthenticationHeaderPolicy,auxiliaryAuthenticationHeaderPolicyName:()=>qJ.auxiliaryAuthenticationHeaderPolicyName,bearerTokenAuthenticationPolicy:()=>UJ.bearerTokenAuthenticationPolicy,bearerTokenAuthenticationPolicyName:()=>UJ.bearerTokenAuthenticationPolicyName,createDefaultHttpClient:()=>t_e.createDefaultHttpClient,createEmptyPipeline:()=>ZRe.createEmptyPipeline,createFile:()=>zJ.createFile,createFileFromStream:()=>zJ.createFileFromStream,createHttpHeaders:()=>r_e.createHttpHeaders,createPipelineFromOptions:()=>e_e.createPipelineFromOptions,createPipelineRequest:()=>n_e.createPipelineRequest,decompressResponsePolicy:()=>xJ.decompressResponsePolicy,decompressResponsePolicyName:()=>xJ.decompressResponsePolicyName,defaultRetryPolicy:()=>s_e.defaultRetryPolicy,exponentialRetryPolicy:()=>SJ.exponentialRetryPolicy,exponentialRetryPolicyName:()=>SJ.exponentialRetryPolicyName,formDataPolicy:()=>LJ.formDataPolicy,formDataPolicyName:()=>LJ.formDataPolicyName,getDefaultProxySettings:()=>c0.getDefaultProxySettings,isRestError:()=>NJ.isRestError,logPolicy:()=>_J.logPolicy,logPolicyName:()=>_J.logPolicyName,multipartPolicy:()=>vJ.multipartPolicy,multipartPolicyName:()=>vJ.multipartPolicyName,ndJsonPolicy:()=>FJ.ndJsonPolicy,ndJsonPolicyName:()=>FJ.ndJsonPolicyName,proxyPolicy:()=>c0.proxyPolicy,proxyPolicyName:()=>c0.proxyPolicyName,redirectPolicy:()=>PJ.redirectPolicy,redirectPolicyName:()=>PJ.redirectPolicyName,retryPolicy:()=>i_e.retryPolicy,setClientRequestIdPolicy:()=>RJ.setClientRequestIdPolicy,setClientRequestIdPolicyName:()=>RJ.setClientRequestIdPolicyName,systemErrorRetryPolicy:()=>DJ.systemErrorRetryPolicy,systemErrorRetryPolicyName:()=>DJ.systemErrorRetryPolicyName,throttlingRetryPolicy:()=>TJ.throttlingRetryPolicy,throttlingRetryPolicyName:()=>TJ.throttlingRetryPolicyName,tlsPolicy:()=>kJ.tlsPolicy,tlsPolicyName:()=>kJ.tlsPolicyName,tracingPolicy:()=>OJ.tracingPolicy,tracingPolicyName:()=>OJ.tracingPolicyName,userAgentPolicy:()=>MJ.userAgentPolicy,userAgentPolicyName:()=>MJ.userAgentPolicyName});GJ.exports=XRe(jJ);var ZRe=qw(),e_e=MY(),t_e=UY(),r_e=HY(),n_e=GY(),NJ=Jf(),xJ=bN(),SJ=WY(),RJ=PN(),_J=$w(),vJ=BN(),c0=_N(),PJ=Xw(),DJ=ZY(),TJ=nJ(),i_e=oJ(),OJ=jN(),s_e=wN(),MJ=sN(),kJ=MN(),LJ=xN(),UJ=gJ(),FJ=BJ(),qJ=wJ(),HJ=TN(),zJ=CN()});var YJ=g($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.AzureKeyCredential=void 0;var A0=class{static{o(this,"AzureKeyCredential")}_key;get key(){return this._key}constructor(e){if(!e)throw new Error("key must be a non-empty string");this._key=e}update(e){this._key=e}};$f.AzureKeyCrede
Line truncated
|
||||
`&&y[N]!=="\r";N++)M+=y[N];if(M=M.trim(),M[M.length-1]==="/"&&(M=M.substring(0,M.length-1),N--),!T(M)){let $;return $=M.trim().length===0?"Invalid space after '<'.":"Tag '"+M+"' is an invalid name.",w("InvalidTag",$,L(y,N))}let q=m(y,N);if(q===!1)return w("InvalidAttr","Attributes for '"+M+"' have open quote.",L(y,N));let G=q.value;if(N=q.index,G[G.length-1]==="/"){let $=N-G.length;G=G.substring(0,G.length-1);let be=Q(G,p);if(be!==!0)return w(be.err.code,be.err.msg,L(y,$+be.err.line));b=!0}else if(_){if(!q.tagClosed)return w("InvalidTag","Closing tag '"+M+"' doesn't have proper closing.",L(y,N));if(G.trim().length>0)return w("InvalidTag","Closing tag '"+M+"' can't have attributes or invalid starting.",L(y,k));if(h.length===0)return w("InvalidTag","Closing tag '"+M+"' has not been opened.",L(y,k));{let $=h.pop();if(M!==$.tagName){let be=L(y,$.tagStartPos);return w("InvalidTag","Expected closing tag '"+$.tagName+"' (opened in line "+be.line+", col "+be.col+") instead of closing tag '"+M+"'.",L(y,k))}h.length==0&&(x=!0)}}else{let $=Q(G,p);if($!==!0)return w($.err.code,$.err.msg,L(y,N-G.length+$.err.line));if(x===!0)return w("InvalidXml","Multiple possible root nodes found.",L(y,N));p.unpairedTags.indexOf(M)!==-1||h.push({tagName:M,tagStartPos:k}),b=!0}for(N++;N<y.length;N++)if(y[N]==="<"){if(y[N+1]==="!"){N++,N=u(y,N);continue}if(y[N+1]!=="?")break;if(N=A(y,++N),N.err)return N}else if(y[N]==="&"){let $=S(y,N);if($==-1)return w("InvalidChar","char '&' is not expected.",L(y,N));N=$}else if(x===!0&&!l(y[N]))return w("InvalidXml","Extra text at the end",L(y,N));y[N]==="<"&&N--}}}return b?h.length==1?w("InvalidTag","Unclosed tag '"+h[0].tagName+"'.",L(y,h[0].tagStartPos)):!(h.length>0)||w("InvalidXml","Invalid '"+JSON.stringify(h.map(N=>N.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):w("InvalidXml","Start tag expected.",1)}o(c,"a");function l(y){return y===" "||y===" "||y===`
|
||||
`||y==="\r"}o(l,"h");function A(y,p){let h=p;for(;p<y.length;p++)if(y[p]=="?"||y[p]==" "){let b=y.substr(h,p-h);if(p>5&&b==="xml")return w("InvalidXml","XML declaration allowed only at the start of the document.",L(y,p));if(y[p]=="?"&&y[p+1]==">"){p++;break}continue}return p}o(A,"l");function u(y,p){if(y.length>p+5&&y[p+1]==="-"&&y[p+2]==="-"){for(p+=3;p<y.length;p++)if(y[p]==="-"&&y[p+1]==="-"&&y[p+2]===">"){p+=2;break}}else if(y.length>p+8&&y[p+1]==="D"&&y[p+2]==="O"&&y[p+3]==="C"&&y[p+4]==="T"&&y[p+5]==="Y"&&y[p+6]==="P"&&y[p+7]==="E"){let h=1;for(p+=8;p<y.length;p++)if(y[p]==="<")h++;else if(y[p]===">"&&(h--,h===0))break}else if(y.length>p+9&&y[p+1]==="["&&y[p+2]==="C"&&y[p+3]==="D"&&y[p+4]==="A"&&y[p+5]==="T"&&y[p+6]==="A"&&y[p+7]==="["){for(p+=8;p<y.length;p++)if(y[p]==="]"&&y[p+1]==="]"&&y[p+2]===">"){p+=2;break}}return p}o(u,"p");let d='"',f="'";function m(y,p){let h="",b="",x=!1;for(;p<y.length;p++){if(y[p]===d||y[p]===f)b===""?b=y[p]:b!==y[p]||(b="");else if(y[p]===">"&&b===""){x=!0;break}h+=y[p]}return b===""&&{value:h,index:p,tagClosed:x}}o(m,"d");let C=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Q(y,p){let h=i(y,C),b={};for(let x=0;x<h.length;x++){if(h[x][1].length===0)return w("InvalidAttr","Attribute '"+h[x][2]+"' has no space in starting.",W(h[x]));if(h[x][3]!==void 0&&h[x][4]===void 0)return w("InvalidAttr","Attribute '"+h[x][2]+"' is without value.",W(h[x]));if(h[x][3]===void 0&&!p.allowBooleanAttributes)return w("InvalidAttr","boolean attribute '"+h[x][2]+"' is not allowed.",W(h[x]));let N=h[x][2];if(!R(N))return w("InvalidAttr","Attribute '"+N+"' is an invalid name.",W(h[x]));if(Object.prototype.hasOwnProperty.call(b,N))return w("InvalidAttr","Attribute '"+N+"' is repeated.",W(h[x]));b[N]=1}return!0}o(Q,"g");function S(y,p){if(y[++p]===";")return-1;if(y[p]==="#")return function(b,x){let N=/\d/;for(b[x]==="x"&&(x++,N=/[\da-fA-F]/);x<b.length;x++){if(b[x]===";")return x;if(!b[x].match(N))break}return-1}(y,++p);let h=0;for(;p<y.length;p++,h++)if(!(y[p].match(/\w/)&&h<20)){if(y[p]===";")break;return-1}return p}o(S,"m");function w(y,p,h){return{err:{code:y,msg:p,line:h.line||h,col:h.col}}}o(w,"x");function R(y){return s(y)}o(R,"N");function T(y){return s(y)}o(T,"b");function L(y,p){let h=y.substring(0,p).split(/\r?\n/);return{line:h.length,col:h[h.length-1].length+1}}o(L,"E");function W(y){return y.startIndex+y[1].length}o(W,"y");let de={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(y,p){return p},attributeValueProcessor:function(y,p){return p},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(y,p,h){return y},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0};function le(y){return typeof y=="boolean"?{enabled:y,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof y=="object"&&y!==null?{enabled:y.enabled!==!1,maxEntitySize:y.maxEntitySize??1e4,maxExpansionDepth:y.maxExpansionDepth??10,maxTotalExpansions:y.maxTotalExpansions??1e3,maxExpandedLength:y.maxExpandedLength??1e5,maxEntityCount:y.maxEntityCount??100,allowedTags:y.allowedTags??null,tagFilter:y.tagFilter??null}:le(!0)}o(le,"v");let Te=o(function(y){let p=Object.assign({},de,y);return p.processEntities=le(p.processEntities),p.stopNodes&&Array.isArray(p.stopNodes)&&(p.stopNodes=p.stopNodes.map(h=>typeof h=="string"&&h.startsWith("*.")?".."+h.substring(2):h)),p},"T"),Oe;Oe=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class He{static{o(this,"S")}constructor(p){this.tagname=p,this.child=[],this[":@"]=Object.create(null)}add(p,h){p==="__proto__"&&(p="#__proto__"),this.child.push({[p]:h})}addChild(p,h){p.tagname==="__proto__"&&(p.tagname="#__proto__"),p[":@"]&&Object.keys(p[":@"]).length>0?this.child.push({[p.tagname]:p.child,":@":p[":@"]}):this.child.push({[p.tagname]:p.child}),h!==void 0&&(this.child[this.child.length-1][Oe]={startIndex:h})}static getMetaDataSymbol(){return Oe}}class Xe{static{o(this,"A")}constructor(p){this.suppressValidationErr=!p,this.options=p}readDocType(p,h){let b=Object.create(null),x=0;if(p[h+3]!=="O"||p[h+4]!=="C"||p[h+5]!=="T"||p[h+6]!=="Y"||p[h+7]!=="P"||p[h+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{h+=9;let N=1,k=!1,_=!1,M="";for(;h<p.length;h++)if(p[h]!=="<"||_)if(p[h]===">"){if(_?p[h-1]==="-"&&p[h-2]==="-"&&(_=!1,N--):N--,N===0)break}else p[h]==="["?k=!0:M+=p[h];else{if(k&&Ge(p,"!ENTITY",h)){let q,G;if(h+=7,[q,G,h]=this.readEntityExp(p,h+1,this.suppressValidationErr),G.indexOf("&")===-1){if(this.optLine truncated
|
||||
`);let p=new He("!xml"),h=p,b="";this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let x=new Xe(this.options.processEntities);for(let N=0;N<y.length;N++)if(y[N]==="<")if(y[N+1]==="/"){let k=Eo(y,">",N,"Closing Tag is not closed."),_=y.substring(N+2,k).trim();if(this.options.removeNSPrefix){let q=_.indexOf(":");q!==-1&&(_=_.substr(q+1))}this.options.transformTagName&&(_=this.options.transformTagName(_)),h&&(b=this.saveTextToParentTag(b,h,this.matcher));let M=this.matcher.getCurrentTag();if(_&&this.options.unpairedTags.indexOf(_)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${_}>`);M&&this.options.unpairedTags.indexOf(M)!==-1&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,h=this.tagsNodeStack.pop(),b="",N=k}else if(y[N+1]==="?"){let k=_C(y,N,!1,"?>");if(!k)throw new Error("Pi Tag is not closed.");if(b=this.saveTextToParentTag(b,h,this.matcher),!(this.options.ignoreDeclaration&&k.tagName==="?xml"||this.options.ignorePiTags)){let _=new He(k.tagName);_.add(this.options.textNodeName,""),k.tagName!==k.tagExp&&k.attrExpPresent&&(_[":@"]=this.buildAttributesMap(k.tagExp,this.matcher,k.tagName)),this.addChild(h,_,this.matcher,N)}N=k.closeIndex+1}else if(y.substr(N+1,3)==="!--"){let k=Eo(y,"-->",N+4,"Comment is not closed.");if(this.options.commentPropName){let _=y.substring(N+4,k-2);b=this.saveTextToParentTag(b,h,this.matcher),h.add(this.options.commentPropName,[{[this.options.textNodeName]:_}])}N=k}else if(y.substr(N+1,2)==="!D"){let k=x.readDocType(y,N);this.docTypeEntities=k.entities,N=k.i}else if(y.substr(N+1,2)==="!["){let k=Eo(y,"]]>",N,"CDATA is not closed.")-2,_=y.substring(N+9,k);b=this.saveTextToParentTag(b,h,this.matcher);let M=this.parseTextData(_,h.tagname,this.matcher,!0,!1,!0,!0);M==null&&(M=""),this.options.cdataPropName?h.add(this.options.cdataPropName,[{[this.options.textNodeName]:_}]):h.add(this.options.textNodeName,M),N=k+2}else{let k=_C(y,N,this.options.removeNSPrefix);if(!k){let Wt=y.substring(Math.max(0,N-50),Math.min(y.length,N+50));throw new Error(`readTagExp returned undefined at position ${N}. Context: "${Wt}"`)}let _=k.tagName,M=k.rawTagName,q=k.tagExp,G=k.attrExpPresent,$=k.closeIndex;if(this.options.transformTagName){let Wt=this.options.transformTagName(_);q===_&&(q=Wt),_=Wt}if(this.options.strictReservedNames&&(_===this.options.commentPropName||_===this.options.cdataPropName))throw new Error(`Invalid tag name: ${_}`);h&&b&&h.tagname!=="!xml"&&(b=this.saveTextToParentTag(b,h,this.matcher,!1));let be=h;be&&this.options.unpairedTags.indexOf(be.tagname)!==-1&&(h=this.tagsNodeStack.pop(),this.matcher.pop());let ye=!1;q.length>0&&q.lastIndexOf("/")===q.length-1&&(ye=!0,_[_.length-1]==="/"?(_=_.substr(0,_.length-1),q=_):q=q.substr(0,q.length-1),G=_!==q);let Qe,ve=null,ci={};Qe=oA(M),_!==p.tagname&&this.matcher.push(_,{},Qe),_!==q&&G&&(ve=this.buildAttributesMap(q,this.matcher,_),ve&&(ci=_d(ve,this.options))),_!==p.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));let Ut=N;if(this.isCurrentNodeStopNode){let Wt="";if(ye)N=k.closeIndex;else if(this.options.unpairedTags.indexOf(_)!==-1)N=k.closeIndex;else{let DC=this.readStopNodeData(y,M,$+1);if(!DC)throw new Error(`Unexpected end of ${M}`);N=DC.i,Wt=DC.tagContent}let xa=new He(_);ve&&(xa[":@"]=ve),xa.add(this.options.textNodeName,Wt),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(h,xa,this.matcher,Ut)}else{if(ye){if(this.options.transformTagName){let xa=this.options.transformTagName(_);q===_&&(q=xa),_=xa}let Wt=new He(_);ve&&(Wt[":@"]=ve),this.addChild(h,Wt,this.matcher,Ut),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(this.options.unpairedTags.indexOf(_)!==-1){let Wt=new He(_);ve&&(Wt[":@"]=ve),this.addChild(h,Wt,this.matcher,Ut),this.matcher.pop(),this.isCurrentNodeStopNode=!1,N=k.closeIndex;continue}{let Wt=new He(_);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(h),ve&&(Wt[":@"]=ve),this.addChild(h,Wt,this.matcher,Ut),h=Wt}}b="",N=$}}else b+=y[N];return p.child},"Y");function U5(y,p,h,b){this.options.captureMetaData||(b=void 0);let x=this.options.jPath?h.toString():h,N=this.options.updateTag(p.tagname,x,p[":@"]);N===!1||(typeof N=="string"&&(p.tagname=N),y.addChild(p,b))}o(U5,"X");function F5(y,p,h){let b=this.options.processEntities;if(!b||!b.enabled)return y;if(b.allowedTags){let x=this.options.jPath?h.toString():h;if(!(Array.isArray(b.allowedTags)?b.allowedTags.includes(p):b.allowedTags(p,x)))return y}if(b.tagFilter){let x=this.options.jPath?h.toString():h;if(!b.tagFilter(p,x))return y}for(let x in this.docTypeEntities){let N=this.docTypeEntities[x],k=y.match(N.regx);if(k){if(this.entityExpansionCount+=k.length,b.maxTotalExpansions&&this.entityExpansionCount>b.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${b.maxTotalExpansions}`);let _Line truncated
|
||||
`);let b=[];if(p.stopNodes&&Array.isArray(p.stopNodes))for(let x=0;x<p.stopNodes.length;x++){let N=p.stopNodes[x];typeof N=="string"?b.push(new Yi(N)):N instanceof Yi&&b.push(N)}return $_(y,p,h,new Co,b)}o($5,"lt");function $_(y,p,h,b,x){let N="",k=!1;if(!Array.isArray(y)){if(y!=null){let _=y.toString();return _=PC(_,p),_}return""}for(let _=0;_<y.length;_++){let M=y[_],q=X_(M);if(q===void 0)continue;let G=K5(M[":@"],p);b.push(q,G);let $=Z5(b,x);if(q===p.textNodeName){let ve=M[q];$||(ve=p.tagValueProcessor(q,ve),ve=PC(ve,p)),k&&(N+=h),N+=ve,k=!1,b.pop();continue}if(q===p.cdataPropName){k&&(N+=h),N+=`<![CDATA[${M[q][0][p.textNodeName]}]]>`,k=!1,b.pop();continue}if(q===p.commentPropName){N+=h+`<!--${M[q][0][p.textNodeName]}-->`,k=!0,b.pop();continue}if(q[0]==="?"){let ve=Z_(M[":@"],p,$),ci=q==="?xml"?"":h,Ut=M[q][0][p.textNodeName];Ut=Ut.length!==0?" "+Ut:"",N+=ci+`<${q}${Ut}${ve}?>`,k=!0,b.pop();continue}let be=h;be!==""&&(be+=p.indentBy);let ye=h+`<${q}${Z_(M[":@"],p,$)}`,Qe;Qe=$?K_(M[q],p):$_(M[q],p,be,b,x),p.unpairedTags.indexOf(q)!==-1?p.suppressUnpairedNode?N+=ye+">":N+=ye+"/>":Qe&&Qe.length!==0||!p.suppressEmptyNode?Qe&&Qe.endsWith(">")?N+=ye+`>${Qe}${h}</${q}>`:(N+=ye+">",Qe&&h!==""&&(Qe.includes("/>")||Qe.includes("</"))?N+=h+p.indentBy+Qe+h:N+=Qe,N+=`</${q}>`):N+=ye+"/>",k=!0,b.pop()}return N}o($_,"pt");function K5(y,p){if(!y||p.ignoreAttributes)return null;let h={},b=!1;for(let x in y)Object.prototype.hasOwnProperty.call(y,x)&&(h[x.startsWith(p.attributeNamePrefix)?x.substr(p.attributeNamePrefix.length):x]=y[x],b=!0);return b?h:null}o(K5,"ut");function K_(y,p){if(!Array.isArray(y))return y!=null?y.toString():"";let h="";for(let b=0;b<y.length;b++){let x=y[b],N=X_(x);if(N===p.textNodeName)h+=x[N];else if(N===p.cdataPropName)h+=x[N][0][p.textNodeName];else if(N===p.commentPropName)h+=x[N][0][p.textNodeName];else{if(N&&N[0]==="?")continue;if(N){let k=X5(x[":@"],p),_=K_(x[N],p);_&&_.length!==0?h+=`<${N}${k}>${_}</${N}>`:h+=`<${N}${k}/>`}}}return h}o(K_,"ct");function X5(y,p){let h="";if(y&&!p.ignoreAttributes)for(let b in y){if(!Object.prototype.hasOwnProperty.call(y,b))continue;let x=y[b];x===!0&&p.suppressBooleanAttributes?h+=` ${b.substr(p.attributeNamePrefix.length)}`:h+=` ${b.substr(p.attributeNamePrefix.length)}="${x}"`}return h}o(X5,"dt");function X_(y){let p=Object.keys(y);for(let h=0;h<p.length;h++){let b=p[h];if(Object.prototype.hasOwnProperty.call(y,b)&&b!==":@")return b}}o(X_,"ft");function Z_(y,p,h){let b="";if(y&&!p.ignoreAttributes)for(let x in y){if(!Object.prototype.hasOwnProperty.call(y,x))continue;let N;h?N=y[x]:(N=p.attributeValueProcessor(x,y[x]),N=PC(N,p)),N===!0&&p.suppressBooleanAttributes?b+=` ${x.substr(p.attributeNamePrefix.length)}`:b+=` ${x.substr(p.attributeNamePrefix.length)}="${N}"`}return b}o(Z_,"gt");function Z5(y,p){if(!p||p.length===0)return!1;for(let h=0;h<p.length;h++)if(y.matches(p[h]))return!0;return!1}o(Z5,"mt");function PC(y,p){if(y&&y.length>0&&p.processEntities)for(let h=0;h<p.entities.length;h++){let b=p.entities[h];y=y.replace(b.regex,b.val)}return y}o(PC,"xt");let e9={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(y,p){return p},attributeValueProcessor:function(y,p){return p},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,jPath:!0};function un(y){if(this.options=Object.assign({},e9,y),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(h=>typeof h=="string"&&h.startsWith("*.")?".."+h.substring(2):h)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let h=0;h<this.options.stopNodes.length;h++){let b=this.options.stopNodes[h];typeof b=="string"?this.stopNodeExpressions.push(new Yi(b)):b instanceof Yi&&this.stopNodeExpressions.push(b)}var p;this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=typeof(p=this.options.ignoreAttributes)=="function"?p:Array.isArray(p)?h=>{for(let b of p)if(typeof b=="string"&&h===b||b instanceof RegExp&&b.test(h))return!0}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=n9),this.processTextOrObjNode=t9,this.options.format?(this.indentate=r9,this.tagEndChar=`>
|
||||
`,this.newLine=`
|
||||
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}o(un,"bt");function t9(y,p,h,b){let x=this.extractAttributes(y);if(b.push(p,x),this.checkStopNode(b)){let k=this.buildRawContent(y),_=this.buildAttributesForStopNode(y);return b.pop(),this.buildObjectNode(k,p,_,h)}let N=this.j2x(y,h+1,b);return b.pop(),y[this.options.textNodeName]!==void 0&&Object.keys(y).length===1?this.buildTextValNode(y[this.options.textNodeName],p,N.attrStr,h,b):this.buildObjectNode(N.val,p,N.attrStr,h)}o(t9,"Et");function r9(y){return this.options.indentBy.repeat(y)}o(r9,"yt");function n9(y){return!(!y.startsWith(this.options.attributeNamePrefix)||y===this.options.textNodeName)&&y.substr(this.attrPrefixLen)}o(n9,"wt"),un.prototype.build=function(y){if(this.options.preserveOrder)return $5(y,this.options);{Array.isArray(y)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(y={[this.options.arrayNodeName]:y});let p=new Co;return this.j2x(y,0,p).val}},un.prototype.j2x=function(y,p,h){let b="",x="",N=this.options.jPath?h.toString():h,k=this.checkStopNode(h);for(let _ in y)if(Object.prototype.hasOwnProperty.call(y,_))if(y[_]===void 0)this.isAttribute(_)&&(x+="");else if(y[_]===null)this.isAttribute(_)||_===this.options.cdataPropName?x+="":_[0]==="?"?x+=this.indentate(p)+"<"+_+"?"+this.tagEndChar:x+=this.indentate(p)+"<"+_+"/"+this.tagEndChar;else if(y[_]instanceof Date)x+=this.buildTextValNode(y[_],_,"",p,h);else if(typeof y[_]!="object"){let M=this.isAttribute(_);if(M&&!this.ignoreAttributesFn(M,N))b+=this.buildAttrPairStr(M,""+y[_],k);else if(!M)if(_===this.options.textNodeName){let q=this.options.tagValueProcessor(_,""+y[_]);x+=this.replaceEntitiesValue(q)}else{h.push(_);let q=this.checkStopNode(h);if(h.pop(),q){let G=""+y[_];x+=G===""?this.indentate(p)+"<"+_+this.closeTag(_)+this.tagEndChar:this.indentate(p)+"<"+_+">"+G+"</"+_+this.tagEndChar}else x+=this.buildTextValNode(y[_],_,"",p,h)}}else if(Array.isArray(y[_])){let M=y[_].length,q="",G="";for(let $=0;$<M;$++){let be=y[_][$];if(be!==void 0)if(be===null)_[0]==="?"?x+=this.indentate(p)+"<"+_+"?"+this.tagEndChar:x+=this.indentate(p)+"<"+_+"/"+this.tagEndChar;else if(typeof be=="object")if(this.options.oneListGroup){h.push(_);let ye=this.j2x(be,p+1,h);h.pop(),q+=ye.val,this.options.attributesGroupName&&be.hasOwnProperty(this.options.attributesGroupName)&&(G+=ye.attrStr)}else q+=this.processTextOrObjNode(be,_,p,h);else if(this.options.oneListGroup){let ye=this.options.tagValueProcessor(_,be);ye=this.replaceEntitiesValue(ye),q+=ye}else{h.push(_);let ye=this.checkStopNode(h);if(h.pop(),ye){let Qe=""+be;q+=Qe===""?this.indentate(p)+"<"+_+this.closeTag(_)+this.tagEndChar:this.indentate(p)+"<"+_+">"+Qe+"</"+_+this.tagEndChar}else q+=this.buildTextValNode(be,_,"",p,h)}}this.options.oneListGroup&&(q=this.buildObjectNode(q,_,G,p)),x+=q}else if(this.options.attributesGroupName&&_===this.options.attributesGroupName){let M=Object.keys(y[_]),q=M.length;for(let G=0;G<q;G++)b+=this.buildAttrPairStr(M[G],""+y[_][M[G]],k)}else x+=this.processTextOrObjNode(y[_],_,p,h);return{attrStr:b,val:x}},un.prototype.buildAttrPairStr=function(y,p,h){return h||(p=this.options.attributeValueProcessor(y,""+p),p=this.replaceEntitiesValue(p)),this.options.suppressBooleanAttributes&&p==="true"?" "+y:" "+y+'="'+p+'"'},un.prototype.extractAttributes=function(y){if(!y||typeof y!="object")return null;let p={},h=!1;if(this.options.attributesGroupName&&y[this.options.attributesGroupName]){let b=y[this.options.attributesGroupName];for(let x in b)Object.prototype.hasOwnProperty.call(b,x)&&(p[x.startsWith(this.options.attributeNamePrefix)?x.substring(this.options.attributeNamePrefix.length):x]=b[x],h=!0)}else for(let b in y){if(!Object.prototype.hasOwnProperty.call(y,b))continue;let x=this.isAttribute(b);x&&(p[x]=y[b],h=!0)}return h?p:null},un.prototype.buildRawContent=function(y){if(typeof y=="string")return y;if(typeof y!="object"||y===null)return String(y);if(y[this.options.textNodeName]!==void 0)return y[this.options.textNodeName];let p="";for(let h in y){if(!Object.prototype.hasOwnProperty.call(y,h)||this.isAttribute(h)||this.options.attributesGroupName&&h===this.options.attributesGroupName)continue;let b=y[h];if(h===this.options.textNodeName)p+=b;else if(Array.isArray(b)){for(let x of b)if(typeof x=="string"||typeof x=="number")p+=`<${h}>${x}</${h}>`;else if(typeof x=="object"&&x!==null){let N=this.buildRawContent(x),k=this.buildAttributesForStopNode(x);p+=N===""?`<${h}${k}/>`:`<${h}${k}>${N}</${h}>`}}else if(typeof b=="object"&&b!==null){let x=this.buildRawContent(b),N=this.buildAttributesForStopNode(b);p+=x===""?`<${h}${N}/>`:`<${h}${N}>${x}</${h}>`}else p+=`<${h}>${b}</${h}>`}return p},un.prototype.buildAttributesForStopNode=function(y){if(!y||typeof y!="object")return"";let p="";if(this.options.attributesGroupName&&y[this.options.attributesGroupName]){let h=y[this.options.attributesGroupName];for(let b in h){if(!Object.prototype.hasOwnProperty.call(h,b))continue;let x=b.startsWit
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),n=this.factory.computeHMACSHA256(r);return e.headers.set(ar.HeaderConstants.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===ar.HeaderConstants.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(i=>i.name.toLowerCase().startsWith(ar.HeaderConstants.PREFIX_FOR_STORAGE));r.sort((i,s)=>(0,dDe.compareHeader)(i.name.toLowerCase(),s.name.toLowerCase())),r=r.filter((i,s,a)=>!(s>0&&i.name.toLowerCase()===a[s-1].name.toLowerCase()));let n="";return r.forEach(i=>{n+=`${i.name.toLowerCase().trimRight()}:${i.value.trimLeft()}
|
||||
`}),n}getCanonicalizedResourceString(e){let r=(0,g$.getURLPath)(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let i=(0,g$.getURLQueries)(e.url),s={};if(i){let a=[];for(let c in i)if(Object.prototype.hasOwnProperty.call(i,c)){let l=c.toLowerCase();s[l]=i[c],a.push(l)}a.sort();for(let c of a)n+=`
|
||||
${c}:${decodeURIComponent(s[c])}`}return n}};Mm.StorageSharedKeyCredentialPolicy=cx});var y$=g(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});km.StorageSharedKeyCredential=void 0;var pDe=require("node:crypto"),hDe=lx(),fDe=Tm(),Ax=class extends fDe.Credential{static{o(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new hDe.StorageSharedKeyCredentialPolicy(e,r,this)}computeHMACSHA256(e){return(0,pDe.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};km.StorageSharedKeyCredential=Ax});var C$=g(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});Lm.AbortError=void 0;var ux=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};Lm.AbortError=ux});var dx=g(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});Um.AbortError=void 0;var mDe=C$();Object.defineProperty(Um,"AbortError",{enumerable:!0,get:function(){return mDe.AbortError}})});var px=g(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});Fm.logger=void 0;var gDe=Jc();Fm.logger=(0,gDe.createClientLogger)("storage-common")});var hx=g(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});qm.StorageRetryPolicyType=void 0;var E$;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(E$||(qm.StorageRetryPolicyType=E$={}))});var I$=g(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});Yu.StorageRetryPolicy=void 0;Yu.NewRetryPolicyFactory=EDe;var yDe=dx(),CDe=Gu(),B$=hs(),fx=ra(),Zs=px(),mx=hx();function EDe(t){return{create:(e,r)=>new Hm(e,r,t)}}o(EDe,"NewRetryPolicyFactory");var eo={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:mx.StorageRetryPolicyType.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},BDe=new yDe.AbortError("The operation was aborted."),Hm=class extends CDe.BaseRequestPolicy{static{o(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,n=eo){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:eo.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):eo.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:eo.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:eo.maxRetryDelayInMs):eo.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:eo.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:eo.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let i=e.clone(),s=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;s||(i.url=(0,fx.setURLHost)(i.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(i.url=(0,fx.setURLParameter)(i.url,B$.URLConstants.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(Zs.logger.info(`RetryPolicy: =====> Try=${n} ${s?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(i),!this.shouldRetry(s,n,a))return a;r=r||!s&&a.status===404}catch(c){if(Zs.logger.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(s,n,a,c))throw c}return await this.delay(s,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,i){if(r>=this.retryOptions.maxTries)return Zs.logger.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let s=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(i){for(let a of s)if(i.name.toUpperCase().includes(a)||i.message.toUpperCase().includes(a)||i.code&&i.code.toString().toUpperCase()===a)return Zs.logger.info(`RetryPolicy: Network error ${a} found, will retry.`),!0}if(n||i){let a=n?n.status:i?i.statusCode:0;if(!e&&a===404)return Zs.logger.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return Zs.logger.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(n&&n?.status>=400){let a=n.headers.get(B$.HeaderConstants.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return i?.code==="PARSE_ERROR"&&i?.message.startsWith('Error "Error: Unclosed root tag')?(Zs.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let i=0;if(e)switch(this.retryOptions.retryPolicyType){case mx.StorageRetryPolicyType.EXPONENTIAL:i=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case mx.StorageRetryPolicyType.FIXED:i=this.retryOptions.retryDelayInMs;break}else i=Math.random()*1e3;return Zs.logger.info(`RetryPolicy: Delay for ${i}ms`),(0,fx.
Line truncated
|
||||
`)+`
|
||||
`+n(s)+i(s),c=(0,DDe.createHmac)("sha256",t.accountKey).update(a,"utf8").digest("base64");s.headers.set(cr.HeaderConstants.AUTHORIZATION,`SharedKey ${t.accountName}:${c}`)}o(e,"signRequest");function r(s,a){let c=s.headers.get(a);return!c||a===cr.HeaderConstants.CONTENT_LENGTH&&c==="0"?"":c}o(r,"getHeaderValueToSign");function n(s){let a=[];for(let[l,A]of s.headers)l.toLowerCase().startsWith(cr.HeaderConstants.PREFIX_FOR_STORAGE)&&a.push({name:l,value:A});a.sort((l,A)=>(0,TDe.compareHeader)(l.name.toLowerCase(),A.name.toLowerCase())),a=a.filter((l,A,u)=>!(A>0&&l.name.toLowerCase()===u[A-1].name.toLowerCase()));let c="";return a.forEach(l=>{c+=`${l.name.toLowerCase().trimRight()}:${l.value.trimLeft()}
|
||||
`}),c}o(n,"getCanonicalizedHeadersString");function i(s){let a=(0,S$.getURLPath)(s.url)||"/",c="";c+=`/${t.accountName}${a}`;let l=(0,S$.getURLQueries)(s.url),A={};if(l){let u=[];for(let d in l)if(Object.prototype.hasOwnProperty.call(l,d)){let f=d.toLowerCase();A[f]=l[d],u.push(f)}u.sort();for(let d of u)c+=`
|
||||
${d}:${decodeURIComponent(A[d])}`}return c}return o(i,"getCanonicalizedResourceString"),{name:ul.storageSharedKeyCredentialPolicyName,async sendRequest(s,a){return e(s),a(s)}}}o(ODe,"storageSharedKeyCredentialPolicy")});var _$=g(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.storageRequestFailureDetailsParserPolicyName=void 0;dl.storageRequestFailureDetailsParserPolicy=MDe;dl.storageRequestFailureDetailsParserPolicyName="storageRequestFailureDetailsParserPolicy";function MDe(){return{name:dl.storageRequestFailureDetailsParserPolicyName,async sendRequest(t,e){try{return await e(t)}catch(r){throw typeof r=="object"&&r!==null&&r.response&&r.response.parsedBody&&r.response.parsedBody.code==="InvalidHeaderValue"&&r.response.parsedBody.HeaderName==="x-ms-version"&&(r.message=`The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.
|
||||
`),r}}}}o(MDe,"storageRequestFailureDetailsParserPolicy")});var v$=g(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});zm.UserDelegationKeyCredential=void 0;var kDe=require("node:crypto"),bx=class{static{o(this,"UserDelegationKeyCredential")}accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return(0,kDe.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};zm.UserDelegationKeyCredential=bx});var ei=g(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.BaseRequestPolicy=gt.getCachedDefaultHttpClient=void 0;var lr=(G0(),Zt(j0));lr.__exportStar(t$(),gt);var LDe=r$();Object.defineProperty(gt,"getCachedDefaultHttpClient",{enumerable:!0,get:function(){return LDe.getCachedDefaultHttpClient}});lr.__exportStar(i$(),gt);lr.__exportStar(f$(),gt);lr.__exportStar(m$(),gt);lr.__exportStar(Tm(),gt);lr.__exportStar(y$(),gt);lr.__exportStar(Cx(),gt);var UDe=Gu();Object.defineProperty(gt,"BaseRequestPolicy",{enumerable:!0,get:function(){return UDe.BaseRequestPolicy}});lr.__exportStar(nx(),gt);lr.__exportStar(vm(),gt);lr.__exportStar(b$(),gt);lr.__exportStar(Q$(),gt);lr.__exportStar(x$(),gt);lr.__exportStar(lx(),gt);lr.__exportStar(R$(),gt);lr.__exportStar(_$(),gt);lr.__exportStar(v$(),gt)});var en=g(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.PathStylePorts=Z.BlobDoesNotUseCustomerSpecifiedEncryption=Z.BlobUsesCustomerSpecifiedEncryptionMsg=Z.StorageBlobLoggingAllowedQueryParameters=Z.StorageBlobLoggingAllowedHeaderNames=Z.DevelopmentConnectionString=Z.EncryptionAlgorithmAES25=Z.HTTP_VERSION_1_1=Z.HTTP_LINE_ENDING=Z.BATCH_MAX_PAYLOAD_IN_BYTES=Z.BATCH_MAX_REQUEST=Z.SIZE_1_MB=Z.ETagAny=Z.ETagNone=Z.HeaderConstants=Z.HTTPURLConnection=Z.URLConstants=Z.StorageOAuthScopes=Z.REQUEST_TIMEOUT=Z.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS=Z.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES=Z.DEFAULT_BLOCK_BUFFER_SIZE_BYTES=Z.BLOCK_BLOB_MAX_BLOCKS=Z.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES=Z.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES=Z.SERVICE_VERSION=Z.SDK_VERSION=void 0;Z.SDK_VERSION="12.31.0";Z.SERVICE_VERSION="2026-02-06";Z.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES=256*1024*1024;Z.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES=4e3*1024*1024;Z.BLOCK_BLOB_MAX_BLOCKS=5e4;Z.DEFAULT_BLOCK_BUFFER_SIZE_BYTES=8*1024*1024;Z.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES=4*1024*1024;Z.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS=5;Z.REQUEST_TIMEOUT=100*1e3;Z.StorageOAuthScopes="https://storage.azure.com/.default";Z.URLConstants={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};Z.HTTPURLConnection={HTTP_ACCEPTED:202,HTTP_CONFLICT:409,HTTP_NOT_FOUND:404,HTTP_PRECON_FAILED:412,HTTP_RANGE_NOT_SATISFIABLE:416};Z.HeaderConstants={AUTHORIZATION:"Authorization",AUTHORIZATION_SCHEME:"Bearer",CONTENT_ENCODING:"Content-Encoding",CONTENT_ID:"Content-ID",CONTENT_LANGUAGE:"Content-Language",CONTENT_LENGTH:"Content-Length",CONTENT_MD5:"Content-Md5",CONTENT_TRANSFER_ENCODING:"Content-Transfer-Encoding",CONTENT_TYPE:"Content-Type",COOKIE:"Cookie",DATE:"date",IF_MATCH:"if-match",IF_MODIFIED_SINCE:"if-modified-since",IF_NONE_MATCH:"if-none-match",IF_UNMODIFIED_SINCE:"if-unmodified-since",PREFIX_FOR_STORAGE:"x-ms-",RANGE:"Range",USER_AGENT:"User-Agent",X_MS_CLIENT_REQUEST_ID:"x-ms-client-request-id",X_MS_COPY_SOURCE:"x-ms-copy-source",X_MS_DATE:"x-ms-date",X_MS_ERROR_CODE:"x-ms-error-code",X_MS_VERSION:"x-ms-version",X_MS_CopySourceErrorCode:"x-ms-copy-source-error-code"};Z.ETagNone="";Z.ETagAny="*";Z.SIZE_1_MB=1*1024*1024;Z.BATCH_MAX_REQUEST=256;Z.BATCH_MAX_PAYLOAD_IN_BYTES=4*Z.SIZE_1_MB;Z.HTTP_LINE_ENDING=`\r
|
||||
`;Z.HTTP_VERSION_1_1="HTTP/1.1";Z.EncryptionAlgorithmAES25="AES256";Z.DevelopmentConnectionString="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;";Z.StorageBlobLoggingAllowedHeaderNames=["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-copy-source-error-code","x-ms-copy-source-status-code","x-ms-if-tags","x-ms-source-if-tags"];Z.StorageBlobLoggingAllowedQueryParameters=["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"];Z.BlobUsesCustomerSpecifiedEncryptionMsg="BlobUsesCustomerSpecifiedEncryption";Z.BlobDoesNotUseCustomerSpecifiedEncryption="BlobDoesNotUseCustomerSpecifiedEncryption";Z.PathStylePorts=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"]});var to=g(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.Pipeline=Ri.StorageOAuthScopes=void 0;Ri.isPipelineLike=qDe;Ri.newPipeline=HDe;Ri.getCoreClientOptions=jDe;Ri.getCredentialFromPipeline=M$;var O$=gm(),P$=Ot(),D$=Ni(),T$=F0(),Qx=Kc(),FDe=Em(),tn=ei(),Ju=en();Object.defineProperty(Ri,"StorageOAuthScopes",{enumerable:!0,get:function(){return Ju.StorageOAuthScopes}});function qDe(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}o(qDe,"isPipelineLike");var jm=class{static{o(this,"Pipeline")}factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};Ri.Pipeline=jm;function HDe(t,e={}){t||(t=new tn.AnonymousCredential);let r=new jm([],e);return r._credential=t,r}o(HDe,"newPipeline");function zDe(t){let e=[GDe,k$,YDe,JDe,VDe,WDe,KDe];if(t.factories.length){let r=t.factories.filter(n=>!e.some(i=>i(n)));if(r.length){let n=r.some(i=>$De(i));return{wrappedPolicies:(0,O$.createRequestPolicyFactoryPolicy)(r),afterRetry:n}}}}o(zDe,"processDownlevelPipeline");function jDe(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?(0,O$.convertHttpClient)(e):(0,tn.getCachedDefaultHttpClient)(),t._coreHttpClient=n);let i=t._corePipeline;if(!i){let s=`azsdk-js-azure-storage-blob/${Ju.SDK_VERSION}`,a=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${s}`:`${s}`;i=(0,D$.createClientPipeline)({...r,loggingOptions:{additionalAllowedHeaderNames:Ju.StorageBlobLoggingAllowedHeaderNames,additionalAllowedQueryParameters:Ju.StorageBlobLoggingAllowedQueryParameters,logger:FDe.logger.info},userAgentOptions:{userAgentPrefix:a},serializationOpt
Line truncated
|
||||
`),s=e.computeHMACSHA256(i);return{sasQueryParameters:new ca.SASQueryParameters(t.version,s,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}o(aMe,"generateBlobSASQueryParameters20150405");function cMe(t,e){if(t=Aa(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 r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=sa.BlobSASPermissions.parse(t.permissions.toString()).toString():i=oa.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,yt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,yt.truncatedISO8061Date)(t.expiresOn,!1):"",la(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?(0,aa.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new ca.SASQueryParameters(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}o(cMe,"generateBlobSASQueryParameters20181109");function lMe(t,e){if(t=Aa(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 r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=sa.BlobSASPermissions.parse(t.permissions.toString()).toString():i=oa.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,yt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,yt.truncatedISO8061Date)(t.expiresOn,!1):"",la(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?(0,aa.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new ca.SASQueryParameters(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:s}}o(lMe,"generateBlobSASQueryParameters20201206");function AMe(t,e){if(t=Aa(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=sa.BlobSASPermissions.parse(t.permissions.toString()).toString():i=oa.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,yt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,yt.truncatedISO8061Date)(t.expiresOn,!1):"",la(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,yt.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,yt.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?(0,aa.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new ca.SASQueryParameters(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:s}}o(AMe,"generateBlobSASQueryParametersUDK20181109");function uMe(t,e){if(t=Aa(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=sa.BlobSASPermissions.parse(t.permissions.toString()).toString():i=oa.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,yt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,yt.truncatedISO8061Date)(t.expiresOn,!1):"",la(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,yt.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,yt.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?(0,aa.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new ca.SASQueryParameters(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:s}}o(uMe,"generateBlobSASQueryParametersUDK20200210");function dMe(t,e){if(t=Aa(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=sa.BlobSASPermissions.parse(t.permissions.toString()).toString():i=oa.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,yt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,yt.truncatedISO8061Date)(t.expiresOn,!1):"",la(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,yt.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,yt.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?(0,aa.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new ca.SASQueryParameters(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:s}}o(dMe,"generateBlobSASQueryParametersUDK20201206");function pMe(t,e){if(t=Aa(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let i;t.permissions&&(t.blobName?i=sa.BlobSASPermissions.parse(t.permissions.toString()).toString():i=oa.ContainerSASPermissions.parse(t.permissions.toString()).toString());let s=[i||"",t.startsOn?(0,yt.truncatedISO8061Date)(t.startsOn,!1):"",t.expiresOn?(0,yt.truncatedISO8061Date)(t.expiresOn,!1):"",la(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?(0,yt.truncatedISO8061Date)(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?(0,yt.truncatedISO8061Date)(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?(0,aa.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(s);return{sasQueryParameters:new ca.SASQueryParameters(t.version,a,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:s}}o(pMe,"generateBlobSASQueryParametersUDK20250705");function la(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}o(la,"getCanonicalName");function Aa(t){let e=t.version?t.version:I3.SERVICE_VERSION;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(Aa,"SASSignatureValuesSanityCheckAndAutofill")});var hg=g(pg=>{"use strict";Object.defineProperty(pg,"__esModule",{value:!0});pg.BlobLeaseClient=void 0;var hMe=pt(),vi=en(),Wu=ia(),dg=Rn(),Jx=class{static{o(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=(0,hMe.randomUUID)()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==vi.ETagNone||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==vi.ETagNone||r.conditions?.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.");return Wu.tracingClient.withSpan("BlobLeaseClient-acquireLease",r,async n=>(0,dg.assertResponse)(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==vi.ETagNone||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==vi.ETagNone||r.conditions?.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.");return Wu.tracingClient.withSpan("BlobLeaseClient-changeLease",r,async n=>{let i=(0,dg.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,i})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==vi.ETagNone||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==vi.ETagNone||e.conditions?.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.");return Wu.tracingClient.withSpan("BlobLeaseClient-releaseLease",e,async r=>(0,dg.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:r.tracingOptio
Line truncated
|
||||
Polling from: ${r.config.operationLocation}
|
||||
Operation status: ${u}
|
||||
Polling status: ${cK.includes(u)?"Stopped":"Running"}`),u==="succeeded"){let d=a(A,r);if(d!==void 0)return{response:await e(d).catch(oK({state:r,stateProxy:n,isOperationError:c})),status:u}}return{response:A,status:u}}o(Eke,"pollOperationHelper");async function dK(t){let{poll:e,state:r,stateProxy:n,options:i,getOperationStatus:s,getResourceLocation:a,getOperationLocation:c,isOperationError:l,withOperationLocation:A,getPollingInterval:u,processResult:d,getError:f,updateState:m,setDelay:C,isDone:Q,setErrorAsResult:S}=t,{operationLocation:w}=r.config;if(w!==void 0){let{response:R,status:T}=await Eke({poll:e,getOperationStatus:s,state:r,stateProxy:n,operationLocation:w,getResourceLocation:a,isOperationError:l,options:i});if(AK({status:T,response:R,state:r,stateProxy:n,isDone:Q,processResult:d,getError:f,setErrorAsResult:S}),!cK.includes(T)){let L=u?.(R);L&&C(L);let W=c?.(R,r);if(W!==void 0){let de=w!==W;r.config.operationLocation=W,A?.(W,de)}else A?.(w,!1)}m?.(r,R)}}o(dK,"pollOperation");function pK(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}o(pK,"getOperationLocationPollingUrl");function hK(t){return t.headers.location}o(hK,"getLocationHeader");function fK(t){return t.headers["operation-location"]}o(fK,"getOperationLocationHeader");function mK(t){return t.headers["azure-asyncoperation"]}o(mK,"getAzureAsyncOperationHeader");function Bke(t){var e;let{location:r,requestMethod:n,requestPath:i,resourceLocationConfig:s}=t;switch(n){case"PUT":return i;case"DELETE":return;case"PATCH":return(e=a())!==null&&e!==void 0?e:i;default:return a()}function a(){switch(s){case"azure-async-operation":return;case"original-uri":return i;case"location":default:return r}}o(a,"getDefault")}o(Bke,"findResourceLocation");function gK(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:i}=t,s=fK(e),a=mK(e),c=pK({operationLocation:s,azureAsyncOperation:a}),l=hK(e),A=r?.toLocaleUpperCase();return c!==void 0?{mode:"OperationLocation",operationLocation:c,resourceLocation:Bke({requestMethod:A,location:l,requestPath:n,resourceLocationConfig:i})}:l!==void 0?{mode:"ResourceLocation",operationLocation:l}:A==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}o(gK,"inferLroMode");function yK(t){let{status:e,statusCode:r}=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 RS(r);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 da.verbose(`LRO: unrecognized operation status: ${e}`),e}}o(yK,"transformStatus");function Ike(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return yK({status:r,statusCode:t.statusCode})}o(Ike,"getStatus");function bke(t){var e,r;let{properties:n,provisioningState:i}=(e=t.body)!==null&&e!==void 0?e:{},s=(r=n?.provisioningState)!==null&&r!==void 0?r:i;return yK({status:s,statusCode:t.statusCode})}o(bke,"getProvisioningState");function RS(t){return t===202?"running":t<300?"succeeded":"failed"}o(RS,"toOperationStatus");function CK({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?Qke(new Date(e)):r*1e3}}o(CK,"parseRetryAfter");function EK(t){let e=t.flatResponse.error;if(!e){da.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){da.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(EK,"getErrorFromResponse");function Qke(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}o(Qke,"calculatePollingIntervalFromDate");function BK(t){let{response:e,state:r,operationLocation:n}=t;function i(){var a;switch((a=r.config.metadata)===null||a===void 0?void 0:a.mode){case void 0:return RS(e.rawResponse.statusCode);case"Body":return _S(e,r);default:return"running"}}o(i,"helper");let s=i();return s==="running"&&n===void 0?"succeeded":s}o(BK,"getStatusFromInitialResponse");async function wke(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:i,setErrorAsResult:s}=t;return uK({init:async()=>{let a=await i.sendInitialRequest(),c=gK({rawResponse:a.rawResponse,requestPath:i.requestPath,requestMethod:i.requestMethod,resourceLocationConfig:r});return Object.assign({response:a,operationLocation:c?.operationLocation,resourceLocation:c?.resourceLocation},c?.mode?{metadata:{mode:c.mode}}:{})},stateProxy:e,processResult:n?({flatResponse:a},c)=>n(a,c):({flatResponse:a})=>a,getOperationStatus:BK,setErrorAsResult:s})}o(wke,"initHttpOperation");function IK({rawResponse:t},e){var r;switch((r=e.config.metadata)===nuLine truncated
|
||||
`):a=[e.accountName,n,i,s,t.startsOn?(0,ay.truncatedISO8061Date)(t.startsOn,!1):"",(0,ay.truncatedISO8061Date)(t.expiresOn,!1),t.ipRange?(0,HK.ipRangeToString)(t.ipRange):"",t.protocol?t.protocol:"",r,""].join(`
|
||||
`);let c=e.computeHMACSHA256(a);return{sasQueryParameters:new ILe.SASQueryParameters(r,c,n.toString(),i,s,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),stringToSign:a}}o(zK,"generateAccountSASQueryParametersInternal")});var VK=g(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});Ay.BlobServiceClient=void 0;var wLe=Kc(),NLe=Ot(),jK=pt(),rd=to(),xLe=WS(),ly=Rn(),fa=ei(),Mi=Rn(),ki=ia(),SLe=Xg(),RLe=ng(),GK=ny(),YK=eR(),JK=oy(),tR=class t extends RLe.StorageClient{static{o(this,"BlobServiceClient")}serviceContext;static fromConnectionString(e,r){r=r||{};let n=(0,ly.extractConnectionStringParts)(e);if(n.kind==="AccountConnString")if(jK.isNodeLike){let i=new fa.StorageSharedKeyCredential(n.accountName,n.accountKey);r.proxyOptions||(r.proxyOptions=(0,NLe.getDefaultProxySettings)(n.proxyUri));let s=(0,rd.newPipeline)(i,r);return new t(n.url,s)}else throw new Error("Account connection string is only supported in Node.js environment");else if(n.kind==="SASConnString"){let i=(0,rd.newPipeline)(new fa.AnonymousCredential,r);return new t(n.url+"?"+n.accountSas,i)}else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}constructor(e,r,n){let i;(0,rd.isPipelineLike)(r)?i=r:jK.isNodeLike&&r instanceof fa.StorageSharedKeyCredential||r instanceof fa.AnonymousCredential||(0,wLe.isTokenCredential)(r)?i=(0,rd.newPipeline)(r,n):i=(0,rd.newPipeline)(new fa.AnonymousCredential,n),super(e,i),this.serviceContext=this.storageClientContext.service}getContainerClient(e){return new xLe.ContainerClient((0,ly.appendToURLPath)(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,r={}){return ki.tracingClient.withSpan("BlobServiceClient-createContainer",r,async n=>{let i=this.getContainerClient(e),s=await i.create(n);return{containerClient:i,containerCreateResponse:s}})}async deleteContainer(e,r={}){return ki.tracingClient.withSpan("BlobServiceClient-deleteContainer",r,async n=>this.getContainerClient(e).delete(n))}async undeleteContainer(e,r,n={}){return ki.tracingClient.withSpan("BlobServiceClient-undeleteContainer",n,async i=>{let s=this.getContainerClient(n.destinationContainerName||e),a=s.storageClientContext.container,c=(0,Mi.assertResponse)(await a.restore({deletedContainerName:e,deletedContainerVersion:r,tracingOptions:i.tracingOptions}));return{containerClient:s,containerUndeleteResponse:c}})}async getProperties(e={}){return ki.tracingClient.withSpan("BlobServiceClient-getProperties",e,async r=>(0,Mi.assertResponse)(await this.serviceContext.getProperties({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async setProperties(e,r={}){return ki.tracingClient.withSpan("BlobServiceClient-setProperties",r,async n=>(0,Mi.assertResponse)(await this.serviceContext.setProperties(e,{abortSignal:r.abortSignal,tracingOptions:n.tracingOptions})))}async getStatistics(e={}){return ki.tracingClient.withSpan("BlobServiceClient-getStatistics",e,async r=>(0,Mi.assertResponse)(await this.serviceContext.getStatistics({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async getAccountInfo(e={}){return ki.tracingClient.withSpan("BlobServiceClient-getAccountInfo",e,async r=>(0,Mi.assertResponse)(await this.serviceContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:r.tracingOptions})))}async listContainersSegment(e,r={}){return ki.tracingClient.withSpan("BlobServiceClient-listContainersSegment",r,async n=>(0,Mi.assertResponse)(await this.serviceContext.listContainersSegment({abortSignal:r.abortSignal,marker:e,...r,include:typeof r.include=="string"?[r.include]:r.include,tracingOptions:n.tracingOptions})))}async findBlobsByTagsSegment(e,r,n={}){return ki.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment",n,async i=>{let s=(0,Mi.assertResponse)(await this.serviceContext.filterBlobs({abortSignal:n.abortSignal,where:e,marker:r,maxPageSize:n.maxPageSize,tracingOptions:i.tracingOptions}));return{...s,_response:s._response,blobs:s.blobs.map(c=>{let l="";return c.tags?.blobTagSet.length===1&&(l=c.tags.blobTagSet[0].value),{...c,tags:(0,ly.toTags)(c.tags),tagValue:l}})}})}async*findBlobsByTagsSegments(e,r,n={}){let i;if(r||r===void 0)do i=await this.findBlobsByTagsSegment(e,r,n),i.blobs=i.blobs||[],r=i.continuationToken,yield i;while(r)}async*findBlobsByTagsItems(e,r={}){let n;for await(let i of this.findBlobsByTagsSegments(e,n,r))yield*i.blobs}findBlobsByTags(e,r={}){let n={...r},i=this.findBlobsByTagsItems(e,n);return{next(){return i.next()},[Symbol.asyncIterator](){return this},byPage:(s={})=>this.findBlobsByTagsSegments(e,s.continuationToken,{maxPageSize:s.maxPageSize,...n})}}async*listSegments(e,r={}){let n;if(e||e===void 0)do n=await this.listContainersSegment(e,r),n.containerItems=n.containerItems||[],e=n.continuationToken,yield await n;while(e)}async*listItems(e={}){let r;for await(let n of this.listSegments(r,e))yield*n.contain
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(r),this.code=e,this.name="NetworkError"}};Ar.NetworkError=hy;hy.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var fy=class extends Error{static{o(this,"UsageError")}constructor(){super(`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`),this.name="UsageError"}};Ar.UsageError=fy;fy.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var aR=class extends Error{static{o(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};Ar.RateLimitError=aR});var ZK=g(sn=>{"use strict";var TLe=sn&&sn.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),OLe=sn&&sn.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),MLe=sn&&sn.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&TLe(r,e,n[i]);return OLe(r,e),r}}(),kLe=sn&&sn.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(sn,"__esModule",{value:!0});sn.UploadProgress=void 0;sn.uploadCacheArchiveSDK=FLe;var lR=MLe(ft()),LLe=rR(),ULe=cR(),my=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,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,i=(e/(1024*1024)/(n/1e3)).toFixed(1);lR.info(`Sent ${e} of ${this.contentLength} (${r}%), ${i} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=o(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};sn.UploadProgress=my;function FLe(t,e,r){return kLe(this,void 0,void 0,function*(){var n;let i=new LLe.BlobClient(t),s=i.getBlockBlobClient(),a=new my((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),lR.debug(`BlobClient: ${i.name}:${i.accountName}:${i.containerName}`);let l=yield s.uploadFile(e,c);if(l._response.status>=400)throw new ULe.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw lR.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{a.stopDisplayTimer()}})}o(FLe,"uploadCacheArchiveSDK")});var uR=g(ur=>{"use strict";var qLe=ur&&ur.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),HLe=ur&&ur.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zLe=ur&&ur.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&qLe(r,e,n[i]);return HLe(r,e),r}}(),yy=ur&&ur.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(ur,"__esModule",{value:!0});ur.isSuccessStatusCode=jLe;ur.isServerErrorStatusCode=t4;ur.isRetryableStatusCode=r4;ur.retry=AR;ur.retryTypedResponse=YLe;ur.retryHttpClientResponse=JLe;var e4=zLe(ft()),gy=qs(),Sl=Cu();function jLe(t){return t?t>=200&&t<300:!1}o(jLe,"isSucc
Line truncated
|
||||
Other caches with similar key:`);for(let c of s?.artifactCaches||[])on.debug(`Cache Key: ${c?.cacheKey}, Cache Version: ${c?.cacheVersion}, Cache Scope: ${c?.scope}, Cache Created: ${c?.creationTime}`)}}})}o(xUe,"printCachesListForDiagnostics");function SUe(t,e,r){return Tr(this,void 0,void 0,function*(){let n=new EUe.URL(t),i=(0,gR.getDownloadOptions)(r);n.hostname.endsWith(".blob.core.windows.net")?i.useAzureSdk?yield(0,Ey.downloadCacheStorageSDK)(t,e,i):i.concurrentBlobDownloads?yield(0,Ey.downloadCacheHttpClientConcurrent)(t,e,i):yield(0,Ey.downloadCacheHttpClient)(t,e):yield(0,Ey.downloadCacheHttpClient)(t,e)})}o(SUe,"downloadCache");function RUe(t,e,r){return Tr(this,void 0,void 0,function*(){let n=yR(),i=_l.getCacheVersion(e,r?.compressionMethod,r?.enableCrossOsArchive),s={key:t,version:i,cacheSize:r?.cacheSize};return yield(0,lo.retryTypedResponse)("reserveCache",()=>Tr(this,void 0,void 0,function*(){return n.postJson(ad("caches"),s)}))})}o(RUe,"reserveCache");function d4(t,e){return`bytes ${t}-${e}/*`}o(d4,"getContentRange");function _Ue(t,e,r,n,i){return Tr(this,void 0,void 0,function*(){on.debug(`Uploading chunk of size ${i-n+1} bytes at offset ${n} with content range: ${d4(n,i)}`);let s={"Content-Type":"application/octet-stream","Content-Range":d4(n,i)},a=yield(0,lo.retryHttpClientResponse)(`uploadChunk (start: ${n}, end: ${i})`,()=>Tr(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),s)}));if(!(0,lo.isSuccessStatusCode)(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}o(_Ue,"uploadChunk");function vUe(t,e,r,n){return Tr(this,void 0,void 0,function*(){let i=_l.getArchiveFileSizeInBytes(r),s=ad(`caches/${e.toString()}`),a=fR.openSync(r,"r"),c=(0,gR.getUploadOptions)(n),l=_l.assertDefined("uploadConcurrency",c.uploadConcurrency),A=_l.assertDefined("uploadChunkSize",c.uploadChunkSize),u=[...new Array(l).keys()];on.debug("Awaiting all uploads");let d=0;try{yield Promise.all(u.map(()=>Tr(this,void 0,void 0,function*(){for(;d<i;){let f=Math.min(i-d,A),m=d,C=d+f-1;d+=A,yield _Ue(t,s,()=>fR.createReadStream(r,{fd:a,start:m,end:C,autoClose:!1}).on("error",Q=>{throw new Error(`Cache upload failed because file read failed with ${Q.message}`)}),m,C)}})))}finally{fR.closeSync(a)}})}o(vUe,"uploadFile");function PUe(t,e,r){return Tr(this,void 0,void 0,function*(){let n={size:r};return yield(0,lo.retryTypedResponse)("commitCache",()=>Tr(this,void 0,void 0,function*(){return t.postJson(ad(`caches/${e.toString()}`),n)}))})}o(PUe,"commitCache");function DUe(t,e,r,n){return Tr(this,void 0,void 0,function*(){if((0,gR.getUploadOptions)(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield(0,BUe.uploadCacheArchiveSDK)(r,e,n)}else{let s=yR();on.debug("Upload cache"),yield vUe(s,t,e,n),on.debug("Commiting cache");let a=_l.getArchiveFileSizeInBytes(e);on.info(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield PUe(s,t,a);if(!(0,lo.isSuccessStatusCode)(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);on.info("Cache saved successfully")}})}o(DUe,"saveCache")});var By=g(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.isJsonObject=vl.typeofJsonValue=void 0;function TUe(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}o(TUe,"typeofJsonValue");vl.typeofJsonValue=TUe;function OUe(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}o(OUe,"isJsonObject");vl.isJsonObject=OUe});var by=g(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.base64encode=Pl.base64decode=void 0;var ys="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Iy=[];for(let t=0;t<ys.length;t++)Iy[ys[t].charCodeAt(0)]=t;Iy[45]=ys.indexOf("+");Iy[95]=ys.indexOf("/");function MUe(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let r=new Uint8Array(e),n=0,i=0,s,a=0;for(let c=0;c<t.length;c++){if(s=Iy[t.charCodeAt(c)],s===void 0)switch(t[c]){case"=":i=0;case`
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:a=s,i=1;break;case 1:r[n++]=a<<2|(s&48)>>4,a=s,i=2;break;case 2:r[n++]=(a&15)<<4|(s&60)>>2,a=s,i=3;break;case 3:r[n++]=(a&3)<<6|s,i=0;break}}if(i==1)throw Error("invalid base64 string.");return r.subarray(0,n)}o(MUe,"base64decode");Pl.base64decode=MUe;function kUe(t){let e="",r=0,n,i=0;for(let s=0;s<t.length;s++)switch(n=t[s],r){case 0:e+=ys[n>>2],i=(n&3)<<4,r=1;break;case 1:e+=ys[i|n>>4],i=(n&15)<<2,r=2;break;case 2:e+=ys[i|n>>6],e+=ys[n&63],r=0;break}return r&&(e+=ys[i],e+="=",r==1&&(e+="=")),e}o(kUe,"base64encode");Pl.base64encode=kUe});var h4=g(Qy=>{"use strict";Object.defineProperty(Qy,"__esModule",{value:!0});Qy.utf8read=void 0;var CR=o(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function LUe(t){if(t.length<1)return"";let e=0,r=[],n=[],i=0,s,a=t.length;for(;e<a;)s=t[e++],s<128?n[i++]=s:s>191&&s<224?n[i++]=(s&31)<<6|t[e++]&63:s>239&&s<365?(s=((s&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[i++]=55296+(s>>10),n[i++]=56320+(s&1023)):n[i++]=(s&15)<<12|(t[e++]&63)<<6|t[e++]&63,i>8191&&(r.push(CR(n)),i=0);return r.length?(i&&r.push(CR(n.slice(0,i))),r.join("")):CR(n.slice(0,i))}o(LUe,"utf8read");Qy.utf8read=LUe});var cd=g(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.WireType=Ui.mergeBinaryOptions=Ui.UnknownFieldHandler=void 0;var UUe;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,i,s,a)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:i,wireType:s,data:a})},t.onWrite=(r,n,i)=>{for(let{no:s,wireType:a,data:c}of t.list(n))i.tag(s,a).raw(c)},t.list=(r,n)=>{if(e(r)){let i=r[t.symbol];return n?i.filter(s=>s.no==n):i}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=o(r=>r&&Array.isArray(r[t.symbol]),"is")})(UUe=Ui.UnknownFieldHandler||(Ui.UnknownFieldHandler={}));function FUe(t,e){return Object.assign(Object.assign({},t),e)}o(FUe,"mergeBinaryOptions");Ui.mergeBinaryOptions=FUe;var qUe;(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"})(qUe=Ui.WireType||(Ui.WireType={}))});var Ny=g(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.varint32read=Mr.varint32write=Mr.int64toString=Mr.int64fromString=Mr.varint64write=Mr.varint64read=void 0;function HUe(){let t=0,e=0;for(let n=0;n<28;n+=7){let i=this.buf[this.pos++];if(t|=(i&127)<<n,!(i&128))return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,!(r&128))return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let i=this.buf[this.pos++];if(e|=(i&127)<<n,!(i&128))return this.assertBounds(),[t,e]}throw new Error("invalid varint")}o(HUe,"varint64read");Mr.varint64read=HUe;function zUe(t,e,r){for(let s=0;s<28;s=s+7){let a=t>>>s,c=!(!(a>>>7)&&e==0),l=(c?a|128:a)&255;if(r.push(l),!c)return}let n=t>>>28&15|(e&7)<<4,i=!!(e>>3);if(r.push((i?n|128:n)&255),!!i){for(let s=3;s<31;s=s+7){let a=e>>>s,c=!!(a>>>7),l=(c?a|128:a)&255;if(r.push(l),!c)return}r.push(e>>>31&1)}}o(zUe,"varint64write");Mr.varint64write=zUe;var wy=65536*65536;function jUe(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,i=0;function s(a,c){let l=Number(t.slice(a,c));i*=r,n=n*r+l,n>=wy&&(i=i+(n/wy|0),n=n%wy)}return o(s,"add1e6digit"),s(-24,-18),s(-18,-12),s(-12,-6),s(-6),[e,n,i]}o(jUe,"int64fromString");Mr.int64fromString=jUe;function GUe(t,e){if(e>>>0<=2097151)return""+(wy*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,i=e>>16&65535,s=r+n*6777216+i*6710656,a=n+i*8147497,c=i*2,l=1e7;s>=l&&(a+=Math.floor(s/l),s%=l),a>=l&&(c+=Math.floor(a/l),a%=l);function A(u,d){let f=u?String(u):"";return d?"0000000".slice(f.length)+f:f}return o(A,"decimalFrom1e7"),A(c,0)+A(a,c)+A(s,1)}o(GUe,"int64toString");Mr.int64toString=GUe;function YUe(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}o(YUe,"varint32write");Mr.varint32write=YUe;function JUe(){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 r=5;t&128&&r<10;r++)t=this.buf[this.pos++];if(t&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}o(JUe,"varint32read");Mr.varint32read=JUe});var uo=g(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.PbLong=Ao.PbULong=Ao.detectBi=void 0;var ld=Ny(),Je;function f4(){let t=new DataView(new ArrayBuffer(8));Je=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:
Line truncated
|
||||
`)}};Zy.RpcError=YR});var VR=g(tC=>{"use strict";Object.defineProperty(tC,"__esModule",{value:!0});tC.mergeRpcOptions=void 0;var J4=St();function fqe(t,e){if(!e)return t;let r={};eC(t,r),eC(e,r);for(let n of Object.keys(e)){let i=e[n];switch(n){case"jsonOptions":r.jsonOptions=J4.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=J4.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},eC(t.meta,r.meta),eC(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(i):i.concat();break}}return r}o(fqe,"mergeRpcOptions");tC.mergeRpcOptions=fqe;function eC(t,e){if(!t)return;let r=e;for(let[n,i]of Object.entries(t))i instanceof Date?r[n]=new Date(i.getTime()):Array.isArray(i)?r[n]=i.concat():r[n]=i}o(eC,"copy")});var $R=g(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.Deferred=ya.DeferredState=void 0;var Hi;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(Hi=ya.DeferredState||(ya.DeferredState={}));var WR=class{static{o(this,"Deferred")}constructor(e=!0){this._state=Hi.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==Hi.PENDING)throw new Error(`cannot resolve ${Hi[this.state].toLowerCase()}`);this._resolve(e),this._state=Hi.RESOLVED}reject(e){if(this.state!==Hi.PENDING)throw new Error(`cannot reject ${Hi[this.state].toLowerCase()}`);this._reject(e),this._state=Hi.REJECTED}resolvePending(e){this._state===Hi.PENDING&&this.resolve(e)}rejectPending(e){this._state===Hi.PENDING&&this.reject(e)}};ya.Deferred=WR});var XR=g(rC=>{"use strict";Object.defineProperty(rC,"__esModule",{value:!0});rC.RpcOutputStreamController=void 0;var V4=$R(),Ca=St(),KR=class{static{o(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}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,r){return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){Ca.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){Ca.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){Ca.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){Ca.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._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{let e=this._itState;Ca.assert(e,"bad state"),Ca.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new V4.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;Ca.assert(n.state==V4.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};rC.RpcOutputStreamController=KR});var e_=g(Ul=>{"use strict";var mqe=Ul&&Ul.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ul,"__esModule",{value:!0});Ul.UnaryCall=void 0;var ZR=class{static{o(this,"UnaryCall")}constructor(e,r,n,i,s,a,c){this.method=e,this.requestHeaders=r,this.request=n,this.headers=i,this.response=s,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return mqe(this,void 0,void 0,function*(){let[e,r,n,i]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:i}})}};Ul.UnaryCall=ZR});var r_=g(Fl=>{"use strict";var gqe=Fl&&Fl.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.thr
Line truncated
|
||||
`));let n=yield Q_(r,"create");yield w_(n,t)})}o(u1e,"createTar")});var m8=g(Lt=>{"use strict";var d1e=Lt&&Lt.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),p1e=Lt&&Lt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Qd=Lt&&Lt.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&d1e(r,e,n[i]);return p1e(r,e),r}}(),Xl=Lt&&Lt.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.FinalizeCacheError=Lt.ReserveCacheError=Lt.ValidationError=void 0;Lt.isFeatureAvailable=h1e;Lt.restoreCache=f1e;Lt.saveCache=y1e;var ie=Qd(ft()),uC=Qd(require("path")),lt=Qd(Tc()),Kl=Qd(p4()),h8=Qd(A8()),dC=Cy(),fo=p8(),pC=qs(),Ln=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};Lt.ValidationError=Ln;var Ia=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};Lt.ReserveCacheError=Ia;var bd=class t extends Error{static{o(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};Lt.FinalizeCacheError=bd;function f8(t){if(!t||t.length===0)throw new Ln("Path Validation Error: At least one directory or file path is required")}o(f8,"checkPaths");function N_(t){if(t.length>512)throw new Ln(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Ln(`Key Validation Error: ${t} cannot contain commas.`)}o(N_,"checkKey");function h1e(){switch((0,dC.getCacheServiceVersion)()){case"v2":return!!process.env.ACTIONS_RESULTS_URL;case"v1":default:return!!process.env.ACTIONS_CACHE_URL}}o(h1e,"isFeatureAvailable");function f1e(t,e,r,n){return Xl(this,arguments,void 0,function*(i,s,a,c,l=!1){let A=(0,dC.getCacheServiceVersion)();switch(ie.debug(`Cache service version: ${A}`),f8(i),A){case"v2":return yield g1e(i,s,a,c,l);case"v1":default:return yield m1e(i,s,a,c,l)}})}o(f1e,"restoreCache");function m1e(t,e,r,n){return Xl(this,arguments,void 0,function*(i,s,a,c,l=!1){a=a||[];let A=[s,...a];if(ie.debug("Resolved Keys:"),ie.debug(JSON.stringify(A)),A.length>10)throw new Ln("Key Validation Error: Keys are limited to a maximum of 10.");for(let f of A)N_(f);let u=yield lt.getCompressionMethod(),d="";try{let f=yield Kl.getCacheEntry(A,i,{compressionMethod:u,enableCrossOsArchive:l});if(!f?.archiveLocation)return;if(c?.lookupOnly)return ie.info("Lookup only - skipping download"),f.cacheKey;d=uC.join(yield lt.createTempDirectory(),lt.getCacheFileName(u)),ie.debug(`Archive Path: ${d}`),yield Kl.downloadCache(f.archiveLocation,d,c),ie.isDebug()&&(yield(0,fo.listTar)(d,u));let m=lt.getArchiveFileSizeInBytes(d);return ie.info(`Cache Size: ~${Math.round(m/(1024*1024))} MB (${m} B)`),yield(0,fo.extractTar)(d,u),ie.info("Cache restored successfully"),f.cacheKey}catch(f){let m=f;if(m.name===Ln.name)throw f;m instanceof pC.HttpClientError&&typeof m.statusCode=="number"&&m.statusCode>=500?ie.error(`Failed to restore: ${f.message}`):ie.warning(`Failed to restore: ${f.message}`)}finally{try{yield lt.unlinkFile(d)}catch(f){ie.debug(`Failed to delete archive: ${f}`)}}})}o(m1e,"restoreCacheV1");function g1e(t,e,r,n){return Xl(this,arguments,void 0,function*(i,s,a,c,l=!1){c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let A=[s,...a];if(ie.debug("Resolved Keys:"),ie.debug(JSON.stringify(A)),A.length>10)throw new Ln("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of A)N_(d);let u="";try{let d=h8.internalCacheTwirpClient(),f=yield lt.getCompressionMethod(),m={key:s,restoreKeys:a,version:lt.getCacheVersion(i,f,l)},C=yield d.GetCacheEntryDownloadURL(m);if(!C.ok){ie.debug(`Cache not found for version ${m.version} of keys: ${A.join(", ")}`);return}if(m.key!==C.matchedKey?ie.info(`Cache hit for restore-key: ${C.matchedKey}`):ie.info(`Cache hit for: ${C.matchedKey}`),c?.lookupOnly)return ie.info("Lookup only - skipping download"),C.matchedKey;u=uC.join(yield lt.createTempDirectory(),lt.get
Line truncated
|
||||
`);for(let i of n){let s=i.split("=");if(s.length===2&&(s[0].trim()==="VERSION_ID"||s[0].trim()==="DISTRIB_RELEASE")){e=s[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return e}o(x1e,"_getOsVersion");function S1e(){let t="/etc/lsb-release",e="/etc/os-release",r="";return hC.existsSync(t)?r=hC.readFileSync(t).toString():hC.existsSync(e)&&(r=hC.readFileSync(e).toString()),r}o(S1e,"_readLinuxVersionFile")});var I8=g(Un=>{"use strict";var R1e=Un&&Un.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),_1e=Un&&Un.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),v1e=Un&&Un.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&R1e(r,e,n[i]);return _1e(r,e),r}}(),E8=Un&&Un.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(Un,"__esModule",{value:!0});Un.RetryHelper=void 0;var B8=v1e(ft()),R_=class{static{o(this,"RetryHelper")}constructor(e,r,n){if(e<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(r),this.maxSeconds=Math.floor(n),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(e,r){return E8(this,void 0,void 0,function*(){let n=1;for(;n<this.maxAttempts;){try{return yield e()}catch(s){if(r&&!r(s))throw s;B8.info(s.message)}let i=this.getSleepAmount();B8.info(`Waiting ${i} seconds before trying again`),yield this.sleep(i),n++}return yield e()})}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return E8(this,void 0,void 0,function*(){return new Promise(r=>setTimeout(r,e*1e3))})}};Un.RetryHelper=R_});var _8=g(rt=>{"use strict";var P1e=rt&&rt.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),D1e=rt&&rt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),oi=rt&&rt.__importStar||function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&P1e(r,e,n[i]);return D1e(r,e),r}}(),Er=rt&&rt.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return o(i,"adopt"),new(r||(r=Promise))(function(s,a){function c(u){try{A(n.next(u))}catch(d){a(d)}}o(c,"fulfilled");function l(u){try{A(n.throw(u))}catch(d){a(d)}}o(l,"rejected");function A(u){u.done?s(u.value):i(u.value).then(c,l)}o(A,"step"),A((n=n.apply(t,e||[])).next())})};Object.defineProperty(rt,"__esModule",{value:!0});rt.HTTPError=void 0;rt.downloadTool=F1e;rt.extract7z=H1e;rt.extractTar=z1e;rt.extractXar=j1e;rt.extractZip=G1e;rt.cacheDir=V1e;rt.cacheFile=W1e;rt.find=$1e;rt.findAllVersions=w8;rt.getManifestFromRepo=K1e;rt.findFromManifest=X1e;rt.isExplicitVersion=P_;rt.evaluateVersions=S8;var _e=oi(ft()),An=oi(au()),b8=oi(require("crypto")),Fn=oi(require("fs")),T1e=oi(C8()),Nd=oi(require("os")),si=oi(require("path")),Q8=oi(qs()),Bs=oi(rf()),O1e=oi(require("stream")),M1e=oi(require("util")),Zl=require("assert"),mo=Nc(),k1e=I8(),wd=class extends Error{static{o(this,"HTTPError")}constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}};rt.HTTPError=wd;var v_=process.platform==="win32",L1e=process.platform==="darwin",U1e="actions/tool-cache";function F1e(t,e,r,n){return Er(this,void 0,void 0,function*(){e=e||si.join(R8(),b8.randomUUID()),yield An.mkdirP(si.dirname(e)),_e.debug(`Downloading ${t}`),_e.debug(`Destination ${e}`);let i=3,s=__("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),a=__("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);return yield new k1e.RetryHelper(i,s,a).execute(()=>Er
Line 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(n){let i=this.ctx,s=n.key.pop();for(let a of n.key){if(hasKey(i,a)&&(!isTable(i[a])||i[a][_declared]))throw this.error(new TomlError("Can'
Line truncated
|
||||
`,e&&e.split){let n=e.split(/\n/),i=String(Math.min(n.length,t.line+3)).length,s=" ";for(;s.length<i;)s+=" ";for(let a=Math.max(0,t.line-1);a<Math.min(n.length,t.line+2);++a){let c=String(a+1);if(c.length<i&&(c=" "+c),t.line===a){r+=c+"> "+n[a]+`
|
||||
`,r+=s+" ";for(let l=0;l<t.col;++l)r+=" ";r+=`^
|
||||
`}else r+=c+": "+n[a]+`
|
||||
`}}return t.message=r+`
|
||||
`,t}o(tHe,"prettyError")});var G8=g((wXe,j8)=>{"use strict";j8.exports=iHe;var rHe=EC(),nHe=BC();function iHe(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new rHe;try{return e.parse(t),e.finish()}catch(r){throw nHe(r,t)}}o(iHe,"parseString")});var V8=g((xXe,J8)=>{"use strict";J8.exports=oHe;var sHe=EC(),Y8=BC();function oHe(t,e){e||(e={});let r=0,n=e.blocksize||40960,i=new sHe;return new Promise((a,c)=>{setImmediate(s,r,n,a,c)});function s(a,c,l,A){if(a>=t.length)try{return l(i.finish())}catch(u){return A(Y8(u,t))}try{i.parse(t.slice(a,a+c)),setImmediate(s,a+c,c,l,A)}catch(u){A(Y8(u,t))}}}o(oHe,"parseAsync")});var K8=g((RXe,$8)=>{"use strict";$8.exports=cHe;var aHe=require("stream"),W8=EC();function cHe(t){return t?lHe(t):AHe(t)}o(cHe,"parseStream");function lHe(t){let e=new W8;return t.setEncoding("utf8"),new Promise((r,n)=>{let i,s=!1,a=!1;function c(){if(s=!0,!i)try{r(e.finish())}catch(u){n(u)}}o(c,"finish");function l(u){a=!0,n(u)}o(l,"error"),t.once("end",c),t.once("error",l),A();function A(){i=!0;let u;for(;(u=t.read())!==null;)try{e.parse(u)}catch(d){return l(d)}if(i=!1,s)return c();a||t.once("readable",A)}o(A,"readNext")})}o(lHe,"parseReadable");function AHe(){let t=new W8;return new aHe.Transform({objectMode:!0,transform(e,r,n){try{t.parse(e.toString(r))}catch(i){this.emit("error",i)}n()},flush(e){try{this.push(t.finish())}catch(r){this.emit("error",r)}e()}})}o(AHe,"parseTransform")});var X8=g((vXe,Sd)=>{"use strict";Sd.exports=G8();Sd.exports.async=V8();Sd.exports.stream=K8();Sd.exports.prettyError=BC()});var o5=g((PXe,L_)=>{"use strict";L_.exports=uHe;L_.exports.value=k_;function uHe(t){if(t===null)throw Qa("null");if(t===void 0)throw Qa("undefined");if(typeof t!="object")throw Qa(typeof t);if(typeof t.toJSON=="function"&&(t=t.toJSON()),t==null)return null;let e=Lr(t);if(e!=="table")throw Qa(e);return M_("","",t)}o(uHe,"stringify");function Qa(t){return new Error("Can only stringify objects, not "+t)}o(Qa,"typeError");function dHe(){return new Error("Array values can't have mixed types")}o(dHe,"arrayOneTypeError");function Z8(t){return Object.keys(t).filter(e=>e5(t[e]))}o(Z8,"getInlineKeys");function pHe(t){return Object.keys(t).filter(e=>!e5(t[e]))}o(pHe,"getComplexKeys");function IC(t){let e=Array.isArray(t)?[]:Object.prototype.hasOwnProperty.call(t,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(t))t[r]&&typeof t[r].toJSON=="function"&&!("toISOString"in t[r])?e[r]=t[r].toJSON():e[r]=t[r];return e}o(IC,"toJSON");function M_(t,e,r){r=IC(r);var n,i;n=Z8(r),i=pHe(r);var s=[],a=e||"";n.forEach(l=>{var A=Lr(r[l]);A!=="undefined"&&A!=="null"&&s.push(a+bC(l)+" = "+n5(r[l],!0))}),s.length>0&&s.push("");var c=t&&n.length>0?e+" ":"";return i.forEach(l=>{s.push(QHe(t,c,l,r[l]))}),s.join(`
|
||||
`)}o(M_,"stringifyObject");function e5(t){switch(Lr(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||Lr(t[0])!=="table";case"table":return Object.keys(t).length===0;default:return!1}}o(e5,"isInline");function Lr(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(Lr,"tomlType");function bC(t){var e=String(t);return/^[-A-Za-z0-9_]+$/.test(e)?e:t5(e)}o(bC,"stringifyKey");function t5(t){return'"'+r5(t).replace(/"/g,'\\"')+'"'}o(t5,"stringifyBasicString");function hHe(t){return"'"+t+"'"}o(hHe,"stringifyLiteralString");function fHe(t,e){for(;e.length<t;)e="0"+e;return e}o(fHe,"numpad");function r5(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"+fHe(4,e.codePointAt(0).toString(16)))}o(r5,"escapeString");function mHe(t){let e=t.split(/\n/).map(r=>r5(r).replace(/"(?="")/g,'\\"')).join(`
|
||||
`);return e.slice(-1)==='"'&&(e+=`\\
|
||||
`),`"""
|
||||
`+e+'"""'}o(mHe,"stringifyMultilineString");function n5(t,e){let r=Lr(t);return r==="string"&&(e&&/\n/.test(t)?r="string-multiline":!/[\b\t\n\f\r']/.test(t)&&/"/.test(t)&&(r="string-literal")),k_(t,r)}o(n5,"stringifyAnyInline");function k_(t,e){switch(e||(e=Lr(t)),e){case"string-multiline":return mHe(t);case"string":return t5(t);case"string-literal":return hHe(t);case"integer":return i5(t);case"float":return gHe(t);case"boolean":return yHe(t);case"datetime":return CHe(t);case"array":return IHe(t.filter(r=>Lr(r)!=="null"&&Lr(r)!=="undefined"&&Lr(r)!=="nan"));case"table":return bHe(t);default:throw Qa(e)}}o(k_,"stringifyInline");function i5(t){return String(t).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}o(i5,"stringifyInteger");function gHe(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("."),r=e[0],n=e[1]||0;return i5(r)+"."+n}o(gHe,"stringifyFloat");function yHe(t){return String(t)}o(yHe,"stringifyBoolean");function CHe(t){return t.toISOString()}o(CHe,"stringifyDatetime");function EHe(t){return t==="float"||t==="integer"}o(EHe,"isNumber");function BHe(t){var e=Lr(t[0]);return t.every(r=>Lr(r)===e)?e:t.every(r=>EHe(Lr(r)))?"float":"mixed"}o(BHe,"arrayType");function s5(t){let e=BHe(t);if(e==="mixed")throw dHe();return e}o(s5,"validateArray");function IHe(t){t=IC(t);let e=s5(t);var r="[",n=t.map(i=>k_(i,e));return n.join(", ").length>60||/\n/.test(n)?r+=`
|
||||
`+n.join(`,
|
||||
`)+`
|
||||
`:r+=" "+n.join(", ")+(n.length>0?" ":""),r+"]"}o(IHe,"stringifyInlineArray");function bHe(t){t=IC(t);var e=[];return Object.keys(t).forEach(r=>{e.push(bC(r)+" = "+n5(t[r],!1))}),"{ "+e.join(", ")+(e.length>0?" ":"")+"}"}o(bHe,"stringifyInlineTable");function QHe(t,e,r,n){var i=Lr(n);if(i==="array")return wHe(t,e,r,n);if(i==="table")return NHe(t,e,r,n);throw Qa(i)}o(QHe,"stringifyComplex");function wHe(t,e,r,n){n=IC(n),s5(n);var i=Lr(n[0]);if(i!=="table")throw Qa(i);var s=t+bC(r),a="";return n.forEach(c=>{a.length>0&&(a+=`
|
||||
`),a+=e+"[["+s+`]]
|
||||
`,a+=M_(s+".",e,c)}),a}o(wHe,"stringifyArrayOfTables");function NHe(t,e,r,n){var i=t+bC(r),s="";return Z8(n).length>0&&(s+=e+"["+i+`]
|
||||
`),s+M_(i+".",e,n)}o(NHe,"stringifyComplexTable")});var a5=g(U_=>{"use strict";U_.parse=X8();U_.stringify=o5()});var _5=require("node:os"),Vt=Ji(ft());var Q5=require("node:os"),sA=require("node:path"),qn=require("node:fs"),zi=Ji(ft()),xC=Ji(m8()),Rd=Ji(_8()),j_=Ji(Nc());var tA=require("node:fs"),F_=Ji(ft()),QC=Ji(a5());function c5(t,e){if(!e.length)return;let r=0;if(e.forEach(s=>{try{new URL(s.url)}catch{throw new Error(`Invalid registry URL: ${s.url}`)}s.scope||r++}),r>1)throw new Error("You can't have more than one global registry.");(0,F_.info)(`Writing bunfig.toml to '${t}'.`);let n={};if((0,tA.existsSync)(t))try{let s=(0,tA.readFileSync)(t,{encoding:"utf-8"});n=(0,QC.parse)(s)}catch(s){(0,F_.info)(`Error reading existing bunfig: ${s.message}`),n={}}n.install=n?.install||{},n.install.scopes=n?.install.scopes||{};let i=e.find(s=>!s.scope);i&&(n.install.registry={url:i.url,...i.token?{token:i.token}:{}});for(let s of e)if(s.scope){let a=s.scope.startsWith("@")?s.scope.toLowerCase():`@${s.scope.toLowerCase()}`;n.install.scopes[a]={url:s.url,...s.token?{token:s.token}:{}}}Object.keys(n.install.scopes).length===0&&delete n.install.scopes,(0,tA.writeFileSync)(t,(0,QC.stringify)(n),{encoding:"utf8"})}o(c5,"writeBunfig");var w5=Ji(ft());var yo=Ji(ft()),h5=require("node:console"),f5=require("node:crypto"),Na=require("node:fs"),wC=require("node:path");var q_=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,rA=o(t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");let e=t.match(q_);if(!e)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return e.shift(),e},"validateAndParse"),l5=o(t=>t==="*"||t==="x"||t==="X","isWildcard"),A5=o(t=>{let e=parseInt(t,10);return isNaN(e)?t:e},"tryParse"),xHe=o((t,e)=>typeof t!=typeof e?[String(t),String(e)]:[t,e],"forceType"),SHe=o((t,e)=>{if(l5(t)||l5(e))return 0;let[r,n]=xHe(A5(t),A5(e));return r>n?1:r<n?-1:0},"compareStrings"),go=o((t,e)=>{for(let r=0;r<Math.max(t.length,e.length);r++){let n=SHe(t[r]||"x",e[r]||"x");if(n!==0)return n}return 0},"compareSegments");var wa=o((t,e)=>{let r=rA(t),n=rA(e),i=r.pop(),s=n.pop(),a=go(r,n);return a!==0?a:i&&s?go(i.split("."),s.split(".")):i||s?i?-1:1:0},"compareVersions");var d5=o((t,e,r)=>{RHe(r);let n=wa(t,e);return p5[r].includes(n)},"compare"),p5={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},u5=Object.keys(p5),RHe=o(t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(u5.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${u5.join("|")}`)},"assertValidOperator");var nA=o((t,e)=>{if(e=e.replace(/([><=]+)\s+/g,"$1"),e.includes("||"))return e.split("||").some(S=>nA(t,S));if(e.includes(" - ")){let[S,w]=e.split(" - ",2);return nA(t,`>=${S} <=${w}`)}else if(e.includes(" "))return e.trim().replace(/\s{2,}/g," ").split(" ").every(S=>nA(t,S));let r=e.match(/^([<>=~^]+)/),n=r?r[1]:"=";if(n!=="^"&&n!=="~")return d5(t,e,n);let[i,s,a,,c]=rA(t),[l,A,u,,d]=rA(e),f=[i,s??"x",a??"x"],m=[l,A??"x",u??"x"];if(d&&(!c||go(f,m)!==0||go(c.split("."),d.split("."))===-1))return!1;let C=m.findIndex(S=>S!=="0")+1,Q=n==="~"?2:C>1?C:1;return!(go(f.slice(0,Q),m.slice(0,Q))!==0||go(f.slice(Q),m.slice(Q))===-1)},"satisfies");var iA=o(t=>typeof t=="string"&&/^[v\d]/.test(t)&&q_.test(t),"validate"),H_=o(t=>typeof t=="string"&&/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(t),"validateStrict");var _He="1.3.10";function m5(t){return`bun-${(0,f5.createHash)("sha1").update(t).digest("base64")}`}o(m5,"getCacheKey");function g5(t){return t.match(/\/bun-v([^/]+)\//)?.[1]}o(g5,"extractVersionFromUrl");async function y5(t,e){let r=new Headers(e?.headers);r.has("User-Agent")||r.set("User-Agent","@oven-sh/setup-bun");let n=await fetch(t,{...e,headers:r});if(!n.ok){let i=await n.text().catch(()=>"");throw new Error(`Failed to fetch url ${t}. (status code: ${n.status}, status text: ${n.statusText})${i?`
|
||||
${i}`:""}`)}return n}o(y5,"request");function C5(t,e){return t.endsWith(e)?t:((0,Na.renameSync)(t,t+e),t+e)}o(C5,"addExtension");function NC(){let t=process.platform;return t==="win32"?"windows":t}o(NC,"getPlatform");function E5(t){if(!t)return!1;let e=t.replace(/^bun-v/,"");return iA(e)?wa(e,_He)>=0:!0}o(E5,"hasNativeWindowsArm64");function B5(t,e,r){return t==="windows"&&(e==="aarch64"||e==="arm64")&&!E5(r)?((0,yo.warning)(["\u26A0\uFE0F This version of Bun does not provide native arm64 builds for Windows.","Using x64 baseline build which will run through Microsoft's x64 emulation layer.","This may result in reduced performance and potential compatibility issues.","\u{1F4A1} For best performance, consider using Bun >= 1.3.10, x64 Windows runners, or other platforms with native support."].join(`
|
||||
`)),"x64"):e==="arm64"?"aarch64":e}o(B5,"getArchitecture");function I5(t,e,r,n){if(t==="windows"&&(e==="aarch64"||e==="arm64"))return!!E5(n);if(t==="linux"&&e==="x64"&&r===void 0)try{return(0,Na.readFileSync)("/proc/cpuinfo","utf8").includes("avx2")}catch{return(0,yo.warning)("Failed to detect AVX2 support."),!1}return r??!0}o(I5,"getAvx2");var vHe={"package.json":t=>{let e=JSON.parse(t);return e.packageManager?.split("bun@")?.[1]??e.engines?.bun},".tool-versions":t=>t.match(/^bun\s*(?<version>.*?)$/m)?.groups?.version,".bumrc":t=>t,".bun-version":t=>t};function z_(t,e=!1){let r=process.env.GITHUB_WORKSPACE;if(!r||!t)return;(0,yo.debug)(`Reading version from ${t}`);let n=(0,wC.resolve)(r,t),i=(0,wC.basename)(t);if(!(0,Na.existsSync)(n)){e||(0,yo.warning)(`File ${n} not found`);return}let s=vHe[i]??(()=>{}),a;try{if(a=s((0,Na.readFileSync)(n,"utf8"))?.trim(),!a){e||(0,yo.warning)(`Failed to read version from ${t}`);return}}catch(c){let{message:l}=c;e||(0,yo.warning)(`Failed to read ${t}: ${l}`)}finally{if(a)return(0,h5.info)(`Obtained version ${a} from ${t}`),a}}o(z_,"readVersionFromFile");async function b5(t){let{customUrl:e}=t;return e||await PHe(t)}o(b5,"getDownloadUrl");async function PHe(t){let{version:e,os:r,arch:n,avx2:i,profile:s}=t,a;if(H_(e)&&(a=`bun-v${e}`),!a){let Q=(await(await y5("https://api.github.com/repos/oven-sh/bun/git/refs/tags",{headers:t.token?{Authorization:`Bearer ${t.token}`}:{}})).json()).filter(S=>S.ref.startsWith("refs/tags/bun-v")||S.ref==="refs/tags/canary").map(S=>S.ref.replace(/refs\/tags\/(bun-v)?/g,"")).filter(Boolean);if(a=Q.find(S=>S===e),a)iA(a)&&(a=`bun-v${a}`);else{Q=Q.filter(w=>iA(w)).sort(wa);let S=e==="latest"||!e?Q.at(-1):Q.filter(w=>nA(w,e)).at(-1);if(!S)throw new Error(`No Bun release found matching version '${e}'`);a=`bun-v${S}`}}let c=a??e,l=encodeURIComponent(c),A=encodeURIComponent(r??NC()),u=encodeURIComponent(B5(r??NC(),n??process.arch,c)),d=encodeURIComponent(I5(r??NC(),n??process.arch,i,c)===!1?"-baseline":""),f=encodeURIComponent(s===!0?"-profile":""),{href:m}=new URL(`${l}/bun-${A}-${u}${d}${f}.zip`,"https://github.com/oven-sh/bun/releases/download/");return m}o(PHe,"getSemverDownloadUrl");var N5=require("node:process");var x5=o(async t=>{let e=(0,sA.join)((0,N5.cwd)(),"bunfig.toml");c5(e,t.registries);let r=await b5(t),n=OHe(t),i=(0,sA.join)((0,Q5.homedir)(),".bun","bin");try{(0,qn.mkdirSync)(i,{recursive:!0})}catch(d){if(d.code!=="EEXIST")throw d}(0,zi.addPath)(i);let s=o(d=>process.platform==="win32"?`${d}.exe`:d,"exe"),a=(0,sA.join)(i,s("bun"));try{(0,qn.symlinkSync)(a,(0,sA.join)(i,s("bunx")))}catch(d){if(d.code!=="EEXIST")throw d}let c,l=!1;if(!t.customUrl&&(0,qn.existsSync)(a)){let d=await Y_(a);d&&DHe(d,t.version)&&(c=d,l=!0,(0,zi.info)(`Using existing Bun installation: ${c}`))}if(!c){if(n){let d=m5(r);if(await(0,xC.restoreCache)([a],d))if(c=await Y_(a),c){let m=g5(r),[C]=c.split("+");m?C!==m?((0,zi.warning)(`Cached Bun version ${c} does not match expected version ${m}. Re-downloading.`),c=void 0):(l=!0,(0,zi.info)(`Using a cached version of Bun: ${c}`)):((0,zi.warning)(`Could not parse expected version from URL: ${r}. Ignoring cache.`),c=void 0)}else(0,zi.warning)(`Found a cached version of Bun: ${c} (but it appears to be corrupted?)`)}l||((0,zi.info)(`Downloading a new version of Bun: ${r}`),c=await THe(r,a))}if(!c)throw new Error("Downloaded a new version of Bun, but failed to check its version? Try again.");let[A]=c.split("+");return(0,w5.saveState)("cache",JSON.stringify({cacheEnabled:n,cacheHit:l,bunPath:a,url:r})),{version:A,revision:c,bunPath:a,url:r,cacheHit:l}},"default");function DHe(t,e){if(!e||/^(latest|canary|action)$/i.test(e))return!1;let[r]=t.split("+"),n=o(i=>i.replace(/^v/i,""),"normalizeVersion");return n(r)===n(e)}o(DHe,"isVersionMatch");async function THe(t,e){let r=C5(await(0,Rd.downloadTool)(t),".zip"),n=await(0,Rd.extractZip)(r),i=await G_(n);try{(0,qn.renameSync)(i,e)}catch{(0,qn.copyFileSync)(i,e)}return await Y_(e)}o(THe,"downloadBun");function OHe(t){let{customUrl:e,version:r,noCache:n}=t;return n||e||!r||/latest|canary|action/i.test(r)?!1:(0,xC.isFeatureAvailable)()}o(OHe,"isCacheEnabled");async function G_(t){for(let e of(0,qn.readdirSync)(t,{withFileTypes:!0})){let{name:r}=e,n=(0,sA.join)(t,r);if(e.isFile()){if(r==="bun"||r==="bun.exe")return n;if(/^bun.*\.zip/.test(r)){let i=await(0,Rd.extractZip)(n);return G_(i)}}if(/^bun/.test(r)&&e.isDirectory())return G_(n)}throw new Error("Could not find executable: bun")}o(G_,"extractBun");async function Y_(t){let e=await(0,j_.getExecOutput)(t,["--revision"],{ignoreReturnCode:!0});if(e.exitCode===0&&/^\d+\.\d+\.\d+/.test(e.stdout))return e.stdout.trim();let r=await(0,j_.getExecOutput)(t,["--version"],{ignoreReturnCode:!0});if(r.exitCode===0&&/^\d+\.\d+\.\d+/.test(r.stdout))return r.stdout.trim()}o(Y_,"getRevision");function S5(t){return t?.trim()?t.split(`
|
||||
`).map(e=>e.trim()).filter(Boolean).map(MHe).filter(Boolean):[]}o(S5,"parseRegistries");function MHe(t){let e=t.match(/^(@[a-z0-9-_.]+|[a-z0-9-_.]+(?=:[a-z]+:\/\/)):(.+)$/i);if(e){let r=e[1],n=e[2].trim(),[i,s]=n.split("|",2).map(a=>a?.trim());try{return new URL(i),{url:i,scope:r,...s&&{token:s}}}catch{throw new Error(`Invalid URL in registry configuration: ${i}`)}}else{let[r,n]=t.split("|",2).map(i=>i?.trim());try{return new URL(r),{url:r,scope:"",...n&&{token:n}}}catch{throw new Error(`Invalid URL in registry configuration: ${r}`)}}}o(MHe,"parseLine");process.env.RUNNER_TEMP||(process.env.RUNNER_TEMP=(0,_5.tmpdir)());var v5=S5((0,Vt.getInput)("registries")),R5=(0,Vt.getInput)("registry-url"),kHe=(0,Vt.getInput)("scope");R5&&v5.push({url:R5,scope:kHe,token:"$BUN_AUTH_TOKEN"});x5({version:(0,Vt.getInput)("bun-version")||z_((0,Vt.getInput)("bun-version-file"))||z_("package.json",!0)||void 0,customUrl:(0,Vt.getInput)("bun-download-url")||void 0,registries:v5,noCache:(0,Vt.getBooleanInput)("no-cache")||!1,token:(0,Vt.getInput)("token")}).then(({version:t,revision:e,bunPath:r,url:n,cacheHit:i})=>{(0,Vt.setOutput)("bun-version",t),(0,Vt.setOutput)("bun-revision",e),(0,Vt.setOutput)("bun-path",r),(0,Vt.setOutput)("bun-download-url",n),(0,Vt.setOutput)("cache-hit",i),process.exit(0)}).catch(t=>{(0,Vt.setFailed)(t),process.exit(1)});
|
||||
/*! Bundled license information:
|
||||
|
||||
sax/lib/sax.js:
|
||||
(*! http://mths.be/fromcodepoint v0.1.0 by @mathias *)
|
||||
undici/lib/web/fetch/body.js:
|
||||
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
|
||||
|
||||
mime-db/index.js:
|
||||
(*!
|
||||
* mime-db
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*)
|
||||
|
||||
mime-types/index.js:
|
||||
(*!
|
||||
* mime-types
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*)
|
||||
undici/lib/web/websocket/frame.js:
|
||||
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
||||
*/
|
||||
Generated
-642
@@ -1,642 +0,0 @@
|
||||
{
|
||||
"name": "setup-bun",
|
||||
"version": "2.0.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "setup-bun",
|
||||
"version": "2.0.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@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"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.8.2",
|
||||
"esbuild": "^0.19.2",
|
||||
"prettier": "^2.8.4",
|
||||
"typescript": "^4.9.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/cache": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-4.0.3.tgz",
|
||||
"integrity": "sha512-SvrqFtYJ7I48A/uXNkoJrnukx5weQv1fGquhs3+4nkByZThBH109KTIqj5x/cGV7JGNvb8dLPVywUOqX1fjiXg==",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/cache/node_modules/@actions/glob": {
|
||||
"version": "0.1.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"minimatch": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/core": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz",
|
||||
"integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==",
|
||||
"dependencies": {
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/http-client": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/exec": {
|
||||
"version": "1.1.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/io": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/glob": {
|
||||
"version": "0.4.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.9.1",
|
||||
"minimatch": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/http-client": {
|
||||
"version": "2.1.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tunnel": "^0.0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/io": {
|
||||
"version": "1.1.3",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@actions/tool-cache": {
|
||||
"version": "2.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"@actions/exec": "^1.0.0",
|
||||
"@actions/http-client": "^2.0.1",
|
||||
"@actions/io": "^1.1.1",
|
||||
"semver": "^6.1.0",
|
||||
"uuid": "^3.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/abort-controller": {
|
||||
"version": "1.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/core-auth": {
|
||||
"version": "1.5.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-util": "^1.1.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/core-http": {
|
||||
"version": "3.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-auth": "^1.3.0",
|
||||
"@azure/core-tracing": "1.0.0-preview.13",
|
||||
"@azure/core-util": "^1.1.1",
|
||||
"@azure/logger": "^1.0.0",
|
||||
"@types/node-fetch": "^2.5.0",
|
||||
"@types/tunnel": "^0.0.3",
|
||||
"form-data": "^4.0.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"process": "^0.11.10",
|
||||
"tslib": "^2.2.0",
|
||||
"tunnel": "^0.0.6",
|
||||
"uuid": "^8.3.0",
|
||||
"xml2js": "^0.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/core-http/node_modules/form-data": {
|
||||
"version": "4.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"mime-types": "^2.1.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/core-http/node_modules/uuid": {
|
||||
"version": "8.3.2",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "dist/bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/core-lro": {
|
||||
"version": "2.5.4",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-util": "^1.2.0",
|
||||
"@azure/logger": "^1.0.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/core-paging": {
|
||||
"version": "1.5.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/core-tracing": {
|
||||
"version": "1.0.0-preview.13",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@opentelemetry/api": "^1.0.1",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/core-util": {
|
||||
"version": "1.4.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/logger": {
|
||||
"version": "1.0.4",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/ms-rest-js": {
|
||||
"version": "2.7.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@azure/core-auth": "^1.1.4",
|
||||
"abort-controller": "^3.0.0",
|
||||
"form-data": "^2.5.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"tslib": "^1.10.0",
|
||||
"tunnel": "0.0.6",
|
||||
"uuid": "^8.3.2",
|
||||
"xml2js": "^0.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/ms-rest-js/node_modules/tslib": {
|
||||
"version": "1.14.1",
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/@azure/ms-rest-js/node_modules/uuid": {
|
||||
"version": "8.3.2",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "dist/bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/@azure/storage-blob": {
|
||||
"version": "12.15.0",
|
||||
"license": "MIT",
|
||||
"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"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-arm64": {
|
||||
"version": "0.19.2",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@opentelemetry/api": {
|
||||
"version": "1.5.0",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@protobuf-ts/plugin": {
|
||||
"version": "2.9.6",
|
||||
"resolved": "https://registry.npmjs.org/@protobuf-ts/plugin/-/plugin-2.9.6.tgz",
|
||||
"integrity": "sha512-Wpv5rkXeu6E5Y4r0TjWE0bzRGddiTYl/RM+tLgVlS0r8CqOBqNAmlWv+s8ltf/F75rVrahUal0cpyhFwha9GRA==",
|
||||
"dependencies": {
|
||||
"@protobuf-ts/plugin-framework": "^2.9.6",
|
||||
"@protobuf-ts/protoc": "^2.9.6",
|
||||
"@protobuf-ts/runtime": "^2.9.6",
|
||||
"@protobuf-ts/runtime-rpc": "^2.9.6",
|
||||
"typescript": "^3.9"
|
||||
},
|
||||
"bin": {
|
||||
"protoc-gen-dump": "bin/protoc-gen-dump",
|
||||
"protoc-gen-ts": "bin/protoc-gen-ts"
|
||||
}
|
||||
},
|
||||
"node_modules/@protobuf-ts/plugin-framework": {
|
||||
"version": "2.9.6",
|
||||
"resolved": "https://registry.npmjs.org/@protobuf-ts/plugin-framework/-/plugin-framework-2.9.6.tgz",
|
||||
"integrity": "sha512-w7A1RXrDCiVzcaRE6YJP7FCARuAFe/Vc4SNQnHAi4CF0V6mEtyjAYEIC5BNYgIRaJEqB26zzsBQjIem3R02SCA==",
|
||||
"dependencies": {
|
||||
"@protobuf-ts/runtime": "^2.9.6",
|
||||
"typescript": "^3.9"
|
||||
}
|
||||
},
|
||||
"node_modules/@protobuf-ts/plugin-framework/node_modules/typescript": {
|
||||
"version": "3.9.10",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
|
||||
"integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@protobuf-ts/plugin/node_modules/typescript": {
|
||||
"version": "3.9.10",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
|
||||
"integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@protobuf-ts/protoc": {
|
||||
"version": "2.9.6",
|
||||
"resolved": "https://registry.npmjs.org/@protobuf-ts/protoc/-/protoc-2.9.6.tgz",
|
||||
"integrity": "sha512-c0XvAPDIBAovH9HxV8gBv8gzOTreQIqibcusrB1+DxvFiSvy+2V1tjbUmG5gJEbjk3aAOaoj0a3+QuE+P28xUw==",
|
||||
"bin": {
|
||||
"protoc": "protoc.js"
|
||||
}
|
||||
},
|
||||
"node_modules/@protobuf-ts/runtime": {
|
||||
"version": "2.9.6",
|
||||
"resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.9.6.tgz",
|
||||
"integrity": "sha512-C0CfpKx4n4LBbUrajOdRj2BTbd3qBoK0SiKWLq7RgCoU6xiN4wesBMFHUOBp3fFzKeZwgU8Q2KtzaqzIvPLRXg=="
|
||||
},
|
||||
"node_modules/@protobuf-ts/runtime-rpc": {
|
||||
"version": "2.9.6",
|
||||
"resolved": "https://registry.npmjs.org/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.9.6.tgz",
|
||||
"integrity": "sha512-0UeqDRzNxgsh08lY5eWzFJNfD3gZ8Xf+WG1HzbIAbVAigzigwjwsYNNhTeas5H3gco1U5owTzCg177aambKOOw==",
|
||||
"dependencies": {
|
||||
"@protobuf-ts/runtime": "^2.9.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.1.tgz",
|
||||
"integrity": "sha512-HhmzZh5LSJNS5O8jQKpJ/3ZcrrlG6L70hpGqMIAoM9YVD0YBRNWYsfwcXq8VnSjlNpCpgLzMXdiPo+dxcvSmiA==",
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node-fetch": {
|
||||
"version": "2.6.4",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"form-data": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node-fetch/node_modules/form-data": {
|
||||
"version": "3.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"mime-types": "^2.1.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/tunnel": {
|
||||
"version": "0.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"event-target-shim": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.5"
|
||||
}
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.19.2",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"esbuild": "bin/esbuild"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@esbuild/android-arm": "0.19.2",
|
||||
"@esbuild/android-arm64": "0.19.2",
|
||||
"@esbuild/android-x64": "0.19.2",
|
||||
"@esbuild/darwin-arm64": "0.19.2",
|
||||
"@esbuild/darwin-x64": "0.19.2",
|
||||
"@esbuild/freebsd-arm64": "0.19.2",
|
||||
"@esbuild/freebsd-x64": "0.19.2",
|
||||
"@esbuild/linux-arm": "0.19.2",
|
||||
"@esbuild/linux-arm64": "0.19.2",
|
||||
"@esbuild/linux-ia32": "0.19.2",
|
||||
"@esbuild/linux-loong64": "0.19.2",
|
||||
"@esbuild/linux-mips64el": "0.19.2",
|
||||
"@esbuild/linux-ppc64": "0.19.2",
|
||||
"@esbuild/linux-riscv64": "0.19.2",
|
||||
"@esbuild/linux-s390x": "0.19.2",
|
||||
"@esbuild/linux-x64": "0.19.2",
|
||||
"@esbuild/netbsd-x64": "0.19.2",
|
||||
"@esbuild/openbsd-x64": "0.19.2",
|
||||
"@esbuild/sunos-x64": "0.19.2",
|
||||
"@esbuild/win32-arm64": "0.19.2",
|
||||
"@esbuild/win32-ia32": "0.19.2",
|
||||
"@esbuild/win32-x64": "0.19.2"
|
||||
}
|
||||
},
|
||||
"node_modules/event-target-shim": {
|
||||
"version": "5.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/events": {
|
||||
"version": "3.3.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.8.x"
|
||||
}
|
||||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "2.5.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.6",
|
||||
"mime-types": "^2.1.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.12"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.52.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.35",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.52.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.8",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/node-fetch": {
|
||||
"version": "2.7.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "4.x || >=6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"encoding": "^0.1.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"encoding": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.8.8",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/process": {
|
||||
"version": "0.11.10",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sax": {
|
||||
"version": "1.2.4",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "6.3.1",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
}
|
||||
},
|
||||
"node_modules/tr46": {
|
||||
"version": "0.0.3",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.6.2",
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
"version": "0.0.6",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.9.5",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "5.26.5",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"license": "BSD-2-Clause"
|
||||
},
|
||||
"node_modules/whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/xml2js": {
|
||||
"version": "0.5.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"sax": ">=0.6.0",
|
||||
"xmlbuilder": "~11.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/xmlbuilder": {
|
||||
"version": "11.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+19
-13
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "setup-bun",
|
||||
"version": "2.0.2",
|
||||
"version": "2.2.0",
|
||||
"description": "Setup Bun on GitHub Actions.",
|
||||
"keywords": [
|
||||
"bun",
|
||||
@@ -18,24 +18,30 @@
|
||||
"author": "xHyroM",
|
||||
"scripts": {
|
||||
"format": "prettier --write src *.yml *.json *.md",
|
||||
"build": "esbuild --target=node20 --outfile=dist/setup/index.js --bundle --keep-names --minify --platform=node --format=cjs src/index.ts && esbuild --target=node20 --outfile=dist/cache-save/index.js --bundle --keep-names --minify --platform=node --format=cjs src/cache-save.ts",
|
||||
"build": "esbuild --target=node24 --outfile=dist/setup/index.js --bundle --keep-names --minify --platform=node --format=cjs src/index.ts && esbuild --target=node24 --outfile=dist/cache-save/index.js --bundle --keep-names --minify --platform=node --format=cjs src/cache-save.ts",
|
||||
"start": "npm run build && node dist/setup/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@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"
|
||||
"@actions/cache": "^5.0.5",
|
||||
"@actions/core": "^2.0.3",
|
||||
"@actions/exec": "^2.0.0",
|
||||
"@actions/glob": "^0.5.0",
|
||||
"@actions/io": "^2.0.0",
|
||||
"@actions/tool-cache": "^3.0.0",
|
||||
"@iarna/toml": "^2.2.5",
|
||||
"compare-versions": "^6.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.8.2",
|
||||
"esbuild": "^0.19.2",
|
||||
"prettier": "^2.8.4",
|
||||
"@types/bun": "^1.3.10",
|
||||
"@types/node": "^24.0.0",
|
||||
"esbuild": "^0.19.12",
|
||||
"prettier": "^3.8.1",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
"prettier": {
|
||||
"quoteProps": "preserve"
|
||||
"patchedDependencies": {
|
||||
"compare-versions@6.1.1": "patches/compare-versions@6.1.1.patch"
|
||||
},
|
||||
"overrides": {
|
||||
"form-data": "^4.0.4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
diff --git a/lib/esm/satisfies.js b/lib/esm/satisfies.js
|
||||
index 7586b71657332f855431c4dd4f05e9394fd9aac3..a6ec29bfc98907c67ed4af71fca73bd8bff88798 100644
|
||||
--- a/lib/esm/satisfies.js
|
||||
+++ b/lib/esm/satisfies.js
|
||||
@@ -40,8 +40,9 @@ export const satisfies = (version, range) => {
|
||||
// else range of either "~" or "^" is assumed
|
||||
const [v1, v2, v3, , vp] = validateAndParse(version);
|
||||
const [r1, r2, r3, , rp] = validateAndParse(range);
|
||||
- const v = [v1, v2, v3];
|
||||
+ const v = [v1, v2 !== null && v2 !== void 0 ? v2 : 'x', v3 !== null && v3 !== void 0 ? v3 : 'x'];
|
||||
const r = [r1, r2 !== null && r2 !== void 0 ? r2 : 'x', r3 !== null && r3 !== void 0 ? r3 : 'x'];
|
||||
+
|
||||
// validate pre-release
|
||||
if (rp) {
|
||||
if (!vp)
|
||||
diff --git a/lib/esm/utils.js b/lib/esm/utils.js
|
||||
index b5cc8b9927ab38fc67032c133b531e95ec4cec15..ec56105fd2d806aa922f1488a27b02c56aff1865 100644
|
||||
--- a/lib/esm/utils.js
|
||||
+++ b/lib/esm/utils.js
|
||||
@@ -28,7 +28,7 @@ const compareStrings = (a, b) => {
|
||||
};
|
||||
export const compareSegments = (a, b) => {
|
||||
for (let i = 0; i < Math.max(a.length, b.length); i++) {
|
||||
- const r = compareStrings(a[i] || '0', b[i] || '0');
|
||||
+ const r = compareStrings(a[i] || 'x', b[i] || 'x');
|
||||
if (r !== 0)
|
||||
return r;
|
||||
}
|
||||
diff --git a/lib/umd/index.js b/lib/umd/index.js
|
||||
index 2cfef261bca520e21ed41fc14950732b8aa6339b..1059784db86635f3aaaba83b5a72c5015e1d8490 100644
|
||||
--- a/lib/umd/index.js
|
||||
+++ b/lib/umd/index.js
|
||||
@@ -152,7 +152,7 @@
|
||||
// else range of either "~" or "^" is assumed
|
||||
const [v1, v2, v3, , vp] = validateAndParse(version);
|
||||
const [r1, r2, r3, , rp] = validateAndParse(range);
|
||||
- const v = [v1, v2, v3];
|
||||
+ const v = [v1, v2 !== null && v2 !== void 0 ? v2 : 'x', v3 !== null && v3 !== void 0 ? v3 : 'x'];
|
||||
const r = [r1, r2 !== null && r2 !== void 0 ? r2 : 'x', r3 !== null && r3 !== void 0 ? r3 : 'x'];
|
||||
// validate pre-release
|
||||
if (rp) {
|
||||
diff --git a/package.json b/package.json
|
||||
index b05b3daf706d7ba4e594233f8791fc3007a8e2cd..e51e76b86f95e9ebf0b5dba3b82aeb119628528d 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -26,7 +26,7 @@
|
||||
"prepublishOnly": "npm run build",
|
||||
"test": "c8 --reporter=lcov mocha"
|
||||
},
|
||||
- "main": "./lib/umd/index.js",
|
||||
+ "main": "./lib/src/index.ts",
|
||||
"module": "./lib/esm/index.js",
|
||||
"types": "./lib/esm/index.d.ts",
|
||||
"sideEffects": false,
|
||||
diff --git a/src/satisfies.ts b/src/satisfies.ts
|
||||
index 66cb171d7f32e68fdda6929d2da223b97a053737..6b4973f037843f264338a01efdc4ace5dcf042cd 100644
|
||||
--- a/src/satisfies.ts
|
||||
+++ b/src/satisfies.ts
|
||||
@@ -43,7 +43,7 @@ export const satisfies = (version: string, range: string): boolean => {
|
||||
// else range of either "~" or "^" is assumed
|
||||
const [v1, v2, v3, , vp] = validateAndParse(version);
|
||||
const [r1, r2, r3, , rp] = validateAndParse(range);
|
||||
- const v = [v1, v2, v3];
|
||||
+ const v = [v1, v2 ?? 'x', v3 ?? 'x'];
|
||||
const r = [r1, r2 ?? 'x', r3 ?? 'x'];
|
||||
|
||||
// validate pre-release
|
||||
+78
-44
@@ -1,4 +1,3 @@
|
||||
import { createHash } from "node:crypto";
|
||||
import { homedir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import {
|
||||
@@ -7,14 +6,18 @@ import {
|
||||
symlinkSync,
|
||||
renameSync,
|
||||
copyFileSync,
|
||||
existsSync,
|
||||
} from "node:fs";
|
||||
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 { Registry } from "./registry";
|
||||
import { writeBunfig } from "./bunfig";
|
||||
import { saveState } from "@actions/core";
|
||||
import { addExtension, retry } from "./utils";
|
||||
import { addExtension, extractVersionFromUrl, getCacheKey } from "./utils";
|
||||
import { getDownloadUrl } from "./download-url";
|
||||
import { cwd } from "node:process";
|
||||
|
||||
export type Input = {
|
||||
customUrl?: string;
|
||||
@@ -23,9 +26,9 @@ export type Input = {
|
||||
arch?: string;
|
||||
avx2?: boolean;
|
||||
profile?: boolean;
|
||||
scope?: string;
|
||||
registryUrl?: string;
|
||||
registries?: Registry[];
|
||||
noCache?: boolean;
|
||||
token?: string;
|
||||
};
|
||||
|
||||
export type Output = {
|
||||
@@ -44,10 +47,10 @@ 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 url = await getDownloadUrl(options);
|
||||
const cacheEnabled = isCacheEnabled(options);
|
||||
|
||||
const binPath = join(homedir(), ".bun", "bin");
|
||||
@@ -73,32 +76,58 @@ export default async (options: Input): Promise<Output> => {
|
||||
|
||||
let revision: string | undefined;
|
||||
let cacheHit = false;
|
||||
if (cacheEnabled) {
|
||||
const cacheKey = createHash("sha1").update(url).digest("base64");
|
||||
|
||||
const cacheRestored = await restoreCache([bunPath], cacheKey);
|
||||
if (cacheRestored) {
|
||||
revision = await getRevision(bunPath);
|
||||
if (revision) {
|
||||
cacheHit = true;
|
||||
info(`Using a cached version of Bun: ${revision}`);
|
||||
} else {
|
||||
warning(
|
||||
`Found a cached version of Bun: ${revision} (but it appears to be corrupted?)`
|
||||
);
|
||||
}
|
||||
// Check if Bun executable already exists and matches requested version
|
||||
if (!options.customUrl && existsSync(bunPath)) {
|
||||
const existingRevision = await getRevision(bunPath);
|
||||
if (existingRevision && isVersionMatch(existingRevision, options.version)) {
|
||||
revision = existingRevision;
|
||||
cacheHit = true; // Treat as cache hit to avoid unnecessary network requests
|
||||
info(`Using existing Bun installation: ${revision}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (!cacheHit) {
|
||||
info(`Downloading a new version of Bun: ${url}`);
|
||||
// TODO: remove this, temporary fix for https://github.com/oven-sh/setup-bun/issues/73
|
||||
revision = await retry(async () => await downloadBun(url, bunPath), 3);
|
||||
if (!revision) {
|
||||
if (cacheEnabled) {
|
||||
const cacheKey = getCacheKey(url);
|
||||
|
||||
const cacheRestored = await restoreCache([bunPath], cacheKey);
|
||||
if (cacheRestored) {
|
||||
revision = await getRevision(bunPath);
|
||||
if (revision) {
|
||||
const expectedVersion = extractVersionFromUrl(url);
|
||||
const [actualVersion] = revision.split("+");
|
||||
if (!expectedVersion) {
|
||||
warning(
|
||||
`Could not parse expected version from URL: ${url}. Ignoring cache.`,
|
||||
);
|
||||
revision = undefined;
|
||||
} else if (actualVersion !== expectedVersion) {
|
||||
warning(
|
||||
`Cached Bun version ${revision} does not match expected version ${expectedVersion}. Re-downloading.`,
|
||||
);
|
||||
revision = undefined;
|
||||
} else {
|
||||
cacheHit = true;
|
||||
info(`Using a cached version of Bun: ${revision}`);
|
||||
}
|
||||
} else {
|
||||
warning(
|
||||
`Found a cached version of Bun: ${revision} (but it appears to be corrupted?)`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!cacheHit) {
|
||||
info(`Downloading a new version of Bun: ${url}`);
|
||||
revision = await downloadBun(url, bunPath);
|
||||
}
|
||||
}
|
||||
|
||||
if (!revision) {
|
||||
throw new Error(
|
||||
"Downloaded a new version of Bun, but failed to check its version? Try again."
|
||||
"Downloaded a new version of Bun, but failed to check its version? Try again.",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -122,9 +151,32 @@ export default async (options: Input): Promise<Output> => {
|
||||
};
|
||||
};
|
||||
|
||||
function isVersionMatch(
|
||||
existingRevision: string,
|
||||
requestedVersion?: string,
|
||||
): boolean {
|
||||
// If no version specified, default is "latest" - don't match existing
|
||||
if (!requestedVersion) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Non-pinned versions should never match existing installations
|
||||
if (/^(latest|canary|action)$/i.test(requestedVersion)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const [existingVersion] = existingRevision.split("+");
|
||||
|
||||
const normalizeVersion = (v: string) => v.replace(/^v/i, "");
|
||||
|
||||
return (
|
||||
normalizeVersion(existingVersion) === normalizeVersion(requestedVersion)
|
||||
);
|
||||
}
|
||||
|
||||
async function downloadBun(
|
||||
url: string,
|
||||
bunPath: string
|
||||
bunPath: string,
|
||||
): Promise<string | undefined> {
|
||||
// Workaround for https://github.com/oven-sh/setup-bun/issues/79 and https://github.com/actions/toolkit/issues/1179
|
||||
const zipPath = addExtension(await downloadTool(url), ".zip");
|
||||
@@ -155,24 +207,6 @@ function isCacheEnabled(options: Input): boolean {
|
||||
return isFeatureAvailable();
|
||||
}
|
||||
|
||||
function getDownloadUrl(options: Input): string {
|
||||
const { customUrl } = options;
|
||||
if (customUrl) {
|
||||
return customUrl;
|
||||
}
|
||||
const { version, os, arch, avx2, profile } = options;
|
||||
const eversion = encodeURIComponent(version ?? "latest");
|
||||
const eos = encodeURIComponent(os ?? process.platform);
|
||||
const earch = encodeURIComponent(arch ?? process.arch);
|
||||
const eavx2 = encodeURIComponent(avx2 ?? true);
|
||||
const eprofile = encodeURIComponent(profile ?? false);
|
||||
const { href } = new URL(
|
||||
`${eversion}/${eos}/${earch}?avx2=${eavx2}&profile=${eprofile}`,
|
||||
"https://bun.sh/download/"
|
||||
);
|
||||
return href;
|
||||
}
|
||||
|
||||
async function extractBun(path: string): Promise<string> {
|
||||
for (const entry of readdirSync(path, { withFileTypes: true })) {
|
||||
const { name } = entry;
|
||||
|
||||
+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" });
|
||||
}
|
||||
+2
-3
@@ -1,12 +1,11 @@
|
||||
import { saveCache } from "@actions/cache";
|
||||
import { getState, warning } from "@actions/core";
|
||||
import { CacheState } from "./action";
|
||||
import { createHash } from "node:crypto";
|
||||
|
||||
import { getCacheKey } from "./utils";
|
||||
(async () => {
|
||||
const state: CacheState = JSON.parse(getState("cache"));
|
||||
if (state.cacheEnabled && !state.cacheHit) {
|
||||
const cacheKey = createHash("sha1").update(state.url).digest("base64");
|
||||
const cacheKey = getCacheKey(state.url);
|
||||
|
||||
try {
|
||||
await saveCache([state.bunPath], cacheKey);
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
import {
|
||||
compareVersions,
|
||||
satisfies,
|
||||
validate,
|
||||
validateStrict,
|
||||
} from "compare-versions";
|
||||
import { Input } from "./action";
|
||||
import { getArchitecture, getAvx2, getPlatform, request } from "./utils";
|
||||
|
||||
export async function getDownloadUrl(options: Input): Promise<string> {
|
||||
const { customUrl } = options;
|
||||
if (customUrl) {
|
||||
return customUrl;
|
||||
}
|
||||
|
||||
return await getSemverDownloadUrl(options);
|
||||
}
|
||||
|
||||
async function getSemverDownloadUrl(options: Input): Promise<string> {
|
||||
const { version, os, arch, avx2, profile } = options;
|
||||
let tag: string | undefined;
|
||||
|
||||
if (validateStrict(version)) {
|
||||
tag = `bun-v${version}`;
|
||||
}
|
||||
|
||||
if (!tag) {
|
||||
const res = (await (
|
||||
await request("https://api.github.com/repos/oven-sh/bun/git/refs/tags", {
|
||||
headers: options.token
|
||||
? { "Authorization": `Bearer ${options.token}` }
|
||||
: {},
|
||||
})
|
||||
).json()) as { ref: string }[];
|
||||
|
||||
let tags = res
|
||||
.filter(
|
||||
(tag) =>
|
||||
tag.ref.startsWith("refs/tags/bun-v") ||
|
||||
tag.ref === "refs/tags/canary",
|
||||
)
|
||||
.map((item) => item.ref.replace(/refs\/tags\/(bun-v)?/g, ""))
|
||||
.filter(Boolean);
|
||||
|
||||
tag = tags.find((t) => t === version);
|
||||
if (!tag) {
|
||||
tags = tags.filter((t) => validate(t)).sort(compareVersions);
|
||||
|
||||
const matchedTag =
|
||||
version === "latest" || !version
|
||||
? tags.at(-1)
|
||||
: tags.filter((t) => satisfies(t, version)).at(-1);
|
||||
|
||||
if (!matchedTag) {
|
||||
throw new Error(`No Bun release found matching version '${version}'`);
|
||||
}
|
||||
|
||||
tag = `bun-v${matchedTag}`;
|
||||
} else if (validate(tag)) {
|
||||
tag = `bun-v${tag}`;
|
||||
}
|
||||
}
|
||||
|
||||
const resolvedTag = tag ?? version;
|
||||
const eversion = encodeURIComponent(resolvedTag);
|
||||
const eos = encodeURIComponent(os ?? getPlatform());
|
||||
const earch = encodeURIComponent(
|
||||
getArchitecture(os ?? getPlatform(), arch ?? process.arch, resolvedTag),
|
||||
);
|
||||
const eavx2 = encodeURIComponent(
|
||||
getAvx2(os ?? getPlatform(), arch ?? process.arch, avx2, resolvedTag) ===
|
||||
false
|
||||
? "-baseline"
|
||||
: "",
|
||||
);
|
||||
const eprofile = encodeURIComponent(profile === true ? "-profile" : "");
|
||||
|
||||
const { href } = new URL(
|
||||
`${eversion}/bun-${eos}-${earch}${eavx2}${eprofile}.zip`,
|
||||
"https://github.com/oven-sh/bun/releases/download/",
|
||||
);
|
||||
|
||||
return href;
|
||||
}
|
||||
+18
-2
@@ -2,20 +2,36 @@ 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")) ||
|
||||
readVersionFromFile("package.json", true) ||
|
||||
undefined,
|
||||
customUrl: getInput("bun-download-url") || undefined,
|
||||
registryUrl: getInput("registry-url") || undefined,
|
||||
scope: getInput("scope") || undefined,
|
||||
registries: registries,
|
||||
noCache: getBooleanInput("no-cache") || false,
|
||||
token: getInput("token"),
|
||||
})
|
||||
.then(({ version, revision, bunPath, url, cacheHit }) => {
|
||||
setOutput("bun-version", version);
|
||||
|
||||
@@ -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}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
+120
-18
@@ -1,21 +1,43 @@
|
||||
import { debug, warning } from "@actions/core";
|
||||
import { info } from "node:console";
|
||||
import { createHash } from "node:crypto";
|
||||
import { existsSync, readFileSync, renameSync } from "node:fs";
|
||||
import { resolve, basename } from "node:path";
|
||||
import { compareVersions, validate } from "compare-versions";
|
||||
|
||||
export function retry<T>(
|
||||
fn: () => Promise<T>,
|
||||
retries: number,
|
||||
timeout = 10000
|
||||
): Promise<T> {
|
||||
return fn().catch((err) => {
|
||||
if (retries <= 0) {
|
||||
throw err;
|
||||
}
|
||||
return new Promise((resolve) => setTimeout(resolve, timeout)).then(() =>
|
||||
retry(fn, retries - 1, timeout)
|
||||
);
|
||||
// First Bun version that ships native Windows ARM64 binaries.
|
||||
const WINDOWS_ARM64_MIN_VERSION = "1.3.10";
|
||||
|
||||
export function getCacheKey(url: string): string {
|
||||
return `bun-${createHash("sha1").update(url).digest("base64")}`;
|
||||
}
|
||||
|
||||
export function extractVersionFromUrl(url: string): string | undefined {
|
||||
const match = url.match(/\/bun-v([^/]+)\//);
|
||||
return match?.[1];
|
||||
}
|
||||
|
||||
export async function request(
|
||||
url: string,
|
||||
init?: RequestInit,
|
||||
): Promise<Response> {
|
||||
const headers = new Headers(init?.headers);
|
||||
if (!headers.has("User-Agent")) {
|
||||
headers.set("User-Agent", "@oven-sh/setup-bun");
|
||||
}
|
||||
|
||||
const res = await fetch(url, {
|
||||
...init,
|
||||
headers,
|
||||
});
|
||||
if (!res.ok) {
|
||||
const body = await res.text().catch(() => "");
|
||||
throw new Error(
|
||||
`Failed to fetch url ${url}. (status code: ${res.status}, status text: ${res.statusText})${body ? `\n${body}` : ""}`,
|
||||
);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
export function addExtension(path: string, ext: string): string {
|
||||
@@ -27,16 +49,90 @@ export function addExtension(path: string, ext: string): string {
|
||||
return path;
|
||||
}
|
||||
|
||||
export function getPlatform(): string {
|
||||
const platform = process.platform;
|
||||
if (platform === "win32") return "windows";
|
||||
|
||||
return platform;
|
||||
}
|
||||
|
||||
export function hasNativeWindowsArm64(version?: string): boolean {
|
||||
if (!version) return false;
|
||||
const cleaned = version.replace(/^bun-v/, "");
|
||||
// Non-semver versions like "canary" represent latest builds which ship ARM64.
|
||||
if (!validate(cleaned)) return true;
|
||||
return compareVersions(cleaned, WINDOWS_ARM64_MIN_VERSION) >= 0;
|
||||
}
|
||||
|
||||
export function getArchitecture(
|
||||
os: string,
|
||||
arch: string,
|
||||
version?: string,
|
||||
): string {
|
||||
if (os === "windows" && (arch === "aarch64" || arch === "arm64")) {
|
||||
if (!hasNativeWindowsArm64(version)) {
|
||||
warning(
|
||||
[
|
||||
"⚠️ This version of Bun does not provide native arm64 builds for Windows.",
|
||||
"Using x64 baseline build which will run through Microsoft's x64 emulation layer.",
|
||||
"This may result in reduced performance and potential compatibility issues.",
|
||||
"💡 For best performance, consider using Bun >= 1.3.10, x64 Windows runners, or other platforms with native support.",
|
||||
].join("\n"),
|
||||
);
|
||||
|
||||
return "x64";
|
||||
}
|
||||
}
|
||||
|
||||
if (arch === "arm64") return "aarch64";
|
||||
return arch;
|
||||
}
|
||||
|
||||
export function getAvx2(
|
||||
os: string,
|
||||
arch: string,
|
||||
avx2?: boolean,
|
||||
version?: string,
|
||||
): boolean {
|
||||
// Workaround for absence of arm64 builds on Windows before 1.3.10 (#130)
|
||||
if (os === "windows" && (arch === "aarch64" || arch === "arm64")) {
|
||||
if (!hasNativeWindowsArm64(version)) {
|
||||
return false;
|
||||
}
|
||||
// Native ARM64 builds don't use AVX2 suffix
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check AVX2 support on x64 Linux
|
||||
if (os === "linux" && arch === "x64" && avx2 === undefined) {
|
||||
try {
|
||||
const cpuInfo = readFileSync("/proc/cpuinfo", "utf8");
|
||||
const hasAvx2 = cpuInfo.includes("avx2");
|
||||
return hasAvx2;
|
||||
} catch (error) {
|
||||
warning(`Failed to detect AVX2 support.`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return avx2 ?? true;
|
||||
}
|
||||
|
||||
const FILE_VERSION_READERS = {
|
||||
"package.json": (content: string) =>
|
||||
JSON.parse(content).packageManager?.split("bun@")?.[1],
|
||||
"package.json": (content: string) => {
|
||||
const pkg = JSON.parse(content);
|
||||
return pkg.packageManager?.split("bun@")?.[1] ?? pkg.engines?.bun;
|
||||
},
|
||||
".tool-versions": (content: string) =>
|
||||
content.match(/^bun\s*(?<version>.*?)$/m)?.groups?.version,
|
||||
".bumrc": (content: string) => content, // https://github.com/owenizedd/bum
|
||||
".bun-version": (content: string) => content,
|
||||
};
|
||||
|
||||
export function readVersionFromFile(file: string): string | undefined {
|
||||
export function readVersionFromFile(
|
||||
file: string,
|
||||
silent = false,
|
||||
): string | undefined {
|
||||
const cwd = process.env.GITHUB_WORKSPACE;
|
||||
if (!cwd) {
|
||||
return;
|
||||
@@ -52,7 +148,9 @@ export function readVersionFromFile(file: string): string | undefined {
|
||||
const base = basename(file);
|
||||
|
||||
if (!existsSync(path)) {
|
||||
warning(`File ${path} not found`);
|
||||
if (!silent) {
|
||||
warning(`File ${path} not found`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -63,12 +161,16 @@ export function readVersionFromFile(file: string): string | undefined {
|
||||
output = reader(readFileSync(path, "utf8"))?.trim();
|
||||
|
||||
if (!output) {
|
||||
warning(`Failed to read version from ${file}`);
|
||||
if (!silent) {
|
||||
warning(`Failed to read version from ${file}`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
} catch (error) {
|
||||
const { message } = error as Error;
|
||||
warning(`Failed to read ${file}: ${message}`);
|
||||
if (!silent) {
|
||||
warning(`Failed to read ${file}: ${message}`);
|
||||
}
|
||||
} finally {
|
||||
if (output) {
|
||||
info(`Obtained version ${output} from ${file}`);
|
||||
|
||||
@@ -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,244 @@
|
||||
import { afterEach, beforeEach, describe, expect, it, spyOn } from "bun:test";
|
||||
import { getDownloadUrl } from "../src/download-url";
|
||||
import * as utils from "../src/utils";
|
||||
|
||||
const MOCK_TAGS = [
|
||||
{ ref: "refs/tags/bun-v0.5.0" },
|
||||
{ ref: "refs/tags/bun-v1.0.0" },
|
||||
{ ref: "refs/tags/bun-v1.0.1" },
|
||||
{ ref: "refs/tags/bun-v1.1.0" },
|
||||
{ ref: "refs/tags/bun-v1.3.9" },
|
||||
{ ref: "refs/tags/bun-v1.3.10" },
|
||||
{ ref: "refs/tags/bun-v1.4.0" },
|
||||
{ ref: "refs/tags/canary" },
|
||||
];
|
||||
|
||||
describe("getDownloadUrl", () => {
|
||||
let requestSpy: ReturnType<typeof spyOn>;
|
||||
|
||||
beforeEach(() => {
|
||||
requestSpy = spyOn(utils, "request").mockResolvedValue({
|
||||
json: async () => MOCK_TAGS,
|
||||
} as Response);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
requestSpy.mockRestore();
|
||||
});
|
||||
|
||||
describe("Custom URL", () => {
|
||||
it("should return customUrl if provided", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
customUrl: "https://example.com/bun.zip",
|
||||
});
|
||||
expect(url).toBe("https://example.com/bun.zip");
|
||||
expect(requestSpy).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Optimization (No API Call)", () => {
|
||||
it("should construct URL directly for specific version 1.0.0", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
version: "1.0.0",
|
||||
os: "linux",
|
||||
arch: "x64",
|
||||
});
|
||||
|
||||
expect(url).toBe(
|
||||
"https://github.com/oven-sh/bun/releases/download/bun-v1.0.0/bun-linux-x64.zip",
|
||||
);
|
||||
expect(requestSpy).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
it("should construct URL directly for specific version 0.5.0", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
version: "0.5.0",
|
||||
os: "darwin",
|
||||
arch: "aarch64",
|
||||
});
|
||||
|
||||
expect(url).toBe(
|
||||
"https://github.com/oven-sh/bun/releases/download/bun-v0.5.0/bun-darwin-aarch64.zip",
|
||||
);
|
||||
expect(requestSpy).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
it("should handle avx2=false (baseline) without API call", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
version: "1.1.0",
|
||||
os: "linux",
|
||||
arch: "x64",
|
||||
avx2: false,
|
||||
});
|
||||
|
||||
expect(url).toBe(
|
||||
"https://github.com/oven-sh/bun/releases/download/bun-v1.1.0/bun-linux-x64-baseline.zip",
|
||||
);
|
||||
expect(requestSpy).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
it("should handle profile=true without API call", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
version: "1.1.0",
|
||||
os: "linux",
|
||||
arch: "x64",
|
||||
profile: true,
|
||||
});
|
||||
|
||||
expect(url).toBe(
|
||||
"https://github.com/oven-sh/bun/releases/download/bun-v1.1.0/bun-linux-x64-profile.zip",
|
||||
);
|
||||
expect(requestSpy).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe("API Lookup (Dynamic Versions)", () => {
|
||||
it("should call API and resolve 'latest' to the newest version", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
version: "latest",
|
||||
os: "linux",
|
||||
arch: "x64",
|
||||
});
|
||||
|
||||
expect(url).toBe(
|
||||
"https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-linux-x64.zip",
|
||||
);
|
||||
expect(requestSpy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("should call API and resolve semver range '^1.0.0'", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
version: "^1.0.0",
|
||||
os: "linux",
|
||||
arch: "x64",
|
||||
});
|
||||
|
||||
expect(url).toBe(
|
||||
"https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-linux-x64.zip",
|
||||
);
|
||||
expect(requestSpy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("should call API and resolve 'canary'", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
version: "canary",
|
||||
os: "linux",
|
||||
arch: "x64",
|
||||
});
|
||||
|
||||
expect(url).toBe(
|
||||
"https://github.com/oven-sh/bun/releases/download/canary/bun-linux-x64.zip",
|
||||
);
|
||||
expect(requestSpy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("should throw error if semver range matches nothing", async () => {
|
||||
expect(
|
||||
getDownloadUrl({
|
||||
version: "^2.0.0",
|
||||
os: "linux",
|
||||
arch: "x64",
|
||||
}),
|
||||
).rejects.toThrow("No Bun release found matching version '^2.0.0'");
|
||||
expect(requestSpy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Windows ARM64", () => {
|
||||
it("should use native aarch64 binary for Bun >= 1.3.10", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
version: "1.3.10",
|
||||
os: "windows",
|
||||
arch: "arm64",
|
||||
});
|
||||
|
||||
expect(url).toBe(
|
||||
"https://github.com/oven-sh/bun/releases/download/bun-v1.3.10/bun-windows-aarch64.zip",
|
||||
);
|
||||
expect(requestSpy).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
it("should use native aarch64 binary for Bun 1.4.0", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
version: "1.4.0",
|
||||
os: "windows",
|
||||
arch: "arm64",
|
||||
});
|
||||
|
||||
expect(url).toBe(
|
||||
"https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-windows-aarch64.zip",
|
||||
);
|
||||
expect(requestSpy).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
it("should fall back to x64-baseline for Bun < 1.3.10", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
version: "1.1.0",
|
||||
os: "windows",
|
||||
arch: "arm64",
|
||||
});
|
||||
|
||||
expect(url).toBe(
|
||||
"https://github.com/oven-sh/bun/releases/download/bun-v1.1.0/bun-windows-x64-baseline.zip",
|
||||
);
|
||||
expect(requestSpy).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
it("should fall back to x64-baseline for Bun 1.3.9", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
version: "1.3.9",
|
||||
os: "windows",
|
||||
arch: "arm64",
|
||||
});
|
||||
|
||||
expect(url).toBe(
|
||||
"https://github.com/oven-sh/bun/releases/download/bun-v1.3.9/bun-windows-x64-baseline.zip",
|
||||
);
|
||||
expect(requestSpy).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
it("should use native aarch64 for dynamic version resolving to >= 1.3.10", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
version: "^1.3.0",
|
||||
os: "windows",
|
||||
arch: "arm64",
|
||||
});
|
||||
|
||||
expect(url).toBe(
|
||||
"https://github.com/oven-sh/bun/releases/download/bun-v1.4.0/bun-windows-aarch64.zip",
|
||||
);
|
||||
expect(requestSpy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("should use native aarch64 for canary on Windows ARM64", async () => {
|
||||
const url = await getDownloadUrl({
|
||||
version: "canary",
|
||||
os: "windows",
|
||||
arch: "arm64",
|
||||
});
|
||||
|
||||
expect(url).toBe(
|
||||
"https://github.com/oven-sh/bun/releases/download/canary/bun-windows-aarch64.zip",
|
||||
);
|
||||
expect(requestSpy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Token Handling", () => {
|
||||
it("should pass token to API request when resolving dynamic versions", async () => {
|
||||
await getDownloadUrl({
|
||||
version: "latest",
|
||||
token: "my-secret-token",
|
||||
os: "linux",
|
||||
arch: "x64",
|
||||
});
|
||||
|
||||
expect(requestSpy).toHaveBeenCalledWith(
|
||||
expect.stringContaining("api.github.com"),
|
||||
expect.objectContaining({
|
||||
headers: { Authorization: "Bearer my-secret-token" },
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
import { afterEach, describe, expect, it, spyOn } from "bun:test";
|
||||
import { extractVersionFromUrl, getArchitecture, getAvx2, hasNativeWindowsArm64 } from "../src/utils";
|
||||
import * as core from "@actions/core";
|
||||
|
||||
describe("extractVersionFromUrl", () => {
|
||||
it("should extract version from standard download URL", () => {
|
||||
expect(extractVersionFromUrl("https://github.com/oven-sh/bun/releases/download/bun-v1.3.1/bun-linux-x64.zip")).toBe("1.3.1");
|
||||
expect(extractVersionFromUrl("https://github.com/oven-sh/bun/releases/download/bun-v1.0.0/bun-darwin-aarch64.zip")).toBe("1.0.0");
|
||||
expect(extractVersionFromUrl("https://github.com/oven-sh/bun/releases/download/bun-v0.5.0/bun-linux-x64-baseline.zip")).toBe("0.5.0");
|
||||
});
|
||||
|
||||
it("should extract version from URL with profile suffix", () => {
|
||||
expect(extractVersionFromUrl("https://github.com/oven-sh/bun/releases/download/bun-v1.1.0/bun-linux-x64-profile.zip")).toBe("1.1.0");
|
||||
});
|
||||
|
||||
it("should return undefined for canary URL", () => {
|
||||
expect(extractVersionFromUrl("https://github.com/oven-sh/bun/releases/download/canary/bun-linux-x64.zip")).toBeUndefined();
|
||||
});
|
||||
|
||||
it("should return undefined for custom/non-standard URL", () => {
|
||||
expect(extractVersionFromUrl("https://example.com/bun.zip")).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("hasNativeWindowsArm64", () => {
|
||||
it("should return true for version >= 1.3.10", () => {
|
||||
expect(hasNativeWindowsArm64("bun-v1.3.10")).toBe(true);
|
||||
expect(hasNativeWindowsArm64("bun-v1.3.11")).toBe(true);
|
||||
expect(hasNativeWindowsArm64("bun-v1.4.0")).toBe(true);
|
||||
expect(hasNativeWindowsArm64("bun-v2.0.0")).toBe(true);
|
||||
});
|
||||
|
||||
it("should return false for version < 1.3.10", () => {
|
||||
expect(hasNativeWindowsArm64("bun-v1.3.9")).toBe(false);
|
||||
expect(hasNativeWindowsArm64("bun-v1.2.0")).toBe(false);
|
||||
expect(hasNativeWindowsArm64("bun-v1.0.0")).toBe(false);
|
||||
expect(hasNativeWindowsArm64("bun-v0.5.0")).toBe(false);
|
||||
});
|
||||
|
||||
it("should return true for non-semver versions like canary", () => {
|
||||
expect(hasNativeWindowsArm64("canary")).toBe(true);
|
||||
expect(hasNativeWindowsArm64("latest")).toBe(true);
|
||||
});
|
||||
|
||||
it("should return false for undefined version", () => {
|
||||
expect(hasNativeWindowsArm64(undefined)).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("getArchitecture", () => {
|
||||
let warningSpy: ReturnType<typeof spyOn>;
|
||||
|
||||
afterEach(() => {
|
||||
warningSpy?.mockRestore();
|
||||
});
|
||||
|
||||
it("should return aarch64 for Windows arm64 with Bun >= 1.3.10", () => {
|
||||
warningSpy = spyOn(core, "warning");
|
||||
const result = getArchitecture("windows", "arm64", "bun-v1.3.10");
|
||||
|
||||
expect(result).toBe("aarch64");
|
||||
expect(warningSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should return aarch64 for Windows aarch64 with Bun >= 1.3.10", () => {
|
||||
warningSpy = spyOn(core, "warning");
|
||||
const result = getArchitecture("windows", "aarch64", "bun-v1.4.0");
|
||||
|
||||
expect(result).toBe("aarch64");
|
||||
expect(warningSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should return x64 for Windows arm64 with Bun < 1.3.10", () => {
|
||||
warningSpy = spyOn(core, "warning");
|
||||
const result = getArchitecture("windows", "arm64", "bun-v1.2.0");
|
||||
|
||||
expect(result).toBe("x64");
|
||||
expect(warningSpy).toHaveBeenCalledTimes(1);
|
||||
expect(warningSpy).toHaveBeenCalledWith(
|
||||
expect.stringContaining(
|
||||
"⚠️ This version of Bun does not provide native arm64 builds for Windows."
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
it("should return x64 for Windows aarch64 with Bun < 1.3.10", () => {
|
||||
warningSpy = spyOn(core, "warning");
|
||||
const result = getArchitecture("windows", "aarch64", "bun-v1.0.0");
|
||||
|
||||
expect(result).toBe("x64");
|
||||
expect(warningSpy).toHaveBeenCalledTimes(1);
|
||||
expect(warningSpy).toHaveBeenCalledWith(
|
||||
expect.stringContaining(
|
||||
"⚠️ This version of Bun does not provide native arm64 builds for Windows."
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
it("should return x64 for Windows arm64 with no version (fallback)", () => {
|
||||
warningSpy = spyOn(core, "warning");
|
||||
const result = getArchitecture("windows", "arm64");
|
||||
|
||||
expect(result).toBe("x64");
|
||||
expect(warningSpy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("should return aarch64 for non-Windows platforms with arm64", () => {
|
||||
warningSpy = spyOn(core, "warning");
|
||||
const result = getArchitecture("linux", "arm64");
|
||||
|
||||
expect(result).toBe("aarch64");
|
||||
expect(warningSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should return aarch64 for macOS with arm64", () => {
|
||||
warningSpy = spyOn(core, "warning");
|
||||
const result = getArchitecture("darwin", "arm64");
|
||||
|
||||
expect(result).toBe("aarch64");
|
||||
expect(warningSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should return original arch value for x64", () => {
|
||||
warningSpy = spyOn(core, "warning");
|
||||
const result = getArchitecture("windows", "x64");
|
||||
|
||||
expect(result).toBe("x64");
|
||||
expect(warningSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should return original arch value for x86", () => {
|
||||
warningSpy = spyOn(core, "warning");
|
||||
const result = getArchitecture("linux", "x86");
|
||||
|
||||
expect(result).toBe("x86");
|
||||
expect(warningSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("should return original arch value for aarch64 on Linux", () => {
|
||||
warningSpy = spyOn(core, "warning");
|
||||
const result = getArchitecture("linux", "aarch64");
|
||||
|
||||
expect(result).toBe("aarch64");
|
||||
expect(warningSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe("getAvx2", () => {
|
||||
it("should return false for Windows arm64 with Bun < 1.3.10", () => {
|
||||
expect(getAvx2("windows", "arm64", undefined, "bun-v1.2.0")).toBe(false);
|
||||
});
|
||||
|
||||
it("should return false for Windows aarch64 with Bun < 1.3.10", () => {
|
||||
expect(getAvx2("windows", "aarch64", undefined, "bun-v1.0.0")).toBe(false);
|
||||
});
|
||||
|
||||
it("should return false for Windows arm64 with no version (fallback)", () => {
|
||||
expect(getAvx2("windows", "arm64")).toBe(false);
|
||||
});
|
||||
|
||||
it("should return false for Windows aarch64 with no version (fallback)", () => {
|
||||
expect(getAvx2("windows", "aarch64")).toBe(false);
|
||||
});
|
||||
|
||||
it("should return true for Windows arm64 with Bun >= 1.3.10", () => {
|
||||
expect(getAvx2("windows", "arm64", undefined, "bun-v1.3.10")).toBe(true);
|
||||
});
|
||||
|
||||
it("should return true for Windows aarch64 with Bun >= 1.3.10", () => {
|
||||
expect(getAvx2("windows", "aarch64", undefined, "bun-v1.4.0")).toBe(true);
|
||||
});
|
||||
|
||||
it("should return the provided avx2 value (true) when specified and not on Windows ARM64", () => {
|
||||
expect(getAvx2("linux", "x64", true)).toBe(true);
|
||||
expect(getAvx2("darwin", "x64", true)).toBe(true);
|
||||
expect(getAvx2("windows", "x64", true)).toBe(true);
|
||||
});
|
||||
|
||||
it("should return the provided avx2 value (false) when specified and not on Windows ARM64", () => {
|
||||
expect(getAvx2("linux", "x64", false)).toBe(false);
|
||||
expect(getAvx2("darwin", "x64", false)).toBe(false);
|
||||
expect(getAvx2("windows", "x64", false)).toBe(false);
|
||||
});
|
||||
|
||||
it("should return true by default when avx2 is not specified and not on Windows ARM64", () => {
|
||||
// x64 architecture on various platforms
|
||||
expect(getAvx2("linux", "x64")).toBe(true);
|
||||
expect(getAvx2("darwin", "x64")).toBe(true);
|
||||
expect(getAvx2("windows", "x64")).toBe(true);
|
||||
|
||||
// ARM architecture on non-Windows platforms
|
||||
expect(getAvx2("linux", "arm64")).toBe(true);
|
||||
expect(getAvx2("linux", "aarch64")).toBe(true);
|
||||
expect(getAvx2("darwin", "arm64")).toBe(true);
|
||||
expect(getAvx2("darwin", "aarch64")).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user