diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index 6aac1da9..00000000
--- a/.eslintignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules/
-lib/
-dist/
\ No newline at end of file
diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index 094d1f95..00000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "env": { "node": true, "jest": true },
- "parser": "@typescript-eslint/parser",
- "parserOptions": { "ecmaVersion": 9, "sourceType": "module" },
- "extends": [
- "eslint:recommended",
- "plugin:import/errors",
- "plugin:import/warnings",
- "plugin:import/typescript",
- "plugin:prettier/recommended"
- ],
- "rules": {
- "@typescript-eslint/no-empty-function": "off"
- },
- "plugins": ["@typescript-eslint", "jest"]
-}
\ No newline at end of file
diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml
index dec03b65..e4525b17 100644
--- a/.github/workflows/check-dist.yml
+++ b/.github/workflows/check-dist.yml
@@ -24,10 +24,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Setup Node 20
+ - name: Setup Node 24
uses: actions/setup-node@v4
with:
- node-version: 20.x
+ node-version: 24.x
cache: 'npm'
- name: Install dependencies
diff --git a/.github/workflows/test-proxy.yml b/.github/workflows/test-proxy.yml
new file mode 100644
index 00000000..f0ad8be3
--- /dev/null
+++ b/.github/workflows/test-proxy.yml
@@ -0,0 +1,114 @@
+name: Test Proxy
+
+on:
+ push:
+ branches:
+ - main
+ paths-ignore:
+ - '**.md'
+ pull_request:
+ paths-ignore:
+ - '**.md'
+
+permissions:
+ contents: read
+
+jobs:
+ # End to end upload with proxy
+ test-proxy-upload:
+ runs-on: ubuntu-latest
+ container:
+ image: ubuntu:latest
+ options: --cap-add=NET_ADMIN
+ services:
+ squid-proxy:
+ image: ubuntu/squid:latest
+ ports:
+ - 3128:3128
+ env:
+ http_proxy: http://squid-proxy:3128
+ https_proxy: http://squid-proxy:3128
+ steps:
+ - name: Wait for proxy to be ready
+ shell: bash
+ run: |
+ echo "Waiting for squid proxy to be ready..."
+ echo "Resolving squid-proxy hostname:"
+ getent hosts squid-proxy || echo "DNS resolution failed"
+ for i in $(seq 1 30); do
+ if (echo > /dev/tcp/squid-proxy/3128) 2>/dev/null; then
+ echo "Proxy is ready!"
+ exit 0
+ fi
+ echo "Attempt $i: Proxy not ready, waiting..."
+ sleep 2
+ done
+ echo "Proxy failed to become ready"
+ exit 1
+ env:
+ http_proxy: ""
+ https_proxy: ""
+ - name: Install dependencies
+ run: |
+ apt-get update
+ apt-get install -y iptables curl
+ - name: Verify proxy is working
+ run: |
+ echo "Testing proxy connectivity..."
+ curl -s -o /dev/null -w "%{http_code}" --proxy http://squid-proxy:3128 http://github.com || true
+ echo "Proxy verification complete"
+ - name: Block direct traffic (enforce proxy usage)
+ run: |
+ # Get the squid-proxy container IP
+ PROXY_IP=$(getent hosts squid-proxy | awk '{ print $1 }')
+ echo "Proxy IP: $PROXY_IP"
+
+ # Allow loopback traffic
+ iptables -A OUTPUT -o lo -j ACCEPT
+
+ # Allow traffic to the proxy container
+ iptables -A OUTPUT -d $PROXY_IP -j ACCEPT
+
+ # Allow established connections
+ iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
+
+ # Allow DNS (needed for initial resolution)
+ iptables -A OUTPUT -p udp --dport 53 -j ACCEPT
+ iptables -A OUTPUT -p tcp --dport 53 -j ACCEPT
+
+ # Block all other outbound traffic (HTTP/HTTPS)
+ iptables -A OUTPUT -p tcp --dport 80 -j REJECT
+ iptables -A OUTPUT -p tcp --dport 443 -j REJECT
+
+ # Log the iptables rules for debugging
+ iptables -L -v -n
+ - name: Verify direct HTTPS is blocked
+ run: |
+ echo "Testing that direct HTTPS requests fail..."
+ if curl --noproxy '*' -s --connect-timeout 5 https://github.com > /dev/null 2>&1; then
+ echo "ERROR: Direct HTTPS request succeeded - blocking is not working!"
+ exit 1
+ else
+ echo "SUCCESS: Direct HTTPS request was blocked as expected"
+ fi
+
+ echo "Testing that HTTPS through proxy succeeds..."
+ if curl --proxy http://squid-proxy:3128 -s --connect-timeout 10 https://github.com > /dev/null 2>&1; then
+ echo "SUCCESS: HTTPS request through proxy succeeded"
+ else
+ echo "ERROR: HTTPS request through proxy failed!"
+ exit 1
+ fi
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Create artifact file
+ run: |
+ mkdir -p test-artifacts
+ echo "Proxy test artifact - $GITHUB_RUN_ID" > test-artifacts/proxy-test.txt
+ echo "Random data: $RANDOM $RANDOM $RANDOM" >> test-artifacts/proxy-test.txt
+ cat test-artifacts/proxy-test.txt
+ - name: Upload artifact through proxy
+ uses: ./
+ with:
+ name: 'Proxy-Test-Artifact-${{ github.run_id }}'
+ path: test-artifacts/proxy-test.txt
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 273baa9c..e0fa2ad6 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -10,6 +10,10 @@ on:
paths-ignore:
- '**.md'
+permissions:
+ contents: read
+ actions: write
+
jobs:
build:
name: Build
@@ -25,10 +29,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- - name: Setup Node 20
+ - name: Setup Node 24
uses: actions/setup-node@v4
with:
- node-version: 20.x
+ node-version: 24.x
cache: 'npm'
- name: Install dependencies
@@ -94,7 +98,7 @@ jobs:
# Download Artifact #1 and verify the correctness of the content
- name: 'Download artifact #1'
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@main
with:
name: 'Artifact-A-${{ matrix.runs-on }}'
path: some/new/path
@@ -114,7 +118,7 @@ jobs:
# Download Artifact #2 and verify the correctness of the content
- name: 'Download artifact #2'
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@main
with:
name: 'Artifact-Wildcard-${{ matrix.runs-on }}'
path: some/other/path
@@ -135,7 +139,7 @@ jobs:
# Download Artifact #4 and verify the correctness of the content
- name: 'Download artifact #4'
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@main
with:
name: 'Multi-Path-Artifact-${{ matrix.runs-on }}'
path: multi/artifact
@@ -155,7 +159,7 @@ jobs:
shell: pwsh
- name: 'Download symlinked artifact'
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@main
with:
name: 'Symlinked-Artifact-${{ matrix.runs-on }}'
path: from/symlink
@@ -196,7 +200,7 @@ jobs:
# Download replaced Artifact #1 and verify the correctness of the content
- name: 'Download artifact #1 again'
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@main
with:
name: 'Artifact-A-${{ matrix.runs-on }}'
path: overwrite/some/new/path
@@ -213,6 +217,101 @@ jobs:
Write-Error "File contents of downloaded artifact are incorrect"
}
shell: pwsh
+
+ # Upload a single file without archiving (direct file upload)
+ - name: 'Create direct upload file'
+ run: echo -n 'direct file upload content' > direct-upload-${{ matrix.runs-on }}.txt
+ shell: bash
+
+ - name: 'Upload direct file artifact'
+ uses: ./
+ with:
+ name: 'Direct-File-${{ matrix.runs-on }}'
+ path: direct-upload-${{ matrix.runs-on }}.txt
+ archive: false
+
+ - name: 'Download direct file artifact'
+ uses: actions/download-artifact@main
+ with:
+ name: direct-upload-${{ matrix.runs-on }}.txt
+ path: direct-download
+
+ - name: 'Verify direct file artifact'
+ run: |
+ $file = "direct-download/direct-upload-${{ matrix.runs-on }}.txt"
+ if(!(Test-Path -path $file))
+ {
+ Write-Error "Expected file does not exist"
+ }
+ if(!((Get-Content $file -Raw).TrimEnd() -ceq "direct file upload content"))
+ {
+ Write-Error "File contents of downloaded artifact are incorrect"
+ }
+ shell: pwsh
+
+ upload-html-report:
+ name: Upload HTML Report
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup Node 24
+ uses: actions/setup-node@v4
+ with:
+ node-version: 24.x
+ cache: 'npm'
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Compile
+ run: npm run build
+
+ - name: Create HTML report
+ run: |
+ cat > report.html << 'EOF'
+
+
+
+
+
+ Artifact Upload Test Report
+
+
+
+ Artifact Upload Test Report
+
+ This HTML file was uploaded as a single un-zipped artifact.
+ If you can see this in the browser, the feature is working correctly!
+
+
+ | Property | Value |
+ | Upload method | archive: false |
+ | Content-Type | text/html |
+ | File | report.html |
+
+ ✔ Single file upload is working!
+
+
+ EOF
+
+ - name: Upload HTML report (no archive)
+ uses: ./
+ with:
+ name: 'test-report'
+ path: report.html
+ archive: false
+
merge:
name: Merge
needs: build
@@ -230,7 +329,7 @@ jobs:
# easier to identify each of the merged artifacts
separate-directories: true
- name: 'Download merged artifacts'
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@main
with:
name: merged-artifacts
path: all-merged-artifacts
@@ -266,7 +365,7 @@ jobs:
# Download merged artifacts and verify the correctness of the content
- name: 'Download merged artifacts'
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@main
with:
name: Merged-Artifact-As
path: merged-artifact-a
@@ -290,3 +389,40 @@ jobs:
}
shell: pwsh
+ cleanup:
+ name: Cleanup Artifacts
+ needs: [build, merge]
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Delete test artifacts
+ uses: actions/github-script@v8
+ with:
+ script: |
+ const keep = ['report.html'];
+ const owner = context.repo.owner;
+ const repo = context.repo.repo;
+ const runId = context.runId;
+
+ const {data: {artifacts}} = await github.rest.actions.listWorkflowRunArtifacts({
+ owner,
+ repo,
+ run_id: runId
+ });
+
+ for (const a of artifacts) {
+ if (keep.includes(a.name)) {
+ console.log(`Keeping artifact '${a.name}'`);
+ continue;
+ }
+ try {
+ await github.rest.actions.deleteArtifact({
+ owner,
+ repo,
+ artifact_id: a.id
+ });
+ console.log(`Deleted artifact '${a.name}'`);
+ } catch (err) {
+ console.log(`Could not delete artifact '${a.name}': ${err.message}`);
+ }
+ }
diff --git a/.gitignore b/.gitignore
index 07c2ef3f..375a5ad5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
node_modules/
lib/
-__tests__/_temp/
\ No newline at end of file
+__tests__/_temp/
+.DS_Store
\ No newline at end of file
diff --git a/.licenses/npm/@actions/artifact.dep.yml b/.licenses/npm/@actions/artifact.dep.yml
index f0e2a630..4976215a 100644
--- a/.licenses/npm/@actions/artifact.dep.yml
+++ b/.licenses/npm/@actions/artifact.dep.yml
@@ -1,6 +1,6 @@
---
name: "@actions/artifact"
-version: 5.0.1
+version: 6.2.0
type: npm
summary: Actions artifact lib
homepage: https://github.com/actions/toolkit/tree/main/packages/artifact
diff --git a/.licenses/npm/@actions/core-1.11.1.dep.yml b/.licenses/npm/@actions/core-1.11.1.dep.yml
deleted file mode 100644
index 09e099f7..00000000
--- a/.licenses/npm/@actions/core-1.11.1.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@actions/core"
-version: 1.11.1
-type: npm
-summary: Actions core lib
-homepage: https://github.com/actions/toolkit/tree/main/packages/core
-license: mit
-licenses:
-- sources: LICENSE.md
- text: |-
- The MIT License (MIT)
-
- Copyright 2019 GitHub
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@actions/core-2.0.1.dep.yml b/.licenses/npm/@actions/core-2.0.1.dep.yml
deleted file mode 100644
index eb49b54d..00000000
--- a/.licenses/npm/@actions/core-2.0.1.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@actions/core"
-version: 2.0.1
-type: npm
-summary: Actions core lib
-homepage: https://github.com/actions/toolkit/tree/main/packages/core
-license: mit
-licenses:
-- sources: LICENSE.md
- text: |-
- The MIT License (MIT)
-
- Copyright 2019 GitHub
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@actions/core.dep.yml b/.licenses/npm/@actions/core.dep.yml
index eb49b54d..33f5fd8d 100644
--- a/.licenses/npm/@actions/core.dep.yml
+++ b/.licenses/npm/@actions/core.dep.yml
@@ -1,6 +1,6 @@
---
name: "@actions/core"
-version: 2.0.1
+version: 3.0.0
type: npm
summary: Actions core lib
homepage: https://github.com/actions/toolkit/tree/main/packages/core
diff --git a/.licenses/npm/@actions/exec-1.1.1.dep.yml b/.licenses/npm/@actions/exec-1.1.1.dep.yml
deleted file mode 100644
index cbc5abd3..00000000
--- a/.licenses/npm/@actions/exec-1.1.1.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@actions/exec"
-version: 1.1.1
-type: npm
-summary: Actions exec lib
-homepage: https://github.com/actions/toolkit/tree/main/packages/exec
-license: mit
-licenses:
-- sources: LICENSE.md
- text: |-
- The MIT License (MIT)
-
- Copyright 2019 GitHub
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@actions/exec-2.0.0.dep.yml b/.licenses/npm/@actions/exec-2.0.0.dep.yml
deleted file mode 100644
index 132d5859..00000000
--- a/.licenses/npm/@actions/exec-2.0.0.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@actions/exec"
-version: 2.0.0
-type: npm
-summary: Actions exec lib
-homepage: https://github.com/actions/toolkit/tree/main/packages/exec
-license: mit
-licenses:
-- sources: LICENSE.md
- text: |-
- The MIT License (MIT)
-
- Copyright 2019 GitHub
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@actions/github.dep.yml b/.licenses/npm/@actions/github.dep.yml
index 68379a27..09817e46 100644
--- a/.licenses/npm/@actions/github.dep.yml
+++ b/.licenses/npm/@actions/github.dep.yml
@@ -1,6 +1,6 @@
---
name: "@actions/github"
-version: 6.0.1
+version: 9.0.0
type: npm
summary: Actions github lib
homepage: https://github.com/actions/toolkit/tree/main/packages/github
diff --git a/.licenses/npm/@actions/glob.dep.yml b/.licenses/npm/@actions/glob.dep.yml
index 0df84784..ae906739 100644
--- a/.licenses/npm/@actions/glob.dep.yml
+++ b/.licenses/npm/@actions/glob.dep.yml
@@ -1,9 +1,9 @@
---
name: "@actions/glob"
-version: 0.5.0
+version: 0.6.1
type: npm
-summary:
-homepage:
+summary: Actions glob lib
+homepage: https://github.com/actions/toolkit/tree/main/packages/glob
license: mit
licenses:
- sources: LICENSE.md
diff --git a/.licenses/npm/@actions/http-client-2.2.3.dep.yml b/.licenses/npm/@actions/http-client-2.2.3.dep.yml
deleted file mode 100644
index 1ae400a6..00000000
--- a/.licenses/npm/@actions/http-client-2.2.3.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@actions/http-client"
-version: 2.2.3
-type: npm
-summary: Actions Http Client
-homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
-license: other
-licenses:
-- sources: LICENSE
- text: |
- Actions Http Client for Node.js
-
- Copyright (c) GitHub, Inc.
-
- All rights reserved.
-
- MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
- associated documentation files (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@actions/http-client-3.0.0.dep.yml b/.licenses/npm/@actions/http-client-3.0.0.dep.yml
deleted file mode 100644
index 52aa4533..00000000
--- a/.licenses/npm/@actions/http-client-3.0.0.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@actions/http-client"
-version: 3.0.0
-type: npm
-summary: Actions Http Client
-homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
-license: other
-licenses:
-- sources: LICENSE
- text: |
- Actions Http Client for Node.js
-
- Copyright (c) GitHub, Inc.
-
- All rights reserved.
-
- MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
- associated documentation files (the "Software"), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@actions/io-1.1.3.dep.yml b/.licenses/npm/@actions/io-1.1.3.dep.yml
deleted file mode 100644
index d2846540..00000000
--- a/.licenses/npm/@actions/io-1.1.3.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@actions/io"
-version: 1.1.3
-type: npm
-summary: Actions io lib
-homepage: https://github.com/actions/toolkit/tree/main/packages/io
-license: mit
-licenses:
-- sources: LICENSE.md
- text: |-
- The MIT License (MIT)
-
- Copyright 2019 GitHub
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@actions/io-2.0.0.dep.yml b/.licenses/npm/@actions/io-2.0.0.dep.yml
deleted file mode 100644
index 2707c519..00000000
--- a/.licenses/npm/@actions/io-2.0.0.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@actions/io"
-version: 2.0.0
-type: npm
-summary: Actions io lib
-homepage: https://github.com/actions/toolkit/tree/main/packages/io
-license: mit
-licenses:
-- sources: LICENSE.md
- text: |-
- The MIT License (MIT)
-
- Copyright 2019 GitHub
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@actions/io.dep.yml b/.licenses/npm/@actions/io.dep.yml
index 2707c519..dadddb4e 100644
--- a/.licenses/npm/@actions/io.dep.yml
+++ b/.licenses/npm/@actions/io.dep.yml
@@ -1,6 +1,6 @@
---
name: "@actions/io"
-version: 2.0.0
+version: 3.0.2
type: npm
summary: Actions io lib
homepage: https://github.com/actions/toolkit/tree/main/packages/io
diff --git a/.licenses/npm/@azure/abort-controller.dep.yml b/.licenses/npm/@azure/abort-controller.dep.yml
deleted file mode 100644
index 934bd3bf..00000000
--- a/.licenses/npm/@azure/abort-controller.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@azure/abort-controller"
-version: 2.1.2
-type: npm
-summary: Microsoft Azure SDK for JavaScript - Aborter
-homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller/README.md
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License (MIT)
-
- Copyright (c) 2020 Microsoft
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@azure/core-auth.dep.yml b/.licenses/npm/@azure/core-auth.dep.yml
deleted file mode 100644
index 193d51d6..00000000
--- a/.licenses/npm/@azure/core-auth.dep.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: "@azure/core-auth"
-version: 1.10.1
-type: npm
-summary: Provides low-level interfaces and helper methods for authentication in Azure
- SDK
-homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-auth/README.md
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- Copyright (c) Microsoft Corporation.
-
- MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@azure/core-client.dep.yml b/.licenses/npm/@azure/core-client.dep.yml
deleted file mode 100644
index 41091535..00000000
--- a/.licenses/npm/@azure/core-client.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@azure/core-client"
-version: 1.10.1
-type: npm
-summary: Core library for interfacing with AutoRest generated code
-homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client/
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- Copyright (c) Microsoft Corporation.
-
- MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@azure/core-http-compat.dep.yml b/.licenses/npm/@azure/core-http-compat.dep.yml
deleted file mode 100644
index 1f0f6521..00000000
--- a/.licenses/npm/@azure/core-http-compat.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@azure/core-http-compat"
-version: 2.3.1
-type: npm
-summary: Core HTTP Compatibility Library to bridge the gap between Core V1 & V2 packages.
-homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-compat/
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- Copyright (c) Microsoft Corporation.
-
- MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@azure/core-lro.dep.yml b/.licenses/npm/@azure/core-lro.dep.yml
deleted file mode 100644
index 46cbe6e5..00000000
--- a/.licenses/npm/@azure/core-lro.dep.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: "@azure/core-lro"
-version: 2.7.2
-type: npm
-summary: Isomorphic client library for supporting long-running operations in node.js
- and browser.
-homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-lro/README.md
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License (MIT)
-
- Copyright (c) 2020 Microsoft
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@azure/core-paging.dep.yml b/.licenses/npm/@azure/core-paging.dep.yml
deleted file mode 100644
index cc316058..00000000
--- a/.licenses/npm/@azure/core-paging.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@azure/core-paging"
-version: 1.6.2
-type: npm
-summary: Core types for paging async iterable iterators
-homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-paging/README.md
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License (MIT)
-
- Copyright (c) 2020 Microsoft
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@azure/core-rest-pipeline.dep.yml b/.licenses/npm/@azure/core-rest-pipeline.dep.yml
deleted file mode 100644
index 7b3b7e6a..00000000
--- a/.licenses/npm/@azure/core-rest-pipeline.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@azure/core-rest-pipeline"
-version: 1.22.2
-type: npm
-summary: Isomorphic client library for making HTTP requests in node.js and browser.
-homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-rest-pipeline/
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- Copyright (c) Microsoft Corporation.
-
- MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@azure/core-tracing.dep.yml b/.licenses/npm/@azure/core-tracing.dep.yml
deleted file mode 100644
index 71f7b7f0..00000000
--- a/.licenses/npm/@azure/core-tracing.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@azure/core-tracing"
-version: 1.3.1
-type: npm
-summary: Provides low-level interfaces and helper methods for tracing in Azure SDK
-homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-tracing/README.md
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- Copyright (c) Microsoft Corporation.
-
- MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@azure/core-util.dep.yml b/.licenses/npm/@azure/core-util.dep.yml
deleted file mode 100644
index a0564854..00000000
--- a/.licenses/npm/@azure/core-util.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@azure/core-util"
-version: 1.13.1
-type: npm
-summary: Core library for shared utility methods
-homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-util/
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- Copyright (c) Microsoft Corporation.
-
- MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@azure/core-xml.dep.yml b/.licenses/npm/@azure/core-xml.dep.yml
deleted file mode 100644
index b82ec6d5..00000000
--- a/.licenses/npm/@azure/core-xml.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@azure/core-xml"
-version: 1.5.0
-type: npm
-summary: Core library for interacting with XML payloads
-homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-xml/
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- Copyright (c) Microsoft Corporation.
-
- MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@azure/logger.dep.yml b/.licenses/npm/@azure/logger.dep.yml
deleted file mode 100644
index 065ecaa5..00000000
--- a/.licenses/npm/@azure/logger.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@azure/logger"
-version: 1.3.0
-type: npm
-summary: Microsoft Azure SDK for JavaScript - Logger
-homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger/README.md
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- Copyright (c) Microsoft Corporation.
-
- MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@azure/storage-blob.dep.yml b/.licenses/npm/@azure/storage-blob.dep.yml
deleted file mode 100644
index d0cb028f..00000000
--- a/.licenses/npm/@azure/storage-blob.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@azure/storage-blob"
-version: 12.29.1
-type: npm
-summary: Microsoft Azure Storage SDK for JavaScript - Blob
-homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-blob/
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- Copyright (c) Microsoft Corporation.
-
- MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@azure/storage-common.dep.yml b/.licenses/npm/@azure/storage-common.dep.yml
deleted file mode 100644
index fc337091..00000000
--- a/.licenses/npm/@azure/storage-common.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@azure/storage-common"
-version: 12.1.1
-type: npm
-summary: Azure Storage Common Client Library for JavaScript
-homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-internal-avro/
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- The MIT License (MIT)
-
- Copyright (c) 2018 Microsoft
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@bufbuild/protobuf.dep.yml b/.licenses/npm/@bufbuild/protobuf.dep.yml
deleted file mode 100644
index 80b8cdeb..00000000
--- a/.licenses/npm/@bufbuild/protobuf.dep.yml
+++ /dev/null
@@ -1,202 +0,0 @@
----
-name: "@bufbuild/protobuf"
-version: 2.10.1
-type: npm
-summary: A complete implementation of Protocol Buffers in TypeScript, suitable for
- web browsers and Node.js.
-homepage: https://github.com/bufbuild/protobuf-es
-license: apache-2.0
-licenses:
-- sources: LICENSE
- text: |
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to the Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- Copyright 2021-2025 Buf Technologies, Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-notices: []
diff --git a/.licenses/npm/@bufbuild/protoplugin.dep.yml b/.licenses/npm/@bufbuild/protoplugin.dep.yml
deleted file mode 100644
index 8a06e54a..00000000
--- a/.licenses/npm/@bufbuild/protoplugin.dep.yml
+++ /dev/null
@@ -1,207 +0,0 @@
----
-name: "@bufbuild/protoplugin"
-version: 2.10.1
-type: npm
-summary: Helps to create your own Protocol Buffers code generators.
-homepage:
-license: apache-2.0
-licenses:
-- sources: Auto-generated Apache-2.0 license text
- text: |2
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-notices: []
diff --git a/.licenses/npm/@fastify/busboy.dep.yml b/.licenses/npm/@fastify/busboy.dep.yml
deleted file mode 100644
index 817d644a..00000000
--- a/.licenses/npm/@fastify/busboy.dep.yml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-name: "@fastify/busboy"
-version: 2.1.1
-type: npm
-summary: A streaming parser for HTML form data for node.js
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- Copyright Brian White. All rights reserved.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to
- deal in the Software without restriction, including without limitation the
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@isaacs/cliui.dep.yml b/.licenses/npm/@isaacs/cliui.dep.yml
deleted file mode 100644
index 35137526..00000000
--- a/.licenses/npm/@isaacs/cliui.dep.yml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-name: "@isaacs/cliui"
-version: 8.0.2
-type: npm
-summary: easily create complex multi-column command-line-interfaces
-homepage:
-license: isc
-licenses:
-- sources: LICENSE.txt
- text: |
- Copyright (c) 2015, Contributors
-
- Permission to use, copy, modify, and/or distribute this software
- for any purpose with or without fee is hereby granted, provided
- that the above copyright notice and this permission notice
- appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
- LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
- OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/@octokit/auth-token.dep.yml b/.licenses/npm/@octokit/auth-token.dep.yml
deleted file mode 100644
index a202a59f..00000000
--- a/.licenses/npm/@octokit/auth-token.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: "@octokit/auth-token"
-version: 4.0.0
-type: npm
-summary: GitHub API token authentication for browsers and Node.js
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License
-
- Copyright (c) 2019 Octokit contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/core.dep.yml b/.licenses/npm/@octokit/core.dep.yml
deleted file mode 100644
index 341b8d55..00000000
--- a/.licenses/npm/@octokit/core.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: "@octokit/core"
-version: 5.2.2
-type: npm
-summary: Extendable client for GitHub's REST & GraphQL APIs
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License
-
- Copyright (c) 2019 Octokit contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/endpoint.dep.yml b/.licenses/npm/@octokit/endpoint.dep.yml
deleted file mode 100644
index 71234c67..00000000
--- a/.licenses/npm/@octokit/endpoint.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: "@octokit/endpoint"
-version: 9.0.6
-type: npm
-summary: Turns REST API endpoints into generic request options
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License
-
- Copyright (c) 2018 Octokit contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/graphql.dep.yml b/.licenses/npm/@octokit/graphql.dep.yml
deleted file mode 100644
index 86a7a72d..00000000
--- a/.licenses/npm/@octokit/graphql.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: "@octokit/graphql"
-version: 7.1.1
-type: npm
-summary: GitHub GraphQL API client for browsers and Node
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License
-
- Copyright (c) 2018 Octokit contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/openapi-types-12.11.0.dep.yml b/.licenses/npm/@octokit/openapi-types-12.11.0.dep.yml
deleted file mode 100644
index 91531481..00000000
--- a/.licenses/npm/@octokit/openapi-types-12.11.0.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@octokit/openapi-types"
-version: 12.11.0
-type: npm
-summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- Copyright 2020 Gregor Martynus
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/openapi-types-20.0.0.dep.yml b/.licenses/npm/@octokit/openapi-types-20.0.0.dep.yml
deleted file mode 100644
index eb85519a..00000000
--- a/.licenses/npm/@octokit/openapi-types-20.0.0.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@octokit/openapi-types"
-version: 20.0.0
-type: npm
-summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- Copyright 2020 Gregor Martynus
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/openapi-types-24.2.0.dep.yml b/.licenses/npm/@octokit/openapi-types-24.2.0.dep.yml
deleted file mode 100644
index e6d606dd..00000000
--- a/.licenses/npm/@octokit/openapi-types-24.2.0.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@octokit/openapi-types"
-version: 24.2.0
-type: npm
-summary: Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- Copyright 2020 Gregor Martynus
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/plugin-paginate-rest.dep.yml b/.licenses/npm/@octokit/plugin-paginate-rest.dep.yml
deleted file mode 100644
index c1853a6f..00000000
--- a/.licenses/npm/@octokit/plugin-paginate-rest.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@octokit/plugin-paginate-rest"
-version: 9.2.2
-type: npm
-summary: Octokit plugin to paginate REST API endpoint responses
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT License Copyright (c) 2019 Octokit contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/plugin-request-log.dep.yml b/.licenses/npm/@octokit/plugin-request-log.dep.yml
deleted file mode 100644
index d9fc28a1..00000000
--- a/.licenses/npm/@octokit/plugin-request-log.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@octokit/plugin-request-log"
-version: 1.0.4
-type: npm
-summary: Log all requests and request errors
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT License Copyright (c) 2020 Octokit contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml b/.licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml
deleted file mode 100644
index 55778ad1..00000000
--- a/.licenses/npm/@octokit/plugin-rest-endpoint-methods.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@octokit/plugin-rest-endpoint-methods"
-version: 10.4.1
-type: npm
-summary: Octokit plugin adding one method for all of api.github.com REST API endpoints
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT License Copyright (c) 2019 Octokit contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/plugin-retry.dep.yml b/.licenses/npm/@octokit/plugin-retry.dep.yml
deleted file mode 100644
index b6c7843b..00000000
--- a/.licenses/npm/@octokit/plugin-retry.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: "@octokit/plugin-retry"
-version: 3.0.9
-type: npm
-summary: Automatic retry plugin for octokit
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT License
-
- Copyright (c) 2018 Octokit contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/request-error.dep.yml b/.licenses/npm/@octokit/request-error.dep.yml
deleted file mode 100644
index 9c9d7024..00000000
--- a/.licenses/npm/@octokit/request-error.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: "@octokit/request-error"
-version: 5.1.1
-type: npm
-summary: Error class for Octokit request errors
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License
-
- Copyright (c) 2019 Octokit contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/request.dep.yml b/.licenses/npm/@octokit/request.dep.yml
deleted file mode 100644
index ef1a5542..00000000
--- a/.licenses/npm/@octokit/request.dep.yml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-name: "@octokit/request"
-version: 8.4.1
-type: npm
-summary: Send parameterized requests to GitHub's APIs with sensible defaults in browsers
- and Node
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License
-
- Copyright (c) 2018 Octokit contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/types-12.6.0.dep.yml b/.licenses/npm/@octokit/types-12.6.0.dep.yml
deleted file mode 100644
index 37cfb77c..00000000
--- a/.licenses/npm/@octokit/types-12.6.0.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@octokit/types"
-version: 12.6.0
-type: npm
-summary: Shared TypeScript definitions for Octokit projects
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT License Copyright (c) 2019 Octokit contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/types-13.10.0.dep.yml b/.licenses/npm/@octokit/types-13.10.0.dep.yml
deleted file mode 100644
index 8e8a6748..00000000
--- a/.licenses/npm/@octokit/types-13.10.0.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@octokit/types"
-version: 13.10.0
-type: npm
-summary: Shared TypeScript definitions for Octokit projects
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT License Copyright (c) 2019 Octokit contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@octokit/types-6.41.0.dep.yml b/.licenses/npm/@octokit/types-6.41.0.dep.yml
deleted file mode 100644
index c5efe95e..00000000
--- a/.licenses/npm/@octokit/types-6.41.0.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: "@octokit/types"
-version: 6.41.0
-type: npm
-summary: Shared TypeScript definitions for Octokit projects
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT License Copyright (c) 2019 Octokit contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: "[MIT](LICENSE)"
-notices: []
diff --git a/.licenses/npm/@pkgjs/parseargs.dep.yml b/.licenses/npm/@pkgjs/parseargs.dep.yml
deleted file mode 100644
index 13fa21a6..00000000
--- a/.licenses/npm/@pkgjs/parseargs.dep.yml
+++ /dev/null
@@ -1,212 +0,0 @@
----
-name: "@pkgjs/parseargs"
-version: 0.11.0
-type: npm
-summary: Polyfill of future proposal for `util.parseArgs()`
-homepage: https://github.com/pkgjs/parseargs#readme
-license: other
-licenses:
-- sources: LICENSE
- text: |2
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-notices: []
diff --git a/.licenses/npm/@protobuf-ts/plugin.dep.yml b/.licenses/npm/@protobuf-ts/plugin.dep.yml
deleted file mode 100644
index c65ddc62..00000000
--- a/.licenses/npm/@protobuf-ts/plugin.dep.yml
+++ /dev/null
@@ -1,186 +0,0 @@
----
-name: "@protobuf-ts/plugin"
-version: 2.11.1
-type: npm
-summary: The protocol buffer compiler plugin "protobuf-ts" generates TypeScript, gRPC-web,
- Twirp, and more.
-homepage: https://github.com/timostamm/protobuf-ts
-license: apache-2.0
-licenses:
-- sources: LICENSE
- text: |2
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-notices: []
diff --git a/.licenses/npm/@protobuf-ts/protoc.dep.yml b/.licenses/npm/@protobuf-ts/protoc.dep.yml
deleted file mode 100644
index b1b40043..00000000
--- a/.licenses/npm/@protobuf-ts/protoc.dep.yml
+++ /dev/null
@@ -1,207 +0,0 @@
----
-name: "@protobuf-ts/protoc"
-version: 2.11.1
-type: npm
-summary: Installs the protocol buffer compiler "protoc" for you.
-homepage: https://github.com/timostamm/protobuf-ts
-license: apache-2.0
-licenses:
-- sources: Auto-generated Apache-2.0 license text
- text: |2
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-notices: []
diff --git a/.licenses/npm/@protobuf-ts/runtime-rpc.dep.yml b/.licenses/npm/@protobuf-ts/runtime-rpc.dep.yml
deleted file mode 100644
index 79644b5d..00000000
--- a/.licenses/npm/@protobuf-ts/runtime-rpc.dep.yml
+++ /dev/null
@@ -1,185 +0,0 @@
----
-name: "@protobuf-ts/runtime-rpc"
-version: 2.11.1
-type: npm
-summary: Runtime library for RPC clients generated by the protoc plugin "protobuf-ts"
-homepage: https://github.com/timostamm/protobuf-ts
-license: apache-2.0
-licenses:
-- sources: LICENSE
- text: |2
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-notices: []
diff --git a/.licenses/npm/@protobuf-ts/runtime.dep.yml b/.licenses/npm/@protobuf-ts/runtime.dep.yml
deleted file mode 100644
index 2ad03d17..00000000
--- a/.licenses/npm/@protobuf-ts/runtime.dep.yml
+++ /dev/null
@@ -1,185 +0,0 @@
----
-name: "@protobuf-ts/runtime"
-version: 2.11.1
-type: npm
-summary: Runtime library for code generated by the protoc plugin "protobuf-ts"
-homepage: https://github.com/timostamm/protobuf-ts
-license: other
-licenses:
-- sources: LICENSE
- text: |2
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-notices: []
diff --git a/.licenses/npm/@typescript/vfs.dep.yml b/.licenses/npm/@typescript/vfs.dep.yml
deleted file mode 100644
index d685ffe9..00000000
--- a/.licenses/npm/@typescript/vfs.dep.yml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-name: "@typescript/vfs"
-version: 1.6.2
-type: npm
-summary:
-homepage: https://github.com/microsoft/TypeScript-Website
-license: mit
-licenses:
-- sources: LICENSE
- text: "The MIT License (MIT)\nCopyright (c) Microsoft Corporation\n\nPermission
- is hereby granted, free of charge, to any person obtaining a copy of this software
- and \nassociated documentation files (the \"Software\"), to deal in the Software
- without restriction, \nincluding without limitation the rights to use, copy, modify,
- merge, publish, distribute, sublicense, \nand/or sell copies of the Software,
- and to permit persons to whom the Software is furnished to do so, \nsubject to
- the following conditions:\n\nThe above copyright notice and this permission notice
- shall be included in all copies or substantial \nportions of the Software.\n\nTHE
- SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
- INCLUDING BUT \nNOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR
- A PARTICULAR PURPOSE AND NONINFRINGEMENT. \nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \nWHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- \nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
-notices: []
diff --git a/.licenses/npm/@typespec/ts-http-runtime.dep.yml b/.licenses/npm/@typespec/ts-http-runtime.dep.yml
deleted file mode 100644
index 4b476443..00000000
--- a/.licenses/npm/@typespec/ts-http-runtime.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: "@typespec/ts-http-runtime"
-version: 0.3.2
-type: npm
-summary: Isomorphic client library for making HTTP requests in node.js and browser.
-homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/ts-http-runtime/
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- Copyright (c) Microsoft Corporation.
-
- MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/abort-controller.dep.yml b/.licenses/npm/abort-controller.dep.yml
deleted file mode 100644
index 492a609b..00000000
--- a/.licenses/npm/abort-controller.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: abort-controller
-version: 3.0.0
-type: npm
-summary: An implementation of WHATWG AbortController interface.
-homepage: https://github.com/mysticatea/abort-controller#readme
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT License
-
- Copyright (c) 2017 Toru Nagashima
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/agent-base.dep.yml b/.licenses/npm/agent-base.dep.yml
deleted file mode 100644
index 54c324a3..00000000
--- a/.licenses/npm/agent-base.dep.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: agent-base
-version: 7.1.4
-type: npm
-summary: Turn a function into an `http.Agent` instance
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- (The MIT License)
-
- Copyright (c) 2013 Nathan Rajlich
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- 'Software'), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/ansi-regex-5.0.1.dep.yml b/.licenses/npm/ansi-regex-5.0.1.dep.yml
deleted file mode 100644
index 9e6d3704..00000000
--- a/.licenses/npm/ansi-regex-5.0.1.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: ansi-regex
-version: 5.0.1
-type: npm
-summary: Regular expression for matching ANSI escape codes
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/ansi-regex-6.2.2.dep.yml b/.licenses/npm/ansi-regex-6.2.2.dep.yml
deleted file mode 100644
index 802a920e..00000000
--- a/.licenses/npm/ansi-regex-6.2.2.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: ansi-regex
-version: 6.2.2
-type: npm
-summary: Regular expression for matching ANSI escape codes
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (https://sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/ansi-styles-4.3.0.dep.yml b/.licenses/npm/ansi-styles-4.3.0.dep.yml
deleted file mode 100644
index d73bee19..00000000
--- a/.licenses/npm/ansi-styles-4.3.0.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: ansi-styles
-version: 4.3.0
-type: npm
-summary: ANSI escape codes for styling strings in the terminal
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/ansi-styles-6.2.3.dep.yml b/.licenses/npm/ansi-styles-6.2.3.dep.yml
deleted file mode 100644
index 04f7569d..00000000
--- a/.licenses/npm/ansi-styles-6.2.3.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: ansi-styles
-version: 6.2.3
-type: npm
-summary: ANSI escape codes for styling strings in the terminal
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (https://sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/archiver-utils.dep.yml b/.licenses/npm/archiver-utils.dep.yml
deleted file mode 100644
index dfd45d48..00000000
--- a/.licenses/npm/archiver-utils.dep.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: archiver-utils
-version: 5.0.2
-type: npm
-summary: utility functions for archiver
-homepage: https://github.com/archiverjs/archiver-utils#readme
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- Copyright (c) 2015 Chris Talkington.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/archiver.dep.yml b/.licenses/npm/archiver.dep.yml
deleted file mode 100644
index a7783937..00000000
--- a/.licenses/npm/archiver.dep.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: archiver
-version: 7.0.1
-type: npm
-summary: a streaming interface for archive generation
-homepage: https://github.com/archiverjs/node-archiver
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- Copyright (c) 2012-2014 Chris Talkington, contributors.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/async.dep.yml b/.licenses/npm/async.dep.yml
deleted file mode 100644
index 8cd28fbe..00000000
--- a/.licenses/npm/async.dep.yml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-name: async
-version: 3.2.6
-type: npm
-summary: Higher-order functions and common patterns for asynchronous code
-homepage: https://caolan.github.io/async/
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- Copyright (c) 2010-2018 Caolan McMahon
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/b4a.dep.yml b/.licenses/npm/b4a.dep.yml
deleted file mode 100644
index a7f1ec29..00000000
--- a/.licenses/npm/b4a.dep.yml
+++ /dev/null
@@ -1,214 +0,0 @@
----
-name: b4a
-version: 1.7.3
-type: npm
-summary: Bridging the gap between buffers and typed arrays
-homepage: https://github.com/holepunchto/b4a#readme
-license: apache-2.0
-licenses:
-- sources: LICENSE
- text: |2
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-- sources: README.md
- text: Apache 2.0
-notices: []
diff --git a/.licenses/npm/balanced-match.dep.yml b/.licenses/npm/balanced-match.dep.yml
deleted file mode 100644
index 36095592..00000000
--- a/.licenses/npm/balanced-match.dep.yml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-name: balanced-match
-version: 1.0.2
-type: npm
-summary: Match balanced character pairs, like "{" and "}"
-homepage: https://github.com/juliangruber/balanced-match
-license: mit
-licenses:
-- sources: LICENSE.md
- text: |
- (MIT)
-
- Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of
- this software and associated documentation files (the "Software"), to deal in
- the Software without restriction, including without limitation the rights to
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
- of the Software, and to permit persons to whom the Software is furnished to do
- so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-- sources: README.md
- text: |-
- (MIT)
-
- Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of
- this software and associated documentation files (the "Software"), to deal in
- the Software without restriction, including without limitation the rights to
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
- of the Software, and to permit persons to whom the Software is furnished to do
- so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/bare-events.dep.yml b/.licenses/npm/bare-events.dep.yml
deleted file mode 100644
index 41ba1f0d..00000000
--- a/.licenses/npm/bare-events.dep.yml
+++ /dev/null
@@ -1,214 +0,0 @@
----
-name: bare-events
-version: 2.8.2
-type: npm
-summary: Event emitters for JavaScript
-homepage: https://github.com/holepunchto/bare-events#readme
-license: apache-2.0
-licenses:
-- sources: LICENSE
- text: |2
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-- sources: README.md
- text: Apache-2.0
-notices: []
diff --git a/.licenses/npm/base64-js.dep.yml b/.licenses/npm/base64-js.dep.yml
deleted file mode 100644
index 6f5707cb..00000000
--- a/.licenses/npm/base64-js.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: base64-js
-version: 1.5.1
-type: npm
-summary: Base64 encoding/decoding in pure JS
-homepage: https://github.com/beatgammit/base64-js
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License (MIT)
-
- Copyright (c) 2014 Jameson Little
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: MIT
-notices: []
diff --git a/.licenses/npm/before-after-hook.dep.yml b/.licenses/npm/before-after-hook.dep.yml
deleted file mode 100644
index a1c6b849..00000000
--- a/.licenses/npm/before-after-hook.dep.yml
+++ /dev/null
@@ -1,214 +0,0 @@
----
-name: before-after-hook
-version: 2.2.3
-type: npm
-summary: asynchronous before/error/after hooks for internal functionality
-homepage:
-license: apache-2.0
-licenses:
-- sources: LICENSE
- text: |2
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright 2018 Gregor Martynus and other contributors.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-- sources: README.md
- text: "[Apache 2.0](LICENSE)"
-notices: []
diff --git a/.licenses/npm/binary.dep.yml b/.licenses/npm/binary.dep.yml
deleted file mode 100644
index 00e43d5d..00000000
--- a/.licenses/npm/binary.dep.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-name: binary
-version: 0.3.0
-type: npm
-summary: Unpack multibyte binary values from buffers
-homepage:
-license: mit
-licenses:
-- sources: README.markdown
- text: MIT
-notices: []
diff --git a/.licenses/npm/bottleneck.dep.yml b/.licenses/npm/bottleneck.dep.yml
deleted file mode 100644
index af9f462b..00000000
--- a/.licenses/npm/bottleneck.dep.yml
+++ /dev/null
@@ -1,31 +0,0 @@
----
-name: bottleneck
-version: 2.19.5
-type: npm
-summary: Distributed task scheduler and rate limiter
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License (MIT)
-
- Copyright (c) 2014 Simon Grondin
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of
- this software and associated documentation files (the "Software"), to deal in
- the Software without restriction, including without limitation the rights to
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- the Software, and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/brace-expansion-1.1.12.dep.yml b/.licenses/npm/brace-expansion-1.1.12.dep.yml
deleted file mode 100644
index 95ca8eb1..00000000
--- a/.licenses/npm/brace-expansion-1.1.12.dep.yml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-name: brace-expansion
-version: 1.1.12
-type: npm
-summary: Brace expansion as known from sh/bash
-homepage: https://github.com/juliangruber/brace-expansion
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT License
-
- Copyright (c) 2013 Julian Gruber
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-- sources: README.md
- text: |-
- (MIT)
-
- Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of
- this software and associated documentation files (the "Software"), to deal in
- the Software without restriction, including without limitation the rights to
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
- of the Software, and to permit persons to whom the Software is furnished to do
- so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/brace-expansion-2.0.2.dep.yml b/.licenses/npm/brace-expansion-2.0.2.dep.yml
deleted file mode 100644
index e57aa2f4..00000000
--- a/.licenses/npm/brace-expansion-2.0.2.dep.yml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-name: brace-expansion
-version: 2.0.2
-type: npm
-summary: Brace expansion as known from sh/bash
-homepage: https://github.com/juliangruber/brace-expansion
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT License
-
- Copyright (c) 2013 Julian Gruber
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-- sources: README.md
- text: |-
- (MIT)
-
- Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of
- this software and associated documentation files (the "Software"), to deal in
- the Software without restriction, including without limitation the rights to
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
- of the Software, and to permit persons to whom the Software is furnished to do
- so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/buffer-crc32.dep.yml b/.licenses/npm/buffer-crc32.dep.yml
deleted file mode 100644
index fd7b2df7..00000000
--- a/.licenses/npm/buffer-crc32.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: buffer-crc32
-version: 1.0.0
-type: npm
-summary: A pure javascript CRC32 algorithm that plays nice with binary data
-homepage: https://github.com/brianloveswords/buffer-crc32
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License
-
- Copyright (c) 2013-2024 Brian J. Brennan
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal in
- the Software without restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
- Software, and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
- FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: MIT/X11
-notices: []
diff --git a/.licenses/npm/buffer.dep.yml b/.licenses/npm/buffer.dep.yml
deleted file mode 100644
index 9f0f322f..00000000
--- a/.licenses/npm/buffer.dep.yml
+++ /dev/null
@@ -1,110 +0,0 @@
----
-name: buffer
-version: 6.0.3
-type: npm
-summary: Node.js Buffer API, for the browser
-homepage: https://github.com/feross/buffer
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License (MIT)
-
- Copyright (c) Feross Aboukhadijeh, and other contributors.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors.
- Originally forked from an MIT-licensed module by Romain Beauxis.
-notices:
-- sources: AUTHORS.md
- text: |-
- # Authors
-
- #### Ordered by first contribution.
-
- - Romain Beauxis (toots@rastageeks.org)
- - Tobias Koppers (tobias.koppers@googlemail.com)
- - Janus (ysangkok@gmail.com)
- - Rainer Dreyer (rdrey1@gmail.com)
- - Tõnis Tiigi (tonistiigi@gmail.com)
- - James Halliday (mail@substack.net)
- - Michael Williamson (mike@zwobble.org)
- - elliottcable (github@elliottcable.name)
- - rafael (rvalle@livelens.net)
- - Andrew Kelley (superjoe30@gmail.com)
- - Andreas Madsen (amwebdk@gmail.com)
- - Mike Brevoort (mike.brevoort@pearson.com)
- - Brian White (mscdex@mscdex.net)
- - Feross Aboukhadijeh (feross@feross.org)
- - Ruben Verborgh (ruben@verborgh.org)
- - eliang (eliang.cs@gmail.com)
- - Jesse Tane (jesse.tane@gmail.com)
- - Alfonso Boza (alfonso@cloud.com)
- - Mathias Buus (mathiasbuus@gmail.com)
- - Devon Govett (devongovett@gmail.com)
- - Daniel Cousens (github@dcousens.com)
- - Joseph Dykstra (josephdykstra@gmail.com)
- - Parsha Pourkhomami (parshap+git@gmail.com)
- - Damjan Košir (damjan.kosir@gmail.com)
- - daverayment (dave.rayment@gmail.com)
- - kawanet (u-suke@kawa.net)
- - Linus Unnebäck (linus@folkdatorn.se)
- - Nolan Lawson (nolan.lawson@gmail.com)
- - Calvin Metcalf (calvin.metcalf@gmail.com)
- - Koki Takahashi (hakatasiloving@gmail.com)
- - Guy Bedford (guybedford@gmail.com)
- - Jan Schär (jscissr@gmail.com)
- - RaulTsc (tomescu.raul@gmail.com)
- - Matthieu Monsch (monsch@alum.mit.edu)
- - Dan Ehrenberg (littledan@chromium.org)
- - Kirill Fomichev (fanatid@ya.ru)
- - Yusuke Kawasaki (u-suke@kawa.net)
- - DC (dcposch@dcpos.ch)
- - John-David Dalton (john.david.dalton@gmail.com)
- - adventure-yunfei (adventure030@gmail.com)
- - Emil Bay (github@tixz.dk)
- - Sam Sudar (sudar.sam@gmail.com)
- - Volker Mische (volker.mische@gmail.com)
- - David Walton (support@geekstocks.com)
- - Сковорода Никита Андреевич (chalkerx@gmail.com)
- - greenkeeper[bot] (greenkeeper[bot]@users.noreply.github.com)
- - ukstv (sergey.ukustov@machinomy.com)
- - Renée Kooi (renee@kooi.me)
- - ranbochen (ranbochen@qq.com)
- - Vladimir Borovik (bobahbdb@gmail.com)
- - greenkeeper[bot] (23040076+greenkeeper[bot]@users.noreply.github.com)
- - kumavis (aaron@kumavis.me)
- - Sergey Ukustov (sergey.ukustov@machinomy.com)
- - Fei Liu (liu.feiwood@gmail.com)
- - Blaine Bublitz (blaine.bublitz@gmail.com)
- - clement (clement@seald.io)
- - Koushik Dutta (koushd@gmail.com)
- - Jordan Harband (ljharb@gmail.com)
- - Niklas Mischkulnig (mischnic@users.noreply.github.com)
- - Nikolai Vavilov (vvnicholas@gmail.com)
- - Fedor Nezhivoi (gyzerok@users.noreply.github.com)
- - shuse2 (shus.toda@gmail.com)
- - Peter Newman (peternewman@users.noreply.github.com)
- - mathmakgakpak (44949126+mathmakgakpak@users.noreply.github.com)
- - jkkang (jkkang@smartauth.kr)
- - Deklan Webster (deklanw@gmail.com)
- - Martin Heidegger (martin.heidegger@gmail.com)
-
- #### Generated by bin/update-authors.sh.
diff --git a/.licenses/npm/buffers.dep.yml b/.licenses/npm/buffers.dep.yml
deleted file mode 100644
index 6be12dbb..00000000
--- a/.licenses/npm/buffers.dep.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-name: buffers
-version: 0.1.1
-type: npm
-summary: Treat a collection of Buffers as a single contiguous partially mutable Buffer.
-homepage:
-license: none
-licenses:
-- sources: npm registry
- text: No license file found. Package is in reviewed list.
-notices: []
diff --git a/.licenses/npm/chainsaw.dep.yml b/.licenses/npm/chainsaw.dep.yml
deleted file mode 100644
index f698266c..00000000
--- a/.licenses/npm/chainsaw.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: chainsaw
-version: 0.1.0
-type: npm
-summary: Build chainable fluent interfaces the easy way... with a freakin' chainsaw!
-homepage:
-license: mit
-licenses:
-- sources: package.json
- text: |
- MIT/X11 License
-
- Copyright (c) James Halliday
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/color-convert.dep.yml b/.licenses/npm/color-convert.dep.yml
deleted file mode 100644
index 5a7944b2..00000000
--- a/.licenses/npm/color-convert.dep.yml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-name: color-convert
-version: 2.0.1
-type: npm
-summary: Plain color conversion functions
-homepage:
-license: other
-licenses:
-- sources: LICENSE
- text: |+
- Copyright (c) 2011-2016 Heather Arthur
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-- sources: README.md
- text: Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under
- the [MIT License](LICENSE).
-notices: []
-...
diff --git a/.licenses/npm/color-name.dep.yml b/.licenses/npm/color-name.dep.yml
deleted file mode 100644
index 180104bf..00000000
--- a/.licenses/npm/color-name.dep.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-name: color-name
-version: 1.1.4
-type: npm
-summary: A list of color names and its values
-homepage: https://github.com/colorjs/color-name
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- The MIT License (MIT)
- Copyright (c) 2015 Dmitry Ivanov
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/compress-commons.dep.yml b/.licenses/npm/compress-commons.dep.yml
deleted file mode 100644
index 77c0654d..00000000
--- a/.licenses/npm/compress-commons.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: compress-commons
-version: 6.0.2
-type: npm
-summary: a library that defines a common interface for working with archive formats
- within node
-homepage: https://github.com/archiverjs/node-compress-commons
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- Copyright (c) 2014 Chris Talkington, contributors.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/concat-map.dep.yml b/.licenses/npm/concat-map.dep.yml
deleted file mode 100644
index 3b736f5b..00000000
--- a/.licenses/npm/concat-map.dep.yml
+++ /dev/null
@@ -1,31 +0,0 @@
----
-name: concat-map
-version: 0.0.1
-type: npm
-summary: concatenative mapdashery
-homepage:
-license: other
-licenses:
-- sources: LICENSE
- text: |
- This software is released under the MIT license:
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of
- this software and associated documentation files (the "Software"), to deal in
- the Software without restriction, including without limitation the rights to
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- the Software, and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.markdown
- text: MIT
-notices: []
diff --git a/.licenses/npm/core-util-is.dep.yml b/.licenses/npm/core-util-is.dep.yml
deleted file mode 100644
index 3cb4b4d7..00000000
--- a/.licenses/npm/core-util-is.dep.yml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-name: core-util-is
-version: 1.0.3
-type: npm
-summary: The `util.is*` functions introduced in Node v0.12.
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- Copyright Node.js contributors. All rights reserved.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to
- deal in the Software without restriction, including without limitation the
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/crc-32.dep.yml b/.licenses/npm/crc-32.dep.yml
deleted file mode 100644
index 7e43fd4c..00000000
--- a/.licenses/npm/crc-32.dep.yml
+++ /dev/null
@@ -1,216 +0,0 @@
----
-name: crc-32
-version: 1.2.2
-type: npm
-summary: Pure-JS CRC-32
-homepage: https://sheetjs.com/
-license: apache-2.0
-licenses:
-- sources: LICENSE
- text: |2
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright (C) 2014-present SheetJS LLC
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-- sources: README.md
- text: |-
- Please consult the attached LICENSE file for details. All rights not explicitly
- granted by the Apache 2.0 license are reserved by the Original Author.
-notices: []
diff --git a/.licenses/npm/crc32-stream.dep.yml b/.licenses/npm/crc32-stream.dep.yml
deleted file mode 100644
index 2be0adf9..00000000
--- a/.licenses/npm/crc32-stream.dep.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: crc32-stream
-version: 6.0.0
-type: npm
-summary: a streaming CRC32 checksumer
-homepage: https://github.com/archiverjs/node-crc32-stream
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- Copyright (c) 2014 Chris Talkington, contributors.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/cross-spawn.dep.yml b/.licenses/npm/cross-spawn.dep.yml
deleted file mode 100644
index 88c20a1a..00000000
--- a/.licenses/npm/cross-spawn.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: cross-spawn
-version: 7.0.6
-type: npm
-summary: Cross platform child_process#spawn and child_process#spawnSync
-homepage: https://github.com/moxystudio/node-cross-spawn
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License (MIT)
-
- Copyright (c) 2018 Made With MOXY Lda
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: Released under the [MIT License](https://www.opensource.org/licenses/mit-license.php).
-notices: []
diff --git a/.licenses/npm/debug.dep.yml b/.licenses/npm/debug.dep.yml
deleted file mode 100644
index b49c69e9..00000000
--- a/.licenses/npm/debug.dep.yml
+++ /dev/null
@@ -1,56 +0,0 @@
----
-name: debug
-version: 4.4.3
-type: npm
-summary: Lightweight debugging utility for Node.js and the browser
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |+
- (The MIT License)
-
- Copyright (c) 2014-2017 TJ Holowaychuk
- Copyright (c) 2018-2021 Josh Junon
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software
- and associated documentation files (the 'Software'), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial
- portions of the Software.
-
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-- sources: README.md
- text: |-
- (The MIT License)
-
- Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
- Copyright (c) 2018-2021 Josh Junon
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- 'Software'), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/deprecation.dep.yml b/.licenses/npm/deprecation.dep.yml
deleted file mode 100644
index 85f21423..00000000
--- a/.licenses/npm/deprecation.dep.yml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-name: deprecation
-version: 2.3.1
-type: npm
-summary: Log a deprecation message with stack
-homepage:
-license: isc
-licenses:
-- sources: LICENSE
- text: |
- The ISC License
-
- Copyright (c) Gregor Martynus and contributors
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-- sources: README.md
- text: "[ISC](LICENSE)"
-notices: []
diff --git a/.licenses/npm/eastasianwidth.dep.yml b/.licenses/npm/eastasianwidth.dep.yml
deleted file mode 100644
index 064d0500..00000000
--- a/.licenses/npm/eastasianwidth.dep.yml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-name: eastasianwidth
-version: 0.2.0
-type: npm
-summary: Get East Asian Width from a character.
-homepage:
-license: mit
-licenses:
-- sources: Auto-generated MIT license text
- text: |
- MIT License
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/emoji-regex-8.0.0.dep.yml b/.licenses/npm/emoji-regex-8.0.0.dep.yml
deleted file mode 100644
index 30717a6f..00000000
--- a/.licenses/npm/emoji-regex-8.0.0.dep.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: emoji-regex
-version: 8.0.0
-type: npm
-summary: A regular expression to match all Emoji-only symbols as per the Unicode Standard.
-homepage: https://mths.be/emoji-regex
-license: mit
-licenses:
-- sources: LICENSE-MIT.txt
- text: |
- Copyright Mathias Bynens
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: _emoji-regex_ is available under the [MIT](https://mths.be/mit) license.
-notices: []
diff --git a/.licenses/npm/emoji-regex-9.2.2.dep.yml b/.licenses/npm/emoji-regex-9.2.2.dep.yml
deleted file mode 100644
index 3745ed7b..00000000
--- a/.licenses/npm/emoji-regex-9.2.2.dep.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: emoji-regex
-version: 9.2.2
-type: npm
-summary: A regular expression to match all Emoji-only symbols as per the Unicode Standard.
-homepage: https://mths.be/emoji-regex
-license: mit
-licenses:
-- sources: LICENSE-MIT.txt
- text: |
- Copyright Mathias Bynens
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: _emoji-regex_ is available under the [MIT](https://mths.be/mit) license.
-notices: []
diff --git a/.licenses/npm/event-target-shim.dep.yml b/.licenses/npm/event-target-shim.dep.yml
deleted file mode 100644
index 2f27dac2..00000000
--- a/.licenses/npm/event-target-shim.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: event-target-shim
-version: 5.0.1
-type: npm
-summary: An implementation of WHATWG EventTarget interface.
-homepage: https://github.com/mysticatea/event-target-shim
-license: mit
-licenses:
-- sources: LICENSE
- text: |+
- The MIT License (MIT)
-
- Copyright (c) 2015 Toru Nagashima
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
-notices: []
-...
diff --git a/.licenses/npm/events-universal.dep.yml b/.licenses/npm/events-universal.dep.yml
deleted file mode 100644
index 587600a4..00000000
--- a/.licenses/npm/events-universal.dep.yml
+++ /dev/null
@@ -1,214 +0,0 @@
----
-name: events-universal
-version: 1.0.1
-type: npm
-summary: Universal wrapper for the Node.js events module
-homepage: https://github.com/holepunchto/events-universal#readme
-license: apache-2.0
-licenses:
-- sources: LICENSE
- text: |2
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-- sources: README.md
- text: Apache-2.0
-notices: []
diff --git a/.licenses/npm/events.dep.yml b/.licenses/npm/events.dep.yml
deleted file mode 100644
index a77943db..00000000
--- a/.licenses/npm/events.dep.yml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-name: events
-version: 3.3.0
-type: npm
-summary: Node's event emitter for all engines.
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT
-
- Copyright Joyent, Inc. and other Node contributors.
-
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
- following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: Readme.md
- text: |-
- [MIT](./LICENSE)
-
- [node.js docs]: https://nodejs.org/dist/v11.13.0/docs/api/events.html
-notices: []
diff --git a/.licenses/npm/fast-fifo.dep.yml b/.licenses/npm/fast-fifo.dep.yml
deleted file mode 100644
index ed8ff374..00000000
--- a/.licenses/npm/fast-fifo.dep.yml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-name: fast-fifo
-version: 1.3.2
-type: npm
-summary: A fast fifo implementation similar to the one powering nextTick in Node.js
- core
-homepage: https://github.com/mafintosh/fast-fifo
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License (MIT)
-
- Copyright (c) 2019 Mathias Buus
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: MIT
-notices: []
diff --git a/.licenses/npm/fast-xml-parser.dep.yml b/.licenses/npm/fast-xml-parser.dep.yml
deleted file mode 100644
index 77eec1e1..00000000
--- a/.licenses/npm/fast-xml-parser.dep.yml
+++ /dev/null
@@ -1,37 +0,0 @@
----
-name: fast-xml-parser
-version: 5.3.3
-type: npm
-summary: Validate XML, Parse XML, Build XML without C/C++ based libraries
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT License
-
- Copyright (c) 2017 Amit Kumar Gupta
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-- sources: README.md
- text: |-
- * MIT License
-
- 
-notices: []
diff --git a/.licenses/npm/foreground-child.dep.yml b/.licenses/npm/foreground-child.dep.yml
deleted file mode 100644
index eb8b38fe..00000000
--- a/.licenses/npm/foreground-child.dep.yml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-name: foreground-child
-version: 3.3.1
-type: npm
-summary: Run a child as if it's the foreground process. Give it stdio. Exit when it
- exits.
-homepage:
-license: isc
-licenses:
-- sources: LICENSE
- text: |
- The ISC License
-
- Copyright (c) 2015-2023 Isaac Z. Schlueter and Contributors
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/glob.dep.yml b/.licenses/npm/glob.dep.yml
deleted file mode 100644
index 7ed68eda..00000000
--- a/.licenses/npm/glob.dep.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: glob
-version: 10.5.0
-type: npm
-summary: the most correct and second fastest glob implementation in JavaScript
-homepage:
-license: isc
-licenses:
-- sources: LICENSE
- text: |
- The ISC License
-
- Copyright (c) 2009-2023 Isaac Z. Schlueter and Contributors
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/graceful-fs.dep.yml b/.licenses/npm/graceful-fs.dep.yml
deleted file mode 100644
index 36aacf2a..00000000
--- a/.licenses/npm/graceful-fs.dep.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: graceful-fs
-version: 4.2.11
-type: npm
-summary: A drop-in replacement for fs, making various improvements.
-homepage:
-license: isc
-licenses:
-- sources: LICENSE
- text: |
- The ISC License
-
- Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/http-proxy-agent.dep.yml b/.licenses/npm/http-proxy-agent.dep.yml
deleted file mode 100644
index bcd27573..00000000
--- a/.licenses/npm/http-proxy-agent.dep.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: http-proxy-agent
-version: 7.0.2
-type: npm
-summary: An HTTP(s) proxy `http.Agent` implementation for HTTP
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- (The MIT License)
-
- Copyright (c) 2013 Nathan Rajlich
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- 'Software'), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/https-proxy-agent.dep.yml b/.licenses/npm/https-proxy-agent.dep.yml
deleted file mode 100644
index 7b6e176d..00000000
--- a/.licenses/npm/https-proxy-agent.dep.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: https-proxy-agent
-version: 7.0.6
-type: npm
-summary: An HTTP(s) proxy `http.Agent` implementation for HTTPS
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- (The MIT License)
-
- Copyright (c) 2013 Nathan Rajlich
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- 'Software'), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/ieee754.dep.yml b/.licenses/npm/ieee754.dep.yml
deleted file mode 100644
index 02746b61..00000000
--- a/.licenses/npm/ieee754.dep.yml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-name: ieee754
-version: 1.2.1
-type: npm
-summary: Read/write IEEE754 floating point numbers from/to a Buffer or array-like
- object
-homepage:
-license: other
-licenses:
-- sources: LICENSE
- text: |
- Copyright 2008 Fair Oaks Labs, Inc.
-
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
- 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- sources: README.md
- text: BSD 3 Clause. Copyright (c) 2008, Fair Oaks Labs, Inc.
-notices: []
diff --git a/.licenses/npm/inherits.dep.yml b/.licenses/npm/inherits.dep.yml
deleted file mode 100644
index 74179e61..00000000
--- a/.licenses/npm/inherits.dep.yml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-name: inherits
-version: 2.0.4
-type: npm
-summary: Browser-friendly inheritance fully compatible with standard node.js inherits()
-homepage:
-license: isc
-licenses:
-- sources: LICENSE
- text: |+
- The ISC License
-
- Copyright (c) Isaac Z. Schlueter
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-
-notices: []
-...
diff --git a/.licenses/npm/is-fullwidth-code-point.dep.yml b/.licenses/npm/is-fullwidth-code-point.dep.yml
deleted file mode 100644
index 87e3ac83..00000000
--- a/.licenses/npm/is-fullwidth-code-point.dep.yml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-name: is-fullwidth-code-point
-version: 3.0.0
-type: npm
-summary: Check if the character represented by a given Unicode code point is fullwidth
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: readme.md
- text: MIT © [Sindre Sorhus](https://sindresorhus.com)
-notices: []
diff --git a/.licenses/npm/is-stream.dep.yml b/.licenses/npm/is-stream.dep.yml
deleted file mode 100644
index 748b2ee5..00000000
--- a/.licenses/npm/is-stream.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: is-stream
-version: 2.0.1
-type: npm
-summary: Check if something is a Node.js stream
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (https://sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/isarray.dep.yml b/.licenses/npm/isarray.dep.yml
deleted file mode 100644
index 1b872158..00000000
--- a/.licenses/npm/isarray.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: isarray
-version: 1.0.0
-type: npm
-summary: Array#isArray for older browsers
-homepage: https://github.com/juliangruber/isarray
-license: mit
-licenses:
-- sources: README.md
- text: |-
- (MIT)
-
- Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of
- this software and associated documentation files (the "Software"), to deal in
- the Software without restriction, including without limitation the rights to
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
- of the Software, and to permit persons to whom the Software is furnished to do
- so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/isexe.dep.yml b/.licenses/npm/isexe.dep.yml
deleted file mode 100644
index a69a541e..00000000
--- a/.licenses/npm/isexe.dep.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: isexe
-version: 2.0.0
-type: npm
-summary: Minimal module to check if a file is executable.
-homepage: https://github.com/isaacs/isexe#readme
-license: isc
-licenses:
-- sources: LICENSE
- text: |
- The ISC License
-
- Copyright (c) Isaac Z. Schlueter and Contributors
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/jackspeak.dep.yml b/.licenses/npm/jackspeak.dep.yml
deleted file mode 100644
index 4f378f6d..00000000
--- a/.licenses/npm/jackspeak.dep.yml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-name: jackspeak
-version: 3.4.3
-type: npm
-summary: A very strict and proper argument parser.
-homepage:
-license: blueoak-1.0.0
-licenses:
-- sources: LICENSE.md
- text: |
- # Blue Oak Model License
-
- Version 1.0.0
-
- ## Purpose
-
- This license gives everyone as much permission to work with
- this software as possible, while protecting contributors
- from liability.
-
- ## Acceptance
-
- In order to receive this license, you must agree to its
- rules. The rules of this license are both obligations
- under that agreement and conditions to your license.
- You must not do anything with this software that triggers
- a rule that you cannot or will not follow.
-
- ## Copyright
-
- Each contributor licenses you to do everything with this
- software that would otherwise infringe that contributor's
- copyright in it.
-
- ## Notices
-
- You must ensure that everyone who gets a copy of
- any part of this software from you, with or without
- changes, also gets the text of this license or a link to
- .
-
- ## Excuse
-
- If anyone notifies you in writing that you have not
- complied with [Notices](#notices), you can keep your
- license by taking all practical steps to comply within 30
- days after the notice. If you do not do so, your license
- ends immediately.
-
- ## Patent
-
- Each contributor licenses you to do everything with this
- software that would otherwise infringe any patent claims
- they can license or become able to license.
-
- ## Reliability
-
- No contributor can revoke this license.
-
- ## No Liability
-
- **_As far as the law allows, this software comes as is,
- without any warranty or condition, and no contributor
- will be liable to anyone for any damages related to this
- software or this license, under any kind of legal claim._**
-notices: []
diff --git a/.licenses/npm/jwt-decode.dep.yml b/.licenses/npm/jwt-decode.dep.yml
deleted file mode 100644
index 708b1fa3..00000000
--- a/.licenses/npm/jwt-decode.dep.yml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-name: jwt-decode
-version: 3.1.2
-type: npm
-summary: Decode JWT tokens, mostly useful for browser applications.
-homepage: https://github.com/auth0/jwt-decode#readme
-license: mit
-licenses:
-- sources: LICENSE
- text: "The MIT License (MIT)\n \nCopyright (c) 2015 Auth0, Inc.
- (http://auth0.com)\n \nPermission is hereby granted, free of charge, to any person
- obtaining a copy\nof this software and associated documentation files (the \"Software\"),
- to deal\nin the Software without restriction, including without limitation the
- rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies
- of the Software, and to permit persons to whom the Software is\nfurnished to do
- so, subject to the following conditions:\n \nThe above copyright notice and this
- permission notice shall be included in all\ncopies or substantial portions of
- the Software.\n \nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY
- KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
-- sources: README.md
- text: |-
- This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.
-
- [browserify]: http://browserify.org
- [webpack]: http://webpack.github.io/
-notices: []
diff --git a/.licenses/npm/lazystream.dep.yml b/.licenses/npm/lazystream.dep.yml
deleted file mode 100644
index e198b73e..00000000
--- a/.licenses/npm/lazystream.dep.yml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-name: lazystream
-version: 1.0.1
-type: npm
-summary: Open Node Streams on demand.
-homepage: https://github.com/jpommerening/node-lazystream
-license: mit
-licenses:
-- sources: LICENSE
- text: |+
- Copyright (c) 2013 J. Pommerening, contributors.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
-
-notices: []
-...
diff --git a/.licenses/npm/lodash.dep.yml b/.licenses/npm/lodash.dep.yml
deleted file mode 100644
index fce2daa3..00000000
--- a/.licenses/npm/lodash.dep.yml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-name: lodash
-version: 4.17.21
-type: npm
-summary: Lodash modular utilities.
-homepage: https://lodash.com/
-license: other
-licenses:
-- sources: LICENSE
- text: |
- Copyright OpenJS Foundation and other contributors
-
- Based on Underscore.js, copyright Jeremy Ashkenas,
- DocumentCloud and Investigative Reporters & Editors
-
- This software consists of voluntary contributions made by many
- individuals. For exact contribution history, see the revision history
- available at https://github.com/lodash/lodash
-
- The following license applies to all parts of this software except as
- documented below:
-
- ====
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
- ====
-
- Copyright and related rights for sample code are waived via CC0. Sample
- code is defined as all source code displayed within the prose of the
- documentation.
-
- CC0: http://creativecommons.org/publicdomain/zero/1.0/
-
- ====
-
- Files located in the node_modules and vendor directories are externally
- maintained libraries used by this software which have their own
- licenses; we recommend you read them, as their terms may differ from the
- terms above.
-notices: []
diff --git a/.licenses/npm/lru-cache.dep.yml b/.licenses/npm/lru-cache.dep.yml
deleted file mode 100644
index 2f4c720f..00000000
--- a/.licenses/npm/lru-cache.dep.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: lru-cache
-version: 10.4.3
-type: npm
-summary: A cache object that deletes the least-recently-used items.
-homepage:
-license: isc
-licenses:
-- sources: LICENSE
- text: |
- The ISC License
-
- Copyright (c) 2010-2023 Isaac Z. Schlueter and Contributors
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/minimatch-3.1.2.dep.yml b/.licenses/npm/minimatch-3.1.2.dep.yml
deleted file mode 100644
index 05e744aa..00000000
--- a/.licenses/npm/minimatch-3.1.2.dep.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: minimatch
-version: 3.1.2
-type: npm
-summary: a glob matcher in javascript
-homepage:
-license: isc
-licenses:
-- sources: LICENSE
- text: |
- The ISC License
-
- Copyright (c) Isaac Z. Schlueter and Contributors
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/minimatch-5.1.6.dep.yml b/.licenses/npm/minimatch-5.1.6.dep.yml
deleted file mode 100644
index 7e565519..00000000
--- a/.licenses/npm/minimatch-5.1.6.dep.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: minimatch
-version: 5.1.6
-type: npm
-summary: a glob matcher in javascript
-homepage:
-license: isc
-licenses:
-- sources: LICENSE
- text: |
- The ISC License
-
- Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/minimatch-9.0.5.dep.yml b/.licenses/npm/minimatch-9.0.5.dep.yml
deleted file mode 100644
index 8026144a..00000000
--- a/.licenses/npm/minimatch-9.0.5.dep.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: minimatch
-version: 9.0.5
-type: npm
-summary: a glob matcher in javascript
-homepage:
-license: isc
-licenses:
-- sources: LICENSE
- text: |
- The ISC License
-
- Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/minimatch.dep.yml b/.licenses/npm/minimatch.dep.yml
index 8026144a..8ed580aa 100644
--- a/.licenses/npm/minimatch.dep.yml
+++ b/.licenses/npm/minimatch.dep.yml
@@ -1,26 +1,66 @@
---
name: minimatch
-version: 9.0.5
+version: 10.2.4
type: npm
-summary: a glob matcher in javascript
-homepage:
-license: isc
+summary:
+homepage:
+license: blueoak-1.0.0
licenses:
-- sources: LICENSE
+- sources: LICENSE.md
text: |
- The ISC License
+ # Blue Oak Model License
- Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
+ Version 1.0.0
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
+ ## Purpose
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ This license gives everyone as much permission to work with
+ this software as possible, while protecting contributors
+ from liability.
+
+ ## Acceptance
+
+ In order to receive this license, you must agree to its
+ rules. The rules of this license are both obligations
+ under that agreement and conditions to your license.
+ You must not do anything with this software that triggers
+ a rule that you cannot or will not follow.
+
+ ## Copyright
+
+ Each contributor licenses you to do everything with this
+ software that would otherwise infringe that contributor's
+ copyright in it.
+
+ ## Notices
+
+ You must ensure that everyone who gets a copy of
+ any part of this software from you, with or without
+ changes, also gets the text of this license or a link to
+ .
+
+ ## Excuse
+
+ If anyone notifies you in writing that you have not
+ complied with [Notices](#notices), you can keep your
+ license by taking all practical steps to comply within 30
+ days after the notice. If you do not do so, your license
+ ends immediately.
+
+ ## Patent
+
+ Each contributor licenses you to do everything with this
+ software that would otherwise infringe any patent claims
+ they can license or become able to license.
+
+ ## Reliability
+
+ No contributor can revoke this license.
+
+ ## No Liability
+
+ **_As far as the law allows, this software comes as is,
+ without any warranty or condition, and no contributor
+ will be liable to anyone for any damages related to this
+ software or this license, under any kind of legal claim._**
notices: []
diff --git a/.licenses/npm/minimist.dep.yml b/.licenses/npm/minimist.dep.yml
deleted file mode 100644
index d828146b..00000000
--- a/.licenses/npm/minimist.dep.yml
+++ /dev/null
@@ -1,44 +0,0 @@
----
-name: minimist
-version: 1.2.8
-type: npm
-summary: parse argument options
-homepage: https://github.com/minimistjs/minimist
-license: other
-licenses:
-- sources: LICENSE
- text: |
- This software is released under the MIT license:
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of
- this software and associated documentation files (the "Software"), to deal in
- the Software without restriction, including without limitation the rights to
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
- the Software, and to permit persons to whom the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: |-
- MIT
-
- [package-url]: https://npmjs.org/package/minimist
- [npm-version-svg]: https://versionbadg.es/minimistjs/minimist.svg
- [npm-badge-png]: https://nodei.co/npm/minimist.png?downloads=true&stars=true
- [license-image]: https://img.shields.io/npm/l/minimist.svg
- [license-url]: LICENSE
- [downloads-image]: https://img.shields.io/npm/dm/minimist.svg
- [downloads-url]: https://npm-stat.com/charts.html?package=minimist
- [codecov-image]: https://codecov.io/gh/minimistjs/minimist/branch/main/graphs/badge.svg
- [codecov-url]: https://app.codecov.io/gh/minimistjs/minimist/
- [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/minimistjs/minimist
- [actions-url]: https://github.com/minimistjs/minimist/actions
-notices: []
diff --git a/.licenses/npm/minipass.dep.yml b/.licenses/npm/minipass.dep.yml
deleted file mode 100644
index 6d4455ae..00000000
--- a/.licenses/npm/minipass.dep.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: minipass
-version: 7.1.2
-type: npm
-summary: minimal implementation of a PassThrough stream
-homepage:
-license: isc
-licenses:
-- sources: LICENSE
- text: |
- The ISC License
-
- Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/mkdirp.dep.yml b/.licenses/npm/mkdirp.dep.yml
deleted file mode 100644
index 832d06de..00000000
--- a/.licenses/npm/mkdirp.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: mkdirp
-version: 0.5.6
-type: npm
-summary: Recursively mkdir, like `mkdir -p`
-homepage:
-license: other
-licenses:
-- sources: LICENSE
- text: |
- Copyright 2010 James Halliday (mail@substack.net)
-
- This project is free software released under the MIT/X11 license:
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: readme.markdown
- text: MIT
-notices: []
diff --git a/.licenses/npm/ms.dep.yml b/.licenses/npm/ms.dep.yml
deleted file mode 100644
index 5a303e4d..00000000
--- a/.licenses/npm/ms.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: ms
-version: 2.1.3
-type: npm
-summary: Tiny millisecond conversion utility
-homepage:
-license: mit
-licenses:
-- sources: license.md
- text: |
- The MIT License (MIT)
-
- Copyright (c) 2020 Vercel, Inc.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/normalize-path.dep.yml b/.licenses/npm/normalize-path.dep.yml
deleted file mode 100644
index f010f2a0..00000000
--- a/.licenses/npm/normalize-path.dep.yml
+++ /dev/null
@@ -1,42 +0,0 @@
----
-name: normalize-path
-version: 3.0.0
-type: npm
-summary: Normalize slashes in a file path to be posix/unix-like forward slashes. Also
- condenses repeat slashes to a single slash and removes and trailing slashes, unless
- disabled.
-homepage: https://github.com/jonschlinkert/normalize-path
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License (MIT)
-
- Copyright (c) 2014-2018, Jon Schlinkert.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: |-
- Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
- Released under the [MIT License](LICENSE).
-
- ***
-
- _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 19, 2018._
-notices: []
diff --git a/.licenses/npm/once.dep.yml b/.licenses/npm/once.dep.yml
deleted file mode 100644
index af362acd..00000000
--- a/.licenses/npm/once.dep.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: once
-version: 1.4.0
-type: npm
-summary: Run a function exactly one time
-homepage:
-license: isc
-licenses:
-- sources: LICENSE
- text: |
- The ISC License
-
- Copyright (c) Isaac Z. Schlueter and Contributors
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/package-json-from-dist.dep.yml b/.licenses/npm/package-json-from-dist.dep.yml
deleted file mode 100644
index 54e71eb0..00000000
--- a/.licenses/npm/package-json-from-dist.dep.yml
+++ /dev/null
@@ -1,74 +0,0 @@
----
-name: package-json-from-dist
-version: 1.0.1
-type: npm
-summary: Load the local package.json from either src or dist folder
-homepage:
-license: other
-licenses:
-- sources: LICENSE.md
- text: |
- All packages under `src/` are licensed according to the terms in
- their respective `LICENSE` or `LICENSE.md` files.
-
- The remainder of this project is licensed under the Blue Oak
- Model License, as follows:
-
- -----
-
- # Blue Oak Model License
-
- Version 1.0.0
-
- ## Purpose
-
- This license gives everyone as much permission to work with
- this software as possible, while protecting contributors
- from liability.
-
- ## Acceptance
-
- In order to receive this license, you must agree to its
- rules. The rules of this license are both obligations
- under that agreement and conditions to your license.
- You must not do anything with this software that triggers
- a rule that you cannot or will not follow.
-
- ## Copyright
-
- Each contributor licenses you to do everything with this
- software that would otherwise infringe that contributor's
- copyright in it.
-
- ## Notices
-
- You must ensure that everyone who gets a copy of
- any part of this software from you, with or without
- changes, also gets the text of this license or a link to
- .
-
- ## Excuse
-
- If anyone notifies you in writing that you have not
- complied with [Notices](#notices), you can keep your
- license by taking all practical steps to comply within 30
- days after the notice. If you do not do so, your license
- ends immediately.
-
- ## Patent
-
- Each contributor licenses you to do everything with this
- software that would otherwise infringe any patent claims
- they can license or become able to license.
-
- ## Reliability
-
- No contributor can revoke this license.
-
- ## No Liability
-
- ***As far as the law allows, this software comes as is,
- without any warranty or condition, and no contributor
- will be liable to anyone for any damages related to this
- software or this license, under any kind of legal claim.***
-notices: []
diff --git a/.licenses/npm/path-key.dep.yml b/.licenses/npm/path-key.dep.yml
deleted file mode 100644
index 7351b52d..00000000
--- a/.licenses/npm/path-key.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: path-key
-version: 3.1.1
-type: npm
-summary: Get the PATH environment variable key cross-platform
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/path-scurry.dep.yml b/.licenses/npm/path-scurry.dep.yml
deleted file mode 100644
index 5f6d234c..00000000
--- a/.licenses/npm/path-scurry.dep.yml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-name: path-scurry
-version: 1.11.1
-type: npm
-summary: walk paths fast and efficiently
-homepage:
-license: blueoak-1.0.0
-licenses:
-- sources: LICENSE.md
- text: |
- # Blue Oak Model License
-
- Version 1.0.0
-
- ## Purpose
-
- This license gives everyone as much permission to work with
- this software as possible, while protecting contributors
- from liability.
-
- ## Acceptance
-
- In order to receive this license, you must agree to its
- rules. The rules of this license are both obligations
- under that agreement and conditions to your license.
- You must not do anything with this software that triggers
- a rule that you cannot or will not follow.
-
- ## Copyright
-
- Each contributor licenses you to do everything with this
- software that would otherwise infringe that contributor's
- copyright in it.
-
- ## Notices
-
- You must ensure that everyone who gets a copy of
- any part of this software from you, with or without
- changes, also gets the text of this license or a link to
- .
-
- ## Excuse
-
- If anyone notifies you in writing that you have not
- complied with [Notices](#notices), you can keep your
- license by taking all practical steps to comply within 30
- days after the notice. If you do not do so, your license
- ends immediately.
-
- ## Patent
-
- Each contributor licenses you to do everything with this
- software that would otherwise infringe any patent claims
- they can license or become able to license.
-
- ## Reliability
-
- No contributor can revoke this license.
-
- ## No Liability
-
- ***As far as the law allows, this software comes as is,
- without any warranty or condition, and no contributor
- will be liable to anyone for any damages related to this
- software or this license, under any kind of legal claim.***
-notices: []
diff --git a/.licenses/npm/process-nextick-args.dep.yml b/.licenses/npm/process-nextick-args.dep.yml
deleted file mode 100644
index 4d77ee84..00000000
--- a/.licenses/npm/process-nextick-args.dep.yml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-name: process-nextick-args
-version: 2.0.1
-type: npm
-summary: process.nextTick but always with args
-homepage: https://github.com/calvinmetcalf/process-nextick-args
-license: mit
-licenses:
-- sources: license.md
- text: |
- # Copyright (c) 2015 Calvin Metcalf
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- **THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.**
-notices: []
diff --git a/.licenses/npm/process.dep.yml b/.licenses/npm/process.dep.yml
deleted file mode 100644
index 7649512e..00000000
--- a/.licenses/npm/process.dep.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: process
-version: 0.11.10
-type: npm
-summary: process information for node.js and browsers
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- (The MIT License)
-
- Copyright (c) 2013 Roman Shtylman
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- 'Software'), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/readable-stream-2.3.8.dep.yml b/.licenses/npm/readable-stream-2.3.8.dep.yml
deleted file mode 100644
index 7cf8551a..00000000
--- a/.licenses/npm/readable-stream-2.3.8.dep.yml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-name: readable-stream
-version: 2.3.8
-type: npm
-summary: Streams3, a user-land copy of the stream library from Node.js
-homepage:
-license: other
-licenses:
-- sources: LICENSE
- text: |
- Node.js is licensed for use as follows:
-
- """
- Copyright Node.js contributors. All rights reserved.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to
- deal in the Software without restriction, including without limitation the
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- IN THE SOFTWARE.
- """
-
- This license applies to parts of Node.js originating from the
- https://github.com/joyent/node repository:
-
- """
- Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to
- deal in the Software without restriction, including without limitation the
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- IN THE SOFTWARE.
- """
-notices: []
diff --git a/.licenses/npm/readable-stream-4.7.0.dep.yml b/.licenses/npm/readable-stream-4.7.0.dep.yml
deleted file mode 100644
index 344c7091..00000000
--- a/.licenses/npm/readable-stream-4.7.0.dep.yml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-name: readable-stream
-version: 4.7.0
-type: npm
-summary: Node.js Streams, a user-land copy of the stream library from Node.js
-homepage: https://github.com/nodejs/readable-stream
-license: other
-licenses:
-- sources: LICENSE
- text: |
- Node.js is licensed for use as follows:
-
- """
- Copyright Node.js contributors. All rights reserved.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to
- deal in the Software without restriction, including without limitation the
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- IN THE SOFTWARE.
- """
-
- This license applies to parts of Node.js originating from the
- https://github.com/joyent/node repository:
-
- """
- Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to
- deal in the Software without restriction, including without limitation the
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- IN THE SOFTWARE.
- """
-notices: []
diff --git a/.licenses/npm/readdir-glob.dep.yml b/.licenses/npm/readdir-glob.dep.yml
deleted file mode 100644
index cba05910..00000000
--- a/.licenses/npm/readdir-glob.dep.yml
+++ /dev/null
@@ -1,212 +0,0 @@
----
-name: readdir-glob
-version: 1.1.3
-type: npm
-summary: Recursive fs.readdir with streaming API and glob filtering.
-homepage: https://github.com/Yqnn/node-readdir-glob
-license: apache-2.0
-licenses:
-- sources: LICENSE
- text: |2-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright 2020 Yann Armelin
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-notices: []
diff --git a/.licenses/npm/safe-buffer-5.1.2.dep.yml b/.licenses/npm/safe-buffer-5.1.2.dep.yml
deleted file mode 100644
index 193d9e89..00000000
--- a/.licenses/npm/safe-buffer-5.1.2.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: safe-buffer
-version: 5.1.2
-type: npm
-summary: Safer Node.js Buffer API
-homepage: https://github.com/feross/safe-buffer
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License (MIT)
-
- Copyright (c) Feross Aboukhadijeh
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)
-notices: []
diff --git a/.licenses/npm/safe-buffer-5.2.1.dep.yml b/.licenses/npm/safe-buffer-5.2.1.dep.yml
deleted file mode 100644
index a6499e34..00000000
--- a/.licenses/npm/safe-buffer-5.2.1.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: safe-buffer
-version: 5.2.1
-type: npm
-summary: Safer Node.js Buffer API
-homepage: https://github.com/feross/safe-buffer
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License (MIT)
-
- Copyright (c) Feross Aboukhadijeh
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)
-notices: []
diff --git a/.licenses/npm/shebang-command.dep.yml b/.licenses/npm/shebang-command.dep.yml
deleted file mode 100644
index d95f0cbb..00000000
--- a/.licenses/npm/shebang-command.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: shebang-command
-version: 2.0.0
-type: npm
-summary: Get the command from a shebang
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Kevin Mårtensson (github.com/kevva)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/shebang-regex.dep.yml b/.licenses/npm/shebang-regex.dep.yml
deleted file mode 100644
index 4edc1f9b..00000000
--- a/.licenses/npm/shebang-regex.dep.yml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-name: shebang-regex
-version: 3.0.0
-type: npm
-summary: Regular expression for matching a shebang line
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- sources: readme.md
- text: MIT © [Sindre Sorhus](https://sindresorhus.com)
-notices: []
diff --git a/.licenses/npm/signal-exit.dep.yml b/.licenses/npm/signal-exit.dep.yml
deleted file mode 100644
index 5257c46d..00000000
--- a/.licenses/npm/signal-exit.dep.yml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-name: signal-exit
-version: 4.1.0
-type: npm
-summary: when you want to fire an event no matter how a process exits.
-homepage:
-license: isc
-licenses:
-- sources: LICENSE.txt
- text: |
- The ISC License
-
- Copyright (c) 2015-2023 Benjamin Coe, Isaac Z. Schlueter, and Contributors
-
- Permission to use, copy, modify, and/or distribute this software
- for any purpose with or without fee is hereby granted, provided
- that the above copyright notice and this permission notice
- appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
- LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
- OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/streamx.dep.yml b/.licenses/npm/streamx.dep.yml
deleted file mode 100644
index f387670d..00000000
--- a/.licenses/npm/streamx.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: streamx
-version: 2.23.0
-type: npm
-summary: An iteration of the Node.js core streams with a series of improvements
-homepage: https://github.com/mafintosh/streamx
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License (MIT)
-
- Copyright (c) 2019 Mathias Buus
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: MIT
-notices: []
diff --git a/.licenses/npm/string-width-4.2.3.dep.yml b/.licenses/npm/string-width-4.2.3.dep.yml
deleted file mode 100644
index e7d6c0bf..00000000
--- a/.licenses/npm/string-width-4.2.3.dep.yml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-name: string-width
-version: 4.2.3
-type: npm
-summary: Get the visual width of a string - the number of columns required to display
- it
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/string-width-5.1.2.dep.yml b/.licenses/npm/string-width-5.1.2.dep.yml
deleted file mode 100644
index 24a8551e..00000000
--- a/.licenses/npm/string-width-5.1.2.dep.yml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-name: string-width
-version: 5.1.2
-type: npm
-summary: Get the visual width of a string - the number of columns required to display
- it
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (https://sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/string-width-cjs.dep.yml b/.licenses/npm/string-width-cjs.dep.yml
deleted file mode 100644
index 1cecb569..00000000
--- a/.licenses/npm/string-width-cjs.dep.yml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-name: string-width-cjs
-version: 4.2.3
-type: npm
-summary: Get the visual width of a string - the number of columns required to display
- it
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/string_decoder-1.1.1.dep.yml b/.licenses/npm/string_decoder-1.1.1.dep.yml
deleted file mode 100644
index ab0a64f7..00000000
--- a/.licenses/npm/string_decoder-1.1.1.dep.yml
+++ /dev/null
@@ -1,60 +0,0 @@
----
-name: string_decoder
-version: 1.1.1
-type: npm
-summary: The string_decoder module from Node core
-homepage: https://github.com/nodejs/string_decoder
-license: other
-licenses:
-- sources: LICENSE
- text: |+
- Node.js is licensed for use as follows:
-
- """
- Copyright Node.js contributors. All rights reserved.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to
- deal in the Software without restriction, including without limitation the
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- IN THE SOFTWARE.
- """
-
- This license applies to parts of Node.js originating from the
- https://github.com/joyent/node repository:
-
- """
- Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to
- deal in the Software without restriction, including without limitation the
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- IN THE SOFTWARE.
- """
-
-notices: []
-...
diff --git a/.licenses/npm/string_decoder-1.3.0.dep.yml b/.licenses/npm/string_decoder-1.3.0.dep.yml
deleted file mode 100644
index 84d1b1eb..00000000
--- a/.licenses/npm/string_decoder-1.3.0.dep.yml
+++ /dev/null
@@ -1,60 +0,0 @@
----
-name: string_decoder
-version: 1.3.0
-type: npm
-summary: The string_decoder module from Node core
-homepage: https://github.com/nodejs/string_decoder
-license: other
-licenses:
-- sources: LICENSE
- text: |+
- Node.js is licensed for use as follows:
-
- """
- Copyright Node.js contributors. All rights reserved.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to
- deal in the Software without restriction, including without limitation the
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- IN THE SOFTWARE.
- """
-
- This license applies to parts of Node.js originating from the
- https://github.com/joyent/node repository:
-
- """
- Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to
- deal in the Software without restriction, including without limitation the
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- IN THE SOFTWARE.
- """
-
-notices: []
-...
diff --git a/.licenses/npm/strip-ansi-6.0.1.dep.yml b/.licenses/npm/strip-ansi-6.0.1.dep.yml
deleted file mode 100644
index 4e722bc7..00000000
--- a/.licenses/npm/strip-ansi-6.0.1.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: strip-ansi
-version: 6.0.1
-type: npm
-summary: Strip ANSI escape codes from a string
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/strip-ansi-7.1.2.dep.yml b/.licenses/npm/strip-ansi-7.1.2.dep.yml
deleted file mode 100644
index cbde5bb7..00000000
--- a/.licenses/npm/strip-ansi-7.1.2.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: strip-ansi
-version: 7.1.2
-type: npm
-summary: Strip ANSI escape codes from a string
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (https://sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/strip-ansi-cjs.dep.yml b/.licenses/npm/strip-ansi-cjs.dep.yml
deleted file mode 100644
index 7d9eebba..00000000
--- a/.licenses/npm/strip-ansi-cjs.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: strip-ansi-cjs
-version: 6.0.1
-type: npm
-summary: Strip ANSI escape codes from a string
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/strnum.dep.yml b/.licenses/npm/strnum.dep.yml
deleted file mode 100644
index 3aa1cde7..00000000
--- a/.licenses/npm/strnum.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: strnum
-version: 2.1.2
-type: npm
-summary: Parse String to Number based on configuration
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT License
-
- Copyright (c) 2021 Natural Intelligence
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-notices: []
diff --git a/.licenses/npm/tar-stream.dep.yml b/.licenses/npm/tar-stream.dep.yml
deleted file mode 100644
index 238eca4f..00000000
--- a/.licenses/npm/tar-stream.dep.yml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-name: tar-stream
-version: 3.1.7
-type: npm
-summary: tar-stream is a streaming tar parser and generator and nothing else. It operates
- purely using streams which means you can easily extract/parse tarballs without ever
- hitting the file system.
-homepage: https://github.com/mafintosh/tar-stream
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- The MIT License (MIT)
-
- Copyright (c) 2014 Mathias Buus
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: MIT
-notices: []
diff --git a/.licenses/npm/text-decoder.dep.yml b/.licenses/npm/text-decoder.dep.yml
deleted file mode 100644
index 432a3b96..00000000
--- a/.licenses/npm/text-decoder.dep.yml
+++ /dev/null
@@ -1,214 +0,0 @@
----
-name: text-decoder
-version: 1.2.3
-type: npm
-summary: Streaming text decoder that preserves multibyte Unicode characters
-homepage: https://github.com/holepunchto/text-decoder#readme
-license: apache-2.0
-licenses:
-- sources: LICENSE
- text: |2
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-- sources: README.md
- text: Apache-2.0
-notices: []
diff --git a/.licenses/npm/traverse.dep.yml b/.licenses/npm/traverse.dep.yml
deleted file mode 100644
index 6aa35da9..00000000
--- a/.licenses/npm/traverse.dep.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: traverse
-version: 0.3.9
-type: npm
-summary: Traverse and transform objects by visiting every node on a recursive walk
-homepage:
-license: other
-licenses:
-- sources: LICENSE
- text: "Copyright 2010 James Halliday (mail@substack.net)\n\nThis project is free
- software released under the MIT/X11 license:\nhttp://www.opensource.org/licenses/mit-license.php
- \n\nCopyright 2010 James Halliday (mail@substack.net)\n\nPermission is hereby
- granted, free of charge, to any person obtaining a copy\nof this software and
- associated documentation files (the \"Software\"), to deal\nin the Software without
- restriction, including without limitation the rights\nto use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit
- persons to whom the Software is\nfurnished to do so, subject to the following
- conditions:\n\nThe above copyright notice and this permission notice shall be
- included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE
- IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING
- BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR
- PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF
- CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE
- OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
-notices: []
diff --git a/.licenses/npm/tslib.dep.yml b/.licenses/npm/tslib.dep.yml
deleted file mode 100644
index 4611137c..00000000
--- a/.licenses/npm/tslib.dep.yml
+++ /dev/null
@@ -1,23 +0,0 @@
----
-name: tslib
-version: 2.8.1
-type: npm
-summary: Runtime library for TypeScript helper functions
-homepage: https://www.typescriptlang.org/
-license: 0bsd
-licenses:
-- sources: LICENSE.txt
- text: |-
- Copyright (c) Microsoft Corporation.
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/tunnel.dep.yml b/.licenses/npm/tunnel.dep.yml
deleted file mode 100644
index 9a7111da..00000000
--- a/.licenses/npm/tunnel.dep.yml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-name: tunnel
-version: 0.0.6
-type: npm
-summary: Node HTTP/HTTPS Agents for tunneling proxies
-homepage: https://github.com/koichik/node-tunnel/
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- The MIT License (MIT)
-
- Copyright (c) 2012 Koichi Kobayashi
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-- sources: README.md
- text: Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE)
- license.
-notices: []
diff --git a/.licenses/npm/typescript-3.9.10.dep.yml b/.licenses/npm/typescript-3.9.10.dep.yml
deleted file mode 100644
index 01cccafd..00000000
--- a/.licenses/npm/typescript-3.9.10.dep.yml
+++ /dev/null
@@ -1,239 +0,0 @@
----
-name: typescript
-version: 3.9.10
-type: npm
-summary: TypeScript is a language for application scale JavaScript development
-homepage: https://www.typescriptlang.org/
-license: apache-2.0
-licenses:
-- sources: LICENSE.txt
- text: "Apache License\n\nVersion 2.0, January 2004\n\nhttp://www.apache.org/licenses/
- \n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\"
- shall mean the terms and conditions for use, reproduction, and distribution as
- defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the
- copyright owner or entity authorized by the copyright owner that is granting the
- License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common control with
- that entity. For the purposes of this definition, \"control\" means (i) the power,
- direct or indirect, to cause the direction or management of such entity, whether
- by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of
- the outstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\"
- (or \"Your\") shall mean an individual or Legal Entity exercising permissions
- granted by this License.\n\n\"Source\" form shall mean the preferred form for
- making modifications, including but not limited to software source code, documentation
- source, and configuration files.\n\n\"Object\" form shall mean any form resulting
- from mechanical transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation, and conversions
- to other media types.\n\n\"Work\" shall mean the work of authorship, whether in
- Source or Object form, made available under the License, as indicated by a copyright
- notice that is included in or attached to the work (an example is provided in
- the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source
- or Object form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications represent,
- as a whole, an original work of authorship. For the purposes of this License,
- Derivative Works shall not include works that remain separable from, or merely
- link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\n\n\"Contribution\"
- shall mean any work of authorship, including the original version of the Work
- and any modifications or additions to that Work or Derivative Works thereof, that
- is intentionally submitted to Licensor for inclusion in the Work by the copyright
- owner or by an individual or Legal Entity authorized to submit on behalf of the
- copyright owner. For the purposes of this definition, \"submitted\" means any
- form of electronic, verbal, or written communication sent to the Licensor or its
- representatives, including but not limited to communication on electronic mailing
- lists, source code control systems, and issue tracking systems that are managed
- by, or on behalf of, the Licensor for the purpose of discussing and improving
- the Work, but excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\"
- shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution
- has been received by Licensor and subsequently incorporated within the Work.\n\n2.
- Grant of Copyright License. Subject to the terms and conditions of this License,
- each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
- royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works
- of, publicly display, publicly perform, sublicense, and distribute the Work and
- such Derivative Works in Source or Object form.\n\n3. Grant of Patent License.
- Subject to the terms and conditions of this License, each Contributor hereby grants
- to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made, use, offer
- to sell, sell, import, and otherwise transfer the Work, where such license applies
- only to those patent claims licensable by such Contributor that are necessarily
- infringed by their Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You institute patent
- litigation against any entity (including a cross-claim or counterclaim in a lawsuit)
- alleging that the Work or a Contribution incorporated within the Work constitutes
- direct or contributory patent infringement, then any patent licenses granted to
- You under this License for that Work shall terminate as of the date such litigation
- is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without modifications,
- and in Source or Object form, provided that You meet the following conditions:\n\nYou
- must give any other recipients of the Work or Derivative Works a copy of this
- License; and\n\nYou must cause any modified files to carry prominent notices stating
- that You changed the files; and\n\nYou must retain, in the Source form of any
- Derivative Works that You distribute, all copyright, patent, trademark, and attribution
- notices from the Source form of the Work, excluding those notices that do not
- pertain to any part of the Derivative Works; and\n\nIf the Work includes a \"NOTICE\"
- text file as part of its distribution, then any Derivative Works that You distribute
- must include a readable copy of the attribution notices contained within such
- NOTICE file, excluding those notices that do not pertain to any part of the Derivative
- Works, in at least one of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or documentation, if provided
- along with the Derivative Works; or, within a display generated by the Derivative
- Works, if and wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and do not modify the License.
- You may add Your own attribution notices within Derivative Works that You distribute,
- alongside or as an addendum to the NOTICE text from the Work, provided that such
- additional attribution notices cannot be construed as modifying the License. You
- may add Your own copyright statement to Your modifications and may provide additional
- or different license terms and conditions for use, reproduction, or distribution
- of Your modifications, or for any such Derivative Works as a whole, provided Your
- use, reproduction, and distribution of the Work otherwise complies with the conditions
- stated in this License.\n\n5. Submission of Contributions. Unless You explicitly
- state otherwise, any Contribution intentionally submitted for inclusion in the
- Work by You to the Licensor shall be under the terms and conditions of this License,
- without any additional terms or conditions. Notwithstanding the above, nothing
- herein shall supersede or modify the terms of any separate license agreement you
- may have executed with Licensor regarding such Contributions.\n\n6. Trademarks.
- This License does not grant permission to use the trade names, trademarks, service
- marks, or product names of the Licensor, except as required for reasonable and
- customary use in describing the origin of the Work and reproducing the content
- of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable
- law or agreed to in writing, Licensor provides the Work (and each Contributor
- provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied, including, without limitation, any warranties
- or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
- PURPOSE. You are solely responsible for determining the appropriateness of using
- or redistributing the Work and assume any risks associated with Your exercise
- of permissions under this License.\n\n8. Limitation of Liability. In no event
- and under no legal theory, whether in tort (including negligence), contract, or
- otherwise, unless required by applicable law (such as deliberate and grossly negligent
- acts) or agreed to in writing, shall any Contributor be liable to You for damages,
- including any direct, indirect, special, incidental, or consequential damages
- of any character arising as a result of this License or out of the use or inability
- to use the Work (including but not limited to damages for loss of goodwill, work
- stoppage, computer failure or malfunction, or any and all other commercial damages
- or losses), even if such Contributor has been advised of the possibility of such
- damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer, and charge a fee
- for, acceptance of support, warranty, indemnity, or other liability obligations
- and/or rights consistent with this License. However, in accepting such obligations,
- You may act only on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify, defend, and hold
- each Contributor harmless for any liability incurred by, or claims asserted against,
- such Contributor by reason of your accepting any such warranty or additional liability.\n\nEND
- OF TERMS AND CONDITIONS\n"
-notices:
-- sources: AUTHORS.md
- text: "TypeScript is authored by:\r\n\r\n - 0verk1ll\r\n - Abubaker Bashir\r\n -
- Adam Freidin\r\n - Adam Postma\r\n - Adi Dahiya\r\n - Aditya Daflapurkar\r\n -
- Adnan Chowdhury\r\n - Adrian Leonhard\r\n - Adrien Gibrat\r\n - Ahmad Farid\r\n
- - Ajay Poshak\r\n - Alan Agius\r\n - Alan Pierce\r\n - Alessandro Vergani\r\n
- - Alex Chugaev\r\n - Alex Eagle\r\n - Alex Khomchenko\r\n - Alex Ryan\r\n - Alexander\r\n
- - Alexander Kuvaev\r\n - Alexander Rusakov\r\n - Alexander Tarasyuk\r\n - Ali
- Sabzevari\r\n - Aluan Haddad\r\n - amaksimovich2\r\n - Anatoly Ressin\r\n - Anders
- Hejlsberg\r\n - Anders Kaseorg\r\n - Andre Sutherland\r\n - Andreas Martin\r\n
- - Andrej Baran\r\n - Andrew\r\n - Andrew Branch\r\n - Andrew Casey\r\n - Andrew
- Faulkner\r\n - Andrew Ochsner\r\n - Andrew Stegmaier\r\n - Andrew Z Allen\r\n
- - Andrey Roenko\r\n - Andrii Dieiev\r\n - András Parditka\r\n - Andy Hanson\r\n
- - Anil Anar\r\n - Anix\r\n - Anton Khlynovskiy\r\n - Anton Tolmachev\r\n - Anubha
- Mathur\r\n - AnyhowStep\r\n - Armando Aguirre\r\n - Arnaud Tournier\r\n - Arnav
- Singh\r\n - Arpad Borsos\r\n - Artem Tyurin\r\n - Arthur Ozga\r\n - Asad Saeeduddin\r\n
- - Austin Cummings\r\n - Avery Morin\r\n - Aziz Khambati\r\n - Basarat Ali Syed\r\n
- - @begincalendar\r\n - Ben Duffield\r\n - Ben Lichtman\r\n - Ben Mosher\r\n -
- Benedikt Meurer\r\n - Benjamin Bock\r\n - Benjamin Lichtman\r\n - Benny Neugebauer\r\n
- - BigAru\r\n - Bill Ticehurst\r\n - Blaine Bublitz\r\n - Blake Embrey\r\n - @bluelovers\r\n
- - @bootstraponline\r\n - Bowden Kelly\r\n - Bowden Kenny\r\n - Brad Zacher\r\n
- - Brandon Banks\r\n - Brandon Bloom\r\n - Brandon Slade\r\n - Brendan Kenny\r\n
- - Brett Mayen\r\n - Brian Terlson\r\n - Bryan Forbes\r\n - Caitlin Potter\r\n
- - Caleb Sander\r\n - Cameron Taggart\r\n - @cedvdb\r\n - Charles\r\n - Charles
- Pierce\r\n - Charly POLY\r\n - Chris Bubernak\r\n - Chris Patterson\r\n - christian\r\n
- - Christophe Vidal\r\n - Chuck Jazdzewski\r\n - Clay Miller\r\n - Colby Russell\r\n
- - Colin Snover\r\n - Collins Abitekaniza\r\n - Connor Clark\r\n - Cotton Hou\r\n
- - csigs\r\n - Cyrus Najmabadi\r\n - Dafrok Zhang\r\n - Dahan Gong\r\n - Daiki
- Nishikawa\r\n - Dan Corder\r\n - Dan Freeman\r\n - Dan Quirk\r\n - Dan Rollo\r\n
- - Daniel Gooss\r\n - Daniel Imms\r\n - Daniel Krom\r\n - Daniel Król\r\n - Daniel
- Lehenbauer\r\n - Daniel Rosenwasser\r\n - David Li\r\n - David Sheldrick\r\n -
- David Sherret\r\n - David Souther\r\n - David Staheli\r\n - Denis Nedelyaev\r\n
- - Derek P Sifford\r\n - Dhruv Rajvanshi\r\n - Dick van den Brink\r\n - Diogo Franco
- (Kovensky)\r\n - Dirk Bäumer\r\n - Dirk Holtwick\r\n - Dmitrijs Minajevs\r\n -
- Dom Chen\r\n - Donald Pipowitch\r\n - Doug Ilijev\r\n - dreamran43@gmail.com\r\n
- - @e-cloud\r\n - Ecole Keine\r\n - Eddie Jaoude\r\n - Edward Thomson\r\n - EECOLOR\r\n
- - Eli Barzilay\r\n - Elizabeth Dinella\r\n - Ely Alamillo\r\n - Eric Grube\r\n
- - Eric Tsang\r\n - Erik Edrosa\r\n - Erik McClenney\r\n - Esakki Raj\r\n - Ethan
- Resnick\r\n - Ethan Rubio\r\n - Eugene Timokhov\r\n - Evan Cahill\r\n - Evan Martin\r\n
- - Evan Sebastian\r\n - ExE Boss\r\n - Eyas Sharaiha\r\n - Fabian Cook\r\n - @falsandtru\r\n
- - Filipe Silva\r\n - @flowmemo\r\n - Forbes Lindesay\r\n - Francois Hendriks\r\n
- - Francois Wouts\r\n - Frank Wallis\r\n - František Žiacik\r\n - Frederico Bittencourt\r\n
- - fullheightcoding\r\n - Gabe Moothart\r\n - Gabriel Isenberg\r\n - Gabriela Araujo
- Britto\r\n - Gabriela Britto\r\n - gb714us\r\n - Gilad Peleg\r\n - Godfrey Chan\r\n
- - Gorka Hernández Estomba\r\n - Graeme Wicksted\r\n - Guillaume Salles\r\n - Guy
- Bedford\r\n - hafiz\r\n - Halasi Tamás\r\n - Hendrik Liebau\r\n - Henry Mercer\r\n
- - Herrington Darkholme\r\n - Hoang Pham\r\n - Holger Jeromin\r\n - Homa Wong\r\n
- - Hye Sung Jung\r\n - Iain Monro\r\n - @IdeaHunter\r\n - Igor Novozhilov\r\n -
- Igor Oleinikov\r\n - Ika\r\n - iliashkolyar\r\n - IllusionMH\r\n - Ingvar Stepanyan\r\n
- - Ingvar Stepanyan\r\n - Isiah Meadows\r\n - ispedals\r\n - Ivan Enderlin\r\n
- - Ivo Gabe de Wolff\r\n - Iwata Hidetaka\r\n - Jack Bates\r\n - Jack Williams\r\n
- - Jake Boone\r\n - Jakub Korzeniowski\r\n - Jakub Młokosiewicz\r\n - James Henry\r\n
- - James Keane\r\n - James Whitney\r\n - Jan Melcher\r\n - Jason Freeman\r\n -
- Jason Jarrett\r\n - Jason Killian\r\n - Jason Ramsay\r\n - JBerger\r\n - Jean
- Pierre\r\n - Jed Mao\r\n - Jeff Wilcox\r\n - Jeffrey Morlan\r\n - Jesse Schalken\r\n
- - Jesse Trinity\r\n - Jing Ma\r\n - Jiri Tobisek\r\n - Joe Calzaretta\r\n - Joe
- Chung\r\n - Joel Day\r\n - Joey Watts\r\n - Johannes Rieken\r\n - John Doe\r\n
- - John Vilk\r\n - Jonathan Bond-Caron\r\n - Jonathan Park\r\n - Jonathan Toland\r\n
- - Jordan Harband\r\n - Jordi Oliveras Rovira\r\n - Joscha Feth\r\n - Joseph Wunderlich\r\n
- - Josh Abernathy\r\n - Josh Goldberg\r\n - Josh Kalderimis\r\n - Josh Soref\r\n
- - Juan Luis Boya García\r\n - Julian Williams\r\n - Justin Bay\r\n - Justin Johansson\r\n
- - jwbay\r\n - K. Preißer\r\n - Kagami Sascha Rosylight\r\n - Kanchalai Tanglertsampan\r\n
- - karthikkp\r\n - Kate Miháliková\r\n - Keen Yee Liau\r\n - Keith Mashinter\r\n
- - Ken Howard\r\n - Kenji Imamula\r\n - Kerem Kat\r\n - Kevin Donnelly\r\n - Kevin
- Gibbons\r\n - Kevin Lang\r\n - Khải\r\n - Kitson Kelly\r\n - Klaus Meinhardt\r\n
- - Kris Zyp\r\n - Kyle Kelley\r\n - Kārlis Gaņģis\r\n - laoxiong\r\n - Leon Aves\r\n
- - Limon Monte\r\n - Lorant Pinter\r\n - Lucien Greathouse\r\n - Luka Hartwig\r\n
- - Lukas Elmer\r\n - M.Yoshimura\r\n - Maarten Sijm\r\n - Magnus Hiie\r\n - Magnus
- Kulke\r\n - Manish Bansal\r\n - Manish Giri\r\n - Marcus Noble\r\n - Marin Marinov\r\n
- - Marius Schulz\r\n - Markus Johnsson\r\n - Markus Wolf\r\n - Martin\r\n - Martin
- Hiller\r\n - Martin Johns\r\n - Martin Probst\r\n - Martin Vseticka\r\n - Martyn
- Janes\r\n - Masahiro Wakame\r\n - Mateusz Burzyński\r\n - Matt Bierner\r\n - Matt
- McCutchen\r\n - Matt Mitchell\r\n - Matthew Aynalem\r\n - Matthew Miller\r\n -
- Mattias Buelens\r\n - Max Heiber\r\n - Maxwell Paul Brickner\r\n - @meyer\r\n
- - Micah Zoltu\r\n - @micbou\r\n - Michael\r\n - Michael Crane\r\n - Michael Henderson\r\n
- - Michael Tamm\r\n - Michael Tang\r\n - Michal Przybys\r\n - Mike Busyrev\r\n
- - Mike Morearty\r\n - Milosz Piechocki\r\n - Mine Starks\r\n - Minh Nguyen\r\n
- - Mohamed Hegazy\r\n - Mohsen Azimi\r\n - Mukesh Prasad\r\n - Myles Megyesi\r\n
- - Nathan Day\r\n - Nathan Fenner\r\n - Nathan Shively-Sanders\r\n - Nathan Yee\r\n
- - ncoley\r\n - Nicholas Yang\r\n - Nicu Micleușanu\r\n - @nieltg\r\n - Nima Zahedi\r\n
- - Noah Chen\r\n - Noel Varanda\r\n - Noel Yoo\r\n - Noj Vek\r\n - nrcoley\r\n
- - Nuno Arruda\r\n - Oleg Mihailik\r\n - Oleksandr Chekhovskyi\r\n - Omer Sheikh\r\n
- - Orta Therox\r\n - Orta Therox\r\n - Oskar Grunning\r\n - Oskar Segersva¨rd\r\n
- - Oussama Ben Brahim\r\n - Ozair Patel\r\n - Patrick McCartney\r\n - Patrick Zhong\r\n
- - Paul Koerbitz\r\n - Paul van Brenk\r\n - @pcbro\r\n - Pedro Maltez\r\n - Pete
- Bacon Darwin\r\n - Peter Burns\r\n - Peter Šándor\r\n - Philip Pesca\r\n - Philippe
- Voinov\r\n - Pi Lanningham\r\n - Piero Cangianiello\r\n - Pierre-Antoine Mills\r\n
- - @piloopin\r\n - Pranav Senthilnathan\r\n - Prateek Goel\r\n - Prateek Nayak\r\n
- - Prayag Verma\r\n - Priyantha Lankapura\r\n - @progre\r\n - Punya Biswal\r\n
- - r7kamura\r\n - Rado Kirov\r\n - Raj Dosanjh\r\n - rChaser53\r\n - Reiner Dolp\r\n
- - Remo H. Jansen\r\n - @rflorian\r\n - Rhys van der Waerden\r\n - @rhysd\r\n -
- Ricardo N Feliciano\r\n - Richard Karmazín\r\n - Richard Knoll\r\n - Roger Spratley\r\n
- - Ron Buckton\r\n - Rostislav Galimsky\r\n - Rowan Wyborn\r\n - rpgeeganage\r\n
- - Ruwan Pradeep Geeganage\r\n - Ryan Cavanaugh\r\n - Ryan Clarke\r\n - Ryohei
- Ikegami\r\n - Salisbury, Tom\r\n - Sam Bostock\r\n - Sam Drugan\r\n - Sam El-Husseini\r\n
- - Sam Lanning\r\n - Sangmin Lee\r\n - Sanket Mishra\r\n - Sarangan Rajamanickam\r\n
- - Sasha Joseph\r\n - Sean Barag\r\n - Sergey Rubanov\r\n - Sergey Shandar\r\n
- - Sergey Tychinin\r\n - Sergii Bezliudnyi\r\n - Sergio Baidon\r\n - Sharon Rolel\r\n
- - Sheetal Nandi\r\n - Shengping Zhong\r\n - Sheon Han\r\n - Shyyko Serhiy\r\n
- - Siddharth Singh\r\n - sisisin\r\n - Slawomir Sadziak\r\n - Solal Pirelli\r\n
- - Soo Jae Hwang\r\n - Stan Thomas\r\n - Stanislav Iliev\r\n - Stanislav Sysoev\r\n
- - Stas Vilchik\r\n - Stephan Ginthör\r\n - Steve Lucco\r\n - @styfle\r\n - Sudheesh
- Singanamalla\r\n - Suhas\r\n - Suhas Deshpande\r\n - superkd37\r\n - Sébastien
- Arod\r\n - @T18970237136\r\n - @t_\r\n - Tan Li Hau\r\n - Tapan Prakash\r\n -
- Taras Mankovski\r\n - Tarik Ozket\r\n - Tetsuharu Ohzeki\r\n - The Gitter Badger\r\n
- - Thomas den Hollander\r\n - Thorsten Ball\r\n - Tien Hoanhtien\r\n - Tim Lancina\r\n
- - Tim Perry\r\n - Tim Schaub\r\n - Tim Suchanek\r\n - Tim Viiding-Spader\r\n -
- Tingan Ho\r\n - Titian Cernicova-Dragomir\r\n - tkondo\r\n - Todd Thomson\r\n
- - togru\r\n - Tom J\r\n - Torben Fitschen\r\n - Toxyxer\r\n - @TravCav\r\n - Troy
- Tae\r\n - TruongSinh Tran-Nguyen\r\n - Tycho Grouwstra\r\n - uhyo\r\n - Vadi Taslim\r\n
- - Vakhurin Sergey\r\n - Valera Rozuvan\r\n - Vilic Vane\r\n - Vimal Raghubir\r\n
- - Vladimir Kurchatkin\r\n - Vladimir Matveev\r\n - Vyacheslav Pukhanov\r\n - Wenlu
- Wang\r\n - Wes Souza\r\n - Wesley Wigham\r\n - William Orr\r\n - Wilson Hobbs\r\n
- - xiaofa\r\n - xl1\r\n - Yacine Hmito\r\n - Yang Cao\r\n - York Yao\r\n - @yortus\r\n
- - Yoshiki Shibukawa\r\n - Yuichi Nukiyama\r\n - Yuval Greenfield\r\n - Yuya Tanaka\r\n
- - Z\r\n - Zeeshan Ahmed\r\n - Zev Spitz\r\n - Zhengbo Li\r\n - Zixiang Li\r\n
- - @Zzzen\r\n - 阿卡琳"
diff --git a/.licenses/npm/typescript-5.4.5.dep.yml b/.licenses/npm/typescript-5.4.5.dep.yml
deleted file mode 100644
index ace4699d..00000000
--- a/.licenses/npm/typescript-5.4.5.dep.yml
+++ /dev/null
@@ -1,123 +0,0 @@
----
-name: typescript
-version: 5.4.5
-type: npm
-summary: TypeScript is a language for application scale JavaScript development
-homepage: https://www.typescriptlang.org/
-license: apache-2.0
-licenses:
-- sources: LICENSE.txt
- text: "Apache License\n\nVersion 2.0, January 2004\n\nhttp://www.apache.org/licenses/
- \n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\"
- shall mean the terms and conditions for use, reproduction, and distribution as
- defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the
- copyright owner or entity authorized by the copyright owner that is granting the
- License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common control with
- that entity. For the purposes of this definition, \"control\" means (i) the power,
- direct or indirect, to cause the direction or management of such entity, whether
- by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of
- the outstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\"
- (or \"Your\") shall mean an individual or Legal Entity exercising permissions
- granted by this License.\n\n\"Source\" form shall mean the preferred form for
- making modifications, including but not limited to software source code, documentation
- source, and configuration files.\n\n\"Object\" form shall mean any form resulting
- from mechanical transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation, and conversions
- to other media types.\n\n\"Work\" shall mean the work of authorship, whether in
- Source or Object form, made available under the License, as indicated by a copyright
- notice that is included in or attached to the work (an example is provided in
- the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source
- or Object form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications represent,
- as a whole, an original work of authorship. For the purposes of this License,
- Derivative Works shall not include works that remain separable from, or merely
- link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\n\n\"Contribution\"
- shall mean any work of authorship, including the original version of the Work
- and any modifications or additions to that Work or Derivative Works thereof, that
- is intentionally submitted to Licensor for inclusion in the Work by the copyright
- owner or by an individual or Legal Entity authorized to submit on behalf of the
- copyright owner. For the purposes of this definition, \"submitted\" means any
- form of electronic, verbal, or written communication sent to the Licensor or its
- representatives, including but not limited to communication on electronic mailing
- lists, source code control systems, and issue tracking systems that are managed
- by, or on behalf of, the Licensor for the purpose of discussing and improving
- the Work, but excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\"
- shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution
- has been received by Licensor and subsequently incorporated within the Work.\n\n2.
- Grant of Copyright License. Subject to the terms and conditions of this License,
- each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
- royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works
- of, publicly display, publicly perform, sublicense, and distribute the Work and
- such Derivative Works in Source or Object form.\n\n3. Grant of Patent License.
- Subject to the terms and conditions of this License, each Contributor hereby grants
- to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made, use, offer
- to sell, sell, import, and otherwise transfer the Work, where such license applies
- only to those patent claims licensable by such Contributor that are necessarily
- infringed by their Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You institute patent
- litigation against any entity (including a cross-claim or counterclaim in a lawsuit)
- alleging that the Work or a Contribution incorporated within the Work constitutes
- direct or contributory patent infringement, then any patent licenses granted to
- You under this License for that Work shall terminate as of the date such litigation
- is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without modifications,
- and in Source or Object form, provided that You meet the following conditions:\n\nYou
- must give any other recipients of the Work or Derivative Works a copy of this
- License; and\n\nYou must cause any modified files to carry prominent notices stating
- that You changed the files; and\n\nYou must retain, in the Source form of any
- Derivative Works that You distribute, all copyright, patent, trademark, and attribution
- notices from the Source form of the Work, excluding those notices that do not
- pertain to any part of the Derivative Works; and\n\nIf the Work includes a \"NOTICE\"
- text file as part of its distribution, then any Derivative Works that You distribute
- must include a readable copy of the attribution notices contained within such
- NOTICE file, excluding those notices that do not pertain to any part of the Derivative
- Works, in at least one of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or documentation, if provided
- along with the Derivative Works; or, within a display generated by the Derivative
- Works, if and wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and do not modify the License.
- You may add Your own attribution notices within Derivative Works that You distribute,
- alongside or as an addendum to the NOTICE text from the Work, provided that such
- additional attribution notices cannot be construed as modifying the License. You
- may add Your own copyright statement to Your modifications and may provide additional
- or different license terms and conditions for use, reproduction, or distribution
- of Your modifications, or for any such Derivative Works as a whole, provided Your
- use, reproduction, and distribution of the Work otherwise complies with the conditions
- stated in this License.\n\n5. Submission of Contributions. Unless You explicitly
- state otherwise, any Contribution intentionally submitted for inclusion in the
- Work by You to the Licensor shall be under the terms and conditions of this License,
- without any additional terms or conditions. Notwithstanding the above, nothing
- herein shall supersede or modify the terms of any separate license agreement you
- may have executed with Licensor regarding such Contributions.\n\n6. Trademarks.
- This License does not grant permission to use the trade names, trademarks, service
- marks, or product names of the Licensor, except as required for reasonable and
- customary use in describing the origin of the Work and reproducing the content
- of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable
- law or agreed to in writing, Licensor provides the Work (and each Contributor
- provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied, including, without limitation, any warranties
- or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
- PURPOSE. You are solely responsible for determining the appropriateness of using
- or redistributing the Work and assume any risks associated with Your exercise
- of permissions under this License.\n\n8. Limitation of Liability. In no event
- and under no legal theory, whether in tort (including negligence), contract, or
- otherwise, unless required by applicable law (such as deliberate and grossly negligent
- acts) or agreed to in writing, shall any Contributor be liable to You for damages,
- including any direct, indirect, special, incidental, or consequential damages
- of any character arising as a result of this License or out of the use or inability
- to use the Work (including but not limited to damages for loss of goodwill, work
- stoppage, computer failure or malfunction, or any and all other commercial damages
- or losses), even if such Contributor has been advised of the possibility of such
- damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer, and charge a fee
- for, acceptance of support, warranty, indemnity, or other liability obligations
- and/or rights consistent with this License. However, in accepting such obligations,
- You may act only on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify, defend, and hold
- each Contributor harmless for any liability incurred by, or claims asserted against,
- such Contributor by reason of your accepting any such warranty or additional liability.\n\nEND
- OF TERMS AND CONDITIONS\n"
-notices: []
diff --git a/.licenses/npm/typescript-5.9.3.dep.yml b/.licenses/npm/typescript-5.9.3.dep.yml
deleted file mode 100644
index 37acb073..00000000
--- a/.licenses/npm/typescript-5.9.3.dep.yml
+++ /dev/null
@@ -1,123 +0,0 @@
----
-name: typescript
-version: 5.9.3
-type: npm
-summary: TypeScript is a language for application scale JavaScript development
-homepage: https://www.typescriptlang.org/
-license: apache-2.0
-licenses:
-- sources: LICENSE.txt
- text: "Apache License\n\nVersion 2.0, January 2004\n\nhttp://www.apache.org/licenses/
- \n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n1. Definitions.\n\n\"License\"
- shall mean the terms and conditions for use, reproduction, and distribution as
- defined by Sections 1 through 9 of this document.\n\n\"Licensor\" shall mean the
- copyright owner or entity authorized by the copyright owner that is granting the
- License.\n\n\"Legal Entity\" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common control with
- that entity. For the purposes of this definition, \"control\" means (i) the power,
- direct or indirect, to cause the direction or management of such entity, whether
- by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of
- the outstanding shares, or (iii) beneficial ownership of such entity.\n\n\"You\"
- (or \"Your\") shall mean an individual or Legal Entity exercising permissions
- granted by this License.\n\n\"Source\" form shall mean the preferred form for
- making modifications, including but not limited to software source code, documentation
- source, and configuration files.\n\n\"Object\" form shall mean any form resulting
- from mechanical transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation, and conversions
- to other media types.\n\n\"Work\" shall mean the work of authorship, whether in
- Source or Object form, made available under the License, as indicated by a copyright
- notice that is included in or attached to the work (an example is provided in
- the Appendix below).\n\n\"Derivative Works\" shall mean any work, whether in Source
- or Object form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications represent,
- as a whole, an original work of authorship. For the purposes of this License,
- Derivative Works shall not include works that remain separable from, or merely
- link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\n\n\"Contribution\"
- shall mean any work of authorship, including the original version of the Work
- and any modifications or additions to that Work or Derivative Works thereof, that
- is intentionally submitted to Licensor for inclusion in the Work by the copyright
- owner or by an individual or Legal Entity authorized to submit on behalf of the
- copyright owner. For the purposes of this definition, \"submitted\" means any
- form of electronic, verbal, or written communication sent to the Licensor or its
- representatives, including but not limited to communication on electronic mailing
- lists, source code control systems, and issue tracking systems that are managed
- by, or on behalf of, the Licensor for the purpose of discussing and improving
- the Work, but excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as \"Not a Contribution.\"\n\n\"Contributor\"
- shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution
- has been received by Licensor and subsequently incorporated within the Work.\n\n2.
- Grant of Copyright License. Subject to the terms and conditions of this License,
- each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
- royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works
- of, publicly display, publicly perform, sublicense, and distribute the Work and
- such Derivative Works in Source or Object form.\n\n3. Grant of Patent License.
- Subject to the terms and conditions of this License, each Contributor hereby grants
- to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made, use, offer
- to sell, sell, import, and otherwise transfer the Work, where such license applies
- only to those patent claims licensable by such Contributor that are necessarily
- infringed by their Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You institute patent
- litigation against any entity (including a cross-claim or counterclaim in a lawsuit)
- alleging that the Work or a Contribution incorporated within the Work constitutes
- direct or contributory patent infringement, then any patent licenses granted to
- You under this License for that Work shall terminate as of the date such litigation
- is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without modifications,
- and in Source or Object form, provided that You meet the following conditions:\n\nYou
- must give any other recipients of the Work or Derivative Works a copy of this
- License; and\n\nYou must cause any modified files to carry prominent notices stating
- that You changed the files; and\n\nYou must retain, in the Source form of any
- Derivative Works that You distribute, all copyright, patent, trademark, and attribution
- notices from the Source form of the Work, excluding those notices that do not
- pertain to any part of the Derivative Works; and\n\nIf the Work includes a \"NOTICE\"
- text file as part of its distribution, then any Derivative Works that You distribute
- must include a readable copy of the attribution notices contained within such
- NOTICE file, excluding those notices that do not pertain to any part of the Derivative
- Works, in at least one of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or documentation, if provided
- along with the Derivative Works; or, within a display generated by the Derivative
- Works, if and wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and do not modify the License.
- You may add Your own attribution notices within Derivative Works that You distribute,
- alongside or as an addendum to the NOTICE text from the Work, provided that such
- additional attribution notices cannot be construed as modifying the License. You
- may add Your own copyright statement to Your modifications and may provide additional
- or different license terms and conditions for use, reproduction, or distribution
- of Your modifications, or for any such Derivative Works as a whole, provided Your
- use, reproduction, and distribution of the Work otherwise complies with the conditions
- stated in this License.\n\n5. Submission of Contributions. Unless You explicitly
- state otherwise, any Contribution intentionally submitted for inclusion in the
- Work by You to the Licensor shall be under the terms and conditions of this License,
- without any additional terms or conditions. Notwithstanding the above, nothing
- herein shall supersede or modify the terms of any separate license agreement you
- may have executed with Licensor regarding such Contributions.\n\n6. Trademarks.
- This License does not grant permission to use the trade names, trademarks, service
- marks, or product names of the Licensor, except as required for reasonable and
- customary use in describing the origin of the Work and reproducing the content
- of the NOTICE file.\n\n7. Disclaimer of Warranty. Unless required by applicable
- law or agreed to in writing, Licensor provides the Work (and each Contributor
- provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied, including, without limitation, any warranties
- or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
- PURPOSE. You are solely responsible for determining the appropriateness of using
- or redistributing the Work and assume any risks associated with Your exercise
- of permissions under this License.\n\n8. Limitation of Liability. In no event
- and under no legal theory, whether in tort (including negligence), contract, or
- otherwise, unless required by applicable law (such as deliberate and grossly negligent
- acts) or agreed to in writing, shall any Contributor be liable to You for damages,
- including any direct, indirect, special, incidental, or consequential damages
- of any character arising as a result of this License or out of the use or inability
- to use the Work (including but not limited to damages for loss of goodwill, work
- stoppage, computer failure or malfunction, or any and all other commercial damages
- or losses), even if such Contributor has been advised of the possibility of such
- damages.\n\n9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer, and charge a fee
- for, acceptance of support, warranty, indemnity, or other liability obligations
- and/or rights consistent with this License. However, in accepting such obligations,
- You may act only on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify, defend, and hold
- each Contributor harmless for any liability incurred by, or claims asserted against,
- such Contributor by reason of your accepting any such warranty or additional liability.\n\nEND
- OF TERMS AND CONDITIONS\n"
-notices: []
diff --git a/.licenses/npm/undici.dep.yml b/.licenses/npm/undici.dep.yml
deleted file mode 100644
index fadecf4a..00000000
--- a/.licenses/npm/undici.dep.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-name: undici
-version: 5.29.0
-type: npm
-summary: An HTTP/1.1 client, written from scratch for Node.js
-homepage: https://undici.nodejs.org
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- MIT License
-
- Copyright (c) Matteo Collina and Undici contributors
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-- sources: README.md
- text: MIT
-notices: []
diff --git a/.licenses/npm/universal-user-agent.dep.yml b/.licenses/npm/universal-user-agent.dep.yml
deleted file mode 100644
index c07307b8..00000000
--- a/.licenses/npm/universal-user-agent.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: universal-user-agent
-version: 6.0.1
-type: npm
-summary: Get a user agent string in both browser and node
-homepage:
-license: isc
-licenses:
-- sources: LICENSE.md
- text: |
- # [ISC License](https://spdx.org/licenses/ISC)
-
- Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)
-
- Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-- sources: README.md
- text: "[ISC](LICENSE.md)"
-notices: []
diff --git a/.licenses/npm/unzip-stream.dep.yml b/.licenses/npm/unzip-stream.dep.yml
deleted file mode 100644
index 087a2c21..00000000
--- a/.licenses/npm/unzip-stream.dep.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: unzip-stream
-version: 0.3.4
-type: npm
-summary: Process zip files using streaming API
-homepage:
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- Copyright (c) 2017 Michal Hruby
- Copyright (c) 2012 - 2013 Near Infinity Corporation
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/util-deprecate.dep.yml b/.licenses/npm/util-deprecate.dep.yml
deleted file mode 100644
index b59b4f73..00000000
--- a/.licenses/npm/util-deprecate.dep.yml
+++ /dev/null
@@ -1,61 +0,0 @@
----
-name: util-deprecate
-version: 1.0.2
-type: npm
-summary: The Node.js `util.deprecate()` function with browser support
-homepage: https://github.com/TooTallNate/util-deprecate
-license: mit
-licenses:
-- sources: LICENSE
- text: |
- (The MIT License)
-
- Copyright (c) 2014 Nathan Rajlich
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
-- sources: README.md
- text: |-
- (The MIT License)
-
- Copyright (c) 2014 Nathan Rajlich
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/which.dep.yml b/.licenses/npm/which.dep.yml
deleted file mode 100644
index 0232a379..00000000
--- a/.licenses/npm/which.dep.yml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-name: which
-version: 2.0.2
-type: npm
-summary: Like which(1) unix command. Find the first instance of an executable in the
- PATH.
-homepage:
-license: isc
-licenses:
-- sources: LICENSE
- text: |
- The ISC License
-
- Copyright (c) Isaac Z. Schlueter and Contributors
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/wrap-ansi-cjs.dep.yml b/.licenses/npm/wrap-ansi-cjs.dep.yml
deleted file mode 100644
index 1abba43f..00000000
--- a/.licenses/npm/wrap-ansi-cjs.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: wrap-ansi-cjs
-version: 7.0.0
-type: npm
-summary: Wordwrap a string with ANSI escape codes
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (https://sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/wrap-ansi.dep.yml b/.licenses/npm/wrap-ansi.dep.yml
deleted file mode 100644
index 7eb9a272..00000000
--- a/.licenses/npm/wrap-ansi.dep.yml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-name: wrap-ansi
-version: 8.1.0
-type: npm
-summary: Wordwrap a string with ANSI escape codes
-homepage:
-license: mit
-licenses:
-- sources: license
- text: |
- MIT License
-
- Copyright (c) Sindre Sorhus (https://sindresorhus.com)
-
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/.licenses/npm/wrappy.dep.yml b/.licenses/npm/wrappy.dep.yml
deleted file mode 100644
index 2a532ec3..00000000
--- a/.licenses/npm/wrappy.dep.yml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-name: wrappy
-version: 1.0.2
-type: npm
-summary: Callback wrapping utility
-homepage: https://github.com/npm/wrappy
-license: isc
-licenses:
-- sources: LICENSE
- text: |
- The ISC License
-
- Copyright (c) Isaac Z. Schlueter and Contributors
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-notices: []
diff --git a/.licenses/npm/zip-stream.dep.yml b/.licenses/npm/zip-stream.dep.yml
deleted file mode 100644
index 53bd4ff5..00000000
--- a/.licenses/npm/zip-stream.dep.yml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-name: zip-stream
-version: 6.0.1
-type: npm
-summary: a streaming zip archive generator.
-homepage: https://github.com/archiverjs/node-zip-stream
-license: mit
-licenses:
-- sources: LICENSE
- text: |-
- Copyright (c) 2014 Chris Talkington, contributors.
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use,
- copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following
- conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
-notices: []
diff --git a/__tests__/merge.test.ts b/__tests__/merge.test.ts
index e4deba27..a252a1e1 100644
--- a/__tests__/merge.test.ts
+++ b/__tests__/merge.test.ts
@@ -1,8 +1,65 @@
-import * as core from '@actions/core'
-import artifact from '@actions/artifact'
-import {run} from '../src/merge/merge-artifacts'
-import {Inputs} from '../src/merge/constants'
-import * as search from '../src/shared/search'
+import {jest, describe, test, expect, beforeEach} from '@jest/globals'
+
+// Mock @actions/github before importing modules that use it
+jest.unstable_mockModule('@actions/github', () => ({
+ context: {
+ repo: {
+ owner: 'actions',
+ repo: 'toolkit'
+ },
+ runId: 123,
+ serverUrl: 'https://github.com'
+ },
+ getOctokit: jest.fn()
+}))
+
+// Mock @actions/core
+jest.unstable_mockModule('@actions/core', () => ({
+ getInput: jest.fn(),
+ getBooleanInput: jest.fn(),
+ setOutput: jest.fn(),
+ setFailed: jest.fn(),
+ setSecret: jest.fn(),
+ info: jest.fn(),
+ warning: jest.fn(),
+ debug: jest.fn(),
+ error: jest.fn(),
+ notice: jest.fn(),
+ startGroup: jest.fn(),
+ endGroup: jest.fn(),
+ isDebug: jest.fn(() => false),
+ getState: jest.fn(),
+ saveState: jest.fn(),
+ exportVariable: jest.fn(),
+ addPath: jest.fn(),
+ group: jest.fn((name: string, fn: () => Promise) => fn()),
+ toPlatformPath: jest.fn((p: string) => p),
+ toWin32Path: jest.fn((p: string) => p),
+ toPosixPath: jest.fn((p: string) => p)
+}))
+
+// Mock fs/promises
+const actualFsPromises = await import('fs/promises')
+jest.unstable_mockModule('fs/promises', () => ({
+ ...actualFsPromises,
+ mkdtemp: jest
+ .fn<() => Promise>()
+ .mockResolvedValue('/tmp/merge-artifact'),
+ rm: jest.fn<() => Promise>().mockResolvedValue(undefined)
+}))
+
+// Mock shared search module
+const mockFindFilesToUpload =
+ jest.fn<() => Promise<{filesToUpload: string[]; rootDirectory: string}>>()
+jest.unstable_mockModule('../src/shared/search.js', () => ({
+ findFilesToUpload: mockFindFilesToUpload
+}))
+
+// Dynamic imports after mocking
+const core = await import('@actions/core')
+const artifact = await import('@actions/artifact')
+const {run} = await import('../src/merge/merge-artifacts.js')
+const {Inputs} = await import('../src/merge/constants.js')
const fixtures = {
artifactName: 'my-merged-artifact',
@@ -34,27 +91,10 @@ const fixtures = {
]
}
-jest.mock('@actions/github', () => ({
- context: {
- repo: {
- owner: 'actions',
- repo: 'toolkit'
- },
- runId: 123,
- serverUrl: 'https://github.com'
- }
-}))
-
-jest.mock('@actions/core')
-
-jest.mock('fs/promises', () => ({
- mkdtemp: jest.fn().mockResolvedValue('/tmp/merge-artifact'),
- rm: jest.fn().mockResolvedValue(undefined)
-}))
-
-/* eslint-disable no-unused-vars */
-const mockInputs = (overrides?: Partial<{[K in Inputs]?: any}>) => {
- const inputs = {
+const mockInputs = (
+ overrides?: Partial<{[K in (typeof Inputs)[keyof typeof Inputs]]?: any}>
+) => {
+ const inputs: Record = {
[Inputs.Name]: 'my-merged-artifact',
[Inputs.Pattern]: '*',
[Inputs.SeparateDirectories]: false,
@@ -64,10 +104,14 @@ const mockInputs = (overrides?: Partial<{[K in Inputs]?: any}>) => {
...overrides
}
- ;(core.getInput as jest.Mock).mockImplementation((name: string) => {
- return inputs[name]
- })
- ;(core.getBooleanInput as jest.Mock).mockImplementation((name: string) => {
+ ;(core.getInput as jest.Mock).mockImplementation(
+ (name: string) => {
+ return inputs[name]
+ }
+ )
+ ;(
+ core.getBooleanInput as jest.Mock
+ ).mockImplementation((name: string) => {
return inputs[name]
})
@@ -77,44 +121,45 @@ const mockInputs = (overrides?: Partial<{[K in Inputs]?: any}>) => {
describe('merge', () => {
beforeEach(async () => {
mockInputs()
+ jest.clearAllMocks()
jest
- .spyOn(artifact, 'listArtifacts')
+ .spyOn(artifact.default, 'listArtifacts')
.mockResolvedValue({artifacts: fixtures.artifacts})
- jest.spyOn(artifact, 'downloadArtifact').mockResolvedValue({
+ jest.spyOn(artifact.default, 'downloadArtifact').mockResolvedValue({
downloadPath: fixtures.tmpDirectory
})
- jest.spyOn(search, 'findFilesToUpload').mockResolvedValue({
+ mockFindFilesToUpload.mockResolvedValue({
filesToUpload: fixtures.filesToUpload,
rootDirectory: fixtures.tmpDirectory
})
- jest.spyOn(artifact, 'uploadArtifact').mockResolvedValue({
+ jest.spyOn(artifact.default, 'uploadArtifact').mockResolvedValue({
size: 123,
id: 1337
})
jest
- .spyOn(artifact, 'deleteArtifact')
- .mockImplementation(async artifactName => {
- const artifact = fixtures.artifacts.find(a => a.name === artifactName)
- if (!artifact) throw new Error(`Artifact ${artifactName} not found`)
- return {id: artifact.id}
+ .spyOn(artifact.default, 'deleteArtifact')
+ .mockImplementation(async (artifactName: string) => {
+ const found = fixtures.artifacts.find(a => a.name === artifactName)
+ if (!found) throw new Error(`Artifact ${artifactName} not found`)
+ return {id: found.id}
})
})
- it('merges artifacts', async () => {
+ test('merges artifacts', async () => {
await run()
for (const a of fixtures.artifacts) {
- expect(artifact.downloadArtifact).toHaveBeenCalledWith(a.id, {
+ expect(artifact.default.downloadArtifact).toHaveBeenCalledWith(a.id, {
path: fixtures.tmpDirectory
})
}
- expect(artifact.uploadArtifact).toHaveBeenCalledWith(
+ expect(artifact.default.uploadArtifact).toHaveBeenCalledWith(
fixtures.artifactName,
fixtures.filesToUpload,
fixtures.tmpDirectory,
@@ -122,23 +167,23 @@ describe('merge', () => {
)
})
- it('fails if no artifacts found', async () => {
+ test('fails if no artifacts found', async () => {
mockInputs({[Inputs.Pattern]: 'this-does-not-match'})
- expect(run()).rejects.toThrow()
+ await expect(run()).rejects.toThrow()
- expect(artifact.uploadArtifact).not.toBeCalled()
- expect(artifact.downloadArtifact).not.toBeCalled()
+ expect(artifact.default.uploadArtifact).not.toHaveBeenCalled()
+ expect(artifact.default.downloadArtifact).not.toHaveBeenCalled()
})
- it('supports custom compression level', async () => {
+ test('supports custom compression level', async () => {
mockInputs({
[Inputs.CompressionLevel]: 2
})
await run()
- expect(artifact.uploadArtifact).toHaveBeenCalledWith(
+ expect(artifact.default.uploadArtifact).toHaveBeenCalledWith(
fixtures.artifactName,
fixtures.filesToUpload,
fixtures.tmpDirectory,
@@ -146,14 +191,14 @@ describe('merge', () => {
)
})
- it('supports custom retention days', async () => {
+ test('supports custom retention days', async () => {
mockInputs({
[Inputs.RetentionDays]: 7
})
await run()
- expect(artifact.uploadArtifact).toHaveBeenCalledWith(
+ expect(artifact.default.uploadArtifact).toHaveBeenCalledWith(
fixtures.artifactName,
fixtures.filesToUpload,
fixtures.tmpDirectory,
@@ -161,7 +206,7 @@ describe('merge', () => {
)
})
- it('supports deleting artifacts after merge', async () => {
+ test('supports deleting artifacts after merge', async () => {
mockInputs({
[Inputs.DeleteMerged]: true
})
@@ -169,7 +214,7 @@ describe('merge', () => {
await run()
for (const a of fixtures.artifacts) {
- expect(artifact.deleteArtifact).toHaveBeenCalledWith(a.name)
+ expect(artifact.default.deleteArtifact).toHaveBeenCalledWith(a.name)
}
})
})
diff --git a/__tests__/search.test.ts b/__tests__/search.test.ts
index 58f41ab0..a6285d9d 100644
--- a/__tests__/search.test.ts
+++ b/__tests__/search.test.ts
@@ -1,8 +1,37 @@
-import * as core from '@actions/core'
+import {jest, describe, test, expect, beforeAll} from '@jest/globals'
import * as path from 'path'
import * as io from '@actions/io'
import {promises as fs} from 'fs'
-import {findFilesToUpload} from '../src/shared/search'
+import {fileURLToPath} from 'url'
+
+// Mock @actions/core to suppress output during tests
+jest.unstable_mockModule('@actions/core', () => ({
+ getInput: jest.fn(),
+ getBooleanInput: jest.fn(),
+ setOutput: jest.fn(),
+ setFailed: jest.fn(),
+ setSecret: jest.fn(),
+ info: jest.fn(),
+ warning: jest.fn(),
+ debug: jest.fn(),
+ error: jest.fn(),
+ notice: jest.fn(),
+ startGroup: jest.fn(),
+ endGroup: jest.fn(),
+ isDebug: jest.fn(() => false),
+ getState: jest.fn(),
+ saveState: jest.fn(),
+ exportVariable: jest.fn(),
+ addPath: jest.fn(),
+ group: jest.fn((name: string, fn: () => Promise) => fn()),
+ toPlatformPath: jest.fn((p: string) => p),
+ toWin32Path: jest.fn((p: string) => p),
+ toPosixPath: jest.fn((p: string) => p)
+}))
+
+const {findFilesToUpload} = await import('../src/shared/search.js')
+
+const __dirname = path.dirname(fileURLToPath(import.meta.url))
const root = path.join(__dirname, '_temp', 'search')
const searchItem1Path = path.join(
@@ -77,11 +106,8 @@ const fileInHiddenFolderInFolderA = path.join(
describe('Search', () => {
beforeAll(async () => {
- // mock all output so that there is less noise when running tests
+ // mock console.log to reduce noise
jest.spyOn(console, 'log').mockImplementation(() => {})
- jest.spyOn(core, 'debug').mockImplementation(() => {})
- jest.spyOn(core, 'info').mockImplementation(() => {})
- jest.spyOn(core, 'warning').mockImplementation(() => {})
// clear temp directory
await io.rmRF(root)
@@ -136,43 +162,9 @@ describe('Search', () => {
await fs.writeFile(hiddenFile, 'hidden file')
await fs.writeFile(fileInHiddenFolderPath, 'file in hidden directory')
await fs.writeFile(fileInHiddenFolderInFolderA, 'file in hidden directory')
- /*
- Directory structure of files that get created:
- root/
- .hidden-folder/
- folder-in-hidden-folder/
- file.txt
- folder-a/
- .hidden-folder-in-folder-a/
- file.txt
- folder-b/
- folder-c/
- search-item1.txt
- extraSearch-item1.txt
- extra-file-in-folder-c.txt
- folder-e/
- folder-d/
- search-item2.txt
- search-item3.txt
- search-item4.txt
- extraSearch-item2.txt
- folder-f/
- extraSearch-item3.txt
- folder-g/
- folder-h/
- amazing-item.txt
- folder-i/
- extraSearch-item4.txt
- extraSearch-item5.txt
- folder-j/
- folder-k/
- lonely-file.txt
- .hidden-file.txt
- search-item5.txt
- */
})
- it('Single file search - Absolute Path', async () => {
+ test('Single file search - Absolute Path', async () => {
const searchResult = await findFilesToUpload(extraFileInFolderCPath)
expect(searchResult.filesToUpload.length).toEqual(1)
expect(searchResult.filesToUpload[0]).toEqual(extraFileInFolderCPath)
@@ -181,7 +173,7 @@ describe('Search', () => {
)
})
- it('Single file search - Relative Path', async () => {
+ test('Single file search - Relative Path', async () => {
const relativePath = path.join(
'__tests__',
'_temp',
@@ -200,7 +192,7 @@ describe('Search', () => {
)
})
- it('Single file using wildcard', async () => {
+ test('Single file using wildcard', async () => {
const expectedRoot = path.join(root, 'folder-h')
const searchPath = path.join(root, 'folder-h', '**/*lonely*')
const searchResult = await findFilesToUpload(searchPath)
@@ -209,7 +201,7 @@ describe('Search', () => {
expect(searchResult.rootDirectory).toEqual(expectedRoot)
})
- it('Single file using directory', async () => {
+ test('Single file using directory', async () => {
const searchPath = path.join(root, 'folder-h', 'folder-j')
const searchResult = await findFilesToUpload(searchPath)
expect(searchResult.filesToUpload.length).toEqual(1)
@@ -217,7 +209,7 @@ describe('Search', () => {
expect(searchResult.rootDirectory).toEqual(searchPath)
})
- it('Directory search - Absolute Path', async () => {
+ test('Directory search - Absolute Path', async () => {
const searchPath = path.join(root, 'folder-h')
const searchResult = await findFilesToUpload(searchPath)
expect(searchResult.filesToUpload.length).toEqual(4)
@@ -236,7 +228,7 @@ describe('Search', () => {
expect(searchResult.rootDirectory).toEqual(searchPath)
})
- it('Directory search - Relative Path', async () => {
+ test('Directory search - Relative Path', async () => {
const searchPath = path.join('__tests__', '_temp', 'search', 'folder-h')
const expectedRootDirectory = path.join(root, 'folder-h')
const searchResult = await findFilesToUpload(searchPath)
@@ -256,7 +248,7 @@ describe('Search', () => {
expect(searchResult.rootDirectory).toEqual(expectedRootDirectory)
})
- it('Wildcard search - Absolute Path', async () => {
+ test('Wildcard search - Absolute Path', async () => {
const searchPath = path.join(root, '**/*[Ss]earch*')
const searchResult = await findFilesToUpload(searchPath)
expect(searchResult.filesToUpload.length).toEqual(10)
@@ -285,7 +277,7 @@ describe('Search', () => {
expect(searchResult.rootDirectory).toEqual(root)
})
- it('Wildcard search - Relative Path', async () => {
+ test('Wildcard search - Relative Path', async () => {
const searchPath = path.join(
'__tests__',
'_temp',
@@ -319,11 +311,11 @@ describe('Search', () => {
expect(searchResult.rootDirectory).toEqual(root)
})
- it('Multi path search - root directory', async () => {
+ test('Multi path search - root directory', async () => {
const searchPath1 = path.join(root, 'folder-a')
const searchPath2 = path.join(root, 'folder-d')
- const searchPaths = searchPath1 + '\n' + searchPath2
+ const searchPaths = `${searchPath1}\n${searchPath2}`
const searchResult = await findFilesToUpload(searchPaths)
expect(searchResult.rootDirectory).toEqual(root)
@@ -343,13 +335,13 @@ describe('Search', () => {
)
})
- it('Multi path search - with exclude character', async () => {
+ test('Multi path search - with exclude character', async () => {
const searchPath1 = path.join(root, 'folder-a')
const searchPath2 = path.join(root, 'folder-d')
const searchPath3 = path.join(root, 'folder-a', 'folder-b', '**/extra*.txt')
// negating the third search path
- const searchPaths = searchPath1 + '\n' + searchPath2 + '\n!' + searchPath3
+ const searchPaths = `${searchPath1}\n${searchPath2}\n!${searchPath3}`
const searchResult = await findFilesToUpload(searchPaths)
expect(searchResult.rootDirectory).toEqual(root)
@@ -363,7 +355,7 @@ describe('Search', () => {
)
})
- it('Multi path search - non root directory', async () => {
+ test('Multi path search - non root directory', async () => {
const searchPath1 = path.join(root, 'folder-h', 'folder-i')
const searchPath2 = path.join(root, 'folder-h', 'folder-j', 'folder-k')
const searchPath3 = amazingFileInFolderHPath
@@ -385,7 +377,7 @@ describe('Search', () => {
expect(searchResult.filesToUpload.includes(lonelyFilePath)).toEqual(true)
})
- it('Hidden files ignored by default', async () => {
+ test('Hidden files ignored by default', async () => {
const searchPath = path.join(root, '**/*')
const searchResult = await findFilesToUpload(searchPath)
@@ -396,7 +388,7 @@ describe('Search', () => {
)
})
- it('Hidden files included', async () => {
+ test('Hidden files included', async () => {
const searchPath = path.join(root, '**/*')
const searchResult = await findFilesToUpload(searchPath, true)
diff --git a/__tests__/upload.test.ts b/__tests__/upload.test.ts
index b7e7133f..de81a1c9 100644
--- a/__tests__/upload.test.ts
+++ b/__tests__/upload.test.ts
@@ -1,20 +1,7 @@
-import * as core from '@actions/core'
-import * as github from '@actions/github'
-import artifact, {ArtifactNotFoundError} from '@actions/artifact'
-import {run} from '../src/upload/upload-artifact'
-import {Inputs} from '../src/upload/constants'
-import * as search from '../src/shared/search'
+import {jest, describe, test, expect, beforeEach} from '@jest/globals'
-const fixtures = {
- artifactName: 'artifact-name',
- rootDirectory: '/some/artifact/path',
- filesToUpload: [
- '/some/artifact/path/file1.txt',
- '/some/artifact/path/file2.txt'
- ]
-}
-
-jest.mock('@actions/github', () => ({
+// Mock @actions/github before importing modules that use it
+jest.unstable_mockModule('@actions/github', () => ({
context: {
repo: {
owner: 'actions',
@@ -22,27 +9,81 @@ jest.mock('@actions/github', () => ({
},
runId: 123,
serverUrl: 'https://github.com'
- }
+ },
+ getOctokit: jest.fn()
+}))
+
+// Mock @actions/core
+jest.unstable_mockModule('@actions/core', () => ({
+ getInput: jest.fn(),
+ getBooleanInput: jest.fn(),
+ setOutput: jest.fn(),
+ setFailed: jest.fn(),
+ setSecret: jest.fn(),
+ info: jest.fn(),
+ warning: jest.fn(),
+ debug: jest.fn(),
+ error: jest.fn(),
+ notice: jest.fn(),
+ startGroup: jest.fn(),
+ endGroup: jest.fn(),
+ isDebug: jest.fn(() => false),
+ getState: jest.fn(),
+ saveState: jest.fn(),
+ exportVariable: jest.fn(),
+ addPath: jest.fn(),
+ group: jest.fn((name: string, fn: () => Promise) => fn()),
+ toPlatformPath: jest.fn((p: string) => p),
+ toWin32Path: jest.fn((p: string) => p),
+ toPosixPath: jest.fn((p: string) => p)
+}))
+
+// Mock shared search module
+const mockFindFilesToUpload =
+ jest.fn<() => Promise<{filesToUpload: string[]; rootDirectory: string}>>()
+jest.unstable_mockModule('../src/shared/search.js', () => ({
+ findFilesToUpload: mockFindFilesToUpload
}))
-jest.mock('@actions/core')
+// Dynamic imports after mocking
+const core = await import('@actions/core')
+const github = await import('@actions/github')
+const artifact = await import('@actions/artifact')
+const {run} = await import('../src/upload/upload-artifact.js')
+const {Inputs} = await import('../src/upload/constants.js')
+const {ArtifactNotFoundError} = artifact
+
+const fixtures = {
+ artifactName: 'artifact-name',
+ rootDirectory: '/some/artifact/path',
+ filesToUpload: [
+ '/some/artifact/path/file1.txt',
+ '/some/artifact/path/file2.txt'
+ ]
+}
-/* eslint-disable no-unused-vars */
-const mockInputs = (overrides?: Partial<{[K in Inputs]?: any}>) => {
- const inputs = {
+const mockInputs = (
+ overrides?: Partial<{[K in (typeof Inputs)[keyof typeof Inputs]]?: any}>
+) => {
+ const inputs: Record = {
[Inputs.Name]: 'artifact-name',
[Inputs.Path]: '/some/artifact/path',
[Inputs.IfNoFilesFound]: 'warn',
[Inputs.RetentionDays]: 0,
[Inputs.CompressionLevel]: 6,
[Inputs.Overwrite]: false,
+ [Inputs.Archive]: true,
...overrides
}
- ;(core.getInput as jest.Mock).mockImplementation((name: string) => {
- return inputs[name]
- })
- ;(core.getBooleanInput as jest.Mock).mockImplementation((name: string) => {
+ ;(core.getInput as jest.Mock).mockImplementation(
+ (name: string) => {
+ return inputs[name]
+ }
+ )
+ ;(
+ core.getBooleanInput as jest.Mock
+ ).mockImplementation((name: string) => {
return inputs[name]
})
@@ -52,28 +93,29 @@ const mockInputs = (overrides?: Partial<{[K in Inputs]?: any}>) => {
describe('upload', () => {
beforeEach(async () => {
mockInputs()
+ jest.clearAllMocks()
- jest.spyOn(search, 'findFilesToUpload').mockResolvedValue({
+ mockFindFilesToUpload.mockResolvedValue({
filesToUpload: fixtures.filesToUpload,
rootDirectory: fixtures.rootDirectory
})
- jest.spyOn(artifact, 'uploadArtifact').mockResolvedValue({
+ jest.spyOn(artifact.default, 'uploadArtifact').mockResolvedValue({
size: 123,
id: 1337,
digest: 'facefeed'
})
})
- it('uploads a single file', async () => {
- jest.spyOn(search, 'findFilesToUpload').mockResolvedValue({
+ test('uploads a single file', async () => {
+ mockFindFilesToUpload.mockResolvedValue({
filesToUpload: [fixtures.filesToUpload[0]],
rootDirectory: fixtures.rootDirectory
})
await run()
- expect(artifact.uploadArtifact).toHaveBeenCalledWith(
+ expect(artifact.default.uploadArtifact).toHaveBeenCalledWith(
fixtures.artifactName,
[fixtures.filesToUpload[0]],
fixtures.rootDirectory,
@@ -81,10 +123,10 @@ describe('upload', () => {
)
})
- it('uploads multiple files', async () => {
+ test('uploads multiple files', async () => {
await run()
- expect(artifact.uploadArtifact).toHaveBeenCalledWith(
+ expect(artifact.default.uploadArtifact).toHaveBeenCalledWith(
fixtures.artifactName,
fixtures.filesToUpload,
fixtures.rootDirectory,
@@ -92,27 +134,25 @@ describe('upload', () => {
)
})
- it('sets outputs', async () => {
+ test('sets outputs', async () => {
await run()
expect(core.setOutput).toHaveBeenCalledWith('artifact-id', 1337)
expect(core.setOutput).toHaveBeenCalledWith('artifact-digest', 'facefeed')
expect(core.setOutput).toHaveBeenCalledWith(
'artifact-url',
- `${github.context.serverUrl}/${github.context.repo.owner}/${
- github.context.repo.repo
- }/actions/runs/${github.context.runId}/artifacts/${1337}`
+ `${github.context.serverUrl}/${github.context.repo.owner}/${github.context.repo.repo}/actions/runs/${github.context.runId}/artifacts/${1337}`
)
})
- it('supports custom compression level', async () => {
+ test('supports custom compression level', async () => {
mockInputs({
[Inputs.CompressionLevel]: 2
})
await run()
- expect(artifact.uploadArtifact).toHaveBeenCalledWith(
+ expect(artifact.default.uploadArtifact).toHaveBeenCalledWith(
fixtures.artifactName,
fixtures.filesToUpload,
fixtures.rootDirectory,
@@ -120,14 +160,14 @@ describe('upload', () => {
)
})
- it('supports custom retention days', async () => {
+ test('supports custom retention days', async () => {
mockInputs({
[Inputs.RetentionDays]: 7
})
await run()
- expect(artifact.uploadArtifact).toHaveBeenCalledWith(
+ expect(artifact.default.uploadArtifact).toHaveBeenCalledWith(
fixtures.artifactName,
fixtures.filesToUpload,
fixtures.rootDirectory,
@@ -135,12 +175,12 @@ describe('upload', () => {
)
})
- it('supports warn if-no-files-found', async () => {
+ test('supports warn if-no-files-found', async () => {
mockInputs({
[Inputs.IfNoFilesFound]: 'warn'
})
- jest.spyOn(search, 'findFilesToUpload').mockResolvedValue({
+ mockFindFilesToUpload.mockResolvedValue({
filesToUpload: [],
rootDirectory: fixtures.rootDirectory
})
@@ -152,12 +192,12 @@ describe('upload', () => {
)
})
- it('supports error if-no-files-found', async () => {
+ test('supports error if-no-files-found', async () => {
mockInputs({
[Inputs.IfNoFilesFound]: 'error'
})
- jest.spyOn(search, 'findFilesToUpload').mockResolvedValue({
+ mockFindFilesToUpload.mockResolvedValue({
filesToUpload: [],
rootDirectory: fixtures.rootDirectory
})
@@ -169,12 +209,12 @@ describe('upload', () => {
)
})
- it('supports ignore if-no-files-found', async () => {
+ test('supports ignore if-no-files-found', async () => {
mockInputs({
[Inputs.IfNoFilesFound]: 'ignore'
})
- jest.spyOn(search, 'findFilesToUpload').mockResolvedValue({
+ mockFindFilesToUpload.mockResolvedValue({
filesToUpload: [],
rootDirectory: fixtures.rootDirectory
})
@@ -186,48 +226,105 @@ describe('upload', () => {
)
})
- it('supports overwrite', async () => {
+ test('supports overwrite', async () => {
mockInputs({
[Inputs.Overwrite]: true
})
- jest.spyOn(artifact, 'deleteArtifact').mockResolvedValue({
+ jest.spyOn(artifact.default, 'deleteArtifact').mockResolvedValue({
id: 1337
})
await run()
- expect(artifact.uploadArtifact).toHaveBeenCalledWith(
+ expect(artifact.default.uploadArtifact).toHaveBeenCalledWith(
fixtures.artifactName,
fixtures.filesToUpload,
fixtures.rootDirectory,
{compressionLevel: 6}
)
- expect(artifact.deleteArtifact).toHaveBeenCalledWith(fixtures.artifactName)
+ expect(artifact.default.deleteArtifact).toHaveBeenCalledWith(
+ fixtures.artifactName
+ )
})
- it('supports overwrite and continues if not found', async () => {
+ test('supports overwrite and continues if not found', async () => {
mockInputs({
[Inputs.Overwrite]: true
})
jest
- .spyOn(artifact, 'deleteArtifact')
+ .spyOn(artifact.default, 'deleteArtifact')
.mockRejectedValue(new ArtifactNotFoundError('not found'))
await run()
- expect(artifact.uploadArtifact).toHaveBeenCalledWith(
+ expect(artifact.default.uploadArtifact).toHaveBeenCalledWith(
fixtures.artifactName,
fixtures.filesToUpload,
fixtures.rootDirectory,
{compressionLevel: 6}
)
- expect(artifact.deleteArtifact).toHaveBeenCalledWith(fixtures.artifactName)
+ expect(artifact.default.deleteArtifact).toHaveBeenCalledWith(
+ fixtures.artifactName
+ )
expect(core.debug).toHaveBeenCalledWith(
`Skipping deletion of '${fixtures.artifactName}', it does not exist`
)
})
+
+ test('passes skipArchive when archive is false', async () => {
+ mockInputs({
+ [Inputs.Archive]: false
+ })
+
+ mockFindFilesToUpload.mockResolvedValue({
+ filesToUpload: [fixtures.filesToUpload[0]],
+ rootDirectory: fixtures.rootDirectory
+ })
+
+ await run()
+
+ expect(artifact.default.uploadArtifact).toHaveBeenCalledWith(
+ fixtures.artifactName,
+ [fixtures.filesToUpload[0]],
+ fixtures.rootDirectory,
+ {compressionLevel: 6, skipArchive: true}
+ )
+ })
+
+ test('does not pass skipArchive when archive is true', async () => {
+ mockInputs({
+ [Inputs.Archive]: true
+ })
+
+ mockFindFilesToUpload.mockResolvedValue({
+ filesToUpload: [fixtures.filesToUpload[0]],
+ rootDirectory: fixtures.rootDirectory
+ })
+
+ await run()
+
+ expect(artifact.default.uploadArtifact).toHaveBeenCalledWith(
+ fixtures.artifactName,
+ [fixtures.filesToUpload[0]],
+ fixtures.rootDirectory,
+ {compressionLevel: 6}
+ )
+ })
+
+ test('fails when archive is false and multiple files are provided', async () => {
+ mockInputs({
+ [Inputs.Archive]: false
+ })
+
+ await run()
+
+ expect(core.setFailed).toHaveBeenCalledWith(
+ `When 'archive' is set to false, only a single file can be uploaded. Found ${fixtures.filesToUpload.length} files to upload.`
+ )
+ expect(artifact.default.uploadArtifact).not.toHaveBeenCalled()
+ })
})
diff --git a/action.yml b/action.yml
index 28f04cc6..7cb4d1e8 100644
--- a/action.yml
+++ b/action.yml
@@ -3,10 +3,10 @@ description: 'Upload a build artifact that can be used by subsequent workflow st
author: 'GitHub'
inputs:
name:
- description: 'Artifact name'
+ description: 'Artifact name. If the `archive` input is `false`, the name of the file uploaded will be the artifact name.'
default: 'artifact'
path:
- description: 'A file, directory or wildcard pattern that describes what to upload'
+ description: 'A file, directory or wildcard pattern that describes what to upload.'
required: true
if-no-files-found:
description: >
@@ -45,6 +45,12 @@ inputs:
If true, hidden files will be included in the artifact.
If false, hidden files will be excluded from the artifact.
default: 'false'
+ archive:
+ description: >
+ If true, the artifact will be archived (zipped) before uploading.
+ If false, the artifact will be uploaded as-is without archiving.
+ When `archive` is `false`, only a single file can be uploaded. The name of the file will be used as the artifact name (ignoring the `name` parameter).
+ default: 'true'
outputs:
artifact-id:
diff --git a/dist/merge/index.js b/dist/merge/index.js
index e14b3b36..3b522d47 100644
--- a/dist/merge/index.js
+++ b/dist/merge/index.js
@@ -1,11 +1,11 @@
-/******/ (() => { // webpackBootstrap
-/******/ var __webpack_modules__ = ({
+import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module";
+/******/ var __webpack_modules__ = ({
-/***/ 79450:
+/***/ 9659:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-"use strict";
+/* eslint-disable @typescript-eslint/no-explicit-any */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -17,3559 +17,2126 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
-var __exportStar = (this && this.__exportStar) || function(m, exports) {
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || (function () {
+ var ownKeys = function(o) {
+ ownKeys = Object.getOwnPropertyNames || function (o) {
+ var ar = [];
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
+ return ar;
+ };
+ return ownKeys(o);
+ };
+ return function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
+ __setModuleDefault(result, mod);
+ return result;
+ };
+})();
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-const client_1 = __nccwpck_require__(46190);
-__exportStar(__nccwpck_require__(15769), exports);
-__exportStar(__nccwpck_require__(38182), exports);
-__exportStar(__nccwpck_require__(46190), exports);
-const client = new client_1.DefaultArtifactClient();
-exports["default"] = client;
-//# sourceMappingURL=artifact.js.map
-
-/***/ }),
-
-/***/ 54622:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.Timestamp = void 0;
-const runtime_1 = __nccwpck_require__(4061);
-const runtime_2 = __nccwpck_require__(4061);
-const runtime_3 = __nccwpck_require__(4061);
-const runtime_4 = __nccwpck_require__(4061);
-const runtime_5 = __nccwpck_require__(4061);
-const runtime_6 = __nccwpck_require__(4061);
-const runtime_7 = __nccwpck_require__(4061);
-// @generated message type with reflection information, may provide speed optimized methods
-class Timestamp$Type extends runtime_7.MessageType {
- constructor() {
- super("google.protobuf.Timestamp", [
- { no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
- { no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
- ]);
- }
- /**
- * Creates a new `Timestamp` for the current time.
- */
- now() {
- const msg = this.create();
- const ms = Date.now();
- msg.seconds = runtime_6.PbLong.from(Math.floor(ms / 1000)).toString();
- msg.nanos = (ms % 1000) * 1000000;
- return msg;
- }
- /**
- * Converts a `Timestamp` to a JavaScript Date.
- */
- toDate(message) {
- return new Date(runtime_6.PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000));
- }
- /**
- * Converts a JavaScript Date to a `Timestamp`.
- */
- fromDate(date) {
- const msg = this.create();
- const ms = date.getTime();
- msg.seconds = runtime_6.PbLong.from(Math.floor(ms / 1000)).toString();
- msg.nanos = (ms % 1000) * 1000000;
- return msg;
+exports.HttpClient = exports.HttpClientResponse = exports.HttpClientError = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
+exports.getProxyUrl = getProxyUrl;
+exports.isHttps = isHttps;
+const http = __importStar(__nccwpck_require__(8611));
+const https = __importStar(__nccwpck_require__(5692));
+const pm = __importStar(__nccwpck_require__(3335));
+const tunnel = __importStar(__nccwpck_require__(770));
+const undici_1 = __nccwpck_require__(6752);
+var HttpCodes;
+(function (HttpCodes) {
+ HttpCodes[HttpCodes["OK"] = 200] = "OK";
+ HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices";
+ HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently";
+ HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved";
+ HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther";
+ HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified";
+ HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy";
+ HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy";
+ HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect";
+ HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect";
+ HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest";
+ HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized";
+ HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired";
+ HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden";
+ HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound";
+ HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed";
+ HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable";
+ HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
+ HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout";
+ HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict";
+ HttpCodes[HttpCodes["Gone"] = 410] = "Gone";
+ HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests";
+ HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError";
+ HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented";
+ HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway";
+ HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
+ HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
+})(HttpCodes || (exports.HttpCodes = HttpCodes = {}));
+var Headers;
+(function (Headers) {
+ Headers["Accept"] = "accept";
+ Headers["ContentType"] = "content-type";
+})(Headers || (exports.Headers = Headers = {}));
+var MediaTypes;
+(function (MediaTypes) {
+ MediaTypes["ApplicationJson"] = "application/json";
+})(MediaTypes || (exports.MediaTypes = MediaTypes = {}));
+/**
+ * Returns the proxy URL, depending upon the supplied url and proxy environment variables.
+ * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
+ */
+function getProxyUrl(serverUrl) {
+ const proxyUrl = pm.getProxyUrl(new URL(serverUrl));
+ return proxyUrl ? proxyUrl.href : '';
+}
+const HttpRedirectCodes = [
+ HttpCodes.MovedPermanently,
+ HttpCodes.ResourceMoved,
+ HttpCodes.SeeOther,
+ HttpCodes.TemporaryRedirect,
+ HttpCodes.PermanentRedirect
+];
+const HttpResponseRetryCodes = [
+ HttpCodes.BadGateway,
+ HttpCodes.ServiceUnavailable,
+ HttpCodes.GatewayTimeout
+];
+const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
+const ExponentialBackoffCeiling = 10;
+const ExponentialBackoffTimeSlice = 5;
+class HttpClientError extends Error {
+ constructor(message, statusCode) {
+ super(message);
+ this.name = 'HttpClientError';
+ this.statusCode = statusCode;
+ Object.setPrototypeOf(this, HttpClientError.prototype);
}
- /**
- * In JSON format, the `Timestamp` type is encoded as a string
- * in the RFC 3339 format.
- */
- internalJsonWrite(message, options) {
- let ms = runtime_6.PbLong.from(message.seconds).toNumber() * 1000;
- if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
- throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
- if (message.nanos < 0)
- throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");
- let z = "Z";
- if (message.nanos > 0) {
- let nanosStr = (message.nanos + 1000000000).toString().substring(1);
- if (nanosStr.substring(3) === "000000")
- z = "." + nanosStr.substring(0, 3) + "Z";
- else if (nanosStr.substring(6) === "000")
- z = "." + nanosStr.substring(0, 6) + "Z";
- else
- z = "." + nanosStr + "Z";
- }
- return new Date(ms).toISOString().replace(".000Z", z);
+}
+exports.HttpClientError = HttpClientError;
+class HttpClientResponse {
+ constructor(message) {
+ this.message = message;
}
- /**
- * In JSON format, the `Timestamp` type is encoded as a string
- * in the RFC 3339 format.
- */
- internalJsonRead(json, options, target) {
- if (typeof json !== "string")
- throw new Error("Unable to parse Timestamp from JSON " + (0, runtime_5.typeofJsonValue)(json) + ".");
- let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
- if (!matches)
- throw new Error("Unable to parse Timestamp from JSON. Invalid format.");
- let ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z"));
- if (Number.isNaN(ms))
- throw new Error("Unable to parse Timestamp from JSON. Invalid value.");
- if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
- throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
- if (!target)
- target = this.create();
- target.seconds = runtime_6.PbLong.from(ms / 1000).toString();
- target.nanos = 0;
- if (matches[7])
- target.nanos = (parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1000000000);
- return target;
+ readBody() {
+ return __awaiter(this, void 0, void 0, function* () {
+ return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
+ let output = Buffer.alloc(0);
+ this.message.on('data', (chunk) => {
+ output = Buffer.concat([output, chunk]);
+ });
+ this.message.on('end', () => {
+ resolve(output.toString());
+ });
+ }));
+ });
}
- create(value) {
- const message = { seconds: "0", nanos: 0 };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
+ readBodyBuffer() {
+ return __awaiter(this, void 0, void 0, function* () {
+ return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
+ const chunks = [];
+ this.message.on('data', (chunk) => {
+ chunks.push(chunk);
+ });
+ this.message.on('end', () => {
+ resolve(Buffer.concat(chunks));
+ });
+ }));
+ });
}
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* int64 seconds */ 1:
- message.seconds = reader.int64().toString();
- break;
- case /* int32 nanos */ 2:
- message.nanos = reader.int32();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
+}
+exports.HttpClientResponse = HttpClientResponse;
+function isHttps(requestUrl) {
+ const parsedUrl = new URL(requestUrl);
+ return parsedUrl.protocol === 'https:';
+}
+class HttpClient {
+ constructor(userAgent, handlers, requestOptions) {
+ this._ignoreSslError = false;
+ this._allowRedirects = true;
+ this._allowRedirectDowngrade = false;
+ this._maxRedirects = 50;
+ this._allowRetries = false;
+ this._maxRetries = 1;
+ this._keepAlive = false;
+ this._disposed = false;
+ this.userAgent = this._getUserAgentWithOrchestrationId(userAgent);
+ this.handlers = handlers || [];
+ this.requestOptions = requestOptions;
+ if (requestOptions) {
+ if (requestOptions.ignoreSslError != null) {
+ this._ignoreSslError = requestOptions.ignoreSslError;
+ }
+ this._socketTimeout = requestOptions.socketTimeout;
+ if (requestOptions.allowRedirects != null) {
+ this._allowRedirects = requestOptions.allowRedirects;
+ }
+ if (requestOptions.allowRedirectDowngrade != null) {
+ this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
+ }
+ if (requestOptions.maxRedirects != null) {
+ this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
+ }
+ if (requestOptions.keepAlive != null) {
+ this._keepAlive = requestOptions.keepAlive;
+ }
+ if (requestOptions.allowRetries != null) {
+ this._allowRetries = requestOptions.allowRetries;
+ }
+ if (requestOptions.maxRetries != null) {
+ this._maxRetries = requestOptions.maxRetries;
}
}
- return message;
}
- internalBinaryWrite(message, writer, options) {
- /* int64 seconds = 1; */
- if (message.seconds !== "0")
- writer.tag(1, runtime_1.WireType.Varint).int64(message.seconds);
- /* int32 nanos = 2; */
- if (message.nanos !== 0)
- writer.tag(2, runtime_1.WireType.Varint).int32(message.nanos);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
-}
-/**
- * @generated MessageType for protobuf message google.protobuf.Timestamp
- */
-exports.Timestamp = new Timestamp$Type();
-//# sourceMappingURL=timestamp.js.map
-
-/***/ }),
-
-/***/ 8626:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.BytesValue = exports.StringValue = exports.BoolValue = exports.UInt32Value = exports.Int32Value = exports.UInt64Value = exports.Int64Value = exports.FloatValue = exports.DoubleValue = void 0;
-// @generated by protobuf-ts 2.9.1 with parameter long_type_string,client_none,generate_dependencies
-// @generated from protobuf file "google/protobuf/wrappers.proto" (package "google.protobuf", syntax proto3)
-// tslint:disable
-//
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-//
-// Wrappers for primitive (non-message) types. These types are useful
-// for embedding primitives in the `google.protobuf.Any` type and for places
-// where we need to distinguish between the absence of a primitive
-// typed field and its default value.
-//
-const runtime_1 = __nccwpck_require__(4061);
-const runtime_2 = __nccwpck_require__(4061);
-const runtime_3 = __nccwpck_require__(4061);
-const runtime_4 = __nccwpck_require__(4061);
-const runtime_5 = __nccwpck_require__(4061);
-const runtime_6 = __nccwpck_require__(4061);
-const runtime_7 = __nccwpck_require__(4061);
-// @generated message type with reflection information, may provide speed optimized methods
-class DoubleValue$Type extends runtime_7.MessageType {
- constructor() {
- super("google.protobuf.DoubleValue", [
- { no: 1, name: "value", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }
- ]);
+ options(requestUrl, additionalHeaders) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});
+ });
}
- /**
- * Encode `DoubleValue` to JSON number.
- */
- internalJsonWrite(message, options) {
- return this.refJsonWriter.scalar(2, message.value, "value", false, true);
+ get(requestUrl, additionalHeaders) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.request('GET', requestUrl, null, additionalHeaders || {});
+ });
}
- /**
- * Decode `DoubleValue` from JSON number.
- */
- internalJsonRead(json, options, target) {
- if (!target)
- target = this.create();
- target.value = this.refJsonReader.scalar(json, 1, undefined, "value");
- return target;
+ del(requestUrl, additionalHeaders) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.request('DELETE', requestUrl, null, additionalHeaders || {});
+ });
}
- create(value) {
- const message = { value: 0 };
- globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_5.reflectionMergePartial)(this, message, value);
- return message;
+ post(requestUrl, data, additionalHeaders) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.request('POST', requestUrl, data, additionalHeaders || {});
+ });
}
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* double value */ 1:
- message.value = reader.double();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
+ patch(requestUrl, data, additionalHeaders) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.request('PATCH', requestUrl, data, additionalHeaders || {});
+ });
}
- internalBinaryWrite(message, writer, options) {
- /* double value = 1; */
- if (message.value !== 0)
- writer.tag(1, runtime_3.WireType.Bit64).double(message.value);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
+ put(requestUrl, data, additionalHeaders) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.request('PUT', requestUrl, data, additionalHeaders || {});
+ });
}
-}
-/**
- * @generated MessageType for protobuf message google.protobuf.DoubleValue
- */
-exports.DoubleValue = new DoubleValue$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class FloatValue$Type extends runtime_7.MessageType {
- constructor() {
- super("google.protobuf.FloatValue", [
- { no: 1, name: "value", kind: "scalar", T: 2 /*ScalarType.FLOAT*/ }
- ]);
+ head(requestUrl, additionalHeaders) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.request('HEAD', requestUrl, null, additionalHeaders || {});
+ });
}
- /**
- * Encode `FloatValue` to JSON number.
- */
- internalJsonWrite(message, options) {
- return this.refJsonWriter.scalar(1, message.value, "value", false, true);
+ sendStream(verb, requestUrl, stream, additionalHeaders) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.request(verb, requestUrl, stream, additionalHeaders);
+ });
}
/**
- * Decode `FloatValue` from JSON number.
+ * Gets a typed object from an endpoint
+ * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise
*/
- internalJsonRead(json, options, target) {
- if (!target)
- target = this.create();
- target.value = this.refJsonReader.scalar(json, 1, undefined, "value");
- return target;
- }
- create(value) {
- const message = { value: 0 };
- globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_5.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* float value */ 1:
- message.value = reader.float();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
+ getJson(requestUrl_1) {
+ return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) {
+ additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
+ const res = yield this.get(requestUrl, additionalHeaders);
+ return this._processResponse(res, this.requestOptions);
+ });
}
- internalBinaryWrite(message, writer, options) {
- /* float value = 1; */
- if (message.value !== 0)
- writer.tag(1, runtime_3.WireType.Bit32).float(message.value);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
+ postJson(requestUrl_1, obj_1) {
+ return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) {
+ const data = JSON.stringify(obj, null, 2);
+ additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
+ additionalHeaders[Headers.ContentType] =
+ this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson);
+ const res = yield this.post(requestUrl, data, additionalHeaders);
+ return this._processResponse(res, this.requestOptions);
+ });
}
-}
-/**
- * @generated MessageType for protobuf message google.protobuf.FloatValue
- */
-exports.FloatValue = new FloatValue$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class Int64Value$Type extends runtime_7.MessageType {
- constructor() {
- super("google.protobuf.Int64Value", [
- { no: 1, name: "value", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
- ]);
+ putJson(requestUrl_1, obj_1) {
+ return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) {
+ const data = JSON.stringify(obj, null, 2);
+ additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
+ additionalHeaders[Headers.ContentType] =
+ this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson);
+ const res = yield this.put(requestUrl, data, additionalHeaders);
+ return this._processResponse(res, this.requestOptions);
+ });
}
- /**
- * Encode `Int64Value` to JSON string.
- */
- internalJsonWrite(message, options) {
- return this.refJsonWriter.scalar(runtime_1.ScalarType.INT64, message.value, "value", false, true);
+ patchJson(requestUrl_1, obj_1) {
+ return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) {
+ const data = JSON.stringify(obj, null, 2);
+ additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
+ additionalHeaders[Headers.ContentType] =
+ this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson);
+ const res = yield this.patch(requestUrl, data, additionalHeaders);
+ return this._processResponse(res, this.requestOptions);
+ });
}
/**
- * Decode `Int64Value` from JSON string.
+ * Makes a raw http request.
+ * All other methods such as get, post, patch, and request ultimately call this.
+ * Prefer get, del, post and patch
*/
- internalJsonRead(json, options, target) {
- if (!target)
- target = this.create();
- target.value = this.refJsonReader.scalar(json, runtime_1.ScalarType.INT64, runtime_2.LongType.STRING, "value");
- return target;
- }
- create(value) {
- const message = { value: "0" };
- globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_5.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* int64 value */ 1:
- message.value = reader.int64().toString();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
+ request(verb, requestUrl, data, headers) {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (this._disposed) {
+ throw new Error('Client has already been disposed.');
}
- }
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* int64 value = 1; */
- if (message.value !== "0")
- writer.tag(1, runtime_3.WireType.Varint).int64(message.value);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
-}
-/**
- * @generated MessageType for protobuf message google.protobuf.Int64Value
- */
-exports.Int64Value = new Int64Value$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class UInt64Value$Type extends runtime_7.MessageType {
- constructor() {
- super("google.protobuf.UInt64Value", [
- { no: 1, name: "value", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }
- ]);
- }
- /**
- * Encode `UInt64Value` to JSON string.
- */
- internalJsonWrite(message, options) {
- return this.refJsonWriter.scalar(runtime_1.ScalarType.UINT64, message.value, "value", false, true);
+ const parsedUrl = new URL(requestUrl);
+ let info = this._prepareRequest(verb, parsedUrl, headers);
+ // Only perform retries on reads since writes may not be idempotent.
+ const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)
+ ? this._maxRetries + 1
+ : 1;
+ let numTries = 0;
+ let response;
+ do {
+ response = yield this.requestRaw(info, data);
+ // Check if it's an authentication challenge
+ if (response &&
+ response.message &&
+ response.message.statusCode === HttpCodes.Unauthorized) {
+ let authenticationHandler;
+ for (const handler of this.handlers) {
+ if (handler.canHandleAuthentication(response)) {
+ authenticationHandler = handler;
+ break;
+ }
+ }
+ if (authenticationHandler) {
+ return authenticationHandler.handleAuthentication(this, info, data);
+ }
+ else {
+ // We have received an unauthorized response but have no handlers to handle it.
+ // Let the response return to the caller.
+ return response;
+ }
+ }
+ let redirectsRemaining = this._maxRedirects;
+ while (response.message.statusCode &&
+ HttpRedirectCodes.includes(response.message.statusCode) &&
+ this._allowRedirects &&
+ redirectsRemaining > 0) {
+ const redirectUrl = response.message.headers['location'];
+ if (!redirectUrl) {
+ // if there's no location to redirect to, we won't
+ break;
+ }
+ const parsedRedirectUrl = new URL(redirectUrl);
+ if (parsedUrl.protocol === 'https:' &&
+ parsedUrl.protocol !== parsedRedirectUrl.protocol &&
+ !this._allowRedirectDowngrade) {
+ throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');
+ }
+ // we need to finish reading the response before reassigning response
+ // which will leak the open socket.
+ yield response.readBody();
+ // strip authorization header if redirected to a different hostname
+ if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
+ for (const header in headers) {
+ // header names are case insensitive
+ if (header.toLowerCase() === 'authorization') {
+ delete headers[header];
+ }
+ }
+ }
+ // let's make the request with the new redirectUrl
+ info = this._prepareRequest(verb, parsedRedirectUrl, headers);
+ response = yield this.requestRaw(info, data);
+ redirectsRemaining--;
+ }
+ if (!response.message.statusCode ||
+ !HttpResponseRetryCodes.includes(response.message.statusCode)) {
+ // If not a retry code, return immediately instead of retrying
+ return response;
+ }
+ numTries += 1;
+ if (numTries < maxTries) {
+ yield response.readBody();
+ yield this._performExponentialBackoff(numTries);
+ }
+ } while (numTries < maxTries);
+ return response;
+ });
}
/**
- * Decode `UInt64Value` from JSON string.
+ * Needs to be called if keepAlive is set to true in request options.
*/
- internalJsonRead(json, options, target) {
- if (!target)
- target = this.create();
- target.value = this.refJsonReader.scalar(json, runtime_1.ScalarType.UINT64, runtime_2.LongType.STRING, "value");
- return target;
- }
- create(value) {
- const message = { value: "0" };
- globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_5.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* uint64 value */ 1:
- message.value = reader.uint64().toString();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
+ dispose() {
+ if (this._agent) {
+ this._agent.destroy();
}
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* uint64 value = 1; */
- if (message.value !== "0")
- writer.tag(1, runtime_3.WireType.Varint).uint64(message.value);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
-}
-/**
- * @generated MessageType for protobuf message google.protobuf.UInt64Value
- */
-exports.UInt64Value = new UInt64Value$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class Int32Value$Type extends runtime_7.MessageType {
- constructor() {
- super("google.protobuf.Int32Value", [
- { no: 1, name: "value", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
- ]);
+ this._disposed = true;
}
/**
- * Encode `Int32Value` to JSON string.
+ * Raw request.
+ * @param info
+ * @param data
*/
- internalJsonWrite(message, options) {
- return this.refJsonWriter.scalar(5, message.value, "value", false, true);
+ requestRaw(info, data) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return new Promise((resolve, reject) => {
+ function callbackForResult(err, res) {
+ if (err) {
+ reject(err);
+ }
+ else if (!res) {
+ // If `err` is not passed, then `res` must be passed.
+ reject(new Error('Unknown error'));
+ }
+ else {
+ resolve(res);
+ }
+ }
+ this.requestRawWithCallback(info, data, callbackForResult);
+ });
+ });
}
/**
- * Decode `Int32Value` from JSON string.
+ * Raw request with callback.
+ * @param info
+ * @param data
+ * @param onResult
*/
- internalJsonRead(json, options, target) {
- if (!target)
- target = this.create();
- target.value = this.refJsonReader.scalar(json, 5, undefined, "value");
- return target;
- }
- create(value) {
- const message = { value: 0 };
- globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_5.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* int32 value */ 1:
- message.value = reader.int32();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
+ requestRawWithCallback(info, data, onResult) {
+ if (typeof data === 'string') {
+ if (!info.options.headers) {
+ info.options.headers = {};
}
+ info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');
}
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* int32 value = 1; */
- if (message.value !== 0)
- writer.tag(1, runtime_3.WireType.Varint).int32(message.value);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
-}
-/**
- * @generated MessageType for protobuf message google.protobuf.Int32Value
- */
-exports.Int32Value = new Int32Value$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class UInt32Value$Type extends runtime_7.MessageType {
- constructor() {
- super("google.protobuf.UInt32Value", [
- { no: 1, name: "value", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }
- ]);
- }
- /**
- * Encode `UInt32Value` to JSON string.
- */
- internalJsonWrite(message, options) {
- return this.refJsonWriter.scalar(13, message.value, "value", false, true);
- }
- /**
- * Decode `UInt32Value` from JSON string.
- */
- internalJsonRead(json, options, target) {
- if (!target)
- target = this.create();
- target.value = this.refJsonReader.scalar(json, 13, undefined, "value");
- return target;
- }
- create(value) {
- const message = { value: 0 };
- globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_5.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* uint32 value */ 1:
- message.value = reader.uint32();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
+ let callbackCalled = false;
+ function handleResult(err, res) {
+ if (!callbackCalled) {
+ callbackCalled = true;
+ onResult(err, res);
}
}
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* uint32 value = 1; */
- if (message.value !== 0)
- writer.tag(1, runtime_3.WireType.Varint).uint32(message.value);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
-}
-/**
- * @generated MessageType for protobuf message google.protobuf.UInt32Value
- */
-exports.UInt32Value = new UInt32Value$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class BoolValue$Type extends runtime_7.MessageType {
- constructor() {
- super("google.protobuf.BoolValue", [
- { no: 1, name: "value", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
- ]);
- }
- /**
- * Encode `BoolValue` to JSON bool.
- */
- internalJsonWrite(message, options) {
- return message.value;
+ const req = info.httpModule.request(info.options, (msg) => {
+ const res = new HttpClientResponse(msg);
+ handleResult(undefined, res);
+ });
+ let socket;
+ req.on('socket', sock => {
+ socket = sock;
+ });
+ // If we ever get disconnected, we want the socket to timeout eventually
+ req.setTimeout(this._socketTimeout || 3 * 60000, () => {
+ if (socket) {
+ socket.end();
+ }
+ handleResult(new Error(`Request timeout: ${info.options.path}`));
+ });
+ req.on('error', function (err) {
+ // err has statusCode property
+ // res should have headers
+ handleResult(err);
+ });
+ if (data && typeof data === 'string') {
+ req.write(data, 'utf8');
+ }
+ if (data && typeof data !== 'string') {
+ data.on('close', function () {
+ req.end();
+ });
+ data.pipe(req);
+ }
+ else {
+ req.end();
+ }
}
/**
- * Decode `BoolValue` from JSON bool.
+ * Gets an http agent. This function is useful when you need an http agent that handles
+ * routing through a proxy server - depending upon the url and proxy environment variables.
+ * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
*/
- internalJsonRead(json, options, target) {
- if (!target)
- target = this.create();
- target.value = this.refJsonReader.scalar(json, 8, undefined, "value");
- return target;
+ getAgent(serverUrl) {
+ const parsedUrl = new URL(serverUrl);
+ return this._getAgent(parsedUrl);
}
- create(value) {
- const message = { value: false };
- globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_5.reflectionMergePartial)(this, message, value);
- return message;
+ getAgentDispatcher(serverUrl) {
+ const parsedUrl = new URL(serverUrl);
+ const proxyUrl = pm.getProxyUrl(parsedUrl);
+ const useProxy = proxyUrl && proxyUrl.hostname;
+ if (!useProxy) {
+ return;
+ }
+ return this._getProxyAgentDispatcher(parsedUrl, proxyUrl);
}
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* bool value */ 1:
- message.value = reader.bool();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
+ _prepareRequest(method, requestUrl, headers) {
+ const info = {};
+ info.parsedUrl = requestUrl;
+ const usingSsl = info.parsedUrl.protocol === 'https:';
+ info.httpModule = usingSsl ? https : http;
+ const defaultPort = usingSsl ? 443 : 80;
+ info.options = {};
+ info.options.host = info.parsedUrl.hostname;
+ info.options.port = info.parsedUrl.port
+ ? parseInt(info.parsedUrl.port)
+ : defaultPort;
+ info.options.path =
+ (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');
+ info.options.method = method;
+ info.options.headers = this._mergeHeaders(headers);
+ if (this.userAgent != null) {
+ info.options.headers['user-agent'] = this.userAgent;
+ }
+ info.options.agent = this._getAgent(info.parsedUrl);
+ // gives handlers an opportunity to participate
+ if (this.handlers) {
+ for (const handler of this.handlers) {
+ handler.prepareRequest(info.options);
}
}
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* bool value = 1; */
- if (message.value !== false)
- writer.tag(1, runtime_3.WireType.Varint).bool(message.value);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
-}
-/**
- * @generated MessageType for protobuf message google.protobuf.BoolValue
- */
-exports.BoolValue = new BoolValue$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class StringValue$Type extends runtime_7.MessageType {
- constructor() {
- super("google.protobuf.StringValue", [
- { no: 1, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
- ]);
+ return info;
}
- /**
- * Encode `StringValue` to JSON string.
- */
- internalJsonWrite(message, options) {
- return message.value;
+ _mergeHeaders(headers) {
+ if (this.requestOptions && this.requestOptions.headers) {
+ return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));
+ }
+ return lowercaseKeys(headers || {});
}
/**
- * Decode `StringValue` from JSON string.
+ * Gets an existing header value or returns a default.
+ * Handles converting number header values to strings since HTTP headers must be strings.
+ * Note: This returns string | string[] since some headers can have multiple values.
+ * For headers that must always be a single string (like Content-Type), use the
+ * specialized _getExistingOrDefaultContentTypeHeader method instead.
*/
- internalJsonRead(json, options, target) {
- if (!target)
- target = this.create();
- target.value = this.refJsonReader.scalar(json, 9, undefined, "value");
- return target;
- }
- create(value) {
- const message = { value: "" };
- globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_5.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* string value */ 1:
- message.value = reader.string();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
+ _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
+ let clientHeader;
+ if (this.requestOptions && this.requestOptions.headers) {
+ const headerValue = lowercaseKeys(this.requestOptions.headers)[header];
+ if (headerValue) {
+ clientHeader =
+ typeof headerValue === 'number' ? headerValue.toString() : headerValue;
}
}
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* string value = 1; */
- if (message.value !== "")
- writer.tag(1, runtime_3.WireType.LengthDelimited).string(message.value);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
-}
-/**
- * @generated MessageType for protobuf message google.protobuf.StringValue
- */
-exports.StringValue = new StringValue$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class BytesValue$Type extends runtime_7.MessageType {
- constructor() {
- super("google.protobuf.BytesValue", [
- { no: 1, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
- ]);
+ const additionalValue = additionalHeaders[header];
+ if (additionalValue !== undefined) {
+ return typeof additionalValue === 'number'
+ ? additionalValue.toString()
+ : additionalValue;
+ }
+ if (clientHeader !== undefined) {
+ return clientHeader;
+ }
+ return _default;
}
/**
- * Encode `BytesValue` to JSON string.
+ * Specialized version of _getExistingOrDefaultHeader for Content-Type header.
+ * Always returns a single string (not an array) since Content-Type should be a single value.
+ * Converts arrays to comma-separated strings and numbers to strings to ensure type safety.
+ * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers
+ * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]).
*/
- internalJsonWrite(message, options) {
- return this.refJsonWriter.scalar(12, message.value, "value", false, true);
+ _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) {
+ let clientHeader;
+ if (this.requestOptions && this.requestOptions.headers) {
+ const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType];
+ if (headerValue) {
+ if (typeof headerValue === 'number') {
+ clientHeader = String(headerValue);
+ }
+ else if (Array.isArray(headerValue)) {
+ clientHeader = headerValue.join(', ');
+ }
+ else {
+ clientHeader = headerValue;
+ }
+ }
+ }
+ const additionalValue = additionalHeaders[Headers.ContentType];
+ // Return the first non-undefined value, converting numbers or arrays to strings if necessary
+ if (additionalValue !== undefined) {
+ if (typeof additionalValue === 'number') {
+ return String(additionalValue);
+ }
+ else if (Array.isArray(additionalValue)) {
+ return additionalValue.join(', ');
+ }
+ else {
+ return additionalValue;
+ }
+ }
+ if (clientHeader !== undefined) {
+ return clientHeader;
+ }
+ return _default;
}
- /**
- * Decode `BytesValue` from JSON string.
- */
- internalJsonRead(json, options, target) {
- if (!target)
- target = this.create();
- target.value = this.refJsonReader.scalar(json, 12, undefined, "value");
- return target;
+ _getAgent(parsedUrl) {
+ let agent;
+ const proxyUrl = pm.getProxyUrl(parsedUrl);
+ const useProxy = proxyUrl && proxyUrl.hostname;
+ if (this._keepAlive && useProxy) {
+ agent = this._proxyAgent;
+ }
+ if (!useProxy) {
+ agent = this._agent;
+ }
+ // if agent is already assigned use that agent.
+ if (agent) {
+ return agent;
+ }
+ const usingSsl = parsedUrl.protocol === 'https:';
+ let maxSockets = 100;
+ if (this.requestOptions) {
+ maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
+ }
+ // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.
+ if (proxyUrl && proxyUrl.hostname) {
+ const agentOptions = {
+ maxSockets,
+ keepAlive: this._keepAlive,
+ proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {
+ proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
+ })), { host: proxyUrl.hostname, port: proxyUrl.port })
+ };
+ let tunnelAgent;
+ const overHttps = proxyUrl.protocol === 'https:';
+ if (usingSsl) {
+ tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
+ }
+ else {
+ tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
+ }
+ agent = tunnelAgent(agentOptions);
+ this._proxyAgent = agent;
+ }
+ // if tunneling agent isn't assigned create a new agent
+ if (!agent) {
+ const options = { keepAlive: this._keepAlive, maxSockets };
+ agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
+ this._agent = agent;
+ }
+ if (usingSsl && this._ignoreSslError) {
+ // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
+ // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
+ // we have to cast it to any and change it directly
+ agent.options = Object.assign(agent.options || {}, {
+ rejectUnauthorized: false
+ });
+ }
+ return agent;
}
- create(value) {
- const message = { value: new Uint8Array(0) };
- globalThis.Object.defineProperty(message, runtime_6.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_5.reflectionMergePartial)(this, message, value);
- return message;
+ _getProxyAgentDispatcher(parsedUrl, proxyUrl) {
+ let proxyAgent;
+ if (this._keepAlive) {
+ proxyAgent = this._proxyAgentDispatcher;
+ }
+ // if agent is already assigned use that agent.
+ if (proxyAgent) {
+ return proxyAgent;
+ }
+ const usingSsl = parsedUrl.protocol === 'https:';
+ proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {
+ token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`
+ })));
+ this._proxyAgentDispatcher = proxyAgent;
+ if (usingSsl && this._ignoreSslError) {
+ // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
+ // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
+ // we have to cast it to any and change it directly
+ proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {
+ rejectUnauthorized: false
+ });
+ }
+ return proxyAgent;
}
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* bytes value */ 1:
- message.value = reader.bytes();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_4.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
+ _getUserAgentWithOrchestrationId(userAgent) {
+ const baseUserAgent = userAgent || 'actions/http-client';
+ const orchId = process.env['ACTIONS_ORCHESTRATION_ID'];
+ if (orchId) {
+ // Sanitize the orchestration ID to ensure it contains only valid characters
+ // Valid characters: 0-9, a-z, _, -, .
+ const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_');
+ return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`;
}
- return message;
+ return baseUserAgent;
}
- internalBinaryWrite(message, writer, options) {
- /* bytes value = 1; */
- if (message.value.length)
- writer.tag(1, runtime_3.WireType.LengthDelimited).bytes(message.value);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_4.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
+ _performExponentialBackoff(retryNumber) {
+ return __awaiter(this, void 0, void 0, function* () {
+ retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
+ const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
+ return new Promise(resolve => setTimeout(() => resolve(), ms));
+ });
}
-}
-/**
- * @generated MessageType for protobuf message google.protobuf.BytesValue
- */
-exports.BytesValue = new BytesValue$Type();
-//# sourceMappingURL=wrappers.js.map
-
-/***/ }),
-
-/***/ 49960:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
-
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
+ _processResponse(res, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
+ const statusCode = res.message.statusCode || 0;
+ const response = {
+ statusCode,
+ result: null,
+ headers: {}
+ };
+ // not found leads to null obj returned
+ if (statusCode === HttpCodes.NotFound) {
+ resolve(response);
+ }
+ // get the result from the body
+ function dateTimeDeserializer(key, value) {
+ if (typeof value === 'string') {
+ const a = new Date(value);
+ if (!isNaN(a.valueOf())) {
+ return a;
+ }
+ }
+ return value;
+ }
+ let obj;
+ let contents;
+ try {
+ contents = yield res.readBody();
+ if (contents && contents.length > 0) {
+ if (options && options.deserializeDates) {
+ obj = JSON.parse(contents, dateTimeDeserializer);
+ }
+ else {
+ obj = JSON.parse(contents);
+ }
+ response.result = obj;
+ }
+ response.headers = res.message.headers;
+ }
+ catch (err) {
+ // Invalid resource (contents not json); leaving result obj null
+ }
+ // note that 3xx redirects are handled by the http layer.
+ if (statusCode > 299) {
+ let msg;
+ // if exception/error in body, attempt to get better error
+ if (obj && obj.message) {
+ msg = obj.message;
+ }
+ else if (contents && contents.length > 0) {
+ // it may be the case that the exception is in the body message as string
+ msg = contents;
+ }
+ else {
+ msg = `Failed request: (${statusCode})`;
+ }
+ const err = new HttpClientError(msg, statusCode);
+ err.result = response.result;
+ reject(err);
+ }
+ else {
+ resolve(response);
+ }
+ }));
+ });
}
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __exportStar = (this && this.__exportStar) || function(m, exports) {
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-__exportStar(__nccwpck_require__(54622), exports);
-__exportStar(__nccwpck_require__(8626), exports);
-__exportStar(__nccwpck_require__(58178), exports);
-__exportStar(__nccwpck_require__(49773), exports);
+}
+exports.HttpClient = HttpClient;
+const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
//# sourceMappingURL=index.js.map
/***/ }),
-/***/ 58178:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+/***/ 3335:
+/***/ ((__unused_webpack_module, exports) => {
-"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ArtifactService = exports.DeleteArtifactResponse = exports.DeleteArtifactRequest = exports.GetSignedArtifactURLResponse = exports.GetSignedArtifactURLRequest = exports.ListArtifactsResponse_MonolithArtifact = exports.ListArtifactsResponse = exports.ListArtifactsRequest = exports.FinalizeArtifactResponse = exports.FinalizeArtifactRequest = exports.CreateArtifactResponse = exports.CreateArtifactRequest = exports.FinalizeMigratedArtifactResponse = exports.FinalizeMigratedArtifactRequest = exports.MigrateArtifactResponse = exports.MigrateArtifactRequest = void 0;
-// @generated by protobuf-ts 2.9.1 with parameter long_type_string,client_none,generate_dependencies
-// @generated from protobuf file "results/api/v1/artifact.proto" (package "github.actions.results.api.v1", syntax proto3)
-// tslint:disable
-const runtime_rpc_1 = __nccwpck_require__(60012);
-const runtime_1 = __nccwpck_require__(4061);
-const runtime_2 = __nccwpck_require__(4061);
-const runtime_3 = __nccwpck_require__(4061);
-const runtime_4 = __nccwpck_require__(4061);
-const runtime_5 = __nccwpck_require__(4061);
-const wrappers_1 = __nccwpck_require__(8626);
-const wrappers_2 = __nccwpck_require__(8626);
-const timestamp_1 = __nccwpck_require__(54622);
-// @generated message type with reflection information, may provide speed optimized methods
-class MigrateArtifactRequest$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.MigrateArtifactRequest", [
- { no: 1, name: "workflow_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 3, name: "expires_at", kind: "message", T: () => timestamp_1.Timestamp }
- ]);
- }
- create(value) {
- const message = { workflowRunBackendId: "", name: "" };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
+exports.getProxyUrl = getProxyUrl;
+exports.checkBypass = checkBypass;
+function getProxyUrl(reqUrl) {
+ const usingSsl = reqUrl.protocol === 'https:';
+ if (checkBypass(reqUrl)) {
+ return undefined;
}
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* string workflow_run_backend_id */ 1:
- message.workflowRunBackendId = reader.string();
- break;
- case /* string name */ 2:
- message.name = reader.string();
- break;
- case /* google.protobuf.Timestamp expires_at */ 3:
- message.expiresAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiresAt);
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
+ const proxyVar = (() => {
+ if (usingSsl) {
+ return process.env['https_proxy'] || process.env['HTTPS_PROXY'];
+ }
+ else {
+ return process.env['http_proxy'] || process.env['HTTP_PROXY'];
+ }
+ })();
+ if (proxyVar) {
+ try {
+ return new DecodedURL(proxyVar);
+ }
+ catch (_a) {
+ if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
+ return new DecodedURL(`http://${proxyVar}`);
}
- return message;
}
- internalBinaryWrite(message, writer, options) {
- /* string workflow_run_backend_id = 1; */
- if (message.workflowRunBackendId !== "")
- writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId);
- /* string name = 2; */
- if (message.name !== "")
- writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.name);
- /* google.protobuf.Timestamp expires_at = 3; */
- if (message.expiresAt)
- timestamp_1.Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join();
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
+ else {
+ return undefined;
}
}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.MigrateArtifactRequest
- */
-exports.MigrateArtifactRequest = new MigrateArtifactRequest$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class MigrateArtifactResponse$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.MigrateArtifactResponse", [
- { no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
- { no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
- ]);
+function checkBypass(reqUrl) {
+ if (!reqUrl.hostname) {
+ return false;
}
- create(value) {
- const message = { ok: false, signedUploadUrl: "" };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
+ const reqHost = reqUrl.hostname;
+ if (isLoopbackAddress(reqHost)) {
+ return true;
}
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* bool ok */ 1:
- message.ok = reader.bool();
- break;
- case /* string signed_upload_url */ 2:
- message.signedUploadUrl = reader.string();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
+ const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';
+ if (!noProxy) {
+ return false;
}
- internalBinaryWrite(message, writer, options) {
- /* bool ok = 1; */
- if (message.ok !== false)
- writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
- /* string signed_upload_url = 2; */
- if (message.signedUploadUrl !== "")
- writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
+ // Determine the request port
+ let reqPort;
+ if (reqUrl.port) {
+ reqPort = Number(reqUrl.port);
}
-}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.MigrateArtifactResponse
- */
-exports.MigrateArtifactResponse = new MigrateArtifactResponse$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class FinalizeMigratedArtifactRequest$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.FinalizeMigratedArtifactRequest", [
- { no: 1, name: "workflow_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 3, name: "size", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
- ]);
+ else if (reqUrl.protocol === 'http:') {
+ reqPort = 80;
}
- create(value) {
- const message = { workflowRunBackendId: "", name: "", size: "0" };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
+ else if (reqUrl.protocol === 'https:') {
+ reqPort = 443;
}
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* string workflow_run_backend_id */ 1:
- message.workflowRunBackendId = reader.string();
- break;
- case /* string name */ 2:
- message.name = reader.string();
- break;
- case /* int64 size */ 3:
- message.size = reader.int64().toString();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
+ // Format the request hostname and hostname with port
+ const upperReqHosts = [reqUrl.hostname.toUpperCase()];
+ if (typeof reqPort === 'number') {
+ upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
}
- internalBinaryWrite(message, writer, options) {
- /* string workflow_run_backend_id = 1; */
- if (message.workflowRunBackendId !== "")
- writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId);
- /* string name = 2; */
- if (message.name !== "")
- writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.name);
- /* int64 size = 3; */
- if (message.size !== "0")
- writer.tag(3, runtime_1.WireType.Varint).int64(message.size);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
+ // Compare request host against noproxy
+ for (const upperNoProxyItem of noProxy
+ .split(',')
+ .map(x => x.trim().toUpperCase())
+ .filter(x => x)) {
+ if (upperNoProxyItem === '*' ||
+ upperReqHosts.some(x => x === upperNoProxyItem ||
+ x.endsWith(`.${upperNoProxyItem}`) ||
+ (upperNoProxyItem.startsWith('.') &&
+ x.endsWith(`${upperNoProxyItem}`)))) {
+ return true;
+ }
}
+ return false;
}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.FinalizeMigratedArtifactRequest
- */
-exports.FinalizeMigratedArtifactRequest = new FinalizeMigratedArtifactRequest$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class FinalizeMigratedArtifactResponse$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.FinalizeMigratedArtifactResponse", [
- { no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
- { no: 2, name: "artifact_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
- ]);
- }
- create(value) {
- const message = { ok: false, artifactId: "0" };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
+function isLoopbackAddress(host) {
+ const hostLower = host.toLowerCase();
+ return (hostLower === 'localhost' ||
+ hostLower.startsWith('127.') ||
+ hostLower.startsWith('[::1]') ||
+ hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
+}
+class DecodedURL extends URL {
+ constructor(url, base) {
+ super(url, base);
+ this._decodedUsername = decodeURIComponent(super.username);
+ this._decodedPassword = decodeURIComponent(super.password);
}
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* bool ok */ 1:
- message.ok = reader.bool();
- break;
- case /* int64 artifact_id */ 2:
- message.artifactId = reader.int64().toString();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
+ get username() {
+ return this._decodedUsername;
}
- internalBinaryWrite(message, writer, options) {
- /* bool ok = 1; */
- if (message.ok !== false)
- writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
- /* int64 artifact_id = 2; */
- if (message.artifactId !== "0")
- writer.tag(2, runtime_1.WireType.Varint).int64(message.artifactId);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
+ get password() {
+ return this._decodedPassword;
}
}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.FinalizeMigratedArtifactResponse
- */
-exports.FinalizeMigratedArtifactResponse = new FinalizeMigratedArtifactResponse$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class CreateArtifactRequest$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.CreateArtifactRequest", [
- { no: 1, name: "workflow_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 2, name: "workflow_job_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 3, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 4, name: "expires_at", kind: "message", T: () => timestamp_1.Timestamp },
- { no: 5, name: "version", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
- ]);
- }
- create(value) {
- const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "", version: 0 };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* string workflow_run_backend_id */ 1:
- message.workflowRunBackendId = reader.string();
- break;
- case /* string workflow_job_run_backend_id */ 2:
- message.workflowJobRunBackendId = reader.string();
- break;
- case /* string name */ 3:
- message.name = reader.string();
- break;
- case /* google.protobuf.Timestamp expires_at */ 4:
- message.expiresAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.expiresAt);
- break;
- case /* int32 version */ 5:
- message.version = reader.int32();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* string workflow_run_backend_id = 1; */
- if (message.workflowRunBackendId !== "")
- writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId);
- /* string workflow_job_run_backend_id = 2; */
- if (message.workflowJobRunBackendId !== "")
- writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId);
- /* string name = 3; */
- if (message.name !== "")
- writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.name);
- /* google.protobuf.Timestamp expires_at = 4; */
- if (message.expiresAt)
- timestamp_1.Timestamp.internalBinaryWrite(message.expiresAt, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join();
- /* int32 version = 5; */
- if (message.version !== 0)
- writer.tag(5, runtime_1.WireType.Varint).int32(message.version);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
+//# sourceMappingURL=proxy.js.map
+
+/***/ }),
+
+/***/ 889:
+/***/ ((module) => {
+
+
+module.exports = balanced;
+function balanced(a, b, str) {
+ if (a instanceof RegExp) a = maybeMatch(a, str);
+ if (b instanceof RegExp) b = maybeMatch(b, str);
+
+ var r = range(a, b, str);
+
+ return r && {
+ start: r[0],
+ end: r[1],
+ pre: str.slice(0, r[0]),
+ body: str.slice(r[0] + a.length, r[1]),
+ post: str.slice(r[1] + b.length)
+ };
}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.CreateArtifactRequest
- */
-exports.CreateArtifactRequest = new CreateArtifactRequest$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class CreateArtifactResponse$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.CreateArtifactResponse", [
- { no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
- { no: 2, name: "signed_upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
- ]);
- }
- create(value) {
- const message = { ok: false, signedUploadUrl: "" };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* bool ok */ 1:
- message.ok = reader.bool();
- break;
- case /* string signed_upload_url */ 2:
- message.signedUploadUrl = reader.string();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* bool ok = 1; */
- if (message.ok !== false)
- writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
- /* string signed_upload_url = 2; */
- if (message.signedUploadUrl !== "")
- writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.signedUploadUrl);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
+
+function maybeMatch(reg, str) {
+ var m = str.match(reg);
+ return m ? m[0] : null;
}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.CreateArtifactResponse
- */
-exports.CreateArtifactResponse = new CreateArtifactResponse$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class FinalizeArtifactRequest$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.FinalizeArtifactRequest", [
- { no: 1, name: "workflow_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 2, name: "workflow_job_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 3, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 4, name: "size", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
- { no: 5, name: "hash", kind: "message", T: () => wrappers_2.StringValue }
- ]);
- }
- create(value) {
- const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "", size: "0" };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
+
+balanced.range = range;
+function range(a, b, str) {
+ var begs, beg, left, right, result;
+ var ai = str.indexOf(a);
+ var bi = str.indexOf(b, ai + 1);
+ var i = ai;
+
+ if (ai >= 0 && bi > 0) {
+ if(a===b) {
+ return [ai, bi];
}
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* string workflow_run_backend_id */ 1:
- message.workflowRunBackendId = reader.string();
- break;
- case /* string workflow_job_run_backend_id */ 2:
- message.workflowJobRunBackendId = reader.string();
- break;
- case /* string name */ 3:
- message.name = reader.string();
- break;
- case /* int64 size */ 4:
- message.size = reader.int64().toString();
- break;
- case /* google.protobuf.StringValue hash */ 5:
- message.hash = wrappers_2.StringValue.internalBinaryRead(reader, reader.uint32(), options, message.hash);
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
+ begs = [];
+ left = str.length;
+
+ while (i >= 0 && !result) {
+ if (i == ai) {
+ begs.push(i);
+ ai = str.indexOf(a, i + 1);
+ } else if (begs.length == 1) {
+ result = [ begs.pop(), bi ];
+ } else {
+ beg = begs.pop();
+ if (beg < left) {
+ left = beg;
+ right = bi;
}
- return message;
+
+ bi = str.indexOf(b, i + 1);
+ }
+
+ i = ai < bi && ai >= 0 ? ai : bi;
}
- internalBinaryWrite(message, writer, options) {
- /* string workflow_run_backend_id = 1; */
- if (message.workflowRunBackendId !== "")
- writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId);
- /* string workflow_job_run_backend_id = 2; */
- if (message.workflowJobRunBackendId !== "")
- writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId);
- /* string name = 3; */
- if (message.name !== "")
- writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.name);
- /* int64 size = 4; */
- if (message.size !== "0")
- writer.tag(4, runtime_1.WireType.Varint).int64(message.size);
- /* google.protobuf.StringValue hash = 5; */
- if (message.hash)
- wrappers_2.StringValue.internalBinaryWrite(message.hash, writer.tag(5, runtime_1.WireType.LengthDelimited).fork(), options).join();
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
+
+ if (begs.length) {
+ result = [ left, right ];
}
+ }
+
+ return result;
}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.FinalizeArtifactRequest
- */
-exports.FinalizeArtifactRequest = new FinalizeArtifactRequest$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class FinalizeArtifactResponse$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.FinalizeArtifactResponse", [
- { no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
- { no: 2, name: "artifact_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
- ]);
- }
- create(value) {
- const message = { ok: false, artifactId: "0" };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* bool ok */ 1:
- message.ok = reader.bool();
- break;
- case /* int64 artifact_id */ 2:
- message.artifactId = reader.int64().toString();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* bool ok = 1; */
- if (message.ok !== false)
- writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
- /* int64 artifact_id = 2; */
- if (message.artifactId !== "0")
- writer.tag(2, runtime_1.WireType.Varint).int64(message.artifactId);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
+
+
+/***/ }),
+
+/***/ 9034:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+var concatMap = __nccwpck_require__(7087);
+var balanced = __nccwpck_require__(889);
+
+module.exports = expandTop;
+
+var escSlash = '\0SLASH'+Math.random()+'\0';
+var escOpen = '\0OPEN'+Math.random()+'\0';
+var escClose = '\0CLOSE'+Math.random()+'\0';
+var escComma = '\0COMMA'+Math.random()+'\0';
+var escPeriod = '\0PERIOD'+Math.random()+'\0';
+
+function numeric(str) {
+ return parseInt(str, 10) == str
+ ? parseInt(str, 10)
+ : str.charCodeAt(0);
}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.FinalizeArtifactResponse
- */
-exports.FinalizeArtifactResponse = new FinalizeArtifactResponse$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class ListArtifactsRequest$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.ListArtifactsRequest", [
- { no: 1, name: "workflow_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 2, name: "workflow_job_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 3, name: "name_filter", kind: "message", T: () => wrappers_2.StringValue },
- { no: 4, name: "id_filter", kind: "message", T: () => wrappers_1.Int64Value }
- ]);
- }
- create(value) {
- const message = { workflowRunBackendId: "", workflowJobRunBackendId: "" };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* string workflow_run_backend_id */ 1:
- message.workflowRunBackendId = reader.string();
- break;
- case /* string workflow_job_run_backend_id */ 2:
- message.workflowJobRunBackendId = reader.string();
- break;
- case /* google.protobuf.StringValue name_filter */ 3:
- message.nameFilter = wrappers_2.StringValue.internalBinaryRead(reader, reader.uint32(), options, message.nameFilter);
- break;
- case /* google.protobuf.Int64Value id_filter */ 4:
- message.idFilter = wrappers_1.Int64Value.internalBinaryRead(reader, reader.uint32(), options, message.idFilter);
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* string workflow_run_backend_id = 1; */
- if (message.workflowRunBackendId !== "")
- writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId);
- /* string workflow_job_run_backend_id = 2; */
- if (message.workflowJobRunBackendId !== "")
- writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId);
- /* google.protobuf.StringValue name_filter = 3; */
- if (message.nameFilter)
- wrappers_2.StringValue.internalBinaryWrite(message.nameFilter, writer.tag(3, runtime_1.WireType.LengthDelimited).fork(), options).join();
- /* google.protobuf.Int64Value id_filter = 4; */
- if (message.idFilter)
- wrappers_1.Int64Value.internalBinaryWrite(message.idFilter, writer.tag(4, runtime_1.WireType.LengthDelimited).fork(), options).join();
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
+
+function escapeBraces(str) {
+ return str.split('\\\\').join(escSlash)
+ .split('\\{').join(escOpen)
+ .split('\\}').join(escClose)
+ .split('\\,').join(escComma)
+ .split('\\.').join(escPeriod);
}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.ListArtifactsRequest
- */
-exports.ListArtifactsRequest = new ListArtifactsRequest$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class ListArtifactsResponse$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.ListArtifactsResponse", [
- { no: 1, name: "artifacts", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => exports.ListArtifactsResponse_MonolithArtifact }
- ]);
+
+function unescapeBraces(str) {
+ return str.split(escSlash).join('\\')
+ .split(escOpen).join('{')
+ .split(escClose).join('}')
+ .split(escComma).join(',')
+ .split(escPeriod).join('.');
+}
+
+
+// Basically just str.split(","), but handling cases
+// where we have nested braced sections, which should be
+// treated as individual members, like {a,{b,c},d}
+function parseCommaParts(str) {
+ if (!str)
+ return [''];
+
+ var parts = [];
+ var m = balanced('{', '}', str);
+
+ if (!m)
+ return str.split(',');
+
+ var pre = m.pre;
+ var body = m.body;
+ var post = m.post;
+ var p = pre.split(',');
+
+ p[p.length-1] += '{' + body + '}';
+ var postParts = parseCommaParts(post);
+ if (post.length) {
+ p[p.length-1] += postParts.shift();
+ p.push.apply(p, postParts);
+ }
+
+ parts.push.apply(parts, p);
+
+ return parts;
+}
+
+function expandTop(str) {
+ if (!str)
+ return [];
+
+ // I don't know why Bash 4.3 does this, but it does.
+ // Anything starting with {} will have the first two bytes preserved
+ // but *only* at the top level, so {},a}b will not expand to anything,
+ // but a{},b}c will be expanded to [a}c,abc].
+ // One could argue that this is a bug in Bash, but since the goal of
+ // this module is to match Bash's rules, we escape a leading {}
+ if (str.substr(0, 2) === '{}') {
+ str = '\\{\\}' + str.substr(2);
+ }
+
+ return expand(escapeBraces(str), true).map(unescapeBraces);
+}
+
+function identity(e) {
+ return e;
+}
+
+function embrace(str) {
+ return '{' + str + '}';
+}
+function isPadded(el) {
+ return /^-?0\d/.test(el);
+}
+
+function lte(i, y) {
+ return i <= y;
+}
+function gte(i, y) {
+ return i >= y;
+}
+
+function expand(str, isTop) {
+ var expansions = [];
+
+ var m = balanced('{', '}', str);
+ if (!m || /\$$/.test(m.pre)) return [str];
+
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
+ var isSequence = isNumericSequence || isAlphaSequence;
+ var isOptions = m.body.indexOf(',') >= 0;
+ if (!isSequence && !isOptions) {
+ // {a},b}
+ if (m.post.match(/,(?!,).*\}/)) {
+ str = m.pre + '{' + m.body + escClose + m.post;
+ return expand(str);
}
- create(value) {
- const message = { artifacts: [] };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
+ return [str];
+ }
+
+ var n;
+ if (isSequence) {
+ n = m.body.split(/\.\./);
+ } else {
+ n = parseCommaParts(m.body);
+ if (n.length === 1) {
+ // x{{a,b}}y ==> x{a}y x{b}y
+ n = expand(n[0], false).map(embrace);
+ if (n.length === 1) {
+ var post = m.post.length
+ ? expand(m.post, false)
+ : [''];
+ return post.map(function(p) {
+ return m.pre + n[0] + p;
+ });
+ }
}
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* repeated github.actions.results.api.v1.ListArtifactsResponse.MonolithArtifact artifacts */ 1:
- message.artifacts.push(exports.ListArtifactsResponse_MonolithArtifact.internalBinaryRead(reader, reader.uint32(), options));
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
+ }
+
+ // at this point, n is the parts, and we know it's not a comma set
+ // with a single entry.
+
+ // no need to expand pre, since it is guaranteed to be free of brace-sets
+ var pre = m.pre;
+ var post = m.post.length
+ ? expand(m.post, false)
+ : [''];
+
+ var N;
+
+ if (isSequence) {
+ var x = numeric(n[0]);
+ var y = numeric(n[1]);
+ var width = Math.max(n[0].length, n[1].length)
+ var incr = n.length == 3
+ ? Math.abs(numeric(n[2]))
+ : 1;
+ var test = lte;
+ var reverse = y < x;
+ if (reverse) {
+ incr *= -1;
+ test = gte;
+ }
+ var pad = n.some(isPadded);
+
+ N = [];
+
+ for (var i = x; test(i, y); i += incr) {
+ var c;
+ if (isAlphaSequence) {
+ c = String.fromCharCode(i);
+ if (c === '\\')
+ c = '';
+ } else {
+ c = String(i);
+ if (pad) {
+ var need = width - c.length;
+ if (need > 0) {
+ var z = new Array(need + 1).join('0');
+ if (i < 0)
+ c = '-' + z + c.slice(1);
+ else
+ c = z + c;
+ }
}
- return message;
+ }
+ N.push(c);
}
- internalBinaryWrite(message, writer, options) {
- /* repeated github.actions.results.api.v1.ListArtifactsResponse.MonolithArtifact artifacts = 1; */
- for (let i = 0; i < message.artifacts.length; i++)
- exports.ListArtifactsResponse_MonolithArtifact.internalBinaryWrite(message.artifacts[i], writer.tag(1, runtime_1.WireType.LengthDelimited).fork(), options).join();
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
+ } else {
+ N = concatMap(n, function(el) { return expand(el, false) });
+ }
+
+ for (var j = 0; j < N.length; j++) {
+ for (var k = 0; k < post.length; k++) {
+ var expansion = pre + N[j] + post[k];
+ if (!isTop || isSequence || expansion)
+ expansions.push(expansion);
}
+ }
+
+ return expansions;
}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.ListArtifactsResponse
- */
-exports.ListArtifactsResponse = new ListArtifactsResponse$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class ListArtifactsResponse_MonolithArtifact$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.ListArtifactsResponse.MonolithArtifact", [
- { no: 1, name: "workflow_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 2, name: "workflow_job_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 3, name: "database_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
- { no: 4, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 5, name: "size", kind: "scalar", T: 3 /*ScalarType.INT64*/ },
- { no: 6, name: "created_at", kind: "message", T: () => timestamp_1.Timestamp },
- { no: 7, name: "digest", kind: "message", T: () => wrappers_2.StringValue }
- ]);
- }
- create(value) {
- const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", databaseId: "0", name: "", size: "0" };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* string workflow_run_backend_id */ 1:
- message.workflowRunBackendId = reader.string();
- break;
- case /* string workflow_job_run_backend_id */ 2:
- message.workflowJobRunBackendId = reader.string();
- break;
- case /* int64 database_id */ 3:
- message.databaseId = reader.int64().toString();
- break;
- case /* string name */ 4:
- message.name = reader.string();
- break;
- case /* int64 size */ 5:
- message.size = reader.int64().toString();
- break;
- case /* google.protobuf.Timestamp created_at */ 6:
- message.createdAt = timestamp_1.Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
- break;
- case /* google.protobuf.StringValue digest */ 7:
- message.digest = wrappers_2.StringValue.internalBinaryRead(reader, reader.uint32(), options, message.digest);
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* string workflow_run_backend_id = 1; */
- if (message.workflowRunBackendId !== "")
- writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId);
- /* string workflow_job_run_backend_id = 2; */
- if (message.workflowJobRunBackendId !== "")
- writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId);
- /* int64 database_id = 3; */
- if (message.databaseId !== "0")
- writer.tag(3, runtime_1.WireType.Varint).int64(message.databaseId);
- /* string name = 4; */
- if (message.name !== "")
- writer.tag(4, runtime_1.WireType.LengthDelimited).string(message.name);
- /* int64 size = 5; */
- if (message.size !== "0")
- writer.tag(5, runtime_1.WireType.Varint).int64(message.size);
- /* google.protobuf.Timestamp created_at = 6; */
- if (message.createdAt)
- timestamp_1.Timestamp.internalBinaryWrite(message.createdAt, writer.tag(6, runtime_1.WireType.LengthDelimited).fork(), options).join();
- /* google.protobuf.StringValue digest = 7; */
- if (message.digest)
- wrappers_2.StringValue.internalBinaryWrite(message.digest, writer.tag(7, runtime_1.WireType.LengthDelimited).fork(), options).join();
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
-}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.ListArtifactsResponse.MonolithArtifact
- */
-exports.ListArtifactsResponse_MonolithArtifact = new ListArtifactsResponse_MonolithArtifact$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class GetSignedArtifactURLRequest$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.GetSignedArtifactURLRequest", [
- { no: 1, name: "workflow_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 2, name: "workflow_job_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 3, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
- ]);
- }
- create(value) {
- const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "" };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* string workflow_run_backend_id */ 1:
- message.workflowRunBackendId = reader.string();
- break;
- case /* string workflow_job_run_backend_id */ 2:
- message.workflowJobRunBackendId = reader.string();
- break;
- case /* string name */ 3:
- message.name = reader.string();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* string workflow_run_backend_id = 1; */
- if (message.workflowRunBackendId !== "")
- writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId);
- /* string workflow_job_run_backend_id = 2; */
- if (message.workflowJobRunBackendId !== "")
- writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId);
- /* string name = 3; */
- if (message.name !== "")
- writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.name);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
-}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.GetSignedArtifactURLRequest
- */
-exports.GetSignedArtifactURLRequest = new GetSignedArtifactURLRequest$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class GetSignedArtifactURLResponse$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.GetSignedArtifactURLResponse", [
- { no: 1, name: "signed_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
- ]);
- }
- create(value) {
- const message = { signedUrl: "" };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* string signed_url */ 1:
- message.signedUrl = reader.string();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* string signed_url = 1; */
- if (message.signedUrl !== "")
- writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.signedUrl);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
-}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.GetSignedArtifactURLResponse
- */
-exports.GetSignedArtifactURLResponse = new GetSignedArtifactURLResponse$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class DeleteArtifactRequest$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.DeleteArtifactRequest", [
- { no: 1, name: "workflow_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 2, name: "workflow_job_run_backend_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
- { no: 3, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
- ]);
- }
- create(value) {
- const message = { workflowRunBackendId: "", workflowJobRunBackendId: "", name: "" };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* string workflow_run_backend_id */ 1:
- message.workflowRunBackendId = reader.string();
- break;
- case /* string workflow_job_run_backend_id */ 2:
- message.workflowJobRunBackendId = reader.string();
- break;
- case /* string name */ 3:
- message.name = reader.string();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* string workflow_run_backend_id = 1; */
- if (message.workflowRunBackendId !== "")
- writer.tag(1, runtime_1.WireType.LengthDelimited).string(message.workflowRunBackendId);
- /* string workflow_job_run_backend_id = 2; */
- if (message.workflowJobRunBackendId !== "")
- writer.tag(2, runtime_1.WireType.LengthDelimited).string(message.workflowJobRunBackendId);
- /* string name = 3; */
- if (message.name !== "")
- writer.tag(3, runtime_1.WireType.LengthDelimited).string(message.name);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
-}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.DeleteArtifactRequest
- */
-exports.DeleteArtifactRequest = new DeleteArtifactRequest$Type();
-// @generated message type with reflection information, may provide speed optimized methods
-class DeleteArtifactResponse$Type extends runtime_5.MessageType {
- constructor() {
- super("github.actions.results.api.v1.DeleteArtifactResponse", [
- { no: 1, name: "ok", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
- { no: 2, name: "artifact_id", kind: "scalar", T: 3 /*ScalarType.INT64*/ }
- ]);
- }
- create(value) {
- const message = { ok: false, artifactId: "0" };
- globalThis.Object.defineProperty(message, runtime_4.MESSAGE_TYPE, { enumerable: false, value: this });
- if (value !== undefined)
- (0, runtime_3.reflectionMergePartial)(this, message, value);
- return message;
- }
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create(), end = reader.pos + length;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case /* bool ok */ 1:
- message.ok = reader.bool();
- break;
- case /* int64 artifact_id */ 2:
- message.artifactId = reader.int64().toString();
- break;
- default:
- let u = options.readUnknownField;
- if (u === "throw")
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? runtime_2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
- }
- }
- return message;
- }
- internalBinaryWrite(message, writer, options) {
- /* bool ok = 1; */
- if (message.ok !== false)
- writer.tag(1, runtime_1.WireType.Varint).bool(message.ok);
- /* int64 artifact_id = 2; */
- if (message.artifactId !== "0")
- writer.tag(2, runtime_1.WireType.Varint).int64(message.artifactId);
- let u = options.writeUnknownFields;
- if (u !== false)
- (u == true ? runtime_2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
- return writer;
- }
-}
-/**
- * @generated MessageType for protobuf message github.actions.results.api.v1.DeleteArtifactResponse
- */
-exports.DeleteArtifactResponse = new DeleteArtifactResponse$Type();
-/**
- * @generated ServiceType for protobuf service github.actions.results.api.v1.ArtifactService
- */
-exports.ArtifactService = new runtime_rpc_1.ServiceType("github.actions.results.api.v1.ArtifactService", [
- { name: "CreateArtifact", options: {}, I: exports.CreateArtifactRequest, O: exports.CreateArtifactResponse },
- { name: "FinalizeArtifact", options: {}, I: exports.FinalizeArtifactRequest, O: exports.FinalizeArtifactResponse },
- { name: "ListArtifacts", options: {}, I: exports.ListArtifactsRequest, O: exports.ListArtifactsResponse },
- { name: "GetSignedArtifactURL", options: {}, I: exports.GetSignedArtifactURLRequest, O: exports.GetSignedArtifactURLResponse },
- { name: "DeleteArtifact", options: {}, I: exports.DeleteArtifactRequest, O: exports.DeleteArtifactResponse },
- { name: "MigrateArtifact", options: {}, I: exports.MigrateArtifactRequest, O: exports.MigrateArtifactResponse },
- { name: "FinalizeMigratedArtifact", options: {}, I: exports.FinalizeMigratedArtifactRequest, O: exports.FinalizeMigratedArtifactResponse }
-]);
-//# sourceMappingURL=artifact.js.map
-
-/***/ }),
-
-/***/ 49773:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ArtifactServiceClientProtobuf = exports.ArtifactServiceClientJSON = void 0;
-const artifact_1 = __nccwpck_require__(58178);
-class ArtifactServiceClientJSON {
- constructor(rpc) {
- this.rpc = rpc;
- this.CreateArtifact.bind(this);
- this.FinalizeArtifact.bind(this);
- this.ListArtifacts.bind(this);
- this.GetSignedArtifactURL.bind(this);
- this.DeleteArtifact.bind(this);
- }
- CreateArtifact(request) {
- const data = artifact_1.CreateArtifactRequest.toJson(request, {
- useProtoFieldName: true,
- emitDefaultValues: false,
- });
- const promise = this.rpc.request("github.actions.results.api.v1.ArtifactService", "CreateArtifact", "application/json", data);
- return promise.then((data) => artifact_1.CreateArtifactResponse.fromJson(data, {
- ignoreUnknownFields: true,
- }));
- }
- FinalizeArtifact(request) {
- const data = artifact_1.FinalizeArtifactRequest.toJson(request, {
- useProtoFieldName: true,
- emitDefaultValues: false,
- });
- const promise = this.rpc.request("github.actions.results.api.v1.ArtifactService", "FinalizeArtifact", "application/json", data);
- return promise.then((data) => artifact_1.FinalizeArtifactResponse.fromJson(data, {
- ignoreUnknownFields: true,
- }));
- }
- ListArtifacts(request) {
- const data = artifact_1.ListArtifactsRequest.toJson(request, {
- useProtoFieldName: true,
- emitDefaultValues: false,
- });
- const promise = this.rpc.request("github.actions.results.api.v1.ArtifactService", "ListArtifacts", "application/json", data);
- return promise.then((data) => artifact_1.ListArtifactsResponse.fromJson(data, { ignoreUnknownFields: true }));
- }
- GetSignedArtifactURL(request) {
- const data = artifact_1.GetSignedArtifactURLRequest.toJson(request, {
- useProtoFieldName: true,
- emitDefaultValues: false,
- });
- const promise = this.rpc.request("github.actions.results.api.v1.ArtifactService", "GetSignedArtifactURL", "application/json", data);
- return promise.then((data) => artifact_1.GetSignedArtifactURLResponse.fromJson(data, {
- ignoreUnknownFields: true,
- }));
- }
- DeleteArtifact(request) {
- const data = artifact_1.DeleteArtifactRequest.toJson(request, {
- useProtoFieldName: true,
- emitDefaultValues: false,
- });
- const promise = this.rpc.request("github.actions.results.api.v1.ArtifactService", "DeleteArtifact", "application/json", data);
- return promise.then((data) => artifact_1.DeleteArtifactResponse.fromJson(data, {
- ignoreUnknownFields: true,
- }));
- }
-}
-exports.ArtifactServiceClientJSON = ArtifactServiceClientJSON;
-class ArtifactServiceClientProtobuf {
- constructor(rpc) {
- this.rpc = rpc;
- this.CreateArtifact.bind(this);
- this.FinalizeArtifact.bind(this);
- this.ListArtifacts.bind(this);
- this.GetSignedArtifactURL.bind(this);
- this.DeleteArtifact.bind(this);
- }
- CreateArtifact(request) {
- const data = artifact_1.CreateArtifactRequest.toBinary(request);
- const promise = this.rpc.request("github.actions.results.api.v1.ArtifactService", "CreateArtifact", "application/protobuf", data);
- return promise.then((data) => artifact_1.CreateArtifactResponse.fromBinary(data));
- }
- FinalizeArtifact(request) {
- const data = artifact_1.FinalizeArtifactRequest.toBinary(request);
- const promise = this.rpc.request("github.actions.results.api.v1.ArtifactService", "FinalizeArtifact", "application/protobuf", data);
- return promise.then((data) => artifact_1.FinalizeArtifactResponse.fromBinary(data));
- }
- ListArtifacts(request) {
- const data = artifact_1.ListArtifactsRequest.toBinary(request);
- const promise = this.rpc.request("github.actions.results.api.v1.ArtifactService", "ListArtifacts", "application/protobuf", data);
- return promise.then((data) => artifact_1.ListArtifactsResponse.fromBinary(data));
- }
- GetSignedArtifactURL(request) {
- const data = artifact_1.GetSignedArtifactURLRequest.toBinary(request);
- const promise = this.rpc.request("github.actions.results.api.v1.ArtifactService", "GetSignedArtifactURL", "application/protobuf", data);
- return promise.then((data) => artifact_1.GetSignedArtifactURLResponse.fromBinary(data));
- }
- DeleteArtifact(request) {
- const data = artifact_1.DeleteArtifactRequest.toBinary(request);
- const promise = this.rpc.request("github.actions.results.api.v1.ArtifactService", "DeleteArtifact", "application/protobuf", data);
- return promise.then((data) => artifact_1.DeleteArtifactResponse.fromBinary(data));
- }
-}
-exports.ArtifactServiceClientProtobuf = ArtifactServiceClientProtobuf;
-//# sourceMappingURL=artifact.twirp-client.js.map
/***/ }),
-/***/ 46190:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 7145:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-"use strict";
+module.exports = minimatch
+minimatch.Minimatch = Minimatch
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __rest = (this && this.__rest) || function (s, e) {
- var t = {};
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
- t[p] = s[p];
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
- t[p[i]] = s[p[i]];
- }
- return t;
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.DefaultArtifactClient = void 0;
-const core_1 = __nccwpck_require__(42186);
-const config_1 = __nccwpck_require__(74610);
-const upload_artifact_1 = __nccwpck_require__(42578);
-const download_artifact_1 = __nccwpck_require__(73555);
-const delete_artifact_1 = __nccwpck_require__(70071);
-const get_artifact_1 = __nccwpck_require__(29491);
-const list_artifacts_1 = __nccwpck_require__(44141);
-const errors_1 = __nccwpck_require__(38182);
-/**
- * The default artifact client that is used by the artifact action(s).
- */
-class DefaultArtifactClient {
- uploadArtifact(name, files, rootDirectory, options) {
- return __awaiter(this, void 0, void 0, function* () {
- try {
- if ((0, config_1.isGhes)()) {
- throw new errors_1.GHESNotSupportedError();
- }
- return (0, upload_artifact_1.uploadArtifact)(name, files, rootDirectory, options);
- }
- catch (error) {
- (0, core_1.warning)(`Artifact upload failed with error: ${error}.
+var path = (function () { try { return __nccwpck_require__(6928) } catch (e) {}}()) || {
+ sep: '/'
+}
+minimatch.sep = path.sep
-Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
+var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+var expand = __nccwpck_require__(9034)
-If the error persists, please check whether Actions is operating normally at [https://githubstatus.com](https://www.githubstatus.com).`);
- throw error;
- }
- });
- }
- downloadArtifact(artifactId, options) {
- return __awaiter(this, void 0, void 0, function* () {
- try {
- if ((0, config_1.isGhes)()) {
- throw new errors_1.GHESNotSupportedError();
- }
- if (options === null || options === void 0 ? void 0 : options.findBy) {
- const { findBy: { repositoryOwner, repositoryName, token } } = options, downloadOptions = __rest(options, ["findBy"]);
- return (0, download_artifact_1.downloadArtifactPublic)(artifactId, repositoryOwner, repositoryName, token, downloadOptions);
- }
- return (0, download_artifact_1.downloadArtifactInternal)(artifactId, options);
- }
- catch (error) {
- (0, core_1.warning)(`Download Artifact failed with error: ${error}.
+var plTypes = {
+ '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
+ '?': { open: '(?:', close: ')?' },
+ '+': { open: '(?:', close: ')+' },
+ '*': { open: '(?:', close: ')*' },
+ '@': { open: '(?:', close: ')' }
+}
-Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
+// any single thing other than /
+// don't need to escape / when using new RegExp()
+var qmark = '[^/]'
-If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`);
- throw error;
- }
- });
- }
- listArtifacts(options) {
- return __awaiter(this, void 0, void 0, function* () {
- try {
- if ((0, config_1.isGhes)()) {
- throw new errors_1.GHESNotSupportedError();
- }
- if (options === null || options === void 0 ? void 0 : options.findBy) {
- const { findBy: { workflowRunId, repositoryOwner, repositoryName, token } } = options;
- return (0, list_artifacts_1.listArtifactsPublic)(workflowRunId, repositoryOwner, repositoryName, token, options === null || options === void 0 ? void 0 : options.latest);
- }
- return (0, list_artifacts_1.listArtifactsInternal)(options === null || options === void 0 ? void 0 : options.latest);
- }
- catch (error) {
- (0, core_1.warning)(`Listing Artifacts failed with error: ${error}.
+// * => any number of characters
+var star = qmark + '*?'
-Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
+// ** when dots are allowed. Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
-If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`);
- throw error;
- }
- });
- }
- getArtifact(artifactName, options) {
- return __awaiter(this, void 0, void 0, function* () {
- try {
- if ((0, config_1.isGhes)()) {
- throw new errors_1.GHESNotSupportedError();
- }
- if (options === null || options === void 0 ? void 0 : options.findBy) {
- const { findBy: { workflowRunId, repositoryOwner, repositoryName, token } } = options;
- return (0, get_artifact_1.getArtifactPublic)(artifactName, workflowRunId, repositoryOwner, repositoryName, token);
- }
- return (0, get_artifact_1.getArtifactInternal)(artifactName);
- }
- catch (error) {
- (0, core_1.warning)(`Get Artifact failed with error: ${error}.
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
-Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
+// characters that need to be escaped in RegExp.
+var reSpecials = charSet('().*{}+?[]^$\\!')
-If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`);
- throw error;
- }
- });
- }
- deleteArtifact(artifactName, options) {
- return __awaiter(this, void 0, void 0, function* () {
- try {
- if ((0, config_1.isGhes)()) {
- throw new errors_1.GHESNotSupportedError();
- }
- if (options === null || options === void 0 ? void 0 : options.findBy) {
- const { findBy: { repositoryOwner, repositoryName, workflowRunId, token } } = options;
- return (0, delete_artifact_1.deleteArtifactPublic)(artifactName, workflowRunId, repositoryOwner, repositoryName, token);
- }
- return (0, delete_artifact_1.deleteArtifactInternal)(artifactName);
- }
- catch (error) {
- (0, core_1.warning)(`Delete Artifact failed with error: ${error}.
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+ return s.split('').reduce(function (set, c) {
+ set[c] = true
+ return set
+ }, {})
+}
-Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information.
+// normalizes slashes.
+var slashSplit = /\/+/
-If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`);
- throw error;
- }
- });
- }
+minimatch.filter = filter
+function filter (pattern, options) {
+ options = options || {}
+ return function (p, i, list) {
+ return minimatch(p, pattern, options)
+ }
}
-exports.DefaultArtifactClient = DefaultArtifactClient;
-//# sourceMappingURL=client.js.map
-/***/ }),
+function ext (a, b) {
+ b = b || {}
+ var t = {}
+ Object.keys(a).forEach(function (k) {
+ t[k] = a[k]
+ })
+ Object.keys(b).forEach(function (k) {
+ t[k] = b[k]
+ })
+ return t
+}
-/***/ 70071:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+minimatch.defaults = function (def) {
+ if (!def || typeof def !== 'object' || !Object.keys(def).length) {
+ return minimatch
+ }
-"use strict";
+ var orig = minimatch
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.deleteArtifactPublic = deleteArtifactPublic;
-exports.deleteArtifactInternal = deleteArtifactInternal;
-const core_1 = __nccwpck_require__(42186);
-const github_1 = __nccwpck_require__(95438);
-const user_agent_1 = __nccwpck_require__(85164);
-const retry_options_1 = __nccwpck_require__(64597);
-const utils_1 = __nccwpck_require__(73030);
-const plugin_request_log_1 = __nccwpck_require__(68883);
-const plugin_retry_1 = __nccwpck_require__(86298);
-const artifact_twirp_client_1 = __nccwpck_require__(12312);
-const util_1 = __nccwpck_require__(63062);
-const generated_1 = __nccwpck_require__(49960);
-const get_artifact_1 = __nccwpck_require__(29491);
-const errors_1 = __nccwpck_require__(38182);
-function deleteArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) {
- return __awaiter(this, void 0, void 0, function* () {
- var _a;
- const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults);
- const opts = {
- log: undefined,
- userAgent: (0, user_agent_1.getUserAgentString)(),
- previews: undefined,
- retry: retryOpts,
- request: requestOpts
- };
- const github = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
- const getArtifactResp = yield (0, get_artifact_1.getArtifactPublic)(artifactName, workflowRunId, repositoryOwner, repositoryName, token);
- const deleteArtifactResp = yield github.rest.actions.deleteArtifact({
- owner: repositoryOwner,
- repo: repositoryName,
- artifact_id: getArtifactResp.artifact.id
- });
- if (deleteArtifactResp.status !== 204) {
- throw new errors_1.InvalidResponseError(`Invalid response from GitHub API: ${deleteArtifactResp.status} (${(_a = deleteArtifactResp === null || deleteArtifactResp === void 0 ? void 0 : deleteArtifactResp.headers) === null || _a === void 0 ? void 0 : _a['x-github-request-id']})`);
- }
- return {
- id: getArtifactResp.artifact.id
- };
- });
-}
-function deleteArtifactInternal(artifactName) {
- return __awaiter(this, void 0, void 0, function* () {
- const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)();
- const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)();
- const listReq = {
- workflowRunBackendId,
- workflowJobRunBackendId,
- nameFilter: generated_1.StringValue.create({ value: artifactName })
- };
- const listRes = yield artifactClient.ListArtifacts(listReq);
- if (listRes.artifacts.length === 0) {
- throw new errors_1.ArtifactNotFoundError(`Artifact not found for name: ${artifactName}`);
- }
- let artifact = listRes.artifacts[0];
- if (listRes.artifacts.length > 1) {
- artifact = listRes.artifacts.sort((a, b) => Number(b.databaseId) - Number(a.databaseId))[0];
- (0, core_1.debug)(`More than one artifact found for a single name, returning newest (id: ${artifact.databaseId})`);
- }
- const req = {
- workflowRunBackendId: artifact.workflowRunBackendId,
- workflowJobRunBackendId: artifact.workflowJobRunBackendId,
- name: artifact.name
- };
- const res = yield artifactClient.DeleteArtifact(req);
- (0, core_1.info)(`Artifact '${artifactName}' (ID: ${res.artifactId}) deleted`);
- return {
- id: Number(res.artifactId)
- };
- });
-}
-//# sourceMappingURL=delete-artifact.js.map
+ var m = function minimatch (p, pattern, options) {
+ return orig(p, pattern, ext(def, options))
+ }
-/***/ }),
+ m.Minimatch = function Minimatch (pattern, options) {
+ return new orig.Minimatch(pattern, ext(def, options))
+ }
+ m.Minimatch.defaults = function defaults (options) {
+ return orig.defaults(ext(def, options)).Minimatch
+ }
-/***/ 73555:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+ m.filter = function filter (pattern, options) {
+ return orig.filter(pattern, ext(def, options))
+ }
-"use strict";
+ m.defaults = function defaults (options) {
+ return orig.defaults(ext(def, options))
+ }
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.streamExtractExternal = streamExtractExternal;
-exports.downloadArtifactPublic = downloadArtifactPublic;
-exports.downloadArtifactInternal = downloadArtifactInternal;
-const promises_1 = __importDefault(__nccwpck_require__(73292));
-const crypto = __importStar(__nccwpck_require__(6113));
-const stream = __importStar(__nccwpck_require__(12781));
-const github = __importStar(__nccwpck_require__(95438));
-const core = __importStar(__nccwpck_require__(42186));
-const httpClient = __importStar(__nccwpck_require__(96255));
-const unzip_stream_1 = __importDefault(__nccwpck_require__(69340));
-const user_agent_1 = __nccwpck_require__(85164);
-const config_1 = __nccwpck_require__(74610);
-const artifact_twirp_client_1 = __nccwpck_require__(12312);
-const generated_1 = __nccwpck_require__(49960);
-const util_1 = __nccwpck_require__(63062);
-const errors_1 = __nccwpck_require__(38182);
-const scrubQueryParameters = (url) => {
- const parsed = new URL(url);
- parsed.search = '';
- return parsed.toString();
-};
-function exists(path) {
- return __awaiter(this, void 0, void 0, function* () {
- try {
- yield promises_1.default.access(path);
- return true;
- }
- catch (error) {
- if (error.code === 'ENOENT') {
- return false;
- }
- else {
- throw error;
- }
- }
- });
-}
-function streamExtract(url, directory) {
- return __awaiter(this, void 0, void 0, function* () {
- let retryCount = 0;
- while (retryCount < 5) {
- try {
- return yield streamExtractExternal(url, directory);
- }
- catch (error) {
- retryCount++;
- core.debug(`Failed to download artifact after ${retryCount} retries due to ${error.message}. Retrying in 5 seconds...`);
- // wait 5 seconds before retrying
- yield new Promise(resolve => setTimeout(resolve, 5000));
- }
- }
- throw new Error(`Artifact download failed after ${retryCount} retries.`);
- });
+ m.makeRe = function makeRe (pattern, options) {
+ return orig.makeRe(pattern, ext(def, options))
+ }
+
+ m.braceExpand = function braceExpand (pattern, options) {
+ return orig.braceExpand(pattern, ext(def, options))
+ }
+
+ m.match = function (list, pattern, options) {
+ return orig.match(list, pattern, ext(def, options))
+ }
+
+ return m
}
-function streamExtractExternal(url_1, directory_1) {
- return __awaiter(this, arguments, void 0, function* (url, directory, opts = { timeout: 30 * 1000 }) {
- const client = new httpClient.HttpClient((0, user_agent_1.getUserAgentString)());
- const response = yield client.get(url);
- if (response.message.statusCode !== 200) {
- throw new Error(`Unexpected HTTP response from blob storage: ${response.message.statusCode} ${response.message.statusMessage}`);
- }
- let sha256Digest = undefined;
- return new Promise((resolve, reject) => {
- const timerFn = () => {
- const timeoutError = new Error(`Blob storage chunk did not respond in ${opts.timeout}ms`);
- response.message.destroy(timeoutError);
- reject(timeoutError);
- };
- const timer = setTimeout(timerFn, opts.timeout);
- const hashStream = crypto.createHash('sha256').setEncoding('hex');
- const passThrough = new stream.PassThrough();
- response.message.pipe(passThrough);
- passThrough.pipe(hashStream);
- const extractStream = passThrough;
- extractStream
- .on('data', () => {
- timer.refresh();
- })
- .on('error', (error) => {
- core.debug(`response.message: Artifact download failed: ${error.message}`);
- clearTimeout(timer);
- reject(error);
- })
- .pipe(unzip_stream_1.default.Extract({ path: directory }))
- .on('close', () => {
- clearTimeout(timer);
- if (hashStream) {
- hashStream.end();
- sha256Digest = hashStream.read();
- core.info(`SHA256 digest of downloaded artifact is ${sha256Digest}`);
- }
- resolve({ sha256Digest: `sha256:${sha256Digest}` });
- })
- .on('error', (error) => {
- reject(error);
- });
- });
- });
+
+Minimatch.defaults = function (def) {
+ return minimatch.defaults(def).Minimatch
}
-function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, token, options) {
- return __awaiter(this, void 0, void 0, function* () {
- const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path);
- const api = github.getOctokit(token);
- let digestMismatch = false;
- core.info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`);
- const { headers, status } = yield api.rest.actions.downloadArtifact({
- owner: repositoryOwner,
- repo: repositoryName,
- artifact_id: artifactId,
- archive_format: 'zip',
- request: {
- redirect: 'manual'
- }
- });
- if (status !== 302) {
- throw new Error(`Unable to download artifact. Unexpected status: ${status}`);
- }
- const { location } = headers;
- if (!location) {
- throw new Error(`Unable to redirect to artifact download url`);
- }
- core.info(`Redirecting to blob download url: ${scrubQueryParameters(location)}`);
- try {
- core.info(`Starting download of artifact to: ${downloadPath}`);
- const extractResponse = yield streamExtract(location, downloadPath);
- core.info(`Artifact download completed successfully.`);
- if (options === null || options === void 0 ? void 0 : options.expectedHash) {
- if ((options === null || options === void 0 ? void 0 : options.expectedHash) !== extractResponse.sha256Digest) {
- digestMismatch = true;
- core.debug(`Computed digest: ${extractResponse.sha256Digest}`);
- core.debug(`Expected digest: ${options.expectedHash}`);
- }
- }
- }
- catch (error) {
- throw new Error(`Unable to download and extract artifact: ${error.message}`);
- }
- return { downloadPath, digestMismatch };
- });
+
+function minimatch (p, pattern, options) {
+ assertValidPattern(pattern)
+
+ if (!options) options = {}
+
+ // shortcut: comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ return false
+ }
+
+ return new Minimatch(pattern, options).match(p)
}
-function downloadArtifactInternal(artifactId, options) {
- return __awaiter(this, void 0, void 0, function* () {
- const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path);
- const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)();
- let digestMismatch = false;
- const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)();
- const listReq = {
- workflowRunBackendId,
- workflowJobRunBackendId,
- idFilter: generated_1.Int64Value.create({ value: artifactId.toString() })
- };
- const { artifacts } = yield artifactClient.ListArtifacts(listReq);
- if (artifacts.length === 0) {
- throw new errors_1.ArtifactNotFoundError(`No artifacts found for ID: ${artifactId}\nAre you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`);
- }
- if (artifacts.length > 1) {
- core.warning('Multiple artifacts found, defaulting to first.');
- }
- const signedReq = {
- workflowRunBackendId: artifacts[0].workflowRunBackendId,
- workflowJobRunBackendId: artifacts[0].workflowJobRunBackendId,
- name: artifacts[0].name
- };
- const { signedUrl } = yield artifactClient.GetSignedArtifactURL(signedReq);
- core.info(`Redirecting to blob download url: ${scrubQueryParameters(signedUrl)}`);
- try {
- core.info(`Starting download of artifact to: ${downloadPath}`);
- const extractResponse = yield streamExtract(signedUrl, downloadPath);
- core.info(`Artifact download completed successfully.`);
- if (options === null || options === void 0 ? void 0 : options.expectedHash) {
- if ((options === null || options === void 0 ? void 0 : options.expectedHash) !== extractResponse.sha256Digest) {
- digestMismatch = true;
- core.debug(`Computed digest: ${extractResponse.sha256Digest}`);
- core.debug(`Expected digest: ${options.expectedHash}`);
- }
- }
- }
- catch (error) {
- throw new Error(`Unable to download and extract artifact: ${error.message}`);
- }
- return { downloadPath, digestMismatch };
- });
+
+function Minimatch (pattern, options) {
+ if (!(this instanceof Minimatch)) {
+ return new Minimatch(pattern, options)
+ }
+
+ assertValidPattern(pattern)
+
+ if (!options) options = {}
+
+ pattern = pattern.trim()
+
+ // windows support: need to use /, not \
+ if (!options.allowWindowsEscape && path.sep !== '/') {
+ pattern = pattern.split(path.sep).join('/')
+ }
+
+ this.options = options
+ this.maxGlobstarRecursion = options.maxGlobstarRecursion !== undefined
+ ? options.maxGlobstarRecursion : 200
+ this.set = []
+ this.pattern = pattern
+ this.regexp = null
+ this.negate = false
+ this.comment = false
+ this.empty = false
+ this.partial = !!options.partial
+
+ // make the set of regexps etc.
+ this.make()
}
-function resolveOrCreateDirectory() {
- return __awaiter(this, arguments, void 0, function* (downloadPath = (0, config_1.getGitHubWorkspaceDir)()) {
- if (!(yield exists(downloadPath))) {
- core.debug(`Artifact destination folder does not exist, creating: ${downloadPath}`);
- yield promises_1.default.mkdir(downloadPath, { recursive: true });
- }
- else {
- core.debug(`Artifact destination folder already exists: ${downloadPath}`);
- }
- return downloadPath;
- });
+
+Minimatch.prototype.debug = function () {}
+
+Minimatch.prototype.make = make
+function make () {
+ var pattern = this.pattern
+ var options = this.options
+
+ // empty patterns and comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === '#') {
+ this.comment = true
+ return
+ }
+ if (!pattern) {
+ this.empty = true
+ return
+ }
+
+ // step 1: figure out negation, etc.
+ this.parseNegate()
+
+ // step 2: expand braces
+ var set = this.globSet = this.braceExpand()
+
+ if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
+
+ this.debug(this.pattern, set)
+
+ // step 3: now we have a set, so turn each one into a series of path-portion
+ // matching patterns.
+ // These will be regexps, except in the case of "**", which is
+ // set to the GLOBSTAR object for globstar behavior,
+ // and will not contain any / characters
+ set = this.globParts = set.map(function (s) {
+ return s.split(slashSplit)
+ })
+
+ this.debug(this.pattern, set)
+
+ // glob --> regexps
+ set = set.map(function (s, si, set) {
+ return s.map(this.parse, this)
+ }, this)
+
+ this.debug(this.pattern, set)
+
+ // filter out everything that didn't compile properly.
+ set = set.filter(function (s) {
+ return s.indexOf(false) === -1
+ })
+
+ this.debug(this.pattern, set)
+
+ this.set = set
}
-//# sourceMappingURL=download-artifact.js.map
-/***/ }),
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+ var pattern = this.pattern
+ var negate = false
+ var options = this.options
+ var negateOffset = 0
-/***/ 29491:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+ if (options.nonegate) return
-"use strict";
+ for (var i = 0, l = pattern.length
+ ; i < l && pattern.charAt(i) === '!'
+ ; i++) {
+ negate = !negate
+ negateOffset++
+ }
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getArtifactPublic = getArtifactPublic;
-exports.getArtifactInternal = getArtifactInternal;
-const github_1 = __nccwpck_require__(95438);
-const plugin_retry_1 = __nccwpck_require__(86298);
-const core = __importStar(__nccwpck_require__(42186));
-const utils_1 = __nccwpck_require__(73030);
-const retry_options_1 = __nccwpck_require__(64597);
-const plugin_request_log_1 = __nccwpck_require__(68883);
-const util_1 = __nccwpck_require__(63062);
-const user_agent_1 = __nccwpck_require__(85164);
-const artifact_twirp_client_1 = __nccwpck_require__(12312);
-const generated_1 = __nccwpck_require__(49960);
-const errors_1 = __nccwpck_require__(38182);
-function getArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) {
- return __awaiter(this, void 0, void 0, function* () {
- var _a;
- const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults);
- const opts = {
- log: undefined,
- userAgent: (0, user_agent_1.getUserAgentString)(),
- previews: undefined,
- retry: retryOpts,
- request: requestOpts
- };
- const github = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
- const getArtifactResp = yield github.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}', {
- owner: repositoryOwner,
- repo: repositoryName,
- run_id: workflowRunId,
- name: artifactName
- });
- if (getArtifactResp.status !== 200) {
- throw new errors_1.InvalidResponseError(`Invalid response from GitHub API: ${getArtifactResp.status} (${(_a = getArtifactResp === null || getArtifactResp === void 0 ? void 0 : getArtifactResp.headers) === null || _a === void 0 ? void 0 : _a['x-github-request-id']})`);
- }
- if (getArtifactResp.data.artifacts.length === 0) {
- throw new errors_1.ArtifactNotFoundError(`Artifact not found for name: ${artifactName}
- Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
- For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);
- }
- let artifact = getArtifactResp.data.artifacts[0];
- if (getArtifactResp.data.artifacts.length > 1) {
- artifact = getArtifactResp.data.artifacts.sort((a, b) => b.id - a.id)[0];
- core.debug(`More than one artifact found for a single name, returning newest (id: ${artifact.id})`);
- }
- return {
- artifact: {
- name: artifact.name,
- id: artifact.id,
- size: artifact.size_in_bytes,
- createdAt: artifact.created_at
- ? new Date(artifact.created_at)
- : undefined,
- digest: artifact.digest
- }
- };
- });
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
+ this.negate = negate
}
-function getArtifactInternal(artifactName) {
- return __awaiter(this, void 0, void 0, function* () {
- var _a;
- const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)();
- const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)();
- const req = {
- workflowRunBackendId,
- workflowJobRunBackendId,
- nameFilter: generated_1.StringValue.create({ value: artifactName })
- };
- const res = yield artifactClient.ListArtifacts(req);
- if (res.artifacts.length === 0) {
- throw new errors_1.ArtifactNotFoundError(`Artifact not found for name: ${artifactName}
- Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
- For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);
- }
- let artifact = res.artifacts[0];
- if (res.artifacts.length > 1) {
- artifact = res.artifacts.sort((a, b) => Number(b.databaseId) - Number(a.databaseId))[0];
- core.debug(`More than one artifact found for a single name, returning newest (id: ${artifact.databaseId})`);
- }
- return {
- artifact: {
- name: artifact.name,
- id: Number(artifact.databaseId),
- size: Number(artifact.size),
- createdAt: artifact.createdAt
- ? generated_1.Timestamp.toDate(artifact.createdAt)
- : undefined,
- digest: (_a = artifact.digest) === null || _a === void 0 ? void 0 : _a.value
- }
- };
- });
+
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+ return braceExpand(pattern, options)
}
-//# sourceMappingURL=get-artifact.js.map
-/***/ }),
+Minimatch.prototype.braceExpand = braceExpand
-/***/ 44141:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+function braceExpand (pattern, options) {
+ if (!options) {
+ if (this instanceof Minimatch) {
+ options = this.options
+ } else {
+ options = {}
+ }
+ }
-"use strict";
+ pattern = typeof pattern === 'undefined'
+ ? this.pattern : pattern
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.listArtifactsPublic = listArtifactsPublic;
-exports.listArtifactsInternal = listArtifactsInternal;
-const core_1 = __nccwpck_require__(42186);
-const github_1 = __nccwpck_require__(95438);
-const user_agent_1 = __nccwpck_require__(85164);
-const retry_options_1 = __nccwpck_require__(64597);
-const utils_1 = __nccwpck_require__(73030);
-const plugin_request_log_1 = __nccwpck_require__(68883);
-const plugin_retry_1 = __nccwpck_require__(86298);
-const artifact_twirp_client_1 = __nccwpck_require__(12312);
-const util_1 = __nccwpck_require__(63062);
-const config_1 = __nccwpck_require__(74610);
-const generated_1 = __nccwpck_require__(49960);
-const maximumArtifactCount = (0, config_1.getMaxArtifactListCount)();
-const paginationCount = 100;
-const maxNumberOfPages = Math.ceil(maximumArtifactCount / paginationCount);
-function listArtifactsPublic(workflowRunId_1, repositoryOwner_1, repositoryName_1, token_1) {
- return __awaiter(this, arguments, void 0, function* (workflowRunId, repositoryOwner, repositoryName, token, latest = false) {
- (0, core_1.info)(`Fetching artifact list for workflow run ${workflowRunId} in repository ${repositoryOwner}/${repositoryName}`);
- let artifacts = [];
- const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults);
- const opts = {
- log: undefined,
- userAgent: (0, user_agent_1.getUserAgentString)(),
- previews: undefined,
- retry: retryOpts,
- request: requestOpts
- };
- const github = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
- let currentPageNumber = 1;
- const { data: listArtifactResponse } = yield github.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts', {
- owner: repositoryOwner,
- repo: repositoryName,
- run_id: workflowRunId,
- per_page: paginationCount,
- page: currentPageNumber
- });
- let numberOfPages = Math.ceil(listArtifactResponse.total_count / paginationCount);
- const totalArtifactCount = listArtifactResponse.total_count;
- if (totalArtifactCount > maximumArtifactCount) {
- (0, core_1.warning)(`Workflow run ${workflowRunId} has ${totalArtifactCount} artifacts, exceeding the limit of ${maximumArtifactCount}. Results will be incomplete as only the first ${maximumArtifactCount} artifacts will be returned`);
- numberOfPages = maxNumberOfPages;
- }
- // Iterate over the first page
- for (const artifact of listArtifactResponse.artifacts) {
- artifacts.push({
- name: artifact.name,
- id: artifact.id,
- size: artifact.size_in_bytes,
- createdAt: artifact.created_at
- ? new Date(artifact.created_at)
- : undefined,
- digest: artifact.digest
- });
- }
- // Move to the next page
- currentPageNumber++;
- // Iterate over any remaining pages
- for (currentPageNumber; currentPageNumber <= numberOfPages; currentPageNumber++) {
- (0, core_1.debug)(`Fetching page ${currentPageNumber} of artifact list`);
- const { data: listArtifactResponse } = yield github.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts', {
- owner: repositoryOwner,
- repo: repositoryName,
- run_id: workflowRunId,
- per_page: paginationCount,
- page: currentPageNumber
- });
- for (const artifact of listArtifactResponse.artifacts) {
- artifacts.push({
- name: artifact.name,
- id: artifact.id,
- size: artifact.size_in_bytes,
- createdAt: artifact.created_at
- ? new Date(artifact.created_at)
- : undefined,
- digest: artifact.digest
- });
- }
- }
- if (latest) {
- artifacts = filterLatest(artifacts);
- }
- (0, core_1.info)(`Found ${artifacts.length} artifact(s)`);
- return {
- artifacts
- };
- });
-}
-function listArtifactsInternal() {
- return __awaiter(this, arguments, void 0, function* (latest = false) {
- const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)();
- const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)();
- const req = {
- workflowRunBackendId,
- workflowJobRunBackendId
- };
- const res = yield artifactClient.ListArtifacts(req);
- let artifacts = res.artifacts.map(artifact => {
- var _a;
- return ({
- name: artifact.name,
- id: Number(artifact.databaseId),
- size: Number(artifact.size),
- createdAt: artifact.createdAt
- ? generated_1.Timestamp.toDate(artifact.createdAt)
- : undefined,
- digest: (_a = artifact.digest) === null || _a === void 0 ? void 0 : _a.value
- });
- });
- if (latest) {
- artifacts = filterLatest(artifacts);
- }
- (0, core_1.info)(`Found ${artifacts.length} artifact(s)`);
- return {
- artifacts
- };
- });
-}
-/**
- * Filters a list of artifacts to only include the latest artifact for each name
- * @param artifacts The artifacts to filter
- * @returns The filtered list of artifacts
- */
-function filterLatest(artifacts) {
- artifacts.sort((a, b) => b.id - a.id);
- const latestArtifacts = [];
- const seenArtifactNames = new Set();
- for (const artifact of artifacts) {
- if (!seenArtifactNames.has(artifact.name)) {
- latestArtifacts.push(artifact);
- seenArtifactNames.add(artifact.name);
- }
- }
- return latestArtifacts;
-}
-//# sourceMappingURL=list-artifacts.js.map
+ assertValidPattern(pattern)
-/***/ }),
+ // Thanks to Yeting Li for
+ // improving this regexp to avoid a ReDOS vulnerability.
+ if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
+ // shortcut. no need to expand.
+ return [pattern]
+ }
-/***/ 64597:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+ return expand(pattern)
+}
-"use strict";
+var MAX_PATTERN_LENGTH = 1024 * 64
+var assertValidPattern = function (pattern) {
+ if (typeof pattern !== 'string') {
+ throw new TypeError('invalid pattern')
+ }
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getRetryOptions = getRetryOptions;
-const core = __importStar(__nccwpck_require__(42186));
-// Defaults for fetching artifacts
-const defaultMaxRetryNumber = 5;
-const defaultExemptStatusCodes = [400, 401, 403, 404, 422]; // https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/index.ts#L14
-function getRetryOptions(defaultOptions, retries = defaultMaxRetryNumber, exemptStatusCodes = defaultExemptStatusCodes) {
- var _a;
- if (retries <= 0) {
- return [{ enabled: false }, defaultOptions.request];
- }
- const retryOptions = {
- enabled: true
- };
- if (exemptStatusCodes.length > 0) {
- retryOptions.doNotRetry = exemptStatusCodes;
- }
- // The GitHub type has some defaults for `options.request`
- // see: https://github.com/actions/toolkit/blob/4fbc5c941a57249b19562015edbd72add14be93d/packages/github/src/utils.ts#L15
- // We pass these in here so they are not overridden.
- const requestOptions = Object.assign(Object.assign({}, defaultOptions.request), { retries });
- core.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : 'octokit default: [400, 401, 403, 404, 422]'})`);
- return [retryOptions, requestOptions];
+ if (pattern.length > MAX_PATTERN_LENGTH) {
+ throw new TypeError('pattern is too long')
+ }
}
-//# sourceMappingURL=retry-options.js.map
-/***/ }),
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+ assertValidPattern(pattern)
-/***/ 12312:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+ var options = this.options
-"use strict";
+ // shortcuts
+ if (pattern === '**') {
+ if (!options.noglobstar)
+ return GLOBSTAR
+ else
+ pattern = '*'
+ }
+ if (pattern === '') return ''
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.internalArtifactTwirpClient = internalArtifactTwirpClient;
-const http_client_1 = __nccwpck_require__(96255);
-const auth_1 = __nccwpck_require__(35526);
-const core_1 = __nccwpck_require__(42186);
-const generated_1 = __nccwpck_require__(49960);
-const config_1 = __nccwpck_require__(74610);
-const user_agent_1 = __nccwpck_require__(85164);
-const errors_1 = __nccwpck_require__(38182);
-const util_1 = __nccwpck_require__(63062);
-class ArtifactHttpClient {
- constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) {
- this.maxAttempts = 5;
- this.baseRetryIntervalMilliseconds = 3000;
- this.retryMultiplier = 1.5;
- const token = (0, config_1.getRuntimeToken)();
- this.baseUrl = (0, config_1.getResultsServiceUrl)();
- if (maxAttempts) {
- this.maxAttempts = maxAttempts;
- }
- if (baseRetryIntervalMilliseconds) {
- this.baseRetryIntervalMilliseconds = baseRetryIntervalMilliseconds;
- }
- if (retryMultiplier) {
- this.retryMultiplier = retryMultiplier;
- }
- this.httpClient = new http_client_1.HttpClient(userAgent, [
- new auth_1.BearerCredentialHandler(token)
- ]);
- }
- // This function satisfies the Rpc interface. It is compatible with the JSON
- // JSON generated client.
- request(service, method, contentType, data) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href;
- (0, core_1.debug)(`[Request] ${method} ${url}`);
- const headers = {
- 'Content-Type': contentType
- };
- try {
- const { body } = yield this.retryableRequest(() => __awaiter(this, void 0, void 0, function* () { return this.httpClient.post(url, JSON.stringify(data), headers); }));
- return body;
- }
- catch (error) {
- throw new Error(`Failed to ${method}: ${error.message}`);
- }
- });
- }
- retryableRequest(operation) {
- return __awaiter(this, void 0, void 0, function* () {
- let attempt = 0;
- let errorMessage = '';
- let rawBody = '';
- while (attempt < this.maxAttempts) {
- let isRetryable = false;
- try {
- const response = yield operation();
- const statusCode = response.message.statusCode;
- rawBody = yield response.readBody();
- (0, core_1.debug)(`[Response] - ${response.message.statusCode}`);
- (0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`);
- const body = JSON.parse(rawBody);
- (0, util_1.maskSecretUrls)(body);
- (0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`);
- if (this.isSuccessStatusCode(statusCode)) {
- return { response, body };
- }
- isRetryable = this.isRetryableHttpStatusCode(statusCode);
- errorMessage = `Failed request: (${statusCode}) ${response.message.statusMessage}`;
- if (body.msg) {
- if (errors_1.UsageError.isUsageErrorMessage(body.msg)) {
- throw new errors_1.UsageError();
- }
- errorMessage = `${errorMessage}: ${body.msg}`;
- }
- }
- catch (error) {
- if (error instanceof SyntaxError) {
- (0, core_1.debug)(`Raw Body: ${rawBody}`);
- }
- if (error instanceof errors_1.UsageError) {
- throw error;
- }
- if (errors_1.NetworkError.isNetworkErrorCode(error === null || error === void 0 ? void 0 : error.code)) {
- throw new errors_1.NetworkError(error === null || error === void 0 ? void 0 : error.code);
- }
- isRetryable = true;
- errorMessage = error.message;
- }
- if (!isRetryable) {
- throw new Error(`Received non-retryable error: ${errorMessage}`);
- }
- if (attempt + 1 === this.maxAttempts) {
- throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${errorMessage}`);
- }
- const retryTimeMilliseconds = this.getExponentialRetryTimeMilliseconds(attempt);
- (0, core_1.info)(`Attempt ${attempt + 1} of ${this.maxAttempts} failed with error: ${errorMessage}. Retrying request in ${retryTimeMilliseconds} ms...`);
- yield this.sleep(retryTimeMilliseconds);
- attempt++;
- }
- throw new Error(`Request failed`);
- });
- }
- isSuccessStatusCode(statusCode) {
- if (!statusCode)
- return false;
- return statusCode >= 200 && statusCode < 300;
- }
- isRetryableHttpStatusCode(statusCode) {
- if (!statusCode)
- return false;
- const retryableStatusCodes = [
- http_client_1.HttpCodes.BadGateway,
- http_client_1.HttpCodes.GatewayTimeout,
- http_client_1.HttpCodes.InternalServerError,
- http_client_1.HttpCodes.ServiceUnavailable,
- http_client_1.HttpCodes.TooManyRequests
- ];
- return retryableStatusCodes.includes(statusCode);
- }
- sleep(milliseconds) {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise(resolve => setTimeout(resolve, milliseconds));
- });
+ var re = ''
+ var hasMagic = !!options.nocase
+ var escaping = false
+ // ? => one single character
+ var patternListStack = []
+ var negativeLists = []
+ var stateChar
+ var inClass = false
+ var reClassStart = -1
+ var classStart = -1
+ // . and .. never match anything that doesn't start with .,
+ // even when options.dot is set.
+ var patternStart = pattern.charAt(0) === '.' ? '' // anything
+ // not (start or / followed by . or .. followed by / or end)
+ : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
+ : '(?!\\.)'
+ var self = this
+
+ function clearStateChar () {
+ if (stateChar) {
+ // we had some state-tracking character
+ // that wasn't consumed by this pass.
+ switch (stateChar) {
+ case '*':
+ re += star
+ hasMagic = true
+ break
+ case '?':
+ re += qmark
+ hasMagic = true
+ break
+ default:
+ re += '\\' + stateChar
+ break
+ }
+ self.debug('clearStateChar %j %j', stateChar, re)
+ stateChar = false
}
- getExponentialRetryTimeMilliseconds(attempt) {
- if (attempt < 0) {
- throw new Error('attempt should be a positive integer');
- }
- if (attempt === 0) {
- return this.baseRetryIntervalMilliseconds;
- }
- const minTime = this.baseRetryIntervalMilliseconds * Math.pow(this.retryMultiplier, attempt);
- const maxTime = minTime * this.retryMultiplier;
- // returns a random number between minTime and maxTime (exclusive)
- return Math.trunc(Math.random() * (maxTime - minTime) + minTime);
+ }
+
+ for (var i = 0, len = pattern.length, c
+ ; (i < len) && (c = pattern.charAt(i))
+ ; i++) {
+ this.debug('%s\t%s %s %j', pattern, i, re, c)
+
+ // skip over any that are escaped.
+ if (escaping && reSpecials[c]) {
+ re += '\\' + c
+ escaping = false
+ continue
}
-}
-function internalArtifactTwirpClient(options) {
- const client = new ArtifactHttpClient((0, user_agent_1.getUserAgentString)(), options === null || options === void 0 ? void 0 : options.maxAttempts, options === null || options === void 0 ? void 0 : options.retryIntervalMs, options === null || options === void 0 ? void 0 : options.retryMultiplier);
- return new generated_1.ArtifactServiceClientJSON(client);
-}
-//# sourceMappingURL=artifact-twirp-client.js.map
-/***/ }),
+ switch (c) {
+ /* istanbul ignore next */
+ case '/': {
+ // completely not allowed, even escaped.
+ // Should already be path-split by now.
+ return false
+ }
-/***/ 74610:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+ case '\\':
+ clearStateChar()
+ escaping = true
+ continue
-"use strict";
+ // the various stateChar values
+ // for the "extglob" stuff.
+ case '?':
+ case '*':
+ case '+':
+ case '@':
+ case '!':
+ this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getUploadChunkSize = getUploadChunkSize;
-exports.getRuntimeToken = getRuntimeToken;
-exports.getResultsServiceUrl = getResultsServiceUrl;
-exports.isGhes = isGhes;
-exports.getGitHubWorkspaceDir = getGitHubWorkspaceDir;
-exports.getConcurrency = getConcurrency;
-exports.getUploadChunkTimeout = getUploadChunkTimeout;
-exports.getMaxArtifactListCount = getMaxArtifactListCount;
-const os_1 = __importDefault(__nccwpck_require__(22037));
-const core_1 = __nccwpck_require__(42186);
-// Used for controlling the highWaterMark value of the zip that is being streamed
-// The same value is used as the chunk size that is use during upload to blob storage
-function getUploadChunkSize() {
- return 8 * 1024 * 1024; // 8 MB Chunks
-}
-function getRuntimeToken() {
- const token = process.env['ACTIONS_RUNTIME_TOKEN'];
- if (!token) {
- throw new Error('Unable to get the ACTIONS_RUNTIME_TOKEN env variable');
- }
- return token;
-}
-function getResultsServiceUrl() {
- const resultsUrl = process.env['ACTIONS_RESULTS_URL'];
- if (!resultsUrl) {
- throw new Error('Unable to get the ACTIONS_RESULTS_URL env variable');
- }
- return new URL(resultsUrl).origin;
-}
-function isGhes() {
- const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
- const hostname = ghUrl.hostname.trimEnd().toUpperCase();
- const isGitHubHost = hostname === 'GITHUB.COM';
- const isGheHost = hostname.endsWith('.GHE.COM');
- const isLocalHost = hostname.endsWith('.LOCALHOST');
- return !isGitHubHost && !isGheHost && !isLocalHost;
-}
-function getGitHubWorkspaceDir() {
- const ghWorkspaceDir = process.env['GITHUB_WORKSPACE'];
- if (!ghWorkspaceDir) {
- throw new Error('Unable to get the GITHUB_WORKSPACE env variable');
- }
- return ghWorkspaceDir;
-}
-// The maximum value of concurrency is 300.
-// This value can be changed with ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY variable.
-function getConcurrency() {
- const numCPUs = os_1.default.cpus().length;
- let concurrencyCap = 32;
- if (numCPUs > 4) {
- const concurrency = 16 * numCPUs;
- concurrencyCap = concurrency > 300 ? 300 : concurrency;
- }
- const concurrencyOverride = process.env['ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY'];
- if (concurrencyOverride) {
- const concurrency = parseInt(concurrencyOverride);
- if (isNaN(concurrency) || concurrency < 1) {
- throw new Error('Invalid value set for ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY env variable');
- }
- if (concurrency < concurrencyCap) {
- (0, core_1.info)(`Set concurrency based on the value set in ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY.`);
- return concurrency;
+ // all of those are literals inside a class, except that
+ // the glob [!a] means [^a] in regexp
+ if (inClass) {
+ this.debug(' in class')
+ if (c === '!' && i === classStart + 1) c = '^'
+ re += c
+ continue
}
- (0, core_1.info)(`ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY is higher than the cap of ${concurrencyCap} based on the number of cpus. Set it to the maximum value allowed.`);
- return concurrencyCap;
- }
- // default concurrency to 5
- return 5;
-}
-function getUploadChunkTimeout() {
- const timeoutVar = process.env['ACTIONS_ARTIFACT_UPLOAD_TIMEOUT_MS'];
- if (!timeoutVar) {
- return 300000; // 5 minutes
- }
- const timeout = parseInt(timeoutVar);
- if (isNaN(timeout)) {
- throw new Error('Invalid value set for ACTIONS_ARTIFACT_UPLOAD_TIMEOUT_MS env variable');
- }
- return timeout;
-}
-// This value can be changed with ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT variable.
-// Defaults to 1000 as a safeguard for rate limiting.
-function getMaxArtifactListCount() {
- const maxCountVar = process.env['ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT'] || '1000';
- const maxCount = parseInt(maxCountVar);
- if (isNaN(maxCount) || maxCount < 1) {
- throw new Error('Invalid value set for ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT env variable');
- }
- return maxCount;
-}
-//# sourceMappingURL=config.js.map
-/***/ }),
+ // coalesce consecutive non-globstar * characters
+ if (c === '*' && stateChar === '*') continue
-/***/ 38182:
-/***/ ((__unused_webpack_module, exports) => {
+ // if we already have a stateChar, then it means
+ // that there was something like ** or +? in there.
+ // Handle the stateChar, then proceed with this one.
+ self.debug('call clearStateChar %j', stateChar)
+ clearStateChar()
+ stateChar = c
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
+ // just clear the statechar *now*, rather than even diving into
+ // the patternList stuff.
+ if (options.noext) clearStateChar()
+ continue
-"use strict";
+ case '(':
+ if (inClass) {
+ re += '('
+ continue
+ }
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.UsageError = exports.NetworkError = exports.GHESNotSupportedError = exports.ArtifactNotFoundError = exports.InvalidResponseError = exports.FilesNotFoundError = void 0;
-class FilesNotFoundError extends Error {
- constructor(files = []) {
- let message = 'No files were found to upload';
- if (files.length > 0) {
- message += `: ${files.join(', ')}`;
+ if (!stateChar) {
+ re += '\\('
+ continue
}
- super(message);
- this.files = files;
- this.name = 'FilesNotFoundError';
- }
-}
-exports.FilesNotFoundError = FilesNotFoundError;
-class InvalidResponseError extends Error {
- constructor(message) {
- super(message);
- this.name = 'InvalidResponseError';
- }
-}
-exports.InvalidResponseError = InvalidResponseError;
-class ArtifactNotFoundError extends Error {
- constructor(message = 'Artifact not found') {
- super(message);
- this.name = 'ArtifactNotFoundError';
- }
-}
-exports.ArtifactNotFoundError = ArtifactNotFoundError;
-class GHESNotSupportedError extends Error {
- constructor(message = '@actions/artifact v2.0.0+, upload-artifact@v4+ and download-artifact@v4+ are not currently supported on GHES.') {
- super(message);
- this.name = 'GHESNotSupportedError';
- }
-}
-exports.GHESNotSupportedError = GHESNotSupportedError;
-class NetworkError extends Error {
- constructor(code) {
- const message = `Unable to make request: ${code}\nIf 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(message);
- this.code = code;
- this.name = 'NetworkError';
- }
-}
-exports.NetworkError = NetworkError;
-NetworkError.isNetworkErrorCode = (code) => {
- if (!code)
- return false;
- return [
- 'ECONNRESET',
- 'ENOTFOUND',
- 'ETIMEDOUT',
- 'ECONNREFUSED',
- 'EHOSTUNREACH'
- ].includes(code);
-};
-class UsageError extends Error {
- constructor() {
- const message = `Artifact storage quota has been hit. Unable to upload any new artifacts. Usage is recalculated every 6-12 hours.\nMore 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(message);
- this.name = 'UsageError';
- }
-}
-exports.UsageError = UsageError;
-UsageError.isUsageErrorMessage = (msg) => {
- if (!msg)
- return false;
- return msg.includes('insufficient usage');
-};
-//# sourceMappingURL=errors.js.map
-
-/***/ }),
-
-/***/ 15769:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-//# sourceMappingURL=interfaces.js.map
+ patternListStack.push({
+ type: stateChar,
+ start: i - 1,
+ reStart: re.length,
+ open: plTypes[stateChar].open,
+ close: plTypes[stateChar].close
+ })
+ // negation is (?:(?!js)[^/]*)
+ re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
+ this.debug('plType %j %j', stateChar, re)
+ stateChar = false
+ continue
-/***/ }),
+ case ')':
+ if (inClass || !patternListStack.length) {
+ re += '\\)'
+ continue
+ }
-/***/ 85164:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+ clearStateChar()
+ hasMagic = true
+ var pl = patternListStack.pop()
+ // negation is (?:(?!js)[^/]*)
+ // The others are (?:)
+ re += pl.close
+ if (pl.type === '!') {
+ negativeLists.push(pl)
+ }
+ pl.reEnd = re.length
+ continue
-"use strict";
+ case '|':
+ if (inClass || !patternListStack.length || escaping) {
+ re += '\\|'
+ escaping = false
+ continue
+ }
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getUserAgentString = getUserAgentString;
-// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
-const packageJson = __nccwpck_require__(39839);
-/**
- * Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package
- */
-function getUserAgentString() {
- return `@actions/artifact-${packageJson.version}`;
-}
-//# sourceMappingURL=user-agent.js.map
+ clearStateChar()
+ re += '|'
+ continue
-/***/ }),
+ // these are mostly the same in regexp and glob
+ case '[':
+ // swallow any state-tracking char before the [
+ clearStateChar()
-/***/ 63062:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+ if (inClass) {
+ re += '\\' + c
+ continue
+ }
-"use strict";
+ inClass = true
+ classStart = i
+ reClassStart = re.length
+ re += c
+ continue
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getBackendIdsFromToken = getBackendIdsFromToken;
-exports.maskSigUrl = maskSigUrl;
-exports.maskSecretUrls = maskSecretUrls;
-const core = __importStar(__nccwpck_require__(42186));
-const config_1 = __nccwpck_require__(74610);
-const jwt_decode_1 = __importDefault(__nccwpck_require__(84329));
-const core_1 = __nccwpck_require__(42186);
-const InvalidJwtError = new Error('Failed to get backend IDs: The provided JWT token is invalid and/or missing claims');
-// uses the JWT token claims to get the
-// workflow run and workflow job run backend ids
-function getBackendIdsFromToken() {
- const token = (0, config_1.getRuntimeToken)();
- const decoded = (0, jwt_decode_1.default)(token);
- if (!decoded.scp) {
- throw InvalidJwtError;
- }
- /*
- * example decoded:
- * {
- * scp: "Actions.ExampleScope Actions.Results:ce7f54c7-61c7-4aae-887f-30da475f5f1a:ca395085-040a-526b-2ce8-bdc85f692774"
- * }
- */
- const scpParts = decoded.scp.split(' ');
- if (scpParts.length === 0) {
- throw InvalidJwtError;
- }
- /*
- * example scpParts:
- * ["Actions.ExampleScope", "Actions.Results:ce7f54c7-61c7-4aae-887f-30da475f5f1a:ca395085-040a-526b-2ce8-bdc85f692774"]
- */
- for (const scopes of scpParts) {
- const scopeParts = scopes.split(':');
- if ((scopeParts === null || scopeParts === void 0 ? void 0 : scopeParts[0]) !== 'Actions.Results') {
- // not the Actions.Results scope
- continue;
- }
- /*
- * example scopeParts:
- * ["Actions.Results", "ce7f54c7-61c7-4aae-887f-30da475f5f1a", "ca395085-040a-526b-2ce8-bdc85f692774"]
- */
- if (scopeParts.length !== 3) {
- // missing expected number of claims
- throw InvalidJwtError;
- }
- const ids = {
- workflowRunBackendId: scopeParts[1],
- workflowJobRunBackendId: scopeParts[2]
- };
- core.debug(`Workflow Run Backend ID: ${ids.workflowRunBackendId}`);
- core.debug(`Workflow Job Run Backend ID: ${ids.workflowJobRunBackendId}`);
- return ids;
- }
- throw InvalidJwtError;
-}
-/**
- * Masks the `sig` parameter in a URL and sets it as a secret.
- *
- * @param url - The URL containing the signature parameter to mask
- * @remarks
- * This function attempts to parse the provided URL and identify the 'sig' query parameter.
- * If found, it registers both the raw and URL-encoded signature values as secrets using
- * the Actions `setSecret` API, which prevents them from being displayed in logs.
- *
- * The function handles errors gracefully if URL parsing fails, logging them as debug messages.
- *
- * @example
- * ```typescript
- * // Mask a signature in an Azure SAS token URL
- * maskSigUrl('https://example.blob.core.windows.net/container/file.txt?sig=abc123&se=2023-01-01');
- * ```
- */
-function maskSigUrl(url) {
- if (!url)
- return;
- try {
- const parsedUrl = new URL(url);
- const signature = parsedUrl.searchParams.get('sig');
- if (signature) {
- (0, core_1.setSecret)(signature);
- (0, core_1.setSecret)(encodeURIComponent(signature));
+ case ']':
+ // a right bracket shall lose its special
+ // meaning and represent itself in
+ // a bracket expression if it occurs
+ // first in the list. -- POSIX.2 2.8.3.2
+ if (i === classStart + 1 || !inClass) {
+ re += '\\' + c
+ escaping = false
+ continue
}
- }
- catch (error) {
- (0, core_1.debug)(`Failed to parse URL: ${url} ${error instanceof Error ? error.message : String(error)}`);
- }
-}
-/**
- * Masks sensitive information in URLs containing signature parameters.
- * Currently supports masking 'sig' parameters in the 'signed_upload_url'
- * and 'signed_download_url' properties of the provided object.
- *
- * @param body - The object should contain a signature
- * @remarks
- * This function extracts URLs from the object properties and calls maskSigUrl
- * on each one to redact sensitive signature information. The function doesn't
- * modify the original object; it only marks the signatures as secrets for
- * logging purposes.
- *
- * @example
- * ```typescript
- * const responseBody = {
- * signed_upload_url: 'https://example.com?sig=abc123',
- * signed_download_url: 'https://example.com?sig=def456'
- * };
- * maskSecretUrls(responseBody);
- * ```
- */
-function maskSecretUrls(body) {
- if (typeof body !== 'object' || body === null) {
- (0, core_1.debug)('body is not an object or is null');
- return;
- }
- if ('signed_upload_url' in body &&
- typeof body.signed_upload_url === 'string') {
- maskSigUrl(body.signed_upload_url);
- }
- if ('signed_url' in body && typeof body.signed_url === 'string') {
- maskSigUrl(body.signed_url);
- }
-}
-//# sourceMappingURL=util.js.map
-/***/ }),
+ // handle the case where we left a class open.
+ // "[z-a]" is valid, equivalent to "\[z-a\]"
+ // split where the last [ was, make sure we don't have
+ // an invalid re. if so, re-walk the contents of the
+ // would-be class to re-translate any characters that
+ // were passed through as-is
+ // TODO: It would probably be faster to determine this
+ // without a try/catch and a new RegExp, but it's tricky
+ // to do safely. For now, this is safe and works.
+ var cs = pattern.substring(classStart + 1, i)
+ try {
+ RegExp('[' + cs + ']')
+ } catch (er) {
+ // not a valid class!
+ var sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
+ hasMagic = hasMagic || sp[1]
+ inClass = false
+ continue
+ }
-/***/ 7246:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+ // finish up the class.
+ hasMagic = true
+ inClass = false
+ re += c
+ continue
-"use strict";
+ default:
+ // swallow any state char that wasn't consumed
+ clearStateChar()
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.uploadZipToBlobStorage = uploadZipToBlobStorage;
-const storage_blob_1 = __nccwpck_require__(37168);
-const config_1 = __nccwpck_require__(74610);
-const core = __importStar(__nccwpck_require__(42186));
-const crypto = __importStar(__nccwpck_require__(6113));
-const stream = __importStar(__nccwpck_require__(12781));
-const errors_1 = __nccwpck_require__(38182);
-function uploadZipToBlobStorage(authenticatedUploadURL, zipUploadStream) {
- return __awaiter(this, void 0, void 0, function* () {
- let uploadByteCount = 0;
- let lastProgressTime = Date.now();
- const abortController = new AbortController();
- const chunkTimer = (interval) => __awaiter(this, void 0, void 0, function* () {
- return new Promise((resolve, reject) => {
- const timer = setInterval(() => {
- if (Date.now() - lastProgressTime > interval) {
- reject(new Error('Upload progress stalled.'));
- }
- }, interval);
- abortController.signal.addEventListener('abort', () => {
- clearInterval(timer);
- resolve();
- });
- });
- });
- const maxConcurrency = (0, config_1.getConcurrency)();
- const bufferSize = (0, config_1.getUploadChunkSize)();
- const blobClient = new storage_blob_1.BlobClient(authenticatedUploadURL);
- const blockBlobClient = blobClient.getBlockBlobClient();
- core.debug(`Uploading artifact zip to blob storage with maxConcurrency: ${maxConcurrency}, bufferSize: ${bufferSize}`);
- const uploadCallback = (progress) => {
- core.info(`Uploaded bytes ${progress.loadedBytes}`);
- uploadByteCount = progress.loadedBytes;
- lastProgressTime = Date.now();
- };
- const options = {
- blobHTTPHeaders: { blobContentType: 'zip' },
- onProgress: uploadCallback,
- abortSignal: abortController.signal
- };
- let sha256Hash = undefined;
- const uploadStream = new stream.PassThrough();
- const hashStream = crypto.createHash('sha256');
- zipUploadStream.pipe(uploadStream); // This stream is used for the upload
- zipUploadStream.pipe(hashStream).setEncoding('hex'); // This stream is used to compute a hash of the zip content that gets used. Integrity check
- core.info('Beginning upload of artifact content to blob storage');
- try {
- yield Promise.race([
- blockBlobClient.uploadStream(uploadStream, bufferSize, maxConcurrency, options),
- chunkTimer((0, config_1.getUploadChunkTimeout)())
- ]);
- }
- catch (error) {
- if (errors_1.NetworkError.isNetworkErrorCode(error === null || error === void 0 ? void 0 : error.code)) {
- throw new errors_1.NetworkError(error === null || error === void 0 ? void 0 : error.code);
- }
- throw error;
- }
- finally {
- abortController.abort();
- }
- core.info('Finished uploading artifact content to blob storage!');
- hashStream.end();
- sha256Hash = hashStream.read();
- core.info(`SHA256 digest of uploaded artifact zip is ${sha256Hash}`);
- if (uploadByteCount === 0) {
- core.warning(`No data was uploaded to blob storage. Reported upload byte count is 0.`);
+ if (escaping) {
+ // no need
+ escaping = false
+ } else if (reSpecials[c]
+ && !(c === '^' && inClass)) {
+ re += '\\'
}
- return {
- uploadSize: uploadByteCount,
- sha256Hash
- };
- });
-}
-//# sourceMappingURL=blob-upload.js.map
-/***/ }),
+ re += c
-/***/ 63219:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+ } // switch
+ } // for
-"use strict";
+ // handle the case where we left a class open.
+ // "[abc" is valid, equivalent to "\[abc"
+ if (inClass) {
+ // split where the last [ was, and escape it
+ // this is a huge pita. We now have to re-walk
+ // the contents of the would-be class to re-translate
+ // any characters that were passed through as-is
+ cs = pattern.substr(classStart + 1)
+ sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0]
+ hasMagic = hasMagic || sp[1]
+ }
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.validateArtifactName = validateArtifactName;
-exports.validateFilePath = validateFilePath;
-const core_1 = __nccwpck_require__(42186);
-/**
- * Invalid characters that cannot be in the artifact name or an uploaded file. Will be rejected
- * from the server if attempted to be sent over. These characters are not allowed due to limitations with certain
- * file systems such as NTFS. To maintain platform-agnostic behavior, all characters that are not supported by an
- * individual filesystem/platform will not be supported on all fileSystems/platforms
- *
- * FilePaths can include characters such as \ and / which are not permitted in the artifact name alone
- */
-const invalidArtifactFilePathCharacters = new Map([
- ['"', ' Double quote "'],
- [':', ' Colon :'],
- ['<', ' Less than <'],
- ['>', ' Greater than >'],
- ['|', ' Vertical bar |'],
- ['*', ' Asterisk *'],
- ['?', ' Question mark ?'],
- ['\r', ' Carriage return \\r'],
- ['\n', ' Line feed \\n']
-]);
-const invalidArtifactNameCharacters = new Map([
- ...invalidArtifactFilePathCharacters,
- ['\\', ' Backslash \\'],
- ['/', ' Forward slash /']
-]);
-/**
- * Validates the name of the artifact to check to make sure there are no illegal characters
- */
-function validateArtifactName(name) {
- if (!name) {
- throw new Error(`Provided artifact name input during validation is empty`);
- }
- for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactNameCharacters) {
- if (name.includes(invalidCharacterKey)) {
- throw new Error(`The artifact name is not valid: ${name}. Contains the following character: ${errorMessageForCharacter}
-
-Invalid characters include: ${Array.from(invalidArtifactNameCharacters.values()).toString()}
-
-These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`);
- }
- }
- (0, core_1.info)(`Artifact name is valid!`);
-}
-/**
- * Validates file paths to check for any illegal characters that can cause problems on different file systems
- */
-function validateFilePath(path) {
- if (!path) {
- throw new Error(`Provided file path input during validation is empty`);
- }
- for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) {
- if (path.includes(invalidCharacterKey)) {
- throw new Error(`The path for one of the files in artifact is not valid: ${path}. Contains the following character: ${errorMessageForCharacter}
-
-Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()}
-
-The following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.
- `);
- }
- }
-}
-//# sourceMappingURL=path-and-artifact-name-validation.js.map
+ // handle the case where we had a +( thing at the *end*
+ // of the pattern.
+ // each pattern list stack adds 3 chars, and we need to go through
+ // and escape any | chars that were passed through as-is for the regexp.
+ // Go through and escape them, taking care not to double-escape any
+ // | chars that were already escaped.
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + pl.open.length)
+ this.debug('setting tail', re, pl)
+ // maybe some even number of \, then maybe 1 \, followed by a |
+ tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
+ if (!$2) {
+ // the | isn't already escaped, so escape it.
+ $2 = '\\'
+ }
-/***/ }),
+ // need to escape all those slashes *again*, without escaping the
+ // one that we need for escaping the | character. As it works out,
+ // escaping an even number of slashes can be done by simply repeating
+ // it exactly after itself. That's why this trick works.
+ //
+ // I am sorry that you have to see this.
+ return $1 + $1 + $2 + '|'
+ })
-/***/ 3231:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+ this.debug('tail=%j\n %s', tail, tail, pl, re)
+ var t = pl.type === '*' ? star
+ : pl.type === '?' ? qmark
+ : '\\' + pl.type
-"use strict";
+ hasMagic = true
+ re = re.slice(0, pl.reStart) + t + '\\(' + tail
+ }
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getExpiration = getExpiration;
-const generated_1 = __nccwpck_require__(49960);
-const core = __importStar(__nccwpck_require__(42186));
-function getExpiration(retentionDays) {
- if (!retentionDays) {
- return undefined;
+ // handle trailing things that only matter at the very end.
+ clearStateChar()
+ if (escaping) {
+ // trailing \\
+ re += '\\\\'
+ }
+
+ // only need to apply the nodot start if the re starts with
+ // something that could conceivably capture a dot
+ var addPatternStart = false
+ switch (re.charAt(0)) {
+ case '[': case '.': case '(': addPatternStart = true
+ }
+
+ // Hack to work around lack of negative lookbehind in JS
+ // A pattern like: *.!(x).!(y|z) needs to ensure that a name
+ // like 'a.xyz.yz' doesn't match. So, the first negative
+ // lookahead, has to look ALL the way ahead, to the end of
+ // the pattern.
+ for (var n = negativeLists.length - 1; n > -1; n--) {
+ var nl = negativeLists[n]
+
+ var nlBefore = re.slice(0, nl.reStart)
+ var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
+ var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
+ var nlAfter = re.slice(nl.reEnd)
+
+ nlLast += nlAfter
+
+ // Handle nested stuff like *(*.js|!(*.json)), where open parens
+ // mean that we should *not* include the ) in the bit that is considered
+ // "after" the negated section.
+ var openParensBefore = nlBefore.split('(').length - 1
+ var cleanAfter = nlAfter
+ for (i = 0; i < openParensBefore; i++) {
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
}
- const maxRetentionDays = getRetentionDays();
- if (maxRetentionDays && maxRetentionDays < retentionDays) {
- core.warning(`Retention days cannot be greater than the maximum allowed retention set within the repository. Using ${maxRetentionDays} instead.`);
- retentionDays = maxRetentionDays;
+ nlAfter = cleanAfter
+
+ var dollar = ''
+ if (nlAfter === '' && isSub !== SUBPARSE) {
+ dollar = '$'
}
- const expirationDate = new Date();
- expirationDate.setDate(expirationDate.getDate() + retentionDays);
- return generated_1.Timestamp.fromDate(expirationDate);
+ var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
+ re = newRe
+ }
+
+ // if the re is not "" at this point, then we need to make sure
+ // it doesn't match against an empty path part.
+ // Otherwise a/* will match a/, which it should not.
+ if (re !== '' && hasMagic) {
+ re = '(?=.)' + re
+ }
+
+ if (addPatternStart) {
+ re = patternStart + re
+ }
+
+ // parsing just a piece of a larger pattern.
+ if (isSub === SUBPARSE) {
+ return [re, hasMagic]
+ }
+
+ // skip the regexp for non-magical patterns
+ // unescape anything in it, though, so that it'll be
+ // an exact match against a file etc.
+ if (!hasMagic) {
+ return globUnescape(pattern)
+ }
+
+ var flags = options.nocase ? 'i' : ''
+ try {
+ var regExp = new RegExp('^' + re + '$', flags)
+ } catch (er) /* istanbul ignore next - should be impossible */ {
+ // If it was an invalid regular expression, then it can't match
+ // anything. This trick looks for a character after the end of
+ // the string, which is of course impossible, except in multi-line
+ // mode, but it's not a /m regex.
+ return new RegExp('$.')
+ }
+
+ regExp._glob = pattern
+ regExp._src = re
+
+ return regExp
}
-function getRetentionDays() {
- const retentionDays = process.env['GITHUB_RETENTION_DAYS'];
- if (!retentionDays) {
- return undefined;
+
+minimatch.makeRe = function (pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+ if (this.regexp || this.regexp === false) return this.regexp
+
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ var set = this.set
+
+ if (!set.length) {
+ this.regexp = false
+ return this.regexp
+ }
+ var options = this.options
+
+ var twoStar = options.noglobstar ? star
+ : options.dot ? twoStarDot
+ : twoStarNoDot
+ var flags = options.nocase ? 'i' : ''
+
+ var re = set.map(function (pattern) {
+ return pattern.map(function (p) {
+ return (p === GLOBSTAR) ? twoStar
+ : (typeof p === 'string') ? regExpEscape(p)
+ : p._src
+ }).join('\\\/')
+ }).join('|')
+
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = '^(?:' + re + ')$'
+
+ // can match anything, as long as it's not this.
+ if (this.negate) re = '^(?!' + re + ').*$'
+
+ try {
+ this.regexp = new RegExp(re, flags)
+ } catch (ex) /* istanbul ignore next - should be impossible */ {
+ this.regexp = false
+ }
+ return this.regexp
+}
+
+minimatch.match = function (list, pattern, options) {
+ options = options || {}
+ var mm = new Minimatch(pattern, options)
+ list = list.filter(function (f) {
+ return mm.match(f)
+ })
+ if (mm.options.nonull && !list.length) {
+ list.push(pattern)
+ }
+ return list
+}
+
+Minimatch.prototype.match = function match (f, partial) {
+ if (typeof partial === 'undefined') partial = this.partial
+ this.debug('match', f, this.pattern)
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) return false
+ if (this.empty) return f === ''
+
+ if (f === '/' && partial) return true
+
+ var options = this.options
+
+ // windows: need to use /, not \
+ if (path.sep !== '/') {
+ f = f.split(path.sep).join('/')
+ }
+
+ // treat the test path as a set of pathparts.
+ f = f.split(slashSplit)
+ this.debug(this.pattern, 'split', f)
+
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+
+ var set = this.set
+ this.debug(this.pattern, 'set', set)
+
+ // Find the basename of the path by looking for the last non-empty segment
+ var filename
+ var i
+ for (i = f.length - 1; i >= 0; i--) {
+ filename = f[i]
+ if (filename) break
+ }
+
+ for (i = 0; i < set.length; i++) {
+ var pattern = set[i]
+ var file = f
+ if (options.matchBase && pattern.length === 1) {
+ file = [filename]
}
- const days = parseInt(retentionDays);
- if (isNaN(days)) {
- return undefined;
+ var hit = this.matchOne(file, pattern, partial)
+ if (hit) {
+ if (options.flipNegate) return true
+ return !this.negate
}
- return days;
+ }
+
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) return false
+ return this.negate
}
-//# sourceMappingURL=retention.js.map
-/***/ }),
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+ if (pattern.indexOf(GLOBSTAR) !== -1) {
+ return this._matchGlobstar(file, pattern, partial, 0, 0)
+ }
+ return this._matchOne(file, pattern, partial, 0, 0)
+}
-/***/ 42578:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+Minimatch.prototype._matchGlobstar = function (file, pattern, partial, fileIndex, patternIndex) {
+ var i
-"use strict";
+ // find first globstar from patternIndex
+ var firstgs = -1
+ for (i = patternIndex; i < pattern.length; i++) {
+ if (pattern[i] === GLOBSTAR) { firstgs = i; break }
+ }
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
+ // find last globstar
+ var lastgs = -1
+ for (i = pattern.length - 1; i >= 0; i--) {
+ if (pattern[i] === GLOBSTAR) { lastgs = i; break }
+ }
+
+ var head = pattern.slice(patternIndex, firstgs)
+ var body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs)
+ var tail = partial ? [] : pattern.slice(lastgs + 1)
+
+ // check the head
+ if (head.length) {
+ var fileHead = file.slice(fileIndex, fileIndex + head.length)
+ if (!this._matchOne(fileHead, head, partial, 0, 0)) {
+ return false
}
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
+ fileIndex += head.length
+ }
+
+ // check the tail
+ var fileTailMatch = 0
+ if (tail.length) {
+ if (tail.length + fileIndex > file.length) return false
+
+ var tailStart = file.length - tail.length
+ if (this._matchOne(file, tail, partial, tailStart, 0)) {
+ fileTailMatch = tail.length
+ } else {
+ // affordance for stuff like a/**/* matching a/b/
+ if (file[file.length - 1] !== '' ||
+ fileIndex + tail.length === file.length) {
+ return false
+ }
+ tailStart--
+ if (!this._matchOne(file, tail, partial, tailStart, 0)) {
+ return false
+ }
+ fileTailMatch = tail.length + 1
+ }
+ }
+
+ // if body is empty (single ** between head and tail)
+ if (!body.length) {
+ var sawSome = !!fileTailMatch
+ for (i = fileIndex; i < file.length - fileTailMatch; i++) {
+ var f = String(file[i])
+ sawSome = true
+ if (f === '.' || f === '..' ||
+ (!this.options.dot && f.charAt(0) === '.')) {
+ return false
+ }
+ }
+ return partial || sawSome
+ }
+
+ // split body into segments at each GLOBSTAR
+ var bodySegments = [[[], 0]]
+ var currentBody = bodySegments[0]
+ var nonGsParts = 0
+ var nonGsPartsSums = [0]
+ for (var bi = 0; bi < body.length; bi++) {
+ var b = body[bi]
+ if (b === GLOBSTAR) {
+ nonGsPartsSums.push(nonGsParts)
+ currentBody = [[], 0]
+ bodySegments.push(currentBody)
+ } else {
+ currentBody[0].push(b)
+ nonGsParts++
+ }
+ }
+
+ var idx = bodySegments.length - 1
+ var fileLength = file.length - fileTailMatch
+ for (var si = 0; si < bodySegments.length; si++) {
+ bodySegments[si][1] = fileLength -
+ (nonGsPartsSums[idx--] + bodySegments[si][0].length)
+ }
+
+ return !!this._matchGlobStarBodySections(
+ file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch
+ )
+}
+
+// return false for "nope, not matching"
+// return null for "not matching, cannot keep trying"
+Minimatch.prototype._matchGlobStarBodySections = function (
+ file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail
+) {
+ var bs = bodySegments[bodyIndex]
+ if (!bs) {
+ // just make sure there are no bad dots
+ for (var i = fileIndex; i < file.length; i++) {
+ sawTail = true
+ var f = file[i]
+ if (f === '.' || f === '..' ||
+ (!this.options.dot && f.charAt(0) === '.')) {
+ return false
+ }
+ }
+ return sawTail
+ }
+
+ var body = bs[0]
+ var after = bs[1]
+ while (fileIndex <= after) {
+ var m = this._matchOne(
+ file.slice(0, fileIndex + body.length),
+ body,
+ partial,
+ fileIndex,
+ 0
+ )
+ // if limit exceeded, no match. intentional false negative,
+ // acceptable break in correctness for security.
+ if (m && globStarDepth < this.maxGlobstarRecursion) {
+ var sub = this._matchGlobStarBodySections(
+ file, bodySegments,
+ fileIndex + body.length, bodyIndex + 1,
+ partial, globStarDepth + 1, sawTail
+ )
+ if (sub !== false) {
+ return sub
+ }
+ }
+ var f = file[fileIndex]
+ if (f === '.' || f === '..' ||
+ (!this.options.dot && f.charAt(0) === '.')) {
+ return false
+ }
+ fileIndex++
+ }
+ return partial || null
+}
+
+Minimatch.prototype._matchOne = function (file, pattern, partial, fileIndex, patternIndex) {
+ var fi, pi, fl, pl
+ for (
+ fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length
+ ; (fi < fl) && (pi < pl)
+ ; fi++, pi++
+ ) {
+ this.debug('matchOne loop')
+ var p = pattern[pi]
+ var f = file[fi]
+
+ this.debug(pattern, p, f)
+
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ /* istanbul ignore if */
+ if (p === false || p === GLOBSTAR) return false
+
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ var hit
+ if (typeof p === 'string') {
+ hit = f === p
+ this.debug('string match', p, f, hit)
+ } else {
+ hit = f.match(p)
+ this.debug('pattern match', p, f, hit)
+ }
+
+ if (!hit) return false
+ }
+
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true
+ } else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial
+ } else /* istanbul ignore else */ if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ return (fi === fl - 1) && (file[fi] === '')
+ }
+
+ // should be unreachable.
+ /* istanbul ignore next */
+ throw new Error('wtf?')
+}
+
+// replace stuff like \* with *
+function globUnescape (s) {
+ return s.replace(/\\(.)/g, '$1')
+}
+
+function regExpEscape (s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
+}
+
+
+/***/ }),
+
+/***/ 7889:
+/***/ (function(__unused_webpack_module, exports) {
+
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
@@ -3580,248 +2147,146 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.uploadArtifact = uploadArtifact;
-const core = __importStar(__nccwpck_require__(42186));
-const retention_1 = __nccwpck_require__(3231);
-const path_and_artifact_name_validation_1 = __nccwpck_require__(63219);
-const artifact_twirp_client_1 = __nccwpck_require__(12312);
-const upload_zip_specification_1 = __nccwpck_require__(17837);
-const util_1 = __nccwpck_require__(63062);
-const blob_upload_1 = __nccwpck_require__(7246);
-const zip_1 = __nccwpck_require__(69186);
-const generated_1 = __nccwpck_require__(49960);
-const errors_1 = __nccwpck_require__(38182);
-function uploadArtifact(name, files, rootDirectory, options) {
- return __awaiter(this, void 0, void 0, function* () {
- (0, path_and_artifact_name_validation_1.validateArtifactName)(name);
- (0, upload_zip_specification_1.validateRootDirectory)(rootDirectory);
- const zipSpecification = (0, upload_zip_specification_1.getUploadZipSpecification)(files, rootDirectory);
- if (zipSpecification.length === 0) {
- throw new errors_1.FilesNotFoundError(zipSpecification.flatMap(s => (s.sourcePath ? [s.sourcePath] : [])));
- }
- // get the IDs needed for the artifact creation
- const backendIds = (0, util_1.getBackendIdsFromToken)();
- // create the artifact client
- const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)();
- // create the artifact
- const createArtifactReq = {
- workflowRunBackendId: backendIds.workflowRunBackendId,
- workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
- name,
- version: 4
- };
- // if there is a retention period, add it to the request
- const expiresAt = (0, retention_1.getExpiration)(options === null || options === void 0 ? void 0 : options.retentionDays);
- if (expiresAt) {
- createArtifactReq.expiresAt = expiresAt;
- }
- const createArtifactResp = yield artifactClient.CreateArtifact(createArtifactReq);
- if (!createArtifactResp.ok) {
- throw new errors_1.InvalidResponseError('CreateArtifact: response from backend was not ok');
- }
- const zipUploadStream = yield (0, zip_1.createZipUploadStream)(zipSpecification, options === null || options === void 0 ? void 0 : options.compressionLevel);
- // Upload zip to blob storage
- const uploadResult = yield (0, blob_upload_1.uploadZipToBlobStorage)(createArtifactResp.signedUploadUrl, zipUploadStream);
- // finalize the artifact
- const finalizeArtifactReq = {
- workflowRunBackendId: backendIds.workflowRunBackendId,
- workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
- name,
- size: uploadResult.uploadSize ? uploadResult.uploadSize.toString() : '0'
- };
- if (uploadResult.sha256Hash) {
- finalizeArtifactReq.hash = generated_1.StringValue.create({
- value: `sha256:${uploadResult.sha256Hash}`
- });
- }
- core.info(`Finalizing artifact upload`);
- const finalizeArtifactResp = yield artifactClient.FinalizeArtifact(finalizeArtifactReq);
- if (!finalizeArtifactResp.ok) {
- throw new errors_1.InvalidResponseError('FinalizeArtifact: response from backend was not ok');
- }
- const artifactId = BigInt(finalizeArtifactResp.artifactId);
- core.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`);
- return {
- size: uploadResult.uploadSize,
- digest: uploadResult.sha256Hash,
- id: Number(artifactId)
- };
- });
+exports.ClientStreamingCall = void 0;
+/**
+ * A client streaming RPC call. This means that the clients sends 0, 1, or
+ * more messages to the server, and the server replies with exactly one
+ * message.
+ */
+class ClientStreamingCall {
+ constructor(method, requestHeaders, request, headers, response, status, trailers) {
+ this.method = method;
+ this.requestHeaders = requestHeaders;
+ this.requests = request;
+ this.headers = headers;
+ this.response = response;
+ this.status = status;
+ this.trailers = trailers;
+ }
+ /**
+ * Instead of awaiting the response status and trailers, you can
+ * just as well await this call itself to receive the server outcome.
+ * Note that it may still be valid to send more request messages.
+ */
+ then(onfulfilled, onrejected) {
+ return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));
+ }
+ promiseFinished() {
+ return __awaiter(this, void 0, void 0, function* () {
+ let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
+ return {
+ method: this.method,
+ requestHeaders: this.requestHeaders,
+ headers,
+ response,
+ status,
+ trailers
+ };
+ });
+ }
}
-//# sourceMappingURL=upload-artifact.js.map
+exports.ClientStreamingCall = ClientStreamingCall;
+
/***/ }),
-/***/ 17837:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 1409:
+/***/ ((__unused_webpack_module, exports) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.validateRootDirectory = validateRootDirectory;
-exports.getUploadZipSpecification = getUploadZipSpecification;
-const fs = __importStar(__nccwpck_require__(57147));
-const core_1 = __nccwpck_require__(42186);
-const path_1 = __nccwpck_require__(71017);
-const path_and_artifact_name_validation_1 = __nccwpck_require__(63219);
-/**
- * Checks if a root directory exists and is valid
- * @param rootDirectory an absolute root directory path common to all input files that that will be trimmed from the final zip structure
- */
-function validateRootDirectory(rootDirectory) {
- if (!fs.existsSync(rootDirectory)) {
- throw new Error(`The provided rootDirectory ${rootDirectory} does not exist`);
- }
- if (!fs.statSync(rootDirectory).isDirectory()) {
- throw new Error(`The provided rootDirectory ${rootDirectory} is not a valid directory`);
- }
- (0, core_1.info)(`Root directory input is valid!`);
-}
+exports.Deferred = exports.DeferredState = void 0;
+var DeferredState;
+(function (DeferredState) {
+ DeferredState[DeferredState["PENDING"] = 0] = "PENDING";
+ DeferredState[DeferredState["REJECTED"] = 1] = "REJECTED";
+ DeferredState[DeferredState["RESOLVED"] = 2] = "RESOLVED";
+})(DeferredState = exports.DeferredState || (exports.DeferredState = {}));
/**
- * Creates a specification that describes how a zip file will be created for a set of input files
- * @param filesToZip a list of file that should be included in the zip
- * @param rootDirectory an absolute root directory path common to all input files that that will be trimmed from the final zip structure
+ * A deferred promise. This is a "controller" for a promise, which lets you
+ * pass a promise around and reject or resolve it from the outside.
+ *
+ * Warning: This class is to be used with care. Using it can make code very
+ * difficult to read. It is intended for use in library code that exposes
+ * promises, not for regular business logic.
*/
-function getUploadZipSpecification(filesToZip, rootDirectory) {
- const specification = [];
- // Normalize and resolve, this allows for either absolute or relative paths to be used
- rootDirectory = (0, path_1.normalize)(rootDirectory);
- rootDirectory = (0, path_1.resolve)(rootDirectory);
- /*
- Example
-
- Input:
- rootDirectory: '/home/user/files/plz-upload'
- artifactFiles: [
- '/home/user/files/plz-upload/file1.txt',
- '/home/user/files/plz-upload/file2.txt',
- '/home/user/files/plz-upload/dir/file3.txt'
- ]
-
- Output:
- specifications: [
- ['/home/user/files/plz-upload/file1.txt', '/file1.txt'],
- ['/home/user/files/plz-upload/file1.txt', '/file2.txt'],
- ['/home/user/files/plz-upload/file1.txt', '/dir/file3.txt']
- ]
-
- The final zip that is later uploaded will look like this:
-
- my-artifact.zip
- - file.txt
- - file2.txt
- - dir/
- - file3.txt
- */
- for (let file of filesToZip) {
- const stats = fs.lstatSync(file, { throwIfNoEntry: false });
- if (!stats) {
- throw new Error(`File ${file} does not exist`);
- }
- if (!stats.isDirectory()) {
- // Normalize and resolve, this allows for either absolute or relative paths to be used
- file = (0, path_1.normalize)(file);
- file = (0, path_1.resolve)(file);
- if (!file.startsWith(rootDirectory)) {
- throw new Error(`The rootDirectory: ${rootDirectory} is not a parent directory of the file: ${file}`);
- }
- // Check for forbidden characters in file paths that may cause ambiguous behavior if downloaded on different file systems
- const uploadPath = file.replace(rootDirectory, '');
- (0, path_and_artifact_name_validation_1.validateFilePath)(uploadPath);
- specification.push({
- sourcePath: file,
- destinationPath: uploadPath,
- stats
- });
- }
- else {
- // Empty directory
- const directoryPath = file.replace(rootDirectory, '');
- (0, path_and_artifact_name_validation_1.validateFilePath)(directoryPath);
- specification.push({
- sourcePath: null,
- destinationPath: directoryPath,
- stats
- });
+class Deferred {
+ /**
+ * @param preventUnhandledRejectionWarning - prevents the warning
+ * "Unhandled Promise rejection" by adding a noop rejection handler.
+ * Working with calls returned from the runtime-rpc package in an
+ * async function usually means awaiting one call property after
+ * the other. This means that the "status" is not being awaited when
+ * an earlier await for the "headers" is rejected. This causes the
+ * "unhandled promise reject" warning. A more correct behaviour for
+ * calls might be to become aware whether at least one of the
+ * promises is handled and swallow the rejection warning for the
+ * others.
+ */
+ constructor(preventUnhandledRejectionWarning = true) {
+ this._state = DeferredState.PENDING;
+ this._promise = new Promise((resolve, reject) => {
+ this._resolve = resolve;
+ this._reject = reject;
+ });
+ if (preventUnhandledRejectionWarning) {
+ this._promise.catch(_ => { });
}
}
- return specification;
+ /**
+ * Get the current state of the promise.
+ */
+ get state() {
+ return this._state;
+ }
+ /**
+ * Get the deferred promise.
+ */
+ get promise() {
+ return this._promise;
+ }
+ /**
+ * Resolve the promise. Throws if the promise is already resolved or rejected.
+ */
+ resolve(value) {
+ if (this.state !== DeferredState.PENDING)
+ throw new Error(`cannot resolve ${DeferredState[this.state].toLowerCase()}`);
+ this._resolve(value);
+ this._state = DeferredState.RESOLVED;
+ }
+ /**
+ * Reject the promise. Throws if the promise is already resolved or rejected.
+ */
+ reject(reason) {
+ if (this.state !== DeferredState.PENDING)
+ throw new Error(`cannot reject ${DeferredState[this.state].toLowerCase()}`);
+ this._reject(reason);
+ this._state = DeferredState.REJECTED;
+ }
+ /**
+ * Resolve the promise. Ignore if not pending.
+ */
+ resolvePending(val) {
+ if (this._state === DeferredState.PENDING)
+ this.resolve(val);
+ }
+ /**
+ * Reject the promise. Ignore if not pending.
+ */
+ rejectPending(reason) {
+ if (this._state === DeferredState.PENDING)
+ this.reject(reason);
+ }
}
-//# sourceMappingURL=upload-zip-specification.js.map
+exports.Deferred = Deferred;
+
/***/ }),
-/***/ 69186:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 6826:
+/***/ (function(__unused_webpack_module, exports) {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
@@ -3832,892 +2297,603 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ZipUploadStream = exports.DEFAULT_COMPRESSION_LEVEL = void 0;
-exports.createZipUploadStream = createZipUploadStream;
-const stream = __importStar(__nccwpck_require__(12781));
-const promises_1 = __nccwpck_require__(73292);
-const archiver = __importStar(__nccwpck_require__(43084));
-const core = __importStar(__nccwpck_require__(42186));
-const config_1 = __nccwpck_require__(74610);
-exports.DEFAULT_COMPRESSION_LEVEL = 6;
-// Custom stream transformer so we can set the highWaterMark property
-// See https://github.com/nodejs/node/issues/8855
-class ZipUploadStream extends stream.Transform {
- constructor(bufferSize) {
- super({
- highWaterMark: bufferSize
- });
+exports.DuplexStreamingCall = void 0;
+/**
+ * A duplex streaming RPC call. This means that the clients sends an
+ * arbitrary amount of messages to the server, while at the same time,
+ * the server sends an arbitrary amount of messages to the client.
+ */
+class DuplexStreamingCall {
+ constructor(method, requestHeaders, request, headers, response, status, trailers) {
+ this.method = method;
+ this.requestHeaders = requestHeaders;
+ this.requests = request;
+ this.headers = headers;
+ this.responses = response;
+ this.status = status;
+ this.trailers = trailers;
}
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- _transform(chunk, enc, cb) {
- cb(null, chunk);
+ /**
+ * Instead of awaiting the response status and trailers, you can
+ * just as well await this call itself to receive the server outcome.
+ * Note that it may still be valid to send more request messages.
+ */
+ then(onfulfilled, onrejected) {
+ return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));
}
-}
-exports.ZipUploadStream = ZipUploadStream;
-function createZipUploadStream(uploadSpecification_1) {
- return __awaiter(this, arguments, void 0, function* (uploadSpecification, compressionLevel = exports.DEFAULT_COMPRESSION_LEVEL) {
- core.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`);
- const zip = archiver.create('zip', {
- highWaterMark: (0, config_1.getUploadChunkSize)(),
- zlib: { level: compressionLevel }
+ promiseFinished() {
+ return __awaiter(this, void 0, void 0, function* () {
+ let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]);
+ return {
+ method: this.method,
+ requestHeaders: this.requestHeaders,
+ headers,
+ status,
+ trailers,
+ };
});
- // register callbacks for various events during the zip lifecycle
- zip.on('error', zipErrorCallback);
- zip.on('warning', zipWarningCallback);
- zip.on('finish', zipFinishCallback);
- zip.on('end', zipEndCallback);
- for (const file of uploadSpecification) {
- if (file.sourcePath !== null) {
- // Check if symlink and resolve the source path
- let sourcePath = file.sourcePath;
- if (file.stats.isSymbolicLink()) {
- sourcePath = yield (0, promises_1.realpath)(file.sourcePath);
- }
- // Add the file to the zip
- zip.file(sourcePath, {
- name: file.destinationPath
- });
- }
- else {
- // Add a directory to the zip
- zip.append('', { name: file.destinationPath });
- }
- }
- const bufferSize = (0, config_1.getUploadChunkSize)();
- const zipUploadStream = new ZipUploadStream(bufferSize);
- core.debug(`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`);
- core.debug(`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`);
- zip.pipe(zipUploadStream);
- zip.finalize();
- return zipUploadStream;
- });
-}
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-const zipErrorCallback = (error) => {
- core.error('An error has occurred while creating the zip file for upload');
- core.info(error);
- throw new Error('An error has occurred during zip creation for the artifact');
-};
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-const zipWarningCallback = (error) => {
- if (error.code === 'ENOENT') {
- core.warning('ENOENT warning during artifact zip creation. No such file or directory');
- core.info(error);
}
- else {
- core.warning(`A non-blocking warning has occurred during artifact zip creation: ${error.code}`);
- core.info(error);
- }
-};
-const zipFinishCallback = () => {
- core.debug('Zip stream for upload has finished.');
-};
-const zipEndCallback = () => {
- core.debug('Zip stream for upload has ended.');
-};
-//# sourceMappingURL=zip.js.map
+}
+exports.DuplexStreamingCall = DuplexStreamingCall;
+
/***/ }),
-/***/ 87351:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 4420:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+var __webpack_unused_export__;
+
+// Public API of the rpc runtime.
+// Note: we do not use `export * from ...` to help tree shakers,
+// webpack verbose output hints that this should be useful
+__webpack_unused_export__ = ({ value: true });
+var service_type_1 = __nccwpck_require__(6892);
+Object.defineProperty(exports, "C0", ({ enumerable: true, get: function () { return service_type_1.ServiceType; } }));
+var reflection_info_1 = __nccwpck_require__(2496);
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return reflection_info_1.readMethodOptions; } });
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return reflection_info_1.readMethodOption; } });
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return reflection_info_1.readServiceOption; } });
+var rpc_error_1 = __nccwpck_require__(8636);
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return rpc_error_1.RpcError; } });
+var rpc_options_1 = __nccwpck_require__(8576);
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return rpc_options_1.mergeRpcOptions; } });
+var rpc_output_stream_1 = __nccwpck_require__(2726);
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return rpc_output_stream_1.RpcOutputStreamController; } });
+var test_transport_1 = __nccwpck_require__(9122);
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return test_transport_1.TestTransport; } });
+var deferred_1 = __nccwpck_require__(1409);
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return deferred_1.Deferred; } });
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return deferred_1.DeferredState; } });
+var duplex_streaming_call_1 = __nccwpck_require__(6826);
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return duplex_streaming_call_1.DuplexStreamingCall; } });
+var client_streaming_call_1 = __nccwpck_require__(7889);
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return client_streaming_call_1.ClientStreamingCall; } });
+var server_streaming_call_1 = __nccwpck_require__(6173);
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return server_streaming_call_1.ServerStreamingCall; } });
+var unary_call_1 = __nccwpck_require__(9288);
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return unary_call_1.UnaryCall; } });
+var rpc_interceptor_1 = __nccwpck_require__(2849);
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return rpc_interceptor_1.stackIntercept; } });
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return rpc_interceptor_1.stackDuplexStreamingInterceptors; } });
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return rpc_interceptor_1.stackClientStreamingInterceptors; } });
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return rpc_interceptor_1.stackServerStreamingInterceptors; } });
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return rpc_interceptor_1.stackUnaryInterceptors; } });
+var server_call_context_1 = __nccwpck_require__(3352);
+__webpack_unused_export__ = ({ enumerable: true, get: function () { return server_call_context_1.ServerCallContextController; } });
+
+
+/***/ }),
+
+/***/ 2496:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.issueCommand = issueCommand;
-exports.issue = issue;
-const os = __importStar(__nccwpck_require__(22037));
-const utils_1 = __nccwpck_require__(5278);
+exports.readServiceOption = exports.readMethodOption = exports.readMethodOptions = exports.normalizeMethodInfo = void 0;
+const runtime_1 = __nccwpck_require__(8886);
/**
- * Issues a command to the GitHub Actions runner
- *
- * @param command - The command name to issue
- * @param properties - Additional properties for the command (key-value pairs)
- * @param message - The message to include with the command
- * @remarks
- * This function outputs a specially formatted string to stdout that the Actions
- * runner interprets as a command. These commands can control workflow behavior,
- * set outputs, create annotations, mask values, and more.
- *
- * Command Format:
- * ::name key=value,key=value::message
- *
- * @example
- * ```typescript
- * // Issue a warning annotation
- * issueCommand('warning', {}, 'This is a warning message');
- * // Output: ::warning::This is a warning message
- *
- * // Set an environment variable
- * issueCommand('set-env', { name: 'MY_VAR' }, 'some value');
- * // Output: ::set-env name=MY_VAR::some value
- *
- * // Add a secret mask
- * issueCommand('add-mask', {}, 'secretValue123');
- * // Output: ::add-mask::secretValue123
- * ```
+ * Turns PartialMethodInfo into MethodInfo.
+ */
+function normalizeMethodInfo(method, service) {
+ var _a, _b, _c;
+ let m = method;
+ m.service = service;
+ m.localName = (_a = m.localName) !== null && _a !== void 0 ? _a : runtime_1.lowerCamelCase(m.name);
+ // noinspection PointlessBooleanExpressionJS
+ m.serverStreaming = !!m.serverStreaming;
+ // noinspection PointlessBooleanExpressionJS
+ m.clientStreaming = !!m.clientStreaming;
+ m.options = (_b = m.options) !== null && _b !== void 0 ? _b : {};
+ m.idempotency = (_c = m.idempotency) !== null && _c !== void 0 ? _c : undefined;
+ return m;
+}
+exports.normalizeMethodInfo = normalizeMethodInfo;
+/**
+ * Read custom method options from a generated service client.
*
- * @internal
- * This is an internal utility function that powers the public API functions
- * such as setSecret, warning, error, and exportVariable.
+ * @deprecated use readMethodOption()
*/
-function issueCommand(command, properties, message) {
- const cmd = new Command(command, properties, message);
- process.stdout.write(cmd.toString() + os.EOL);
+function readMethodOptions(service, methodName, extensionName, extensionType) {
+ var _a;
+ const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options;
+ return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : undefined;
}
-function issue(name, message = '') {
- issueCommand(name, {}, message);
+exports.readMethodOptions = readMethodOptions;
+function readMethodOption(service, methodName, extensionName, extensionType) {
+ var _a;
+ const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options;
+ if (!options) {
+ return undefined;
+ }
+ const optionVal = options[extensionName];
+ if (optionVal === undefined) {
+ return optionVal;
+ }
+ return extensionType ? extensionType.fromJson(optionVal) : optionVal;
}
-const CMD_STRING = '::';
-class Command {
- constructor(command, properties, message) {
- if (!command) {
- command = 'missing.command';
- }
- this.command = command;
- this.properties = properties;
- this.message = message;
+exports.readMethodOption = readMethodOption;
+function readServiceOption(service, extensionName, extensionType) {
+ const options = service.options;
+ if (!options) {
+ return undefined;
+ }
+ const optionVal = options[extensionName];
+ if (optionVal === undefined) {
+ return optionVal;
+ }
+ return extensionType ? extensionType.fromJson(optionVal) : optionVal;
+}
+exports.readServiceOption = readServiceOption;
+
+
+/***/ }),
+
+/***/ 8636:
+/***/ ((__unused_webpack_module, exports) => {
+
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.RpcError = void 0;
+/**
+ * An error that occurred while calling a RPC method.
+ */
+class RpcError extends Error {
+ constructor(message, code = 'UNKNOWN', meta) {
+ super(message);
+ this.name = 'RpcError';
+ // see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#example
+ Object.setPrototypeOf(this, new.target.prototype);
+ this.code = code;
+ this.meta = meta !== null && meta !== void 0 ? meta : {};
}
toString() {
- let cmdStr = CMD_STRING + this.command;
- if (this.properties && Object.keys(this.properties).length > 0) {
- cmdStr += ' ';
- let first = true;
- for (const key in this.properties) {
- if (this.properties.hasOwnProperty(key)) {
- const val = this.properties[key];
- if (val) {
- if (first) {
- first = false;
- }
- else {
- cmdStr += ',';
- }
- cmdStr += `${key}=${escapeProperty(val)}`;
- }
- }
+ const l = [this.name + ': ' + this.message];
+ if (this.code) {
+ l.push('');
+ l.push('Code: ' + this.code);
+ }
+ if (this.serviceName && this.methodName) {
+ l.push('Method: ' + this.serviceName + '/' + this.methodName);
+ }
+ let m = Object.entries(this.meta);
+ if (m.length) {
+ l.push('');
+ l.push('Meta:');
+ for (let [k, v] of m) {
+ l.push(` ${k}: ${v}`);
}
}
- cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
- return cmdStr;
+ return l.join('\n');
}
}
-function escapeData(s) {
- return (0, utils_1.toCommandValue)(s)
- .replace(/%/g, '%25')
- .replace(/\r/g, '%0D')
- .replace(/\n/g, '%0A');
-}
-function escapeProperty(s) {
- return (0, utils_1.toCommandValue)(s)
- .replace(/%/g, '%25')
- .replace(/\r/g, '%0D')
- .replace(/\n/g, '%0A')
- .replace(/:/g, '%3A')
- .replace(/,/g, '%2C');
-}
-//# sourceMappingURL=command.js.map
+exports.RpcError = RpcError;
+
/***/ }),
-/***/ 42186:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 2849:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.stackDuplexStreamingInterceptors = exports.stackClientStreamingInterceptors = exports.stackServerStreamingInterceptors = exports.stackUnaryInterceptors = exports.stackIntercept = void 0;
+const runtime_1 = __nccwpck_require__(8886);
+/**
+ * Creates a "stack" of of all interceptors specified in the given `RpcOptions`.
+ * Used by generated client implementations.
+ * @internal
+ */
+function stackIntercept(kind, transport, method, options, input) {
+ var _a, _b, _c, _d;
+ if (kind == "unary") {
+ let tail = (mtd, inp, opt) => transport.unary(mtd, inp, opt);
+ for (const curr of ((_a = options.interceptors) !== null && _a !== void 0 ? _a : []).filter(i => i.interceptUnary).reverse()) {
+ const next = tail;
+ tail = (mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt);
+ }
+ return tail(method, input, options);
}
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.ExitCode = void 0;
-exports.exportVariable = exportVariable;
-exports.setSecret = setSecret;
-exports.addPath = addPath;
-exports.getInput = getInput;
-exports.getMultilineInput = getMultilineInput;
-exports.getBooleanInput = getBooleanInput;
-exports.setOutput = setOutput;
-exports.setCommandEcho = setCommandEcho;
-exports.setFailed = setFailed;
-exports.isDebug = isDebug;
-exports.debug = debug;
-exports.error = error;
-exports.warning = warning;
-exports.notice = notice;
-exports.info = info;
-exports.startGroup = startGroup;
-exports.endGroup = endGroup;
-exports.group = group;
-exports.saveState = saveState;
-exports.getState = getState;
-exports.getIDToken = getIDToken;
-const command_1 = __nccwpck_require__(87351);
-const file_command_1 = __nccwpck_require__(717);
-const utils_1 = __nccwpck_require__(5278);
-const os = __importStar(__nccwpck_require__(22037));
-const path = __importStar(__nccwpck_require__(71017));
-const oidc_utils_1 = __nccwpck_require__(98041);
-/**
- * The code to exit an action
- */
-var ExitCode;
-(function (ExitCode) {
- /**
- * A code indicating that the action was successful
- */
- ExitCode[ExitCode["Success"] = 0] = "Success";
- /**
- * A code indicating that the action was a failure
- */
- ExitCode[ExitCode["Failure"] = 1] = "Failure";
-})(ExitCode || (exports.ExitCode = ExitCode = {}));
-//-----------------------------------------------------------------------
-// Variables
-//-----------------------------------------------------------------------
-/**
- * Sets env variable for this action and future actions in the job
- * @param name the name of the variable to set
- * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify
- */
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-function exportVariable(name, val) {
- const convertedVal = (0, utils_1.toCommandValue)(val);
- process.env[name] = convertedVal;
- const filePath = process.env['GITHUB_ENV'] || '';
- if (filePath) {
- return (0, file_command_1.issueFileCommand)('ENV', (0, file_command_1.prepareKeyValueMessage)(name, val));
+ if (kind == "serverStreaming") {
+ let tail = (mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt);
+ for (const curr of ((_b = options.interceptors) !== null && _b !== void 0 ? _b : []).filter(i => i.interceptServerStreaming).reverse()) {
+ const next = tail;
+ tail = (mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt);
+ }
+ return tail(method, input, options);
}
- (0, command_1.issueCommand)('set-env', { name }, convertedVal);
-}
-/**
- * Registers a secret which will get masked from logs
- *
- * @param secret - Value of the secret to be masked
- * @remarks
- * This function instructs the Actions runner to mask the specified value in any
- * logs produced during the workflow run. Once registered, the secret value will
- * be replaced with asterisks (***) whenever it appears in console output, logs,
- * or error messages.
- *
- * This is useful for protecting sensitive information such as:
- * - API keys
- * - Access tokens
- * - Authentication credentials
- * - URL parameters containing signatures (SAS tokens)
- *
- * Note that masking only affects future logs; any previous appearances of the
- * secret in logs before calling this function will remain unmasked.
- *
- * @example
- * ```typescript
- * // Register an API token as a secret
- * const apiToken = "abc123xyz456";
- * setSecret(apiToken);
- *
- * // Now any logs containing this value will show *** instead
- * console.log(`Using token: ${apiToken}`); // Outputs: "Using token: ***"
- * ```
- */
-function setSecret(secret) {
- (0, command_1.issueCommand)('add-mask', {}, secret);
-}
-/**
- * Prepends inputPath to the PATH (for this action and future actions)
- * @param inputPath
- */
-function addPath(inputPath) {
- const filePath = process.env['GITHUB_PATH'] || '';
- if (filePath) {
- (0, file_command_1.issueFileCommand)('PATH', inputPath);
+ if (kind == "clientStreaming") {
+ let tail = (mtd, opt) => transport.clientStreaming(mtd, opt);
+ for (const curr of ((_c = options.interceptors) !== null && _c !== void 0 ? _c : []).filter(i => i.interceptClientStreaming).reverse()) {
+ const next = tail;
+ tail = (mtd, opt) => curr.interceptClientStreaming(next, mtd, opt);
+ }
+ return tail(method, options);
}
- else {
- (0, command_1.issueCommand)('add-path', {}, inputPath);
+ if (kind == "duplex") {
+ let tail = (mtd, opt) => transport.duplex(mtd, opt);
+ for (const curr of ((_d = options.interceptors) !== null && _d !== void 0 ? _d : []).filter(i => i.interceptDuplex).reverse()) {
+ const next = tail;
+ tail = (mtd, opt) => curr.interceptDuplex(next, mtd, opt);
+ }
+ return tail(method, options);
}
- process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
+ runtime_1.assertNever(kind);
}
+exports.stackIntercept = stackIntercept;
/**
- * Gets the value of an input.
- * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
- * Returns an empty string if the value is not defined.
- *
- * @param name name of the input to get
- * @param options optional. See InputOptions.
- * @returns string
+ * @deprecated replaced by `stackIntercept()`, still here to support older generated code
*/
-function getInput(name, options) {
- const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';
- if (options && options.required && !val) {
- throw new Error(`Input required and not supplied: ${name}`);
- }
- if (options && options.trimWhitespace === false) {
- return val;
- }
- return val.trim();
+function stackUnaryInterceptors(transport, method, input, options) {
+ return stackIntercept("unary", transport, method, options, input);
}
+exports.stackUnaryInterceptors = stackUnaryInterceptors;
/**
- * Gets the values of an multiline input. Each value is also trimmed.
- *
- * @param name name of the input to get
- * @param options optional. See InputOptions.
- * @returns string[]
- *
+ * @deprecated replaced by `stackIntercept()`, still here to support older generated code
*/
-function getMultilineInput(name, options) {
- const inputs = getInput(name, options)
- .split('\n')
- .filter(x => x !== '');
- if (options && options.trimWhitespace === false) {
- return inputs;
- }
- return inputs.map(input => input.trim());
+function stackServerStreamingInterceptors(transport, method, input, options) {
+ return stackIntercept("serverStreaming", transport, method, options, input);
}
+exports.stackServerStreamingInterceptors = stackServerStreamingInterceptors;
/**
- * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
- * Support boolean input list: `true | True | TRUE | false | False | FALSE` .
- * The return value is also in boolean type.
- * ref: https://yaml.org/spec/1.2/spec.html#id2804923
- *
- * @param name name of the input to get
- * @param options optional. See InputOptions.
- * @returns boolean
+ * @deprecated replaced by `stackIntercept()`, still here to support older generated code
*/
-function getBooleanInput(name, options) {
- const trueValue = ['true', 'True', 'TRUE'];
- const falseValue = ['false', 'False', 'FALSE'];
- const val = getInput(name, options);
- if (trueValue.includes(val))
- return true;
- if (falseValue.includes(val))
- return false;
- throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` +
- `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
+function stackClientStreamingInterceptors(transport, method, options) {
+ return stackIntercept("clientStreaming", transport, method, options);
}
+exports.stackClientStreamingInterceptors = stackClientStreamingInterceptors;
/**
- * Sets the value of an output.
- *
- * @param name name of the output to set
- * @param value value to store. Non-string values will be converted to a string via JSON.stringify
+ * @deprecated replaced by `stackIntercept()`, still here to support older generated code
*/
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-function setOutput(name, value) {
- const filePath = process.env['GITHUB_OUTPUT'] || '';
- if (filePath) {
- return (0, file_command_1.issueFileCommand)('OUTPUT', (0, file_command_1.prepareKeyValueMessage)(name, value));
- }
- process.stdout.write(os.EOL);
- (0, command_1.issueCommand)('set-output', { name }, (0, utils_1.toCommandValue)(value));
+function stackDuplexStreamingInterceptors(transport, method, options) {
+ return stackIntercept("duplex", transport, method, options);
}
+exports.stackDuplexStreamingInterceptors = stackDuplexStreamingInterceptors;
+
+
+/***/ }),
+
+/***/ 8576:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.mergeRpcOptions = void 0;
+const runtime_1 = __nccwpck_require__(8886);
/**
- * Enables or disables the echoing of commands into stdout for the rest of the step.
- * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.
+ * Merges custom RPC options with defaults. Returns a new instance and keeps
+ * the "defaults" and the "options" unmodified.
*
- */
-function setCommandEcho(enabled) {
- (0, command_1.issue)('echo', enabled ? 'on' : 'off');
-}
-//-----------------------------------------------------------------------
-// Results
-//-----------------------------------------------------------------------
-/**
- * Sets the action status to failed.
- * When the action exits it will be with an exit code of 1
- * @param message add error issue message
- */
-function setFailed(message) {
- process.exitCode = ExitCode.Failure;
- error(message);
-}
-//-----------------------------------------------------------------------
-// Logging Commands
-//-----------------------------------------------------------------------
-/**
- * Gets whether Actions Step Debug is on or not
- */
-function isDebug() {
- return process.env['RUNNER_DEBUG'] === '1';
-}
-/**
- * Writes debug message to user log
- * @param message debug message
- */
-function debug(message) {
- (0, command_1.issueCommand)('debug', {}, message);
-}
-/**
- * Adds an error issue
- * @param message error issue message. Errors will be converted to string via toString()
- * @param properties optional properties to add to the annotation.
- */
-function error(message, properties = {}) {
- (0, command_1.issueCommand)('error', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
-}
-/**
- * Adds a warning issue
- * @param message warning issue message. Errors will be converted to string via toString()
- * @param properties optional properties to add to the annotation.
- */
-function warning(message, properties = {}) {
- (0, command_1.issueCommand)('warning', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
-}
-/**
- * Adds a notice issue
- * @param message notice issue message. Errors will be converted to string via toString()
- * @param properties optional properties to add to the annotation.
- */
-function notice(message, properties = {}) {
- (0, command_1.issueCommand)('notice', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
-}
-/**
- * Writes info to log with console.log.
- * @param message info message
- */
-function info(message) {
- process.stdout.write(message + os.EOL);
-}
-/**
- * Begin an output group.
+ * Merges `RpcMetadata` "meta", overwriting values from "defaults" with
+ * values from "options". Does not append values to existing entries.
*
- * Output until the next `groupEnd` will be foldable in this group
+ * Merges "jsonOptions", including "jsonOptions.typeRegistry", by creating
+ * a new array that contains types from "options.jsonOptions.typeRegistry"
+ * first, then types from "defaults.jsonOptions.typeRegistry".
*
- * @param name The name of the output group
- */
-function startGroup(name) {
- (0, command_1.issue)('group', name);
-}
-/**
- * End an output group.
- */
-function endGroup() {
- (0, command_1.issue)('endgroup');
-}
-/**
- * Wrap an asynchronous function call in a group.
+ * Merges "binaryOptions".
*
- * Returns the same type as the function itself.
+ * Merges "interceptors" by creating a new array that contains interceptors
+ * from "defaults" first, then interceptors from "options".
*
- * @param name The name of the group
- * @param fn The function to wrap in the group
+ * Works with objects that extend `RpcOptions`, but only if the added
+ * properties are of type Date, primitive like string, boolean, or Array
+ * of primitives. If you have other property types, you have to merge them
+ * yourself.
*/
-function group(name, fn) {
- return __awaiter(this, void 0, void 0, function* () {
- startGroup(name);
- let result;
- try {
- result = yield fn();
- }
- finally {
- endGroup();
+function mergeRpcOptions(defaults, options) {
+ if (!options)
+ return defaults;
+ let o = {};
+ copy(defaults, o);
+ copy(options, o);
+ for (let key of Object.keys(options)) {
+ let val = options[key];
+ switch (key) {
+ case "jsonOptions":
+ o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions);
+ break;
+ case "binaryOptions":
+ o.binaryOptions = runtime_1.mergeBinaryOptions(defaults.binaryOptions, o.binaryOptions);
+ break;
+ case "meta":
+ o.meta = {};
+ copy(defaults.meta, o.meta);
+ copy(options.meta, o.meta);
+ break;
+ case "interceptors":
+ o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat();
+ break;
}
- return result;
- });
-}
-//-----------------------------------------------------------------------
-// Wrapper action state
-//-----------------------------------------------------------------------
-/**
- * Saves state for current action, the state can only be retrieved by this action's post job execution.
- *
- * @param name name of the state to store
- * @param value value to store. Non-string values will be converted to a string via JSON.stringify
- */
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-function saveState(name, value) {
- const filePath = process.env['GITHUB_STATE'] || '';
- if (filePath) {
- return (0, file_command_1.issueFileCommand)('STATE', (0, file_command_1.prepareKeyValueMessage)(name, value));
}
- (0, command_1.issueCommand)('save-state', { name }, (0, utils_1.toCommandValue)(value));
-}
-/**
- * Gets the value of an state set by this action's main execution.
- *
- * @param name name of the state to get
- * @returns string
- */
-function getState(name) {
- return process.env[`STATE_${name}`] || '';
+ return o;
}
-function getIDToken(aud) {
- return __awaiter(this, void 0, void 0, function* () {
- return yield oidc_utils_1.OidcClient.getIDToken(aud);
- });
+exports.mergeRpcOptions = mergeRpcOptions;
+function copy(a, into) {
+ if (!a)
+ return;
+ let c = into;
+ for (let [k, v] of Object.entries(a)) {
+ if (v instanceof Date)
+ c[k] = new Date(v.getTime());
+ else if (Array.isArray(v))
+ c[k] = v.concat();
+ else
+ c[k] = v;
+ }
}
-/**
- * Summary exports
- */
-var summary_1 = __nccwpck_require__(81327);
-Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } }));
-/**
- * @deprecated use core.summary
- */
-var summary_2 = __nccwpck_require__(81327);
-Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } }));
-/**
- * Path exports
- */
-var path_utils_1 = __nccwpck_require__(2981);
-Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } }));
-Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } }));
-Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }));
-/**
- * Platform utilities exports
- */
-exports.platform = __importStar(__nccwpck_require__(85243));
-//# sourceMappingURL=core.js.map
+
/***/ }),
-/***/ 717:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 2726:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
-// For internal use, subject to change.
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.issueFileCommand = issueFileCommand;
-exports.prepareKeyValueMessage = prepareKeyValueMessage;
-// We use any as a valid input type
-/* eslint-disable @typescript-eslint/no-explicit-any */
-const crypto = __importStar(__nccwpck_require__(6113));
-const fs = __importStar(__nccwpck_require__(57147));
-const os = __importStar(__nccwpck_require__(22037));
-const utils_1 = __nccwpck_require__(5278);
-function issueFileCommand(command, message) {
- const filePath = process.env[`GITHUB_${command}`];
- if (!filePath) {
- throw new Error(`Unable to find environment variable for file command ${command}`);
+exports.RpcOutputStreamController = void 0;
+const deferred_1 = __nccwpck_require__(1409);
+const runtime_1 = __nccwpck_require__(8886);
+/**
+ * A `RpcOutputStream` that you control.
+ */
+class RpcOutputStreamController {
+ constructor() {
+ this._lis = {
+ nxt: [],
+ msg: [],
+ err: [],
+ cmp: [],
+ };
+ this._closed = false;
+ // --- RpcOutputStream async iterator API
+ // iterator state.
+ // is undefined when no iterator has been acquired yet.
+ this._itState = { q: [] };
}
- if (!fs.existsSync(filePath)) {
- throw new Error(`Missing file at path: ${filePath}`);
+ // --- RpcOutputStream callback API
+ onNext(callback) {
+ return this.addLis(callback, this._lis.nxt);
}
- fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, {
- encoding: 'utf8'
- });
-}
-function prepareKeyValueMessage(key, value) {
- const delimiter = `ghadelimiter_${crypto.randomUUID()}`;
- const convertedValue = (0, utils_1.toCommandValue)(value);
- // These should realistically never happen, but just in case someone finds a
- // way to exploit uuid generation let's not allow keys or values that contain
- // the delimiter.
- if (key.includes(delimiter)) {
- throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
+ onMessage(callback) {
+ return this.addLis(callback, this._lis.msg);
}
- if (convertedValue.includes(delimiter)) {
- throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
+ onError(callback) {
+ return this.addLis(callback, this._lis.err);
}
- return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
-}
-//# sourceMappingURL=file-command.js.map
-
-/***/ }),
-
-/***/ 98041:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
-
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.OidcClient = void 0;
-const http_client_1 = __nccwpck_require__(96255);
-const auth_1 = __nccwpck_require__(35526);
-const core_1 = __nccwpck_require__(42186);
-class OidcClient {
- static createHttpClient(allowRetry = true, maxRetry = 10) {
- const requestOptions = {
- allowRetries: allowRetry,
- maxRetries: maxRetry
- };
- return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);
+ onComplete(callback) {
+ return this.addLis(callback, this._lis.cmp);
}
- static getRequestToken() {
- const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];
- if (!token) {
- throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');
- }
- return token;
+ addLis(callback, list) {
+ list.push(callback);
+ return () => {
+ let i = list.indexOf(callback);
+ if (i >= 0)
+ list.splice(i, 1);
+ };
}
- static getIDTokenUrl() {
- const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];
- if (!runtimeUrl) {
- throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');
- }
- return runtimeUrl;
+ // remove all listeners
+ clearLis() {
+ for (let l of Object.values(this._lis))
+ l.splice(0, l.length);
}
- static getCall(id_token_url) {
- return __awaiter(this, void 0, void 0, function* () {
- var _a;
- const httpclient = OidcClient.createHttpClient();
- const res = yield httpclient
- .getJson(id_token_url)
- .catch(error => {
- throw new Error(`Failed to get ID Token. \n
- Error Code : ${error.statusCode}\n
- Error Message: ${error.message}`);
- });
- const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
- if (!id_token) {
- throw new Error('Response json body do not have ID Token field');
- }
- return id_token;
- });
+ // --- Controller API
+ /**
+ * Is this stream already closed by a completion or error?
+ */
+ get closed() {
+ return this._closed !== false;
}
- static getIDToken(audience) {
- return __awaiter(this, void 0, void 0, function* () {
- try {
- // New ID Token is requested from action service
- let id_token_url = OidcClient.getIDTokenUrl();
- if (audience) {
- const encodedAudience = encodeURIComponent(audience);
- id_token_url = `${id_token_url}&audience=${encodedAudience}`;
- }
- (0, core_1.debug)(`ID token url is ${id_token_url}`);
- const id_token = yield OidcClient.getCall(id_token_url);
- (0, core_1.setSecret)(id_token);
- return id_token;
- }
- catch (error) {
- throw new Error(`Error message: ${error.message}`);
- }
- });
+ /**
+ * Emit message, close with error, or close successfully, but only one
+ * at a time.
+ * Can be used to wrap a stream by using the other stream's `onNext`.
+ */
+ notifyNext(message, error, complete) {
+ runtime_1.assert((message ? 1 : 0) + (error ? 1 : 0) + (complete ? 1 : 0) <= 1, 'only one emission at a time');
+ if (message)
+ this.notifyMessage(message);
+ if (error)
+ this.notifyError(error);
+ if (complete)
+ this.notifyComplete();
+ }
+ /**
+ * Emits a new message. Throws if stream is closed.
+ *
+ * Triggers onNext and onMessage callbacks.
+ */
+ notifyMessage(message) {
+ runtime_1.assert(!this.closed, 'stream is closed');
+ this.pushIt({ value: message, done: false });
+ this._lis.msg.forEach(l => l(message));
+ this._lis.nxt.forEach(l => l(message, undefined, false));
+ }
+ /**
+ * Closes the stream with an error. Throws if stream is closed.
+ *
+ * Triggers onNext and onError callbacks.
+ */
+ notifyError(error) {
+ runtime_1.assert(!this.closed, 'stream is closed');
+ this._closed = error;
+ this.pushIt(error);
+ this._lis.err.forEach(l => l(error));
+ this._lis.nxt.forEach(l => l(undefined, error, false));
+ this.clearLis();
+ }
+ /**
+ * Closes the stream successfully. Throws if stream is closed.
+ *
+ * Triggers onNext and onComplete callbacks.
+ */
+ notifyComplete() {
+ runtime_1.assert(!this.closed, 'stream is closed');
+ this._closed = true;
+ this.pushIt({ value: null, done: true });
+ this._lis.cmp.forEach(l => l());
+ this._lis.nxt.forEach(l => l(undefined, undefined, true));
+ this.clearLis();
+ }
+ /**
+ * Creates an async iterator (that can be used with `for await {...}`)
+ * to consume the stream.
+ *
+ * Some things to note:
+ * - If an error occurs, the `for await` will throw it.
+ * - If an error occurred before the `for await` was started, `for await`
+ * will re-throw it.
+ * - If the stream is already complete, the `for await` will be empty.
+ * - If your `for await` consumes slower than the stream produces,
+ * for example because you are relaying messages in a slow operation,
+ * messages are queued.
+ */
+ [Symbol.asyncIterator]() {
+ // if we are closed, we are definitely not receiving any more messages.
+ // but we can't let the iterator get stuck. we want to either:
+ // a) finish the new iterator immediately, because we are completed
+ // b) reject the new iterator, because we errored
+ if (this._closed === true)
+ this.pushIt({ value: null, done: true });
+ else if (this._closed !== false)
+ this.pushIt(this._closed);
+ // the async iterator
+ return {
+ next: () => {
+ let state = this._itState;
+ runtime_1.assert(state, "bad state"); // if we don't have a state here, code is broken
+ // there should be no pending result.
+ // did the consumer call next() before we resolved our previous result promise?
+ runtime_1.assert(!state.p, "iterator contract broken");
+ // did we produce faster than the iterator consumed?
+ // return the oldest result from the queue.
+ let first = state.q.shift();
+ if (first)
+ return ("value" in first) ? Promise.resolve(first) : Promise.reject(first);
+ // we have no result ATM, but we promise one.
+ // as soon as we have a result, we must resolve promise.
+ state.p = new deferred_1.Deferred();
+ return state.p.promise;
+ },
+ };
+ }
+ // "push" a new iterator result.
+ // this either resolves a pending promise, or enqueues the result.
+ pushIt(result) {
+ let state = this._itState;
+ // is the consumer waiting for us?
+ if (state.p) {
+ // yes, consumer is waiting for this promise.
+ const p = state.p;
+ runtime_1.assert(p.state == deferred_1.DeferredState.PENDING, "iterator contract broken");
+ // resolve the promise
+ ("value" in result) ? p.resolve(result) : p.reject(result);
+ // must cleanup, otherwise iterator.next() would pick it up again.
+ delete state.p;
+ }
+ else {
+ // we are producing faster than the iterator consumes.
+ // push result onto queue.
+ state.q.push(result);
+ }
}
}
-exports.OidcClient = OidcClient;
-//# sourceMappingURL=oidc-utils.js.map
+exports.RpcOutputStreamController = RpcOutputStreamController;
+
/***/ }),
-/***/ 2981:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 3352:
+/***/ ((__unused_webpack_module, exports) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ServerCallContextController = void 0;
+class ServerCallContextController {
+ constructor(method, headers, deadline, sendResponseHeadersFn, defaultStatus = { code: 'OK', detail: '' }) {
+ this._cancelled = false;
+ this._listeners = [];
+ this.method = method;
+ this.headers = headers;
+ this.deadline = deadline;
+ this.trailers = {};
+ this._sendRH = sendResponseHeadersFn;
+ this.status = defaultStatus;
}
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
+ /**
+ * Set the call cancelled.
+ *
+ * Invokes all callbacks registered with onCancel() and
+ * sets `cancelled = true`.
+ */
+ notifyCancelled() {
+ if (!this._cancelled) {
+ this._cancelled = true;
+ for (let l of this._listeners) {
+ l();
+ }
+ }
+ }
+ /**
+ * Send response headers.
+ */
+ sendResponseHeaders(data) {
+ this._sendRH(data);
+ }
+ /**
+ * Is the call cancelled?
+ *
+ * When the client closes the connection before the server
+ * is done, the call is cancelled.
+ *
+ * If you want to cancel a request on the server, throw a
+ * RpcError with the CANCELLED status code.
+ */
+ get cancelled() {
+ return this._cancelled;
+ }
+ /**
+ * Add a callback for cancellation.
+ */
+ onCancel(callback) {
+ const l = this._listeners;
+ l.push(callback);
+ return () => {
+ let i = l.indexOf(callback);
+ if (i >= 0)
+ l.splice(i, 1);
};
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.toPosixPath = toPosixPath;
-exports.toWin32Path = toWin32Path;
-exports.toPlatformPath = toPlatformPath;
-const path = __importStar(__nccwpck_require__(71017));
-/**
- * toPosixPath converts the given path to the posix form. On Windows, \\ will be
- * replaced with /.
- *
- * @param pth. Path to transform.
- * @return string Posix path.
- */
-function toPosixPath(pth) {
- return pth.replace(/[\\]/g, '/');
-}
-/**
- * toWin32Path converts the given path to the win32 form. On Linux, / will be
- * replaced with \\.
- *
- * @param pth. Path to transform.
- * @return string Win32 path.
- */
-function toWin32Path(pth) {
- return pth.replace(/[/]/g, '\\');
-}
-/**
- * toPlatformPath converts the given path to a platform-specific path. It does
- * this by replacing instances of / and \ with the platform-specific path
- * separator.
- *
- * @param pth The path to platformize.
- * @return string The platform-specific path.
- */
-function toPlatformPath(pth) {
- return pth.replace(/[/\\]/g, path.sep);
+ }
}
-//# sourceMappingURL=path-utils.js.map
+exports.ServerCallContextController = ServerCallContextController;
+
/***/ }),
-/***/ 85243:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 6173:
+/***/ (function(__unused_webpack_module, exports) {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
@@ -4727,74 +2903,72 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0;
-exports.getDetails = getDetails;
-const os_1 = __importDefault(__nccwpck_require__(22037));
-const exec = __importStar(__nccwpck_require__(71514));
-const getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () {
- const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, {
- silent: true
- });
- const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, {
- silent: true
- });
- return {
- name: name.trim(),
- version: version.trim()
- };
-});
-const getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () {
- var _a, _b, _c, _d;
- const { stdout } = yield exec.getExecOutput('sw_vers', undefined, {
- silent: true
- });
- const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : '';
- const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : '';
- return {
- name,
- version
- };
-});
-const getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () {
- const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], {
- silent: true
- });
- const [name, version] = stdout.trim().split('\n');
- return {
- name,
- version
- };
-});
-exports.platform = os_1.default.platform();
-exports.arch = os_1.default.arch();
-exports.isWindows = exports.platform === 'win32';
-exports.isMacOS = exports.platform === 'darwin';
-exports.isLinux = exports.platform === 'linux';
-function getDetails() {
- return __awaiter(this, void 0, void 0, function* () {
- return Object.assign(Object.assign({}, (yield (exports.isWindows
- ? getWindowsInfo()
- : exports.isMacOS
- ? getMacOsInfo()
- : getLinuxInfo()))), { platform: exports.platform,
- arch: exports.arch,
- isWindows: exports.isWindows,
- isMacOS: exports.isMacOS,
- isLinux: exports.isLinux });
- });
+exports.ServerStreamingCall = void 0;
+/**
+ * A server streaming RPC call. The client provides exactly one input message
+ * but the server may respond with 0, 1, or more messages.
+ */
+class ServerStreamingCall {
+ constructor(method, requestHeaders, request, headers, response, status, trailers) {
+ this.method = method;
+ this.requestHeaders = requestHeaders;
+ this.request = request;
+ this.headers = headers;
+ this.responses = response;
+ this.status = status;
+ this.trailers = trailers;
+ }
+ /**
+ * Instead of awaiting the response status and trailers, you can
+ * just as well await this call itself to receive the server outcome.
+ * You should first setup some listeners to the `request` to
+ * see the actual messages the server replied with.
+ */
+ then(onfulfilled, onrejected) {
+ return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));
+ }
+ promiseFinished() {
+ return __awaiter(this, void 0, void 0, function* () {
+ let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]);
+ return {
+ method: this.method,
+ requestHeaders: this.requestHeaders,
+ request: this.request,
+ headers,
+ status,
+ trailers,
+ };
+ });
+ }
}
-//# sourceMappingURL=platform.js.map
+exports.ServerStreamingCall = ServerStreamingCall;
+
+
+/***/ }),
+
+/***/ 6892:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ServiceType = void 0;
+const reflection_info_1 = __nccwpck_require__(2496);
+class ServiceType {
+ constructor(typeName, methods, options) {
+ this.typeName = typeName;
+ this.methods = methods.map(i => reflection_info_1.normalizeMethodInfo(i, this));
+ this.options = options !== null && options !== void 0 ? options : {};
+ }
+}
+exports.ServiceType = ServiceType;
+
/***/ }),
-/***/ 81327:
+/***/ 9122:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -4806,5273 +2980,4266 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
-const os_1 = __nccwpck_require__(22037);
-const fs_1 = __nccwpck_require__(57147);
-const { access, appendFile, writeFile } = fs_1.promises;
-exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
-exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';
-class Summary {
- constructor() {
- this._buffer = '';
- }
+exports.TestTransport = void 0;
+const rpc_error_1 = __nccwpck_require__(8636);
+const runtime_1 = __nccwpck_require__(8886);
+const rpc_output_stream_1 = __nccwpck_require__(2726);
+const rpc_options_1 = __nccwpck_require__(8576);
+const unary_call_1 = __nccwpck_require__(9288);
+const server_streaming_call_1 = __nccwpck_require__(6173);
+const client_streaming_call_1 = __nccwpck_require__(7889);
+const duplex_streaming_call_1 = __nccwpck_require__(6826);
+/**
+ * Transport for testing.
+ */
+class TestTransport {
/**
- * Finds the summary file path from the environment, rejects if env var is not found or file does not exist
- * Also checks r/w permissions.
- *
- * @returns step summary file path
+ * Initialize with mock data. Omitted fields have default value.
*/
- filePath() {
- return __awaiter(this, void 0, void 0, function* () {
- if (this._filePath) {
- return this._filePath;
- }
- const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];
- if (!pathFromEnv) {
- throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);
- }
- try {
- yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
- }
- catch (_a) {
- throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);
- }
- this._filePath = pathFromEnv;
- return this._filePath;
- });
+ constructor(data) {
+ /**
+ * Suppress warning / error about uncaught rejections of
+ * "status" and "trailers".
+ */
+ this.suppressUncaughtRejections = true;
+ this.headerDelay = 10;
+ this.responseDelay = 50;
+ this.betweenResponseDelay = 10;
+ this.afterResponseDelay = 10;
+ this.data = data !== null && data !== void 0 ? data : {};
}
/**
- * Wraps content in an HTML tag, adding any HTML attributes
- *
- * @param {string} tag HTML tag to wrap
- * @param {string | null} content content within the tag
- * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add
- *
- * @returns {string} content wrapped in HTML element
+ * Sent message(s) during the last operation.
*/
- wrap(tag, content, attrs = {}) {
- const htmlAttrs = Object.entries(attrs)
- .map(([key, value]) => ` ${key}="${value}"`)
- .join('');
- if (!content) {
- return `<${tag}${htmlAttrs}>`;
+ get sentMessages() {
+ if (this.lastInput instanceof TestInputStream) {
+ return this.lastInput.sent;
}
- return `<${tag}${htmlAttrs}>${content}${tag}>`;
+ else if (typeof this.lastInput == "object") {
+ return [this.lastInput.single];
+ }
+ return [];
}
/**
- * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.
- *
- * @param {SummaryWriteOptions} [options] (optional) options for write operation
- *
- * @returns {Promise} summary instance
+ * Sending message(s) completed?
*/
- write(options) {
- return __awaiter(this, void 0, void 0, function* () {
- const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);
- const filePath = yield this.filePath();
- const writeFunc = overwrite ? writeFile : appendFile;
- yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });
- return this.emptyBuffer();
- });
+ get sendComplete() {
+ if (this.lastInput instanceof TestInputStream) {
+ return this.lastInput.completed;
+ }
+ else if (typeof this.lastInput == "object") {
+ return true;
+ }
+ return false;
}
- /**
- * Clears the summary buffer and wipes the summary file
- *
- * @returns {Summary} summary instance
- */
- clear() {
- return __awaiter(this, void 0, void 0, function* () {
- return this.emptyBuffer().write({ overwrite: true });
- });
+ // Creates a promise for response headers from the mock data.
+ promiseHeaders() {
+ var _a;
+ const headers = (_a = this.data.headers) !== null && _a !== void 0 ? _a : TestTransport.defaultHeaders;
+ return headers instanceof rpc_error_1.RpcError
+ ? Promise.reject(headers)
+ : Promise.resolve(headers);
}
- /**
- * Returns the current summary buffer as a string
- *
- * @returns {string} string of summary buffer
- */
- stringify() {
- return this._buffer;
+ // Creates a promise for a single, valid, message from the mock data.
+ promiseSingleResponse(method) {
+ if (this.data.response instanceof rpc_error_1.RpcError) {
+ return Promise.reject(this.data.response);
+ }
+ let r;
+ if (Array.isArray(this.data.response)) {
+ runtime_1.assert(this.data.response.length > 0);
+ r = this.data.response[0];
+ }
+ else if (this.data.response !== undefined) {
+ r = this.data.response;
+ }
+ else {
+ r = method.O.create();
+ }
+ runtime_1.assert(method.O.is(r));
+ return Promise.resolve(r);
}
/**
- * If the summary buffer is empty
+ * Pushes response messages from the mock data to the output stream.
+ * If an error response, status or trailers are mocked, the stream is
+ * closed with the respective error.
+ * Otherwise, stream is completed successfully.
*
- * @returns {boolen} true if the buffer is empty
+ * The returned promise resolves when the stream is closed. It should
+ * not reject. If it does, code is broken.
*/
- isEmptyBuffer() {
- return this._buffer.length === 0;
+ streamResponses(method, stream, abort) {
+ return __awaiter(this, void 0, void 0, function* () {
+ // normalize "data.response" into an array of valid output messages
+ const messages = [];
+ if (this.data.response === undefined) {
+ messages.push(method.O.create());
+ }
+ else if (Array.isArray(this.data.response)) {
+ for (let msg of this.data.response) {
+ runtime_1.assert(method.O.is(msg));
+ messages.push(msg);
+ }
+ }
+ else if (!(this.data.response instanceof rpc_error_1.RpcError)) {
+ runtime_1.assert(method.O.is(this.data.response));
+ messages.push(this.data.response);
+ }
+ // start the stream with an initial delay.
+ // if the request is cancelled, notify() error and exit.
+ try {
+ yield delay(this.responseDelay, abort)(undefined);
+ }
+ catch (error) {
+ stream.notifyError(error);
+ return;
+ }
+ // if error response was mocked, notify() error (stream is now closed with error) and exit.
+ if (this.data.response instanceof rpc_error_1.RpcError) {
+ stream.notifyError(this.data.response);
+ return;
+ }
+ // regular response messages were mocked. notify() them.
+ for (let msg of messages) {
+ stream.notifyMessage(msg);
+ // add a short delay between responses
+ // if the request is cancelled, notify() error and exit.
+ try {
+ yield delay(this.betweenResponseDelay, abort)(undefined);
+ }
+ catch (error) {
+ stream.notifyError(error);
+ return;
+ }
+ }
+ // error status was mocked, notify() error (stream is now closed with error) and exit.
+ if (this.data.status instanceof rpc_error_1.RpcError) {
+ stream.notifyError(this.data.status);
+ return;
+ }
+ // error trailers were mocked, notify() error (stream is now closed with error) and exit.
+ if (this.data.trailers instanceof rpc_error_1.RpcError) {
+ stream.notifyError(this.data.trailers);
+ return;
+ }
+ // stream completed successfully
+ stream.notifyComplete();
+ });
}
- /**
- * Resets the summary buffer without writing to summary file
- *
- * @returns {Summary} summary instance
- */
- emptyBuffer() {
- this._buffer = '';
- return this;
+ // Creates a promise for response status from the mock data.
+ promiseStatus() {
+ var _a;
+ const status = (_a = this.data.status) !== null && _a !== void 0 ? _a : TestTransport.defaultStatus;
+ return status instanceof rpc_error_1.RpcError
+ ? Promise.reject(status)
+ : Promise.resolve(status);
}
- /**
- * Adds raw text to the summary buffer
- *
- * @param {string} text content to add
- * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)
- *
- * @returns {Summary} summary instance
- */
- addRaw(text, addEOL = false) {
- this._buffer += text;
- return addEOL ? this.addEOL() : this;
+ // Creates a promise for response trailers from the mock data.
+ promiseTrailers() {
+ var _a;
+ const trailers = (_a = this.data.trailers) !== null && _a !== void 0 ? _a : TestTransport.defaultTrailers;
+ return trailers instanceof rpc_error_1.RpcError
+ ? Promise.reject(trailers)
+ : Promise.resolve(trailers);
}
- /**
- * Adds the operating system-specific end-of-line marker to the buffer
- *
- * @returns {Summary} summary instance
- */
- addEOL() {
- return this.addRaw(os_1.EOL);
+ maybeSuppressUncaught(...promise) {
+ if (this.suppressUncaughtRejections) {
+ for (let p of promise) {
+ p.catch(() => {
+ });
+ }
+ }
}
- /**
- * Adds an HTML codeblock to the summary buffer
- *
- * @param {string} code content to render within fenced code block
- * @param {string} lang (optional) language to syntax highlight code
- *
- * @returns {Summary} summary instance
- */
- addCodeBlock(code, lang) {
- const attrs = Object.assign({}, (lang && { lang }));
- const element = this.wrap('pre', this.wrap('code', code), attrs);
- return this.addRaw(element).addEOL();
+ mergeOptions(options) {
+ return rpc_options_1.mergeRpcOptions({}, options);
}
- /**
- * Adds an HTML list to the summary buffer
- *
- * @param {string[]} items list of items to render
- * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)
- *
- * @returns {Summary} summary instance
- */
- addList(items, ordered = false) {
- const tag = ordered ? 'ol' : 'ul';
- const listItems = items.map(item => this.wrap('li', item)).join('');
- const element = this.wrap(tag, listItems);
- return this.addRaw(element).addEOL();
+ unary(method, input, options) {
+ var _a;
+ const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()
+ .then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise
+ .catch(_ => {
+ })
+ .then(delay(this.responseDelay, options.abort))
+ .then(_ => this.promiseSingleResponse(method)), statusPromise = responsePromise
+ .catch(_ => {
+ })
+ .then(delay(this.afterResponseDelay, options.abort))
+ .then(_ => this.promiseStatus()), trailersPromise = responsePromise
+ .catch(_ => {
+ })
+ .then(delay(this.afterResponseDelay, options.abort))
+ .then(_ => this.promiseTrailers());
+ this.maybeSuppressUncaught(statusPromise, trailersPromise);
+ this.lastInput = { single: input };
+ return new unary_call_1.UnaryCall(method, requestHeaders, input, headersPromise, responsePromise, statusPromise, trailersPromise);
}
- /**
- * Adds an HTML table to the summary buffer
- *
- * @param {SummaryTableCell[]} rows table rows
- *
- * @returns {Summary} summary instance
- */
- addTable(rows) {
- const tableBody = rows
- .map(row => {
- const cells = row
- .map(cell => {
- if (typeof cell === 'string') {
- return this.wrap('td', cell);
- }
- const { header, data, colspan, rowspan } = cell;
- const tag = header ? 'th' : 'td';
- const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));
- return this.wrap(tag, data, attrs);
- })
- .join('');
- return this.wrap('tr', cells);
+ serverStreaming(method, input, options) {
+ var _a;
+ const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()
+ .then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise
+ .then(delay(this.responseDelay, options.abort))
+ .catch(() => {
})
- .join('');
- const element = this.wrap('table', tableBody);
- return this.addRaw(element).addEOL();
+ .then(() => this.streamResponses(method, outputStream, options.abort))
+ .then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise
+ .then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise
+ .then(() => this.promiseTrailers());
+ this.maybeSuppressUncaught(statusPromise, trailersPromise);
+ this.lastInput = { single: input };
+ return new server_streaming_call_1.ServerStreamingCall(method, requestHeaders, input, headersPromise, outputStream, statusPromise, trailersPromise);
}
- /**
- * Adds a collapsable HTML details element to the summary buffer
- *
- * @param {string} label text for the closed state
- * @param {string} content collapsable content
- *
- * @returns {Summary} summary instance
- */
- addDetails(label, content) {
- const element = this.wrap('details', this.wrap('summary', label) + content);
- return this.addRaw(element).addEOL();
+ clientStreaming(method, options) {
+ var _a;
+ const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()
+ .then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise
+ .catch(_ => {
+ })
+ .then(delay(this.responseDelay, options.abort))
+ .then(_ => this.promiseSingleResponse(method)), statusPromise = responsePromise
+ .catch(_ => {
+ })
+ .then(delay(this.afterResponseDelay, options.abort))
+ .then(_ => this.promiseStatus()), trailersPromise = responsePromise
+ .catch(_ => {
+ })
+ .then(delay(this.afterResponseDelay, options.abort))
+ .then(_ => this.promiseTrailers());
+ this.maybeSuppressUncaught(statusPromise, trailersPromise);
+ this.lastInput = new TestInputStream(this.data, options.abort);
+ return new client_streaming_call_1.ClientStreamingCall(method, requestHeaders, this.lastInput, headersPromise, responsePromise, statusPromise, trailersPromise);
}
- /**
- * Adds an HTML image tag to the summary buffer
- *
- * @param {string} src path to the image you to embed
- * @param {string} alt text description of the image
- * @param {SummaryImageOptions} options (optional) addition image attributes
- *
- * @returns {Summary} summary instance
- */
- addImage(src, alt, options) {
- const { width, height } = options || {};
- const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));
- const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));
- return this.addRaw(element).addEOL();
+ duplex(method, options) {
+ var _a;
+ const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()
+ .then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise
+ .then(delay(this.responseDelay, options.abort))
+ .catch(() => {
+ })
+ .then(() => this.streamResponses(method, outputStream, options.abort))
+ .then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise
+ .then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise
+ .then(() => this.promiseTrailers());
+ this.maybeSuppressUncaught(statusPromise, trailersPromise);
+ this.lastInput = new TestInputStream(this.data, options.abort);
+ return new duplex_streaming_call_1.DuplexStreamingCall(method, requestHeaders, this.lastInput, headersPromise, outputStream, statusPromise, trailersPromise);
}
- /**
- * Adds an HTML section heading element
- *
- * @param {string} text heading text
- * @param {number | string} [level=1] (optional) the heading level, default: 1
- *
- * @returns {Summary} summary instance
- */
- addHeading(text, level) {
- const tag = `h${level}`;
- const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)
- ? tag
- : 'h1';
- const element = this.wrap(allowedTag, text);
- return this.addRaw(element).addEOL();
+}
+exports.TestTransport = TestTransport;
+TestTransport.defaultHeaders = {
+ responseHeader: "test"
+};
+TestTransport.defaultStatus = {
+ code: "OK", detail: "all good"
+};
+TestTransport.defaultTrailers = {
+ responseTrailer: "test"
+};
+function delay(ms, abort) {
+ return (v) => new Promise((resolve, reject) => {
+ if (abort === null || abort === void 0 ? void 0 : abort.aborted) {
+ reject(new rpc_error_1.RpcError("user cancel", "CANCELLED"));
+ }
+ else {
+ const id = setTimeout(() => resolve(v), ms);
+ if (abort) {
+ abort.addEventListener("abort", ev => {
+ clearTimeout(id);
+ reject(new rpc_error_1.RpcError("user cancel", "CANCELLED"));
+ });
+ }
+ }
+ });
+}
+class TestInputStream {
+ constructor(data, abort) {
+ this._completed = false;
+ this._sent = [];
+ this.data = data;
+ this.abort = abort;
}
- /**
- * Adds an HTML thematic break (
) to the summary buffer
- *
- * @returns {Summary} summary instance
- */
- addSeparator() {
- const element = this.wrap('hr', null);
- return this.addRaw(element).addEOL();
+ get sent() {
+ return this._sent;
}
- /**
- * Adds an HTML line break (
) to the summary buffer
- *
- * @returns {Summary} summary instance
- */
- addBreak() {
- const element = this.wrap('br', null);
- return this.addRaw(element).addEOL();
+ get completed() {
+ return this._completed;
}
- /**
- * Adds an HTML blockquote to the summary buffer
- *
- * @param {string} text quote text
- * @param {string} cite (optional) citation url
- *
- * @returns {Summary} summary instance
- */
- addQuote(text, cite) {
- const attrs = Object.assign({}, (cite && { cite }));
- const element = this.wrap('blockquote', text, attrs);
- return this.addRaw(element).addEOL();
+ send(message) {
+ if (this.data.inputMessage instanceof rpc_error_1.RpcError) {
+ return Promise.reject(this.data.inputMessage);
+ }
+ const delayMs = this.data.inputMessage === undefined
+ ? 10
+ : this.data.inputMessage;
+ return Promise.resolve(undefined)
+ .then(() => {
+ this._sent.push(message);
+ })
+ .then(delay(delayMs, this.abort));
}
- /**
- * Adds an HTML anchor tag to the summary buffer
- *
- * @param {string} text link text/content
- * @param {string} href hyperlink
- *
- * @returns {Summary} summary instance
- */
- addLink(text, href) {
- const element = this.wrap('a', text, { href });
- return this.addRaw(element).addEOL();
+ complete() {
+ if (this.data.inputComplete instanceof rpc_error_1.RpcError) {
+ return Promise.reject(this.data.inputComplete);
+ }
+ const delayMs = this.data.inputComplete === undefined
+ ? 10
+ : this.data.inputComplete;
+ return Promise.resolve(undefined)
+ .then(() => {
+ this._completed = true;
+ })
+ .then(delay(delayMs, this.abort));
}
}
-const _summary = new Summary();
-/**
- * @deprecated use `core.summary`
- */
-exports.markdownSummary = _summary;
-exports.summary = _summary;
-//# sourceMappingURL=summary.js.map
+
/***/ }),
-/***/ 5278:
-/***/ ((__unused_webpack_module, exports) => {
+/***/ 9288:
+/***/ (function(__unused_webpack_module, exports) {
-"use strict";
-// We use any as a valid input type
-/* eslint-disable @typescript-eslint/no-explicit-any */
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.toCommandValue = toCommandValue;
-exports.toCommandProperties = toCommandProperties;
+exports.UnaryCall = void 0;
/**
- * Sanitizes an input into a string so it can be passed into issueCommand safely
- * @param input input to sanitize into a string
+ * A unary RPC call. Unary means there is exactly one input message and
+ * exactly one output message unless an error occurred.
*/
-function toCommandValue(input) {
- if (input === null || input === undefined) {
- return '';
+class UnaryCall {
+ constructor(method, requestHeaders, request, headers, response, status, trailers) {
+ this.method = method;
+ this.requestHeaders = requestHeaders;
+ this.request = request;
+ this.headers = headers;
+ this.response = response;
+ this.status = status;
+ this.trailers = trailers;
}
- else if (typeof input === 'string' || input instanceof String) {
- return input;
+ /**
+ * If you are only interested in the final outcome of this call,
+ * you can await it to receive a `FinishedUnaryCall`.
+ */
+ then(onfulfilled, onrejected) {
+ return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));
}
- return JSON.stringify(input);
-}
-/**
- *
- * @param annotationProperties
- * @returns The command properties to send with the actual annotation command
- * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646
- */
-function toCommandProperties(annotationProperties) {
- if (!Object.keys(annotationProperties).length) {
- return {};
+ promiseFinished() {
+ return __awaiter(this, void 0, void 0, function* () {
+ let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
+ return {
+ method: this.method,
+ requestHeaders: this.requestHeaders,
+ request: this.request,
+ headers,
+ response,
+ status,
+ trailers
+ };
+ });
}
- return {
- title: annotationProperties.title,
- file: annotationProperties.file,
- line: annotationProperties.startLine,
- endLine: annotationProperties.endLine,
- col: annotationProperties.startColumn,
- endColumn: annotationProperties.endColumn
- };
}
-//# sourceMappingURL=utils.js.map
+exports.UnaryCall = UnaryCall;
+
/***/ }),
-/***/ 71514:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 8602:
+/***/ ((__unused_webpack_module, exports) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.exec = exec;
-exports.getExecOutput = getExecOutput;
-const string_decoder_1 = __nccwpck_require__(71576);
-const tr = __importStar(__nccwpck_require__(88159));
+exports.assertFloat32 = exports.assertUInt32 = exports.assertInt32 = exports.assertNever = exports.assert = void 0;
/**
- * Exec a command.
- * Output will be streamed to the live console.
- * Returns promise with return code
- *
- * @param commandLine command to execute (can include additional args). Must be correctly escaped.
- * @param args optional arguments for tool. Escaping is handled by the lib.
- * @param options optional exec options. See ExecOptions
- * @returns Promise exit code
+ * assert that condition is true or throw error (with message)
*/
-function exec(commandLine, args, options) {
- return __awaiter(this, void 0, void 0, function* () {
- const commandArgs = tr.argStringToArray(commandLine);
- if (commandArgs.length === 0) {
- throw new Error(`Parameter 'commandLine' cannot be null or empty.`);
- }
- // Path to tool to execute should be first arg
- const toolPath = commandArgs[0];
- args = commandArgs.slice(1).concat(args || []);
- const runner = new tr.ToolRunner(toolPath, args, options);
- return runner.exec();
- });
+function assert(condition, msg) {
+ if (!condition) {
+ throw new Error(msg);
+ }
}
+exports.assert = assert;
/**
- * Exec a command and get the output.
- * Output will be streamed to the live console.
- * Returns promise with the exit code and collected stdout and stderr
- *
- * @param commandLine command to execute (can include additional args). Must be correctly escaped.
- * @param args optional arguments for tool. Escaping is handled by the lib.
- * @param options optional exec options. See ExecOptions
- * @returns Promise exit code, stdout, and stderr
+ * assert that value cannot exist = type `never`. throw runtime error if it does.
*/
-function getExecOutput(commandLine, args, options) {
- return __awaiter(this, void 0, void 0, function* () {
- var _a, _b;
- let stdout = '';
- let stderr = '';
- //Using string decoder covers the case where a mult-byte character is split
- const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');
- const stderrDecoder = new string_decoder_1.StringDecoder('utf8');
- const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;
- const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;
- const stdErrListener = (data) => {
- stderr += stderrDecoder.write(data);
- if (originalStdErrListener) {
- originalStdErrListener(data);
- }
- };
- const stdOutListener = (data) => {
- stdout += stdoutDecoder.write(data);
- if (originalStdoutListener) {
- originalStdoutListener(data);
- }
- };
- const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });
- const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));
- //flush any remaining characters
- stdout += stdoutDecoder.end();
- stderr += stderrDecoder.end();
- return {
- exitCode,
- stdout,
- stderr
- };
- });
+function assertNever(value, msg) {
+ throw new Error(msg !== null && msg !== void 0 ? msg : 'Unexpected object: ' + value);
}
-//# sourceMappingURL=exec.js.map
+exports.assertNever = assertNever;
+const FLOAT32_MAX = 3.4028234663852886e+38, FLOAT32_MIN = -3.4028234663852886e+38, UINT32_MAX = 0xFFFFFFFF, INT32_MAX = 0X7FFFFFFF, INT32_MIN = -0X80000000;
+function assertInt32(arg) {
+ if (typeof arg !== "number")
+ throw new Error('invalid int 32: ' + typeof arg);
+ if (!Number.isInteger(arg) || arg > INT32_MAX || arg < INT32_MIN)
+ throw new Error('invalid int 32: ' + arg);
+}
+exports.assertInt32 = assertInt32;
+function assertUInt32(arg) {
+ if (typeof arg !== "number")
+ throw new Error('invalid uint 32: ' + typeof arg);
+ if (!Number.isInteger(arg) || arg > UINT32_MAX || arg < 0)
+ throw new Error('invalid uint 32: ' + arg);
+}
+exports.assertUInt32 = assertUInt32;
+function assertFloat32(arg) {
+ if (typeof arg !== "number")
+ throw new Error('invalid float 32: ' + typeof arg);
+ if (!Number.isFinite(arg))
+ return;
+ if (arg > FLOAT32_MAX || arg < FLOAT32_MIN)
+ throw new Error('invalid float 32: ' + arg);
+}
+exports.assertFloat32 = assertFloat32;
+
/***/ }),
-/***/ 88159:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 6335:
+/***/ ((__unused_webpack_module, exports) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ToolRunner = void 0;
-exports.argStringToArray = argStringToArray;
-const os = __importStar(__nccwpck_require__(22037));
-const events = __importStar(__nccwpck_require__(82361));
-const child = __importStar(__nccwpck_require__(32081));
-const path = __importStar(__nccwpck_require__(71017));
-const io = __importStar(__nccwpck_require__(47351));
-const ioUtil = __importStar(__nccwpck_require__(81962));
-const timers_1 = __nccwpck_require__(39512);
-/* eslint-disable @typescript-eslint/unbound-method */
-const IS_WINDOWS = process.platform === 'win32';
-/*
- * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.
+exports.base64encode = exports.base64decode = void 0;
+// lookup table from base64 character to byte
+let encTable = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
+// lookup table from base64 character *code* to byte because lookup by number is fast
+let decTable = [];
+for (let i = 0; i < encTable.length; i++)
+ decTable[encTable[i].charCodeAt(0)] = i;
+// support base64url variants
+decTable["-".charCodeAt(0)] = encTable.indexOf("+");
+decTable["_".charCodeAt(0)] = encTable.indexOf("/");
+/**
+ * Decodes a base64 string to a byte array.
+ *
+ * - ignores white-space, including line breaks and tabs
+ * - allows inner padding (can decode concatenated base64 strings)
+ * - does not require padding
+ * - understands base64url encoding:
+ * "-" instead of "+",
+ * "_" instead of "/",
+ * no padding
*/
-class ToolRunner extends events.EventEmitter {
- constructor(toolPath, args, options) {
- super();
- if (!toolPath) {
- throw new Error("Parameter 'toolPath' cannot be null or empty.");
- }
- this.toolPath = toolPath;
- this.args = args || [];
- this.options = options || {};
- }
- _debug(message) {
- if (this.options.listeners && this.options.listeners.debug) {
- this.options.listeners.debug(message);
- }
- }
- _getCommandString(options, noPrefix) {
- const toolPath = this._getSpawnFileName();
- const args = this._getSpawnArgs(options);
- let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool
- if (IS_WINDOWS) {
- // Windows + cmd file
- if (this._isCmdFile()) {
- cmd += toolPath;
- for (const a of args) {
- cmd += ` ${a}`;
- }
- }
- // Windows + verbatim
- else if (options.windowsVerbatimArguments) {
- cmd += `"${toolPath}"`;
- for (const a of args) {
- cmd += ` ${a}`;
- }
- }
- // Windows (regular)
- else {
- cmd += this._windowsQuoteCmdArg(toolPath);
- for (const a of args) {
- cmd += ` ${this._windowsQuoteCmdArg(a)}`;
- }
+function base64decode(base64Str) {
+ // estimate byte size, not accounting for inner padding and whitespace
+ let es = base64Str.length * 3 / 4;
+ // if (es % 3 !== 0)
+ // throw new Error('invalid base64 string');
+ if (base64Str[base64Str.length - 2] == '=')
+ es -= 2;
+ else if (base64Str[base64Str.length - 1] == '=')
+ es -= 1;
+ let bytes = new Uint8Array(es), bytePos = 0, // position in byte array
+ groupPos = 0, // position in base64 group
+ b, // current byte
+ p = 0 // previous byte
+ ;
+ for (let i = 0; i < base64Str.length; i++) {
+ b = decTable[base64Str.charCodeAt(i)];
+ if (b === undefined) {
+ // noinspection FallThroughInSwitchStatementJS
+ switch (base64Str[i]) {
+ case '=':
+ groupPos = 0; // reset state when padding found
+ case '\n':
+ case '\r':
+ case '\t':
+ case ' ':
+ continue; // skip white-space, and padding
+ default:
+ throw Error(`invalid base64 string.`);
}
}
- else {
- // OSX/Linux - this can likely be improved with some form of quoting.
- // creating processes on Unix is fundamentally different than Windows.
- // on Unix, execvp() takes an arg array.
- cmd += toolPath;
- for (const a of args) {
- cmd += ` ${a}`;
- }
+ switch (groupPos) {
+ case 0:
+ p = b;
+ groupPos = 1;
+ break;
+ case 1:
+ bytes[bytePos++] = p << 2 | (b & 48) >> 4;
+ p = b;
+ groupPos = 2;
+ break;
+ case 2:
+ bytes[bytePos++] = (p & 15) << 4 | (b & 60) >> 2;
+ p = b;
+ groupPos = 3;
+ break;
+ case 3:
+ bytes[bytePos++] = (p & 3) << 6 | b;
+ groupPos = 0;
+ break;
}
- return cmd;
}
- _processLineBuffer(data, strBuffer, onLine) {
- try {
- let s = strBuffer + data.toString();
- let n = s.indexOf(os.EOL);
- while (n > -1) {
- const line = s.substring(0, n);
- onLine(line);
- // the rest of the string ...
- s = s.substring(n + os.EOL.length);
- n = s.indexOf(os.EOL);
- }
- return s;
- }
- catch (err) {
- // streaming lines to console is best effort. Don't fail a build.
- this._debug(`error processing line. Failed with error ${err}`);
- return '';
+ if (groupPos == 1)
+ throw Error(`invalid base64 string.`);
+ return bytes.subarray(0, bytePos);
+}
+exports.base64decode = base64decode;
+/**
+ * Encodes a byte array to a base64 string.
+ * Adds padding at the end.
+ * Does not insert newlines.
+ */
+function base64encode(bytes) {
+ let base64 = '', groupPos = 0, // position in base64 group
+ b, // current byte
+ p = 0; // carry over from previous byte
+ for (let i = 0; i < bytes.length; i++) {
+ b = bytes[i];
+ switch (groupPos) {
+ case 0:
+ base64 += encTable[b >> 2];
+ p = (b & 3) << 4;
+ groupPos = 1;
+ break;
+ case 1:
+ base64 += encTable[p | b >> 4];
+ p = (b & 15) << 2;
+ groupPos = 2;
+ break;
+ case 2:
+ base64 += encTable[p | b >> 6];
+ base64 += encTable[b & 63];
+ groupPos = 0;
+ break;
}
}
- _getSpawnFileName() {
- if (IS_WINDOWS) {
- if (this._isCmdFile()) {
- return process.env['COMSPEC'] || 'cmd.exe';
- }
+ // padding required?
+ if (groupPos) {
+ base64 += encTable[p];
+ base64 += '=';
+ if (groupPos == 1)
+ base64 += '=';
+ }
+ return base64;
+}
+exports.base64encode = base64encode;
+
+
+/***/ }),
+
+/***/ 4816:
+/***/ ((__unused_webpack_module, exports) => {
+
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.WireType = exports.mergeBinaryOptions = exports.UnknownFieldHandler = void 0;
+/**
+ * This handler implements the default behaviour for unknown fields.
+ * When reading data, unknown fields are stored on the message, in a
+ * symbol property.
+ * When writing data, the symbol property is queried and unknown fields
+ * are serialized into the output again.
+ */
+var UnknownFieldHandler;
+(function (UnknownFieldHandler) {
+ /**
+ * The symbol used to store unknown fields for a message.
+ * The property must conform to `UnknownFieldContainer`.
+ */
+ UnknownFieldHandler.symbol = Symbol.for("protobuf-ts/unknown");
+ /**
+ * Store an unknown field during binary read directly on the message.
+ * This method is compatible with `BinaryReadOptions.readUnknownField`.
+ */
+ UnknownFieldHandler.onRead = (typeName, message, fieldNo, wireType, data) => {
+ let container = is(message) ? message[UnknownFieldHandler.symbol] : message[UnknownFieldHandler.symbol] = [];
+ container.push({ no: fieldNo, wireType, data });
+ };
+ /**
+ * Write unknown fields stored for the message to the writer.
+ * This method is compatible with `BinaryWriteOptions.writeUnknownFields`.
+ */
+ UnknownFieldHandler.onWrite = (typeName, message, writer) => {
+ for (let { no, wireType, data } of UnknownFieldHandler.list(message))
+ writer.tag(no, wireType).raw(data);
+ };
+ /**
+ * List unknown fields stored for the message.
+ * Note that there may be multiples fields with the same number.
+ */
+ UnknownFieldHandler.list = (message, fieldNo) => {
+ if (is(message)) {
+ let all = message[UnknownFieldHandler.symbol];
+ return fieldNo ? all.filter(uf => uf.no == fieldNo) : all;
}
- return this.toolPath;
+ return [];
+ };
+ /**
+ * Returns the last unknown field by field number.
+ */
+ UnknownFieldHandler.last = (message, fieldNo) => UnknownFieldHandler.list(message, fieldNo).slice(-1)[0];
+ const is = (message) => message && Array.isArray(message[UnknownFieldHandler.symbol]);
+})(UnknownFieldHandler = exports.UnknownFieldHandler || (exports.UnknownFieldHandler = {}));
+/**
+ * Merges binary write or read options. Later values override earlier values.
+ */
+function mergeBinaryOptions(a, b) {
+ return Object.assign(Object.assign({}, a), b);
+}
+exports.mergeBinaryOptions = mergeBinaryOptions;
+/**
+ * Protobuf binary format wire types.
+ *
+ * A wire type provides just enough information to find the length of the
+ * following value.
+ *
+ * See https://developers.google.com/protocol-buffers/docs/encoding#structure
+ */
+var WireType;
+(function (WireType) {
+ /**
+ * Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum
+ */
+ WireType[WireType["Varint"] = 0] = "Varint";
+ /**
+ * Used for fixed64, sfixed64, double.
+ * Always 8 bytes with little-endian byte order.
+ */
+ WireType[WireType["Bit64"] = 1] = "Bit64";
+ /**
+ * Used for string, bytes, embedded messages, packed repeated fields
+ *
+ * Only repeated numeric types (types which use the varint, 32-bit,
+ * or 64-bit wire types) can be packed. In proto3, such fields are
+ * packed by default.
+ */
+ WireType[WireType["LengthDelimited"] = 2] = "LengthDelimited";
+ /**
+ * Used for groups
+ * @deprecated
+ */
+ WireType[WireType["StartGroup"] = 3] = "StartGroup";
+ /**
+ * Used for groups
+ * @deprecated
+ */
+ WireType[WireType["EndGroup"] = 4] = "EndGroup";
+ /**
+ * Used for fixed32, sfixed32, float.
+ * Always 4 bytes with little-endian byte order.
+ */
+ WireType[WireType["Bit32"] = 5] = "Bit32";
+})(WireType = exports.WireType || (exports.WireType = {}));
+
+
+/***/ }),
+
+/***/ 2889:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.BinaryReader = exports.binaryReadOptions = void 0;
+const binary_format_contract_1 = __nccwpck_require__(4816);
+const pb_long_1 = __nccwpck_require__(1753);
+const goog_varint_1 = __nccwpck_require__(3223);
+const defaultsRead = {
+ readUnknownField: true,
+ readerFactory: bytes => new BinaryReader(bytes),
+};
+/**
+ * Make options for reading binary data form partial options.
+ */
+function binaryReadOptions(options) {
+ return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead;
+}
+exports.binaryReadOptions = binaryReadOptions;
+class BinaryReader {
+ constructor(buf, textDecoder) {
+ this.varint64 = goog_varint_1.varint64read; // dirty cast for `this`
+ /**
+ * Read a `uint32` field, an unsigned 32 bit varint.
+ */
+ this.uint32 = goog_varint_1.varint32read; // dirty cast for `this` and access to protected `buf`
+ this.buf = buf;
+ this.len = buf.length;
+ this.pos = 0;
+ this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);
+ this.textDecoder = textDecoder !== null && textDecoder !== void 0 ? textDecoder : new TextDecoder("utf-8", {
+ fatal: true,
+ ignoreBOM: true,
+ });
}
- _getSpawnArgs(options) {
- if (IS_WINDOWS) {
- if (this._isCmdFile()) {
- let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;
- for (const a of this.args) {
- argline += ' ';
- argline += options.windowsVerbatimArguments
- ? a
- : this._windowsQuoteCmdArg(a);
+ /**
+ * Reads a tag - field number and wire type.
+ */
+ tag() {
+ let tag = this.uint32(), fieldNo = tag >>> 3, wireType = tag & 7;
+ if (fieldNo <= 0 || wireType < 0 || wireType > 5)
+ throw new Error("illegal tag: field no " + fieldNo + " wire type " + wireType);
+ return [fieldNo, wireType];
+ }
+ /**
+ * Skip one element on the wire and return the skipped data.
+ * Supports WireType.StartGroup since v2.0.0-alpha.23.
+ */
+ skip(wireType) {
+ let start = this.pos;
+ // noinspection FallThroughInSwitchStatementJS
+ switch (wireType) {
+ case binary_format_contract_1.WireType.Varint:
+ while (this.buf[this.pos++] & 0x80) {
+ // ignore
}
- argline += '"';
- return [argline];
- }
+ break;
+ case binary_format_contract_1.WireType.Bit64:
+ this.pos += 4;
+ case binary_format_contract_1.WireType.Bit32:
+ this.pos += 4;
+ break;
+ case binary_format_contract_1.WireType.LengthDelimited:
+ let len = this.uint32();
+ this.pos += len;
+ break;
+ case binary_format_contract_1.WireType.StartGroup:
+ // From descriptor.proto: Group type is deprecated, not supported in proto3.
+ // But we must still be able to parse and treat as unknown.
+ let t;
+ while ((t = this.tag()[1]) !== binary_format_contract_1.WireType.EndGroup) {
+ this.skip(t);
+ }
+ break;
+ default:
+ throw new Error("cant skip wire type " + wireType);
}
- return this.args;
+ this.assertBounds();
+ return this.buf.subarray(start, this.pos);
}
- _endsWith(str, end) {
- return str.endsWith(end);
+ /**
+ * Throws error if position in byte array is out of range.
+ */
+ assertBounds() {
+ if (this.pos > this.len)
+ throw new RangeError("premature EOF");
}
- _isCmdFile() {
- const upperToolPath = this.toolPath.toUpperCase();
- return (this._endsWith(upperToolPath, '.CMD') ||
- this._endsWith(upperToolPath, '.BAT'));
+ /**
+ * Read a `int32` field, a signed 32 bit varint.
+ */
+ int32() {
+ return this.uint32() | 0;
}
- _windowsQuoteCmdArg(arg) {
- // for .exe, apply the normal quoting rules that libuv applies
- if (!this._isCmdFile()) {
- return this._uvQuoteCmdArg(arg);
- }
- // otherwise apply quoting rules specific to the cmd.exe command line parser.
- // the libuv rules are generic and are not designed specifically for cmd.exe
- // command line parser.
- //
- // for a detailed description of the cmd.exe command line parser, refer to
- // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912
- // need quotes for empty arg
- if (!arg) {
- return '""';
- }
- // determine whether the arg needs to be quoted
- const cmdSpecialChars = [
- ' ',
- '\t',
- '&',
- '(',
- ')',
- '[',
- ']',
- '{',
- '}',
- '^',
- '=',
- ';',
- '!',
- "'",
- '+',
- ',',
- '`',
- '~',
- '|',
- '<',
- '>',
- '"'
- ];
- let needsQuotes = false;
- for (const char of arg) {
- if (cmdSpecialChars.some(x => x === char)) {
- needsQuotes = true;
- break;
- }
- }
- // short-circuit if quotes not needed
- if (!needsQuotes) {
- return arg;
- }
- // the following quoting rules are very similar to the rules that by libuv applies.
- //
- // 1) wrap the string in quotes
- //
- // 2) double-up quotes - i.e. " => ""
- //
- // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately
- // doesn't work well with a cmd.exe command line.
- //
- // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app.
- // for example, the command line:
- // foo.exe "myarg:""my val"""
- // is parsed by a .NET console app into an arg array:
- // [ "myarg:\"my val\"" ]
- // which is the same end result when applying libuv quoting rules. although the actual
- // command line from libuv quoting rules would look like:
- // foo.exe "myarg:\"my val\""
- //
- // 3) double-up slashes that precede a quote,
- // e.g. hello \world => "hello \world"
- // hello\"world => "hello\\""world"
- // hello\\"world => "hello\\\\""world"
- // hello world\ => "hello world\\"
- //
- // technically this is not required for a cmd.exe command line, or the batch argument parser.
- // the reasons for including this as a .cmd quoting rule are:
- //
- // a) this is optimized for the scenario where the argument is passed from the .cmd file to an
- // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.
- //
- // b) it's what we've been doing previously (by deferring to node default behavior) and we
- // haven't heard any complaints about that aspect.
- //
- // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be
- // escaped when used on the command line directly - even though within a .cmd file % can be escaped
- // by using %%.
- //
- // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts
- // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.
- //
- // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would
- // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the
- // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args
- // to an external program.
- //
- // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.
- // % can be escaped within a .cmd file.
- let reverse = '"';
- let quoteHit = true;
- for (let i = arg.length; i > 0; i--) {
- // walk the string in reverse
- reverse += arg[i - 1];
- if (quoteHit && arg[i - 1] === '\\') {
- reverse += '\\'; // double the slash
- }
- else if (arg[i - 1] === '"') {
- quoteHit = true;
- reverse += '"'; // double the quote
- }
- else {
- quoteHit = false;
- }
- }
- reverse += '"';
- return reverse.split('').reverse().join('');
+ /**
+ * Read a `sint32` field, a signed, zigzag-encoded 32-bit varint.
+ */
+ sint32() {
+ let zze = this.uint32();
+ // decode zigzag
+ return (zze >>> 1) ^ -(zze & 1);
}
- _uvQuoteCmdArg(arg) {
- // Tool runner wraps child_process.spawn() and needs to apply the same quoting as
- // Node in certain cases where the undocumented spawn option windowsVerbatimArguments
- // is used.
- //
- // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,
- // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),
- // pasting copyright notice from Node within this function:
- //
- // Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a copy
- // of this software and associated documentation files (the "Software"), to
- // deal in the Software without restriction, including without limitation the
- // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- // sell copies of the Software, and to permit persons to whom the Software is
- // furnished to do so, subject to the following conditions:
- //
- // The above copyright notice and this permission notice shall be included in
- // all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- // IN THE SOFTWARE.
- if (!arg) {
- // Need double quotation for empty argument
- return '""';
- }
- if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) {
- // No quotation needed
- return arg;
- }
- if (!arg.includes('"') && !arg.includes('\\')) {
- // No embedded double quotes or backslashes, so I can just wrap
- // quote marks around the whole thing.
- return `"${arg}"`;
- }
- // Expected input/output:
- // input : hello"world
- // output: "hello\"world"
- // input : hello""world
- // output: "hello\"\"world"
- // input : hello\world
- // output: hello\world
- // input : hello\\world
- // output: hello\\world
- // input : hello\"world
- // output: "hello\\\"world"
- // input : hello\\"world
- // output: "hello\\\\\"world"
- // input : hello world\
- // output: "hello world\\" - note the comment in libuv actually reads "hello world\"
- // but it appears the comment is wrong, it should be "hello world\\"
- let reverse = '"';
- let quoteHit = true;
- for (let i = arg.length; i > 0; i--) {
- // walk the string in reverse
- reverse += arg[i - 1];
- if (quoteHit && arg[i - 1] === '\\') {
- reverse += '\\';
- }
- else if (arg[i - 1] === '"') {
- quoteHit = true;
- reverse += '\\';
- }
- else {
- quoteHit = false;
- }
- }
- reverse += '"';
- return reverse.split('').reverse().join('');
+ /**
+ * Read a `int64` field, a signed 64-bit varint.
+ */
+ int64() {
+ return new pb_long_1.PbLong(...this.varint64());
}
- _cloneExecOptions(options) {
- options = options || {};
- const result = {
- cwd: options.cwd || process.cwd(),
- env: options.env || process.env,
- silent: options.silent || false,
- windowsVerbatimArguments: options.windowsVerbatimArguments || false,
- failOnStdErr: options.failOnStdErr || false,
- ignoreReturnCode: options.ignoreReturnCode || false,
- delay: options.delay || 10000
- };
- result.outStream = options.outStream || process.stdout;
- result.errStream = options.errStream || process.stderr;
- return result;
+ /**
+ * Read a `uint64` field, an unsigned 64-bit varint.
+ */
+ uint64() {
+ return new pb_long_1.PbULong(...this.varint64());
}
- _getSpawnOptions(options, toolPath) {
- options = options || {};
- const result = {};
- result.cwd = options.cwd;
- result.env = options.env;
- result['windowsVerbatimArguments'] =
- options.windowsVerbatimArguments || this._isCmdFile();
- if (options.windowsVerbatimArguments) {
- result.argv0 = `"${toolPath}"`;
- }
- return result;
+ /**
+ * Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.
+ */
+ sint64() {
+ let [lo, hi] = this.varint64();
+ // decode zig zag
+ let s = -(lo & 1);
+ lo = ((lo >>> 1 | (hi & 1) << 31) ^ s);
+ hi = (hi >>> 1 ^ s);
+ return new pb_long_1.PbLong(lo, hi);
}
/**
- * Exec a tool.
- * Output will be streamed to the live console.
- * Returns promise with return code
- *
- * @param tool path to tool to exec
- * @param options optional exec options. See ExecOptions
- * @returns number
+ * Read a `bool` field, a variant.
*/
- exec() {
- return __awaiter(this, void 0, void 0, function* () {
- // root the tool path if it is unrooted and contains relative pathing
- if (!ioUtil.isRooted(this.toolPath) &&
- (this.toolPath.includes('/') ||
- (IS_WINDOWS && this.toolPath.includes('\\')))) {
- // prefer options.cwd if it is specified, however options.cwd may also need to be rooted
- this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
- }
- // if the tool is only a file name, then resolve it from the PATH
- // otherwise verify it exists (add extension on Windows if necessary)
- this.toolPath = yield io.which(this.toolPath, true);
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
- this._debug(`exec tool: ${this.toolPath}`);
- this._debug('arguments:');
- for (const arg of this.args) {
- this._debug(` ${arg}`);
- }
- const optionsNonNull = this._cloneExecOptions(this.options);
- if (!optionsNonNull.silent && optionsNonNull.outStream) {
- optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);
- }
- const state = new ExecState(optionsNonNull, this.toolPath);
- state.on('debug', (message) => {
- this._debug(message);
- });
- if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {
- return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));
- }
- const fileName = this._getSpawnFileName();
- const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));
- let stdbuffer = '';
- if (cp.stdout) {
- cp.stdout.on('data', (data) => {
- if (this.options.listeners && this.options.listeners.stdout) {
- this.options.listeners.stdout(data);
- }
- if (!optionsNonNull.silent && optionsNonNull.outStream) {
- optionsNonNull.outStream.write(data);
- }
- stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {
- if (this.options.listeners && this.options.listeners.stdline) {
- this.options.listeners.stdline(line);
- }
- });
- });
- }
- let errbuffer = '';
- if (cp.stderr) {
- cp.stderr.on('data', (data) => {
- state.processStderr = true;
- if (this.options.listeners && this.options.listeners.stderr) {
- this.options.listeners.stderr(data);
- }
- if (!optionsNonNull.silent &&
- optionsNonNull.errStream &&
- optionsNonNull.outStream) {
- const s = optionsNonNull.failOnStdErr
- ? optionsNonNull.errStream
- : optionsNonNull.outStream;
- s.write(data);
- }
- errbuffer = this._processLineBuffer(data, errbuffer, (line) => {
- if (this.options.listeners && this.options.listeners.errline) {
- this.options.listeners.errline(line);
- }
- });
- });
- }
- cp.on('error', (err) => {
- state.processError = err.message;
- state.processExited = true;
- state.processClosed = true;
- state.CheckComplete();
- });
- cp.on('exit', (code) => {
- state.processExitCode = code;
- state.processExited = true;
- this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);
- state.CheckComplete();
- });
- cp.on('close', (code) => {
- state.processExitCode = code;
- state.processExited = true;
- state.processClosed = true;
- this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);
- state.CheckComplete();
- });
- state.on('done', (error, exitCode) => {
- if (stdbuffer.length > 0) {
- this.emit('stdline', stdbuffer);
- }
- if (errbuffer.length > 0) {
- this.emit('errline', errbuffer);
- }
- cp.removeAllListeners();
- if (error) {
- reject(error);
- }
- else {
- resolve(exitCode);
- }
- });
- if (this.options.input) {
- if (!cp.stdin) {
- throw new Error('child process missing stdin');
- }
- cp.stdin.end(this.options.input);
- }
- }));
- });
+ bool() {
+ let [lo, hi] = this.varint64();
+ return lo !== 0 || hi !== 0;
}
-}
-exports.ToolRunner = ToolRunner;
-/**
- * Convert an arg string to an array of args. Handles escaping
- *
- * @param argString string of arguments
- * @returns string[] array of arguments
- */
-function argStringToArray(argString) {
- const args = [];
- let inQuotes = false;
- let escaped = false;
- let arg = '';
- function append(c) {
- // we only escape double quotes.
- if (escaped && c !== '"') {
- arg += '\\';
- }
- arg += c;
- escaped = false;
+ /**
+ * Read a `fixed32` field, an unsigned, fixed-length 32-bit integer.
+ */
+ fixed32() {
+ return this.view.getUint32((this.pos += 4) - 4, true);
}
- for (let i = 0; i < argString.length; i++) {
- const c = argString.charAt(i);
- if (c === '"') {
- if (!escaped) {
- inQuotes = !inQuotes;
- }
- else {
- append(c);
- }
- continue;
- }
- if (c === '\\' && escaped) {
- append(c);
- continue;
- }
- if (c === '\\' && inQuotes) {
- escaped = true;
- continue;
- }
- if (c === ' ' && !inQuotes) {
- if (arg.length > 0) {
- args.push(arg);
- arg = '';
- }
- continue;
- }
- append(c);
+ /**
+ * Read a `sfixed32` field, a signed, fixed-length 32-bit integer.
+ */
+ sfixed32() {
+ return this.view.getInt32((this.pos += 4) - 4, true);
}
- if (arg.length > 0) {
- args.push(arg.trim());
+ /**
+ * Read a `fixed64` field, an unsigned, fixed-length 64 bit integer.
+ */
+ fixed64() {
+ return new pb_long_1.PbULong(this.sfixed32(), this.sfixed32());
}
- return args;
-}
-class ExecState extends events.EventEmitter {
- constructor(options, toolPath) {
- super();
- this.processClosed = false; // tracks whether the process has exited and stdio is closed
- this.processError = '';
- this.processExitCode = 0;
- this.processExited = false; // tracks whether the process has exited
- this.processStderr = false; // tracks whether stderr was written to
- this.delay = 10000; // 10 seconds
- this.done = false;
- this.timeout = null;
- if (!toolPath) {
- throw new Error('toolPath must not be empty');
- }
- this.options = options;
- this.toolPath = toolPath;
- if (options.delay) {
- this.delay = options.delay;
- }
+ /**
+ * Read a `fixed64` field, a signed, fixed-length 64-bit integer.
+ */
+ sfixed64() {
+ return new pb_long_1.PbLong(this.sfixed32(), this.sfixed32());
}
- CheckComplete() {
- if (this.done) {
- return;
- }
- if (this.processClosed) {
- this._setResult();
- }
- else if (this.processExited) {
- this.timeout = (0, timers_1.setTimeout)(ExecState.HandleTimeout, this.delay, this);
- }
+ /**
+ * Read a `float` field, 32-bit floating point number.
+ */
+ float() {
+ return this.view.getFloat32((this.pos += 4) - 4, true);
}
- _debug(message) {
- this.emit('debug', message);
+ /**
+ * Read a `double` field, a 64-bit floating point number.
+ */
+ double() {
+ return this.view.getFloat64((this.pos += 8) - 8, true);
}
- _setResult() {
- // determine whether there is an error
- let error;
- if (this.processExited) {
- if (this.processError) {
- error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);
- }
- else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {
- error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
- }
- else if (this.processStderr && this.options.failOnStdErr) {
- error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);
- }
- }
- // clear the timeout
- if (this.timeout) {
- clearTimeout(this.timeout);
- this.timeout = null;
- }
- this.done = true;
- this.emit('done', error, this.processExitCode);
+ /**
+ * Read a `bytes` field, length-delimited arbitrary data.
+ */
+ bytes() {
+ let len = this.uint32();
+ let start = this.pos;
+ this.pos += len;
+ this.assertBounds();
+ return this.buf.subarray(start, start + len);
}
- static HandleTimeout(state) {
- if (state.done) {
- return;
- }
- if (!state.processClosed && state.processExited) {
- const message = `The STDIO streams did not close within ${state.delay / 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;
- state._debug(message);
- }
- state._setResult();
+ /**
+ * Read a `string` field, length-delimited data converted to UTF-8 text.
+ */
+ string() {
+ return this.textDecoder.decode(this.bytes());
}
}
-//# sourceMappingURL=toolrunner.js.map
+exports.BinaryReader = BinaryReader;
+
/***/ }),
-/***/ 74087:
+/***/ 3957:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.Context = void 0;
-const fs_1 = __nccwpck_require__(57147);
-const os_1 = __nccwpck_require__(22037);
-class Context {
- /**
- * Hydrate the context from the environment
- */
- constructor() {
- var _a, _b, _c;
- this.payload = {};
- if (process.env.GITHUB_EVENT_PATH) {
- if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) {
- this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' }));
- }
- else {
- const path = process.env.GITHUB_EVENT_PATH;
- process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`);
- }
- }
- this.eventName = process.env.GITHUB_EVENT_NAME;
- this.sha = process.env.GITHUB_SHA;
- this.ref = process.env.GITHUB_REF;
- this.workflow = process.env.GITHUB_WORKFLOW;
- this.action = process.env.GITHUB_ACTION;
- this.actor = process.env.GITHUB_ACTOR;
- this.job = process.env.GITHUB_JOB;
- this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
- this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
- this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
- this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
- this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`;
- this.graphqlUrl =
- (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`;
+exports.BinaryWriter = exports.binaryWriteOptions = void 0;
+const pb_long_1 = __nccwpck_require__(1753);
+const goog_varint_1 = __nccwpck_require__(3223);
+const assert_1 = __nccwpck_require__(8602);
+const defaultsWrite = {
+ writeUnknownFields: true,
+ writerFactory: () => new BinaryWriter(),
+};
+/**
+ * Make options for writing binary data form partial options.
+ */
+function binaryWriteOptions(options) {
+ return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite;
+}
+exports.binaryWriteOptions = binaryWriteOptions;
+class BinaryWriter {
+ constructor(textEncoder) {
+ /**
+ * Previous fork states.
+ */
+ this.stack = [];
+ this.textEncoder = textEncoder !== null && textEncoder !== void 0 ? textEncoder : new TextEncoder();
+ this.chunks = [];
+ this.buf = [];
}
- get issue() {
- const payload = this.payload;
- return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });
+ /**
+ * Return all bytes written and reset this writer.
+ */
+ finish() {
+ this.chunks.push(new Uint8Array(this.buf)); // flush the buffer
+ let len = 0;
+ for (let i = 0; i < this.chunks.length; i++)
+ len += this.chunks[i].length;
+ let bytes = new Uint8Array(len);
+ let offset = 0;
+ for (let i = 0; i < this.chunks.length; i++) {
+ bytes.set(this.chunks[i], offset);
+ offset += this.chunks[i].length;
+ }
+ this.chunks = [];
+ return bytes;
}
- get repo() {
- if (process.env.GITHUB_REPOSITORY) {
- const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
- return { owner, repo };
+ /**
+ * Start a new fork for length-delimited data like a message
+ * or a packed repeated field.
+ *
+ * Must be joined later with `join()`.
+ */
+ fork() {
+ this.stack.push({ chunks: this.chunks, buf: this.buf });
+ this.chunks = [];
+ this.buf = [];
+ return this;
+ }
+ /**
+ * Join the last fork. Write its length and bytes, then
+ * return to the previous state.
+ */
+ join() {
+ // get chunk of fork
+ let chunk = this.finish();
+ // restore previous state
+ let prev = this.stack.pop();
+ if (!prev)
+ throw new Error('invalid state, fork stack empty');
+ this.chunks = prev.chunks;
+ this.buf = prev.buf;
+ // write length of chunk as varint
+ this.uint32(chunk.byteLength);
+ return this.raw(chunk);
+ }
+ /**
+ * Writes a tag (field number and wire type).
+ *
+ * Equivalent to `uint32( (fieldNo << 3 | type) >>> 0 )`.
+ *
+ * Generated code should compute the tag ahead of time and call `uint32()`.
+ */
+ tag(fieldNo, type) {
+ return this.uint32((fieldNo << 3 | type) >>> 0);
+ }
+ /**
+ * Write a chunk of raw bytes.
+ */
+ raw(chunk) {
+ if (this.buf.length) {
+ this.chunks.push(new Uint8Array(this.buf));
+ this.buf = [];
}
- if (this.payload.repository) {
- return {
- owner: this.payload.repository.owner.login,
- repo: this.payload.repository.name
- };
+ this.chunks.push(chunk);
+ return this;
+ }
+ /**
+ * Write a `uint32` value, an unsigned 32 bit varint.
+ */
+ uint32(value) {
+ assert_1.assertUInt32(value);
+ // write value as varint 32, inlined for speed
+ while (value > 0x7f) {
+ this.buf.push((value & 0x7f) | 0x80);
+ value = value >>> 7;
}
- throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'");
+ this.buf.push(value);
+ return this;
+ }
+ /**
+ * Write a `int32` value, a signed 32 bit varint.
+ */
+ int32(value) {
+ assert_1.assertInt32(value);
+ goog_varint_1.varint32write(value, this.buf);
+ return this;
+ }
+ /**
+ * Write a `bool` value, a variant.
+ */
+ bool(value) {
+ this.buf.push(value ? 1 : 0);
+ return this;
+ }
+ /**
+ * Write a `bytes` value, length-delimited arbitrary data.
+ */
+ bytes(value) {
+ this.uint32(value.byteLength); // write length of chunk as varint
+ return this.raw(value);
+ }
+ /**
+ * Write a `string` value, length-delimited data converted to UTF-8 text.
+ */
+ string(value) {
+ let chunk = this.textEncoder.encode(value);
+ this.uint32(chunk.byteLength); // write length of chunk as varint
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `float` value, 32-bit floating point number.
+ */
+ float(value) {
+ assert_1.assertFloat32(value);
+ let chunk = new Uint8Array(4);
+ new DataView(chunk.buffer).setFloat32(0, value, true);
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `double` value, a 64-bit floating point number.
+ */
+ double(value) {
+ let chunk = new Uint8Array(8);
+ new DataView(chunk.buffer).setFloat64(0, value, true);
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
+ */
+ fixed32(value) {
+ assert_1.assertUInt32(value);
+ let chunk = new Uint8Array(4);
+ new DataView(chunk.buffer).setUint32(0, value, true);
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
+ */
+ sfixed32(value) {
+ assert_1.assertInt32(value);
+ let chunk = new Uint8Array(4);
+ new DataView(chunk.buffer).setInt32(0, value, true);
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
+ */
+ sint32(value) {
+ assert_1.assertInt32(value);
+ // zigzag encode
+ value = ((value << 1) ^ (value >> 31)) >>> 0;
+ goog_varint_1.varint32write(value, this.buf);
+ return this;
+ }
+ /**
+ * Write a `fixed64` value, a signed, fixed-length 64-bit integer.
+ */
+ sfixed64(value) {
+ let chunk = new Uint8Array(8);
+ let view = new DataView(chunk.buffer);
+ let long = pb_long_1.PbLong.from(value);
+ view.setInt32(0, long.lo, true);
+ view.setInt32(4, long.hi, true);
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.
+ */
+ fixed64(value) {
+ let chunk = new Uint8Array(8);
+ let view = new DataView(chunk.buffer);
+ let long = pb_long_1.PbULong.from(value);
+ view.setInt32(0, long.lo, true);
+ view.setInt32(4, long.hi, true);
+ return this.raw(chunk);
+ }
+ /**
+ * Write a `int64` value, a signed 64-bit varint.
+ */
+ int64(value) {
+ let long = pb_long_1.PbLong.from(value);
+ goog_varint_1.varint64write(long.lo, long.hi, this.buf);
+ return this;
+ }
+ /**
+ * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
+ */
+ sint64(value) {
+ let long = pb_long_1.PbLong.from(value),
+ // zigzag encode
+ sign = long.hi >> 31, lo = (long.lo << 1) ^ sign, hi = ((long.hi << 1) | (long.lo >>> 31)) ^ sign;
+ goog_varint_1.varint64write(lo, hi, this.buf);
+ return this;
+ }
+ /**
+ * Write a `uint64` value, an unsigned 64-bit varint.
+ */
+ uint64(value) {
+ let long = pb_long_1.PbULong.from(value);
+ goog_varint_1.varint64write(long.lo, long.hi, this.buf);
+ return this;
}
}
-exports.Context = Context;
-//# sourceMappingURL=context.js.map
+exports.BinaryWriter = BinaryWriter;
+
/***/ }),
-/***/ 95438:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 257:
+/***/ ((__unused_webpack_module, exports) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getOctokit = exports.context = void 0;
-const Context = __importStar(__nccwpck_require__(74087));
-const utils_1 = __nccwpck_require__(73030);
-exports.context = new Context.Context();
+exports.listEnumNumbers = exports.listEnumNames = exports.listEnumValues = exports.isEnumObject = void 0;
/**
- * Returns a hydrated octokit ready to use for GitHub Actions
+ * Is this a lookup object generated by Typescript, for a Typescript enum
+ * generated by protobuf-ts?
*
- * @param token the repo PAT or GITHUB_TOKEN
- * @param options other options to set
+ * - No `const enum` (enum must not be inlined, we need reverse mapping).
+ * - No string enum (we need int32 for protobuf).
+ * - Must have a value for 0 (otherwise, we would need to support custom default values).
*/
-function getOctokit(token, options, ...additionalPlugins) {
- const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins);
- return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options));
-}
-exports.getOctokit = getOctokit;
-//# sourceMappingURL=github.js.map
-
-/***/ }),
-
-/***/ 47914:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
-
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
+function isEnumObject(arg) {
+ if (typeof arg != 'object' || arg === null) {
+ return false;
}
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getApiBaseUrl = exports.getProxyFetch = exports.getProxyAgentDispatcher = exports.getProxyAgent = exports.getAuthString = void 0;
-const httpClient = __importStar(__nccwpck_require__(6341));
-const undici_1 = __nccwpck_require__(41773);
-function getAuthString(token, options) {
- if (!token && !options.auth) {
- throw new Error('Parameter token or opts.auth is required');
+ if (!arg.hasOwnProperty(0)) {
+ return false;
}
- else if (token && options.auth) {
- throw new Error('Parameters token and opts.auth may not both be specified');
+ for (let k of Object.keys(arg)) {
+ let num = parseInt(k);
+ if (!Number.isNaN(num)) {
+ // is there a name for the number?
+ let nam = arg[num];
+ if (nam === undefined)
+ return false;
+ // does the name resolve back to the number?
+ if (arg[nam] !== num)
+ return false;
+ }
+ else {
+ // is there a number for the name?
+ let num = arg[k];
+ if (num === undefined)
+ return false;
+ // is it a string enum?
+ if (typeof num !== 'number')
+ return false;
+ // do we know the number?
+ if (arg[num] === undefined)
+ return false;
+ }
}
- return typeof options.auth === 'string' ? options.auth : `token ${token}`;
-}
-exports.getAuthString = getAuthString;
-function getProxyAgent(destinationUrl) {
- const hc = new httpClient.HttpClient();
- return hc.getAgent(destinationUrl);
+ return true;
}
-exports.getProxyAgent = getProxyAgent;
-function getProxyAgentDispatcher(destinationUrl) {
- const hc = new httpClient.HttpClient();
- return hc.getAgentDispatcher(destinationUrl);
+exports.isEnumObject = isEnumObject;
+/**
+ * Lists all values of a Typescript enum, as an array of objects with a "name"
+ * property and a "number" property.
+ *
+ * Note that it is possible that a number appears more than once, because it is
+ * possible to have aliases in an enum.
+ *
+ * Throws if the enum does not adhere to the rules of enums generated by
+ * protobuf-ts. See `isEnumObject()`.
+ */
+function listEnumValues(enumObject) {
+ if (!isEnumObject(enumObject))
+ throw new Error("not a typescript enum object");
+ let values = [];
+ for (let [name, number] of Object.entries(enumObject))
+ if (typeof number == "number")
+ values.push({ name, number });
+ return values;
}
-exports.getProxyAgentDispatcher = getProxyAgentDispatcher;
-function getProxyFetch(destinationUrl) {
- const httpDispatcher = getProxyAgentDispatcher(destinationUrl);
- const proxyFetch = (url, opts) => __awaiter(this, void 0, void 0, function* () {
- return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher }));
- });
- return proxyFetch;
+exports.listEnumValues = listEnumValues;
+/**
+ * Lists the names of a Typescript enum.
+ *
+ * Throws if the enum does not adhere to the rules of enums generated by
+ * protobuf-ts. See `isEnumObject()`.
+ */
+function listEnumNames(enumObject) {
+ return listEnumValues(enumObject).map(val => val.name);
}
-exports.getProxyFetch = getProxyFetch;
-function getApiBaseUrl() {
- return process.env['GITHUB_API_URL'] || 'https://api.github.com';
+exports.listEnumNames = listEnumNames;
+/**
+ * Lists the numbers of a Typescript enum.
+ *
+ * Throws if the enum does not adhere to the rules of enums generated by
+ * protobuf-ts. See `isEnumObject()`.
+ */
+function listEnumNumbers(enumObject) {
+ return listEnumValues(enumObject)
+ .map(val => val.number)
+ .filter((num, index, arr) => arr.indexOf(num) == index);
}
-exports.getApiBaseUrl = getApiBaseUrl;
-//# sourceMappingURL=utils.js.map
+exports.listEnumNumbers = listEnumNumbers;
+
/***/ }),
-/***/ 73030:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 3223:
+/***/ ((__unused_webpack_module, exports) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
+// Copyright 2008 Google Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Code generated by the Protocol Buffer compiler is owned by the owner
+// of the input file used when generating it. This code is not
+// standalone and requires a support library to be linked with it. This
+// support library is itself covered by the above license.
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0;
-const Context = __importStar(__nccwpck_require__(74087));
-const Utils = __importStar(__nccwpck_require__(47914));
-// octokit + plugins
-const core_1 = __nccwpck_require__(76762);
-const plugin_rest_endpoint_methods_1 = __nccwpck_require__(83044);
-const plugin_paginate_rest_1 = __nccwpck_require__(64193);
-exports.context = new Context.Context();
-const baseUrl = Utils.getApiBaseUrl();
-exports.defaults = {
- baseUrl,
- request: {
- agent: Utils.getProxyAgent(baseUrl),
- fetch: Utils.getProxyFetch(baseUrl)
- }
-};
-exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults);
+exports.varint32read = exports.varint32write = exports.int64toString = exports.int64fromString = exports.varint64write = exports.varint64read = void 0;
/**
- * Convience function to correctly format Octokit Options to pass into the constructor.
+ * Read a 64 bit varint as two JS numbers.
*
- * @param token the repo PAT or GITHUB_TOKEN
- * @param options other options to set
+ * Returns tuple:
+ * [0]: low bits
+ * [0]: high bits
+ *
+ * Copyright 2008 Google Inc. All rights reserved.
+ *
+ * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L175
*/
-function getOctokitOptions(token, options) {
- const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller
- // Auth
- const auth = Utils.getAuthString(token, opts);
- if (auth) {
- opts.auth = auth;
+function varint64read() {
+ let lowBits = 0;
+ let highBits = 0;
+ for (let shift = 0; shift < 28; shift += 7) {
+ let b = this.buf[this.pos++];
+ lowBits |= (b & 0x7F) << shift;
+ if ((b & 0x80) == 0) {
+ this.assertBounds();
+ return [lowBits, highBits];
+ }
}
- return opts;
-}
-exports.getOctokitOptions = getOctokitOptions;
-//# sourceMappingURL=utils.js.map
-
-/***/ }),
-
-/***/ 6341:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
-
-/* eslint-disable @typescript-eslint/no-explicit-any */
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
+ let middleByte = this.buf[this.pos++];
+ // last four bits of the first 32 bit number
+ lowBits |= (middleByte & 0x0F) << 28;
+ // 3 upper bits are part of the next 32 bit number
+ highBits = (middleByte & 0x70) >> 4;
+ if ((middleByte & 0x80) == 0) {
+ this.assertBounds();
+ return [lowBits, highBits];
}
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
-const http = __importStar(__nccwpck_require__(13685));
-const https = __importStar(__nccwpck_require__(95687));
-const pm = __importStar(__nccwpck_require__(53466));
-const tunnel = __importStar(__nccwpck_require__(74294));
-const undici_1 = __nccwpck_require__(41773);
-var HttpCodes;
-(function (HttpCodes) {
- HttpCodes[HttpCodes["OK"] = 200] = "OK";
- HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices";
- HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently";
- HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved";
- HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther";
- HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified";
- HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy";
- HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy";
- HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect";
- HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect";
- HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest";
- HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized";
- HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired";
- HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden";
- HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound";
- HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed";
- HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable";
- HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
- HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout";
- HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict";
- HttpCodes[HttpCodes["Gone"] = 410] = "Gone";
- HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests";
- HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError";
- HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented";
- HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway";
- HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
- HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
-})(HttpCodes || (exports.HttpCodes = HttpCodes = {}));
-var Headers;
-(function (Headers) {
- Headers["Accept"] = "accept";
- Headers["ContentType"] = "content-type";
-})(Headers || (exports.Headers = Headers = {}));
-var MediaTypes;
-(function (MediaTypes) {
- MediaTypes["ApplicationJson"] = "application/json";
-})(MediaTypes || (exports.MediaTypes = MediaTypes = {}));
-/**
- * Returns the proxy URL, depending upon the supplied url and proxy environment variables.
- * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
- */
-function getProxyUrl(serverUrl) {
- const proxyUrl = pm.getProxyUrl(new URL(serverUrl));
- return proxyUrl ? proxyUrl.href : '';
-}
-exports.getProxyUrl = getProxyUrl;
-const HttpRedirectCodes = [
- HttpCodes.MovedPermanently,
- HttpCodes.ResourceMoved,
- HttpCodes.SeeOther,
- HttpCodes.TemporaryRedirect,
- HttpCodes.PermanentRedirect
-];
-const HttpResponseRetryCodes = [
- HttpCodes.BadGateway,
- HttpCodes.ServiceUnavailable,
- HttpCodes.GatewayTimeout
-];
-const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
-const ExponentialBackoffCeiling = 10;
-const ExponentialBackoffTimeSlice = 5;
-class HttpClientError extends Error {
- constructor(message, statusCode) {
- super(message);
- this.name = 'HttpClientError';
- this.statusCode = statusCode;
- Object.setPrototypeOf(this, HttpClientError.prototype);
+ for (let shift = 3; shift <= 31; shift += 7) {
+ let b = this.buf[this.pos++];
+ highBits |= (b & 0x7F) << shift;
+ if ((b & 0x80) == 0) {
+ this.assertBounds();
+ return [lowBits, highBits];
+ }
}
+ throw new Error('invalid varint');
}
-exports.HttpClientError = HttpClientError;
-class HttpClientResponse {
- constructor(message) {
- this.message = message;
+exports.varint64read = varint64read;
+/**
+ * Write a 64 bit varint, given as two JS numbers, to the given bytes array.
+ *
+ * Copyright 2008 Google Inc. All rights reserved.
+ *
+ * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344
+ */
+function varint64write(lo, hi, bytes) {
+ for (let i = 0; i < 28; i = i + 7) {
+ const shift = lo >>> i;
+ const hasNext = !((shift >>> 7) == 0 && hi == 0);
+ const byte = (hasNext ? shift | 0x80 : shift) & 0xFF;
+ bytes.push(byte);
+ if (!hasNext) {
+ return;
+ }
}
- readBody() {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
- let output = Buffer.alloc(0);
- this.message.on('data', (chunk) => {
- output = Buffer.concat([output, chunk]);
- });
- this.message.on('end', () => {
- resolve(output.toString());
- });
- }));
- });
+ const splitBits = ((lo >>> 28) & 0x0F) | ((hi & 0x07) << 4);
+ const hasMoreBits = !((hi >> 3) == 0);
+ bytes.push((hasMoreBits ? splitBits | 0x80 : splitBits) & 0xFF);
+ if (!hasMoreBits) {
+ return;
}
- readBodyBuffer() {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
- const chunks = [];
- this.message.on('data', (chunk) => {
- chunks.push(chunk);
- });
- this.message.on('end', () => {
- resolve(Buffer.concat(chunks));
- });
- }));
- });
+ for (let i = 3; i < 31; i = i + 7) {
+ const shift = hi >>> i;
+ const hasNext = !((shift >>> 7) == 0);
+ const byte = (hasNext ? shift | 0x80 : shift) & 0xFF;
+ bytes.push(byte);
+ if (!hasNext) {
+ return;
+ }
}
+ bytes.push((hi >>> 31) & 0x01);
}
-exports.HttpClientResponse = HttpClientResponse;
-function isHttps(requestUrl) {
- const parsedUrl = new URL(requestUrl);
- return parsedUrl.protocol === 'https:';
-}
-exports.isHttps = isHttps;
-class HttpClient {
- constructor(userAgent, handlers, requestOptions) {
- this._ignoreSslError = false;
- this._allowRedirects = true;
- this._allowRedirectDowngrade = false;
- this._maxRedirects = 50;
- this._allowRetries = false;
- this._maxRetries = 1;
- this._keepAlive = false;
- this._disposed = false;
- this.userAgent = userAgent;
- this.handlers = handlers || [];
- this.requestOptions = requestOptions;
- if (requestOptions) {
- if (requestOptions.ignoreSslError != null) {
- this._ignoreSslError = requestOptions.ignoreSslError;
- }
- this._socketTimeout = requestOptions.socketTimeout;
- if (requestOptions.allowRedirects != null) {
- this._allowRedirects = requestOptions.allowRedirects;
- }
- if (requestOptions.allowRedirectDowngrade != null) {
- this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
- }
- if (requestOptions.maxRedirects != null) {
- this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
- }
- if (requestOptions.keepAlive != null) {
- this._keepAlive = requestOptions.keepAlive;
- }
- if (requestOptions.allowRetries != null) {
- this._allowRetries = requestOptions.allowRetries;
- }
- if (requestOptions.maxRetries != null) {
- this._maxRetries = requestOptions.maxRetries;
- }
+exports.varint64write = varint64write;
+// constants for binary math
+const TWO_PWR_32_DBL = (1 << 16) * (1 << 16);
+/**
+ * Parse decimal string of 64 bit integer value as two JS numbers.
+ *
+ * Returns tuple:
+ * [0]: minus sign?
+ * [1]: low bits
+ * [2]: high bits
+ *
+ * Copyright 2008 Google Inc.
+ */
+function int64fromString(dec) {
+ // Check for minus sign.
+ let minus = dec[0] == '-';
+ if (minus)
+ dec = dec.slice(1);
+ // Work 6 decimal digits at a time, acting like we're converting base 1e6
+ // digits to binary. This is safe to do with floating point math because
+ // Number.isSafeInteger(ALL_32_BITS * 1e6) == true.
+ const base = 1e6;
+ let lowBits = 0;
+ let highBits = 0;
+ function add1e6digit(begin, end) {
+ // Note: Number('') is 0.
+ const digit1e6 = Number(dec.slice(begin, end));
+ highBits *= base;
+ lowBits = lowBits * base + digit1e6;
+ // Carry bits from lowBits to highBits
+ if (lowBits >= TWO_PWR_32_DBL) {
+ highBits = highBits + ((lowBits / TWO_PWR_32_DBL) | 0);
+ lowBits = lowBits % TWO_PWR_32_DBL;
}
}
- options(requestUrl, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});
- });
- }
- get(requestUrl, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('GET', requestUrl, null, additionalHeaders || {});
- });
- }
- del(requestUrl, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('DELETE', requestUrl, null, additionalHeaders || {});
- });
- }
- post(requestUrl, data, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('POST', requestUrl, data, additionalHeaders || {});
- });
+ add1e6digit(-24, -18);
+ add1e6digit(-18, -12);
+ add1e6digit(-12, -6);
+ add1e6digit(-6);
+ return [minus, lowBits, highBits];
+}
+exports.int64fromString = int64fromString;
+/**
+ * Format 64 bit integer value (as two JS numbers) to decimal string.
+ *
+ * Copyright 2008 Google Inc.
+ */
+function int64toString(bitsLow, bitsHigh) {
+ // Skip the expensive conversion if the number is small enough to use the
+ // built-in conversions.
+ if ((bitsHigh >>> 0) <= 0x1FFFFF) {
+ return '' + (TWO_PWR_32_DBL * bitsHigh + (bitsLow >>> 0));
}
- patch(requestUrl, data, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('PATCH', requestUrl, data, additionalHeaders || {});
- });
+ // What this code is doing is essentially converting the input number from
+ // base-2 to base-1e7, which allows us to represent the 64-bit range with
+ // only 3 (very large) digits. Those digits are then trivial to convert to
+ // a base-10 string.
+ // The magic numbers used here are -
+ // 2^24 = 16777216 = (1,6777216) in base-1e7.
+ // 2^48 = 281474976710656 = (2,8147497,6710656) in base-1e7.
+ // Split 32:32 representation into 16:24:24 representation so our
+ // intermediate digits don't overflow.
+ let low = bitsLow & 0xFFFFFF;
+ let mid = (((bitsLow >>> 24) | (bitsHigh << 8)) >>> 0) & 0xFFFFFF;
+ let high = (bitsHigh >> 16) & 0xFFFF;
+ // Assemble our three base-1e7 digits, ignoring carries. The maximum
+ // value in a digit at this step is representable as a 48-bit integer, which
+ // can be stored in a 64-bit floating point number.
+ let digitA = low + (mid * 6777216) + (high * 6710656);
+ let digitB = mid + (high * 8147497);
+ let digitC = (high * 2);
+ // Apply carries from A to B and from B to C.
+ let base = 10000000;
+ if (digitA >= base) {
+ digitB += Math.floor(digitA / base);
+ digitA %= base;
}
- put(requestUrl, data, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('PUT', requestUrl, data, additionalHeaders || {});
- });
+ if (digitB >= base) {
+ digitC += Math.floor(digitB / base);
+ digitB %= base;
}
- head(requestUrl, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('HEAD', requestUrl, null, additionalHeaders || {});
- });
+ // Convert base-1e7 digits to base-10, with optional leading zeroes.
+ function decimalFrom1e7(digit1e7, needLeadingZeros) {
+ let partial = digit1e7 ? String(digit1e7) : '';
+ if (needLeadingZeros) {
+ return '0000000'.slice(partial.length) + partial;
+ }
+ return partial;
}
- sendStream(verb, requestUrl, stream, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request(verb, requestUrl, stream, additionalHeaders);
- });
+ return decimalFrom1e7(digitC, /*needLeadingZeros=*/ 0) +
+ decimalFrom1e7(digitB, /*needLeadingZeros=*/ digitC) +
+ // If the final 1e7 digit didn't need leading zeros, we would have
+ // returned via the trivial code path at the top.
+ decimalFrom1e7(digitA, /*needLeadingZeros=*/ 1);
+}
+exports.int64toString = int64toString;
+/**
+ * Write a 32 bit varint, signed or unsigned. Same as `varint64write(0, value, bytes)`
+ *
+ * Copyright 2008 Google Inc. All rights reserved.
+ *
+ * See https://github.com/protocolbuffers/protobuf/blob/1b18833f4f2a2f681f4e4a25cdf3b0a43115ec26/js/binary/encoder.js#L144
+ */
+function varint32write(value, bytes) {
+ if (value >= 0) {
+ // write value as varint 32
+ while (value > 0x7f) {
+ bytes.push((value & 0x7f) | 0x80);
+ value = value >>> 7;
+ }
+ bytes.push(value);
}
- /**
- * Gets a typed object from an endpoint
- * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise
- */
- getJson(requestUrl, additionalHeaders = {}) {
- return __awaiter(this, void 0, void 0, function* () {
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- const res = yield this.get(requestUrl, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- });
+ else {
+ for (let i = 0; i < 9; i++) {
+ bytes.push(value & 127 | 128);
+ value = value >> 7;
+ }
+ bytes.push(1);
}
- postJson(requestUrl, obj, additionalHeaders = {}) {
- return __awaiter(this, void 0, void 0, function* () {
- const data = JSON.stringify(obj, null, 2);
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
- const res = yield this.post(requestUrl, data, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- });
+}
+exports.varint32write = varint32write;
+/**
+ * Read an unsigned 32 bit varint.
+ *
+ * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L220
+ */
+function varint32read() {
+ let b = this.buf[this.pos++];
+ let result = b & 0x7F;
+ if ((b & 0x80) == 0) {
+ this.assertBounds();
+ return result;
}
- putJson(requestUrl, obj, additionalHeaders = {}) {
- return __awaiter(this, void 0, void 0, function* () {
- const data = JSON.stringify(obj, null, 2);
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
- const res = yield this.put(requestUrl, data, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- });
+ b = this.buf[this.pos++];
+ result |= (b & 0x7F) << 7;
+ if ((b & 0x80) == 0) {
+ this.assertBounds();
+ return result;
}
- patchJson(requestUrl, obj, additionalHeaders = {}) {
- return __awaiter(this, void 0, void 0, function* () {
- const data = JSON.stringify(obj, null, 2);
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
- const res = yield this.patch(requestUrl, data, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- });
+ b = this.buf[this.pos++];
+ result |= (b & 0x7F) << 14;
+ if ((b & 0x80) == 0) {
+ this.assertBounds();
+ return result;
}
- /**
- * Makes a raw http request.
- * All other methods such as get, post, patch, and request ultimately call this.
- * Prefer get, del, post and patch
- */
- request(verb, requestUrl, data, headers) {
- return __awaiter(this, void 0, void 0, function* () {
- if (this._disposed) {
- throw new Error('Client has already been disposed.');
- }
- const parsedUrl = new URL(requestUrl);
- let info = this._prepareRequest(verb, parsedUrl, headers);
- // Only perform retries on reads since writes may not be idempotent.
- const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)
- ? this._maxRetries + 1
- : 1;
- let numTries = 0;
- let response;
- do {
- response = yield this.requestRaw(info, data);
- // Check if it's an authentication challenge
- if (response &&
- response.message &&
- response.message.statusCode === HttpCodes.Unauthorized) {
- let authenticationHandler;
- for (const handler of this.handlers) {
- if (handler.canHandleAuthentication(response)) {
- authenticationHandler = handler;
- break;
- }
- }
- if (authenticationHandler) {
- return authenticationHandler.handleAuthentication(this, info, data);
- }
- else {
- // We have received an unauthorized response but have no handlers to handle it.
- // Let the response return to the caller.
- return response;
- }
- }
- let redirectsRemaining = this._maxRedirects;
- while (response.message.statusCode &&
- HttpRedirectCodes.includes(response.message.statusCode) &&
- this._allowRedirects &&
- redirectsRemaining > 0) {
- const redirectUrl = response.message.headers['location'];
- if (!redirectUrl) {
- // if there's no location to redirect to, we won't
- break;
- }
- const parsedRedirectUrl = new URL(redirectUrl);
- if (parsedUrl.protocol === 'https:' &&
- parsedUrl.protocol !== parsedRedirectUrl.protocol &&
- !this._allowRedirectDowngrade) {
- throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');
- }
- // we need to finish reading the response before reassigning response
- // which will leak the open socket.
- yield response.readBody();
- // strip authorization header if redirected to a different hostname
- if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
- for (const header in headers) {
- // header names are case insensitive
- if (header.toLowerCase() === 'authorization') {
- delete headers[header];
- }
- }
- }
- // let's make the request with the new redirectUrl
- info = this._prepareRequest(verb, parsedRedirectUrl, headers);
- response = yield this.requestRaw(info, data);
- redirectsRemaining--;
- }
- if (!response.message.statusCode ||
- !HttpResponseRetryCodes.includes(response.message.statusCode)) {
- // If not a retry code, return immediately instead of retrying
- return response;
- }
- numTries += 1;
- if (numTries < maxTries) {
- yield response.readBody();
- yield this._performExponentialBackoff(numTries);
- }
- } while (numTries < maxTries);
- return response;
- });
- }
- /**
- * Needs to be called if keepAlive is set to true in request options.
- */
- dispose() {
- if (this._agent) {
- this._agent.destroy();
- }
- this._disposed = true;
- }
- /**
- * Raw request.
- * @param info
- * @param data
- */
- requestRaw(info, data) {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise((resolve, reject) => {
- function callbackForResult(err, res) {
- if (err) {
- reject(err);
- }
- else if (!res) {
- // If `err` is not passed, then `res` must be passed.
- reject(new Error('Unknown error'));
- }
- else {
- resolve(res);
- }
- }
- this.requestRawWithCallback(info, data, callbackForResult);
- });
- });
- }
- /**
- * Raw request with callback.
- * @param info
- * @param data
- * @param onResult
- */
- requestRawWithCallback(info, data, onResult) {
- if (typeof data === 'string') {
- if (!info.options.headers) {
- info.options.headers = {};
- }
- info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');
- }
- let callbackCalled = false;
- function handleResult(err, res) {
- if (!callbackCalled) {
- callbackCalled = true;
- onResult(err, res);
- }
- }
- const req = info.httpModule.request(info.options, (msg) => {
- const res = new HttpClientResponse(msg);
- handleResult(undefined, res);
- });
- let socket;
- req.on('socket', sock => {
- socket = sock;
- });
- // If we ever get disconnected, we want the socket to timeout eventually
- req.setTimeout(this._socketTimeout || 3 * 60000, () => {
- if (socket) {
- socket.end();
- }
- handleResult(new Error(`Request timeout: ${info.options.path}`));
- });
- req.on('error', function (err) {
- // err has statusCode property
- // res should have headers
- handleResult(err);
- });
- if (data && typeof data === 'string') {
- req.write(data, 'utf8');
- }
- if (data && typeof data !== 'string') {
- data.on('close', function () {
- req.end();
- });
- data.pipe(req);
- }
- else {
- req.end();
- }
- }
- /**
- * Gets an http agent. This function is useful when you need an http agent that handles
- * routing through a proxy server - depending upon the url and proxy environment variables.
- * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
- */
- getAgent(serverUrl) {
- const parsedUrl = new URL(serverUrl);
- return this._getAgent(parsedUrl);
- }
- getAgentDispatcher(serverUrl) {
- const parsedUrl = new URL(serverUrl);
- const proxyUrl = pm.getProxyUrl(parsedUrl);
- const useProxy = proxyUrl && proxyUrl.hostname;
- if (!useProxy) {
- return;
- }
- return this._getProxyAgentDispatcher(parsedUrl, proxyUrl);
- }
- _prepareRequest(method, requestUrl, headers) {
- const info = {};
- info.parsedUrl = requestUrl;
- const usingSsl = info.parsedUrl.protocol === 'https:';
- info.httpModule = usingSsl ? https : http;
- const defaultPort = usingSsl ? 443 : 80;
- info.options = {};
- info.options.host = info.parsedUrl.hostname;
- info.options.port = info.parsedUrl.port
- ? parseInt(info.parsedUrl.port)
- : defaultPort;
- info.options.path =
- (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');
- info.options.method = method;
- info.options.headers = this._mergeHeaders(headers);
- if (this.userAgent != null) {
- info.options.headers['user-agent'] = this.userAgent;
- }
- info.options.agent = this._getAgent(info.parsedUrl);
- // gives handlers an opportunity to participate
- if (this.handlers) {
- for (const handler of this.handlers) {
- handler.prepareRequest(info.options);
- }
- }
- return info;
- }
- _mergeHeaders(headers) {
- if (this.requestOptions && this.requestOptions.headers) {
- return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));
- }
- return lowercaseKeys(headers || {});
- }
- _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
- let clientHeader;
- if (this.requestOptions && this.requestOptions.headers) {
- clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
- }
- return additionalHeaders[header] || clientHeader || _default;
- }
- _getAgent(parsedUrl) {
- let agent;
- const proxyUrl = pm.getProxyUrl(parsedUrl);
- const useProxy = proxyUrl && proxyUrl.hostname;
- if (this._keepAlive && useProxy) {
- agent = this._proxyAgent;
- }
- if (!useProxy) {
- agent = this._agent;
- }
- // if agent is already assigned use that agent.
- if (agent) {
- return agent;
- }
- const usingSsl = parsedUrl.protocol === 'https:';
- let maxSockets = 100;
- if (this.requestOptions) {
- maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
- }
- // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.
- if (proxyUrl && proxyUrl.hostname) {
- const agentOptions = {
- maxSockets,
- keepAlive: this._keepAlive,
- proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {
- proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
- })), { host: proxyUrl.hostname, port: proxyUrl.port })
- };
- let tunnelAgent;
- const overHttps = proxyUrl.protocol === 'https:';
- if (usingSsl) {
- tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
- }
- else {
- tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
- }
- agent = tunnelAgent(agentOptions);
- this._proxyAgent = agent;
- }
- // if tunneling agent isn't assigned create a new agent
- if (!agent) {
- const options = { keepAlive: this._keepAlive, maxSockets };
- agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
- this._agent = agent;
- }
- if (usingSsl && this._ignoreSslError) {
- // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
- // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
- // we have to cast it to any and change it directly
- agent.options = Object.assign(agent.options || {}, {
- rejectUnauthorized: false
- });
- }
- return agent;
- }
- _getProxyAgentDispatcher(parsedUrl, proxyUrl) {
- let proxyAgent;
- if (this._keepAlive) {
- proxyAgent = this._proxyAgentDispatcher;
- }
- // if agent is already assigned use that agent.
- if (proxyAgent) {
- return proxyAgent;
- }
- const usingSsl = parsedUrl.protocol === 'https:';
- proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {
- token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`
- })));
- this._proxyAgentDispatcher = proxyAgent;
- if (usingSsl && this._ignoreSslError) {
- // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
- // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
- // we have to cast it to any and change it directly
- proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {
- rejectUnauthorized: false
- });
- }
- return proxyAgent;
- }
- _performExponentialBackoff(retryNumber) {
- return __awaiter(this, void 0, void 0, function* () {
- retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
- const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
- return new Promise(resolve => setTimeout(() => resolve(), ms));
- });
- }
- _processResponse(res, options) {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
- const statusCode = res.message.statusCode || 0;
- const response = {
- statusCode,
- result: null,
- headers: {}
- };
- // not found leads to null obj returned
- if (statusCode === HttpCodes.NotFound) {
- resolve(response);
- }
- // get the result from the body
- function dateTimeDeserializer(key, value) {
- if (typeof value === 'string') {
- const a = new Date(value);
- if (!isNaN(a.valueOf())) {
- return a;
- }
- }
- return value;
- }
- let obj;
- let contents;
- try {
- contents = yield res.readBody();
- if (contents && contents.length > 0) {
- if (options && options.deserializeDates) {
- obj = JSON.parse(contents, dateTimeDeserializer);
- }
- else {
- obj = JSON.parse(contents);
- }
- response.result = obj;
- }
- response.headers = res.message.headers;
- }
- catch (err) {
- // Invalid resource (contents not json); leaving result obj null
- }
- // note that 3xx redirects are handled by the http layer.
- if (statusCode > 299) {
- let msg;
- // if exception/error in body, attempt to get better error
- if (obj && obj.message) {
- msg = obj.message;
- }
- else if (contents && contents.length > 0) {
- // it may be the case that the exception is in the body message as string
- msg = contents;
- }
- else {
- msg = `Failed request: (${statusCode})`;
- }
- const err = new HttpClientError(msg, statusCode);
- err.result = response.result;
- reject(err);
- }
- else {
- resolve(response);
- }
- }));
- });
+ b = this.buf[this.pos++];
+ result |= (b & 0x7F) << 21;
+ if ((b & 0x80) == 0) {
+ this.assertBounds();
+ return result;
}
+ // Extract only last 4 bits
+ b = this.buf[this.pos++];
+ result |= (b & 0x0F) << 28;
+ for (let readBytes = 5; ((b & 0x80) !== 0) && readBytes < 10; readBytes++)
+ b = this.buf[this.pos++];
+ if ((b & 0x80) != 0)
+ throw new Error('invalid varint');
+ this.assertBounds();
+ // Result can have 32 bits, convert it to unsigned
+ return result >>> 0;
}
-exports.HttpClient = HttpClient;
-const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
-//# sourceMappingURL=index.js.map
+exports.varint32read = varint32read;
+
/***/ }),
-/***/ 53466:
-/***/ ((__unused_webpack_module, exports) => {
+/***/ 8886:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
+// Public API of the protobuf-ts runtime.
+// Note: we do not use `export * from ...` to help tree shakers,
+// webpack verbose output hints that this should be useful
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.checkBypass = exports.getProxyUrl = void 0;
-function getProxyUrl(reqUrl) {
- const usingSsl = reqUrl.protocol === 'https:';
- if (checkBypass(reqUrl)) {
- return undefined;
- }
- const proxyVar = (() => {
- if (usingSsl) {
- return process.env['https_proxy'] || process.env['HTTPS_PROXY'];
- }
- else {
- return process.env['http_proxy'] || process.env['HTTP_PROXY'];
- }
- })();
- if (proxyVar) {
- try {
- return new DecodedURL(proxyVar);
- }
- catch (_a) {
- if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
- return new DecodedURL(`http://${proxyVar}`);
- }
- }
- else {
- return undefined;
- }
-}
-exports.getProxyUrl = getProxyUrl;
-function checkBypass(reqUrl) {
- if (!reqUrl.hostname) {
- return false;
- }
- const reqHost = reqUrl.hostname;
- if (isLoopbackAddress(reqHost)) {
- return true;
- }
- const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';
- if (!noProxy) {
- return false;
- }
- // Determine the request port
- let reqPort;
- if (reqUrl.port) {
- reqPort = Number(reqUrl.port);
- }
- else if (reqUrl.protocol === 'http:') {
- reqPort = 80;
- }
- else if (reqUrl.protocol === 'https:') {
- reqPort = 443;
- }
- // Format the request hostname and hostname with port
- const upperReqHosts = [reqUrl.hostname.toUpperCase()];
- if (typeof reqPort === 'number') {
- upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
- }
- // Compare request host against noproxy
- for (const upperNoProxyItem of noProxy
- .split(',')
- .map(x => x.trim().toUpperCase())
- .filter(x => x)) {
- if (upperNoProxyItem === '*' ||
- upperReqHosts.some(x => x === upperNoProxyItem ||
- x.endsWith(`.${upperNoProxyItem}`) ||
- (upperNoProxyItem.startsWith('.') &&
- x.endsWith(`${upperNoProxyItem}`)))) {
- return true;
- }
- }
- return false;
-}
-exports.checkBypass = checkBypass;
-function isLoopbackAddress(host) {
- const hostLower = host.toLowerCase();
- return (hostLower === 'localhost' ||
- hostLower.startsWith('127.') ||
- hostLower.startsWith('[::1]') ||
- hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
-}
-class DecodedURL extends URL {
- constructor(url, base) {
- super(url, base);
- this._decodedUsername = decodeURIComponent(super.username);
- this._decodedPassword = decodeURIComponent(super.password);
- }
- get username() {
- return this._decodedUsername;
- }
- get password() {
- return this._decodedPassword;
- }
-}
-//# sourceMappingURL=proxy.js.map
+// Convenience JSON typings and corresponding type guards
+var json_typings_1 = __nccwpck_require__(9999);
+Object.defineProperty(exports, "typeofJsonValue", ({ enumerable: true, get: function () { return json_typings_1.typeofJsonValue; } }));
+Object.defineProperty(exports, "isJsonObject", ({ enumerable: true, get: function () { return json_typings_1.isJsonObject; } }));
+// Base 64 encoding
+var base64_1 = __nccwpck_require__(6335);
+Object.defineProperty(exports, "base64decode", ({ enumerable: true, get: function () { return base64_1.base64decode; } }));
+Object.defineProperty(exports, "base64encode", ({ enumerable: true, get: function () { return base64_1.base64encode; } }));
+// UTF8 encoding
+var protobufjs_utf8_1 = __nccwpck_require__(8950);
+Object.defineProperty(exports, "utf8read", ({ enumerable: true, get: function () { return protobufjs_utf8_1.utf8read; } }));
+// Binary format contracts, options for reading and writing, for example
+var binary_format_contract_1 = __nccwpck_require__(4816);
+Object.defineProperty(exports, "WireType", ({ enumerable: true, get: function () { return binary_format_contract_1.WireType; } }));
+Object.defineProperty(exports, "mergeBinaryOptions", ({ enumerable: true, get: function () { return binary_format_contract_1.mergeBinaryOptions; } }));
+Object.defineProperty(exports, "UnknownFieldHandler", ({ enumerable: true, get: function () { return binary_format_contract_1.UnknownFieldHandler; } }));
+// Standard IBinaryReader implementation
+var binary_reader_1 = __nccwpck_require__(2889);
+Object.defineProperty(exports, "BinaryReader", ({ enumerable: true, get: function () { return binary_reader_1.BinaryReader; } }));
+Object.defineProperty(exports, "binaryReadOptions", ({ enumerable: true, get: function () { return binary_reader_1.binaryReadOptions; } }));
+// Standard IBinaryWriter implementation
+var binary_writer_1 = __nccwpck_require__(3957);
+Object.defineProperty(exports, "BinaryWriter", ({ enumerable: true, get: function () { return binary_writer_1.BinaryWriter; } }));
+Object.defineProperty(exports, "binaryWriteOptions", ({ enumerable: true, get: function () { return binary_writer_1.binaryWriteOptions; } }));
+// Int64 and UInt64 implementations required for the binary format
+var pb_long_1 = __nccwpck_require__(1753);
+Object.defineProperty(exports, "PbLong", ({ enumerable: true, get: function () { return pb_long_1.PbLong; } }));
+Object.defineProperty(exports, "PbULong", ({ enumerable: true, get: function () { return pb_long_1.PbULong; } }));
+// JSON format contracts, options for reading and writing, for example
+var json_format_contract_1 = __nccwpck_require__(9367);
+Object.defineProperty(exports, "jsonReadOptions", ({ enumerable: true, get: function () { return json_format_contract_1.jsonReadOptions; } }));
+Object.defineProperty(exports, "jsonWriteOptions", ({ enumerable: true, get: function () { return json_format_contract_1.jsonWriteOptions; } }));
+Object.defineProperty(exports, "mergeJsonOptions", ({ enumerable: true, get: function () { return json_format_contract_1.mergeJsonOptions; } }));
+// Message type contract
+var message_type_contract_1 = __nccwpck_require__(3785);
+Object.defineProperty(exports, "MESSAGE_TYPE", ({ enumerable: true, get: function () { return message_type_contract_1.MESSAGE_TYPE; } }));
+// Message type implementation via reflection
+var message_type_1 = __nccwpck_require__(5106);
+Object.defineProperty(exports, "MessageType", ({ enumerable: true, get: function () { return message_type_1.MessageType; } }));
+// Reflection info, generated by the plugin, exposed to the user, used by reflection ops
+var reflection_info_1 = __nccwpck_require__(7910);
+Object.defineProperty(exports, "ScalarType", ({ enumerable: true, get: function () { return reflection_info_1.ScalarType; } }));
+Object.defineProperty(exports, "LongType", ({ enumerable: true, get: function () { return reflection_info_1.LongType; } }));
+Object.defineProperty(exports, "RepeatType", ({ enumerable: true, get: function () { return reflection_info_1.RepeatType; } }));
+Object.defineProperty(exports, "normalizeFieldInfo", ({ enumerable: true, get: function () { return reflection_info_1.normalizeFieldInfo; } }));
+Object.defineProperty(exports, "readFieldOptions", ({ enumerable: true, get: function () { return reflection_info_1.readFieldOptions; } }));
+Object.defineProperty(exports, "readFieldOption", ({ enumerable: true, get: function () { return reflection_info_1.readFieldOption; } }));
+Object.defineProperty(exports, "readMessageOption", ({ enumerable: true, get: function () { return reflection_info_1.readMessageOption; } }));
+// Message operations via reflection
+var reflection_type_check_1 = __nccwpck_require__(5167);
+Object.defineProperty(exports, "ReflectionTypeCheck", ({ enumerable: true, get: function () { return reflection_type_check_1.ReflectionTypeCheck; } }));
+var reflection_create_1 = __nccwpck_require__(5726);
+Object.defineProperty(exports, "reflectionCreate", ({ enumerable: true, get: function () { return reflection_create_1.reflectionCreate; } }));
+var reflection_scalar_default_1 = __nccwpck_require__(9526);
+Object.defineProperty(exports, "reflectionScalarDefault", ({ enumerable: true, get: function () { return reflection_scalar_default_1.reflectionScalarDefault; } }));
+var reflection_merge_partial_1 = __nccwpck_require__(8044);
+Object.defineProperty(exports, "reflectionMergePartial", ({ enumerable: true, get: function () { return reflection_merge_partial_1.reflectionMergePartial; } }));
+var reflection_equals_1 = __nccwpck_require__(4827);
+Object.defineProperty(exports, "reflectionEquals", ({ enumerable: true, get: function () { return reflection_equals_1.reflectionEquals; } }));
+var reflection_binary_reader_1 = __nccwpck_require__(9611);
+Object.defineProperty(exports, "ReflectionBinaryReader", ({ enumerable: true, get: function () { return reflection_binary_reader_1.ReflectionBinaryReader; } }));
+var reflection_binary_writer_1 = __nccwpck_require__(6907);
+Object.defineProperty(exports, "ReflectionBinaryWriter", ({ enumerable: true, get: function () { return reflection_binary_writer_1.ReflectionBinaryWriter; } }));
+var reflection_json_reader_1 = __nccwpck_require__(6790);
+Object.defineProperty(exports, "ReflectionJsonReader", ({ enumerable: true, get: function () { return reflection_json_reader_1.ReflectionJsonReader; } }));
+var reflection_json_writer_1 = __nccwpck_require__(1094);
+Object.defineProperty(exports, "ReflectionJsonWriter", ({ enumerable: true, get: function () { return reflection_json_writer_1.ReflectionJsonWriter; } }));
+var reflection_contains_message_type_1 = __nccwpck_require__(9946);
+Object.defineProperty(exports, "containsMessageType", ({ enumerable: true, get: function () { return reflection_contains_message_type_1.containsMessageType; } }));
+// Oneof helpers
+var oneof_1 = __nccwpck_require__(8063);
+Object.defineProperty(exports, "isOneofGroup", ({ enumerable: true, get: function () { return oneof_1.isOneofGroup; } }));
+Object.defineProperty(exports, "setOneofValue", ({ enumerable: true, get: function () { return oneof_1.setOneofValue; } }));
+Object.defineProperty(exports, "getOneofValue", ({ enumerable: true, get: function () { return oneof_1.getOneofValue; } }));
+Object.defineProperty(exports, "clearOneofValue", ({ enumerable: true, get: function () { return oneof_1.clearOneofValue; } }));
+Object.defineProperty(exports, "getSelectedOneofValue", ({ enumerable: true, get: function () { return oneof_1.getSelectedOneofValue; } }));
+// Enum object type guard and reflection util, may be interesting to the user.
+var enum_object_1 = __nccwpck_require__(257);
+Object.defineProperty(exports, "listEnumValues", ({ enumerable: true, get: function () { return enum_object_1.listEnumValues; } }));
+Object.defineProperty(exports, "listEnumNames", ({ enumerable: true, get: function () { return enum_object_1.listEnumNames; } }));
+Object.defineProperty(exports, "listEnumNumbers", ({ enumerable: true, get: function () { return enum_object_1.listEnumNumbers; } }));
+Object.defineProperty(exports, "isEnumObject", ({ enumerable: true, get: function () { return enum_object_1.isEnumObject; } }));
+// lowerCamelCase() is exported for plugin, rpc-runtime and other rpc packages
+var lower_camel_case_1 = __nccwpck_require__(4073);
+Object.defineProperty(exports, "lowerCamelCase", ({ enumerable: true, get: function () { return lower_camel_case_1.lowerCamelCase; } }));
+// assertion functions are exported for plugin, may also be useful to user
+var assert_1 = __nccwpck_require__(8602);
+Object.defineProperty(exports, "assert", ({ enumerable: true, get: function () { return assert_1.assert; } }));
+Object.defineProperty(exports, "assertNever", ({ enumerable: true, get: function () { return assert_1.assertNever; } }));
+Object.defineProperty(exports, "assertInt32", ({ enumerable: true, get: function () { return assert_1.assertInt32; } }));
+Object.defineProperty(exports, "assertUInt32", ({ enumerable: true, get: function () { return assert_1.assertUInt32; } }));
+Object.defineProperty(exports, "assertFloat32", ({ enumerable: true, get: function () { return assert_1.assertFloat32; } }));
+
/***/ }),
-/***/ 28090:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 9367:
+/***/ ((__unused_webpack_module, exports) => {
-"use strict";
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.hashFiles = exports.create = void 0;
-const internal_globber_1 = __nccwpck_require__(28298);
-const internal_hash_files_1 = __nccwpck_require__(2448);
+exports.mergeJsonOptions = exports.jsonWriteOptions = exports.jsonReadOptions = void 0;
+const defaultsWrite = {
+ emitDefaultValues: false,
+ enumAsInteger: false,
+ useProtoFieldName: false,
+ prettySpaces: 0,
+}, defaultsRead = {
+ ignoreUnknownFields: false,
+};
/**
- * Constructs a globber
- *
- * @param patterns Patterns separated by newlines
- * @param options Glob options
+ * Make options for reading JSON data from partial options.
*/
-function create(patterns, options) {
- return __awaiter(this, void 0, void 0, function* () {
- return yield internal_globber_1.DefaultGlobber.create(patterns, options);
- });
+function jsonReadOptions(options) {
+ return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead;
}
-exports.create = create;
+exports.jsonReadOptions = jsonReadOptions;
/**
- * Computes the sha256 hash of a glob
- *
- * @param patterns Patterns separated by newlines
- * @param currentWorkspace Workspace used when matching files
- * @param options Glob options
- * @param verbose Enables verbose logging
+ * Make options for writing JSON data from partial options.
*/
-function hashFiles(patterns, currentWorkspace = '', options, verbose = false) {
- return __awaiter(this, void 0, void 0, function* () {
- let followSymbolicLinks = true;
- if (options && typeof options.followSymbolicLinks === 'boolean') {
- followSymbolicLinks = options.followSymbolicLinks;
- }
- const globber = yield create(patterns, { followSymbolicLinks });
- return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose);
- });
+function jsonWriteOptions(options) {
+ return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite;
}
-exports.hashFiles = hashFiles;
-//# sourceMappingURL=glob.js.map
-
-/***/ }),
-
-/***/ 51026:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
-
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getOptions = void 0;
-const core = __importStar(__nccwpck_require__(51967));
+exports.jsonWriteOptions = jsonWriteOptions;
/**
- * Returns a copy with defaults filled in.
+ * Merges JSON write or read options. Later values override earlier values. Type registries are merged.
*/
-function getOptions(copy) {
- const result = {
- followSymbolicLinks: true,
- implicitDescendants: true,
- matchDirectories: true,
- omitBrokenSymbolicLinks: true,
- excludeHiddenFiles: false
- };
- if (copy) {
- if (typeof copy.followSymbolicLinks === 'boolean') {
- result.followSymbolicLinks = copy.followSymbolicLinks;
- core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`);
- }
- if (typeof copy.implicitDescendants === 'boolean') {
- result.implicitDescendants = copy.implicitDescendants;
- core.debug(`implicitDescendants '${result.implicitDescendants}'`);
- }
- if (typeof copy.matchDirectories === 'boolean') {
- result.matchDirectories = copy.matchDirectories;
- core.debug(`matchDirectories '${result.matchDirectories}'`);
- }
- if (typeof copy.omitBrokenSymbolicLinks === 'boolean') {
- result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;
- core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`);
- }
- if (typeof copy.excludeHiddenFiles === 'boolean') {
- result.excludeHiddenFiles = copy.excludeHiddenFiles;
- core.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`);
- }
- }
- return result;
+function mergeJsonOptions(a, b) {
+ var _a, _b;
+ let c = Object.assign(Object.assign({}, a), b);
+ c.typeRegistry = [...((_a = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a !== void 0 ? _a : []), ...((_b = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b !== void 0 ? _b : [])];
+ return c;
}
-exports.getOptions = getOptions;
-//# sourceMappingURL=internal-glob-options-helper.js.map
+exports.mergeJsonOptions = mergeJsonOptions;
+
/***/ }),
-/***/ 28298:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 9999:
+/***/ ((__unused_webpack_module, exports) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __asyncValues = (this && this.__asyncValues) || function (o) {
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
- var m = o[Symbol.asyncIterator], i;
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
-};
-var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
-var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
- function fulfill(value) { resume("next", value); }
- function reject(value) { resume("throw", value); }
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.DefaultGlobber = void 0;
-const core = __importStar(__nccwpck_require__(51967));
-const fs = __importStar(__nccwpck_require__(57147));
-const globOptionsHelper = __importStar(__nccwpck_require__(51026));
-const path = __importStar(__nccwpck_require__(71017));
-const patternHelper = __importStar(__nccwpck_require__(29005));
-const internal_match_kind_1 = __nccwpck_require__(81063);
-const internal_pattern_1 = __nccwpck_require__(64536);
-const internal_search_state_1 = __nccwpck_require__(89117);
-const IS_WINDOWS = process.platform === 'win32';
-class DefaultGlobber {
- constructor(options) {
- this.patterns = [];
- this.searchPaths = [];
- this.options = globOptionsHelper.getOptions(options);
- }
- getSearchPaths() {
- // Return a copy
- return this.searchPaths.slice();
- }
- glob() {
- var _a, e_1, _b, _c;
- return __awaiter(this, void 0, void 0, function* () {
- const result = [];
- try {
- for (var _d = true, _e = __asyncValues(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
- _c = _f.value;
- _d = false;
- const itemPath = _c;
- result.push(itemPath);
- }
- }
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
- finally {
- try {
- if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
- }
- finally { if (e_1) throw e_1.error; }
- }
- return result;
- });
- }
- globGenerator() {
- return __asyncGenerator(this, arguments, function* globGenerator_1() {
- // Fill in defaults options
- const options = globOptionsHelper.getOptions(this.options);
- // Implicit descendants?
- const patterns = [];
- for (const pattern of this.patterns) {
- patterns.push(pattern);
- if (options.implicitDescendants &&
- (pattern.trailingSeparator ||
- pattern.segments[pattern.segments.length - 1] !== '**')) {
- patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat('**')));
- }
- }
- // Push the search paths
- const stack = [];
- for (const searchPath of patternHelper.getSearchPaths(patterns)) {
- core.debug(`Search path '${searchPath}'`);
- // Exists?
- try {
- // Intentionally using lstat. Detection for broken symlink
- // will be performed later (if following symlinks).
- yield __await(fs.promises.lstat(searchPath));
- }
- catch (err) {
- if (err.code === 'ENOENT') {
- continue;
- }
- throw err;
- }
- stack.unshift(new internal_search_state_1.SearchState(searchPath, 1));
- }
- // Search
- const traversalChain = []; // used to detect cycles
- while (stack.length) {
- // Pop
- const item = stack.pop();
- // Match?
- const match = patternHelper.match(patterns, item.path);
- const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path);
- if (!match && !partialMatch) {
- continue;
- }
- // Stat
- const stats = yield __await(DefaultGlobber.stat(item, options, traversalChain)
- // Broken symlink, or symlink cycle detected, or no longer exists
- );
- // Broken symlink, or symlink cycle detected, or no longer exists
- if (!stats) {
- continue;
- }
- // Hidden file or directory?
- if (options.excludeHiddenFiles && path.basename(item.path).match(/^\./)) {
- continue;
- }
- // Directory
- if (stats.isDirectory()) {
- // Matched
- if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) {
- yield yield __await(item.path);
- }
- // Descend?
- else if (!partialMatch) {
- continue;
- }
- // Push the child items in reverse
- const childLevel = item.level + 1;
- const childItems = (yield __await(fs.promises.readdir(item.path))).map(x => new internal_search_state_1.SearchState(path.join(item.path, x), childLevel));
- stack.push(...childItems.reverse());
- }
- // File
- else if (match & internal_match_kind_1.MatchKind.File) {
- yield yield __await(item.path);
- }
- }
- });
- }
- /**
- * Constructs a DefaultGlobber
- */
- static create(patterns, options) {
- return __awaiter(this, void 0, void 0, function* () {
- const result = new DefaultGlobber(options);
- if (IS_WINDOWS) {
- patterns = patterns.replace(/\r\n/g, '\n');
- patterns = patterns.replace(/\r/g, '\n');
- }
- const lines = patterns.split('\n').map(x => x.trim());
- for (const line of lines) {
- // Empty or comment
- if (!line || line.startsWith('#')) {
- continue;
- }
- // Pattern
- else {
- result.patterns.push(new internal_pattern_1.Pattern(line));
- }
- }
- result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns));
- return result;
- });
- }
- static stat(item, options, traversalChain) {
- return __awaiter(this, void 0, void 0, function* () {
- // Note:
- // `stat` returns info about the target of a symlink (or symlink chain)
- // `lstat` returns info about a symlink itself
- let stats;
- if (options.followSymbolicLinks) {
- try {
- // Use `stat` (following symlinks)
- stats = yield fs.promises.stat(item.path);
- }
- catch (err) {
- if (err.code === 'ENOENT') {
- if (options.omitBrokenSymbolicLinks) {
- core.debug(`Broken symlink '${item.path}'`);
- return undefined;
- }
- throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`);
- }
- throw err;
- }
- }
- else {
- // Use `lstat` (not following symlinks)
- stats = yield fs.promises.lstat(item.path);
- }
- // Note, isDirectory() returns false for the lstat of a symlink
- if (stats.isDirectory() && options.followSymbolicLinks) {
- // Get the realpath
- const realPath = yield fs.promises.realpath(item.path);
- // Fixup the traversal chain to match the item level
- while (traversalChain.length >= item.level) {
- traversalChain.pop();
- }
- // Test for a cycle
- if (traversalChain.some((x) => x === realPath)) {
- core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`);
- return undefined;
- }
- // Update the traversal chain
- traversalChain.push(realPath);
- }
- return stats;
- });
+exports.isJsonObject = exports.typeofJsonValue = void 0;
+/**
+ * Get the type of a JSON value.
+ * Distinguishes between array, null and object.
+ */
+function typeofJsonValue(value) {
+ let t = typeof value;
+ if (t == "object") {
+ if (Array.isArray(value))
+ return "array";
+ if (value === null)
+ return "null";
}
+ return t;
}
-exports.DefaultGlobber = DefaultGlobber;
-//# sourceMappingURL=internal-globber.js.map
+exports.typeofJsonValue = typeofJsonValue;
+/**
+ * Is this a JSON object (instead of an array or null)?
+ */
+function isJsonObject(value) {
+ return value !== null && typeof value == "object" && !Array.isArray(value);
+}
+exports.isJsonObject = isJsonObject;
+
/***/ }),
-/***/ 2448:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 4073:
+/***/ ((__unused_webpack_module, exports) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __asyncValues = (this && this.__asyncValues) || function (o) {
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
- var m = o[Symbol.asyncIterator], i;
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.hashFiles = void 0;
-const crypto = __importStar(__nccwpck_require__(6113));
-const core = __importStar(__nccwpck_require__(51967));
-const fs = __importStar(__nccwpck_require__(57147));
-const stream = __importStar(__nccwpck_require__(12781));
-const util = __importStar(__nccwpck_require__(73837));
-const path = __importStar(__nccwpck_require__(71017));
-function hashFiles(globber, currentWorkspace, verbose = false) {
- var _a, e_1, _b, _c;
- var _d;
- return __awaiter(this, void 0, void 0, function* () {
- const writeDelegate = verbose ? core.info : core.debug;
- let hasMatch = false;
- const githubWorkspace = currentWorkspace
- ? currentWorkspace
- : (_d = process.env['GITHUB_WORKSPACE']) !== null && _d !== void 0 ? _d : process.cwd();
- const result = crypto.createHash('sha256');
- let count = 0;
- try {
- for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
- _c = _g.value;
- _e = false;
- const file = _c;
- writeDelegate(file);
- if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
- writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
- continue;
- }
- if (fs.statSync(file).isDirectory()) {
- writeDelegate(`Skip directory '${file}'.`);
- continue;
- }
- const hash = crypto.createHash('sha256');
- const pipeline = util.promisify(stream.pipeline);
- yield pipeline(fs.createReadStream(file), hash);
- result.write(hash.digest());
- count++;
- if (!hasMatch) {
- hasMatch = true;
- }
- }
+exports.lowerCamelCase = void 0;
+/**
+ * Converts snake_case to lowerCamelCase.
+ *
+ * Should behave like protoc:
+ * https://github.com/protocolbuffers/protobuf/blob/e8ae137c96444ea313485ed1118c5e43b2099cf1/src/google/protobuf/compiler/java/java_helpers.cc#L118
+ */
+function lowerCamelCase(snakeCase) {
+ let capNext = false;
+ const sb = [];
+ for (let i = 0; i < snakeCase.length; i++) {
+ let next = snakeCase.charAt(i);
+ if (next == '_') {
+ capNext = true;
}
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
- finally {
- try {
- if (!_e && !_a && (_b = _f.return)) yield _b.call(_f);
- }
- finally { if (e_1) throw e_1.error; }
+ else if (/\d/.test(next)) {
+ sb.push(next);
+ capNext = true;
}
- result.end();
- if (hasMatch) {
- writeDelegate(`Found ${count} files to hash.`);
- return result.digest('hex');
+ else if (capNext) {
+ sb.push(next.toUpperCase());
+ capNext = false;
+ }
+ else if (i == 0) {
+ sb.push(next.toLowerCase());
}
else {
- writeDelegate(`No matches found for glob`);
- return '';
+ sb.push(next);
}
- });
+ }
+ return sb.join('');
}
-exports.hashFiles = hashFiles;
-//# sourceMappingURL=internal-hash-files.js.map
+exports.lowerCamelCase = lowerCamelCase;
+
/***/ }),
-/***/ 81063:
+/***/ 3785:
/***/ ((__unused_webpack_module, exports) => {
-"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.MatchKind = void 0;
+exports.MESSAGE_TYPE = void 0;
/**
- * Indicates whether a pattern matches a path
+ * The symbol used as a key on message objects to store the message type.
+ *
+ * Note that this is an experimental feature - it is here to stay, but
+ * implementation details may change without notice.
*/
-var MatchKind;
-(function (MatchKind) {
- /** Not matched */
- MatchKind[MatchKind["None"] = 0] = "None";
- /** Matched if the path is a directory */
- MatchKind[MatchKind["Directory"] = 1] = "Directory";
- /** Matched if the path is a regular file */
- MatchKind[MatchKind["File"] = 2] = "File";
- /** Matched */
- MatchKind[MatchKind["All"] = 3] = "All";
-})(MatchKind || (exports.MatchKind = MatchKind = {}));
-//# sourceMappingURL=internal-match-kind.js.map
+exports.MESSAGE_TYPE = Symbol.for("protobuf-ts/message-type");
+
/***/ }),
-/***/ 1849:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 5106:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.safeTrimTrailingSeparator = exports.normalizeSeparators = exports.hasRoot = exports.hasAbsoluteRoot = exports.ensureAbsoluteRoot = exports.dirname = void 0;
-const path = __importStar(__nccwpck_require__(71017));
-const assert_1 = __importDefault(__nccwpck_require__(39491));
-const IS_WINDOWS = process.platform === 'win32';
+exports.MessageType = void 0;
+const message_type_contract_1 = __nccwpck_require__(3785);
+const reflection_info_1 = __nccwpck_require__(7910);
+const reflection_type_check_1 = __nccwpck_require__(5167);
+const reflection_json_reader_1 = __nccwpck_require__(6790);
+const reflection_json_writer_1 = __nccwpck_require__(1094);
+const reflection_binary_reader_1 = __nccwpck_require__(9611);
+const reflection_binary_writer_1 = __nccwpck_require__(6907);
+const reflection_create_1 = __nccwpck_require__(5726);
+const reflection_merge_partial_1 = __nccwpck_require__(8044);
+const json_typings_1 = __nccwpck_require__(9999);
+const json_format_contract_1 = __nccwpck_require__(9367);
+const reflection_equals_1 = __nccwpck_require__(4827);
+const binary_writer_1 = __nccwpck_require__(3957);
+const binary_reader_1 = __nccwpck_require__(2889);
+const baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
+const messageTypeDescriptor = baseDescriptors[message_type_contract_1.MESSAGE_TYPE] = {};
/**
- * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths.
- *
- * For example, on Linux/macOS:
- * - `/ => /`
- * - `/hello => /`
- *
- * For example, on Windows:
- * - `C:\ => C:\`
- * - `C:\hello => C:\`
- * - `C: => C:`
- * - `C:hello => C:`
- * - `\ => \`
- * - `\hello => \`
- * - `\\hello => \\hello`
- * - `\\hello\world => \\hello\world`
+ * This standard message type provides reflection-based
+ * operations to work with a message.
*/
-function dirname(p) {
- // Normalize slashes and trim unnecessary trailing slash
- p = safeTrimTrailingSeparator(p);
- // Windows UNC root, e.g. \\hello or \\hello\world
- if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) {
- return p;
- }
- // Get dirname
- let result = path.dirname(p);
- // Trim trailing slash for Windows UNC root, e.g. \\hello\world\
- if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) {
- result = safeTrimTrailingSeparator(result);
+class MessageType {
+ constructor(name, fields, options) {
+ this.defaultCheckDepth = 16;
+ this.typeName = name;
+ this.fields = fields.map(reflection_info_1.normalizeFieldInfo);
+ this.options = options !== null && options !== void 0 ? options : {};
+ messageTypeDescriptor.value = this;
+ this.messagePrototype = Object.create(null, baseDescriptors);
+ this.refTypeCheck = new reflection_type_check_1.ReflectionTypeCheck(this);
+ this.refJsonReader = new reflection_json_reader_1.ReflectionJsonReader(this);
+ this.refJsonWriter = new reflection_json_writer_1.ReflectionJsonWriter(this);
+ this.refBinReader = new reflection_binary_reader_1.ReflectionBinaryReader(this);
+ this.refBinWriter = new reflection_binary_writer_1.ReflectionBinaryWriter(this);
}
- return result;
-}
-exports.dirname = dirname;
-/**
- * Roots the path if not already rooted. On Windows, relative roots like `\`
- * or `C:` are expanded based on the current working directory.
- */
-function ensureAbsoluteRoot(root, itemPath) {
- (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);
- (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);
- // Already rooted
- if (hasAbsoluteRoot(itemPath)) {
- return itemPath;
+ create(value) {
+ let message = reflection_create_1.reflectionCreate(this);
+ if (value !== undefined) {
+ reflection_merge_partial_1.reflectionMergePartial(this, message, value);
+ }
+ return message;
}
- // Windows
- if (IS_WINDOWS) {
- // Check for itemPath like C: or C:foo
- if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) {
- let cwd = process.cwd();
- (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
- // Drive letter matches cwd? Expand to cwd
- if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) {
- // Drive only, e.g. C:
- if (itemPath.length === 2) {
- // Preserve specified drive letter case (upper or lower)
- return `${itemPath[0]}:\\${cwd.substr(3)}`;
- }
- // Drive + path, e.g. C:foo
- else {
- if (!cwd.endsWith('\\')) {
- cwd += '\\';
- }
- // Preserve specified drive letter case (upper or lower)
- return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`;
- }
- }
- // Different drive
- else {
- return `${itemPath[0]}:\\${itemPath.substr(2)}`;
- }
- }
- // Check for itemPath like \ or \foo
- else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) {
- const cwd = process.cwd();
- (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
- return `${cwd[0]}:\\${itemPath.substr(1)}`;
- }
+ /**
+ * Clone the message.
+ *
+ * Unknown fields are discarded.
+ */
+ clone(message) {
+ let copy = this.create();
+ reflection_merge_partial_1.reflectionMergePartial(this, copy, message);
+ return copy;
}
- (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);
- // Otherwise ensure root ends with a separator
- if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) {
- // Intentionally empty
+ /**
+ * Determines whether two message of the same type have the same field values.
+ * Checks for deep equality, traversing repeated fields, oneof groups, maps
+ * and messages recursively.
+ * Will also return true if both messages are `undefined`.
+ */
+ equals(a, b) {
+ return reflection_equals_1.reflectionEquals(this, a, b);
}
- else {
- // Append separator
- root += path.sep;
+ /**
+ * Is the given value assignable to our message type
+ * and contains no [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?
+ */
+ is(arg, depth = this.defaultCheckDepth) {
+ return this.refTypeCheck.is(arg, depth, false);
}
- return root + itemPath;
-}
-exports.ensureAbsoluteRoot = ensureAbsoluteRoot;
-/**
- * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like:
- * `\\hello\share` and `C:\hello` (and using alternate separator).
- */
-function hasAbsoluteRoot(itemPath) {
- (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);
- // Normalize separators
- itemPath = normalizeSeparators(itemPath);
- // Windows
- if (IS_WINDOWS) {
- // E.g. \\hello\share or C:\hello
- return itemPath.startsWith('\\\\') || /^[A-Z]:\\/i.test(itemPath);
+ /**
+ * Is the given value assignable to our message type,
+ * regardless of [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?
+ */
+ isAssignable(arg, depth = this.defaultCheckDepth) {
+ return this.refTypeCheck.is(arg, depth, true);
}
- // E.g. /hello
- return itemPath.startsWith('/');
-}
-exports.hasAbsoluteRoot = hasAbsoluteRoot;
-/**
- * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like:
- * `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator).
- */
-function hasRoot(itemPath) {
- (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`);
- // Normalize separators
- itemPath = normalizeSeparators(itemPath);
- // Windows
- if (IS_WINDOWS) {
- // E.g. \ or \hello or \\hello
- // E.g. C: or C:\hello
- return itemPath.startsWith('\\') || /^[A-Z]:/i.test(itemPath);
+ /**
+ * Copy partial data into the target message.
+ */
+ mergePartial(target, source) {
+ reflection_merge_partial_1.reflectionMergePartial(this, target, source);
}
- // E.g. /hello
- return itemPath.startsWith('/');
-}
-exports.hasRoot = hasRoot;
-/**
- * Removes redundant slashes and converts `/` to `\` on Windows
- */
-function normalizeSeparators(p) {
- p = p || '';
- // Windows
- if (IS_WINDOWS) {
- // Convert slashes on Windows
- p = p.replace(/\//g, '\\');
- // Remove redundant slashes
- const isUnc = /^\\\\+[^\\]/.test(p); // e.g. \\hello
- return (isUnc ? '\\' : '') + p.replace(/\\\\+/g, '\\'); // preserve leading \\ for UNC
+ /**
+ * Create a new message from binary format.
+ */
+ fromBinary(data, options) {
+ let opt = binary_reader_1.binaryReadOptions(options);
+ return this.internalBinaryRead(opt.readerFactory(data), data.byteLength, opt);
}
- // Remove redundant slashes
- return p.replace(/\/\/+/g, '/');
-}
-exports.normalizeSeparators = normalizeSeparators;
-/**
- * Normalizes the path separators and trims the trailing separator (when safe).
- * For example, `/foo/ => /foo` but `/ => /`
- */
-function safeTrimTrailingSeparator(p) {
- // Short-circuit if empty
- if (!p) {
- return '';
+ /**
+ * Read a new message from a JSON value.
+ */
+ fromJson(json, options) {
+ return this.internalJsonRead(json, json_format_contract_1.jsonReadOptions(options));
}
- // Normalize separators
- p = normalizeSeparators(p);
- // No trailing slash
- if (!p.endsWith(path.sep)) {
- return p;
+ /**
+ * Read a new message from a JSON string.
+ * This is equivalent to `T.fromJson(JSON.parse(json))`.
+ */
+ fromJsonString(json, options) {
+ let value = JSON.parse(json);
+ return this.fromJson(value, options);
}
- // Check '/' on Linux/macOS and '\' on Windows
- if (p === path.sep) {
- return p;
+ /**
+ * Write the message to canonical JSON value.
+ */
+ toJson(message, options) {
+ return this.internalJsonWrite(message, json_format_contract_1.jsonWriteOptions(options));
}
- // On Windows check if drive root. E.g. C:\
- if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) {
- return p;
+ /**
+ * Convert the message to canonical JSON string.
+ * This is equivalent to `JSON.stringify(T.toJson(t))`
+ */
+ toJsonString(message, options) {
+ var _a;
+ let value = this.toJson(message, options);
+ return JSON.stringify(value, null, (_a = options === null || options === void 0 ? void 0 : options.prettySpaces) !== null && _a !== void 0 ? _a : 0);
}
- // Otherwise trim trailing slash
- return p.substr(0, p.length - 1);
-}
-exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator;
-//# sourceMappingURL=internal-path-helper.js.map
-
-/***/ }),
-
-/***/ 96836:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
-
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
+ /**
+ * Write the message to binary format.
+ */
+ toBinary(message, options) {
+ let opt = binary_writer_1.binaryWriteOptions(options);
+ return this.internalBinaryWrite(message, opt.writerFactory(), opt).finish();
}
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.Path = void 0;
-const path = __importStar(__nccwpck_require__(71017));
-const pathHelper = __importStar(__nccwpck_require__(1849));
-const assert_1 = __importDefault(__nccwpck_require__(39491));
-const IS_WINDOWS = process.platform === 'win32';
-/**
- * Helper class for parsing paths into segments
- */
-class Path {
/**
- * Constructs a Path
- * @param itemPath Path or array of segments
+ * This is an internal method. If you just want to read a message from
+ * JSON, use `fromJson()` or `fromJsonString()`.
+ *
+ * Reads JSON value and merges the fields into the target
+ * according to protobuf rules. If the target is omitted,
+ * a new instance is created first.
*/
- constructor(itemPath) {
- this.segments = [];
- // String
- if (typeof itemPath === 'string') {
- (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`);
- // Normalize slashes and trim unnecessary trailing slash
- itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);
- // Not rooted
- if (!pathHelper.hasRoot(itemPath)) {
- this.segments = itemPath.split(path.sep);
- }
- // Rooted
- else {
- // Add all segments, while not at the root
- let remaining = itemPath;
- let dir = pathHelper.dirname(remaining);
- while (dir !== remaining) {
- // Add the segment
- const basename = path.basename(remaining);
- this.segments.unshift(basename);
- // Truncate the last segment
- remaining = dir;
- dir = pathHelper.dirname(remaining);
- }
- // Remainder is the root
- this.segments.unshift(remaining);
- }
- }
- // Array
- else {
- // Must not be empty
- (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);
- // Each segment
- for (let i = 0; i < itemPath.length; i++) {
- let segment = itemPath[i];
- // Must not be empty
- (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`);
- // Normalize slashes
- segment = pathHelper.normalizeSeparators(itemPath[i]);
- // Root segment
- if (i === 0 && pathHelper.hasRoot(segment)) {
- segment = pathHelper.safeTrimTrailingSeparator(segment);
- (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);
- this.segments.push(segment);
- }
- // All other segments
- else {
- // Must not contain slash
- (0, assert_1.default)(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);
- this.segments.push(segment);
- }
- }
+ internalJsonRead(json, options, target) {
+ if (json !== null && typeof json == "object" && !Array.isArray(json)) {
+ let message = target !== null && target !== void 0 ? target : this.create();
+ this.refJsonReader.read(json, message, options);
+ return message;
}
+ throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json)}.`);
}
/**
- * Converts the path to it's string representation
+ * This is an internal method. If you just want to write a message
+ * to JSON, use `toJson()` or `toJsonString().
+ *
+ * Writes JSON value and returns it.
*/
- toString() {
- // First segment
- let result = this.segments[0];
- // All others
- let skipSlash = result.endsWith(path.sep) || (IS_WINDOWS && /^[A-Z]:$/i.test(result));
- for (let i = 1; i < this.segments.length; i++) {
- if (skipSlash) {
- skipSlash = false;
- }
- else {
- result += path.sep;
- }
- result += this.segments[i];
- }
- return result;
+ internalJsonWrite(message, options) {
+ return this.refJsonWriter.write(message, options);
+ }
+ /**
+ * This is an internal method. If you just want to write a message
+ * in binary format, use `toBinary()`.
+ *
+ * Serializes the message in binary format and appends it to the given
+ * writer. Returns passed writer.
+ */
+ internalBinaryWrite(message, writer, options) {
+ this.refBinWriter.write(message, writer, options);
+ return writer;
+ }
+ /**
+ * This is an internal method. If you just want to read a message from
+ * binary data, use `fromBinary()`.
+ *
+ * Reads data from binary format and merges the fields into
+ * the target according to protobuf rules. If the target is
+ * omitted, a new instance is created first.
+ */
+ internalBinaryRead(reader, length, options, target) {
+ let message = target !== null && target !== void 0 ? target : this.create();
+ this.refBinReader.read(reader, message, options, length);
+ return message;
}
}
-exports.Path = Path;
-//# sourceMappingURL=internal-path.js.map
+exports.MessageType = MessageType;
+
/***/ }),
-/***/ 29005:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 8063:
+/***/ ((__unused_webpack_module, exports) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.partialMatch = exports.match = exports.getSearchPaths = void 0;
-const pathHelper = __importStar(__nccwpck_require__(1849));
-const internal_match_kind_1 = __nccwpck_require__(81063);
-const IS_WINDOWS = process.platform === 'win32';
+exports.getSelectedOneofValue = exports.clearOneofValue = exports.setUnknownOneofValue = exports.setOneofValue = exports.getOneofValue = exports.isOneofGroup = void 0;
/**
- * Given an array of patterns, returns an array of paths to search.
- * Duplicates and paths under other included paths are filtered out.
+ * Is the given value a valid oneof group?
+ *
+ * We represent protobuf `oneof` as algebraic data types (ADT) in generated
+ * code. But when working with messages of unknown type, the ADT does not
+ * help us.
+ *
+ * This type guard checks if the given object adheres to the ADT rules, which
+ * are as follows:
+ *
+ * 1) Must be an object.
+ *
+ * 2) Must have a "oneofKind" discriminator property.
+ *
+ * 3) If "oneofKind" is `undefined`, no member field is selected. The object
+ * must not have any other properties.
+ *
+ * 4) If "oneofKind" is a `string`, the member field with this name is
+ * selected.
+ *
+ * 5) If a member field is selected, the object must have a second property
+ * with this name. The property must not be `undefined`.
+ *
+ * 6) No extra properties are allowed. The object has either one property
+ * (no selection) or two properties (selection).
+ *
*/
-function getSearchPaths(patterns) {
- // Ignore negate patterns
- patterns = patterns.filter(x => !x.negate);
- // Create a map of all search paths
- const searchPathMap = {};
- for (const pattern of patterns) {
- const key = IS_WINDOWS
- ? pattern.searchPath.toUpperCase()
- : pattern.searchPath;
- searchPathMap[key] = 'candidate';
+function isOneofGroup(any) {
+ if (typeof any != 'object' || any === null || !any.hasOwnProperty('oneofKind')) {
+ return false;
}
- const result = [];
- for (const pattern of patterns) {
- // Check if already included
- const key = IS_WINDOWS
- ? pattern.searchPath.toUpperCase()
- : pattern.searchPath;
- if (searchPathMap[key] === 'included') {
- continue;
- }
- // Check for an ancestor search path
- let foundAncestor = false;
- let tempKey = key;
- let parent = pathHelper.dirname(tempKey);
- while (parent !== tempKey) {
- if (searchPathMap[parent]) {
- foundAncestor = true;
- break;
- }
- tempKey = parent;
- parent = pathHelper.dirname(tempKey);
- }
- // Include the search pattern in the result
- if (!foundAncestor) {
- result.push(pattern.searchPath);
- searchPathMap[key] = 'included';
- }
+ switch (typeof any.oneofKind) {
+ case "string":
+ if (any[any.oneofKind] === undefined)
+ return false;
+ return Object.keys(any).length == 2;
+ case "undefined":
+ return Object.keys(any).length == 1;
+ default:
+ return false;
}
- return result;
}
-exports.getSearchPaths = getSearchPaths;
+exports.isOneofGroup = isOneofGroup;
/**
- * Matches the patterns against the path
+ * Returns the value of the given field in a oneof group.
*/
-function match(patterns, itemPath) {
- let result = internal_match_kind_1.MatchKind.None;
- for (const pattern of patterns) {
- if (pattern.negate) {
- result &= ~pattern.match(itemPath);
- }
- else {
- result |= pattern.match(itemPath);
- }
+function getOneofValue(oneof, kind) {
+ return oneof[kind];
+}
+exports.getOneofValue = getOneofValue;
+function setOneofValue(oneof, kind, value) {
+ if (oneof.oneofKind !== undefined) {
+ delete oneof[oneof.oneofKind];
+ }
+ oneof.oneofKind = kind;
+ if (value !== undefined) {
+ oneof[kind] = value;
}
- return result;
}
-exports.match = match;
+exports.setOneofValue = setOneofValue;
+function setUnknownOneofValue(oneof, kind, value) {
+ if (oneof.oneofKind !== undefined) {
+ delete oneof[oneof.oneofKind];
+ }
+ oneof.oneofKind = kind;
+ if (value !== undefined && kind !== undefined) {
+ oneof[kind] = value;
+ }
+}
+exports.setUnknownOneofValue = setUnknownOneofValue;
/**
- * Checks whether to descend further into the directory
+ * Removes the selected field in a oneof group.
+ *
+ * Note that the recommended way to modify a oneof group is to set
+ * a new object:
+ *
+ * ```ts
+ * message.result = { oneofKind: undefined };
+ * ```
*/
-function partialMatch(patterns, itemPath) {
- return patterns.some(x => !x.negate && x.partialMatch(itemPath));
+function clearOneofValue(oneof) {
+ if (oneof.oneofKind !== undefined) {
+ delete oneof[oneof.oneofKind];
+ }
+ oneof.oneofKind = undefined;
}
-exports.partialMatch = partialMatch;
-//# sourceMappingURL=internal-pattern-helper.js.map
+exports.clearOneofValue = clearOneofValue;
+/**
+ * Returns the selected value of the given oneof group.
+ *
+ * Not that the recommended way to access a oneof group is to check
+ * the "oneofKind" property and let TypeScript narrow down the union
+ * type for you:
+ *
+ * ```ts
+ * if (message.result.oneofKind === "error") {
+ * message.result.error; // string
+ * }
+ * ```
+ *
+ * In the rare case you just need the value, and do not care about
+ * which protobuf field is selected, you can use this function
+ * for convenience.
+ */
+function getSelectedOneofValue(oneof) {
+ if (oneof.oneofKind === undefined) {
+ return undefined;
+ }
+ return oneof[oneof.oneofKind];
+}
+exports.getSelectedOneofValue = getSelectedOneofValue;
+
/***/ }),
-/***/ 64536:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 1753:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.Pattern = void 0;
-const os = __importStar(__nccwpck_require__(22037));
-const path = __importStar(__nccwpck_require__(71017));
-const pathHelper = __importStar(__nccwpck_require__(1849));
-const assert_1 = __importDefault(__nccwpck_require__(39491));
-const minimatch_1 = __nccwpck_require__(92680);
-const internal_match_kind_1 = __nccwpck_require__(81063);
-const internal_path_1 = __nccwpck_require__(96836);
-const IS_WINDOWS = process.platform === 'win32';
-class Pattern {
- constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) {
- /**
- * Indicates whether matches should be excluded from the result set
- */
- this.negate = false;
- // Pattern overload
- let pattern;
- if (typeof patternOrNegate === 'string') {
- pattern = patternOrNegate.trim();
- }
- // Segments overload
- else {
- // Convert to pattern
- segments = segments || [];
- (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`);
- const root = Pattern.getLiteral(segments[0]);
- (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);
- pattern = new internal_path_1.Path(segments).toString().trim();
- if (patternOrNegate) {
- pattern = `!${pattern}`;
- }
- }
- // Negate
- while (pattern.startsWith('!')) {
- this.negate = !this.negate;
- pattern = pattern.substr(1).trim();
- }
- // Normalize slashes and ensures absolute root
- pattern = Pattern.fixupPattern(pattern, homedir);
- // Segments
- this.segments = new internal_path_1.Path(pattern).segments;
- // Trailing slash indicates the pattern should only match directories, not regular files
- this.trailingSeparator = pathHelper
- .normalizeSeparators(pattern)
- .endsWith(path.sep);
- pattern = pathHelper.safeTrimTrailingSeparator(pattern);
- // Search path (literal path prior to the first glob segment)
- let foundGlob = false;
- const searchSegments = this.segments
- .map(x => Pattern.getLiteral(x))
- .filter(x => !foundGlob && !(foundGlob = x === ''));
- this.searchPath = new internal_path_1.Path(searchSegments).toString();
- // Root RegExp (required when determining partial match)
- this.rootRegExp = new RegExp(Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? 'i' : '');
- this.isImplicitPattern = isImplicitPattern;
- // Create minimatch
- const minimatchOptions = {
- dot: true,
- nobrace: true,
- nocase: IS_WINDOWS,
- nocomment: true,
- noext: true,
- nonegate: true
- };
- pattern = IS_WINDOWS ? pattern.replace(/\\/g, '/') : pattern;
- this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions);
- }
+exports.PbLong = exports.PbULong = exports.detectBi = void 0;
+const goog_varint_1 = __nccwpck_require__(3223);
+let BI;
+function detectBi() {
+ const dv = new DataView(new ArrayBuffer(8));
+ const ok = globalThis.BigInt !== undefined
+ && typeof dv.getBigInt64 === "function"
+ && typeof dv.getBigUint64 === "function"
+ && typeof dv.setBigInt64 === "function"
+ && typeof dv.setBigUint64 === "function";
+ BI = ok ? {
+ MIN: BigInt("-9223372036854775808"),
+ MAX: BigInt("9223372036854775807"),
+ UMIN: BigInt("0"),
+ UMAX: BigInt("18446744073709551615"),
+ C: BigInt,
+ V: dv,
+ } : undefined;
+}
+exports.detectBi = detectBi;
+detectBi();
+function assertBi(bi) {
+ if (!bi)
+ throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support");
+}
+// used to validate from(string) input (when bigint is unavailable)
+const RE_DECIMAL_STR = /^-?[0-9]+$/;
+// constants for binary math
+const TWO_PWR_32_DBL = 0x100000000;
+const HALF_2_PWR_32 = 0x080000000;
+// base class for PbLong and PbULong provides shared code
+class SharedPbLong {
/**
- * Matches the pattern against the specified path
+ * Create a new instance with the given bits.
*/
- match(itemPath) {
- // Last segment is globstar?
- if (this.segments[this.segments.length - 1] === '**') {
- // Normalize slashes
- itemPath = pathHelper.normalizeSeparators(itemPath);
- // Append a trailing slash. Otherwise Minimatch will not match the directory immediately
- // preceding the globstar. For example, given the pattern `/foo/**`, Minimatch returns
- // false for `/foo` but returns true for `/foo/`. Append a trailing slash to handle that quirk.
- if (!itemPath.endsWith(path.sep) && this.isImplicitPattern === false) {
- // Note, this is safe because the constructor ensures the pattern has an absolute root.
- // For example, formats like C: and C:foo on Windows are resolved to an absolute root.
- itemPath = `${itemPath}${path.sep}`;
- }
- }
- else {
- // Normalize slashes and trim unnecessary trailing slash
- itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);
- }
- // Match
- if (this.minimatch.match(itemPath)) {
- return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All;
- }
- return internal_match_kind_1.MatchKind.None;
+ constructor(lo, hi) {
+ this.lo = lo | 0;
+ this.hi = hi | 0;
}
/**
- * Indicates whether the pattern may match descendants of the specified path
+ * Is this instance equal to 0?
*/
- partialMatch(itemPath) {
- // Normalize slashes and trim unnecessary trailing slash
- itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);
- // matchOne does not handle root path correctly
- if (pathHelper.dirname(itemPath) === itemPath) {
- return this.rootRegExp.test(itemPath);
- }
- return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true);
+ isZero() {
+ return this.lo == 0 && this.hi == 0;
}
/**
- * Escapes glob patterns within a path
+ * Convert to a native number.
*/
- static globEscape(s) {
- return (IS_WINDOWS ? s : s.replace(/\\/g, '\\\\')) // escape '\' on Linux/macOS
- .replace(/(\[)(?=[^/]+\])/g, '[[]') // escape '[' when ']' follows within the path segment
- .replace(/\?/g, '[?]') // escape '?'
- .replace(/\*/g, '[*]'); // escape '*'
+ toNumber() {
+ let result = this.hi * TWO_PWR_32_DBL + (this.lo >>> 0);
+ if (!Number.isSafeInteger(result))
+ throw new Error("cannot convert to safe number");
+ return result;
}
+}
+/**
+ * 64-bit unsigned integer as two 32-bit values.
+ * Converts between `string`, `number` and `bigint` representations.
+ */
+class PbULong extends SharedPbLong {
/**
- * Normalizes slashes and ensures absolute root
+ * Create instance from a `string`, `number` or `bigint`.
*/
- static fixupPattern(pattern, homedir) {
- // Empty
- (0, assert_1.default)(pattern, 'pattern cannot be empty');
- // Must not contain `.` segment, unless first segment
- // Must not contain `..` segment
- const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x));
- (0, assert_1.default)(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);
- // Must not contain globs in root, e.g. Windows UNC path \\foo\b*r
- (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);
- // Normalize slashes
- pattern = pathHelper.normalizeSeparators(pattern);
- // Replace leading `.` segment
- if (pattern === '.' || pattern.startsWith(`.${path.sep}`)) {
- pattern = Pattern.globEscape(process.cwd()) + pattern.substr(1);
- }
- // Replace leading `~` segment
- else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) {
- homedir = homedir || os.homedir();
- (0, assert_1.default)(homedir, 'Unable to determine HOME directory');
- (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);
- pattern = Pattern.globEscape(homedir) + pattern.substr(1);
- }
- // Replace relative drive root, e.g. pattern is C: or C:foo
- else if (IS_WINDOWS &&
- (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) {
- let root = pathHelper.ensureAbsoluteRoot('C:\\dummy-root', pattern.substr(0, 2));
- if (pattern.length > 2 && !root.endsWith('\\')) {
- root += '\\';
+ static from(value) {
+ if (BI)
+ // noinspection FallThroughInSwitchStatementJS
+ switch (typeof value) {
+ case "string":
+ if (value == "0")
+ return this.ZERO;
+ if (value == "")
+ throw new Error('string is no integer');
+ value = BI.C(value);
+ case "number":
+ if (value === 0)
+ return this.ZERO;
+ value = BI.C(value);
+ case "bigint":
+ if (!value)
+ return this.ZERO;
+ if (value < BI.UMIN)
+ throw new Error('signed value for ulong');
+ if (value > BI.UMAX)
+ throw new Error('ulong too large');
+ BI.V.setBigUint64(0, value, true);
+ return new PbULong(BI.V.getInt32(0, true), BI.V.getInt32(4, true));
}
- pattern = Pattern.globEscape(root) + pattern.substr(2);
- }
- // Replace relative root, e.g. pattern is \ or \foo
- else if (IS_WINDOWS && (pattern === '\\' || pattern.match(/^\\[^\\]/))) {
- let root = pathHelper.ensureAbsoluteRoot('C:\\dummy-root', '\\');
- if (!root.endsWith('\\')) {
- root += '\\';
+ else
+ switch (typeof value) {
+ case "string":
+ if (value == "0")
+ return this.ZERO;
+ value = value.trim();
+ if (!RE_DECIMAL_STR.test(value))
+ throw new Error('string is no integer');
+ let [minus, lo, hi] = goog_varint_1.int64fromString(value);
+ if (minus)
+ throw new Error('signed value for ulong');
+ return new PbULong(lo, hi);
+ case "number":
+ if (value == 0)
+ return this.ZERO;
+ if (!Number.isSafeInteger(value))
+ throw new Error('number is no integer');
+ if (value < 0)
+ throw new Error('signed value for ulong');
+ return new PbULong(value, value / TWO_PWR_32_DBL);
}
- pattern = Pattern.globEscape(root) + pattern.substr(1);
- }
- // Otherwise ensure absolute root
- else {
- pattern = pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()), pattern);
- }
- return pathHelper.normalizeSeparators(pattern);
+ throw new Error('unknown value ' + typeof value);
}
/**
- * Attempts to unescape a pattern segment to create a literal path segment.
- * Otherwise returns empty string.
+ * Convert to decimal string.
*/
- static getLiteral(segment) {
- let literal = '';
- for (let i = 0; i < segment.length; i++) {
- const c = segment[i];
- // Escape
- if (c === '\\' && !IS_WINDOWS && i + 1 < segment.length) {
- literal += segment[++i];
- continue;
- }
- // Wildcard
- else if (c === '*' || c === '?') {
- return '';
+ toString() {
+ return BI ? this.toBigInt().toString() : goog_varint_1.int64toString(this.lo, this.hi);
+ }
+ /**
+ * Convert to native bigint.
+ */
+ toBigInt() {
+ assertBi(BI);
+ BI.V.setInt32(0, this.lo, true);
+ BI.V.setInt32(4, this.hi, true);
+ return BI.V.getBigUint64(0, true);
+ }
+}
+exports.PbULong = PbULong;
+/**
+ * ulong 0 singleton.
+ */
+PbULong.ZERO = new PbULong(0, 0);
+/**
+ * 64-bit signed integer as two 32-bit values.
+ * Converts between `string`, `number` and `bigint` representations.
+ */
+class PbLong extends SharedPbLong {
+ /**
+ * Create instance from a `string`, `number` or `bigint`.
+ */
+ static from(value) {
+ if (BI)
+ // noinspection FallThroughInSwitchStatementJS
+ switch (typeof value) {
+ case "string":
+ if (value == "0")
+ return this.ZERO;
+ if (value == "")
+ throw new Error('string is no integer');
+ value = BI.C(value);
+ case "number":
+ if (value === 0)
+ return this.ZERO;
+ value = BI.C(value);
+ case "bigint":
+ if (!value)
+ return this.ZERO;
+ if (value < BI.MIN)
+ throw new Error('signed long too small');
+ if (value > BI.MAX)
+ throw new Error('signed long too large');
+ BI.V.setBigInt64(0, value, true);
+ return new PbLong(BI.V.getInt32(0, true), BI.V.getInt32(4, true));
}
- // Character set
- else if (c === '[' && i + 1 < segment.length) {
- let set = '';
- let closed = -1;
- for (let i2 = i + 1; i2 < segment.length; i2++) {
- const c2 = segment[i2];
- // Escape
- if (c2 === '\\' && !IS_WINDOWS && i2 + 1 < segment.length) {
- set += segment[++i2];
- continue;
- }
- // Closed
- else if (c2 === ']') {
- closed = i2;
- break;
- }
- // Otherwise
- else {
- set += c2;
- }
- }
- // Closed?
- if (closed >= 0) {
- // Cannot convert
- if (set.length > 1) {
- return '';
- }
- // Convert to literal
- if (set) {
- literal += set;
- i = closed;
- continue;
+ else
+ switch (typeof value) {
+ case "string":
+ if (value == "0")
+ return this.ZERO;
+ value = value.trim();
+ if (!RE_DECIMAL_STR.test(value))
+ throw new Error('string is no integer');
+ let [minus, lo, hi] = goog_varint_1.int64fromString(value);
+ if (minus) {
+ if (hi > HALF_2_PWR_32 || (hi == HALF_2_PWR_32 && lo != 0))
+ throw new Error('signed long too small');
}
- }
- // Otherwise fall thru
+ else if (hi >= HALF_2_PWR_32)
+ throw new Error('signed long too large');
+ let pbl = new PbLong(lo, hi);
+ return minus ? pbl.negate() : pbl;
+ case "number":
+ if (value == 0)
+ return this.ZERO;
+ if (!Number.isSafeInteger(value))
+ throw new Error('number is no integer');
+ return value > 0
+ ? new PbLong(value, value / TWO_PWR_32_DBL)
+ : new PbLong(-value, -value / TWO_PWR_32_DBL).negate();
}
- // Append
- literal += c;
+ throw new Error('unknown value ' + typeof value);
+ }
+ /**
+ * Do we have a minus sign?
+ */
+ isNegative() {
+ return (this.hi & HALF_2_PWR_32) !== 0;
+ }
+ /**
+ * Negate two's complement.
+ * Invert all the bits and add one to the result.
+ */
+ negate() {
+ let hi = ~this.hi, lo = this.lo;
+ if (lo)
+ lo = ~lo + 1;
+ else
+ hi += 1;
+ return new PbLong(lo, hi);
+ }
+ /**
+ * Convert to decimal string.
+ */
+ toString() {
+ if (BI)
+ return this.toBigInt().toString();
+ if (this.isNegative()) {
+ let n = this.negate();
+ return '-' + goog_varint_1.int64toString(n.lo, n.hi);
}
- return literal;
+ return goog_varint_1.int64toString(this.lo, this.hi);
}
/**
- * Escapes regexp special characters
- * https://javascript.info/regexp-escaping
+ * Convert to native bigint.
*/
- static regExpEscape(s) {
- return s.replace(/[[\\^$.|?*+()]/g, '\\$&');
+ toBigInt() {
+ assertBi(BI);
+ BI.V.setInt32(0, this.lo, true);
+ BI.V.setInt32(4, this.hi, true);
+ return BI.V.getBigInt64(0, true);
}
}
-exports.Pattern = Pattern;
-//# sourceMappingURL=internal-pattern.js.map
+exports.PbLong = PbLong;
+/**
+ * long 0 singleton.
+ */
+PbLong.ZERO = new PbLong(0, 0);
+
/***/ }),
-/***/ 89117:
+/***/ 8950:
/***/ ((__unused_webpack_module, exports) => {
-"use strict";
+// Copyright (c) 2016, Daniel Wirtz All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of its author, nor the names of its contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.SearchState = void 0;
-class SearchState {
- constructor(path, level) {
- this.path = path;
- this.level = level;
+exports.utf8read = void 0;
+const fromCharCodes = (chunk) => String.fromCharCode.apply(String, chunk);
+/**
+ * @deprecated This function will no longer be exported with the next major
+ * release, since protobuf-ts has switch to TextDecoder API. If you need this
+ * function, please migrate to @protobufjs/utf8. For context, see
+ * https://github.com/timostamm/protobuf-ts/issues/184
+ *
+ * Reads UTF8 bytes as a string.
+ *
+ * See [protobufjs / utf8](https://github.com/protobufjs/protobuf.js/blob/9893e35b854621cce64af4bf6be2cff4fb892796/lib/utf8/index.js#L40)
+ *
+ * Copyright (c) 2016, Daniel Wirtz
+ */
+function utf8read(bytes) {
+ if (bytes.length < 1)
+ return "";
+ let pos = 0, // position in bytes
+ parts = [], chunk = [], i = 0, // char offset
+ t; // temporary
+ let len = bytes.length;
+ while (pos < len) {
+ t = bytes[pos++];
+ if (t < 128)
+ chunk[i++] = t;
+ else if (t > 191 && t < 224)
+ chunk[i++] = (t & 31) << 6 | bytes[pos++] & 63;
+ else if (t > 239 && t < 365) {
+ t = ((t & 7) << 18 | (bytes[pos++] & 63) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63) - 0x10000;
+ chunk[i++] = 0xD800 + (t >> 10);
+ chunk[i++] = 0xDC00 + (t & 1023);
+ }
+ else
+ chunk[i++] = (t & 15) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63;
+ if (i > 8191) {
+ parts.push(fromCharCodes(chunk));
+ i = 0;
+ }
+ }
+ if (parts.length) {
+ if (i)
+ parts.push(fromCharCodes(chunk.slice(0, i)));
+ return parts.join("");
}
+ return fromCharCodes(chunk.slice(0, i));
}
-exports.SearchState = SearchState;
-//# sourceMappingURL=internal-search-state.js.map
+exports.utf8read = utf8read;
+
/***/ }),
-/***/ 50688:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 9611:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.issue = exports.issueCommand = void 0;
-const os = __importStar(__nccwpck_require__(22037));
-const utils_1 = __nccwpck_require__(2603);
+exports.ReflectionBinaryReader = void 0;
+const binary_format_contract_1 = __nccwpck_require__(4816);
+const reflection_info_1 = __nccwpck_require__(7910);
+const reflection_long_convert_1 = __nccwpck_require__(3402);
+const reflection_scalar_default_1 = __nccwpck_require__(9526);
/**
- * Commands
- *
- * Command Format:
- * ::name key=value,key=value::message
+ * Reads proto3 messages in binary format using reflection information.
*
- * Examples:
- * ::warning::This is the message
- * ::set-env name=MY_VAR::some value
+ * https://developers.google.com/protocol-buffers/docs/encoding
*/
-function issueCommand(command, properties, message) {
- const cmd = new Command(command, properties, message);
- process.stdout.write(cmd.toString() + os.EOL);
-}
-exports.issueCommand = issueCommand;
-function issue(name, message = '') {
- issueCommand(name, {}, message);
-}
-exports.issue = issue;
-const CMD_STRING = '::';
-class Command {
- constructor(command, properties, message) {
- if (!command) {
- command = 'missing.command';
- }
- this.command = command;
- this.properties = properties;
- this.message = message;
+class ReflectionBinaryReader {
+ constructor(info) {
+ this.info = info;
}
- toString() {
- let cmdStr = CMD_STRING + this.command;
- if (this.properties && Object.keys(this.properties).length > 0) {
- cmdStr += ' ';
- let first = true;
- for (const key in this.properties) {
- if (this.properties.hasOwnProperty(key)) {
- const val = this.properties[key];
- if (val) {
- if (first) {
- first = false;
- }
- else {
- cmdStr += ',';
- }
- cmdStr += `${key}=${escapeProperty(val)}`;
- }
- }
- }
+ prepare() {
+ var _a;
+ if (!this.fieldNoToField) {
+ const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : [];
+ this.fieldNoToField = new Map(fieldsInput.map(field => [field.no, field]));
+ }
+ }
+ /**
+ * Reads a message from binary format into the target message.
+ *
+ * Repeated fields are appended. Map entries are added, overwriting
+ * existing keys.
+ *
+ * If a message field is already present, it will be merged with the
+ * new data.
+ */
+ read(reader, message, options, length) {
+ this.prepare();
+ const end = length === undefined ? reader.len : reader.pos + length;
+ while (reader.pos < end) {
+ // read the tag and find the field
+ const [fieldNo, wireType] = reader.tag(), field = this.fieldNoToField.get(fieldNo);
+ if (!field) {
+ let u = options.readUnknownField;
+ if (u == "throw")
+ throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.info.typeName}`);
+ let d = reader.skip(wireType);
+ if (u !== false)
+ (u === true ? binary_format_contract_1.UnknownFieldHandler.onRead : u)(this.info.typeName, message, fieldNo, wireType, d);
+ continue;
+ }
+ // target object for the field we are reading
+ let target = message, repeated = field.repeat, localName = field.localName;
+ // if field is member of oneof ADT, use ADT as target
+ if (field.oneof) {
+ target = target[field.oneof];
+ // if other oneof member selected, set new ADT
+ if (target.oneofKind !== localName)
+ target = message[field.oneof] = {
+ oneofKind: localName
+ };
+ }
+ // we have handled oneof above, we just have read the value into `target[localName]`
+ switch (field.kind) {
+ case "scalar":
+ case "enum":
+ let T = field.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.T;
+ let L = field.kind == "scalar" ? field.L : undefined;
+ if (repeated) {
+ let arr = target[localName]; // safe to assume presence of array, oneof cannot contain repeated values
+ if (wireType == binary_format_contract_1.WireType.LengthDelimited && T != reflection_info_1.ScalarType.STRING && T != reflection_info_1.ScalarType.BYTES) {
+ let e = reader.uint32() + reader.pos;
+ while (reader.pos < e)
+ arr.push(this.scalar(reader, T, L));
+ }
+ else
+ arr.push(this.scalar(reader, T, L));
+ }
+ else
+ target[localName] = this.scalar(reader, T, L);
+ break;
+ case "message":
+ if (repeated) {
+ let arr = target[localName]; // safe to assume presence of array, oneof cannot contain repeated values
+ let msg = field.T().internalBinaryRead(reader, reader.uint32(), options);
+ arr.push(msg);
+ }
+ else
+ target[localName] = field.T().internalBinaryRead(reader, reader.uint32(), options, target[localName]);
+ break;
+ case "map":
+ let [mapKey, mapVal] = this.mapEntry(field, reader, options);
+ // safe to assume presence of map object, oneof cannot contain repeated values
+ target[localName][mapKey] = mapVal;
+ break;
+ }
+ }
+ }
+ /**
+ * Read a map field, expecting key field = 1, value field = 2
+ */
+ mapEntry(field, reader, options) {
+ let length = reader.uint32();
+ let end = reader.pos + length;
+ let key = undefined; // javascript only allows number or string for object properties
+ let val = undefined;
+ while (reader.pos < end) {
+ let [fieldNo, wireType] = reader.tag();
+ switch (fieldNo) {
+ case 1:
+ if (field.K == reflection_info_1.ScalarType.BOOL)
+ key = reader.bool().toString();
+ else
+ // long types are read as string, number types are okay as number
+ key = this.scalar(reader, field.K, reflection_info_1.LongType.STRING);
+ break;
+ case 2:
+ switch (field.V.kind) {
+ case "scalar":
+ val = this.scalar(reader, field.V.T, field.V.L);
+ break;
+ case "enum":
+ val = reader.int32();
+ break;
+ case "message":
+ val = field.V.T().internalBinaryRead(reader, reader.uint32(), options);
+ break;
+ }
+ break;
+ default:
+ throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) in map entry for ${this.info.typeName}#${field.name}`);
+ }
+ }
+ if (key === undefined) {
+ let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K);
+ key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw;
+ }
+ if (val === undefined)
+ switch (field.V.kind) {
+ case "scalar":
+ val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L);
+ break;
+ case "enum":
+ val = 0;
+ break;
+ case "message":
+ val = field.V.T().create();
+ break;
+ }
+ return [key, val];
+ }
+ scalar(reader, type, longType) {
+ switch (type) {
+ case reflection_info_1.ScalarType.INT32:
+ return reader.int32();
+ case reflection_info_1.ScalarType.STRING:
+ return reader.string();
+ case reflection_info_1.ScalarType.BOOL:
+ return reader.bool();
+ case reflection_info_1.ScalarType.DOUBLE:
+ return reader.double();
+ case reflection_info_1.ScalarType.FLOAT:
+ return reader.float();
+ case reflection_info_1.ScalarType.INT64:
+ return reflection_long_convert_1.reflectionLongConvert(reader.int64(), longType);
+ case reflection_info_1.ScalarType.UINT64:
+ return reflection_long_convert_1.reflectionLongConvert(reader.uint64(), longType);
+ case reflection_info_1.ScalarType.FIXED64:
+ return reflection_long_convert_1.reflectionLongConvert(reader.fixed64(), longType);
+ case reflection_info_1.ScalarType.FIXED32:
+ return reader.fixed32();
+ case reflection_info_1.ScalarType.BYTES:
+ return reader.bytes();
+ case reflection_info_1.ScalarType.UINT32:
+ return reader.uint32();
+ case reflection_info_1.ScalarType.SFIXED32:
+ return reader.sfixed32();
+ case reflection_info_1.ScalarType.SFIXED64:
+ return reflection_long_convert_1.reflectionLongConvert(reader.sfixed64(), longType);
+ case reflection_info_1.ScalarType.SINT32:
+ return reader.sint32();
+ case reflection_info_1.ScalarType.SINT64:
+ return reflection_long_convert_1.reflectionLongConvert(reader.sint64(), longType);
}
- cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
- return cmdStr;
}
}
-function escapeData(s) {
- return (0, utils_1.toCommandValue)(s)
- .replace(/%/g, '%25')
- .replace(/\r/g, '%0D')
- .replace(/\n/g, '%0A');
-}
-function escapeProperty(s) {
- return (0, utils_1.toCommandValue)(s)
- .replace(/%/g, '%25')
- .replace(/\r/g, '%0D')
- .replace(/\n/g, '%0A')
- .replace(/:/g, '%3A')
- .replace(/,/g, '%2C');
-}
-//# sourceMappingURL=command.js.map
+exports.ReflectionBinaryReader = ReflectionBinaryReader;
+
/***/ }),
-/***/ 51967:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 6907:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
-const command_1 = __nccwpck_require__(50688);
-const file_command_1 = __nccwpck_require__(24609);
-const utils_1 = __nccwpck_require__(2603);
-const os = __importStar(__nccwpck_require__(22037));
-const path = __importStar(__nccwpck_require__(71017));
-const oidc_utils_1 = __nccwpck_require__(31030);
+exports.ReflectionBinaryWriter = void 0;
+const binary_format_contract_1 = __nccwpck_require__(4816);
+const reflection_info_1 = __nccwpck_require__(7910);
+const assert_1 = __nccwpck_require__(8602);
+const pb_long_1 = __nccwpck_require__(1753);
/**
- * The code to exit an action
+ * Writes proto3 messages in binary format using reflection information.
+ *
+ * https://developers.google.com/protocol-buffers/docs/encoding
*/
-var ExitCode;
-(function (ExitCode) {
+class ReflectionBinaryWriter {
+ constructor(info) {
+ this.info = info;
+ }
+ prepare() {
+ if (!this.fields) {
+ const fieldsInput = this.info.fields ? this.info.fields.concat() : [];
+ this.fields = fieldsInput.sort((a, b) => a.no - b.no);
+ }
+ }
/**
- * A code indicating that the action was successful
+ * Writes the message to binary format.
*/
- ExitCode[ExitCode["Success"] = 0] = "Success";
+ write(message, writer, options) {
+ this.prepare();
+ for (const field of this.fields) {
+ let value, // this will be our field value, whether it is member of a oneof or not
+ emitDefault, // whether we emit the default value (only true for oneof members)
+ repeated = field.repeat, localName = field.localName;
+ // handle oneof ADT
+ if (field.oneof) {
+ const group = message[field.oneof];
+ if (group.oneofKind !== localName)
+ continue; // if field is not selected, skip
+ value = group[localName];
+ emitDefault = true;
+ }
+ else {
+ value = message[localName];
+ emitDefault = false;
+ }
+ // we have handled oneof above. we just have to honor `emitDefault`.
+ switch (field.kind) {
+ case "scalar":
+ case "enum":
+ let T = field.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.T;
+ if (repeated) {
+ assert_1.assert(Array.isArray(value));
+ if (repeated == reflection_info_1.RepeatType.PACKED)
+ this.packed(writer, T, field.no, value);
+ else
+ for (const item of value)
+ this.scalar(writer, T, field.no, item, true);
+ }
+ else if (value === undefined)
+ assert_1.assert(field.opt);
+ else
+ this.scalar(writer, T, field.no, value, emitDefault || field.opt);
+ break;
+ case "message":
+ if (repeated) {
+ assert_1.assert(Array.isArray(value));
+ for (const item of value)
+ this.message(writer, options, field.T(), field.no, item);
+ }
+ else {
+ this.message(writer, options, field.T(), field.no, value);
+ }
+ break;
+ case "map":
+ assert_1.assert(typeof value == 'object' && value !== null);
+ for (const [key, val] of Object.entries(value))
+ this.mapEntry(writer, options, field, key, val);
+ break;
+ }
+ }
+ let u = options.writeUnknownFields;
+ if (u !== false)
+ (u === true ? binary_format_contract_1.UnknownFieldHandler.onWrite : u)(this.info.typeName, message, writer);
+ }
+ mapEntry(writer, options, field, key, value) {
+ writer.tag(field.no, binary_format_contract_1.WireType.LengthDelimited);
+ writer.fork();
+ // javascript only allows number or string for object properties
+ // we convert from our representation to the protobuf type
+ let keyValue = key;
+ switch (field.K) {
+ case reflection_info_1.ScalarType.INT32:
+ case reflection_info_1.ScalarType.FIXED32:
+ case reflection_info_1.ScalarType.UINT32:
+ case reflection_info_1.ScalarType.SFIXED32:
+ case reflection_info_1.ScalarType.SINT32:
+ keyValue = Number.parseInt(key);
+ break;
+ case reflection_info_1.ScalarType.BOOL:
+ assert_1.assert(key == 'true' || key == 'false');
+ keyValue = key == 'true';
+ break;
+ }
+ // write key, expecting key field number = 1
+ this.scalar(writer, field.K, 1, keyValue, true);
+ // write value, expecting value field number = 2
+ switch (field.V.kind) {
+ case 'scalar':
+ this.scalar(writer, field.V.T, 2, value, true);
+ break;
+ case 'enum':
+ this.scalar(writer, reflection_info_1.ScalarType.INT32, 2, value, true);
+ break;
+ case 'message':
+ this.message(writer, options, field.V.T(), 2, value);
+ break;
+ }
+ writer.join();
+ }
+ message(writer, options, handler, fieldNo, value) {
+ if (value === undefined)
+ return;
+ handler.internalBinaryWrite(value, writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited).fork(), options);
+ writer.join();
+ }
/**
- * A code indicating that the action was a failure
+ * Write a single scalar value.
*/
- ExitCode[ExitCode["Failure"] = 1] = "Failure";
-})(ExitCode || (exports.ExitCode = ExitCode = {}));
-//-----------------------------------------------------------------------
-// Variables
-//-----------------------------------------------------------------------
-/**
- * Sets env variable for this action and future actions in the job
- * @param name the name of the variable to set
- * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify
- */
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-function exportVariable(name, val) {
- const convertedVal = (0, utils_1.toCommandValue)(val);
- process.env[name] = convertedVal;
- const filePath = process.env['GITHUB_ENV'] || '';
- if (filePath) {
- return (0, file_command_1.issueFileCommand)('ENV', (0, file_command_1.prepareKeyValueMessage)(name, val));
+ scalar(writer, type, fieldNo, value, emitDefault) {
+ let [wireType, method, isDefault] = this.scalarInfo(type, value);
+ if (!isDefault || emitDefault) {
+ writer.tag(fieldNo, wireType);
+ writer[method](value);
+ }
}
- (0, command_1.issueCommand)('set-env', { name }, convertedVal);
-}
-exports.exportVariable = exportVariable;
-/**
- * Registers a secret which will get masked from logs
- * @param secret value of the secret
- */
-function setSecret(secret) {
- (0, command_1.issueCommand)('add-mask', {}, secret);
-}
-exports.setSecret = setSecret;
-/**
- * Prepends inputPath to the PATH (for this action and future actions)
- * @param inputPath
- */
-function addPath(inputPath) {
- const filePath = process.env['GITHUB_PATH'] || '';
- if (filePath) {
- (0, file_command_1.issueFileCommand)('PATH', inputPath);
+ /**
+ * Write an array of scalar values in packed format.
+ */
+ packed(writer, type, fieldNo, value) {
+ if (!value.length)
+ return;
+ assert_1.assert(type !== reflection_info_1.ScalarType.BYTES && type !== reflection_info_1.ScalarType.STRING);
+ // write tag
+ writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited);
+ // begin length-delimited
+ writer.fork();
+ // write values without tags
+ let [, method,] = this.scalarInfo(type);
+ for (let i = 0; i < value.length; i++)
+ writer[method](value[i]);
+ // end length delimited
+ writer.join();
}
- else {
- (0, command_1.issueCommand)('add-path', {}, inputPath);
+ /**
+ * Get information for writing a scalar value.
+ *
+ * Returns tuple:
+ * [0]: appropriate WireType
+ * [1]: name of the appropriate method of IBinaryWriter
+ * [2]: whether the given value is a default value
+ *
+ * If argument `value` is omitted, [2] is always false.
+ */
+ scalarInfo(type, value) {
+ let t = binary_format_contract_1.WireType.Varint;
+ let m;
+ let i = value === undefined;
+ let d = value === 0;
+ switch (type) {
+ case reflection_info_1.ScalarType.INT32:
+ m = "int32";
+ break;
+ case reflection_info_1.ScalarType.STRING:
+ d = i || !value.length;
+ t = binary_format_contract_1.WireType.LengthDelimited;
+ m = "string";
+ break;
+ case reflection_info_1.ScalarType.BOOL:
+ d = value === false;
+ m = "bool";
+ break;
+ case reflection_info_1.ScalarType.UINT32:
+ m = "uint32";
+ break;
+ case reflection_info_1.ScalarType.DOUBLE:
+ t = binary_format_contract_1.WireType.Bit64;
+ m = "double";
+ break;
+ case reflection_info_1.ScalarType.FLOAT:
+ t = binary_format_contract_1.WireType.Bit32;
+ m = "float";
+ break;
+ case reflection_info_1.ScalarType.INT64:
+ d = i || pb_long_1.PbLong.from(value).isZero();
+ m = "int64";
+ break;
+ case reflection_info_1.ScalarType.UINT64:
+ d = i || pb_long_1.PbULong.from(value).isZero();
+ m = "uint64";
+ break;
+ case reflection_info_1.ScalarType.FIXED64:
+ d = i || pb_long_1.PbULong.from(value).isZero();
+ t = binary_format_contract_1.WireType.Bit64;
+ m = "fixed64";
+ break;
+ case reflection_info_1.ScalarType.BYTES:
+ d = i || !value.byteLength;
+ t = binary_format_contract_1.WireType.LengthDelimited;
+ m = "bytes";
+ break;
+ case reflection_info_1.ScalarType.FIXED32:
+ t = binary_format_contract_1.WireType.Bit32;
+ m = "fixed32";
+ break;
+ case reflection_info_1.ScalarType.SFIXED32:
+ t = binary_format_contract_1.WireType.Bit32;
+ m = "sfixed32";
+ break;
+ case reflection_info_1.ScalarType.SFIXED64:
+ d = i || pb_long_1.PbLong.from(value).isZero();
+ t = binary_format_contract_1.WireType.Bit64;
+ m = "sfixed64";
+ break;
+ case reflection_info_1.ScalarType.SINT32:
+ m = "sint32";
+ break;
+ case reflection_info_1.ScalarType.SINT64:
+ d = i || pb_long_1.PbLong.from(value).isZero();
+ m = "sint64";
+ break;
+ }
+ return [t, m, i || d];
}
- process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
}
-exports.addPath = addPath;
+exports.ReflectionBinaryWriter = ReflectionBinaryWriter;
+
+
+/***/ }),
+
+/***/ 9946:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.containsMessageType = void 0;
+const message_type_contract_1 = __nccwpck_require__(3785);
/**
- * Gets the value of an input.
- * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
- * Returns an empty string if the value is not defined.
+ * Check if the provided object is a proto message.
*
- * @param name name of the input to get
- * @param options optional. See InputOptions.
- * @returns string
+ * Note that this is an experimental feature - it is here to stay, but
+ * implementation details may change without notice.
*/
-function getInput(name, options) {
- const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';
- if (options && options.required && !val) {
- throw new Error(`Input required and not supplied: ${name}`);
- }
- if (options && options.trimWhitespace === false) {
- return val;
- }
- return val.trim();
+function containsMessageType(msg) {
+ return msg[message_type_contract_1.MESSAGE_TYPE] != null;
}
-exports.getInput = getInput;
+exports.containsMessageType = containsMessageType;
+
+
+/***/ }),
+
+/***/ 5726:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.reflectionCreate = void 0;
+const reflection_scalar_default_1 = __nccwpck_require__(9526);
+const message_type_contract_1 = __nccwpck_require__(3785);
/**
- * Gets the values of an multiline input. Each value is also trimmed.
- *
- * @param name name of the input to get
- * @param options optional. See InputOptions.
- * @returns string[]
- *
+ * Creates an instance of the generic message, using the field
+ * information.
*/
-function getMultilineInput(name, options) {
- const inputs = getInput(name, options)
- .split('\n')
- .filter(x => x !== '');
- if (options && options.trimWhitespace === false) {
- return inputs;
+function reflectionCreate(type) {
+ /**
+ * This ternary can be removed in the next major version.
+ * The `Object.create()` code path utilizes a new `messagePrototype`
+ * property on the `IMessageType` which has this same `MESSAGE_TYPE`
+ * non-enumerable property on it. Doing it this way means that we only
+ * pay the cost of `Object.defineProperty()` once per `IMessageType`
+ * class of once per "instance". The falsy code path is only provided
+ * for backwards compatibility in cases where the runtime library is
+ * updated without also updating the generated code.
+ */
+ const msg = type.messagePrototype
+ ? Object.create(type.messagePrototype)
+ : Object.defineProperty({}, message_type_contract_1.MESSAGE_TYPE, { value: type });
+ for (let field of type.fields) {
+ let name = field.localName;
+ if (field.opt)
+ continue;
+ if (field.oneof)
+ msg[field.oneof] = { oneofKind: undefined };
+ else if (field.repeat)
+ msg[name] = [];
+ else
+ switch (field.kind) {
+ case "scalar":
+ msg[name] = reflection_scalar_default_1.reflectionScalarDefault(field.T, field.L);
+ break;
+ case "enum":
+ // we require 0 to be default value for all enums
+ msg[name] = 0;
+ break;
+ case "map":
+ msg[name] = {};
+ break;
+ }
}
- return inputs.map(input => input.trim());
+ return msg;
}
-exports.getMultilineInput = getMultilineInput;
+exports.reflectionCreate = reflectionCreate;
+
+
+/***/ }),
+
+/***/ 4827:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.reflectionEquals = void 0;
+const reflection_info_1 = __nccwpck_require__(7910);
/**
- * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
- * Support boolean input list: `true | True | TRUE | false | False | FALSE` .
- * The return value is also in boolean type.
- * ref: https://yaml.org/spec/1.2/spec.html#id2804923
- *
- * @param name name of the input to get
- * @param options optional. See InputOptions.
- * @returns boolean
+ * Determines whether two message of the same type have the same field values.
+ * Checks for deep equality, traversing repeated fields, oneof groups, maps
+ * and messages recursively.
+ * Will also return true if both messages are `undefined`.
*/
-function getBooleanInput(name, options) {
- const trueValue = ['true', 'True', 'TRUE'];
- const falseValue = ['false', 'False', 'FALSE'];
- const val = getInput(name, options);
- if (trueValue.includes(val))
+function reflectionEquals(info, a, b) {
+ if (a === b)
return true;
- if (falseValue.includes(val))
+ if (!a || !b)
return false;
- throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` +
- `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
-}
-exports.getBooleanInput = getBooleanInput;
-/**
- * Sets the value of an output.
- *
- * @param name name of the output to set
- * @param value value to store. Non-string values will be converted to a string via JSON.stringify
- */
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-function setOutput(name, value) {
- const filePath = process.env['GITHUB_OUTPUT'] || '';
- if (filePath) {
- return (0, file_command_1.issueFileCommand)('OUTPUT', (0, file_command_1.prepareKeyValueMessage)(name, value));
+ for (let field of info.fields) {
+ let localName = field.localName;
+ let val_a = field.oneof ? a[field.oneof][localName] : a[localName];
+ let val_b = field.oneof ? b[field.oneof][localName] : b[localName];
+ switch (field.kind) {
+ case "enum":
+ case "scalar":
+ let t = field.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.T;
+ if (!(field.repeat
+ ? repeatedPrimitiveEq(t, val_a, val_b)
+ : primitiveEq(t, val_a, val_b)))
+ return false;
+ break;
+ case "map":
+ if (!(field.V.kind == "message"
+ ? repeatedMsgEq(field.V.T(), objectValues(val_a), objectValues(val_b))
+ : repeatedPrimitiveEq(field.V.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.V.T, objectValues(val_a), objectValues(val_b))))
+ return false;
+ break;
+ case "message":
+ let T = field.T();
+ if (!(field.repeat
+ ? repeatedMsgEq(T, val_a, val_b)
+ : T.equals(val_a, val_b)))
+ return false;
+ break;
+ }
}
- process.stdout.write(os.EOL);
- (0, command_1.issueCommand)('set-output', { name }, (0, utils_1.toCommandValue)(value));
-}
-exports.setOutput = setOutput;
-/**
- * Enables or disables the echoing of commands into stdout for the rest of the step.
- * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.
- *
- */
-function setCommandEcho(enabled) {
- (0, command_1.issue)('echo', enabled ? 'on' : 'off');
-}
-exports.setCommandEcho = setCommandEcho;
-//-----------------------------------------------------------------------
-// Results
-//-----------------------------------------------------------------------
-/**
- * Sets the action status to failed.
- * When the action exits it will be with an exit code of 1
- * @param message add error issue message
- */
-function setFailed(message) {
- process.exitCode = ExitCode.Failure;
- error(message);
-}
-exports.setFailed = setFailed;
-//-----------------------------------------------------------------------
-// Logging Commands
-//-----------------------------------------------------------------------
-/**
- * Gets whether Actions Step Debug is on or not
- */
-function isDebug() {
- return process.env['RUNNER_DEBUG'] === '1';
-}
-exports.isDebug = isDebug;
-/**
- * Writes debug message to user log
- * @param message debug message
- */
-function debug(message) {
- (0, command_1.issueCommand)('debug', {}, message);
+ return true;
}
-exports.debug = debug;
-/**
- * Adds an error issue
- * @param message error issue message. Errors will be converted to string via toString()
- * @param properties optional properties to add to the annotation.
- */
-function error(message, properties = {}) {
- (0, command_1.issueCommand)('error', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
+exports.reflectionEquals = reflectionEquals;
+const objectValues = Object.values;
+function primitiveEq(type, a, b) {
+ if (a === b)
+ return true;
+ if (type !== reflection_info_1.ScalarType.BYTES)
+ return false;
+ let ba = a;
+ let bb = b;
+ if (ba.length !== bb.length)
+ return false;
+ for (let i = 0; i < ba.length; i++)
+ if (ba[i] != bb[i])
+ return false;
+ return true;
}
-exports.error = error;
-/**
- * Adds a warning issue
- * @param message warning issue message. Errors will be converted to string via toString()
- * @param properties optional properties to add to the annotation.
- */
-function warning(message, properties = {}) {
- (0, command_1.issueCommand)('warning', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
+function repeatedPrimitiveEq(type, a, b) {
+ if (a.length !== b.length)
+ return false;
+ for (let i = 0; i < a.length; i++)
+ if (!primitiveEq(type, a[i], b[i]))
+ return false;
+ return true;
}
-exports.warning = warning;
-/**
- * Adds a notice issue
- * @param message notice issue message. Errors will be converted to string via toString()
- * @param properties optional properties to add to the annotation.
- */
-function notice(message, properties = {}) {
- (0, command_1.issueCommand)('notice', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
+function repeatedMsgEq(type, a, b) {
+ if (a.length !== b.length)
+ return false;
+ for (let i = 0; i < a.length; i++)
+ if (!type.equals(a[i], b[i]))
+ return false;
+ return true;
}
-exports.notice = notice;
+
+
+/***/ }),
+
+/***/ 7910:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.readMessageOption = exports.readFieldOption = exports.readFieldOptions = exports.normalizeFieldInfo = exports.RepeatType = exports.LongType = exports.ScalarType = void 0;
+const lower_camel_case_1 = __nccwpck_require__(4073);
/**
- * Writes info to log with console.log.
- * @param message info message
+ * Scalar value types. This is a subset of field types declared by protobuf
+ * enum google.protobuf.FieldDescriptorProto.Type The types GROUP and MESSAGE
+ * are omitted, but the numerical values are identical.
*/
-function info(message) {
- process.stdout.write(message + os.EOL);
-}
-exports.info = info;
+var ScalarType;
+(function (ScalarType) {
+ // 0 is reserved for errors.
+ // Order is weird for historical reasons.
+ ScalarType[ScalarType["DOUBLE"] = 1] = "DOUBLE";
+ ScalarType[ScalarType["FLOAT"] = 2] = "FLOAT";
+ // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
+ // negative values are likely.
+ ScalarType[ScalarType["INT64"] = 3] = "INT64";
+ ScalarType[ScalarType["UINT64"] = 4] = "UINT64";
+ // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
+ // negative values are likely.
+ ScalarType[ScalarType["INT32"] = 5] = "INT32";
+ ScalarType[ScalarType["FIXED64"] = 6] = "FIXED64";
+ ScalarType[ScalarType["FIXED32"] = 7] = "FIXED32";
+ ScalarType[ScalarType["BOOL"] = 8] = "BOOL";
+ ScalarType[ScalarType["STRING"] = 9] = "STRING";
+ // Tag-delimited aggregate.
+ // Group type is deprecated and not supported in proto3. However, Proto3
+ // implementations should still be able to parse the group wire format and
+ // treat group fields as unknown fields.
+ // TYPE_GROUP = 10,
+ // TYPE_MESSAGE = 11, // Length-delimited aggregate.
+ // New in version 2.
+ ScalarType[ScalarType["BYTES"] = 12] = "BYTES";
+ ScalarType[ScalarType["UINT32"] = 13] = "UINT32";
+ // TYPE_ENUM = 14,
+ ScalarType[ScalarType["SFIXED32"] = 15] = "SFIXED32";
+ ScalarType[ScalarType["SFIXED64"] = 16] = "SFIXED64";
+ ScalarType[ScalarType["SINT32"] = 17] = "SINT32";
+ ScalarType[ScalarType["SINT64"] = 18] = "SINT64";
+})(ScalarType = exports.ScalarType || (exports.ScalarType = {}));
/**
- * Begin an output group.
+ * JavaScript representation of 64 bit integral types. Equivalent to the
+ * field option "jstype".
*
- * Output until the next `groupEnd` will be foldable in this group
+ * By default, protobuf-ts represents 64 bit types as `bigint`.
*
- * @param name The name of the output group
- */
-function startGroup(name) {
- (0, command_1.issue)('group', name);
-}
-exports.startGroup = startGroup;
-/**
- * End an output group.
+ * You can change the default behaviour by enabling the plugin parameter
+ * `long_type_string`, which will represent 64 bit types as `string`.
+ *
+ * Alternatively, you can change the behaviour for individual fields
+ * with the field option "jstype":
+ *
+ * ```protobuf
+ * uint64 my_field = 1 [jstype = JS_STRING];
+ * uint64 other_field = 2 [jstype = JS_NUMBER];
+ * ```
*/
-function endGroup() {
- (0, command_1.issue)('endgroup');
-}
-exports.endGroup = endGroup;
+var LongType;
+(function (LongType) {
+ /**
+ * Use JavaScript `bigint`.
+ *
+ * Field option `[jstype = JS_NORMAL]`.
+ */
+ LongType[LongType["BIGINT"] = 0] = "BIGINT";
+ /**
+ * Use JavaScript `string`.
+ *
+ * Field option `[jstype = JS_STRING]`.
+ */
+ LongType[LongType["STRING"] = 1] = "STRING";
+ /**
+ * Use JavaScript `number`.
+ *
+ * Large values will loose precision.
+ *
+ * Field option `[jstype = JS_NUMBER]`.
+ */
+ LongType[LongType["NUMBER"] = 2] = "NUMBER";
+})(LongType = exports.LongType || (exports.LongType = {}));
/**
- * Wrap an asynchronous function call in a group.
+ * Protobuf 2.1.0 introduced packed repeated fields.
+ * Setting the field option `[packed = true]` enables packing.
*
- * Returns the same type as the function itself.
+ * In proto3, all repeated fields are packed by default.
+ * Setting the field option `[packed = false]` disables packing.
*
- * @param name The name of the group
- * @param fn The function to wrap in the group
+ * Packed repeated fields are encoded with a single tag,
+ * then a length-delimiter, then the element values.
+ *
+ * Unpacked repeated fields are encoded with a tag and
+ * value for each element.
+ *
+ * `bytes` and `string` cannot be packed.
*/
-function group(name, fn) {
- return __awaiter(this, void 0, void 0, function* () {
- startGroup(name);
- let result;
- try {
- result = yield fn();
- }
- finally {
- endGroup();
- }
- return result;
- });
-}
-exports.group = group;
-//-----------------------------------------------------------------------
-// Wrapper action state
-//-----------------------------------------------------------------------
+var RepeatType;
+(function (RepeatType) {
+ /**
+ * The field is not repeated.
+ */
+ RepeatType[RepeatType["NO"] = 0] = "NO";
+ /**
+ * The field is repeated and should be packed.
+ * Invalid for `bytes` and `string`, they cannot be packed.
+ */
+ RepeatType[RepeatType["PACKED"] = 1] = "PACKED";
+ /**
+ * The field is repeated but should not be packed.
+ * The only valid repeat type for repeated `bytes` and `string`.
+ */
+ RepeatType[RepeatType["UNPACKED"] = 2] = "UNPACKED";
+})(RepeatType = exports.RepeatType || (exports.RepeatType = {}));
/**
- * Saves state for current action, the state can only be retrieved by this action's post job execution.
- *
- * @param name name of the state to store
- * @param value value to store. Non-string values will be converted to a string via JSON.stringify
+ * Turns PartialFieldInfo into FieldInfo.
*/
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-function saveState(name, value) {
- const filePath = process.env['GITHUB_STATE'] || '';
- if (filePath) {
- return (0, file_command_1.issueFileCommand)('STATE', (0, file_command_1.prepareKeyValueMessage)(name, value));
- }
- (0, command_1.issueCommand)('save-state', { name }, (0, utils_1.toCommandValue)(value));
+function normalizeFieldInfo(field) {
+ var _a, _b, _c, _d;
+ field.localName = (_a = field.localName) !== null && _a !== void 0 ? _a : lower_camel_case_1.lowerCamelCase(field.name);
+ field.jsonName = (_b = field.jsonName) !== null && _b !== void 0 ? _b : lower_camel_case_1.lowerCamelCase(field.name);
+ field.repeat = (_c = field.repeat) !== null && _c !== void 0 ? _c : RepeatType.NO;
+ field.opt = (_d = field.opt) !== null && _d !== void 0 ? _d : (field.repeat ? false : field.oneof ? false : field.kind == "message");
+ return field;
}
-exports.saveState = saveState;
+exports.normalizeFieldInfo = normalizeFieldInfo;
/**
- * Gets the value of an state set by this action's main execution.
+ * Read custom field options from a generated message type.
*
- * @param name name of the state to get
- * @returns string
+ * @deprecated use readFieldOption()
*/
-function getState(name) {
- return process.env[`STATE_${name}`] || '';
-}
-exports.getState = getState;
-function getIDToken(aud) {
- return __awaiter(this, void 0, void 0, function* () {
- return yield oidc_utils_1.OidcClient.getIDToken(aud);
- });
+function readFieldOptions(messageType, fieldName, extensionName, extensionType) {
+ var _a;
+ const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options;
+ return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : undefined;
}
-exports.getIDToken = getIDToken;
-/**
- * Summary exports
- */
-var summary_1 = __nccwpck_require__(72377);
-Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } }));
-/**
- * @deprecated use core.summary
- */
-var summary_2 = __nccwpck_require__(72377);
-Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } }));
-/**
- * Path exports
- */
-var path_utils_1 = __nccwpck_require__(80312);
-Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } }));
-Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } }));
-Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }));
-/**
- * Platform utilities exports
- */
-exports.platform = __importStar(__nccwpck_require__(13351));
-//# sourceMappingURL=core.js.map
-
-/***/ }),
-
-/***/ 24609:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
-
-// For internal use, subject to change.
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.prepareKeyValueMessage = exports.issueFileCommand = void 0;
-// We use any as a valid input type
-/* eslint-disable @typescript-eslint/no-explicit-any */
-const crypto = __importStar(__nccwpck_require__(6113));
-const fs = __importStar(__nccwpck_require__(57147));
-const os = __importStar(__nccwpck_require__(22037));
-const utils_1 = __nccwpck_require__(2603);
-function issueFileCommand(command, message) {
- const filePath = process.env[`GITHUB_${command}`];
- if (!filePath) {
- throw new Error(`Unable to find environment variable for file command ${command}`);
+exports.readFieldOptions = readFieldOptions;
+function readFieldOption(messageType, fieldName, extensionName, extensionType) {
+ var _a;
+ const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options;
+ if (!options) {
+ return undefined;
}
- if (!fs.existsSync(filePath)) {
- throw new Error(`Missing file at path: ${filePath}`);
+ const optionVal = options[extensionName];
+ if (optionVal === undefined) {
+ return optionVal;
}
- fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, {
- encoding: 'utf8'
- });
+ return extensionType ? extensionType.fromJson(optionVal) : optionVal;
}
-exports.issueFileCommand = issueFileCommand;
-function prepareKeyValueMessage(key, value) {
- const delimiter = `ghadelimiter_${crypto.randomUUID()}`;
- const convertedValue = (0, utils_1.toCommandValue)(value);
- // These should realistically never happen, but just in case someone finds a
- // way to exploit uuid generation let's not allow keys or values that contain
- // the delimiter.
- if (key.includes(delimiter)) {
- throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
- }
- if (convertedValue.includes(delimiter)) {
- throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
+exports.readFieldOption = readFieldOption;
+function readMessageOption(messageType, extensionName, extensionType) {
+ const options = messageType.options;
+ const optionVal = options[extensionName];
+ if (optionVal === undefined) {
+ return optionVal;
}
- return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
+ return extensionType ? extensionType.fromJson(optionVal) : optionVal;
}
-exports.prepareKeyValueMessage = prepareKeyValueMessage;
-//# sourceMappingURL=file-command.js.map
+exports.readMessageOption = readMessageOption;
+
/***/ }),
-/***/ 31030:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 6790:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.OidcClient = void 0;
-const http_client_1 = __nccwpck_require__(58418);
-const auth_1 = __nccwpck_require__(45003);
-const core_1 = __nccwpck_require__(51967);
-class OidcClient {
- static createHttpClient(allowRetry = true, maxRetry = 10) {
- const requestOptions = {
- allowRetries: allowRetry,
- maxRetries: maxRetry
- };
- return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);
+exports.ReflectionJsonReader = void 0;
+const json_typings_1 = __nccwpck_require__(9999);
+const base64_1 = __nccwpck_require__(6335);
+const reflection_info_1 = __nccwpck_require__(7910);
+const pb_long_1 = __nccwpck_require__(1753);
+const assert_1 = __nccwpck_require__(8602);
+const reflection_long_convert_1 = __nccwpck_require__(3402);
+/**
+ * Reads proto3 messages in canonical JSON format using reflection information.
+ *
+ * https://developers.google.com/protocol-buffers/docs/proto3#json
+ */
+class ReflectionJsonReader {
+ constructor(info) {
+ this.info = info;
}
- static getRequestToken() {
- const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];
- if (!token) {
- throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');
+ prepare() {
+ var _a;
+ if (this.fMap === undefined) {
+ this.fMap = {};
+ const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : [];
+ for (const field of fieldsInput) {
+ this.fMap[field.name] = field;
+ this.fMap[field.jsonName] = field;
+ this.fMap[field.localName] = field;
+ }
}
- return token;
}
- static getIDTokenUrl() {
- const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];
- if (!runtimeUrl) {
- throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');
+ // Cannot parse JSON for #.
+ assert(condition, fieldName, jsonValue) {
+ if (!condition) {
+ let what = json_typings_1.typeofJsonValue(jsonValue);
+ if (what == "number" || what == "boolean")
+ what = jsonValue.toString();
+ throw new Error(`Cannot parse JSON ${what} for ${this.info.typeName}#${fieldName}`);
}
- return runtimeUrl;
- }
- static getCall(id_token_url) {
- var _a;
- return __awaiter(this, void 0, void 0, function* () {
- const httpclient = OidcClient.createHttpClient();
- const res = yield httpclient
- .getJson(id_token_url)
- .catch(error => {
- throw new Error(`Failed to get ID Token. \n
- Error Code : ${error.statusCode}\n
- Error Message: ${error.message}`);
- });
- const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
- if (!id_token) {
- throw new Error('Response json body do not have ID Token field');
- }
- return id_token;
- });
}
- static getIDToken(audience) {
- return __awaiter(this, void 0, void 0, function* () {
- try {
- // New ID Token is requested from action service
- let id_token_url = OidcClient.getIDTokenUrl();
- if (audience) {
- const encodedAudience = encodeURIComponent(audience);
- id_token_url = `${id_token_url}&audience=${encodedAudience}`;
+ /**
+ * Reads a message from canonical JSON format into the target message.
+ *
+ * Repeated fields are appended. Map entries are added, overwriting
+ * existing keys.
+ *
+ * If a message field is already present, it will be merged with the
+ * new data.
+ */
+ read(input, message, options) {
+ this.prepare();
+ const oneofsHandled = [];
+ for (const [jsonKey, jsonValue] of Object.entries(input)) {
+ const field = this.fMap[jsonKey];
+ if (!field) {
+ if (!options.ignoreUnknownFields)
+ throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${jsonKey}`);
+ continue;
+ }
+ const localName = field.localName;
+ // handle oneof ADT
+ let target; // this will be the target for the field value, whether it is member of a oneof or not
+ if (field.oneof) {
+ if (jsonValue === null && (field.kind !== 'enum' || field.T()[0] !== 'google.protobuf.NullValue')) {
+ continue;
}
- (0, core_1.debug)(`ID token url is ${id_token_url}`);
- const id_token = yield OidcClient.getCall(id_token_url);
- (0, core_1.setSecret)(id_token);
- return id_token;
+ // since json objects are unordered by specification, it is not possible to take the last of multiple oneofs
+ if (oneofsHandled.includes(field.oneof))
+ throw new Error(`Multiple members of the oneof group "${field.oneof}" of ${this.info.typeName} are present in JSON.`);
+ oneofsHandled.push(field.oneof);
+ target = message[field.oneof] = {
+ oneofKind: localName
+ };
}
- catch (error) {
- throw new Error(`Error message: ${error.message}`);
+ else {
+ target = message;
}
- });
+ // we have handled oneof above. we just have read the value into `target`.
+ if (field.kind == 'map') {
+ if (jsonValue === null) {
+ continue;
+ }
+ // check input
+ this.assert(json_typings_1.isJsonObject(jsonValue), field.name, jsonValue);
+ // our target to put map entries into
+ const fieldObj = target[localName];
+ // read entries
+ for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) {
+ this.assert(jsonObjValue !== null, field.name + " map value", null);
+ // read value
+ let val;
+ switch (field.V.kind) {
+ case "message":
+ val = field.V.T().internalJsonRead(jsonObjValue, options);
+ break;
+ case "enum":
+ val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields);
+ if (val === false)
+ continue;
+ break;
+ case "scalar":
+ val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name);
+ break;
+ }
+ this.assert(val !== undefined, field.name + " map value", jsonObjValue);
+ // read key
+ let key = jsonObjKey;
+ if (field.K == reflection_info_1.ScalarType.BOOL)
+ key = key == "true" ? true : key == "false" ? false : key;
+ key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString();
+ fieldObj[key] = val;
+ }
+ }
+ else if (field.repeat) {
+ if (jsonValue === null)
+ continue;
+ // check input
+ this.assert(Array.isArray(jsonValue), field.name, jsonValue);
+ // our target to put array entries into
+ const fieldArr = target[localName];
+ // read array entries
+ for (const jsonItem of jsonValue) {
+ this.assert(jsonItem !== null, field.name, null);
+ let val;
+ switch (field.kind) {
+ case "message":
+ val = field.T().internalJsonRead(jsonItem, options);
+ break;
+ case "enum":
+ val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields);
+ if (val === false)
+ continue;
+ break;
+ case "scalar":
+ val = this.scalar(jsonItem, field.T, field.L, field.name);
+ break;
+ }
+ this.assert(val !== undefined, field.name, jsonValue);
+ fieldArr.push(val);
+ }
+ }
+ else {
+ switch (field.kind) {
+ case "message":
+ if (jsonValue === null && field.T().typeName != 'google.protobuf.Value') {
+ this.assert(field.oneof === undefined, field.name + " (oneof member)", null);
+ continue;
+ }
+ target[localName] = field.T().internalJsonRead(jsonValue, options, target[localName]);
+ break;
+ case "enum":
+ if (jsonValue === null)
+ continue;
+ let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields);
+ if (val === false)
+ continue;
+ target[localName] = val;
+ break;
+ case "scalar":
+ if (jsonValue === null)
+ continue;
+ target[localName] = this.scalar(jsonValue, field.T, field.L, field.name);
+ break;
+ }
+ }
+ }
+ }
+ /**
+ * Returns `false` for unrecognized string representations.
+ *
+ * google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`).
+ */
+ enum(type, json, fieldName, ignoreUnknownFields) {
+ if (type[0] == 'google.protobuf.NullValue')
+ assert_1.assert(json === null || json === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} only accepts null.`);
+ if (json === null)
+ // we require 0 to be default value for all enums
+ return 0;
+ switch (typeof json) {
+ case "number":
+ assert_1.assert(Number.isInteger(json), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can only be integral number, got ${json}.`);
+ return json;
+ case "string":
+ let localEnumName = json;
+ if (type[2] && json.substring(0, type[2].length) === type[2])
+ // lookup without the shared prefix
+ localEnumName = json.substring(type[2].length);
+ let enumNumber = type[1][localEnumName];
+ if (typeof enumNumber === 'undefined' && ignoreUnknownFields) {
+ return false;
+ }
+ assert_1.assert(typeof enumNumber == "number", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} has no value for "${json}".`);
+ return enumNumber;
+ }
+ assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json}".`);
+ }
+ scalar(json, type, longType, fieldName) {
+ let e;
+ try {
+ switch (type) {
+ // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
+ // Either numbers or strings are accepted. Exponent notation is also accepted.
+ case reflection_info_1.ScalarType.DOUBLE:
+ case reflection_info_1.ScalarType.FLOAT:
+ if (json === null)
+ return .0;
+ if (json === "NaN")
+ return Number.NaN;
+ if (json === "Infinity")
+ return Number.POSITIVE_INFINITY;
+ if (json === "-Infinity")
+ return Number.NEGATIVE_INFINITY;
+ if (json === "") {
+ e = "empty string";
+ break;
+ }
+ if (typeof json == "string" && json.trim().length !== json.length) {
+ e = "extra whitespace";
+ break;
+ }
+ if (typeof json != "string" && typeof json != "number") {
+ break;
+ }
+ let float = Number(json);
+ if (Number.isNaN(float)) {
+ e = "not a number";
+ break;
+ }
+ if (!Number.isFinite(float)) {
+ // infinity and -infinity are handled by string representation above, so this is an error
+ e = "too large or small";
+ break;
+ }
+ if (type == reflection_info_1.ScalarType.FLOAT)
+ assert_1.assertFloat32(float);
+ return float;
+ // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.
+ case reflection_info_1.ScalarType.INT32:
+ case reflection_info_1.ScalarType.FIXED32:
+ case reflection_info_1.ScalarType.SFIXED32:
+ case reflection_info_1.ScalarType.SINT32:
+ case reflection_info_1.ScalarType.UINT32:
+ if (json === null)
+ return 0;
+ let int32;
+ if (typeof json == "number")
+ int32 = json;
+ else if (json === "")
+ e = "empty string";
+ else if (typeof json == "string") {
+ if (json.trim().length !== json.length)
+ e = "extra whitespace";
+ else
+ int32 = Number(json);
+ }
+ if (int32 === undefined)
+ break;
+ if (type == reflection_info_1.ScalarType.UINT32)
+ assert_1.assertUInt32(int32);
+ else
+ assert_1.assertInt32(int32);
+ return int32;
+ // int64, fixed64, uint64: JSON value will be a decimal string. Either numbers or strings are accepted.
+ case reflection_info_1.ScalarType.INT64:
+ case reflection_info_1.ScalarType.SFIXED64:
+ case reflection_info_1.ScalarType.SINT64:
+ if (json === null)
+ return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType);
+ if (typeof json != "number" && typeof json != "string")
+ break;
+ return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json), longType);
+ case reflection_info_1.ScalarType.FIXED64:
+ case reflection_info_1.ScalarType.UINT64:
+ if (json === null)
+ return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType);
+ if (typeof json != "number" && typeof json != "string")
+ break;
+ return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json), longType);
+ // bool:
+ case reflection_info_1.ScalarType.BOOL:
+ if (json === null)
+ return false;
+ if (typeof json !== "boolean")
+ break;
+ return json;
+ // string:
+ case reflection_info_1.ScalarType.STRING:
+ if (json === null)
+ return "";
+ if (typeof json !== "string") {
+ e = "extra whitespace";
+ break;
+ }
+ try {
+ encodeURIComponent(json);
+ }
+ catch (e) {
+ e = "invalid UTF8";
+ break;
+ }
+ return json;
+ // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
+ // Either standard or URL-safe base64 encoding with/without paddings are accepted.
+ case reflection_info_1.ScalarType.BYTES:
+ if (json === null || json === "")
+ return new Uint8Array(0);
+ if (typeof json !== 'string')
+ break;
+ return base64_1.base64decode(json);
+ }
+ }
+ catch (error) {
+ e = error.message;
+ }
+ this.assert(false, fieldName + (e ? " - " + e : ""), json);
}
}
-exports.OidcClient = OidcClient;
-//# sourceMappingURL=oidc-utils.js.map
+exports.ReflectionJsonReader = ReflectionJsonReader;
+
/***/ }),
-/***/ 80312:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 1094:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;
-const path = __importStar(__nccwpck_require__(71017));
-/**
- * toPosixPath converts the given path to the posix form. On Windows, \\ will be
- * replaced with /.
- *
- * @param pth. Path to transform.
- * @return string Posix path.
- */
-function toPosixPath(pth) {
- return pth.replace(/[\\]/g, '/');
-}
-exports.toPosixPath = toPosixPath;
-/**
- * toWin32Path converts the given path to the win32 form. On Linux, / will be
- * replaced with \\.
- *
- * @param pth. Path to transform.
- * @return string Win32 path.
- */
-function toWin32Path(pth) {
- return pth.replace(/[/]/g, '\\');
-}
-exports.toWin32Path = toWin32Path;
+exports.ReflectionJsonWriter = void 0;
+const base64_1 = __nccwpck_require__(6335);
+const pb_long_1 = __nccwpck_require__(1753);
+const reflection_info_1 = __nccwpck_require__(7910);
+const assert_1 = __nccwpck_require__(8602);
/**
- * toPlatformPath converts the given path to a platform-specific path. It does
- * this by replacing instances of / and \ with the platform-specific path
- * separator.
+ * Writes proto3 messages in canonical JSON format using reflection
+ * information.
*
- * @param pth The path to platformize.
- * @return string The platform-specific path.
+ * https://developers.google.com/protocol-buffers/docs/proto3#json
*/
-function toPlatformPath(pth) {
- return pth.replace(/[/\\]/g, path.sep);
-}
-exports.toPlatformPath = toPlatformPath;
-//# sourceMappingURL=path-utils.js.map
-
-/***/ }),
-
-/***/ 13351:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
-
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0;
-const os_1 = __importDefault(__nccwpck_require__(22037));
-const exec = __importStar(__nccwpck_require__(73522));
-const getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () {
- const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, {
- silent: true
- });
- const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, {
- silent: true
- });
- return {
- name: name.trim(),
- version: version.trim()
- };
-});
-const getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () {
- var _a, _b, _c, _d;
- const { stdout } = yield exec.getExecOutput('sw_vers', undefined, {
- silent: true
- });
- const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : '';
- const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : '';
- return {
- name,
- version
- };
-});
-const getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () {
- const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], {
- silent: true
- });
- const [name, version] = stdout.trim().split('\n');
- return {
- name,
- version
- };
-});
-exports.platform = os_1.default.platform();
-exports.arch = os_1.default.arch();
-exports.isWindows = exports.platform === 'win32';
-exports.isMacOS = exports.platform === 'darwin';
-exports.isLinux = exports.platform === 'linux';
-function getDetails() {
- return __awaiter(this, void 0, void 0, function* () {
- return Object.assign(Object.assign({}, (yield (exports.isWindows
- ? getWindowsInfo()
- : exports.isMacOS
- ? getMacOsInfo()
- : getLinuxInfo()))), { platform: exports.platform,
- arch: exports.arch,
- isWindows: exports.isWindows,
- isMacOS: exports.isMacOS,
- isLinux: exports.isLinux });
- });
-}
-exports.getDetails = getDetails;
-//# sourceMappingURL=platform.js.map
-
-/***/ }),
-
-/***/ 72377:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
-
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
-const os_1 = __nccwpck_require__(22037);
-const fs_1 = __nccwpck_require__(57147);
-const { access, appendFile, writeFile } = fs_1.promises;
-exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
-exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';
-class Summary {
- constructor() {
- this._buffer = '';
+class ReflectionJsonWriter {
+ constructor(info) {
+ var _a;
+ this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : [];
}
/**
- * Finds the summary file path from the environment, rejects if env var is not found or file does not exist
- * Also checks r/w permissions.
- *
- * @returns step summary file path
+ * Converts the message to a JSON object, based on the field descriptors.
*/
- filePath() {
- return __awaiter(this, void 0, void 0, function* () {
- if (this._filePath) {
- return this._filePath;
- }
- const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];
- if (!pathFromEnv) {
- throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);
- }
- try {
- yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
- }
- catch (_a) {
- throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);
+ write(message, options) {
+ const json = {}, source = message;
+ for (const field of this.fields) {
+ // field is not part of a oneof, simply write as is
+ if (!field.oneof) {
+ let jsonValue = this.field(field, source[field.localName], options);
+ if (jsonValue !== undefined)
+ json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue;
+ continue;
}
- this._filePath = pathFromEnv;
- return this._filePath;
- });
- }
- /**
- * Wraps content in an HTML tag, adding any HTML attributes
- *
- * @param {string} tag HTML tag to wrap
- * @param {string | null} content content within the tag
- * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add
- *
- * @returns {string} content wrapped in HTML element
- */
- wrap(tag, content, attrs = {}) {
- const htmlAttrs = Object.entries(attrs)
- .map(([key, value]) => ` ${key}="${value}"`)
- .join('');
- if (!content) {
- return `<${tag}${htmlAttrs}>`;
+ // field is part of a oneof
+ const group = source[field.oneof];
+ if (group.oneofKind !== field.localName)
+ continue; // not selected, skip
+ const opt = field.kind == 'scalar' || field.kind == 'enum'
+ ? Object.assign(Object.assign({}, options), { emitDefaultValues: true }) : options;
+ let jsonValue = this.field(field, group[field.localName], opt);
+ assert_1.assert(jsonValue !== undefined);
+ json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue;
}
- return `<${tag}${htmlAttrs}>${content}${tag}>`;
+ return json;
}
- /**
- * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.
- *
- * @param {SummaryWriteOptions} [options] (optional) options for write operation
- *
- * @returns {Promise} summary instance
- */
- write(options) {
- return __awaiter(this, void 0, void 0, function* () {
- const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);
- const filePath = yield this.filePath();
- const writeFunc = overwrite ? writeFile : appendFile;
- yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });
- return this.emptyBuffer();
- });
- }
- /**
- * Clears the summary buffer and wipes the summary file
- *
- * @returns {Summary} summary instance
- */
- clear() {
- return __awaiter(this, void 0, void 0, function* () {
- return this.emptyBuffer().write({ overwrite: true });
- });
- }
- /**
- * Returns the current summary buffer as a string
- *
- * @returns {string} string of summary buffer
- */
- stringify() {
- return this._buffer;
- }
- /**
- * If the summary buffer is empty
- *
- * @returns {boolen} true if the buffer is empty
- */
- isEmptyBuffer() {
- return this._buffer.length === 0;
- }
- /**
- * Resets the summary buffer without writing to summary file
- *
- * @returns {Summary} summary instance
- */
- emptyBuffer() {
- this._buffer = '';
- return this;
- }
- /**
- * Adds raw text to the summary buffer
- *
- * @param {string} text content to add
- * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)
- *
- * @returns {Summary} summary instance
- */
- addRaw(text, addEOL = false) {
- this._buffer += text;
- return addEOL ? this.addEOL() : this;
- }
- /**
- * Adds the operating system-specific end-of-line marker to the buffer
- *
- * @returns {Summary} summary instance
- */
- addEOL() {
- return this.addRaw(os_1.EOL);
- }
- /**
- * Adds an HTML codeblock to the summary buffer
- *
- * @param {string} code content to render within fenced code block
- * @param {string} lang (optional) language to syntax highlight code
- *
- * @returns {Summary} summary instance
- */
- addCodeBlock(code, lang) {
- const attrs = Object.assign({}, (lang && { lang }));
- const element = this.wrap('pre', this.wrap('code', code), attrs);
- return this.addRaw(element).addEOL();
- }
- /**
- * Adds an HTML list to the summary buffer
- *
- * @param {string[]} items list of items to render
- * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)
- *
- * @returns {Summary} summary instance
- */
- addList(items, ordered = false) {
- const tag = ordered ? 'ol' : 'ul';
- const listItems = items.map(item => this.wrap('li', item)).join('');
- const element = this.wrap(tag, listItems);
- return this.addRaw(element).addEOL();
- }
- /**
- * Adds an HTML table to the summary buffer
- *
- * @param {SummaryTableCell[]} rows table rows
- *
- * @returns {Summary} summary instance
- */
- addTable(rows) {
- const tableBody = rows
- .map(row => {
- const cells = row
- .map(cell => {
- if (typeof cell === 'string') {
- return this.wrap('td', cell);
- }
- const { header, data, colspan, rowspan } = cell;
- const tag = header ? 'th' : 'td';
- const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));
- return this.wrap(tag, data, attrs);
- })
- .join('');
- return this.wrap('tr', cells);
- })
- .join('');
- const element = this.wrap('table', tableBody);
- return this.addRaw(element).addEOL();
- }
- /**
- * Adds a collapsable HTML details element to the summary buffer
- *
- * @param {string} label text for the closed state
- * @param {string} content collapsable content
- *
- * @returns {Summary} summary instance
- */
- addDetails(label, content) {
- const element = this.wrap('details', this.wrap('summary', label) + content);
- return this.addRaw(element).addEOL();
- }
- /**
- * Adds an HTML image tag to the summary buffer
- *
- * @param {string} src path to the image you to embed
- * @param {string} alt text description of the image
- * @param {SummaryImageOptions} options (optional) addition image attributes
- *
- * @returns {Summary} summary instance
- */
- addImage(src, alt, options) {
- const { width, height } = options || {};
- const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));
- const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));
- return this.addRaw(element).addEOL();
- }
- /**
- * Adds an HTML section heading element
- *
- * @param {string} text heading text
- * @param {number | string} [level=1] (optional) the heading level, default: 1
- *
- * @returns {Summary} summary instance
- */
- addHeading(text, level) {
- const tag = `h${level}`;
- const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)
- ? tag
- : 'h1';
- const element = this.wrap(allowedTag, text);
- return this.addRaw(element).addEOL();
- }
- /**
- * Adds an HTML thematic break (
) to the summary buffer
- *
- * @returns {Summary} summary instance
- */
- addSeparator() {
- const element = this.wrap('hr', null);
- return this.addRaw(element).addEOL();
+ field(field, value, options) {
+ let jsonValue = undefined;
+ if (field.kind == 'map') {
+ assert_1.assert(typeof value == "object" && value !== null);
+ const jsonObj = {};
+ switch (field.V.kind) {
+ case "scalar":
+ for (const [entryKey, entryValue] of Object.entries(value)) {
+ const val = this.scalar(field.V.T, entryValue, field.name, false, true);
+ assert_1.assert(val !== undefined);
+ jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key
+ }
+ break;
+ case "message":
+ const messageType = field.V.T();
+ for (const [entryKey, entryValue] of Object.entries(value)) {
+ const val = this.message(messageType, entryValue, field.name, options);
+ assert_1.assert(val !== undefined);
+ jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key
+ }
+ break;
+ case "enum":
+ const enumInfo = field.V.T();
+ for (const [entryKey, entryValue] of Object.entries(value)) {
+ assert_1.assert(entryValue === undefined || typeof entryValue == 'number');
+ const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger);
+ assert_1.assert(val !== undefined);
+ jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key
+ }
+ break;
+ }
+ if (options.emitDefaultValues || Object.keys(jsonObj).length > 0)
+ jsonValue = jsonObj;
+ }
+ else if (field.repeat) {
+ assert_1.assert(Array.isArray(value));
+ const jsonArr = [];
+ switch (field.kind) {
+ case "scalar":
+ for (let i = 0; i < value.length; i++) {
+ const val = this.scalar(field.T, value[i], field.name, field.opt, true);
+ assert_1.assert(val !== undefined);
+ jsonArr.push(val);
+ }
+ break;
+ case "enum":
+ const enumInfo = field.T();
+ for (let i = 0; i < value.length; i++) {
+ assert_1.assert(value[i] === undefined || typeof value[i] == 'number');
+ const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger);
+ assert_1.assert(val !== undefined);
+ jsonArr.push(val);
+ }
+ break;
+ case "message":
+ const messageType = field.T();
+ for (let i = 0; i < value.length; i++) {
+ const val = this.message(messageType, value[i], field.name, options);
+ assert_1.assert(val !== undefined);
+ jsonArr.push(val);
+ }
+ break;
+ }
+ // add converted array to json output
+ if (options.emitDefaultValues || jsonArr.length > 0 || options.emitDefaultValues)
+ jsonValue = jsonArr;
+ }
+ else {
+ switch (field.kind) {
+ case "scalar":
+ jsonValue = this.scalar(field.T, value, field.name, field.opt, options.emitDefaultValues);
+ break;
+ case "enum":
+ jsonValue = this.enum(field.T(), value, field.name, field.opt, options.emitDefaultValues, options.enumAsInteger);
+ break;
+ case "message":
+ jsonValue = this.message(field.T(), value, field.name, options);
+ break;
+ }
+ }
+ return jsonValue;
}
/**
- * Adds an HTML line break (
) to the summary buffer
- *
- * @returns {Summary} summary instance
+ * Returns `null` as the default for google.protobuf.NullValue.
*/
- addBreak() {
- const element = this.wrap('br', null);
- return this.addRaw(element).addEOL();
+ enum(type, value, fieldName, optional, emitDefaultValues, enumAsInteger) {
+ if (type[0] == 'google.protobuf.NullValue')
+ return !emitDefaultValues && !optional ? undefined : null;
+ if (value === undefined) {
+ assert_1.assert(optional);
+ return undefined;
+ }
+ if (value === 0 && !emitDefaultValues && !optional)
+ // we require 0 to be default value for all enums
+ return undefined;
+ assert_1.assert(typeof value == 'number');
+ assert_1.assert(Number.isInteger(value));
+ if (enumAsInteger || !type[1].hasOwnProperty(value))
+ // if we don't now the enum value, just return the number
+ return value;
+ if (type[2])
+ // restore the dropped prefix
+ return type[2] + type[1][value];
+ return type[1][value];
}
- /**
- * Adds an HTML blockquote to the summary buffer
- *
- * @param {string} text quote text
- * @param {string} cite (optional) citation url
- *
- * @returns {Summary} summary instance
- */
- addQuote(text, cite) {
- const attrs = Object.assign({}, (cite && { cite }));
- const element = this.wrap('blockquote', text, attrs);
- return this.addRaw(element).addEOL();
+ message(type, value, fieldName, options) {
+ if (value === undefined)
+ return options.emitDefaultValues ? null : undefined;
+ return type.internalJsonWrite(value, options);
}
- /**
- * Adds an HTML anchor tag to the summary buffer
- *
- * @param {string} text link text/content
- * @param {string} href hyperlink
- *
- * @returns {Summary} summary instance
- */
- addLink(text, href) {
- const element = this.wrap('a', text, { href });
- return this.addRaw(element).addEOL();
+ scalar(type, value, fieldName, optional, emitDefaultValues) {
+ if (value === undefined) {
+ assert_1.assert(optional);
+ return undefined;
+ }
+ const ed = emitDefaultValues || optional;
+ // noinspection FallThroughInSwitchStatementJS
+ switch (type) {
+ // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.
+ case reflection_info_1.ScalarType.INT32:
+ case reflection_info_1.ScalarType.SFIXED32:
+ case reflection_info_1.ScalarType.SINT32:
+ if (value === 0)
+ return ed ? 0 : undefined;
+ assert_1.assertInt32(value);
+ return value;
+ case reflection_info_1.ScalarType.FIXED32:
+ case reflection_info_1.ScalarType.UINT32:
+ if (value === 0)
+ return ed ? 0 : undefined;
+ assert_1.assertUInt32(value);
+ return value;
+ // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
+ // Either numbers or strings are accepted. Exponent notation is also accepted.
+ case reflection_info_1.ScalarType.FLOAT:
+ assert_1.assertFloat32(value);
+ case reflection_info_1.ScalarType.DOUBLE:
+ if (value === 0)
+ return ed ? 0 : undefined;
+ assert_1.assert(typeof value == 'number');
+ if (Number.isNaN(value))
+ return 'NaN';
+ if (value === Number.POSITIVE_INFINITY)
+ return 'Infinity';
+ if (value === Number.NEGATIVE_INFINITY)
+ return '-Infinity';
+ return value;
+ // string:
+ case reflection_info_1.ScalarType.STRING:
+ if (value === "")
+ return ed ? '' : undefined;
+ assert_1.assert(typeof value == 'string');
+ return value;
+ // bool:
+ case reflection_info_1.ScalarType.BOOL:
+ if (value === false)
+ return ed ? false : undefined;
+ assert_1.assert(typeof value == 'boolean');
+ return value;
+ // JSON value will be a decimal string. Either numbers or strings are accepted.
+ case reflection_info_1.ScalarType.UINT64:
+ case reflection_info_1.ScalarType.FIXED64:
+ assert_1.assert(typeof value == 'number' || typeof value == 'string' || typeof value == 'bigint');
+ let ulong = pb_long_1.PbULong.from(value);
+ if (ulong.isZero() && !ed)
+ return undefined;
+ return ulong.toString();
+ // JSON value will be a decimal string. Either numbers or strings are accepted.
+ case reflection_info_1.ScalarType.INT64:
+ case reflection_info_1.ScalarType.SFIXED64:
+ case reflection_info_1.ScalarType.SINT64:
+ assert_1.assert(typeof value == 'number' || typeof value == 'string' || typeof value == 'bigint');
+ let long = pb_long_1.PbLong.from(value);
+ if (long.isZero() && !ed)
+ return undefined;
+ return long.toString();
+ // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
+ // Either standard or URL-safe base64 encoding with/without paddings are accepted.
+ case reflection_info_1.ScalarType.BYTES:
+ assert_1.assert(value instanceof Uint8Array);
+ if (!value.byteLength)
+ return ed ? "" : undefined;
+ return base64_1.base64encode(value);
+ }
}
}
-const _summary = new Summary();
-/**
- * @deprecated use `core.summary`
- */
-exports.markdownSummary = _summary;
-exports.summary = _summary;
-//# sourceMappingURL=summary.js.map
+exports.ReflectionJsonWriter = ReflectionJsonWriter;
+
/***/ }),
-/***/ 2603:
-/***/ ((__unused_webpack_module, exports) => {
+/***/ 3402:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
-// We use any as a valid input type
-/* eslint-disable @typescript-eslint/no-explicit-any */
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.toCommandProperties = exports.toCommandValue = void 0;
-/**
- * Sanitizes an input into a string so it can be passed into issueCommand safely
- * @param input input to sanitize into a string
- */
-function toCommandValue(input) {
- if (input === null || input === undefined) {
- return '';
- }
- else if (typeof input === 'string' || input instanceof String) {
- return input;
- }
- return JSON.stringify(input);
-}
-exports.toCommandValue = toCommandValue;
+exports.reflectionLongConvert = void 0;
+const reflection_info_1 = __nccwpck_require__(7910);
/**
+ * Utility method to convert a PbLong or PbUlong to a JavaScript
+ * representation during runtime.
*
- * @param annotationProperties
- * @returns The command properties to send with the actual annotation command
- * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646
+ * Works with generated field information, `undefined` is equivalent
+ * to `STRING`.
*/
-function toCommandProperties(annotationProperties) {
- if (!Object.keys(annotationProperties).length) {
- return {};
+function reflectionLongConvert(long, type) {
+ switch (type) {
+ case reflection_info_1.LongType.BIGINT:
+ return long.toBigInt();
+ case reflection_info_1.LongType.NUMBER:
+ return long.toNumber();
+ default:
+ // case undefined:
+ // case LongType.STRING:
+ return long.toString();
}
- return {
- title: annotationProperties.title,
- file: annotationProperties.file,
- line: annotationProperties.startLine,
- endLine: annotationProperties.endLine,
- col: annotationProperties.startColumn,
- endColumn: annotationProperties.endColumn
- };
}
-exports.toCommandProperties = toCommandProperties;
-//# sourceMappingURL=utils.js.map
+exports.reflectionLongConvert = reflectionLongConvert;
+
/***/ }),
-/***/ 73522:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 8044:
+/***/ ((__unused_webpack_module, exports) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getExecOutput = exports.exec = void 0;
-const string_decoder_1 = __nccwpck_require__(71576);
-const tr = __importStar(__nccwpck_require__(42277));
+exports.reflectionMergePartial = void 0;
/**
- * Exec a command.
- * Output will be streamed to the live console.
- * Returns promise with return code
+ * Copy partial data into the target message.
*
- * @param commandLine command to execute (can include additional args). Must be correctly escaped.
- * @param args optional arguments for tool. Escaping is handled by the lib.
- * @param options optional exec options. See ExecOptions
- * @returns Promise exit code
- */
-function exec(commandLine, args, options) {
- return __awaiter(this, void 0, void 0, function* () {
- const commandArgs = tr.argStringToArray(commandLine);
- if (commandArgs.length === 0) {
- throw new Error(`Parameter 'commandLine' cannot be null or empty.`);
- }
- // Path to tool to execute should be first arg
- const toolPath = commandArgs[0];
- args = commandArgs.slice(1).concat(args || []);
- const runner = new tr.ToolRunner(toolPath, args, options);
- return runner.exec();
- });
-}
-exports.exec = exec;
-/**
- * Exec a command and get the output.
- * Output will be streamed to the live console.
- * Returns promise with the exit code and collected stdout and stderr
+ * If a singular scalar or enum field is present in the source, it
+ * replaces the field in the target.
*
- * @param commandLine command to execute (can include additional args). Must be correctly escaped.
- * @param args optional arguments for tool. Escaping is handled by the lib.
- * @param options optional exec options. See ExecOptions
- * @returns Promise exit code, stdout, and stderr
+ * If a singular message field is present in the source, it is merged
+ * with the target field by calling mergePartial() of the responsible
+ * message type.
+ *
+ * If a repeated field is present in the source, its values replace
+ * all values in the target array, removing extraneous values.
+ * Repeated message fields are copied, not merged.
+ *
+ * If a map field is present in the source, entries are added to the
+ * target map, replacing entries with the same key. Entries that only
+ * exist in the target remain. Entries with message values are copied,
+ * not merged.
+ *
+ * Note that this function differs from protobuf merge semantics,
+ * which appends repeated fields.
*/
-function getExecOutput(commandLine, args, options) {
- var _a, _b;
- return __awaiter(this, void 0, void 0, function* () {
- let stdout = '';
- let stderr = '';
- //Using string decoder covers the case where a mult-byte character is split
- const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');
- const stderrDecoder = new string_decoder_1.StringDecoder('utf8');
- const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;
- const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;
- const stdErrListener = (data) => {
- stderr += stderrDecoder.write(data);
- if (originalStdErrListener) {
- originalStdErrListener(data);
- }
- };
- const stdOutListener = (data) => {
- stdout += stdoutDecoder.write(data);
- if (originalStdoutListener) {
- originalStdoutListener(data);
+function reflectionMergePartial(info, target, source) {
+ let fieldValue, // the field value we are working with
+ input = source, output; // where we want our field value to go
+ for (let field of info.fields) {
+ let name = field.localName;
+ if (field.oneof) {
+ const group = input[field.oneof]; // this is the oneof`s group in the source
+ if ((group === null || group === void 0 ? void 0 : group.oneofKind) == undefined) { // the user is free to omit
+ continue; // we skip this field, and all other members too
}
- };
- const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });
- const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));
- //flush any remaining characters
- stdout += stdoutDecoder.end();
- stderr += stderrDecoder.end();
- return {
- exitCode,
- stdout,
- stderr
- };
- });
+ fieldValue = group[name]; // our value comes from the the oneof group of the source
+ output = target[field.oneof]; // and our output is the oneof group of the target
+ output.oneofKind = group.oneofKind; // always update discriminator
+ if (fieldValue == undefined) {
+ delete output[name]; // remove any existing value
+ continue; // skip further work on field
+ }
+ }
+ else {
+ fieldValue = input[name]; // we are using the source directly
+ output = target; // we want our field value to go directly into the target
+ if (fieldValue == undefined) {
+ continue; // skip further work on field, existing value is used as is
+ }
+ }
+ if (field.repeat)
+ output[name].length = fieldValue.length; // resize target array to match source array
+ // now we just work with `fieldValue` and `output` to merge the value
+ switch (field.kind) {
+ case "scalar":
+ case "enum":
+ if (field.repeat)
+ for (let i = 0; i < fieldValue.length; i++)
+ output[name][i] = fieldValue[i]; // not a reference type
+ else
+ output[name] = fieldValue; // not a reference type
+ break;
+ case "message":
+ let T = field.T();
+ if (field.repeat)
+ for (let i = 0; i < fieldValue.length; i++)
+ output[name][i] = T.create(fieldValue[i]);
+ else if (output[name] === undefined)
+ output[name] = T.create(fieldValue); // nothing to merge with
+ else
+ T.mergePartial(output[name], fieldValue);
+ break;
+ case "map":
+ // Map and repeated fields are simply overwritten, not appended or merged
+ switch (field.V.kind) {
+ case "scalar":
+ case "enum":
+ Object.assign(output[name], fieldValue); // elements are not reference types
+ break;
+ case "message":
+ let T = field.V.T();
+ for (let k of Object.keys(fieldValue))
+ output[name][k] = T.create(fieldValue[k]);
+ break;
+ }
+ break;
+ }
+ }
}
-exports.getExecOutput = getExecOutput;
-//# sourceMappingURL=exec.js.map
+exports.reflectionMergePartial = reflectionMergePartial;
+
/***/ }),
-/***/ 42277:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 9526:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.argStringToArray = exports.ToolRunner = void 0;
-const os = __importStar(__nccwpck_require__(22037));
-const events = __importStar(__nccwpck_require__(82361));
-const child = __importStar(__nccwpck_require__(32081));
-const path = __importStar(__nccwpck_require__(71017));
-const io = __importStar(__nccwpck_require__(55974));
-const ioUtil = __importStar(__nccwpck_require__(76260));
-const timers_1 = __nccwpck_require__(39512);
-/* eslint-disable @typescript-eslint/unbound-method */
-const IS_WINDOWS = process.platform === 'win32';
-/*
- * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.
+exports.reflectionScalarDefault = void 0;
+const reflection_info_1 = __nccwpck_require__(7910);
+const reflection_long_convert_1 = __nccwpck_require__(3402);
+const pb_long_1 = __nccwpck_require__(1753);
+/**
+ * Creates the default value for a scalar type.
*/
-class ToolRunner extends events.EventEmitter {
- constructor(toolPath, args, options) {
- super();
- if (!toolPath) {
- throw new Error("Parameter 'toolPath' cannot be null or empty.");
- }
- this.toolPath = toolPath;
- this.args = args || [];
- this.options = options || {};
+function reflectionScalarDefault(type, longType = reflection_info_1.LongType.STRING) {
+ switch (type) {
+ case reflection_info_1.ScalarType.BOOL:
+ return false;
+ case reflection_info_1.ScalarType.UINT64:
+ case reflection_info_1.ScalarType.FIXED64:
+ return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType);
+ case reflection_info_1.ScalarType.INT64:
+ case reflection_info_1.ScalarType.SFIXED64:
+ case reflection_info_1.ScalarType.SINT64:
+ return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType);
+ case reflection_info_1.ScalarType.DOUBLE:
+ case reflection_info_1.ScalarType.FLOAT:
+ return 0.0;
+ case reflection_info_1.ScalarType.BYTES:
+ return new Uint8Array(0);
+ case reflection_info_1.ScalarType.STRING:
+ return "";
+ default:
+ // case ScalarType.INT32:
+ // case ScalarType.UINT32:
+ // case ScalarType.SINT32:
+ // case ScalarType.FIXED32:
+ // case ScalarType.SFIXED32:
+ return 0;
}
- _debug(message) {
- if (this.options.listeners && this.options.listeners.debug) {
- this.options.listeners.debug(message);
- }
+}
+exports.reflectionScalarDefault = reflectionScalarDefault;
+
+
+/***/ }),
+
+/***/ 5167:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.ReflectionTypeCheck = void 0;
+const reflection_info_1 = __nccwpck_require__(7910);
+const oneof_1 = __nccwpck_require__(8063);
+// noinspection JSMethodCanBeStatic
+class ReflectionTypeCheck {
+ constructor(info) {
+ var _a;
+ this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : [];
}
- _getCommandString(options, noPrefix) {
- const toolPath = this._getSpawnFileName();
- const args = this._getSpawnArgs(options);
- let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool
- if (IS_WINDOWS) {
- // Windows + cmd file
- if (this._isCmdFile()) {
- cmd += toolPath;
- for (const a of args) {
- cmd += ` ${a}`;
- }
- }
- // Windows + verbatim
- else if (options.windowsVerbatimArguments) {
- cmd += `"${toolPath}"`;
- for (const a of args) {
- cmd += ` ${a}`;
+ prepare() {
+ if (this.data)
+ return;
+ const req = [], known = [], oneofs = [];
+ for (let field of this.fields) {
+ if (field.oneof) {
+ if (!oneofs.includes(field.oneof)) {
+ oneofs.push(field.oneof);
+ req.push(field.oneof);
+ known.push(field.oneof);
}
}
- // Windows (regular)
else {
- cmd += this._windowsQuoteCmdArg(toolPath);
- for (const a of args) {
- cmd += ` ${this._windowsQuoteCmdArg(a)}`;
+ known.push(field.localName);
+ switch (field.kind) {
+ case "scalar":
+ case "enum":
+ if (!field.opt || field.repeat)
+ req.push(field.localName);
+ break;
+ case "message":
+ if (field.repeat)
+ req.push(field.localName);
+ break;
+ case "map":
+ req.push(field.localName);
+ break;
}
}
}
- else {
- // OSX/Linux - this can likely be improved with some form of quoting.
- // creating processes on Unix is fundamentally different than Windows.
- // on Unix, execvp() takes an arg array.
- cmd += toolPath;
- for (const a of args) {
- cmd += ` ${a}`;
- }
- }
- return cmd;
+ this.data = { req, known, oneofs: Object.values(oneofs) };
}
- _processLineBuffer(data, strBuffer, onLine) {
- try {
- let s = strBuffer + data.toString();
- let n = s.indexOf(os.EOL);
- while (n > -1) {
- const line = s.substring(0, n);
- onLine(line);
- // the rest of the string ...
- s = s.substring(n + os.EOL.length);
- n = s.indexOf(os.EOL);
- }
- return s;
+ /**
+ * Is the argument a valid message as specified by the
+ * reflection information?
+ *
+ * Checks all field types recursively. The `depth`
+ * specifies how deep into the structure the check will be.
+ *
+ * With a depth of 0, only the presence of fields
+ * is checked.
+ *
+ * With a depth of 1 or more, the field types are checked.
+ *
+ * With a depth of 2 or more, the members of map, repeated
+ * and message fields are checked.
+ *
+ * Message fields will be checked recursively with depth - 1.
+ *
+ * The number of map entries / repeated values being checked
+ * is < depth.
+ */
+ is(message, depth, allowExcessProperties = false) {
+ if (depth < 0)
+ return true;
+ if (message === null || message === undefined || typeof message != 'object')
+ return false;
+ this.prepare();
+ let keys = Object.keys(message), data = this.data;
+ // if a required field is missing in arg, this cannot be a T
+ if (keys.length < data.req.length || data.req.some(n => !keys.includes(n)))
+ return false;
+ if (!allowExcessProperties) {
+ // if the arg contains a key we dont know, this is not a literal T
+ if (keys.some(k => !data.known.includes(k)))
+ return false;
}
- catch (err) {
- // streaming lines to console is best effort. Don't fail a build.
- this._debug(`error processing line. Failed with error ${err}`);
- return '';
+ // "With a depth of 0, only the presence and absence of fields is checked."
+ // "With a depth of 1 or more, the field types are checked."
+ if (depth < 1) {
+ return true;
}
- }
- _getSpawnFileName() {
- if (IS_WINDOWS) {
- if (this._isCmdFile()) {
- return process.env['COMSPEC'] || 'cmd.exe';
- }
+ // check oneof group
+ for (const name of data.oneofs) {
+ const group = message[name];
+ if (!oneof_1.isOneofGroup(group))
+ return false;
+ if (group.oneofKind === undefined)
+ continue;
+ const field = this.fields.find(f => f.localName === group.oneofKind);
+ if (!field)
+ return false; // we found no field, but have a kind, something is wrong
+ if (!this.field(group[group.oneofKind], field, allowExcessProperties, depth))
+ return false;
}
- return this.toolPath;
+ // check types
+ for (const field of this.fields) {
+ if (field.oneof !== undefined)
+ continue;
+ if (!this.field(message[field.localName], field, allowExcessProperties, depth))
+ return false;
+ }
+ return true;
}
- _getSpawnArgs(options) {
- if (IS_WINDOWS) {
- if (this._isCmdFile()) {
- let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;
- for (const a of this.args) {
- argline += ' ';
- argline += options.windowsVerbatimArguments
- ? a
- : this._windowsQuoteCmdArg(a);
+ field(arg, field, allowExcessProperties, depth) {
+ let repeated = field.repeat;
+ switch (field.kind) {
+ case "scalar":
+ if (arg === undefined)
+ return field.opt;
+ if (repeated)
+ return this.scalars(arg, field.T, depth, field.L);
+ return this.scalar(arg, field.T, field.L);
+ case "enum":
+ if (arg === undefined)
+ return field.opt;
+ if (repeated)
+ return this.scalars(arg, reflection_info_1.ScalarType.INT32, depth);
+ return this.scalar(arg, reflection_info_1.ScalarType.INT32);
+ case "message":
+ if (arg === undefined)
+ return true;
+ if (repeated)
+ return this.messages(arg, field.T(), allowExcessProperties, depth);
+ return this.message(arg, field.T(), allowExcessProperties, depth);
+ case "map":
+ if (typeof arg != 'object' || arg === null)
+ return false;
+ if (depth < 2)
+ return true;
+ if (!this.mapKeys(arg, field.K, depth))
+ return false;
+ switch (field.V.kind) {
+ case "scalar":
+ return this.scalars(Object.values(arg), field.V.T, depth, field.V.L);
+ case "enum":
+ return this.scalars(Object.values(arg), reflection_info_1.ScalarType.INT32, depth);
+ case "message":
+ return this.messages(Object.values(arg), field.V.T(), allowExcessProperties, depth);
}
- argline += '"';
- return [argline];
- }
+ break;
}
- return this.args;
- }
- _endsWith(str, end) {
- return str.endsWith(end);
+ return true;
}
- _isCmdFile() {
- const upperToolPath = this.toolPath.toUpperCase();
- return (this._endsWith(upperToolPath, '.CMD') ||
- this._endsWith(upperToolPath, '.BAT'));
+ message(arg, type, allowExcessProperties, depth) {
+ if (allowExcessProperties) {
+ return type.isAssignable(arg, depth);
+ }
+ return type.is(arg, depth);
}
- _windowsQuoteCmdArg(arg) {
- // for .exe, apply the normal quoting rules that libuv applies
- if (!this._isCmdFile()) {
- return this._uvQuoteCmdArg(arg);
+ messages(arg, type, allowExcessProperties, depth) {
+ if (!Array.isArray(arg))
+ return false;
+ if (depth < 2)
+ return true;
+ if (allowExcessProperties) {
+ for (let i = 0; i < arg.length && i < depth; i++)
+ if (!type.isAssignable(arg[i], depth - 1))
+ return false;
}
- // otherwise apply quoting rules specific to the cmd.exe command line parser.
- // the libuv rules are generic and are not designed specifically for cmd.exe
- // command line parser.
- //
- // for a detailed description of the cmd.exe command line parser, refer to
- // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912
- // need quotes for empty arg
- if (!arg) {
- return '""';
+ else {
+ for (let i = 0; i < arg.length && i < depth; i++)
+ if (!type.is(arg[i], depth - 1))
+ return false;
}
- // determine whether the arg needs to be quoted
- const cmdSpecialChars = [
- ' ',
- '\t',
- '&',
- '(',
- ')',
- '[',
- ']',
- '{',
- '}',
- '^',
- '=',
- ';',
- '!',
- "'",
- '+',
- ',',
- '`',
- '~',
- '|',
- '<',
- '>',
- '"'
- ];
- let needsQuotes = false;
- for (const char of arg) {
- if (cmdSpecialChars.some(x => x === char)) {
- needsQuotes = true;
- break;
- }
+ return true;
+ }
+ scalar(arg, type, longType) {
+ let argType = typeof arg;
+ switch (type) {
+ case reflection_info_1.ScalarType.UINT64:
+ case reflection_info_1.ScalarType.FIXED64:
+ case reflection_info_1.ScalarType.INT64:
+ case reflection_info_1.ScalarType.SFIXED64:
+ case reflection_info_1.ScalarType.SINT64:
+ switch (longType) {
+ case reflection_info_1.LongType.BIGINT:
+ return argType == "bigint";
+ case reflection_info_1.LongType.NUMBER:
+ return argType == "number" && !isNaN(arg);
+ default:
+ return argType == "string";
+ }
+ case reflection_info_1.ScalarType.BOOL:
+ return argType == 'boolean';
+ case reflection_info_1.ScalarType.STRING:
+ return argType == 'string';
+ case reflection_info_1.ScalarType.BYTES:
+ return arg instanceof Uint8Array;
+ case reflection_info_1.ScalarType.DOUBLE:
+ case reflection_info_1.ScalarType.FLOAT:
+ return argType == 'number' && !isNaN(arg);
+ default:
+ // case ScalarType.UINT32:
+ // case ScalarType.FIXED32:
+ // case ScalarType.INT32:
+ // case ScalarType.SINT32:
+ // case ScalarType.SFIXED32:
+ return argType == 'number' && Number.isInteger(arg);
}
- // short-circuit if quotes not needed
- if (!needsQuotes) {
- return arg;
+ }
+ scalars(arg, type, depth, longType) {
+ if (!Array.isArray(arg))
+ return false;
+ if (depth < 2)
+ return true;
+ if (Array.isArray(arg))
+ for (let i = 0; i < arg.length && i < depth; i++)
+ if (!this.scalar(arg[i], type, longType))
+ return false;
+ return true;
+ }
+ mapKeys(map, type, depth) {
+ let keys = Object.keys(map);
+ switch (type) {
+ case reflection_info_1.ScalarType.INT32:
+ case reflection_info_1.ScalarType.FIXED32:
+ case reflection_info_1.ScalarType.SFIXED32:
+ case reflection_info_1.ScalarType.SINT32:
+ case reflection_info_1.ScalarType.UINT32:
+ return this.scalars(keys.slice(0, depth).map(k => parseInt(k)), type, depth);
+ case reflection_info_1.ScalarType.BOOL:
+ return this.scalars(keys.slice(0, depth).map(k => k == 'true' ? true : k == 'false' ? false : k), type, depth);
+ default:
+ return this.scalars(keys, type, depth, reflection_info_1.LongType.STRING);
}
- // the following quoting rules are very similar to the rules that by libuv applies.
- //
- // 1) wrap the string in quotes
- //
- // 2) double-up quotes - i.e. " => ""
- //
- // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately
- // doesn't work well with a cmd.exe command line.
- //
- // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app.
- // for example, the command line:
- // foo.exe "myarg:""my val"""
- // is parsed by a .NET console app into an arg array:
- // [ "myarg:\"my val\"" ]
- // which is the same end result when applying libuv quoting rules. although the actual
- // command line from libuv quoting rules would look like:
- // foo.exe "myarg:\"my val\""
- //
- // 3) double-up slashes that precede a quote,
- // e.g. hello \world => "hello \world"
- // hello\"world => "hello\\""world"
- // hello\\"world => "hello\\\\""world"
- // hello world\ => "hello world\\"
- //
- // technically this is not required for a cmd.exe command line, or the batch argument parser.
- // the reasons for including this as a .cmd quoting rule are:
- //
- // a) this is optimized for the scenario where the argument is passed from the .cmd file to an
- // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.
- //
- // b) it's what we've been doing previously (by deferring to node default behavior) and we
- // haven't heard any complaints about that aspect.
- //
- // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be
- // escaped when used on the command line directly - even though within a .cmd file % can be escaped
- // by using %%.
- //
- // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts
- // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.
- //
- // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would
- // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the
- // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args
- // to an external program.
- //
- // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.
- // % can be escaped within a .cmd file.
- let reverse = '"';
- let quoteHit = true;
- for (let i = arg.length; i > 0; i--) {
- // walk the string in reverse
- reverse += arg[i - 1];
- if (quoteHit && arg[i - 1] === '\\') {
- reverse += '\\'; // double the slash
- }
- else if (arg[i - 1] === '"') {
- quoteHit = true;
- reverse += '"'; // double the quote
- }
- else {
- quoteHit = false;
- }
- }
- reverse += '"';
- return reverse
- .split('')
- .reverse()
- .join('');
- }
- _uvQuoteCmdArg(arg) {
- // Tool runner wraps child_process.spawn() and needs to apply the same quoting as
- // Node in certain cases where the undocumented spawn option windowsVerbatimArguments
- // is used.
- //
- // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,
- // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),
- // pasting copyright notice from Node within this function:
- //
- // Copyright Joyent, Inc. and other Node contributors. All rights reserved.
- //
- // Permission is hereby granted, free of charge, to any person obtaining a copy
- // of this software and associated documentation files (the "Software"), to
- // deal in the Software without restriction, including without limitation the
- // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- // sell copies of the Software, and to permit persons to whom the Software is
- // furnished to do so, subject to the following conditions:
- //
- // The above copyright notice and this permission notice shall be included in
- // all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- // IN THE SOFTWARE.
- if (!arg) {
- // Need double quotation for empty argument
- return '""';
- }
- if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) {
- // No quotation needed
- return arg;
- }
- if (!arg.includes('"') && !arg.includes('\\')) {
- // No embedded double quotes or backslashes, so I can just wrap
- // quote marks around the whole thing.
- return `"${arg}"`;
- }
- // Expected input/output:
- // input : hello"world
- // output: "hello\"world"
- // input : hello""world
- // output: "hello\"\"world"
- // input : hello\world
- // output: hello\world
- // input : hello\\world
- // output: hello\\world
- // input : hello\"world
- // output: "hello\\\"world"
- // input : hello\\"world
- // output: "hello\\\\\"world"
- // input : hello world\
- // output: "hello world\\" - note the comment in libuv actually reads "hello world\"
- // but it appears the comment is wrong, it should be "hello world\\"
- let reverse = '"';
- let quoteHit = true;
- for (let i = arg.length; i > 0; i--) {
- // walk the string in reverse
- reverse += arg[i - 1];
- if (quoteHit && arg[i - 1] === '\\') {
- reverse += '\\';
- }
- else if (arg[i - 1] === '"') {
- quoteHit = true;
- reverse += '\\';
- }
- else {
- quoteHit = false;
- }
- }
- reverse += '"';
- return reverse
- .split('')
- .reverse()
- .join('');
- }
- _cloneExecOptions(options) {
- options = options || {};
- const result = {
- cwd: options.cwd || process.cwd(),
- env: options.env || process.env,
- silent: options.silent || false,
- windowsVerbatimArguments: options.windowsVerbatimArguments || false,
- failOnStdErr: options.failOnStdErr || false,
- ignoreReturnCode: options.ignoreReturnCode || false,
- delay: options.delay || 10000
- };
- result.outStream = options.outStream || process.stdout;
- result.errStream = options.errStream || process.stderr;
- return result;
}
- _getSpawnOptions(options, toolPath) {
- options = options || {};
- const result = {};
- result.cwd = options.cwd;
- result.env = options.env;
- result['windowsVerbatimArguments'] =
- options.windowsVerbatimArguments || this._isCmdFile();
- if (options.windowsVerbatimArguments) {
- result.argv0 = `"${toolPath}"`;
- }
- return result;
+}
+exports.ReflectionTypeCheck = ReflectionTypeCheck;
+
+
+/***/ }),
+
+/***/ 7413:
+/***/ ((module, exports, __nccwpck_require__) => {
+
+/**
+ * @author Toru Nagashima
+ * See LICENSE file in root directory for full license.
+ */
+
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+
+var eventTargetShim = __nccwpck_require__(6577);
+
+/**
+ * The signal class.
+ * @see https://dom.spec.whatwg.org/#abortsignal
+ */
+class AbortSignal extends eventTargetShim.EventTarget {
+ /**
+ * AbortSignal cannot be constructed directly.
+ */
+ constructor() {
+ super();
+ throw new TypeError("AbortSignal cannot be constructed directly");
}
/**
- * Exec a tool.
- * Output will be streamed to the live console.
- * Returns promise with return code
- *
- * @param tool path to tool to exec
- * @param options optional exec options. See ExecOptions
- * @returns number
+ * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise.
*/
- exec() {
- return __awaiter(this, void 0, void 0, function* () {
- // root the tool path if it is unrooted and contains relative pathing
- if (!ioUtil.isRooted(this.toolPath) &&
- (this.toolPath.includes('/') ||
- (IS_WINDOWS && this.toolPath.includes('\\')))) {
- // prefer options.cwd if it is specified, however options.cwd may also need to be rooted
- this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
- }
- // if the tool is only a file name, then resolve it from the PATH
- // otherwise verify it exists (add extension on Windows if necessary)
- this.toolPath = yield io.which(this.toolPath, true);
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
- this._debug(`exec tool: ${this.toolPath}`);
- this._debug('arguments:');
- for (const arg of this.args) {
- this._debug(` ${arg}`);
- }
- const optionsNonNull = this._cloneExecOptions(this.options);
- if (!optionsNonNull.silent && optionsNonNull.outStream) {
- optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);
- }
- const state = new ExecState(optionsNonNull, this.toolPath);
- state.on('debug', (message) => {
- this._debug(message);
- });
- if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {
- return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));
- }
- const fileName = this._getSpawnFileName();
- const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));
- let stdbuffer = '';
- if (cp.stdout) {
- cp.stdout.on('data', (data) => {
- if (this.options.listeners && this.options.listeners.stdout) {
- this.options.listeners.stdout(data);
- }
- if (!optionsNonNull.silent && optionsNonNull.outStream) {
- optionsNonNull.outStream.write(data);
- }
- stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {
- if (this.options.listeners && this.options.listeners.stdline) {
- this.options.listeners.stdline(line);
- }
- });
- });
- }
- let errbuffer = '';
- if (cp.stderr) {
- cp.stderr.on('data', (data) => {
- state.processStderr = true;
- if (this.options.listeners && this.options.listeners.stderr) {
- this.options.listeners.stderr(data);
- }
- if (!optionsNonNull.silent &&
- optionsNonNull.errStream &&
- optionsNonNull.outStream) {
- const s = optionsNonNull.failOnStdErr
- ? optionsNonNull.errStream
- : optionsNonNull.outStream;
- s.write(data);
- }
- errbuffer = this._processLineBuffer(data, errbuffer, (line) => {
- if (this.options.listeners && this.options.listeners.errline) {
- this.options.listeners.errline(line);
- }
- });
- });
- }
- cp.on('error', (err) => {
- state.processError = err.message;
- state.processExited = true;
- state.processClosed = true;
- state.CheckComplete();
- });
- cp.on('exit', (code) => {
- state.processExitCode = code;
- state.processExited = true;
- this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);
- state.CheckComplete();
- });
- cp.on('close', (code) => {
- state.processExitCode = code;
- state.processExited = true;
- state.processClosed = true;
- this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);
- state.CheckComplete();
- });
- state.on('done', (error, exitCode) => {
- if (stdbuffer.length > 0) {
- this.emit('stdline', stdbuffer);
- }
- if (errbuffer.length > 0) {
- this.emit('errline', errbuffer);
- }
- cp.removeAllListeners();
- if (error) {
- reject(error);
- }
- else {
- resolve(exitCode);
- }
- });
- if (this.options.input) {
- if (!cp.stdin) {
- throw new Error('child process missing stdin');
- }
- cp.stdin.end(this.options.input);
- }
- }));
- });
+ get aborted() {
+ const aborted = abortedFlags.get(this);
+ if (typeof aborted !== "boolean") {
+ throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`);
+ }
+ return aborted;
}
}
-exports.ToolRunner = ToolRunner;
+eventTargetShim.defineEventAttribute(AbortSignal.prototype, "abort");
/**
- * Convert an arg string to an array of args. Handles escaping
- *
- * @param argString string of arguments
- * @returns string[] array of arguments
+ * Create an AbortSignal object.
*/
-function argStringToArray(argString) {
- const args = [];
- let inQuotes = false;
- let escaped = false;
- let arg = '';
- function append(c) {
- // we only escape double quotes.
- if (escaped && c !== '"') {
- arg += '\\';
- }
- arg += c;
- escaped = false;
- }
- for (let i = 0; i < argString.length; i++) {
- const c = argString.charAt(i);
- if (c === '"') {
- if (!escaped) {
- inQuotes = !inQuotes;
- }
- else {
- append(c);
- }
- continue;
- }
- if (c === '\\' && escaped) {
- append(c);
- continue;
- }
- if (c === '\\' && inQuotes) {
- escaped = true;
- continue;
- }
- if (c === ' ' && !inQuotes) {
- if (arg.length > 0) {
- args.push(arg);
- arg = '';
- }
- continue;
- }
- append(c);
- }
- if (arg.length > 0) {
- args.push(arg.trim());
- }
- return args;
+function createAbortSignal() {
+ const signal = Object.create(AbortSignal.prototype);
+ eventTargetShim.EventTarget.call(signal);
+ abortedFlags.set(signal, false);
+ return signal;
}
-exports.argStringToArray = argStringToArray;
-class ExecState extends events.EventEmitter {
- constructor(options, toolPath) {
- super();
- this.processClosed = false; // tracks whether the process has exited and stdio is closed
- this.processError = '';
- this.processExitCode = 0;
- this.processExited = false; // tracks whether the process has exited
- this.processStderr = false; // tracks whether stderr was written to
- this.delay = 10000; // 10 seconds
- this.done = false;
- this.timeout = null;
- if (!toolPath) {
- throw new Error('toolPath must not be empty');
- }
- this.options = options;
- this.toolPath = toolPath;
- if (options.delay) {
- this.delay = options.delay;
- }
+/**
+ * Abort a given signal.
+ */
+function abortSignal(signal) {
+ if (abortedFlags.get(signal) !== false) {
+ return;
}
- CheckComplete() {
- if (this.done) {
- return;
- }
- if (this.processClosed) {
- this._setResult();
- }
- else if (this.processExited) {
- this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);
- }
+ abortedFlags.set(signal, true);
+ signal.dispatchEvent({ type: "abort" });
+}
+/**
+ * Aborted flag for each instances.
+ */
+const abortedFlags = new WeakMap();
+// Properties should be enumerable.
+Object.defineProperties(AbortSignal.prototype, {
+ aborted: { enumerable: true },
+});
+// `toString()` should return `"[object AbortSignal]"`
+if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") {
+ Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, {
+ configurable: true,
+ value: "AbortSignal",
+ });
+}
+
+/**
+ * The AbortController.
+ * @see https://dom.spec.whatwg.org/#abortcontroller
+ */
+class AbortController {
+ /**
+ * Initialize this controller.
+ */
+ constructor() {
+ signals.set(this, createAbortSignal());
}
- _debug(message) {
- this.emit('debug', message);
+ /**
+ * Returns the `AbortSignal` object associated with this object.
+ */
+ get signal() {
+ return getSignal(this);
}
- _setResult() {
- // determine whether there is an error
- let error;
- if (this.processExited) {
- if (this.processError) {
- error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);
- }
- else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {
- error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
- }
- else if (this.processStderr && this.options.failOnStdErr) {
- error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);
- }
- }
- // clear the timeout
- if (this.timeout) {
- clearTimeout(this.timeout);
- this.timeout = null;
- }
- this.done = true;
- this.emit('done', error, this.processExitCode);
+ /**
+ * Abort and signal to any observers that the associated activity is to be aborted.
+ */
+ abort() {
+ abortSignal(getSignal(this));
}
- static HandleTimeout(state) {
- if (state.done) {
- return;
- }
- if (!state.processClosed && state.processExited) {
- const message = `The STDIO streams did not close within ${state.delay /
- 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;
- state._debug(message);
- }
- state._setResult();
+}
+/**
+ * Associated signals.
+ */
+const signals = new WeakMap();
+/**
+ * Get the associated signal of a given controller.
+ */
+function getSignal(controller) {
+ const signal = signals.get(controller);
+ if (signal == null) {
+ throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`);
}
+ return signal;
+}
+// Properties should be enumerable.
+Object.defineProperties(AbortController.prototype, {
+ signal: { enumerable: true },
+ abort: { enumerable: true },
+});
+if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") {
+ Object.defineProperty(AbortController.prototype, Symbol.toStringTag, {
+ configurable: true,
+ value: "AbortController",
+ });
}
-//# sourceMappingURL=toolrunner.js.map
+
+exports.AbortController = AbortController;
+exports.AbortSignal = AbortSignal;
+exports["default"] = AbortController;
+
+module.exports = AbortController
+module.exports.AbortController = module.exports["default"] = AbortController
+module.exports.AbortSignal = AbortSignal
+//# sourceMappingURL=abort-controller.js.map
+
/***/ }),
-/***/ 45003:
-/***/ (function(__unused_webpack_module, exports) {
+/***/ 5183:
+/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-"use strict";
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;
-class BasicCredentialHandler {
- constructor(username, password) {
- this.username = username;
- this.password = password;
- }
- prepareRequest(options) {
- if (!options.headers) {
- throw Error('The request has no headers');
- }
- options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;
- }
- // This handler cannot handle 401
- canHandleAuthentication() {
- return false;
- }
- handleAuthentication() {
- return __awaiter(this, void 0, void 0, function* () {
- throw new Error('not implemented');
- });
+exports.req = exports.json = exports.toBuffer = void 0;
+const http = __importStar(__nccwpck_require__(8611));
+const https = __importStar(__nccwpck_require__(5692));
+async function toBuffer(stream) {
+ let length = 0;
+ const chunks = [];
+ for await (const chunk of stream) {
+ length += chunk.length;
+ chunks.push(chunk);
}
+ return Buffer.concat(chunks, length);
}
-exports.BasicCredentialHandler = BasicCredentialHandler;
-class BearerCredentialHandler {
- constructor(token) {
- this.token = token;
- }
- // currently implements pre-authorization
- // TODO: support preAuth = false where it hooks on 401
- prepareRequest(options) {
- if (!options.headers) {
- throw Error('The request has no headers');
- }
- options.headers['Authorization'] = `Bearer ${this.token}`;
- }
- // This handler cannot handle 401
- canHandleAuthentication() {
- return false;
+exports.toBuffer = toBuffer;
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+async function json(stream) {
+ const buf = await toBuffer(stream);
+ const str = buf.toString('utf8');
+ try {
+ return JSON.parse(str);
}
- handleAuthentication() {
- return __awaiter(this, void 0, void 0, function* () {
- throw new Error('not implemented');
- });
+ catch (_err) {
+ const err = _err;
+ err.message += ` (input: ${str})`;
+ throw err;
}
}
-exports.BearerCredentialHandler = BearerCredentialHandler;
-class PersonalAccessTokenCredentialHandler {
- constructor(token) {
- this.token = token;
- }
- // currently implements pre-authorization
- // TODO: support preAuth = false where it hooks on 401
- prepareRequest(options) {
- if (!options.headers) {
- throw Error('The request has no headers');
- }
- options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;
- }
- // This handler cannot handle 401
- canHandleAuthentication() {
- return false;
- }
- handleAuthentication() {
- return __awaiter(this, void 0, void 0, function* () {
- throw new Error('not implemented');
- });
- }
+exports.json = json;
+function req(url, opts = {}) {
+ const href = typeof url === 'string' ? url : url.href;
+ const req = (href.startsWith('https:') ? https : http).request(url, opts);
+ const promise = new Promise((resolve, reject) => {
+ req
+ .once('response', resolve)
+ .once('error', reject)
+ .end();
+ });
+ req.then = promise.then.bind(promise);
+ return req;
}
-exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
-//# sourceMappingURL=auth.js.map
+exports.req = req;
+//# sourceMappingURL=helpers.js.map
/***/ }),
-/***/ 58418:
+/***/ 8894:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-"use strict";
-/* eslint-disable @typescript-eslint/no-explicit-any */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -10096,104976 +7263,93101 @@ var __importStar = (this && this.__importStar) || function (mod) {
__setModuleDefault(result, mod);
return result;
};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
-const http = __importStar(__nccwpck_require__(13685));
-const https = __importStar(__nccwpck_require__(95687));
-const pm = __importStar(__nccwpck_require__(98136));
-const tunnel = __importStar(__nccwpck_require__(74294));
-const undici_1 = __nccwpck_require__(41773);
-var HttpCodes;
-(function (HttpCodes) {
- HttpCodes[HttpCodes["OK"] = 200] = "OK";
- HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices";
- HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently";
- HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved";
- HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther";
- HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified";
- HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy";
- HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy";
- HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect";
- HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect";
- HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest";
- HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized";
- HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired";
- HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden";
- HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound";
- HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed";
- HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable";
- HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
- HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout";
- HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict";
- HttpCodes[HttpCodes["Gone"] = 410] = "Gone";
- HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests";
- HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError";
- HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented";
- HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway";
- HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
- HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
-})(HttpCodes || (exports.HttpCodes = HttpCodes = {}));
-var Headers;
-(function (Headers) {
- Headers["Accept"] = "accept";
- Headers["ContentType"] = "content-type";
-})(Headers || (exports.Headers = Headers = {}));
-var MediaTypes;
-(function (MediaTypes) {
- MediaTypes["ApplicationJson"] = "application/json";
-})(MediaTypes || (exports.MediaTypes = MediaTypes = {}));
-/**
- * Returns the proxy URL, depending upon the supplied url and proxy environment variables.
- * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
- */
-function getProxyUrl(serverUrl) {
- const proxyUrl = pm.getProxyUrl(new URL(serverUrl));
- return proxyUrl ? proxyUrl.href : '';
-}
-exports.getProxyUrl = getProxyUrl;
-const HttpRedirectCodes = [
- HttpCodes.MovedPermanently,
- HttpCodes.ResourceMoved,
- HttpCodes.SeeOther,
- HttpCodes.TemporaryRedirect,
- HttpCodes.PermanentRedirect
-];
-const HttpResponseRetryCodes = [
- HttpCodes.BadGateway,
- HttpCodes.ServiceUnavailable,
- HttpCodes.GatewayTimeout
-];
-const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
-const ExponentialBackoffCeiling = 10;
-const ExponentialBackoffTimeSlice = 5;
-class HttpClientError extends Error {
- constructor(message, statusCode) {
- super(message);
- this.name = 'HttpClientError';
- this.statusCode = statusCode;
- Object.setPrototypeOf(this, HttpClientError.prototype);
- }
-}
-exports.HttpClientError = HttpClientError;
-class HttpClientResponse {
- constructor(message) {
- this.message = message;
- }
- readBody() {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
- let output = Buffer.alloc(0);
- this.message.on('data', (chunk) => {
- output = Buffer.concat([output, chunk]);
- });
- this.message.on('end', () => {
- resolve(output.toString());
- });
- }));
- });
- }
- readBodyBuffer() {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
- const chunks = [];
- this.message.on('data', (chunk) => {
- chunks.push(chunk);
- });
- this.message.on('end', () => {
- resolve(Buffer.concat(chunks));
- });
- }));
- });
+exports.Agent = void 0;
+const net = __importStar(__nccwpck_require__(9278));
+const http = __importStar(__nccwpck_require__(8611));
+const https_1 = __nccwpck_require__(5692);
+__exportStar(__nccwpck_require__(5183), exports);
+const INTERNAL = Symbol('AgentBaseInternalState');
+class Agent extends http.Agent {
+ constructor(opts) {
+ super(opts);
+ this[INTERNAL] = {};
}
-}
-exports.HttpClientResponse = HttpClientResponse;
-function isHttps(requestUrl) {
- const parsedUrl = new URL(requestUrl);
- return parsedUrl.protocol === 'https:';
-}
-exports.isHttps = isHttps;
-class HttpClient {
- constructor(userAgent, handlers, requestOptions) {
- this._ignoreSslError = false;
- this._allowRedirects = true;
- this._allowRedirectDowngrade = false;
- this._maxRedirects = 50;
- this._allowRetries = false;
- this._maxRetries = 1;
- this._keepAlive = false;
- this._disposed = false;
- this.userAgent = userAgent;
- this.handlers = handlers || [];
- this.requestOptions = requestOptions;
- if (requestOptions) {
- if (requestOptions.ignoreSslError != null) {
- this._ignoreSslError = requestOptions.ignoreSslError;
- }
- this._socketTimeout = requestOptions.socketTimeout;
- if (requestOptions.allowRedirects != null) {
- this._allowRedirects = requestOptions.allowRedirects;
- }
- if (requestOptions.allowRedirectDowngrade != null) {
- this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
- }
- if (requestOptions.maxRedirects != null) {
- this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
- }
- if (requestOptions.keepAlive != null) {
- this._keepAlive = requestOptions.keepAlive;
- }
- if (requestOptions.allowRetries != null) {
- this._allowRetries = requestOptions.allowRetries;
+ /**
+ * Determine whether this is an `http` or `https` request.
+ */
+ isSecureEndpoint(options) {
+ if (options) {
+ // First check the `secureEndpoint` property explicitly, since this
+ // means that a parent `Agent` is "passing through" to this instance.
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ if (typeof options.secureEndpoint === 'boolean') {
+ return options.secureEndpoint;
}
- if (requestOptions.maxRetries != null) {
- this._maxRetries = requestOptions.maxRetries;
+ // If no explicit `secure` endpoint, check if `protocol` property is
+ // set. This will usually be the case since using a full string URL
+ // or `URL` instance should be the most common usage.
+ if (typeof options.protocol === 'string') {
+ return options.protocol === 'https:';
}
}
+ // Finally, if no `protocol` property was set, then fall back to
+ // checking the stack trace of the current call stack, and try to
+ // detect the "https" module.
+ const { stack } = new Error();
+ if (typeof stack !== 'string')
+ return false;
+ return stack
+ .split('\n')
+ .some((l) => l.indexOf('(https.js:') !== -1 ||
+ l.indexOf('node:https:') !== -1);
}
- options(requestUrl, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});
- });
+ // In order to support async signatures in `connect()` and Node's native
+ // connection pooling in `http.Agent`, the array of sockets for each origin
+ // has to be updated synchronously. This is so the length of the array is
+ // accurate when `addRequest()` is next called. We achieve this by creating a
+ // fake socket and adding it to `sockets[origin]` and incrementing
+ // `totalSocketCount`.
+ incrementSockets(name) {
+ // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no
+ // need to create a fake socket because Node.js native connection pooling
+ // will never be invoked.
+ if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
+ return null;
+ }
+ // All instances of `sockets` are expected TypeScript errors. The
+ // alternative is to add it as a private property of this class but that
+ // will break TypeScript subclassing.
+ if (!this.sockets[name]) {
+ // @ts-expect-error `sockets` is readonly in `@types/node`
+ this.sockets[name] = [];
+ }
+ const fakeSocket = new net.Socket({ writable: false });
+ this.sockets[name].push(fakeSocket);
+ // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`
+ this.totalSocketCount++;
+ return fakeSocket;
}
- get(requestUrl, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('GET', requestUrl, null, additionalHeaders || {});
- });
+ decrementSockets(name, socket) {
+ if (!this.sockets[name] || socket === null) {
+ return;
+ }
+ const sockets = this.sockets[name];
+ const index = sockets.indexOf(socket);
+ if (index !== -1) {
+ sockets.splice(index, 1);
+ // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`
+ this.totalSocketCount--;
+ if (sockets.length === 0) {
+ // @ts-expect-error `sockets` is readonly in `@types/node`
+ delete this.sockets[name];
+ }
+ }
}
- del(requestUrl, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('DELETE', requestUrl, null, additionalHeaders || {});
- });
+ // In order to properly update the socket pool, we need to call `getName()` on
+ // the core `https.Agent` if it is a secureEndpoint.
+ getName(options) {
+ const secureEndpoint = this.isSecureEndpoint(options);
+ if (secureEndpoint) {
+ // @ts-expect-error `getName()` isn't defined in `@types/node`
+ return https_1.Agent.prototype.getName.call(this, options);
+ }
+ // @ts-expect-error `getName()` isn't defined in `@types/node`
+ return super.getName(options);
}
- post(requestUrl, data, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('POST', requestUrl, data, additionalHeaders || {});
+ createSocket(req, options, cb) {
+ const connectOpts = {
+ ...options,
+ secureEndpoint: this.isSecureEndpoint(options),
+ };
+ const name = this.getName(connectOpts);
+ const fakeSocket = this.incrementSockets(name);
+ Promise.resolve()
+ .then(() => this.connect(req, connectOpts))
+ .then((socket) => {
+ this.decrementSockets(name, fakeSocket);
+ if (socket instanceof http.Agent) {
+ try {
+ // @ts-expect-error `addRequest()` isn't defined in `@types/node`
+ return socket.addRequest(req, connectOpts);
+ }
+ catch (err) {
+ return cb(err);
+ }
+ }
+ this[INTERNAL].currentSocket = socket;
+ // @ts-expect-error `createSocket()` isn't defined in `@types/node`
+ super.createSocket(req, options, cb);
+ }, (err) => {
+ this.decrementSockets(name, fakeSocket);
+ cb(err);
});
}
- patch(requestUrl, data, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('PATCH', requestUrl, data, additionalHeaders || {});
- });
+ createConnection() {
+ const socket = this[INTERNAL].currentSocket;
+ this[INTERNAL].currentSocket = undefined;
+ if (!socket) {
+ throw new Error('No socket was returned in the `connect()` function');
+ }
+ return socket;
}
- put(requestUrl, data, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('PUT', requestUrl, data, additionalHeaders || {});
- });
+ get defaultPort() {
+ return (this[INTERNAL].defaultPort ??
+ (this.protocol === 'https:' ? 443 : 80));
}
- head(requestUrl, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('HEAD', requestUrl, null, additionalHeaders || {});
- });
+ set defaultPort(v) {
+ if (this[INTERNAL]) {
+ this[INTERNAL].defaultPort = v;
+ }
}
- sendStream(verb, requestUrl, stream, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request(verb, requestUrl, stream, additionalHeaders);
- });
+ get protocol() {
+ return (this[INTERNAL].protocol ??
+ (this.isSecureEndpoint() ? 'https:' : 'http:'));
}
- /**
- * Gets a typed object from an endpoint
- * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise
- */
- getJson(requestUrl, additionalHeaders = {}) {
- return __awaiter(this, void 0, void 0, function* () {
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- const res = yield this.get(requestUrl, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- });
+ set protocol(v) {
+ if (this[INTERNAL]) {
+ this[INTERNAL].protocol = v;
+ }
}
- postJson(requestUrl, obj, additionalHeaders = {}) {
- return __awaiter(this, void 0, void 0, function* () {
- const data = JSON.stringify(obj, null, 2);
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
- const res = yield this.post(requestUrl, data, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- });
+}
+exports.Agent = Agent;
+//# sourceMappingURL=index.js.map
+
+/***/ }),
+
+/***/ 8816:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+/**
+ * archiver-utils
+ *
+ * Copyright (c) 2012-2014 Chris Talkington, contributors.
+ * Licensed under the MIT license.
+ * https://github.com/archiverjs/node-archiver/blob/master/LICENSE-MIT
+ */
+var fs = __nccwpck_require__(5744);
+var path = __nccwpck_require__(6928);
+
+var flatten = __nccwpck_require__(7047);
+var difference = __nccwpck_require__(7294);
+var union = __nccwpck_require__(3270);
+var isPlainObject = __nccwpck_require__(6542);
+
+var glob = __nccwpck_require__(1363);
+
+var file = module.exports = {};
+
+var pathSeparatorRe = /[\/\\]/g;
+
+// Process specified wildcard glob patterns or filenames against a
+// callback, excluding and uniquing files in the result set.
+var processPatterns = function(patterns, fn) {
+ // Filepaths to return.
+ var result = [];
+ // Iterate over flattened patterns array.
+ flatten(patterns).forEach(function(pattern) {
+ // If the first character is ! it should be omitted
+ var exclusion = pattern.indexOf('!') === 0;
+ // If the pattern is an exclusion, remove the !
+ if (exclusion) { pattern = pattern.slice(1); }
+ // Find all matching files for this pattern.
+ var matches = fn(pattern);
+ if (exclusion) {
+ // If an exclusion, remove matching files.
+ result = difference(result, matches);
+ } else {
+ // Otherwise add matching files.
+ result = union(result, matches);
}
- putJson(requestUrl, obj, additionalHeaders = {}) {
- return __awaiter(this, void 0, void 0, function* () {
- const data = JSON.stringify(obj, null, 2);
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
- const res = yield this.put(requestUrl, data, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- });
+ });
+ return result;
+};
+
+// True if the file path exists.
+file.exists = function() {
+ var filepath = path.join.apply(path, arguments);
+ return fs.existsSync(filepath);
+};
+
+// Return an array of all file paths that match the given wildcard patterns.
+file.expand = function(...args) {
+ // If the first argument is an options object, save those options to pass
+ // into the File.prototype.glob.sync method.
+ var options = isPlainObject(args[0]) ? args.shift() : {};
+ // Use the first argument if it's an Array, otherwise convert the arguments
+ // object to an array and use that.
+ var patterns = Array.isArray(args[0]) ? args[0] : args;
+ // Return empty set if there are no patterns or filepaths.
+ if (patterns.length === 0) { return []; }
+ // Return all matching filepaths.
+ var matches = processPatterns(patterns, function(pattern) {
+ // Find all matching files for this pattern.
+ return glob.sync(pattern, options);
+ });
+ // Filter result set?
+ if (options.filter) {
+ matches = matches.filter(function(filepath) {
+ filepath = path.join(options.cwd || '', filepath);
+ try {
+ if (typeof options.filter === 'function') {
+ return options.filter(filepath);
+ } else {
+ // If the file is of the right type and exists, this should work.
+ return fs.statSync(filepath)[options.filter]();
+ }
+ } catch(e) {
+ // Otherwise, it's probably not the right type.
+ return false;
+ }
+ });
+ }
+ return matches;
+};
+
+// Build a multi task "files" object dynamically.
+file.expandMapping = function(patterns, destBase, options) {
+ options = Object.assign({
+ rename: function(destBase, destPath) {
+ return path.join(destBase || '', destPath);
}
- patchJson(requestUrl, obj, additionalHeaders = {}) {
- return __awaiter(this, void 0, void 0, function* () {
- const data = JSON.stringify(obj, null, 2);
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
- const res = yield this.patch(requestUrl, data, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- });
- }
- /**
- * Makes a raw http request.
- * All other methods such as get, post, patch, and request ultimately call this.
- * Prefer get, del, post and patch
- */
- request(verb, requestUrl, data, headers) {
- return __awaiter(this, void 0, void 0, function* () {
- if (this._disposed) {
- throw new Error('Client has already been disposed.');
- }
- const parsedUrl = new URL(requestUrl);
- let info = this._prepareRequest(verb, parsedUrl, headers);
- // Only perform retries on reads since writes may not be idempotent.
- const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)
- ? this._maxRetries + 1
- : 1;
- let numTries = 0;
- let response;
- do {
- response = yield this.requestRaw(info, data);
- // Check if it's an authentication challenge
- if (response &&
- response.message &&
- response.message.statusCode === HttpCodes.Unauthorized) {
- let authenticationHandler;
- for (const handler of this.handlers) {
- if (handler.canHandleAuthentication(response)) {
- authenticationHandler = handler;
- break;
- }
- }
- if (authenticationHandler) {
- return authenticationHandler.handleAuthentication(this, info, data);
- }
- else {
- // We have received an unauthorized response but have no handlers to handle it.
- // Let the response return to the caller.
- return response;
- }
- }
- let redirectsRemaining = this._maxRedirects;
- while (response.message.statusCode &&
- HttpRedirectCodes.includes(response.message.statusCode) &&
- this._allowRedirects &&
- redirectsRemaining > 0) {
- const redirectUrl = response.message.headers['location'];
- if (!redirectUrl) {
- // if there's no location to redirect to, we won't
- break;
- }
- const parsedRedirectUrl = new URL(redirectUrl);
- if (parsedUrl.protocol === 'https:' &&
- parsedUrl.protocol !== parsedRedirectUrl.protocol &&
- !this._allowRedirectDowngrade) {
- throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');
- }
- // we need to finish reading the response before reassigning response
- // which will leak the open socket.
- yield response.readBody();
- // strip authorization header if redirected to a different hostname
- if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
- for (const header in headers) {
- // header names are case insensitive
- if (header.toLowerCase() === 'authorization') {
- delete headers[header];
- }
- }
- }
- // let's make the request with the new redirectUrl
- info = this._prepareRequest(verb, parsedRedirectUrl, headers);
- response = yield this.requestRaw(info, data);
- redirectsRemaining--;
- }
- if (!response.message.statusCode ||
- !HttpResponseRetryCodes.includes(response.message.statusCode)) {
- // If not a retry code, return immediately instead of retrying
- return response;
- }
- numTries += 1;
- if (numTries < maxTries) {
- yield response.readBody();
- yield this._performExponentialBackoff(numTries);
- }
- } while (numTries < maxTries);
- return response;
- });
- }
- /**
- * Needs to be called if keepAlive is set to true in request options.
- */
- dispose() {
- if (this._agent) {
- this._agent.destroy();
- }
- this._disposed = true;
- }
- /**
- * Raw request.
- * @param info
- * @param data
- */
- requestRaw(info, data) {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise((resolve, reject) => {
- function callbackForResult(err, res) {
- if (err) {
- reject(err);
- }
- else if (!res) {
- // If `err` is not passed, then `res` must be passed.
- reject(new Error('Unknown error'));
- }
- else {
- resolve(res);
- }
- }
- this.requestRawWithCallback(info, data, callbackForResult);
- });
- });
- }
- /**
- * Raw request with callback.
- * @param info
- * @param data
- * @param onResult
- */
- requestRawWithCallback(info, data, onResult) {
- if (typeof data === 'string') {
- if (!info.options.headers) {
- info.options.headers = {};
- }
- info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');
- }
- let callbackCalled = false;
- function handleResult(err, res) {
- if (!callbackCalled) {
- callbackCalled = true;
- onResult(err, res);
- }
- }
- const req = info.httpModule.request(info.options, (msg) => {
- const res = new HttpClientResponse(msg);
- handleResult(undefined, res);
- });
- let socket;
- req.on('socket', sock => {
- socket = sock;
- });
- // If we ever get disconnected, we want the socket to timeout eventually
- req.setTimeout(this._socketTimeout || 3 * 60000, () => {
- if (socket) {
- socket.end();
- }
- handleResult(new Error(`Request timeout: ${info.options.path}`));
- });
- req.on('error', function (err) {
- // err has statusCode property
- // res should have headers
- handleResult(err);
- });
- if (data && typeof data === 'string') {
- req.write(data, 'utf8');
- }
- if (data && typeof data !== 'string') {
- data.on('close', function () {
- req.end();
- });
- data.pipe(req);
- }
- else {
- req.end();
- }
- }
- /**
- * Gets an http agent. This function is useful when you need an http agent that handles
- * routing through a proxy server - depending upon the url and proxy environment variables.
- * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
- */
- getAgent(serverUrl) {
- const parsedUrl = new URL(serverUrl);
- return this._getAgent(parsedUrl);
+ }, options);
+ var files = [];
+ var fileByDest = {};
+ // Find all files matching pattern, using passed-in options.
+ file.expand(options, patterns).forEach(function(src) {
+ var destPath = src;
+ // Flatten?
+ if (options.flatten) {
+ destPath = path.basename(destPath);
}
- getAgentDispatcher(serverUrl) {
- const parsedUrl = new URL(serverUrl);
- const proxyUrl = pm.getProxyUrl(parsedUrl);
- const useProxy = proxyUrl && proxyUrl.hostname;
- if (!useProxy) {
- return;
- }
- return this._getProxyAgentDispatcher(parsedUrl, proxyUrl);
+ // Change the extension?
+ if (options.ext) {
+ destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext);
}
- _prepareRequest(method, requestUrl, headers) {
- const info = {};
- info.parsedUrl = requestUrl;
- const usingSsl = info.parsedUrl.protocol === 'https:';
- info.httpModule = usingSsl ? https : http;
- const defaultPort = usingSsl ? 443 : 80;
- info.options = {};
- info.options.host = info.parsedUrl.hostname;
- info.options.port = info.parsedUrl.port
- ? parseInt(info.parsedUrl.port)
- : defaultPort;
- info.options.path =
- (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');
- info.options.method = method;
- info.options.headers = this._mergeHeaders(headers);
- if (this.userAgent != null) {
- info.options.headers['user-agent'] = this.userAgent;
- }
- info.options.agent = this._getAgent(info.parsedUrl);
- // gives handlers an opportunity to participate
- if (this.handlers) {
- for (const handler of this.handlers) {
- handler.prepareRequest(info.options);
- }
- }
- return info;
+ // Generate destination filename.
+ var dest = options.rename(destBase, destPath, options);
+ // Prepend cwd to src path if necessary.
+ if (options.cwd) { src = path.join(options.cwd, src); }
+ // Normalize filepaths to be unix-style.
+ dest = dest.replace(pathSeparatorRe, '/');
+ src = src.replace(pathSeparatorRe, '/');
+ // Map correct src path to dest path.
+ if (fileByDest[dest]) {
+ // If dest already exists, push this src onto that dest's src array.
+ fileByDest[dest].src.push(src);
+ } else {
+ // Otherwise create a new src-dest file mapping object.
+ files.push({
+ src: [src],
+ dest: dest,
+ });
+ // And store a reference for later use.
+ fileByDest[dest] = files[files.length - 1];
}
- _mergeHeaders(headers) {
- if (this.requestOptions && this.requestOptions.headers) {
- return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));
- }
- return lowercaseKeys(headers || {});
+ });
+ return files;
+};
+
+// reusing bits of grunt's multi-task source normalization
+file.normalizeFilesArray = function(data) {
+ var files = [];
+
+ data.forEach(function(obj) {
+ var prop;
+ if ('src' in obj || 'dest' in obj) {
+ files.push(obj);
}
- _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
- let clientHeader;
- if (this.requestOptions && this.requestOptions.headers) {
- clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
- }
- return additionalHeaders[header] || clientHeader || _default;
+ });
+
+ if (files.length === 0) {
+ return [];
+ }
+
+ files = _(files).chain().forEach(function(obj) {
+ if (!('src' in obj) || !obj.src) { return; }
+ // Normalize .src properties to flattened array.
+ if (Array.isArray(obj.src)) {
+ obj.src = flatten(obj.src);
+ } else {
+ obj.src = [obj.src];
}
- _getAgent(parsedUrl) {
- let agent;
- const proxyUrl = pm.getProxyUrl(parsedUrl);
- const useProxy = proxyUrl && proxyUrl.hostname;
- if (this._keepAlive && useProxy) {
- agent = this._proxyAgent;
- }
- if (!useProxy) {
- agent = this._agent;
- }
- // if agent is already assigned use that agent.
- if (agent) {
- return agent;
- }
- const usingSsl = parsedUrl.protocol === 'https:';
- let maxSockets = 100;
- if (this.requestOptions) {
- maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
- }
- // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.
- if (proxyUrl && proxyUrl.hostname) {
- const agentOptions = {
- maxSockets,
- keepAlive: this._keepAlive,
- proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {
- proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
- })), { host: proxyUrl.hostname, port: proxyUrl.port })
- };
- let tunnelAgent;
- const overHttps = proxyUrl.protocol === 'https:';
- if (usingSsl) {
- tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
- }
- else {
- tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
- }
- agent = tunnelAgent(agentOptions);
- this._proxyAgent = agent;
- }
- // if tunneling agent isn't assigned create a new agent
- if (!agent) {
- const options = { keepAlive: this._keepAlive, maxSockets };
- agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
- this._agent = agent;
- }
- if (usingSsl && this._ignoreSslError) {
- // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
- // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
- // we have to cast it to any and change it directly
- agent.options = Object.assign(agent.options || {}, {
- rejectUnauthorized: false
- });
- }
- return agent;
+ }).map(function(obj) {
+ // Build options object, removing unwanted properties.
+ var expandOptions = Object.assign({}, obj);
+ delete expandOptions.src;
+ delete expandOptions.dest;
+
+ // Expand file mappings.
+ if (obj.expand) {
+ return file.expandMapping(obj.src, obj.dest, expandOptions).map(function(mapObj) {
+ // Copy obj properties to result.
+ var result = Object.assign({}, obj);
+ // Make a clone of the orig obj available.
+ result.orig = Object.assign({}, obj);
+ // Set .src and .dest, processing both as templates.
+ result.src = mapObj.src;
+ result.dest = mapObj.dest;
+ // Remove unwanted properties.
+ ['expand', 'cwd', 'flatten', 'rename', 'ext'].forEach(function(prop) {
+ delete result[prop];
+ });
+ return result;
+ });
}
- _getProxyAgentDispatcher(parsedUrl, proxyUrl) {
- let proxyAgent;
- if (this._keepAlive) {
- proxyAgent = this._proxyAgentDispatcher;
- }
- // if agent is already assigned use that agent.
- if (proxyAgent) {
- return proxyAgent;
- }
- const usingSsl = parsedUrl.protocol === 'https:';
- proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {
- token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`
- })));
- this._proxyAgentDispatcher = proxyAgent;
- if (usingSsl && this._ignoreSslError) {
- // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
- // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
- // we have to cast it to any and change it directly
- proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {
- rejectUnauthorized: false
- });
+
+ // Copy obj properties to result, adding an .orig property.
+ var result = Object.assign({}, obj);
+ // Make a clone of the orig obj available.
+ result.orig = Object.assign({}, obj);
+
+ if ('src' in result) {
+ // Expose an expand-on-demand getter method as .src.
+ Object.defineProperty(result, 'src', {
+ enumerable: true,
+ get: function fn() {
+ var src;
+ if (!('result' in fn)) {
+ src = obj.src;
+ // If src is an array, flatten it. Otherwise, make it into an array.
+ src = Array.isArray(src) ? flatten(src) : [src];
+ // Expand src files, memoizing result.
+ fn.result = file.expand(expandOptions, src);
+ }
+ return fn.result;
}
- return proxyAgent;
- }
- _performExponentialBackoff(retryNumber) {
- return __awaiter(this, void 0, void 0, function* () {
- retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
- const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
- return new Promise(resolve => setTimeout(() => resolve(), ms));
- });
+ });
}
- _processResponse(res, options) {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
- const statusCode = res.message.statusCode || 0;
- const response = {
- statusCode,
- result: null,
- headers: {}
- };
- // not found leads to null obj returned
- if (statusCode === HttpCodes.NotFound) {
- resolve(response);
- }
- // get the result from the body
- function dateTimeDeserializer(key, value) {
- if (typeof value === 'string') {
- const a = new Date(value);
- if (!isNaN(a.valueOf())) {
- return a;
- }
- }
- return value;
- }
- let obj;
- let contents;
- try {
- contents = yield res.readBody();
- if (contents && contents.length > 0) {
- if (options && options.deserializeDates) {
- obj = JSON.parse(contents, dateTimeDeserializer);
- }
- else {
- obj = JSON.parse(contents);
- }
- response.result = obj;
- }
- response.headers = res.message.headers;
- }
- catch (err) {
- // Invalid resource (contents not json); leaving result obj null
- }
- // note that 3xx redirects are handled by the http layer.
- if (statusCode > 299) {
- let msg;
- // if exception/error in body, attempt to get better error
- if (obj && obj.message) {
- msg = obj.message;
- }
- else if (contents && contents.length > 0) {
- // it may be the case that the exception is in the body message as string
- msg = contents;
- }
- else {
- msg = `Failed request: (${statusCode})`;
- }
- const err = new HttpClientError(msg, statusCode);
- err.result = response.result;
- reject(err);
- }
- else {
- resolve(response);
- }
- }));
- });
+
+ if ('dest' in result) {
+ result.dest = obj.dest;
}
-}
-exports.HttpClient = HttpClient;
-const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
-//# sourceMappingURL=index.js.map
+
+ return result;
+ }).flatten().value();
+
+ return files;
+};
+
/***/ }),
-/***/ 98136:
-/***/ ((__unused_webpack_module, exports) => {
+/***/ 3296:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-"use strict";
+/**
+ * archiver-utils
+ *
+ * Copyright (c) 2015 Chris Talkington.
+ * Licensed under the MIT license.
+ * https://github.com/archiverjs/archiver-utils/blob/master/LICENSE
+ */
+var fs = __nccwpck_require__(5744);
+var path = __nccwpck_require__(6928);
+var isStream = __nccwpck_require__(6543);
+var lazystream = __nccwpck_require__(2126);
+var normalizePath = __nccwpck_require__(6133);
+var defaults = __nccwpck_require__(7511);
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.checkBypass = exports.getProxyUrl = void 0;
-function getProxyUrl(reqUrl) {
- const usingSsl = reqUrl.protocol === 'https:';
- if (checkBypass(reqUrl)) {
- return undefined;
- }
- const proxyVar = (() => {
- if (usingSsl) {
- return process.env['https_proxy'] || process.env['HTTPS_PROXY'];
- }
- else {
- return process.env['http_proxy'] || process.env['HTTP_PROXY'];
- }
- })();
- if (proxyVar) {
- try {
- return new DecodedURL(proxyVar);
- }
- catch (_a) {
- if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
- return new DecodedURL(`http://${proxyVar}`);
- }
- }
- else {
- return undefined;
- }
-}
-exports.getProxyUrl = getProxyUrl;
-function checkBypass(reqUrl) {
- if (!reqUrl.hostname) {
- return false;
- }
- const reqHost = reqUrl.hostname;
- if (isLoopbackAddress(reqHost)) {
- return true;
- }
- const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';
- if (!noProxy) {
- return false;
- }
- // Determine the request port
- let reqPort;
- if (reqUrl.port) {
- reqPort = Number(reqUrl.port);
- }
- else if (reqUrl.protocol === 'http:') {
- reqPort = 80;
- }
- else if (reqUrl.protocol === 'https:') {
- reqPort = 443;
- }
- // Format the request hostname and hostname with port
- const upperReqHosts = [reqUrl.hostname.toUpperCase()];
- if (typeof reqPort === 'number') {
- upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
- }
- // Compare request host against noproxy
- for (const upperNoProxyItem of noProxy
- .split(',')
- .map(x => x.trim().toUpperCase())
- .filter(x => x)) {
- if (upperNoProxyItem === '*' ||
- upperReqHosts.some(x => x === upperNoProxyItem ||
- x.endsWith(`.${upperNoProxyItem}`) ||
- (upperNoProxyItem.startsWith('.') &&
- x.endsWith(`${upperNoProxyItem}`)))) {
- return true;
- }
- }
- return false;
-}
-exports.checkBypass = checkBypass;
-function isLoopbackAddress(host) {
- const hostLower = host.toLowerCase();
- return (hostLower === 'localhost' ||
- hostLower.startsWith('127.') ||
- hostLower.startsWith('[::1]') ||
- hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
-}
-class DecodedURL extends URL {
- constructor(url, base) {
- super(url, base);
- this._decodedUsername = decodeURIComponent(super.username);
- this._decodedPassword = decodeURIComponent(super.password);
- }
- get username() {
- return this._decodedUsername;
- }
- get password() {
- return this._decodedPassword;
- }
-}
-//# sourceMappingURL=proxy.js.map
+var Stream = (__nccwpck_require__(2203).Stream);
+var PassThrough = (__nccwpck_require__(9963).PassThrough);
-/***/ }),
+var utils = module.exports = {};
+utils.file = __nccwpck_require__(8816);
-/***/ 76260:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+utils.collectStream = function(source, callback) {
+ var collection = [];
+ var size = 0;
-"use strict";
+ source.on('error', callback);
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
+ source.on('data', function(chunk) {
+ collection.push(chunk);
+ size += chunk.length;
+ });
+
+ source.on('end', function() {
+ var buf = Buffer.alloc(size);
+ var offset = 0;
+
+ collection.forEach(function(data) {
+ data.copy(buf, offset);
+ offset += data.length;
});
+
+ callback(null, buf);
+ });
};
-var _a;
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
-const fs = __importStar(__nccwpck_require__(57147));
-const path = __importStar(__nccwpck_require__(71017));
-_a = fs.promises
-// export const {open} = 'fs'
-, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
-// export const {open} = 'fs'
-exports.IS_WINDOWS = process.platform === 'win32';
-// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691
-exports.UV_FS_O_EXLOCK = 0x10000000;
-exports.READONLY = fs.constants.O_RDONLY;
-function exists(fsPath) {
- return __awaiter(this, void 0, void 0, function* () {
- try {
- yield exports.stat(fsPath);
- }
- catch (err) {
- if (err.code === 'ENOENT') {
- return false;
- }
- throw err;
- }
- return true;
- });
-}
-exports.exists = exists;
-function isDirectory(fsPath, useStat = false) {
- return __awaiter(this, void 0, void 0, function* () {
- const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath);
- return stats.isDirectory();
- });
-}
-exports.isDirectory = isDirectory;
-/**
- * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:
- * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases).
- */
-function isRooted(p) {
- p = normalizeSeparators(p);
- if (!p) {
- throw new Error('isRooted() parameter "p" cannot be empty');
- }
- if (exports.IS_WINDOWS) {
- return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello
- ); // e.g. C: or C:\hello
- }
- return p.startsWith('/');
-}
-exports.isRooted = isRooted;
-/**
- * Best effort attempt to determine whether a file exists and is executable.
- * @param filePath file path to check
- * @param extensions additional file extensions to try
- * @return if file exists and is executable, returns the file path. otherwise empty string.
- */
-function tryGetExecutablePath(filePath, extensions) {
- return __awaiter(this, void 0, void 0, function* () {
- let stats = undefined;
- try {
- // test file exists
- stats = yield exports.stat(filePath);
- }
- catch (err) {
- if (err.code !== 'ENOENT') {
- // eslint-disable-next-line no-console
- console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);
- }
- }
- if (stats && stats.isFile()) {
- if (exports.IS_WINDOWS) {
- // on Windows, test for valid extension
- const upperExt = path.extname(filePath).toUpperCase();
- if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {
- return filePath;
- }
- }
- else {
- if (isUnixExecutable(stats)) {
- return filePath;
- }
- }
- }
- // try each extension
- const originalFilePath = filePath;
- for (const extension of extensions) {
- filePath = originalFilePath + extension;
- stats = undefined;
- try {
- stats = yield exports.stat(filePath);
- }
- catch (err) {
- if (err.code !== 'ENOENT') {
- // eslint-disable-next-line no-console
- console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);
- }
- }
- if (stats && stats.isFile()) {
- if (exports.IS_WINDOWS) {
- // preserve the case of the actual file (since an extension was appended)
- try {
- const directory = path.dirname(filePath);
- const upperName = path.basename(filePath).toUpperCase();
- for (const actualName of yield exports.readdir(directory)) {
- if (upperName === actualName.toUpperCase()) {
- filePath = path.join(directory, actualName);
- break;
- }
- }
- }
- catch (err) {
- // eslint-disable-next-line no-console
- console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);
- }
- return filePath;
- }
- else {
- if (isUnixExecutable(stats)) {
- return filePath;
- }
- }
- }
- }
- return '';
- });
-}
-exports.tryGetExecutablePath = tryGetExecutablePath;
-function normalizeSeparators(p) {
- p = p || '';
- if (exports.IS_WINDOWS) {
- // convert slashes on Windows
- p = p.replace(/\//g, '\\');
- // remove redundant slashes
- return p.replace(/\\\\+/g, '\\');
- }
- // remove redundant slashes
- return p.replace(/\/\/+/g, '/');
-}
-// on Mac/Linux, test the execute bit
-// R W X R W X R W X
-// 256 128 64 32 16 8 4 2 1
-function isUnixExecutable(stats) {
- return ((stats.mode & 1) > 0 ||
- ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||
- ((stats.mode & 64) > 0 && stats.uid === process.getuid()));
-}
-// Get the path of cmd.exe in windows
-function getCmdPath() {
- var _a;
- return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;
-}
-exports.getCmdPath = getCmdPath;
-//# sourceMappingURL=io-util.js.map
-/***/ }),
+utils.dateify = function(dateish) {
+ dateish = dateish || new Date();
-/***/ 55974:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+ if (dateish instanceof Date) {
+ dateish = dateish;
+ } else if (typeof dateish === 'string') {
+ dateish = new Date(dateish);
+ } else {
+ dateish = new Date();
+ }
-"use strict";
+ return dateish;
+};
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
+// this is slightly different from lodash version
+utils.defaults = function(object, source, guard) {
+ var args = arguments;
+ args[0] = args[0] || {};
+
+ return defaults(...args);
};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
+
+utils.isStream = function(source) {
+ return isStream(source);
};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;
-const assert_1 = __nccwpck_require__(39491);
-const path = __importStar(__nccwpck_require__(71017));
-const ioUtil = __importStar(__nccwpck_require__(76260));
-/**
- * Copies a file or folder.
- * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
- *
- * @param source source path
- * @param dest destination path
- * @param options optional. See CopyOptions.
- */
-function cp(source, dest, options = {}) {
- return __awaiter(this, void 0, void 0, function* () {
- const { force, recursive, copySourceDirectory } = readCopyOptions(options);
- const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;
- // Dest is an existing file, but not forcing
- if (destStat && destStat.isFile() && !force) {
- return;
- }
- // If dest is an existing directory, should copy inside.
- const newDest = destStat && destStat.isDirectory() && copySourceDirectory
- ? path.join(dest, path.basename(source))
- : dest;
- if (!(yield ioUtil.exists(source))) {
- throw new Error(`no such file or directory: ${source}`);
- }
- const sourceStat = yield ioUtil.stat(source);
- if (sourceStat.isDirectory()) {
- if (!recursive) {
- throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);
- }
- else {
- yield cpDirRecursive(source, newDest, 0, force);
- }
- }
- else {
- if (path.relative(source, newDest) === '') {
- // a file cannot be copied to itself
- throw new Error(`'${newDest}' and '${source}' are the same file`);
- }
- yield copyFile(source, newDest, force);
+
+utils.lazyReadStream = function(filepath) {
+ return new lazystream.Readable(function() {
+ return fs.createReadStream(filepath);
+ });
+};
+
+utils.normalizeInputSource = function(source) {
+ if (source === null) {
+ return Buffer.alloc(0);
+ } else if (typeof source === 'string') {
+ return Buffer.from(source);
+ } else if (utils.isStream(source)) {
+ // Always pipe through a PassThrough stream to guarantee pausing the stream if it's already flowing,
+ // since it will only be processed in a (distant) future iteration of the event loop, and will lose
+ // data if already flowing now.
+ return source.pipe(new PassThrough());
+ }
+
+ return source;
+};
+
+utils.sanitizePath = function(filepath) {
+ return normalizePath(filepath, false).replace(/^\w+:/, '').replace(/^(\.\.\/|\/)+/, '');
+};
+
+utils.trailingSlashIt = function(str) {
+ return str.slice(-1) !== '/' ? str + '/' : str;
+};
+
+utils.unixifyPath = function(filepath) {
+ return normalizePath(filepath, false).replace(/^\w+:/, '');
+};
+
+utils.walkdir = function(dirpath, base, callback) {
+ var results = [];
+
+ if (typeof base === 'function') {
+ callback = base;
+ base = dirpath;
+ }
+
+ fs.readdir(dirpath, function(err, list) {
+ var i = 0;
+ var file;
+ var filepath;
+
+ if (err) {
+ return callback(err);
+ }
+
+ (function next() {
+ file = list[i++];
+
+ if (!file) {
+ return callback(null, results);
+ }
+
+ filepath = path.join(dirpath, file);
+
+ fs.stat(filepath, function(err, stats) {
+ results.push({
+ path: filepath,
+ relative: path.relative(base, filepath).replace(/\\/g, '/'),
+ stats: stats
+ });
+
+ if (stats && stats.isDirectory()) {
+ utils.walkdir(filepath, base, function(err, res) {
+ if(err){
+ return callback(err);
+ }
+
+ res.forEach(function(dirEntry) {
+ results.push(dirEntry);
+ });
+
+ next();
+ });
+ } else {
+ next();
}
- });
-}
-exports.cp = cp;
+ });
+ })();
+ });
+};
+
+
+/***/ }),
+
+/***/ 9392:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
/**
- * Moves a path.
+ * Archiver Vending
*
- * @param source source path
- * @param dest destination path
- * @param options optional. See MoveOptions.
+ * @ignore
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
*/
-function mv(source, dest, options = {}) {
- return __awaiter(this, void 0, void 0, function* () {
- if (yield ioUtil.exists(dest)) {
- let destExists = true;
- if (yield ioUtil.isDirectory(dest)) {
- // If dest is directory copy src into dest
- dest = path.join(dest, path.basename(source));
- destExists = yield ioUtil.exists(dest);
- }
- if (destExists) {
- if (options.force == null || options.force) {
- yield rmRF(dest);
- }
- else {
- throw new Error('Destination already exists');
- }
- }
- }
- yield mkdirP(path.dirname(dest));
- yield ioUtil.rename(source, dest);
- });
-}
-exports.mv = mv;
+var Archiver = __nccwpck_require__(549);
+
+var formats = {};
+
/**
- * Remove a path recursively with force
+ * Dispenses a new Archiver instance.
*
- * @param inputPath path to remove
+ * @constructor
+ * @param {String} format The archive format to use.
+ * @param {Object} options See [Archiver]{@link Archiver}
+ * @return {Archiver}
*/
-function rmRF(inputPath) {
- return __awaiter(this, void 0, void 0, function* () {
- if (ioUtil.IS_WINDOWS) {
- // Check for invalid characters
- // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
- if (/[*"<>|]/.test(inputPath)) {
- throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');
- }
- }
- try {
- // note if path does not exist, error is silent
- yield ioUtil.rm(inputPath, {
- force: true,
- maxRetries: 3,
- recursive: true,
- retryDelay: 300
- });
- }
- catch (err) {
- throw new Error(`File was unable to be removed ${err}`);
- }
- });
-}
-exports.rmRF = rmRF;
+var vending = function(format, options) {
+ return vending.create(format, options);
+};
+
/**
- * Make a directory. Creates the full path with folders in between
- * Will throw if it fails
+ * Creates a new Archiver instance.
*
- * @param fsPath path to create
- * @returns Promise
+ * @param {String} format The archive format to use.
+ * @param {Object} options See [Archiver]{@link Archiver}
+ * @return {Archiver}
*/
-function mkdirP(fsPath) {
- return __awaiter(this, void 0, void 0, function* () {
- assert_1.ok(fsPath, 'a path argument must be provided');
- yield ioUtil.mkdir(fsPath, { recursive: true });
- });
-}
-exports.mkdirP = mkdirP;
+vending.create = function(format, options) {
+ if (formats[format]) {
+ var instance = new Archiver(format, options);
+ instance.setFormat(format);
+ instance.setModule(new formats[format](options));
+
+ return instance;
+ } else {
+ throw new Error('create(' + format + '): format not registered');
+ }
+};
+
/**
- * Returns path of a tool had the tool actually been invoked. Resolves via paths.
- * If you check and the tool does not exist, it will throw.
+ * Registers a format for use with archiver.
*
- * @param tool name of the tool
- * @param check whether to check if tool exists
- * @returns Promise path to tool
- */
-function which(tool, check) {
- return __awaiter(this, void 0, void 0, function* () {
- if (!tool) {
- throw new Error("parameter 'tool' is required");
- }
- // recursive when check=true
- if (check) {
- const result = yield which(tool, false);
- if (!result) {
- if (ioUtil.IS_WINDOWS) {
- throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`);
- }
- else {
- throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);
- }
- }
- return result;
- }
- const matches = yield findInPath(tool);
- if (matches && matches.length > 0) {
- return matches[0];
- }
- return '';
- });
-}
-exports.which = which;
-/**
- * Returns a list of all occurrences of the given tool on the system path.
- *
- * @returns Promise the paths of the tool
+ * @param {String} format The name of the format.
+ * @param {Function} module The function for archiver to interact with.
+ * @return void
*/
-function findInPath(tool) {
- return __awaiter(this, void 0, void 0, function* () {
- if (!tool) {
- throw new Error("parameter 'tool' is required");
- }
- // build the list of extensions to try
- const extensions = [];
- if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {
- for (const extension of process.env['PATHEXT'].split(path.delimiter)) {
- if (extension) {
- extensions.push(extension);
- }
- }
- }
- // if it's rooted, return it if exists. otherwise return empty.
- if (ioUtil.isRooted(tool)) {
- const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);
- if (filePath) {
- return [filePath];
- }
- return [];
- }
- // if any path separators, return empty
- if (tool.includes(path.sep)) {
- return [];
- }
- // build the list of directories
- //
- // Note, technically "where" checks the current directory on Windows. From a toolkit perspective,
- // it feels like we should not do this. Checking the current directory seems like more of a use
- // case of a shell, and the which() function exposed by the toolkit should strive for consistency
- // across platforms.
- const directories = [];
- if (process.env.PATH) {
- for (const p of process.env.PATH.split(path.delimiter)) {
- if (p) {
- directories.push(p);
- }
- }
- }
- // find all matches
- const matches = [];
- for (const directory of directories) {
- const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);
- if (filePath) {
- matches.push(filePath);
- }
- }
- return matches;
- });
-}
-exports.findInPath = findInPath;
-function readCopyOptions(options) {
- const force = options.force == null ? true : options.force;
- const recursive = Boolean(options.recursive);
- const copySourceDirectory = options.copySourceDirectory == null
- ? true
- : Boolean(options.copySourceDirectory);
- return { force, recursive, copySourceDirectory };
-}
-function cpDirRecursive(sourceDir, destDir, currentDepth, force) {
- return __awaiter(this, void 0, void 0, function* () {
- // Ensure there is not a run away recursive copy
- if (currentDepth >= 255)
- return;
- currentDepth++;
- yield mkdirP(destDir);
- const files = yield ioUtil.readdir(sourceDir);
- for (const fileName of files) {
- const srcFile = `${sourceDir}/${fileName}`;
- const destFile = `${destDir}/${fileName}`;
- const srcFileStat = yield ioUtil.lstat(srcFile);
- if (srcFileStat.isDirectory()) {
- // Recurse
- yield cpDirRecursive(srcFile, destFile, currentDepth, force);
- }
- else {
- yield copyFile(srcFile, destFile, force);
- }
- }
- // Change the mode for the newly created directory
- yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);
- });
-}
-// Buffered file copy
-function copyFile(srcFile, destFile, force) {
- return __awaiter(this, void 0, void 0, function* () {
- if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {
- // unlink/re-link it
- try {
- yield ioUtil.lstat(destFile);
- yield ioUtil.unlink(destFile);
- }
- catch (e) {
- // Try to override file permission
- if (e.code === 'EPERM') {
- yield ioUtil.chmod(destFile, '0666');
- yield ioUtil.unlink(destFile);
- }
- // other errors = it doesn't exist, no work to do
- }
- // Copy over symlink
- const symlinkFull = yield ioUtil.readlink(srcFile);
- yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);
- }
- else if (!(yield ioUtil.exists(destFile)) || force) {
- yield ioUtil.copyFile(srcFile, destFile);
- }
- });
-}
-//# sourceMappingURL=io.js.map
-
-/***/ }),
-
-/***/ 9144:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+vending.registerFormat = function(format, module) {
+ if (formats[format]) {
+ throw new Error('register(' + format + '): format already registered');
+ }
-var concatMap = __nccwpck_require__(86891);
-var balanced = __nccwpck_require__(9417);
+ if (typeof module !== 'function') {
+ throw new Error('register(' + format + '): format module invalid');
+ }
-module.exports = expandTop;
+ if (typeof module.prototype.append !== 'function' || typeof module.prototype.finalize !== 'function') {
+ throw new Error('register(' + format + '): format module missing methods');
+ }
-var escSlash = '\0SLASH'+Math.random()+'\0';
-var escOpen = '\0OPEN'+Math.random()+'\0';
-var escClose = '\0CLOSE'+Math.random()+'\0';
-var escComma = '\0COMMA'+Math.random()+'\0';
-var escPeriod = '\0PERIOD'+Math.random()+'\0';
+ formats[format] = module;
+};
-function numeric(str) {
- return parseInt(str, 10) == str
- ? parseInt(str, 10)
- : str.charCodeAt(0);
-}
+/**
+ * Check if the format is already registered.
+ *
+ * @param {String} format the name of the format.
+ * @return boolean
+ */
+vending.isRegisteredFormat = function (format) {
+ if (formats[format]) {
+ return true;
+ }
+
+ return false;
+};
-function escapeBraces(str) {
- return str.split('\\\\').join(escSlash)
- .split('\\{').join(escOpen)
- .split('\\}').join(escClose)
- .split('\\,').join(escComma)
- .split('\\.').join(escPeriod);
-}
+vending.registerFormat('zip', __nccwpck_require__(2836));
+vending.registerFormat('tar', __nccwpck_require__(396));
+vending.registerFormat('json', __nccwpck_require__(4693));
-function unescapeBraces(str) {
- return str.split(escSlash).join('\\')
- .split(escOpen).join('{')
- .split(escClose).join('}')
- .split(escComma).join(',')
- .split(escPeriod).join('.');
-}
+module.exports = vending;
+/***/ }),
-// Basically just str.split(","), but handling cases
-// where we have nested braced sections, which should be
-// treated as individual members, like {a,{b,c},d}
-function parseCommaParts(str) {
- if (!str)
- return [''];
+/***/ 549:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
- var parts = [];
- var m = balanced('{', '}', str);
+/**
+ * Archiver Core
+ *
+ * @ignore
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
+ */
+var fs = __nccwpck_require__(9896);
+var glob = __nccwpck_require__(1364);
+var async = __nccwpck_require__(7329);
+var path = __nccwpck_require__(6928);
+var util = __nccwpck_require__(3296);
- if (!m)
- return str.split(',');
+var inherits = (__nccwpck_require__(9023).inherits);
+var ArchiverError = __nccwpck_require__(3110);
+var Transform = (__nccwpck_require__(9963).Transform);
- var pre = m.pre;
- var body = m.body;
- var post = m.post;
- var p = pre.split(',');
+var win32 = process.platform === 'win32';
- p[p.length-1] += '{' + body + '}';
- var postParts = parseCommaParts(post);
- if (post.length) {
- p[p.length-1] += postParts.shift();
- p.push.apply(p, postParts);
+/**
+ * @constructor
+ * @param {String} format The archive format to use.
+ * @param {(CoreOptions|TransformOptions)} options See also {@link ZipOptions} and {@link TarOptions}.
+ */
+var Archiver = function(format, options) {
+ if (!(this instanceof Archiver)) {
+ return new Archiver(format, options);
}
- parts.push.apply(parts, p);
+ if (typeof format !== 'string') {
+ options = format;
+ format = 'zip';
+ }
- return parts;
-}
+ options = this.options = util.defaults(options, {
+ highWaterMark: 1024 * 1024,
+ statConcurrency: 4
+ });
-function expandTop(str) {
- if (!str)
- return [];
+ Transform.call(this, options);
- // I don't know why Bash 4.3 does this, but it does.
- // Anything starting with {} will have the first two bytes preserved
- // but *only* at the top level, so {},a}b will not expand to anything,
- // but a{},b}c will be expanded to [a}c,abc].
- // One could argue that this is a bug in Bash, but since the goal of
- // this module is to match Bash's rules, we escape a leading {}
- if (str.substr(0, 2) === '{}') {
- str = '\\{\\}' + str.substr(2);
- }
+ this._format = false;
+ this._module = false;
+ this._pending = 0;
+ this._pointer = 0;
- return expand(escapeBraces(str), true).map(unescapeBraces);
-}
+ this._entriesCount = 0;
+ this._entriesProcessedCount = 0;
+ this._fsEntriesTotalBytes = 0;
+ this._fsEntriesProcessedBytes = 0;
-function identity(e) {
- return e;
-}
+ this._queue = async.queue(this._onQueueTask.bind(this), 1);
+ this._queue.drain(this._onQueueDrain.bind(this));
-function embrace(str) {
- return '{' + str + '}';
-}
-function isPadded(el) {
- return /^-?0\d/.test(el);
-}
+ this._statQueue = async.queue(this._onStatQueueTask.bind(this), options.statConcurrency);
+ this._statQueue.drain(this._onQueueDrain.bind(this));
-function lte(i, y) {
- return i <= y;
-}
-function gte(i, y) {
- return i >= y;
-}
+ this._state = {
+ aborted: false,
+ finalize: false,
+ finalizing: false,
+ finalized: false,
+ modulePiped: false
+ };
-function expand(str, isTop) {
- var expansions = [];
+ this._streams = [];
+};
- var m = balanced('{', '}', str);
- if (!m || /\$$/.test(m.pre)) return [str];
+inherits(Archiver, Transform);
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
- var isSequence = isNumericSequence || isAlphaSequence;
- var isOptions = m.body.indexOf(',') >= 0;
- if (!isSequence && !isOptions) {
- // {a},b}
- if (m.post.match(/,(?!,).*\}/)) {
- str = m.pre + '{' + m.body + escClose + m.post;
- return expand(str);
- }
- return [str];
- }
+/**
+ * Internal logic for `abort`.
+ *
+ * @private
+ * @return void
+ */
+Archiver.prototype._abort = function() {
+ this._state.aborted = true;
+ this._queue.kill();
+ this._statQueue.kill();
- var n;
- if (isSequence) {
- n = m.body.split(/\.\./);
- } else {
- n = parseCommaParts(m.body);
- if (n.length === 1) {
- // x{{a,b}}y ==> x{a}y x{b}y
- n = expand(n[0], false).map(embrace);
- if (n.length === 1) {
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
- return post.map(function(p) {
- return m.pre + n[0] + p;
- });
- }
- }
+ if (this._queue.idle()) {
+ this._shutdown();
}
+};
- // at this point, n is the parts, and we know it's not a comma set
- // with a single entry.
-
- // no need to expand pre, since it is guaranteed to be free of brace-sets
- var pre = m.pre;
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
+/**
+ * Internal helper for appending files.
+ *
+ * @private
+ * @param {String} filepath The source filepath.
+ * @param {EntryData} data The entry data.
+ * @return void
+ */
+Archiver.prototype._append = function(filepath, data) {
+ data = data || {};
- var N;
+ var task = {
+ source: null,
+ filepath: filepath
+ };
- if (isSequence) {
- var x = numeric(n[0]);
- var y = numeric(n[1]);
- var width = Math.max(n[0].length, n[1].length)
- var incr = n.length == 3
- ? Math.abs(numeric(n[2]))
- : 1;
- var test = lte;
- var reverse = y < x;
- if (reverse) {
- incr *= -1;
- test = gte;
- }
- var pad = n.some(isPadded);
+ if (!data.name) {
+ data.name = filepath;
+ }
- N = [];
+ data.sourcePath = filepath;
+ task.data = data;
+ this._entriesCount++;
- for (var i = x; test(i, y); i += incr) {
- var c;
- if (isAlphaSequence) {
- c = String.fromCharCode(i);
- if (c === '\\')
- c = '';
- } else {
- c = String(i);
- if (pad) {
- var need = width - c.length;
- if (need > 0) {
- var z = new Array(need + 1).join('0');
- if (i < 0)
- c = '-' + z + c.slice(1);
- else
- c = z + c;
- }
- }
+ if (data.stats && data.stats instanceof fs.Stats) {
+ task = this._updateQueueTaskWithStats(task, data.stats);
+ if (task) {
+ if (data.stats.size) {
+ this._fsEntriesTotalBytes += data.stats.size;
}
- N.push(c);
+
+ this._queue.push(task);
}
} else {
- N = concatMap(n, function(el) { return expand(el, false) });
+ this._statQueue.push(task);
}
+};
- for (var j = 0; j < N.length; j++) {
- for (var k = 0; k < post.length; k++) {
- var expansion = pre + N[j] + post[k];
- if (!isTop || isSequence || expansion)
- expansions.push(expansion);
- }
+/**
+ * Internal logic for `finalize`.
+ *
+ * @private
+ * @return void
+ */
+Archiver.prototype._finalize = function() {
+ if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+ return;
}
- return expansions;
-}
-
-
+ this._state.finalizing = true;
-/***/ }),
+ this._moduleFinalize();
-/***/ 92680:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+ this._state.finalizing = false;
+ this._state.finalized = true;
+};
-module.exports = minimatch
-minimatch.Minimatch = Minimatch
+/**
+ * Checks the various state variables to determine if we can `finalize`.
+ *
+ * @private
+ * @return {Boolean}
+ */
+Archiver.prototype._maybeFinalize = function() {
+ if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+ return false;
+ }
-var path = (function () { try { return __nccwpck_require__(71017) } catch (e) {}}()) || {
- sep: '/'
-}
-minimatch.sep = path.sep
+ if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
+ this._finalize();
+ return true;
+ }
-var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
-var expand = __nccwpck_require__(9144)
+ return false;
+};
-var plTypes = {
- '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
- '?': { open: '(?:', close: ')?' },
- '+': { open: '(?:', close: ')+' },
- '*': { open: '(?:', close: ')*' },
- '@': { open: '(?:', close: ')' }
-}
+/**
+ * Appends an entry to the module.
+ *
+ * @private
+ * @fires Archiver#entry
+ * @param {(Buffer|Stream)} source
+ * @param {EntryData} data
+ * @param {Function} callback
+ * @return void
+ */
+Archiver.prototype._moduleAppend = function(source, data, callback) {
+ if (this._state.aborted) {
+ callback();
+ return;
+ }
-// any single thing other than /
-// don't need to escape / when using new RegExp()
-var qmark = '[^/]'
+ this._module.append(source, data, function(err) {
+ this._task = null;
-// * => any number of characters
-var star = qmark + '*?'
+ if (this._state.aborted) {
+ this._shutdown();
+ return;
+ }
-// ** when dots are allowed. Anything goes, except .. and .
-// not (^ or / followed by one or two dots followed by $ or /),
-// followed by anything, any number of times.
-var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
+ if (err) {
+ this.emit('error', err);
+ setImmediate(callback);
+ return;
+ }
-// not a ^ or / followed by a dot,
-// followed by anything, any number of times.
-var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
+ /**
+ * Fires when the entry's input has been processed and appended to the archive.
+ *
+ * @event Archiver#entry
+ * @type {EntryData}
+ */
+ this.emit('entry', data);
+ this._entriesProcessedCount++;
-// characters that need to be escaped in RegExp.
-var reSpecials = charSet('().*{}+?[]^$\\!')
+ if (data.stats && data.stats.size) {
+ this._fsEntriesProcessedBytes += data.stats.size;
+ }
-// "abc" -> { a:true, b:true, c:true }
-function charSet (s) {
- return s.split('').reduce(function (set, c) {
- set[c] = true
- return set
- }, {})
-}
+ /**
+ * @event Archiver#progress
+ * @type {ProgressData}
+ */
+ this.emit('progress', {
+ entries: {
+ total: this._entriesCount,
+ processed: this._entriesProcessedCount
+ },
+ fs: {
+ totalBytes: this._fsEntriesTotalBytes,
+ processedBytes: this._fsEntriesProcessedBytes
+ }
+ });
-// normalizes slashes.
-var slashSplit = /\/+/
+ setImmediate(callback);
+ }.bind(this));
+};
-minimatch.filter = filter
-function filter (pattern, options) {
- options = options || {}
- return function (p, i, list) {
- return minimatch(p, pattern, options)
+/**
+ * Finalizes the module.
+ *
+ * @private
+ * @return void
+ */
+Archiver.prototype._moduleFinalize = function() {
+ if (typeof this._module.finalize === 'function') {
+ this._module.finalize();
+ } else if (typeof this._module.end === 'function') {
+ this._module.end();
+ } else {
+ this.emit('error', new ArchiverError('NOENDMETHOD'));
}
-}
+};
-function ext (a, b) {
- b = b || {}
- var t = {}
- Object.keys(a).forEach(function (k) {
- t[k] = a[k]
- })
- Object.keys(b).forEach(function (k) {
- t[k] = b[k]
- })
- return t
-}
+/**
+ * Pipes the module to our internal stream with error bubbling.
+ *
+ * @private
+ * @return void
+ */
+Archiver.prototype._modulePipe = function() {
+ this._module.on('error', this._onModuleError.bind(this));
+ this._module.pipe(this);
+ this._state.modulePiped = true;
+};
-minimatch.defaults = function (def) {
- if (!def || typeof def !== 'object' || !Object.keys(def).length) {
- return minimatch
+/**
+ * Determines if the current module supports a defined feature.
+ *
+ * @private
+ * @param {String} key
+ * @return {Boolean}
+ */
+Archiver.prototype._moduleSupports = function(key) {
+ if (!this._module.supports || !this._module.supports[key]) {
+ return false;
}
- var orig = minimatch
+ return this._module.supports[key];
+};
- var m = function minimatch (p, pattern, options) {
- return orig(p, pattern, ext(def, options))
- }
+/**
+ * Unpipes the module from our internal stream.
+ *
+ * @private
+ * @return void
+ */
+Archiver.prototype._moduleUnpipe = function() {
+ this._module.unpipe(this);
+ this._state.modulePiped = false;
+};
- m.Minimatch = function Minimatch (pattern, options) {
- return new orig.Minimatch(pattern, ext(def, options))
- }
- m.Minimatch.defaults = function defaults (options) {
- return orig.defaults(ext(def, options)).Minimatch
- }
+/**
+ * Normalizes entry data with fallbacks for key properties.
+ *
+ * @private
+ * @param {Object} data
+ * @param {fs.Stats} stats
+ * @return {Object}
+ */
+Archiver.prototype._normalizeEntryData = function(data, stats) {
+ data = util.defaults(data, {
+ type: 'file',
+ name: null,
+ date: null,
+ mode: null,
+ prefix: null,
+ sourcePath: null,
+ stats: false
+ });
- m.filter = function filter (pattern, options) {
- return orig.filter(pattern, ext(def, options))
+ if (stats && data.stats === false) {
+ data.stats = stats;
}
- m.defaults = function defaults (options) {
- return orig.defaults(ext(def, options))
- }
+ var isDir = data.type === 'directory';
- m.makeRe = function makeRe (pattern, options) {
- return orig.makeRe(pattern, ext(def, options))
- }
+ if (data.name) {
+ if (typeof data.prefix === 'string' && '' !== data.prefix) {
+ data.name = data.prefix + '/' + data.name;
+ data.prefix = null;
+ }
- m.braceExpand = function braceExpand (pattern, options) {
- return orig.braceExpand(pattern, ext(def, options))
- }
+ data.name = util.sanitizePath(data.name);
- m.match = function (list, pattern, options) {
- return orig.match(list, pattern, ext(def, options))
+ if (data.type !== 'symlink' && data.name.slice(-1) === '/') {
+ isDir = true;
+ data.type = 'directory';
+ } else if (isDir) {
+ data.name += '/';
+ }
}
- return m
-}
-
-Minimatch.defaults = function (def) {
- return minimatch.defaults(def).Minimatch
-}
-
-function minimatch (p, pattern, options) {
- assertValidPattern(pattern)
-
- if (!options) options = {}
+ // 511 === 0777; 493 === 0755; 438 === 0666; 420 === 0644
+ if (typeof data.mode === 'number') {
+ if (win32) {
+ data.mode &= 511;
+ } else {
+ data.mode &= 4095
+ }
+ } else if (data.stats && data.mode === null) {
+ if (win32) {
+ data.mode = data.stats.mode & 511;
+ } else {
+ data.mode = data.stats.mode & 4095;
+ }
- // shortcut: comments match nothing.
- if (!options.nocomment && pattern.charAt(0) === '#') {
- return false
+ // stat isn't reliable on windows; force 0755 for dir
+ if (win32 && isDir) {
+ data.mode = 493;
+ }
+ } else if (data.mode === null) {
+ data.mode = isDir ? 493 : 420;
}
- return new Minimatch(pattern, options).match(p)
-}
-
-function Minimatch (pattern, options) {
- if (!(this instanceof Minimatch)) {
- return new Minimatch(pattern, options)
+ if (data.stats && data.date === null) {
+ data.date = data.stats.mtime;
+ } else {
+ data.date = util.dateify(data.date);
}
- assertValidPattern(pattern)
-
- if (!options) options = {}
+ return data;
+};
- pattern = pattern.trim()
+/**
+ * Error listener that re-emits error on to our internal stream.
+ *
+ * @private
+ * @param {Error} err
+ * @return void
+ */
+Archiver.prototype._onModuleError = function(err) {
+ /**
+ * @event Archiver#error
+ * @type {ErrorData}
+ */
+ this.emit('error', err);
+};
- // windows support: need to use /, not \
- if (!options.allowWindowsEscape && path.sep !== '/') {
- pattern = pattern.split(path.sep).join('/')
+/**
+ * Checks the various state variables after queue has drained to determine if
+ * we need to `finalize`.
+ *
+ * @private
+ * @return void
+ */
+Archiver.prototype._onQueueDrain = function() {
+ if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+ return;
}
- this.options = options
- this.set = []
- this.pattern = pattern
- this.regexp = null
- this.negate = false
- this.comment = false
- this.empty = false
- this.partial = !!options.partial
-
- // make the set of regexps etc.
- this.make()
-}
-
-Minimatch.prototype.debug = function () {}
-
-Minimatch.prototype.make = make
-function make () {
- var pattern = this.pattern
- var options = this.options
+ if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
+ this._finalize();
+ }
+};
- // empty patterns and comments match nothing.
- if (!options.nocomment && pattern.charAt(0) === '#') {
- this.comment = true
- return
+/**
+ * Appends each queue task to the module.
+ *
+ * @private
+ * @param {Object} task
+ * @param {Function} callback
+ * @return void
+ */
+Archiver.prototype._onQueueTask = function(task, callback) {
+ var fullCallback = () => {
+ if(task.data.callback) {
+ task.data.callback();
+ }
+ callback();
}
- if (!pattern) {
- this.empty = true
- return
+
+ if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+ fullCallback();
+ return;
}
- // step 1: figure out negation, etc.
- this.parseNegate()
+ this._task = task;
+ this._moduleAppend(task.source, task.data, fullCallback);
+};
- // step 2: expand braces
- var set = this.globSet = this.braceExpand()
+/**
+ * Performs a file stat and reinjects the task back into the queue.
+ *
+ * @private
+ * @param {Object} task
+ * @param {Function} callback
+ * @return void
+ */
+Archiver.prototype._onStatQueueTask = function(task, callback) {
+ if (this._state.finalizing || this._state.finalized || this._state.aborted) {
+ callback();
+ return;
+ }
- if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
+ fs.lstat(task.filepath, function(err, stats) {
+ if (this._state.aborted) {
+ setImmediate(callback);
+ return;
+ }
- this.debug(this.pattern, set)
+ if (err) {
+ this._entriesCount--;
- // step 3: now we have a set, so turn each one into a series of path-portion
- // matching patterns.
- // These will be regexps, except in the case of "**", which is
- // set to the GLOBSTAR object for globstar behavior,
- // and will not contain any / characters
- set = this.globParts = set.map(function (s) {
- return s.split(slashSplit)
- })
+ /**
+ * @event Archiver#warning
+ * @type {ErrorData}
+ */
+ this.emit('warning', err);
+ setImmediate(callback);
+ return;
+ }
- this.debug(this.pattern, set)
+ task = this._updateQueueTaskWithStats(task, stats);
- // glob --> regexps
- set = set.map(function (s, si, set) {
- return s.map(this.parse, this)
- }, this)
+ if (task) {
+ if (stats.size) {
+ this._fsEntriesTotalBytes += stats.size;
+ }
- this.debug(this.pattern, set)
+ this._queue.push(task);
+ }
- // filter out everything that didn't compile properly.
- set = set.filter(function (s) {
- return s.indexOf(false) === -1
- })
+ setImmediate(callback);
+ }.bind(this));
+};
- this.debug(this.pattern, set)
+/**
+ * Unpipes the module and ends our internal stream.
+ *
+ * @private
+ * @return void
+ */
+Archiver.prototype._shutdown = function() {
+ this._moduleUnpipe();
+ this.end();
+};
- this.set = set
-}
+/**
+ * Tracks the bytes emitted by our internal stream.
+ *
+ * @private
+ * @param {Buffer} chunk
+ * @param {String} encoding
+ * @param {Function} callback
+ * @return void
+ */
+Archiver.prototype._transform = function(chunk, encoding, callback) {
+ if (chunk) {
+ this._pointer += chunk.length;
+ }
-Minimatch.prototype.parseNegate = parseNegate
-function parseNegate () {
- var pattern = this.pattern
- var negate = false
- var options = this.options
- var negateOffset = 0
+ callback(null, chunk);
+};
- if (options.nonegate) return
+/**
+ * Updates and normalizes a queue task using stats data.
+ *
+ * @private
+ * @param {Object} task
+ * @param {fs.Stats} stats
+ * @return {Object}
+ */
+Archiver.prototype._updateQueueTaskWithStats = function(task, stats) {
+ if (stats.isFile()) {
+ task.data.type = 'file';
+ task.data.sourceType = 'stream';
+ task.source = util.lazyReadStream(task.filepath);
+ } else if (stats.isDirectory() && this._moduleSupports('directory')) {
+ task.data.name = util.trailingSlashIt(task.data.name);
+ task.data.type = 'directory';
+ task.data.sourcePath = util.trailingSlashIt(task.filepath);
+ task.data.sourceType = 'buffer';
+ task.source = Buffer.concat([]);
+ } else if (stats.isSymbolicLink() && this._moduleSupports('symlink')) {
+ var linkPath = fs.readlinkSync(task.filepath);
+ var dirName = path.dirname(task.filepath);
+ task.data.type = 'symlink';
+ task.data.linkname = path.relative(dirName, path.resolve(dirName, linkPath));
+ task.data.sourceType = 'buffer';
+ task.source = Buffer.concat([]);
+ } else {
+ if (stats.isDirectory()) {
+ this.emit('warning', new ArchiverError('DIRECTORYNOTSUPPORTED', task.data));
+ } else if (stats.isSymbolicLink()) {
+ this.emit('warning', new ArchiverError('SYMLINKNOTSUPPORTED', task.data));
+ } else {
+ this.emit('warning', new ArchiverError('ENTRYNOTSUPPORTED', task.data));
+ }
- for (var i = 0, l = pattern.length
- ; i < l && pattern.charAt(i) === '!'
- ; i++) {
- negate = !negate
- negateOffset++
+ return null;
}
- if (negateOffset) this.pattern = pattern.substr(negateOffset)
- this.negate = negate
-}
-
-// Brace expansion:
-// a{b,c}d -> abd acd
-// a{b,}c -> abc ac
-// a{0..3}d -> a0d a1d a2d a3d
-// a{b,c{d,e}f}g -> abg acdfg acefg
-// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
-//
-// Invalid sets are not expanded.
-// a{2..}b -> a{2..}b
-// a{b}c -> a{b}c
-minimatch.braceExpand = function (pattern, options) {
- return braceExpand(pattern, options)
-}
+ task.data = this._normalizeEntryData(task.data, stats);
-Minimatch.prototype.braceExpand = braceExpand
+ return task;
+};
-function braceExpand (pattern, options) {
- if (!options) {
- if (this instanceof Minimatch) {
- options = this.options
- } else {
- options = {}
- }
+/**
+ * Aborts the archiving process, taking a best-effort approach, by:
+ *
+ * - removing any pending queue tasks
+ * - allowing any active queue workers to finish
+ * - detaching internal module pipes
+ * - ending both sides of the Transform stream
+ *
+ * It will NOT drain any remaining sources.
+ *
+ * @return {this}
+ */
+Archiver.prototype.abort = function() {
+ if (this._state.aborted || this._state.finalized) {
+ return this;
}
- pattern = typeof pattern === 'undefined'
- ? this.pattern : pattern
+ this._abort();
- assertValidPattern(pattern)
+ return this;
+};
- // Thanks to Yeting Li for
- // improving this regexp to avoid a ReDOS vulnerability.
- if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
- // shortcut. no need to expand.
- return [pattern]
+/**
+ * Appends an input source (text string, buffer, or stream) to the instance.
+ *
+ * When the instance has received, processed, and emitted the input, the `entry`
+ * event is fired.
+ *
+ * @fires Archiver#entry
+ * @param {(Buffer|Stream|String)} source The input source.
+ * @param {EntryData} data See also {@link ZipEntryData} and {@link TarEntryData}.
+ * @return {this}
+ */
+Archiver.prototype.append = function(source, data) {
+ if (this._state.finalize || this._state.aborted) {
+ this.emit('error', new ArchiverError('QUEUECLOSED'));
+ return this;
}
- return expand(pattern)
-}
+ data = this._normalizeEntryData(data);
-var MAX_PATTERN_LENGTH = 1024 * 64
-var assertValidPattern = function (pattern) {
- if (typeof pattern !== 'string') {
- throw new TypeError('invalid pattern')
+ if (typeof data.name !== 'string' || data.name.length === 0) {
+ this.emit('error', new ArchiverError('ENTRYNAMEREQUIRED'));
+ return this;
}
- if (pattern.length > MAX_PATTERN_LENGTH) {
- throw new TypeError('pattern is too long')
+ if (data.type === 'directory' && !this._moduleSupports('directory')) {
+ this.emit('error', new ArchiverError('DIRECTORYNOTSUPPORTED', { name: data.name }));
+ return this;
}
-}
-// parse a component of the expanded set.
-// At this point, no pattern may contain "/" in it
-// so we're going to return a 2d array, where each entry is the full
-// pattern, split on '/', and then turned into a regular expression.
-// A regexp is made at the end which joins each array with an
-// escaped /, and another full one which joins each regexp with |.
-//
-// Following the lead of Bash 4.1, note that "**" only has special meaning
-// when it is the *only* thing in a path portion. Otherwise, any series
-// of * is equivalent to a single *. Globstar behavior is enabled by
-// default, and can be disabled by setting options.noglobstar.
-Minimatch.prototype.parse = parse
-var SUBPARSE = {}
-function parse (pattern, isSub) {
- assertValidPattern(pattern)
-
- var options = this.options
+ source = util.normalizeInputSource(source);
- // shortcuts
- if (pattern === '**') {
- if (!options.noglobstar)
- return GLOBSTAR
- else
- pattern = '*'
+ if (Buffer.isBuffer(source)) {
+ data.sourceType = 'buffer';
+ } else if (util.isStream(source)) {
+ data.sourceType = 'stream';
+ } else {
+ this.emit('error', new ArchiverError('INPUTSTEAMBUFFERREQUIRED', { name: data.name }));
+ return this;
}
- if (pattern === '') return ''
- var re = ''
- var hasMagic = !!options.nocase
- var escaping = false
- // ? => one single character
- var patternListStack = []
- var negativeLists = []
- var stateChar
- var inClass = false
- var reClassStart = -1
- var classStart = -1
- // . and .. never match anything that doesn't start with .,
- // even when options.dot is set.
- var patternStart = pattern.charAt(0) === '.' ? '' // anything
- // not (start or / followed by . or .. followed by / or end)
- : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
- : '(?!\\.)'
- var self = this
+ this._entriesCount++;
+ this._queue.push({
+ data: data,
+ source: source
+ });
- function clearStateChar () {
- if (stateChar) {
- // we had some state-tracking character
- // that wasn't consumed by this pass.
- switch (stateChar) {
- case '*':
- re += star
- hasMagic = true
- break
- case '?':
- re += qmark
- hasMagic = true
- break
- default:
- re += '\\' + stateChar
- break
- }
- self.debug('clearStateChar %j %j', stateChar, re)
- stateChar = false
- }
+ return this;
+};
+
+/**
+ * Appends a directory and its files, recursively, given its dirpath.
+ *
+ * @param {String} dirpath The source directory path.
+ * @param {String} destpath The destination path within the archive.
+ * @param {(EntryData|Function)} data See also [ZipEntryData]{@link ZipEntryData} and
+ * [TarEntryData]{@link TarEntryData}.
+ * @return {this}
+ */
+Archiver.prototype.directory = function(dirpath, destpath, data) {
+ if (this._state.finalize || this._state.aborted) {
+ this.emit('error', new ArchiverError('QUEUECLOSED'));
+ return this;
}
- for (var i = 0, len = pattern.length, c
- ; (i < len) && (c = pattern.charAt(i))
- ; i++) {
- this.debug('%s\t%s %s %j', pattern, i, re, c)
+ if (typeof dirpath !== 'string' || dirpath.length === 0) {
+ this.emit('error', new ArchiverError('DIRECTORYDIRPATHREQUIRED'));
+ return this;
+ }
- // skip over any that are escaped.
- if (escaping && reSpecials[c]) {
- re += '\\' + c
- escaping = false
- continue
- }
+ this._pending++;
- switch (c) {
- /* istanbul ignore next */
- case '/': {
- // completely not allowed, even escaped.
- // Should already be path-split by now.
- return false
- }
+ if (destpath === false) {
+ destpath = '';
+ } else if (typeof destpath !== 'string'){
+ destpath = dirpath;
+ }
- case '\\':
- clearStateChar()
- escaping = true
- continue
+ var dataFunction = false;
+ if (typeof data === 'function') {
+ dataFunction = data;
+ data = {};
+ } else if (typeof data !== 'object') {
+ data = {};
+ }
- // the various stateChar values
- // for the "extglob" stuff.
- case '?':
- case '*':
- case '+':
- case '@':
- case '!':
- this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
+ var globOptions = {
+ stat: true,
+ dot: true
+ };
- // all of those are literals inside a class, except that
- // the glob [!a] means [^a] in regexp
- if (inClass) {
- this.debug(' in class')
- if (c === '!' && i === classStart + 1) c = '^'
- re += c
- continue
- }
+ function onGlobEnd() {
+ this._pending--;
+ this._maybeFinalize();
+ }
- // if we already have a stateChar, then it means
- // that there was something like ** or +? in there.
- // Handle the stateChar, then proceed with this one.
- self.debug('call clearStateChar %j', stateChar)
- clearStateChar()
- stateChar = c
- // if extglob is disabled, then +(asdf|foo) isn't a thing.
- // just clear the statechar *now*, rather than even diving into
- // the patternList stuff.
- if (options.noext) clearStateChar()
- continue
+ function onGlobError(err) {
+ this.emit('error', err);
+ }
- case '(':
- if (inClass) {
- re += '('
- continue
- }
+ function onGlobMatch(match){
+ globber.pause();
- if (!stateChar) {
- re += '\\('
- continue
- }
+ var ignoreMatch = false;
+ var entryData = Object.assign({}, data);
+ entryData.name = match.relative;
+ entryData.prefix = destpath;
+ entryData.stats = match.stat;
+ entryData.callback = globber.resume.bind(globber);
- patternListStack.push({
- type: stateChar,
- start: i - 1,
- reStart: re.length,
- open: plTypes[stateChar].open,
- close: plTypes[stateChar].close
- })
- // negation is (?:(?!js)[^/]*)
- re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
- this.debug('plType %j %j', stateChar, re)
- stateChar = false
- continue
+ try {
+ if (dataFunction) {
+ entryData = dataFunction(entryData);
- case ')':
- if (inClass || !patternListStack.length) {
- re += '\\)'
- continue
+ if (entryData === false) {
+ ignoreMatch = true;
+ } else if (typeof entryData !== 'object') {
+ throw new ArchiverError('DIRECTORYFUNCTIONINVALIDDATA', { dirpath: dirpath });
}
+ }
+ } catch(e) {
+ this.emit('error', e);
+ return;
+ }
- clearStateChar()
- hasMagic = true
- var pl = patternListStack.pop()
- // negation is (?:(?!js)[^/]*)
- // The others are (?:)
- re += pl.close
- if (pl.type === '!') {
- negativeLists.push(pl)
- }
- pl.reEnd = re.length
- continue
+ if (ignoreMatch) {
+ globber.resume();
+ return;
+ }
- case '|':
- if (inClass || !patternListStack.length || escaping) {
- re += '\\|'
- escaping = false
- continue
- }
+ this._append(match.absolute, entryData);
+ }
- clearStateChar()
- re += '|'
- continue
+ var globber = glob(dirpath, globOptions);
+ globber.on('error', onGlobError.bind(this));
+ globber.on('match', onGlobMatch.bind(this));
+ globber.on('end', onGlobEnd.bind(this));
- // these are mostly the same in regexp and glob
- case '[':
- // swallow any state-tracking char before the [
- clearStateChar()
+ return this;
+};
- if (inClass) {
- re += '\\' + c
- continue
- }
+/**
+ * Appends a file given its filepath using a
+ * [lazystream]{@link https://github.com/jpommerening/node-lazystream} wrapper to
+ * prevent issues with open file limits.
+ *
+ * When the instance has received, processed, and emitted the file, the `entry`
+ * event is fired.
+ *
+ * @param {String} filepath The source filepath.
+ * @param {EntryData} data See also [ZipEntryData]{@link ZipEntryData} and
+ * [TarEntryData]{@link TarEntryData}.
+ * @return {this}
+ */
+Archiver.prototype.file = function(filepath, data) {
+ if (this._state.finalize || this._state.aborted) {
+ this.emit('error', new ArchiverError('QUEUECLOSED'));
+ return this;
+ }
- inClass = true
- classStart = i
- reClassStart = re.length
- re += c
- continue
+ if (typeof filepath !== 'string' || filepath.length === 0) {
+ this.emit('error', new ArchiverError('FILEFILEPATHREQUIRED'));
+ return this;
+ }
- case ']':
- // a right bracket shall lose its special
- // meaning and represent itself in
- // a bracket expression if it occurs
- // first in the list. -- POSIX.2 2.8.3.2
- if (i === classStart + 1 || !inClass) {
- re += '\\' + c
- escaping = false
- continue
- }
+ this._append(filepath, data);
- // handle the case where we left a class open.
- // "[z-a]" is valid, equivalent to "\[z-a\]"
- // split where the last [ was, make sure we don't have
- // an invalid re. if so, re-walk the contents of the
- // would-be class to re-translate any characters that
- // were passed through as-is
- // TODO: It would probably be faster to determine this
- // without a try/catch and a new RegExp, but it's tricky
- // to do safely. For now, this is safe and works.
- var cs = pattern.substring(classStart + 1, i)
- try {
- RegExp('[' + cs + ']')
- } catch (er) {
- // not a valid class!
- var sp = this.parse(cs, SUBPARSE)
- re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
- hasMagic = hasMagic || sp[1]
- inClass = false
- continue
- }
+ return this;
+};
- // finish up the class.
- hasMagic = true
- inClass = false
- re += c
- continue
+/**
+ * Appends multiple files that match a glob pattern.
+ *
+ * @param {String} pattern The [glob pattern]{@link https://github.com/isaacs/minimatch} to match.
+ * @param {Object} options See [node-readdir-glob]{@link https://github.com/yqnn/node-readdir-glob#options}.
+ * @param {EntryData} data See also [ZipEntryData]{@link ZipEntryData} and
+ * [TarEntryData]{@link TarEntryData}.
+ * @return {this}
+ */
+Archiver.prototype.glob = function(pattern, options, data) {
+ this._pending++;
- default:
- // swallow any state char that wasn't consumed
- clearStateChar()
+ options = util.defaults(options, {
+ stat: true,
+ pattern: pattern
+ });
- if (escaping) {
- // no need
- escaping = false
- } else if (reSpecials[c]
- && !(c === '^' && inClass)) {
- re += '\\'
- }
+ function onGlobEnd() {
+ this._pending--;
+ this._maybeFinalize();
+ }
- re += c
+ function onGlobError(err) {
+ this.emit('error', err);
+ }
- } // switch
- } // for
+ function onGlobMatch(match){
+ globber.pause();
+ var entryData = Object.assign({}, data);
+ entryData.callback = globber.resume.bind(globber);
+ entryData.stats = match.stat;
+ entryData.name = match.relative;
- // handle the case where we left a class open.
- // "[abc" is valid, equivalent to "\[abc"
- if (inClass) {
- // split where the last [ was, and escape it
- // this is a huge pita. We now have to re-walk
- // the contents of the would-be class to re-translate
- // any characters that were passed through as-is
- cs = pattern.substr(classStart + 1)
- sp = this.parse(cs, SUBPARSE)
- re = re.substr(0, reClassStart) + '\\[' + sp[0]
- hasMagic = hasMagic || sp[1]
+ this._append(match.absolute, entryData);
}
- // handle the case where we had a +( thing at the *end*
- // of the pattern.
- // each pattern list stack adds 3 chars, and we need to go through
- // and escape any | chars that were passed through as-is for the regexp.
- // Go through and escape them, taking care not to double-escape any
- // | chars that were already escaped.
- for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
- var tail = re.slice(pl.reStart + pl.open.length)
- this.debug('setting tail', re, pl)
- // maybe some even number of \, then maybe 1 \, followed by a |
- tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
- if (!$2) {
- // the | isn't already escaped, so escape it.
- $2 = '\\'
- }
-
- // need to escape all those slashes *again*, without escaping the
- // one that we need for escaping the | character. As it works out,
- // escaping an even number of slashes can be done by simply repeating
- // it exactly after itself. That's why this trick works.
- //
- // I am sorry that you have to see this.
- return $1 + $1 + $2 + '|'
- })
+ var globber = glob(options.cwd || '.', options);
+ globber.on('error', onGlobError.bind(this));
+ globber.on('match', onGlobMatch.bind(this));
+ globber.on('end', onGlobEnd.bind(this));
- this.debug('tail=%j\n %s', tail, tail, pl, re)
- var t = pl.type === '*' ? star
- : pl.type === '?' ? qmark
- : '\\' + pl.type
+ return this;
+};
- hasMagic = true
- re = re.slice(0, pl.reStart) + t + '\\(' + tail
+/**
+ * Finalizes the instance and prevents further appending to the archive
+ * structure (queue will continue til drained).
+ *
+ * The `end`, `close` or `finish` events on the destination stream may fire
+ * right after calling this method so you should set listeners beforehand to
+ * properly detect stream completion.
+ *
+ * @return {Promise}
+ */
+Archiver.prototype.finalize = function() {
+ if (this._state.aborted) {
+ var abortedError = new ArchiverError('ABORTED');
+ this.emit('error', abortedError);
+ return Promise.reject(abortedError);
}
- // handle trailing things that only matter at the very end.
- clearStateChar()
- if (escaping) {
- // trailing \\
- re += '\\\\'
+ if (this._state.finalize) {
+ var finalizingError = new ArchiverError('FINALIZING');
+ this.emit('error', finalizingError);
+ return Promise.reject(finalizingError);
}
- // only need to apply the nodot start if the re starts with
- // something that could conceivably capture a dot
- var addPatternStart = false
- switch (re.charAt(0)) {
- case '[': case '.': case '(': addPatternStart = true
+ this._state.finalize = true;
+
+ if (this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
+ this._finalize();
}
- // Hack to work around lack of negative lookbehind in JS
- // A pattern like: *.!(x).!(y|z) needs to ensure that a name
- // like 'a.xyz.yz' doesn't match. So, the first negative
- // lookahead, has to look ALL the way ahead, to the end of
- // the pattern.
- for (var n = negativeLists.length - 1; n > -1; n--) {
- var nl = negativeLists[n]
+ var self = this;
- var nlBefore = re.slice(0, nl.reStart)
- var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
- var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
- var nlAfter = re.slice(nl.reEnd)
+ return new Promise(function(resolve, reject) {
+ var errored;
- nlLast += nlAfter
+ self._module.on('end', function() {
+ if (!errored) {
+ resolve();
+ }
+ })
- // Handle nested stuff like *(*.js|!(*.json)), where open parens
- // mean that we should *not* include the ) in the bit that is considered
- // "after" the negated section.
- var openParensBefore = nlBefore.split('(').length - 1
- var cleanAfter = nlAfter
- for (i = 0; i < openParensBefore; i++) {
- cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
- }
- nlAfter = cleanAfter
+ self._module.on('error', function(err) {
+ errored = true;
+ reject(err);
+ })
+ })
+};
- var dollar = ''
- if (nlAfter === '' && isSub !== SUBPARSE) {
- dollar = '$'
- }
- var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
- re = newRe
+/**
+ * Sets the module format name used for archiving.
+ *
+ * @param {String} format The name of the format.
+ * @return {this}
+ */
+Archiver.prototype.setFormat = function(format) {
+ if (this._format) {
+ this.emit('error', new ArchiverError('FORMATSET'));
+ return this;
}
- // if the re is not "" at this point, then we need to make sure
- // it doesn't match against an empty path part.
- // Otherwise a/* will match a/, which it should not.
- if (re !== '' && hasMagic) {
- re = '(?=.)' + re
- }
+ this._format = format;
- if (addPatternStart) {
- re = patternStart + re
- }
+ return this;
+};
- // parsing just a piece of a larger pattern.
- if (isSub === SUBPARSE) {
- return [re, hasMagic]
+/**
+ * Sets the module used for archiving.
+ *
+ * @param {Function} module The function for archiver to interact with.
+ * @return {this}
+ */
+Archiver.prototype.setModule = function(module) {
+ if (this._state.aborted) {
+ this.emit('error', new ArchiverError('ABORTED'));
+ return this;
}
- // skip the regexp for non-magical patterns
- // unescape anything in it, though, so that it'll be
- // an exact match against a file etc.
- if (!hasMagic) {
- return globUnescape(pattern)
+ if (this._state.module) {
+ this.emit('error', new ArchiverError('MODULESET'));
+ return this;
}
- var flags = options.nocase ? 'i' : ''
- try {
- var regExp = new RegExp('^' + re + '$', flags)
- } catch (er) /* istanbul ignore next - should be impossible */ {
- // If it was an invalid regular expression, then it can't match
- // anything. This trick looks for a character after the end of
- // the string, which is of course impossible, except in multi-line
- // mode, but it's not a /m regex.
- return new RegExp('$.')
- }
+ this._module = module;
+ this._modulePipe();
- regExp._glob = pattern
- regExp._src = re
+ return this;
+};
- return regExp
-}
+/**
+ * Appends a symlink to the instance.
+ *
+ * This does NOT interact with filesystem and is used for programmatically creating symlinks.
+ *
+ * @param {String} filepath The symlink path (within archive).
+ * @param {String} target The target path (within archive).
+ * @param {Number} mode Sets the entry permissions.
+ * @return {this}
+ */
+Archiver.prototype.symlink = function(filepath, target, mode) {
+ if (this._state.finalize || this._state.aborted) {
+ this.emit('error', new ArchiverError('QUEUECLOSED'));
+ return this;
+ }
-minimatch.makeRe = function (pattern, options) {
- return new Minimatch(pattern, options || {}).makeRe()
-}
+ if (typeof filepath !== 'string' || filepath.length === 0) {
+ this.emit('error', new ArchiverError('SYMLINKFILEPATHREQUIRED'));
+ return this;
+ }
-Minimatch.prototype.makeRe = makeRe
-function makeRe () {
- if (this.regexp || this.regexp === false) return this.regexp
+ if (typeof target !== 'string' || target.length === 0) {
+ this.emit('error', new ArchiverError('SYMLINKTARGETREQUIRED', { filepath: filepath }));
+ return this;
+ }
- // at this point, this.set is a 2d array of partial
- // pattern strings, or "**".
- //
- // It's better to use .match(). This function shouldn't
- // be used, really, but it's pretty convenient sometimes,
- // when you just want to work with a regex.
- var set = this.set
+ if (!this._moduleSupports('symlink')) {
+ this.emit('error', new ArchiverError('SYMLINKNOTSUPPORTED', { filepath: filepath }));
+ return this;
+ }
- if (!set.length) {
- this.regexp = false
- return this.regexp
+ var data = {};
+ data.type = 'symlink';
+ data.name = filepath.replace(/\\/g, '/');
+ data.linkname = target.replace(/\\/g, '/');
+ data.sourceType = 'buffer';
+
+ if (typeof mode === "number") {
+ data.mode = mode;
}
- var options = this.options
- var twoStar = options.noglobstar ? star
- : options.dot ? twoStarDot
- : twoStarNoDot
- var flags = options.nocase ? 'i' : ''
+ this._entriesCount++;
+ this._queue.push({
+ data: data,
+ source: Buffer.concat([])
+ });
- var re = set.map(function (pattern) {
- return pattern.map(function (p) {
- return (p === GLOBSTAR) ? twoStar
- : (typeof p === 'string') ? regExpEscape(p)
- : p._src
- }).join('\\\/')
- }).join('|')
+ return this;
+};
- // must match entire pattern
- // ending in a * or ** will make it less strict.
- re = '^(?:' + re + ')$'
+/**
+ * Returns the current length (in bytes) that has been emitted.
+ *
+ * @return {Number}
+ */
+Archiver.prototype.pointer = function() {
+ return this._pointer;
+};
- // can match anything, as long as it's not this.
- if (this.negate) re = '^(?!' + re + ').*$'
+/**
+ * Middleware-like helper that has yet to be fully implemented.
+ *
+ * @private
+ * @param {Function} plugin
+ * @return {this}
+ */
+Archiver.prototype.use = function(plugin) {
+ this._streams.push(plugin);
+ return this;
+};
- try {
- this.regexp = new RegExp(re, flags)
- } catch (ex) /* istanbul ignore next - should be impossible */ {
- this.regexp = false
- }
- return this.regexp
-}
+module.exports = Archiver;
-minimatch.match = function (list, pattern, options) {
- options = options || {}
- var mm = new Minimatch(pattern, options)
- list = list.filter(function (f) {
- return mm.match(f)
- })
- if (mm.options.nonull && !list.length) {
- list.push(pattern)
- }
- return list
-}
+/**
+ * @typedef {Object} CoreOptions
+ * @global
+ * @property {Number} [statConcurrency=4] Sets the number of workers used to
+ * process the internal fs stat queue.
+ */
-Minimatch.prototype.match = function match (f, partial) {
- if (typeof partial === 'undefined') partial = this.partial
- this.debug('match', f, this.pattern)
- // short-circuit in the case of busted things.
- // comments, etc.
- if (this.comment) return false
- if (this.empty) return f === ''
+/**
+ * @typedef {Object} TransformOptions
+ * @property {Boolean} [allowHalfOpen=true] If set to false, then the stream
+ * will automatically end the readable side when the writable side ends and vice
+ * versa.
+ * @property {Boolean} [readableObjectMode=false] Sets objectMode for readable
+ * side of the stream. Has no effect if objectMode is true.
+ * @property {Boolean} [writableObjectMode=false] Sets objectMode for writable
+ * side of the stream. Has no effect if objectMode is true.
+ * @property {Boolean} [decodeStrings=true] Whether or not to decode strings
+ * into Buffers before passing them to _write(). `Writable`
+ * @property {String} [encoding=NULL] If specified, then buffers will be decoded
+ * to strings using the specified encoding. `Readable`
+ * @property {Number} [highWaterMark=16kb] The maximum number of bytes to store
+ * in the internal buffer before ceasing to read from the underlying resource.
+ * `Readable` `Writable`
+ * @property {Boolean} [objectMode=false] Whether this stream should behave as a
+ * stream of objects. Meaning that stream.read(n) returns a single value instead
+ * of a Buffer of size n. `Readable` `Writable`
+ */
- if (f === '/' && partial) return true
+/**
+ * @typedef {Object} EntryData
+ * @property {String} name Sets the entry name including internal path.
+ * @property {(String|Date)} [date=NOW()] Sets the entry date.
+ * @property {Number} [mode=D:0755/F:0644] Sets the entry permissions.
+ * @property {String} [prefix] Sets a path prefix for the entry name. Useful
+ * when working with methods like `directory` or `glob`.
+ * @property {fs.Stats} [stats] Sets the fs stat data for this entry allowing
+ * for reduction of fs stat calls when stat data is already known.
+ */
- var options = this.options
+/**
+ * @typedef {Object} ErrorData
+ * @property {String} message The message of the error.
+ * @property {String} code The error code assigned to this error.
+ * @property {String} data Additional data provided for reporting or debugging (where available).
+ */
- // windows: need to use /, not \
- if (path.sep !== '/') {
- f = f.split(path.sep).join('/')
- }
+/**
+ * @typedef {Object} ProgressData
+ * @property {Object} entries
+ * @property {Number} entries.total Number of entries that have been appended.
+ * @property {Number} entries.processed Number of entries that have been processed.
+ * @property {Object} fs
+ * @property {Number} fs.totalBytes Number of bytes that have been appended. Calculated asynchronously and might not be accurate: it growth while entries are added. (based on fs.Stats)
+ * @property {Number} fs.processedBytes Number of bytes that have been processed. (based on fs.Stats)
+ */
- // treat the test path as a set of pathparts.
- f = f.split(slashSplit)
- this.debug(this.pattern, 'split', f)
- // just ONE of the pattern sets in this.set needs to match
- // in order for it to be valid. If negating, then just one
- // match means that we have failed.
- // Either way, return on the first hit.
+/***/ }),
- var set = this.set
- this.debug(this.pattern, 'set', set)
+/***/ 3110:
+/***/ ((module, exports, __nccwpck_require__) => {
- // Find the basename of the path by looking for the last non-empty segment
- var filename
- var i
- for (i = f.length - 1; i >= 0; i--) {
- filename = f[i]
- if (filename) break
- }
+/**
+ * Archiver Core
+ *
+ * @ignore
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
+ */
- for (i = 0; i < set.length; i++) {
- var pattern = set[i]
- var file = f
- if (options.matchBase && pattern.length === 1) {
- file = [filename]
- }
- var hit = this.matchOne(file, pattern, partial)
- if (hit) {
- if (options.flipNegate) return true
- return !this.negate
- }
- }
+var util = __nccwpck_require__(9023);
- // didn't get any hits. this is success if it's a negative
- // pattern, failure otherwise.
- if (options.flipNegate) return false
- return this.negate
-}
+const ERROR_CODES = {
+ 'ABORTED': 'archive was aborted',
+ 'DIRECTORYDIRPATHREQUIRED': 'diretory dirpath argument must be a non-empty string value',
+ 'DIRECTORYFUNCTIONINVALIDDATA': 'invalid data returned by directory custom data function',
+ 'ENTRYNAMEREQUIRED': 'entry name must be a non-empty string value',
+ 'FILEFILEPATHREQUIRED': 'file filepath argument must be a non-empty string value',
+ 'FINALIZING': 'archive already finalizing',
+ 'QUEUECLOSED': 'queue closed',
+ 'NOENDMETHOD': 'no suitable finalize/end method defined by module',
+ 'DIRECTORYNOTSUPPORTED': 'support for directory entries not defined by module',
+ 'FORMATSET': 'archive format already set',
+ 'INPUTSTEAMBUFFERREQUIRED': 'input source must be valid Stream or Buffer instance',
+ 'MODULESET': 'module already set',
+ 'SYMLINKNOTSUPPORTED': 'support for symlink entries not defined by module',
+ 'SYMLINKFILEPATHREQUIRED': 'symlink filepath argument must be a non-empty string value',
+ 'SYMLINKTARGETREQUIRED': 'symlink target argument must be a non-empty string value',
+ 'ENTRYNOTSUPPORTED': 'entry not supported'
+};
-// set partial to true to test if, for example,
-// "/a/b" matches the start of "/*/b/*/d"
-// Partial means, if you run out of file before you run
-// out of pattern, then that's fine, as long as all
-// the parts match.
-Minimatch.prototype.matchOne = function (file, pattern, partial) {
- var options = this.options
+function ArchiverError(code, data) {
+ Error.captureStackTrace(this, this.constructor);
+ //this.name = this.constructor.name;
+ this.message = ERROR_CODES[code] || code;
+ this.code = code;
+ this.data = data;
+}
- this.debug('matchOne',
- { 'this': this, file: file, pattern: pattern })
+util.inherits(ArchiverError, Error);
- this.debug('matchOne', file.length, pattern.length)
+exports = module.exports = ArchiverError;
- for (var fi = 0,
- pi = 0,
- fl = file.length,
- pl = pattern.length
- ; (fi < fl) && (pi < pl)
- ; fi++, pi++) {
- this.debug('matchOne loop')
- var p = pattern[pi]
- var f = file[fi]
+/***/ }),
- this.debug(pattern, p, f)
+/***/ 4693:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
- // should be impossible.
- // some invalid regexp stuff in the set.
- /* istanbul ignore if */
- if (p === false) return false
-
- if (p === GLOBSTAR) {
- this.debug('GLOBSTAR', [pattern, p, f])
-
- // "**"
- // a/**/b/**/c would match the following:
- // a/b/x/y/z/c
- // a/x/y/z/b/c
- // a/b/x/b/x/c
- // a/b/c
- // To do this, take the rest of the pattern after
- // the **, and see if it would match the file remainder.
- // If so, return success.
- // If not, the ** "swallows" a segment, and try again.
- // This is recursively awful.
- //
- // a/**/b/**/c matching a/b/x/y/z/c
- // - a matches a
- // - doublestar
- // - matchOne(b/x/y/z/c, b/**/c)
- // - b matches b
- // - doublestar
- // - matchOne(x/y/z/c, c) -> no
- // - matchOne(y/z/c, c) -> no
- // - matchOne(z/c, c) -> no
- // - matchOne(c, c) yes, hit
- var fr = fi
- var pr = pi + 1
- if (pr === pl) {
- this.debug('** at the end')
- // a ** at the end will just swallow the rest.
- // We have found a match.
- // however, it will not swallow /.x, unless
- // options.dot is set.
- // . and .. are *never* matched by **, for explosively
- // exponential reasons.
- for (; fi < fl; fi++) {
- if (file[fi] === '.' || file[fi] === '..' ||
- (!options.dot && file[fi].charAt(0) === '.')) return false
- }
- return true
- }
+/**
+ * JSON Format Plugin
+ *
+ * @module plugins/json
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
+ */
+var inherits = (__nccwpck_require__(9023).inherits);
+var Transform = (__nccwpck_require__(9963).Transform);
- // ok, let's see if we can swallow whatever we can.
- while (fr < fl) {
- var swallowee = file[fr]
+var crc32 = __nccwpck_require__(4928);
+var util = __nccwpck_require__(3296);
- this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
+/**
+ * @constructor
+ * @param {(JsonOptions|TransformOptions)} options
+ */
+var Json = function(options) {
+ if (!(this instanceof Json)) {
+ return new Json(options);
+ }
- // XXX remove this slice. Just pass the start index.
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
- this.debug('globstar found match!', fr, fl, swallowee)
- // found a match.
- return true
- } else {
- // can't swallow "." or ".." ever.
- // can only swallow ".foo" when explicitly asked.
- if (swallowee === '.' || swallowee === '..' ||
- (!options.dot && swallowee.charAt(0) === '.')) {
- this.debug('dot detected!', file, fr, pattern, pr)
- break
- }
+ options = this.options = util.defaults(options, {});
- // ** swallows a segment, and continue.
- this.debug('globstar swallow a segment, and continue')
- fr++
- }
- }
+ Transform.call(this, options);
- // no match was found.
- // However, in partial mode, we can't say this is necessarily over.
- // If there's more *pattern* left, then
- /* istanbul ignore if */
- if (partial) {
- // ran out of file
- this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
- if (fr === fl) return true
- }
- return false
- }
+ this.supports = {
+ directory: true,
+ symlink: true
+ };
- // something other than **
- // non-magic patterns just have to match exactly
- // patterns with magic have been turned into regexps.
- var hit
- if (typeof p === 'string') {
- hit = f === p
- this.debug('string match', p, f, hit)
- } else {
- hit = f.match(p)
- this.debug('pattern match', p, f, hit)
- }
+ this.files = [];
+};
- if (!hit) return false
- }
+inherits(Json, Transform);
- // Note: ending in / means that we'll get a final ""
- // at the end of the pattern. This can only match a
- // corresponding "" at the end of the file.
- // If the file ends in /, then it can only match a
- // a pattern that ends in /, unless the pattern just
- // doesn't have any more for it. But, a/b/ should *not*
- // match "a/b/*", even though "" matches against the
- // [^/]*? pattern, except in partial mode, where it might
- // simply not be reached yet.
- // However, a/b/ should still satisfy a/*
+/**
+ * [_transform description]
+ *
+ * @private
+ * @param {Buffer} chunk
+ * @param {String} encoding
+ * @param {Function} callback
+ * @return void
+ */
+Json.prototype._transform = function(chunk, encoding, callback) {
+ callback(null, chunk);
+};
- // now either we fell off the end of the pattern, or we're done.
- if (fi === fl && pi === pl) {
- // ran out of pattern and filename at the same time.
- // an exact hit!
- return true
- } else if (fi === fl) {
- // ran out of file, but still had pattern left.
- // this is ok if we're doing the match as part of
- // a glob fs traversal.
- return partial
- } else /* istanbul ignore else */ if (pi === pl) {
- // ran out of pattern, still have file left.
- // this is only acceptable if we're on the very last
- // empty segment of a file with a trailing slash.
- // a/* should match a/b/
- return (fi === fl - 1) && (file[fi] === '')
- }
+/**
+ * [_writeStringified description]
+ *
+ * @private
+ * @return void
+ */
+Json.prototype._writeStringified = function() {
+ var fileString = JSON.stringify(this.files);
+ this.write(fileString);
+};
- // should be unreachable.
- /* istanbul ignore next */
- throw new Error('wtf?')
-}
+/**
+ * [append description]
+ *
+ * @param {(Buffer|Stream)} source
+ * @param {EntryData} data
+ * @param {Function} callback
+ * @return void
+ */
+Json.prototype.append = function(source, data, callback) {
+ var self = this;
-// replace stuff like \* with *
-function globUnescape (s) {
- return s.replace(/\\(.)/g, '$1')
-}
+ data.crc32 = 0;
-function regExpEscape (s) {
- return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
-}
+ function onend(err, sourceBuffer) {
+ if (err) {
+ callback(err);
+ return;
+ }
+ data.size = sourceBuffer.length || 0;
+ data.crc32 = crc32.unsigned(sourceBuffer);
-/***/ }),
+ self.files.push(data);
-/***/ 35526:
-/***/ (function(__unused_webpack_module, exports) {
+ callback(null, data);
+ }
-"use strict";
+ if (data.sourceType === 'buffer') {
+ onend(null, source);
+ } else if (data.sourceType === 'stream') {
+ util.collectStream(source, onend);
+ }
+};
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
+/**
+ * [finalize description]
+ *
+ * @return void
+ */
+Json.prototype.finalize = function() {
+ this._writeStringified();
+ this.end();
};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;
-class BasicCredentialHandler {
- constructor(username, password) {
- this.username = username;
- this.password = password;
- }
- prepareRequest(options) {
- if (!options.headers) {
- throw Error('The request has no headers');
- }
- options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;
- }
- // This handler cannot handle 401
- canHandleAuthentication() {
- return false;
- }
- handleAuthentication() {
- return __awaiter(this, void 0, void 0, function* () {
- throw new Error('not implemented');
- });
- }
-}
-exports.BasicCredentialHandler = BasicCredentialHandler;
-class BearerCredentialHandler {
- constructor(token) {
- this.token = token;
- }
- // currently implements pre-authorization
- // TODO: support preAuth = false where it hooks on 401
- prepareRequest(options) {
- if (!options.headers) {
- throw Error('The request has no headers');
- }
- options.headers['Authorization'] = `Bearer ${this.token}`;
- }
- // This handler cannot handle 401
- canHandleAuthentication() {
- return false;
- }
- handleAuthentication() {
- return __awaiter(this, void 0, void 0, function* () {
- throw new Error('not implemented');
- });
- }
-}
-exports.BearerCredentialHandler = BearerCredentialHandler;
-class PersonalAccessTokenCredentialHandler {
- constructor(token) {
- this.token = token;
- }
- // currently implements pre-authorization
- // TODO: support preAuth = false where it hooks on 401
- prepareRequest(options) {
- if (!options.headers) {
- throw Error('The request has no headers');
- }
- options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;
- }
- // This handler cannot handle 401
- canHandleAuthentication() {
- return false;
- }
- handleAuthentication() {
- return __awaiter(this, void 0, void 0, function* () {
- throw new Error('not implemented');
- });
- }
-}
-exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
-//# sourceMappingURL=auth.js.map
+
+module.exports = Json;
+
+/**
+ * @typedef {Object} JsonOptions
+ * @global
+ */
+
/***/ }),
-/***/ 96255:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+/***/ 396:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-"use strict";
+/**
+ * TAR Format Plugin
+ *
+ * @module plugins/tar
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
+ */
+var zlib = __nccwpck_require__(725);
-/* eslint-disable @typescript-eslint/no-explicit-any */
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
+var engine = __nccwpck_require__(6118);
+var util = __nccwpck_require__(3296);
+
+/**
+ * @constructor
+ * @param {TarOptions} options
+ */
+var Tar = function(options) {
+ if (!(this instanceof Tar)) {
+ return new Tar(options);
+ }
+
+ options = this.options = util.defaults(options, {
+ gzip: false
+ });
+
+ if (typeof options.gzipOptions !== 'object') {
+ options.gzipOptions = {};
+ }
+
+ this.supports = {
+ directory: true,
+ symlink: true
+ };
+
+ this.engine = engine.pack(options);
+ this.compressor = false;
+
+ if (options.gzip) {
+ this.compressor = zlib.createGzip(options.gzipOptions);
+ this.compressor.on('error', this._onCompressorError.bind(this));
+ }
+};
+
+/**
+ * [_onCompressorError description]
+ *
+ * @private
+ * @param {Error} err
+ * @return void
+ */
+Tar.prototype._onCompressorError = function(err) {
+ this.engine.emit('error', err);
+};
+
+/**
+ * [append description]
+ *
+ * @param {(Buffer|Stream)} source
+ * @param {TarEntryData} data
+ * @param {Function} callback
+ * @return void
+ */
+Tar.prototype.append = function(source, data, callback) {
+ var self = this;
+
+ data.mtime = data.date;
+
+ function append(err, sourceBuffer) {
+ if (err) {
+ callback(err);
+ return;
}
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
+
+ self.engine.entry(data, sourceBuffer, function(err) {
+ callback(err, data);
+ });
+ }
+
+ if (data.sourceType === 'buffer') {
+ append(null, source);
+ } else if (data.sourceType === 'stream' && data.stats) {
+ data.size = data.stats.size;
+
+ var entry = self.engine.entry(data, function(err) {
+ callback(err, data);
});
+
+ source.pipe(entry);
+ } else if (data.sourceType === 'stream') {
+ util.collectStream(source, append);
+ }
};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.HttpClient = exports.HttpClientResponse = exports.HttpClientError = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
-exports.getProxyUrl = getProxyUrl;
-exports.isHttps = isHttps;
-const http = __importStar(__nccwpck_require__(13685));
-const https = __importStar(__nccwpck_require__(95687));
-const pm = __importStar(__nccwpck_require__(19835));
-const tunnel = __importStar(__nccwpck_require__(74294));
-const undici_1 = __nccwpck_require__(41773);
-var HttpCodes;
-(function (HttpCodes) {
- HttpCodes[HttpCodes["OK"] = 200] = "OK";
- HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices";
- HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently";
- HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved";
- HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther";
- HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified";
- HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy";
- HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy";
- HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect";
- HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect";
- HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest";
- HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized";
- HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired";
- HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden";
- HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound";
- HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed";
- HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable";
- HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
- HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout";
- HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict";
- HttpCodes[HttpCodes["Gone"] = 410] = "Gone";
- HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests";
- HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError";
- HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented";
- HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway";
- HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
- HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
-})(HttpCodes || (exports.HttpCodes = HttpCodes = {}));
-var Headers;
-(function (Headers) {
- Headers["Accept"] = "accept";
- Headers["ContentType"] = "content-type";
-})(Headers || (exports.Headers = Headers = {}));
-var MediaTypes;
-(function (MediaTypes) {
- MediaTypes["ApplicationJson"] = "application/json";
-})(MediaTypes || (exports.MediaTypes = MediaTypes = {}));
+
/**
- * Returns the proxy URL, depending upon the supplied url and proxy environment variables.
- * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
+ * [finalize description]
+ *
+ * @return void
*/
-function getProxyUrl(serverUrl) {
- const proxyUrl = pm.getProxyUrl(new URL(serverUrl));
- return proxyUrl ? proxyUrl.href : '';
-}
-const HttpRedirectCodes = [
- HttpCodes.MovedPermanently,
- HttpCodes.ResourceMoved,
- HttpCodes.SeeOther,
- HttpCodes.TemporaryRedirect,
- HttpCodes.PermanentRedirect
-];
-const HttpResponseRetryCodes = [
- HttpCodes.BadGateway,
- HttpCodes.ServiceUnavailable,
- HttpCodes.GatewayTimeout
-];
-const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
-const ExponentialBackoffCeiling = 10;
-const ExponentialBackoffTimeSlice = 5;
-class HttpClientError extends Error {
- constructor(message, statusCode) {
- super(message);
- this.name = 'HttpClientError';
- this.statusCode = statusCode;
- Object.setPrototypeOf(this, HttpClientError.prototype);
+Tar.prototype.finalize = function() {
+ this.engine.finalize();
+};
+
+/**
+ * [on description]
+ *
+ * @return this.engine
+ */
+Tar.prototype.on = function() {
+ return this.engine.on.apply(this.engine, arguments);
+};
+
+/**
+ * [pipe description]
+ *
+ * @param {String} destination
+ * @param {Object} options
+ * @return this.engine
+ */
+Tar.prototype.pipe = function(destination, options) {
+ if (this.compressor) {
+ return this.engine.pipe.apply(this.engine, [this.compressor]).pipe(destination, options);
+ } else {
+ return this.engine.pipe.apply(this.engine, arguments);
+ }
+};
+
+/**
+ * [unpipe description]
+ *
+ * @return this.engine
+ */
+Tar.prototype.unpipe = function() {
+ if (this.compressor) {
+ return this.compressor.unpipe.apply(this.compressor, arguments);
+ } else {
+ return this.engine.unpipe.apply(this.engine, arguments);
+ }
+};
+
+module.exports = Tar;
+
+/**
+ * @typedef {Object} TarOptions
+ * @global
+ * @property {Boolean} [gzip=false] Compress the tar archive using gzip.
+ * @property {Object} [gzipOptions] Passed to [zlib]{@link https://nodejs.org/api/zlib.html#zlib_class_options}
+ * to control compression.
+ * @property {*} [*] See [tar-stream]{@link https://github.com/mafintosh/tar-stream} documentation for additional properties.
+ */
+
+/**
+ * @typedef {Object} TarEntryData
+ * @global
+ * @property {String} name Sets the entry name including internal path.
+ * @property {(String|Date)} [date=NOW()] Sets the entry date.
+ * @property {Number} [mode=D:0755/F:0644] Sets the entry permissions.
+ * @property {String} [prefix] Sets a path prefix for the entry name. Useful
+ * when working with methods like `directory` or `glob`.
+ * @property {fs.Stats} [stats] Sets the fs stat data for this entry allowing
+ * for reduction of fs stat calls when stat data is already known.
+ */
+
+/**
+ * TarStream Module
+ * @external TarStream
+ * @see {@link https://github.com/mafintosh/tar-stream}
+ */
+
+
+/***/ }),
+
+/***/ 2836:
+/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+
+/**
+ * ZIP Format Plugin
+ *
+ * @module plugins/zip
+ * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
+ * @copyright (c) 2012-2014 Chris Talkington, contributors.
+ */
+var engine = __nccwpck_require__(1622);
+var util = __nccwpck_require__(3296);
+
+/**
+ * @constructor
+ * @param {ZipOptions} [options]
+ * @param {String} [options.comment] Sets the zip archive comment.
+ * @param {Boolean} [options.forceLocalTime=false] Forces the archive to contain local file times instead of UTC.
+ * @param {Boolean} [options.forceZip64=false] Forces the archive to contain ZIP64 headers.
+ * @param {Boolean} [options.namePrependSlash=false] Prepends a forward slash to archive file paths.
+ * @param {Boolean} [options.store=false] Sets the compression method to STORE.
+ * @param {Object} [options.zlib] Passed to [zlib]{@link https://nodejs.org/api/zlib.html#zlib_class_options}
+ */
+var Zip = function(options) {
+ if (!(this instanceof Zip)) {
+ return new Zip(options);
+ }
+
+ options = this.options = util.defaults(options, {
+ comment: '',
+ forceUTC: false,
+ namePrependSlash: false,
+ store: false
+ });
+
+ this.supports = {
+ directory: true,
+ symlink: true
+ };
+
+ this.engine = new engine(options);
+};
+
+/**
+ * @param {(Buffer|Stream)} source
+ * @param {ZipEntryData} data
+ * @param {String} data.name Sets the entry name including internal path.
+ * @param {(String|Date)} [data.date=NOW()] Sets the entry date.
+ * @param {Number} [data.mode=D:0755/F:0644] Sets the entry permissions.
+ * @param {String} [data.prefix] Sets a path prefix for the entry name. Useful
+ * when working with methods like `directory` or `glob`.
+ * @param {fs.Stats} [data.stats] Sets the fs stat data for this entry allowing
+ * for reduction of fs stat calls when stat data is already known.
+ * @param {Boolean} [data.store=ZipOptions.store] Sets the compression method to STORE.
+ * @param {Function} callback
+ * @return void
+ */
+Zip.prototype.append = function(source, data, callback) {
+ this.engine.entry(source, data, callback);
+};
+
+/**
+ * @return void
+ */
+Zip.prototype.finalize = function() {
+ this.engine.finalize();
+};
+
+/**
+ * @return this.engine
+ */
+Zip.prototype.on = function() {
+ return this.engine.on.apply(this.engine, arguments);
+};
+
+/**
+ * @return this.engine
+ */
+Zip.prototype.pipe = function() {
+ return this.engine.pipe.apply(this.engine, arguments);
+};
+
+/**
+ * @return this.engine
+ */
+Zip.prototype.unpipe = function() {
+ return this.engine.unpipe.apply(this.engine, arguments);
+};
+
+module.exports = Zip;
+
+/**
+ * @typedef {Object} ZipOptions
+ * @global
+ * @property {String} [comment] Sets the zip archive comment.
+ * @property {Boolean} [forceLocalTime=false] Forces the archive to contain local file times instead of UTC.
+ * @property {Boolean} [forceZip64=false] Forces the archive to contain ZIP64 headers.
+ * @prpperty {Boolean} [namePrependSlash=false] Prepends a forward slash to archive file paths.
+ * @property {Boolean} [store=false] Sets the compression method to STORE.
+ * @property {Object} [zlib] Passed to [zlib]{@link https://nodejs.org/api/zlib.html#zlib_class_options}
+ * to control compression.
+ * @property {*} [*] See [zip-stream]{@link https://archiverjs.com/zip-stream/ZipStream.html} documentation for current list of properties.
+ */
+
+/**
+ * @typedef {Object} ZipEntryData
+ * @global
+ * @property {String} name Sets the entry name including internal path.
+ * @property {(String|Date)} [date=NOW()] Sets the entry date.
+ * @property {Number} [mode=D:0755/F:0644] Sets the entry permissions.
+ * @property {Boolean} [namePrependSlash=ZipOptions.namePrependSlash] Prepends a forward slash to archive file paths.
+ * @property {String} [prefix] Sets a path prefix for the entry name. Useful
+ * when working with methods like `directory` or `glob`.
+ * @property {fs.Stats} [stats] Sets the fs stat data for this entry allowing
+ * for reduction of fs stat calls when stat data is already known.
+ * @property {Boolean} [store=ZipOptions.store] Sets the compression method to STORE.
+ */
+
+/**
+ * ZipStream Module
+ * @external ZipStream
+ * @see {@link https://www.archiverjs.com/zip-stream/ZipStream.html}
+ */
+
+
+/***/ }),
+
+/***/ 7329:
+/***/ (function(__unused_webpack_module, exports) {
+
+(function (global, factory) {
+ true ? factory(exports) :
+ 0;
+})(this, (function (exports) { 'use strict';
+
+ /**
+ * Creates a continuation function with some arguments already applied.
+ *
+ * Useful as a shorthand when combined with other control flow functions. Any
+ * arguments passed to the returned function are added to the arguments
+ * originally passed to apply.
+ *
+ * @name apply
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {Function} fn - The function you want to eventually apply all
+ * arguments to. Invokes with (arguments...).
+ * @param {...*} arguments... - Any number of arguments to automatically apply
+ * when the continuation is called.
+ * @returns {Function} the partially-applied function
+ * @example
+ *
+ * // using apply
+ * async.parallel([
+ * async.apply(fs.writeFile, 'testfile1', 'test1'),
+ * async.apply(fs.writeFile, 'testfile2', 'test2')
+ * ]);
+ *
+ *
+ * // the same process without using apply
+ * async.parallel([
+ * function(callback) {
+ * fs.writeFile('testfile1', 'test1', callback);
+ * },
+ * function(callback) {
+ * fs.writeFile('testfile2', 'test2', callback);
+ * }
+ * ]);
+ *
+ * // It's possible to pass any number of additional arguments when calling the
+ * // continuation:
+ *
+ * node> var fn = async.apply(sys.puts, 'one');
+ * node> fn('two', 'three');
+ * one
+ * two
+ * three
+ */
+ function apply(fn, ...args) {
+ return (...callArgs) => fn(...args,...callArgs);
}
-}
-exports.HttpClientError = HttpClientError;
-class HttpClientResponse {
- constructor(message) {
- this.message = message;
+
+ function initialParams (fn) {
+ return function (...args/*, callback*/) {
+ var callback = args.pop();
+ return fn.call(this, args, callback);
+ };
}
- readBody() {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
- let output = Buffer.alloc(0);
- this.message.on('data', (chunk) => {
- output = Buffer.concat([output, chunk]);
- });
- this.message.on('end', () => {
- resolve(output.toString());
- });
- }));
- });
+
+ /* istanbul ignore file */
+
+ var hasQueueMicrotask = typeof queueMicrotask === 'function' && queueMicrotask;
+ var hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
+ var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';
+
+ function fallback(fn) {
+ setTimeout(fn, 0);
}
- readBodyBuffer() {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
- const chunks = [];
- this.message.on('data', (chunk) => {
- chunks.push(chunk);
- });
- this.message.on('end', () => {
- resolve(Buffer.concat(chunks));
- });
- }));
- });
+
+ function wrap(defer) {
+ return (fn, ...args) => defer(() => fn(...args));
}
-}
-exports.HttpClientResponse = HttpClientResponse;
-function isHttps(requestUrl) {
- const parsedUrl = new URL(requestUrl);
- return parsedUrl.protocol === 'https:';
-}
-class HttpClient {
- constructor(userAgent, handlers, requestOptions) {
- this._ignoreSslError = false;
- this._allowRedirects = true;
- this._allowRedirectDowngrade = false;
- this._maxRedirects = 50;
- this._allowRetries = false;
- this._maxRetries = 1;
- this._keepAlive = false;
- this._disposed = false;
- this.userAgent = userAgent;
- this.handlers = handlers || [];
- this.requestOptions = requestOptions;
- if (requestOptions) {
- if (requestOptions.ignoreSslError != null) {
- this._ignoreSslError = requestOptions.ignoreSslError;
- }
- this._socketTimeout = requestOptions.socketTimeout;
- if (requestOptions.allowRedirects != null) {
- this._allowRedirects = requestOptions.allowRedirects;
- }
- if (requestOptions.allowRedirectDowngrade != null) {
- this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
- }
- if (requestOptions.maxRedirects != null) {
- this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
- }
- if (requestOptions.keepAlive != null) {
- this._keepAlive = requestOptions.keepAlive;
+
+ var _defer$1;
+
+ if (hasQueueMicrotask) {
+ _defer$1 = queueMicrotask;
+ } else if (hasSetImmediate) {
+ _defer$1 = setImmediate;
+ } else if (hasNextTick) {
+ _defer$1 = process.nextTick;
+ } else {
+ _defer$1 = fallback;
+ }
+
+ var setImmediate$1 = wrap(_defer$1);
+
+ /**
+ * Take a sync function and make it async, passing its return value to a
+ * callback. This is useful for plugging sync functions into a waterfall,
+ * series, or other async functions. Any arguments passed to the generated
+ * function will be passed to the wrapped function (except for the final
+ * callback argument). Errors thrown will be passed to the callback.
+ *
+ * If the function passed to `asyncify` returns a Promise, that promises's
+ * resolved/rejected state will be used to call the callback, rather than simply
+ * the synchronous return value.
+ *
+ * This also means you can asyncify ES2017 `async` functions.
+ *
+ * @name asyncify
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @alias wrapSync
+ * @category Util
+ * @param {Function} func - The synchronous function, or Promise-returning
+ * function to convert to an {@link AsyncFunction}.
+ * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be
+ * invoked with `(args..., callback)`.
+ * @example
+ *
+ * // passing a regular synchronous function
+ * async.waterfall([
+ * async.apply(fs.readFile, filename, "utf8"),
+ * async.asyncify(JSON.parse),
+ * function (data, next) {
+ * // data is the result of parsing the text.
+ * // If there was a parsing error, it would have been caught.
+ * }
+ * ], callback);
+ *
+ * // passing a function returning a promise
+ * async.waterfall([
+ * async.apply(fs.readFile, filename, "utf8"),
+ * async.asyncify(function (contents) {
+ * return db.model.create(contents);
+ * }),
+ * function (model, next) {
+ * // `model` is the instantiated model object.
+ * // If there was an error, this function would be skipped.
+ * }
+ * ], callback);
+ *
+ * // es2017 example, though `asyncify` is not needed if your JS environment
+ * // supports async functions out of the box
+ * var q = async.queue(async.asyncify(async function(file) {
+ * var intermediateStep = await processFile(file);
+ * return await somePromise(intermediateStep)
+ * }));
+ *
+ * q.push(files);
+ */
+ function asyncify(func) {
+ if (isAsync(func)) {
+ return function (...args/*, callback*/) {
+ const callback = args.pop();
+ const promise = func.apply(this, args);
+ return handlePromise(promise, callback)
}
- if (requestOptions.allowRetries != null) {
- this._allowRetries = requestOptions.allowRetries;
+ }
+
+ return initialParams(function (args, callback) {
+ var result;
+ try {
+ result = func.apply(this, args);
+ } catch (e) {
+ return callback(e);
}
- if (requestOptions.maxRetries != null) {
- this._maxRetries = requestOptions.maxRetries;
+ // if result is Promise object
+ if (result && typeof result.then === 'function') {
+ return handlePromise(result, callback)
+ } else {
+ callback(null, result);
}
- }
- }
- options(requestUrl, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});
- });
- }
- get(requestUrl, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('GET', requestUrl, null, additionalHeaders || {});
- });
- }
- del(requestUrl, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('DELETE', requestUrl, null, additionalHeaders || {});
- });
- }
- post(requestUrl, data, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('POST', requestUrl, data, additionalHeaders || {});
- });
- }
- patch(requestUrl, data, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('PATCH', requestUrl, data, additionalHeaders || {});
- });
- }
- put(requestUrl, data, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('PUT', requestUrl, data, additionalHeaders || {});
});
}
- head(requestUrl, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request('HEAD', requestUrl, null, additionalHeaders || {});
+
+ function handlePromise(promise, callback) {
+ return promise.then(value => {
+ invokeCallback(callback, null, value);
+ }, err => {
+ invokeCallback(callback, err && (err instanceof Error || err.message) ? err : new Error(err));
});
}
- sendStream(verb, requestUrl, stream, additionalHeaders) {
- return __awaiter(this, void 0, void 0, function* () {
- return this.request(verb, requestUrl, stream, additionalHeaders);
- });
+
+ function invokeCallback(callback, error, value) {
+ try {
+ callback(error, value);
+ } catch (err) {
+ setImmediate$1(e => { throw e }, err);
+ }
}
- /**
- * Gets a typed object from an endpoint
- * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise
- */
- getJson(requestUrl_1) {
- return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) {
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- const res = yield this.get(requestUrl, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- });
+
+ function isAsync(fn) {
+ return fn[Symbol.toStringTag] === 'AsyncFunction';
}
- postJson(requestUrl_1, obj_1) {
- return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) {
- const data = JSON.stringify(obj, null, 2);
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- additionalHeaders[Headers.ContentType] =
- this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson);
- const res = yield this.post(requestUrl, data, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- });
+
+ function isAsyncGenerator(fn) {
+ return fn[Symbol.toStringTag] === 'AsyncGenerator';
}
- putJson(requestUrl_1, obj_1) {
- return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) {
- const data = JSON.stringify(obj, null, 2);
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- additionalHeaders[Headers.ContentType] =
- this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson);
- const res = yield this.put(requestUrl, data, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- });
+
+ function isAsyncIterable(obj) {
+ return typeof obj[Symbol.asyncIterator] === 'function';
}
- patchJson(requestUrl_1, obj_1) {
- return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) {
- const data = JSON.stringify(obj, null, 2);
- additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
- additionalHeaders[Headers.ContentType] =
- this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson);
- const res = yield this.patch(requestUrl, data, additionalHeaders);
- return this._processResponse(res, this.requestOptions);
- });
+
+ function wrapAsync(asyncFn) {
+ if (typeof asyncFn !== 'function') throw new Error('expected a function')
+ return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn;
}
- /**
- * Makes a raw http request.
- * All other methods such as get, post, patch, and request ultimately call this.
- * Prefer get, del, post and patch
- */
- request(verb, requestUrl, data, headers) {
- return __awaiter(this, void 0, void 0, function* () {
- if (this._disposed) {
- throw new Error('Client has already been disposed.');
+
+ // conditionally promisify a function.
+ // only return a promise if a callback is omitted
+ function awaitify (asyncFn, arity) {
+ if (!arity) arity = asyncFn.length;
+ if (!arity) throw new Error('arity is undefined')
+ function awaitable (...args) {
+ if (typeof args[arity - 1] === 'function') {
+ return asyncFn.apply(this, args)
}
- const parsedUrl = new URL(requestUrl);
- let info = this._prepareRequest(verb, parsedUrl, headers);
- // Only perform retries on reads since writes may not be idempotent.
- const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)
- ? this._maxRetries + 1
- : 1;
- let numTries = 0;
- let response;
- do {
- response = yield this.requestRaw(info, data);
- // Check if it's an authentication challenge
- if (response &&
- response.message &&
- response.message.statusCode === HttpCodes.Unauthorized) {
- let authenticationHandler;
- for (const handler of this.handlers) {
- if (handler.canHandleAuthentication(response)) {
- authenticationHandler = handler;
- break;
- }
- }
- if (authenticationHandler) {
- return authenticationHandler.handleAuthentication(this, info, data);
- }
- else {
- // We have received an unauthorized response but have no handlers to handle it.
- // Let the response return to the caller.
- return response;
- }
- }
- let redirectsRemaining = this._maxRedirects;
- while (response.message.statusCode &&
- HttpRedirectCodes.includes(response.message.statusCode) &&
- this._allowRedirects &&
- redirectsRemaining > 0) {
- const redirectUrl = response.message.headers['location'];
- if (!redirectUrl) {
- // if there's no location to redirect to, we won't
- break;
- }
- const parsedRedirectUrl = new URL(redirectUrl);
- if (parsedUrl.protocol === 'https:' &&
- parsedUrl.protocol !== parsedRedirectUrl.protocol &&
- !this._allowRedirectDowngrade) {
- throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');
- }
- // we need to finish reading the response before reassigning response
- // which will leak the open socket.
- yield response.readBody();
- // strip authorization header if redirected to a different hostname
- if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
- for (const header in headers) {
- // header names are case insensitive
- if (header.toLowerCase() === 'authorization') {
- delete headers[header];
- }
- }
- }
- // let's make the request with the new redirectUrl
- info = this._prepareRequest(verb, parsedRedirectUrl, headers);
- response = yield this.requestRaw(info, data);
- redirectsRemaining--;
- }
- if (!response.message.statusCode ||
- !HttpResponseRetryCodes.includes(response.message.statusCode)) {
- // If not a retry code, return immediately instead of retrying
- return response;
- }
- numTries += 1;
- if (numTries < maxTries) {
- yield response.readBody();
- yield this._performExponentialBackoff(numTries);
- }
- } while (numTries < maxTries);
- return response;
- });
- }
- /**
- * Needs to be called if keepAlive is set to true in request options.
- */
- dispose() {
- if (this._agent) {
- this._agent.destroy();
+
+ return new Promise((resolve, reject) => {
+ args[arity - 1] = (err, ...cbArgs) => {
+ if (err) return reject(err)
+ resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
+ };
+ asyncFn.apply(this, args);
+ })
}
- this._disposed = true;
+
+ return awaitable
}
- /**
- * Raw request.
- * @param info
- * @param data
- */
- requestRaw(info, data) {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise((resolve, reject) => {
- function callbackForResult(err, res) {
- if (err) {
- reject(err);
- }
- else if (!res) {
- // If `err` is not passed, then `res` must be passed.
- reject(new Error('Unknown error'));
- }
- else {
- resolve(res);
- }
- }
- this.requestRawWithCallback(info, data, callbackForResult);
+
+ function applyEach$1 (eachfn) {
+ return function applyEach(fns, ...callArgs) {
+ const go = awaitify(function (callback) {
+ var that = this;
+ return eachfn(fns, (fn, cb) => {
+ wrapAsync(fn).apply(that, callArgs.concat(cb));
+ }, callback);
});
- });
+ return go;
+ };
}
- /**
- * Raw request with callback.
- * @param info
- * @param data
- * @param onResult
- */
- requestRawWithCallback(info, data, onResult) {
- if (typeof data === 'string') {
- if (!info.options.headers) {
- info.options.headers = {};
- }
- info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');
- }
- let callbackCalled = false;
- function handleResult(err, res) {
- if (!callbackCalled) {
- callbackCalled = true;
- onResult(err, res);
- }
- }
- const req = info.httpModule.request(info.options, (msg) => {
- const res = new HttpClientResponse(msg);
- handleResult(undefined, res);
- });
- let socket;
- req.on('socket', sock => {
- socket = sock;
- });
- // If we ever get disconnected, we want the socket to timeout eventually
- req.setTimeout(this._socketTimeout || 3 * 60000, () => {
- if (socket) {
- socket.end();
- }
- handleResult(new Error(`Request timeout: ${info.options.path}`));
- });
- req.on('error', function (err) {
- // err has statusCode property
- // res should have headers
- handleResult(err);
- });
- if (data && typeof data === 'string') {
- req.write(data, 'utf8');
- }
- if (data && typeof data !== 'string') {
- data.on('close', function () {
- req.end();
+
+ function _asyncMap(eachfn, arr, iteratee, callback) {
+ arr = arr || [];
+ var results = [];
+ var counter = 0;
+ var _iteratee = wrapAsync(iteratee);
+
+ return eachfn(arr, (value, _, iterCb) => {
+ var index = counter++;
+ _iteratee(value, (err, v) => {
+ results[index] = v;
+ iterCb(err);
});
- data.pipe(req);
- }
- else {
- req.end();
+ }, err => {
+ callback(err, results);
+ });
+ }
+
+ function isArrayLike(value) {
+ return value &&
+ typeof value.length === 'number' &&
+ value.length >= 0 &&
+ value.length % 1 === 0;
+ }
+
+ // A temporary value used to identify if the loop should be broken.
+ // See #1064, #1293
+ const breakLoop = {};
+
+ function once(fn) {
+ function wrapper (...args) {
+ if (fn === null) return;
+ var callFn = fn;
+ fn = null;
+ callFn.apply(this, args);
}
+ Object.assign(wrapper, fn);
+ return wrapper
}
- /**
- * Gets an http agent. This function is useful when you need an http agent that handles
- * routing through a proxy server - depending upon the url and proxy environment variables.
- * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
- */
- getAgent(serverUrl) {
- const parsedUrl = new URL(serverUrl);
- return this._getAgent(parsedUrl);
+
+ function getIterator (coll) {
+ return coll[Symbol.iterator] && coll[Symbol.iterator]();
}
- getAgentDispatcher(serverUrl) {
- const parsedUrl = new URL(serverUrl);
- const proxyUrl = pm.getProxyUrl(parsedUrl);
- const useProxy = proxyUrl && proxyUrl.hostname;
- if (!useProxy) {
- return;
+
+ function createArrayIterator(coll) {
+ var i = -1;
+ var len = coll.length;
+ return function next() {
+ return ++i < len ? {value: coll[i], key: i} : null;
}
- return this._getProxyAgentDispatcher(parsedUrl, proxyUrl);
}
- _prepareRequest(method, requestUrl, headers) {
- const info = {};
- info.parsedUrl = requestUrl;
- const usingSsl = info.parsedUrl.protocol === 'https:';
- info.httpModule = usingSsl ? https : http;
- const defaultPort = usingSsl ? 443 : 80;
- info.options = {};
- info.options.host = info.parsedUrl.hostname;
- info.options.port = info.parsedUrl.port
- ? parseInt(info.parsedUrl.port)
- : defaultPort;
- info.options.path =
- (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');
- info.options.method = method;
- info.options.headers = this._mergeHeaders(headers);
- if (this.userAgent != null) {
- info.options.headers['user-agent'] = this.userAgent;
+
+ function createES2015Iterator(iterator) {
+ var i = -1;
+ return function next() {
+ var item = iterator.next();
+ if (item.done)
+ return null;
+ i++;
+ return {value: item.value, key: i};
}
- info.options.agent = this._getAgent(info.parsedUrl);
- // gives handlers an opportunity to participate
- if (this.handlers) {
- for (const handler of this.handlers) {
- handler.prepareRequest(info.options);
+ }
+
+ function createObjectIterator(obj) {
+ var okeys = obj ? Object.keys(obj) : [];
+ var i = -1;
+ var len = okeys.length;
+ return function next() {
+ var key = okeys[++i];
+ if (key === '__proto__') {
+ return next();
}
- }
- return info;
+ return i < len ? {value: obj[key], key} : null;
+ };
}
- _mergeHeaders(headers) {
- if (this.requestOptions && this.requestOptions.headers) {
- return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));
+
+ function createIterator(coll) {
+ if (isArrayLike(coll)) {
+ return createArrayIterator(coll);
}
- return lowercaseKeys(headers || {});
+
+ var iterator = getIterator(coll);
+ return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);
}
- /**
- * Gets an existing header value or returns a default.
- * Handles converting number header values to strings since HTTP headers must be strings.
- * Note: This returns string | string[] since some headers can have multiple values.
- * For headers that must always be a single string (like Content-Type), use the
- * specialized _getExistingOrDefaultContentTypeHeader method instead.
- */
- _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
- let clientHeader;
- if (this.requestOptions && this.requestOptions.headers) {
- const headerValue = lowercaseKeys(this.requestOptions.headers)[header];
- if (headerValue) {
- clientHeader =
- typeof headerValue === 'number' ? headerValue.toString() : headerValue;
- }
- }
- const additionalValue = additionalHeaders[header];
- if (additionalValue !== undefined) {
- return typeof additionalValue === 'number'
- ? additionalValue.toString()
- : additionalValue;
- }
- if (clientHeader !== undefined) {
- return clientHeader;
- }
- return _default;
+
+ function onlyOnce(fn) {
+ return function (...args) {
+ if (fn === null) throw new Error("Callback was already called.");
+ var callFn = fn;
+ fn = null;
+ callFn.apply(this, args);
+ };
}
- /**
- * Specialized version of _getExistingOrDefaultHeader for Content-Type header.
- * Always returns a single string (not an array) since Content-Type should be a single value.
- * Converts arrays to comma-separated strings and numbers to strings to ensure type safety.
- * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers
- * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]).
- */
- _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) {
- let clientHeader;
- if (this.requestOptions && this.requestOptions.headers) {
- const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType];
- if (headerValue) {
- if (typeof headerValue === 'number') {
- clientHeader = String(headerValue);
- }
- else if (Array.isArray(headerValue)) {
- clientHeader = headerValue.join(', ');
- }
- else {
- clientHeader = headerValue;
+
+ // for async generators
+ function asyncEachOfLimit(generator, limit, iteratee, callback) {
+ let done = false;
+ let canceled = false;
+ let awaiting = false;
+ let running = 0;
+ let idx = 0;
+
+ function replenish() {
+ //console.log('replenish')
+ if (running >= limit || awaiting || done) return
+ //console.log('replenish awaiting')
+ awaiting = true;
+ generator.next().then(({value, done: iterDone}) => {
+ //console.log('got value', value)
+ if (canceled || done) return
+ awaiting = false;
+ if (iterDone) {
+ done = true;
+ if (running <= 0) {
+ //console.log('done nextCb')
+ callback(null);
+ }
+ return;
}
- }
+ running++;
+ iteratee(value, idx, iterateeCallback);
+ idx++;
+ replenish();
+ }).catch(handleError);
}
- const additionalValue = additionalHeaders[Headers.ContentType];
- // Return the first non-undefined value, converting numbers or arrays to strings if necessary
- if (additionalValue !== undefined) {
- if (typeof additionalValue === 'number') {
- return String(additionalValue);
- }
- else if (Array.isArray(additionalValue)) {
- return additionalValue.join(', ');
+
+ function iterateeCallback(err, result) {
+ //console.log('iterateeCallback')
+ running -= 1;
+ if (canceled) return
+ if (err) return handleError(err)
+
+ if (err === false) {
+ done = true;
+ canceled = true;
+ return
}
- else {
- return additionalValue;
+
+ if (result === breakLoop || (done && running <= 0)) {
+ done = true;
+ //console.log('done iterCb')
+ return callback(null);
}
+ replenish();
}
- if (clientHeader !== undefined) {
- return clientHeader;
+
+ function handleError(err) {
+ if (canceled) return
+ awaiting = false;
+ done = true;
+ callback(err);
}
- return _default;
+
+ replenish();
}
- _getAgent(parsedUrl) {
- let agent;
- const proxyUrl = pm.getProxyUrl(parsedUrl);
- const useProxy = proxyUrl && proxyUrl.hostname;
- if (this._keepAlive && useProxy) {
- agent = this._proxyAgent;
- }
- if (!useProxy) {
- agent = this._agent;
- }
- // if agent is already assigned use that agent.
- if (agent) {
- return agent;
- }
- const usingSsl = parsedUrl.protocol === 'https:';
- let maxSockets = 100;
- if (this.requestOptions) {
- maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
- }
- // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.
- if (proxyUrl && proxyUrl.hostname) {
- const agentOptions = {
- maxSockets,
- keepAlive: this._keepAlive,
- proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {
- proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
- })), { host: proxyUrl.hostname, port: proxyUrl.port })
- };
- let tunnelAgent;
- const overHttps = proxyUrl.protocol === 'https:';
- if (usingSsl) {
- tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
+
+ var eachOfLimit$2 = (limit) => {
+ return (obj, iteratee, callback) => {
+ callback = once(callback);
+ if (limit <= 0) {
+ throw new RangeError('concurrency limit cannot be less than 1')
}
- else {
- tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
+ if (!obj) {
+ return callback(null);
}
- agent = tunnelAgent(agentOptions);
- this._proxyAgent = agent;
- }
- // if tunneling agent isn't assigned create a new agent
- if (!agent) {
- const options = { keepAlive: this._keepAlive, maxSockets };
- agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
- this._agent = agent;
- }
- if (usingSsl && this._ignoreSslError) {
- // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
- // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
- // we have to cast it to any and change it directly
- agent.options = Object.assign(agent.options || {}, {
- rejectUnauthorized: false
- });
- }
- return agent;
- }
- _getProxyAgentDispatcher(parsedUrl, proxyUrl) {
- let proxyAgent;
- if (this._keepAlive) {
- proxyAgent = this._proxyAgentDispatcher;
- }
- // if agent is already assigned use that agent.
- if (proxyAgent) {
- return proxyAgent;
- }
- const usingSsl = parsedUrl.protocol === 'https:';
- proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {
- token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`
- })));
- this._proxyAgentDispatcher = proxyAgent;
- if (usingSsl && this._ignoreSslError) {
- // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
- // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
- // we have to cast it to any and change it directly
- proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {
- rejectUnauthorized: false
- });
- }
- return proxyAgent;
- }
- _performExponentialBackoff(retryNumber) {
- return __awaiter(this, void 0, void 0, function* () {
- retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
- const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
- return new Promise(resolve => setTimeout(() => resolve(), ms));
- });
- }
- _processResponse(res, options) {
- return __awaiter(this, void 0, void 0, function* () {
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
- const statusCode = res.message.statusCode || 0;
- const response = {
- statusCode,
- result: null,
- headers: {}
- };
- // not found leads to null obj returned
- if (statusCode === HttpCodes.NotFound) {
- resolve(response);
+ if (isAsyncGenerator(obj)) {
+ return asyncEachOfLimit(obj, limit, iteratee, callback)
+ }
+ if (isAsyncIterable(obj)) {
+ return asyncEachOfLimit(obj[Symbol.asyncIterator](), limit, iteratee, callback)
+ }
+ var nextElem = createIterator(obj);
+ var done = false;
+ var canceled = false;
+ var running = 0;
+ var looping = false;
+
+ function iterateeCallback(err, value) {
+ if (canceled) return
+ running -= 1;
+ if (err) {
+ done = true;
+ callback(err);
}
- // get the result from the body
- function dateTimeDeserializer(key, value) {
- if (typeof value === 'string') {
- const a = new Date(value);
- if (!isNaN(a.valueOf())) {
- return a;
- }
- }
- return value;
+ else if (err === false) {
+ done = true;
+ canceled = true;
}
- let obj;
- let contents;
- try {
- contents = yield res.readBody();
- if (contents && contents.length > 0) {
- if (options && options.deserializeDates) {
- obj = JSON.parse(contents, dateTimeDeserializer);
- }
- else {
- obj = JSON.parse(contents);
- }
- response.result = obj;
- }
- response.headers = res.message.headers;
+ else if (value === breakLoop || (done && running <= 0)) {
+ done = true;
+ return callback(null);
}
- catch (err) {
- // Invalid resource (contents not json); leaving result obj null
+ else if (!looping) {
+ replenish();
}
- // note that 3xx redirects are handled by the http layer.
- if (statusCode > 299) {
- let msg;
- // if exception/error in body, attempt to get better error
- if (obj && obj.message) {
- msg = obj.message;
- }
- else if (contents && contents.length > 0) {
- // it may be the case that the exception is in the body message as string
- msg = contents;
- }
- else {
- msg = `Failed request: (${statusCode})`;
+ }
+
+ function replenish () {
+ looping = true;
+ while (running < limit && !done) {
+ var elem = nextElem();
+ if (elem === null) {
+ done = true;
+ if (running <= 0) {
+ callback(null);
+ }
+ return;
}
- const err = new HttpClientError(msg, statusCode);
- err.result = response.result;
- reject(err);
- }
- else {
- resolve(response);
+ running += 1;
+ iteratee(elem.value, elem.key, onlyOnce(iterateeCallback));
}
- }));
- });
- }
-}
-exports.HttpClient = HttpClient;
-const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
-//# sourceMappingURL=index.js.map
+ looping = false;
+ }
-/***/ }),
+ replenish();
+ };
+ };
-/***/ 19835:
-/***/ ((__unused_webpack_module, exports) => {
+ /**
+ * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name eachOfLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.eachOf]{@link module:Collections.eachOf}
+ * @alias forEachOfLimit
+ * @category Collection
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {AsyncFunction} iteratee - An async function to apply to each
+ * item in `coll`. The `key` is the item's key, or index in the case of an
+ * array.
+ * Invoked with (item, key, callback).
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ * @returns {Promise} a promise, if a callback is omitted
+ */
+ function eachOfLimit(coll, limit, iteratee, callback) {
+ return eachOfLimit$2(limit)(coll, wrapAsync(iteratee), callback);
+ }
-"use strict";
+ var eachOfLimit$1 = awaitify(eachOfLimit, 4);
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getProxyUrl = getProxyUrl;
-exports.checkBypass = checkBypass;
-function getProxyUrl(reqUrl) {
- const usingSsl = reqUrl.protocol === 'https:';
- if (checkBypass(reqUrl)) {
- return undefined;
- }
- const proxyVar = (() => {
- if (usingSsl) {
- return process.env['https_proxy'] || process.env['HTTPS_PROXY'];
- }
- else {
- return process.env['http_proxy'] || process.env['HTTP_PROXY'];
- }
- })();
- if (proxyVar) {
- try {
- return new DecodedURL(proxyVar);
+ // eachOf implementation optimized for array-likes
+ function eachOfArrayLike(coll, iteratee, callback) {
+ callback = once(callback);
+ var index = 0,
+ completed = 0,
+ {length} = coll,
+ canceled = false;
+ if (length === 0) {
+ callback(null);
}
- catch (_a) {
- if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
- return new DecodedURL(`http://${proxyVar}`);
+
+ function iteratorCallback(err, value) {
+ if (err === false) {
+ canceled = true;
+ }
+ if (canceled === true) return
+ if (err) {
+ callback(err);
+ } else if ((++completed === length) || value === breakLoop) {
+ callback(null);
+ }
}
- }
- else {
- return undefined;
- }
-}
-function checkBypass(reqUrl) {
- if (!reqUrl.hostname) {
- return false;
- }
- const reqHost = reqUrl.hostname;
- if (isLoopbackAddress(reqHost)) {
- return true;
- }
- const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';
- if (!noProxy) {
- return false;
- }
- // Determine the request port
- let reqPort;
- if (reqUrl.port) {
- reqPort = Number(reqUrl.port);
- }
- else if (reqUrl.protocol === 'http:') {
- reqPort = 80;
- }
- else if (reqUrl.protocol === 'https:') {
- reqPort = 443;
- }
- // Format the request hostname and hostname with port
- const upperReqHosts = [reqUrl.hostname.toUpperCase()];
- if (typeof reqPort === 'number') {
- upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
- }
- // Compare request host against noproxy
- for (const upperNoProxyItem of noProxy
- .split(',')
- .map(x => x.trim().toUpperCase())
- .filter(x => x)) {
- if (upperNoProxyItem === '*' ||
- upperReqHosts.some(x => x === upperNoProxyItem ||
- x.endsWith(`.${upperNoProxyItem}`) ||
- (upperNoProxyItem.startsWith('.') &&
- x.endsWith(`${upperNoProxyItem}`)))) {
- return true;
+
+ for (; index < length; index++) {
+ iteratee(coll[index], index, onlyOnce(iteratorCallback));
}
}
- return false;
-}
-function isLoopbackAddress(host) {
- const hostLower = host.toLowerCase();
- return (hostLower === 'localhost' ||
- hostLower.startsWith('127.') ||
- hostLower.startsWith('[::1]') ||
- hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
-}
-class DecodedURL extends URL {
- constructor(url, base) {
- super(url, base);
- this._decodedUsername = decodeURIComponent(super.username);
- this._decodedPassword = decodeURIComponent(super.password);
- }
- get username() {
- return this._decodedUsername;
- }
- get password() {
- return this._decodedPassword;
- }
-}
-//# sourceMappingURL=proxy.js.map
-
-/***/ }),
-
-/***/ 81962:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-"use strict";
-
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
+ // a generic version of eachOf which can handle array, object, and iterator cases.
+ function eachOfGeneric (coll, iteratee, callback) {
+ return eachOfLimit$1(coll, Infinity, iteratee, callback);
}
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-var _a;
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
-exports.readlink = readlink;
-exports.exists = exists;
-exports.isDirectory = isDirectory;
-exports.isRooted = isRooted;
-exports.tryGetExecutablePath = tryGetExecutablePath;
-exports.getCmdPath = getCmdPath;
-const fs = __importStar(__nccwpck_require__(57147));
-const path = __importStar(__nccwpck_require__(71017));
-_a = fs.promises
-// export const {open} = 'fs'
-, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
-// export const {open} = 'fs'
-exports.IS_WINDOWS = process.platform === 'win32';
-/**
- * Custom implementation of readlink to ensure Windows junctions
- * maintain trailing backslash for backward compatibility with Node.js < 24
- *
- * In Node.js 20, Windows junctions (directory symlinks) always returned paths
- * with trailing backslashes. Node.js 24 removed this behavior, which breaks
- * code that relied on this format for path operations.
- *
- * This implementation restores the Node 20 behavior by adding a trailing
- * backslash to all junction results on Windows.
- */
-function readlink(fsPath) {
- return __awaiter(this, void 0, void 0, function* () {
- const result = yield fs.promises.readlink(fsPath);
- // On Windows, restore Node 20 behavior: add trailing backslash to all results
- // since junctions on Windows are always directory links
- if (exports.IS_WINDOWS && !result.endsWith('\\')) {
- return `${result}\\`;
- }
- return result;
- });
-}
-// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691
-exports.UV_FS_O_EXLOCK = 0x10000000;
-exports.READONLY = fs.constants.O_RDONLY;
-function exists(fsPath) {
- return __awaiter(this, void 0, void 0, function* () {
- try {
- yield (0, exports.stat)(fsPath);
- }
- catch (err) {
- if (err.code === 'ENOENT') {
- return false;
- }
- throw err;
- }
- return true;
- });
-}
-function isDirectory(fsPath_1) {
- return __awaiter(this, arguments, void 0, function* (fsPath, useStat = false) {
- const stats = useStat ? yield (0, exports.stat)(fsPath) : yield (0, exports.lstat)(fsPath);
- return stats.isDirectory();
- });
-}
-/**
- * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:
- * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases).
- */
-function isRooted(p) {
- p = normalizeSeparators(p);
- if (!p) {
- throw new Error('isRooted() parameter "p" cannot be empty');
+
+ /**
+ * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument
+ * to the iteratee.
+ *
+ * @name eachOf
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias forEachOf
+ * @category Collection
+ * @see [async.each]{@link module:Collections.each}
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {AsyncFunction} iteratee - A function to apply to each
+ * item in `coll`.
+ * The `key` is the item's key, or index in the case of an array.
+ * Invoked with (item, key, callback).
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ * @returns {Promise} a promise, if a callback is omitted
+ * @example
+ *
+ * // dev.json is a file containing a valid json object config for dev environment
+ * // dev.json is a file containing a valid json object config for test environment
+ * // prod.json is a file containing a valid json object config for prod environment
+ * // invalid.json is a file with a malformed json object
+ *
+ * let configs = {}; //global variable
+ * let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'};
+ * let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'};
+ *
+ * // asynchronous function that reads a json file and parses the contents as json object
+ * function parseFile(file, key, callback) {
+ * fs.readFile(file, "utf8", function(err, data) {
+ * if (err) return calback(err);
+ * try {
+ * configs[key] = JSON.parse(data);
+ * } catch (e) {
+ * return callback(e);
+ * }
+ * callback();
+ * });
+ * }
+ *
+ * // Using callbacks
+ * async.forEachOf(validConfigFileMap, parseFile, function (err) {
+ * if (err) {
+ * console.error(err);
+ * } else {
+ * console.log(configs);
+ * // configs is now a map of JSON data, e.g.
+ * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
+ * }
+ * });
+ *
+ * //Error handing
+ * async.forEachOf(invalidConfigFileMap, parseFile, function (err) {
+ * if (err) {
+ * console.error(err);
+ * // JSON parse error exception
+ * } else {
+ * console.log(configs);
+ * }
+ * });
+ *
+ * // Using Promises
+ * async.forEachOf(validConfigFileMap, parseFile)
+ * .then( () => {
+ * console.log(configs);
+ * // configs is now a map of JSON data, e.g.
+ * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
+ * }).catch( err => {
+ * console.error(err);
+ * });
+ *
+ * //Error handing
+ * async.forEachOf(invalidConfigFileMap, parseFile)
+ * .then( () => {
+ * console.log(configs);
+ * }).catch( err => {
+ * console.error(err);
+ * // JSON parse error exception
+ * });
+ *
+ * // Using async/await
+ * async () => {
+ * try {
+ * let result = await async.forEachOf(validConfigFileMap, parseFile);
+ * console.log(configs);
+ * // configs is now a map of JSON data, e.g.
+ * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
+ * }
+ * catch (err) {
+ * console.log(err);
+ * }
+ * }
+ *
+ * //Error handing
+ * async () => {
+ * try {
+ * let result = await async.forEachOf(invalidConfigFileMap, parseFile);
+ * console.log(configs);
+ * }
+ * catch (err) {
+ * console.log(err);
+ * // JSON parse error exception
+ * }
+ * }
+ *
+ */
+ function eachOf(coll, iteratee, callback) {
+ var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric;
+ return eachOfImplementation(coll, wrapAsync(iteratee), callback);
}
- if (exports.IS_WINDOWS) {
- return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello
- ); // e.g. C: or C:\hello
+
+ var eachOf$1 = awaitify(eachOf, 3);
+
+ /**
+ * Produces a new collection of values by mapping each value in `coll` through
+ * the `iteratee` function. The `iteratee` is called with an item from `coll`
+ * and a callback for when it has finished processing. Each of these callbacks
+ * takes 2 arguments: an `error`, and the transformed item from `coll`. If
+ * `iteratee` passes an error to its callback, the main `callback` (for the
+ * `map` function) is immediately called with the error.
+ *
+ * Note, that since this function applies the `iteratee` to each item in
+ * parallel, there is no guarantee that the `iteratee` functions will complete
+ * in order. However, the results array will be in the same order as the
+ * original `coll`.
+ *
+ * If `map` is passed an Object, the results will be an Array. The results
+ * will roughly be in the order of the original Objects' keys (but this can
+ * vary across JavaScript engines).
+ *
+ * @name map
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @category Collection
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * The iteratee should complete with the transformed item.
+ * Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Results is an Array of the
+ * transformed items from the `coll`. Invoked with (err, results).
+ * @returns {Promise} a promise, if no callback is passed
+ * @example
+ *
+ * // file1.txt is a file that is 1000 bytes in size
+ * // file2.txt is a file that is 2000 bytes in size
+ * // file3.txt is a file that is 3000 bytes in size
+ * // file4.txt does not exist
+ *
+ * const fileList = ['file1.txt','file2.txt','file3.txt'];
+ * const withMissingFileList = ['file1.txt','file2.txt','file4.txt'];
+ *
+ * // asynchronous function that returns the file size in bytes
+ * function getFileSizeInBytes(file, callback) {
+ * fs.stat(file, function(err, stat) {
+ * if (err) {
+ * return callback(err);
+ * }
+ * callback(null, stat.size);
+ * });
+ * }
+ *
+ * // Using callbacks
+ * async.map(fileList, getFileSizeInBytes, function(err, results) {
+ * if (err) {
+ * console.log(err);
+ * } else {
+ * console.log(results);
+ * // results is now an array of the file size in bytes for each file, e.g.
+ * // [ 1000, 2000, 3000]
+ * }
+ * });
+ *
+ * // Error Handling
+ * async.map(withMissingFileList, getFileSizeInBytes, function(err, results) {
+ * if (err) {
+ * console.log(err);
+ * // [ Error: ENOENT: no such file or directory ]
+ * } else {
+ * console.log(results);
+ * }
+ * });
+ *
+ * // Using Promises
+ * async.map(fileList, getFileSizeInBytes)
+ * .then( results => {
+ * console.log(results);
+ * // results is now an array of the file size in bytes for each file, e.g.
+ * // [ 1000, 2000, 3000]
+ * }).catch( err => {
+ * console.log(err);
+ * });
+ *
+ * // Error Handling
+ * async.map(withMissingFileList, getFileSizeInBytes)
+ * .then( results => {
+ * console.log(results);
+ * }).catch( err => {
+ * console.log(err);
+ * // [ Error: ENOENT: no such file or directory ]
+ * });
+ *
+ * // Using async/await
+ * async () => {
+ * try {
+ * let results = await async.map(fileList, getFileSizeInBytes);
+ * console.log(results);
+ * // results is now an array of the file size in bytes for each file, e.g.
+ * // [ 1000, 2000, 3000]
+ * }
+ * catch (err) {
+ * console.log(err);
+ * }
+ * }
+ *
+ * // Error Handling
+ * async () => {
+ * try {
+ * let results = await async.map(withMissingFileList, getFileSizeInBytes);
+ * console.log(results);
+ * }
+ * catch (err) {
+ * console.log(err);
+ * // [ Error: ENOENT: no such file or directory ]
+ * }
+ * }
+ *
+ */
+ function map (coll, iteratee, callback) {
+ return _asyncMap(eachOf$1, coll, iteratee, callback)
}
- return p.startsWith('/');
-}
-/**
- * Best effort attempt to determine whether a file exists and is executable.
- * @param filePath file path to check
- * @param extensions additional file extensions to try
- * @return if file exists and is executable, returns the file path. otherwise empty string.
- */
-function tryGetExecutablePath(filePath, extensions) {
- return __awaiter(this, void 0, void 0, function* () {
- let stats = undefined;
- try {
- // test file exists
- stats = yield (0, exports.stat)(filePath);
- }
- catch (err) {
- if (err.code !== 'ENOENT') {
- // eslint-disable-next-line no-console
- console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);
- }
- }
- if (stats && stats.isFile()) {
- if (exports.IS_WINDOWS) {
- // on Windows, test for valid extension
- const upperExt = path.extname(filePath).toUpperCase();
- if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {
- return filePath;
- }
- }
- else {
- if (isUnixExecutable(stats)) {
- return filePath;
- }
- }
- }
- // try each extension
- const originalFilePath = filePath;
- for (const extension of extensions) {
- filePath = originalFilePath + extension;
- stats = undefined;
- try {
- stats = yield (0, exports.stat)(filePath);
- }
- catch (err) {
- if (err.code !== 'ENOENT') {
- // eslint-disable-next-line no-console
- console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);
- }
- }
- if (stats && stats.isFile()) {
- if (exports.IS_WINDOWS) {
- // preserve the case of the actual file (since an extension was appended)
- try {
- const directory = path.dirname(filePath);
- const upperName = path.basename(filePath).toUpperCase();
- for (const actualName of yield (0, exports.readdir)(directory)) {
- if (upperName === actualName.toUpperCase()) {
- filePath = path.join(directory, actualName);
- break;
- }
- }
- }
- catch (err) {
- // eslint-disable-next-line no-console
- console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);
- }
- return filePath;
- }
- else {
- if (isUnixExecutable(stats)) {
- return filePath;
- }
- }
- }
- }
- return '';
- });
-}
-function normalizeSeparators(p) {
- p = p || '';
- if (exports.IS_WINDOWS) {
- // convert slashes on Windows
- p = p.replace(/\//g, '\\');
- // remove redundant slashes
- return p.replace(/\\\\+/g, '\\');
+ var map$1 = awaitify(map, 3);
+
+ /**
+ * Applies the provided arguments to each function in the array, calling
+ * `callback` after all functions have completed. If you only provide the first
+ * argument, `fns`, then it will return a function which lets you pass in the
+ * arguments as if it were a single function call. If more arguments are
+ * provided, `callback` is required while `args` is still optional. The results
+ * for each of the applied async functions are passed to the final callback
+ * as an array.
+ *
+ * @name applyEach
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s
+ * to all call with the same arguments
+ * @param {...*} [args] - any number of separate arguments to pass to the
+ * function.
+ * @param {Function} [callback] - the final argument should be the callback,
+ * called when all functions have completed processing.
+ * @returns {AsyncFunction} - Returns a function that takes no args other than
+ * an optional callback, that is the result of applying the `args` to each
+ * of the functions.
+ * @example
+ *
+ * const appliedFn = async.applyEach([enableSearch, updateSchema], 'bucket')
+ *
+ * appliedFn((err, results) => {
+ * // results[0] is the results for `enableSearch`
+ * // results[1] is the results for `updateSchema`
+ * });
+ *
+ * // partial application example:
+ * async.each(
+ * buckets,
+ * async (bucket) => async.applyEach([enableSearch, updateSchema], bucket)(),
+ * callback
+ * );
+ */
+ var applyEach = applyEach$1(map$1);
+
+ /**
+ * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
+ *
+ * @name eachOfSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.eachOf]{@link module:Collections.eachOf}
+ * @alias forEachOfSeries
+ * @category Collection
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * Invoked with (item, key, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Invoked with (err).
+ * @returns {Promise} a promise, if a callback is omitted
+ */
+ function eachOfSeries(coll, iteratee, callback) {
+ return eachOfLimit$1(coll, 1, iteratee, callback)
}
- // remove redundant slashes
- return p.replace(/\/\/+/g, '/');
-}
-// on Mac/Linux, test the execute bit
-// R W X R W X R W X
-// 256 128 64 32 16 8 4 2 1
-function isUnixExecutable(stats) {
- return ((stats.mode & 1) > 0 ||
- ((stats.mode & 8) > 0 &&
- process.getgid !== undefined &&
- stats.gid === process.getgid()) ||
- ((stats.mode & 64) > 0 &&
- process.getuid !== undefined &&
- stats.uid === process.getuid()));
-}
-// Get the path of cmd.exe in windows
-function getCmdPath() {
- var _a;
- return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;
-}
-//# sourceMappingURL=io-util.js.map
+ var eachOfSeries$1 = awaitify(eachOfSeries, 3);
-/***/ }),
+ /**
+ * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.
+ *
+ * @name mapSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.map]{@link module:Collections.map}
+ * @category Collection
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * The iteratee should complete with the transformed item.
+ * Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Results is an array of the
+ * transformed items from the `coll`. Invoked with (err, results).
+ * @returns {Promise} a promise, if no callback is passed
+ */
+ function mapSeries (coll, iteratee, callback) {
+ return _asyncMap(eachOfSeries$1, coll, iteratee, callback)
+ }
+ var mapSeries$1 = awaitify(mapSeries, 3);
-/***/ 47351:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
+ /**
+ * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.
+ *
+ * @name applyEachSeries
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.applyEach]{@link module:ControlFlow.applyEach}
+ * @category Control Flow
+ * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s to all
+ * call with the same arguments
+ * @param {...*} [args] - any number of separate arguments to pass to the
+ * function.
+ * @param {Function} [callback] - the final argument should be the callback,
+ * called when all functions have completed processing.
+ * @returns {AsyncFunction} - A function, that when called, is the result of
+ * appling the `args` to the list of functions. It takes no args, other than
+ * a callback.
+ */
+ var applyEachSeries = applyEach$1(mapSeries$1);
-"use strict";
+ const PROMISE_SYMBOL = Symbol('promiseCallback');
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
+ function promiseCallback () {
+ let resolve, reject;
+ function callback (err, ...args) {
+ if (err) return reject(err)
+ resolve(args.length > 1 ? args : args[0]);
+ }
+
+ callback[PROMISE_SYMBOL] = new Promise((res, rej) => {
+ resolve = res,
+ reject = rej;
+ });
+
+ return callback
}
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.cp = cp;
-exports.mv = mv;
-exports.rmRF = rmRF;
-exports.mkdirP = mkdirP;
-exports.which = which;
-exports.findInPath = findInPath;
-const assert_1 = __nccwpck_require__(39491);
-const path = __importStar(__nccwpck_require__(71017));
-const ioUtil = __importStar(__nccwpck_require__(81962));
-/**
- * Copies a file or folder.
- * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
- *
- * @param source source path
- * @param dest destination path
- * @param options optional. See CopyOptions.
- */
-function cp(source_1, dest_1) {
- return __awaiter(this, arguments, void 0, function* (source, dest, options = {}) {
- const { force, recursive, copySourceDirectory } = readCopyOptions(options);
- const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;
- // Dest is an existing file, but not forcing
- if (destStat && destStat.isFile() && !force) {
- return;
+
+ /**
+ * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on
+ * their requirements. Each function can optionally depend on other functions
+ * being completed first, and each function is run as soon as its requirements
+ * are satisfied.
+ *
+ * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence
+ * will stop. Further tasks will not execute (so any other functions depending
+ * on it will not run), and the main `callback` is immediately called with the
+ * error.
+ *
+ * {@link AsyncFunction}s also receive an object containing the results of functions which
+ * have completed so far as the first argument, if they have dependencies. If a
+ * task function has no dependencies, it will only be passed a callback.
+ *
+ * @name auto
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {Object} tasks - An object. Each of its properties is either a
+ * function or an array of requirements, with the {@link AsyncFunction} itself the last item
+ * in the array. The object's key of a property serves as the name of the task
+ * defined by that property, i.e. can be used when specifying requirements for
+ * other tasks. The function receives one or two arguments:
+ * * a `results` object, containing the results of the previously executed
+ * functions, only passed if the task has any dependencies,
+ * * a `callback(err, result)` function, which must be called when finished,
+ * passing an `error` (which can be `null`) and the result of the function's
+ * execution.
+ * @param {number} [concurrency=Infinity] - An optional `integer` for
+ * determining the maximum number of tasks that can be run in parallel. By
+ * default, as many as possible.
+ * @param {Function} [callback] - An optional callback which is called when all
+ * the tasks have been completed. It receives the `err` argument if any `tasks`
+ * pass an error to their callback. Results are always returned; however, if an
+ * error occurs, no further `tasks` will be performed, and the results object
+ * will only contain partial results. Invoked with (err, results).
+ * @returns {Promise} a promise, if a callback is not passed
+ * @example
+ *
+ * //Using Callbacks
+ * async.auto({
+ * get_data: function(callback) {
+ * // async code to get some data
+ * callback(null, 'data', 'converted to array');
+ * },
+ * make_folder: function(callback) {
+ * // async code to create a directory to store a file in
+ * // this is run at the same time as getting the data
+ * callback(null, 'folder');
+ * },
+ * write_file: ['get_data', 'make_folder', function(results, callback) {
+ * // once there is some data and the directory exists,
+ * // write the data to a file in the directory
+ * callback(null, 'filename');
+ * }],
+ * email_link: ['write_file', function(results, callback) {
+ * // once the file is written let's email a link to it...
+ * callback(null, {'file':results.write_file, 'email':'user@example.com'});
+ * }]
+ * }, function(err, results) {
+ * if (err) {
+ * console.log('err = ', err);
+ * }
+ * console.log('results = ', results);
+ * // results = {
+ * // get_data: ['data', 'converted to array']
+ * // make_folder; 'folder',
+ * // write_file: 'filename'
+ * // email_link: { file: 'filename', email: 'user@example.com' }
+ * // }
+ * });
+ *
+ * //Using Promises
+ * async.auto({
+ * get_data: function(callback) {
+ * console.log('in get_data');
+ * // async code to get some data
+ * callback(null, 'data', 'converted to array');
+ * },
+ * make_folder: function(callback) {
+ * console.log('in make_folder');
+ * // async code to create a directory to store a file in
+ * // this is run at the same time as getting the data
+ * callback(null, 'folder');
+ * },
+ * write_file: ['get_data', 'make_folder', function(results, callback) {
+ * // once there is some data and the directory exists,
+ * // write the data to a file in the directory
+ * callback(null, 'filename');
+ * }],
+ * email_link: ['write_file', function(results, callback) {
+ * // once the file is written let's email a link to it...
+ * callback(null, {'file':results.write_file, 'email':'user@example.com'});
+ * }]
+ * }).then(results => {
+ * console.log('results = ', results);
+ * // results = {
+ * // get_data: ['data', 'converted to array']
+ * // make_folder; 'folder',
+ * // write_file: 'filename'
+ * // email_link: { file: 'filename', email: 'user@example.com' }
+ * // }
+ * }).catch(err => {
+ * console.log('err = ', err);
+ * });
+ *
+ * //Using async/await
+ * async () => {
+ * try {
+ * let results = await async.auto({
+ * get_data: function(callback) {
+ * // async code to get some data
+ * callback(null, 'data', 'converted to array');
+ * },
+ * make_folder: function(callback) {
+ * // async code to create a directory to store a file in
+ * // this is run at the same time as getting the data
+ * callback(null, 'folder');
+ * },
+ * write_file: ['get_data', 'make_folder', function(results, callback) {
+ * // once there is some data and the directory exists,
+ * // write the data to a file in the directory
+ * callback(null, 'filename');
+ * }],
+ * email_link: ['write_file', function(results, callback) {
+ * // once the file is written let's email a link to it...
+ * callback(null, {'file':results.write_file, 'email':'user@example.com'});
+ * }]
+ * });
+ * console.log('results = ', results);
+ * // results = {
+ * // get_data: ['data', 'converted to array']
+ * // make_folder; 'folder',
+ * // write_file: 'filename'
+ * // email_link: { file: 'filename', email: 'user@example.com' }
+ * // }
+ * }
+ * catch (err) {
+ * console.log(err);
+ * }
+ * }
+ *
+ */
+ function auto(tasks, concurrency, callback) {
+ if (typeof concurrency !== 'number') {
+ // concurrency is optional, shift the args.
+ callback = concurrency;
+ concurrency = null;
}
- // If dest is an existing directory, should copy inside.
- const newDest = destStat && destStat.isDirectory() && copySourceDirectory
- ? path.join(dest, path.basename(source))
- : dest;
- if (!(yield ioUtil.exists(source))) {
- throw new Error(`no such file or directory: ${source}`);
+ callback = once(callback || promiseCallback());
+ var numTasks = Object.keys(tasks).length;
+ if (!numTasks) {
+ return callback(null);
}
- const sourceStat = yield ioUtil.stat(source);
- if (sourceStat.isDirectory()) {
- if (!recursive) {
- throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);
- }
- else {
- yield cpDirRecursive(source, newDest, 0, force);
- }
+ if (!concurrency) {
+ concurrency = numTasks;
}
- else {
- if (path.relative(source, newDest) === '') {
- // a file cannot be copied to itself
- throw new Error(`'${newDest}' and '${source}' are the same file`);
+
+ var results = {};
+ var runningTasks = 0;
+ var canceled = false;
+ var hasError = false;
+
+ var listeners = Object.create(null);
+
+ var readyTasks = [];
+
+ // for cycle detection:
+ var readyToCheck = []; // tasks that have been identified as reachable
+ // without the possibility of returning to an ancestor task
+ var uncheckedDependencies = {};
+
+ Object.keys(tasks).forEach(key => {
+ var task = tasks[key];
+ if (!Array.isArray(task)) {
+ // no dependencies
+ enqueueTask(key, [task]);
+ readyToCheck.push(key);
+ return;
}
- yield copyFile(source, newDest, force);
- }
- });
-}
-/**
- * Moves a path.
- *
- * @param source source path
- * @param dest destination path
- * @param options optional. See MoveOptions.
- */
-function mv(source_1, dest_1) {
- return __awaiter(this, arguments, void 0, function* (source, dest, options = {}) {
- if (yield ioUtil.exists(dest)) {
- let destExists = true;
- if (yield ioUtil.isDirectory(dest)) {
- // If dest is directory copy src into dest
- dest = path.join(dest, path.basename(source));
- destExists = yield ioUtil.exists(dest);
+
+ var dependencies = task.slice(0, task.length - 1);
+ var remainingDependencies = dependencies.length;
+ if (remainingDependencies === 0) {
+ enqueueTask(key, task);
+ readyToCheck.push(key);
+ return;
}
- if (destExists) {
- if (options.force == null || options.force) {
- yield rmRF(dest);
- }
- else {
- throw new Error('Destination already exists');
+ uncheckedDependencies[key] = remainingDependencies;
+
+ dependencies.forEach(dependencyName => {
+ if (!tasks[dependencyName]) {
+ throw new Error('async.auto task `' + key +
+ '` has a non-existent dependency `' +
+ dependencyName + '` in ' +
+ dependencies.join(', '));
}
- }
+ addListener(dependencyName, () => {
+ remainingDependencies--;
+ if (remainingDependencies === 0) {
+ enqueueTask(key, task);
+ }
+ });
+ });
+ });
+
+ checkForDeadlocks();
+ processQueue();
+
+ function enqueueTask(key, task) {
+ readyTasks.push(() => runTask(key, task));
}
- yield mkdirP(path.dirname(dest));
- yield ioUtil.rename(source, dest);
- });
-}
-/**
- * Remove a path recursively with force
- *
- * @param inputPath path to remove
- */
-function rmRF(inputPath) {
- return __awaiter(this, void 0, void 0, function* () {
- if (ioUtil.IS_WINDOWS) {
- // Check for invalid characters
- // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
- if (/[*"<>|]/.test(inputPath)) {
- throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');
+
+ function processQueue() {
+ if (canceled) return
+ if (readyTasks.length === 0 && runningTasks === 0) {
+ return callback(null, results);
}
+ while(readyTasks.length && runningTasks < concurrency) {
+ var run = readyTasks.shift();
+ run();
+ }
+
}
- try {
- // note if path does not exist, error is silent
- yield ioUtil.rm(inputPath, {
- force: true,
- maxRetries: 3,
- recursive: true,
- retryDelay: 300
- });
- }
- catch (err) {
- throw new Error(`File was unable to be removed ${err}`);
+
+ function addListener(taskName, fn) {
+ var taskListeners = listeners[taskName];
+ if (!taskListeners) {
+ taskListeners = listeners[taskName] = [];
+ }
+
+ taskListeners.push(fn);
}
- });
-}
-/**
- * Make a directory. Creates the full path with folders in between
- * Will throw if it fails
- *
- * @param fsPath path to create
- * @returns Promise
- */
-function mkdirP(fsPath) {
- return __awaiter(this, void 0, void 0, function* () {
- (0, assert_1.ok)(fsPath, 'a path argument must be provided');
- yield ioUtil.mkdir(fsPath, { recursive: true });
- });
-}
-/**
- * Returns path of a tool had the tool actually been invoked. Resolves via paths.
- * If you check and the tool does not exist, it will throw.
- *
- * @param tool name of the tool
- * @param check whether to check if tool exists
- * @returns Promise path to tool
- */
-function which(tool, check) {
- return __awaiter(this, void 0, void 0, function* () {
- if (!tool) {
- throw new Error("parameter 'tool' is required");
+
+ function taskComplete(taskName) {
+ var taskListeners = listeners[taskName] || [];
+ taskListeners.forEach(fn => fn());
+ processQueue();
}
- // recursive when check=true
- if (check) {
- const result = yield which(tool, false);
- if (!result) {
- if (ioUtil.IS_WINDOWS) {
- throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`);
+
+
+ function runTask(key, task) {
+ if (hasError) return;
+
+ var taskCallback = onlyOnce((err, ...result) => {
+ runningTasks--;
+ if (err === false) {
+ canceled = true;
+ return
}
- else {
- throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);
+ if (result.length < 2) {
+ [result] = result;
}
- }
- return result;
- }
- const matches = yield findInPath(tool);
- if (matches && matches.length > 0) {
- return matches[0];
- }
- return '';
- });
-}
-/**
- * Returns a list of all occurrences of the given tool on the system path.
- *
- * @returns Promise the paths of the tool
- */
-function findInPath(tool) {
- return __awaiter(this, void 0, void 0, function* () {
- if (!tool) {
- throw new Error("parameter 'tool' is required");
- }
- // build the list of extensions to try
- const extensions = [];
- if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {
- for (const extension of process.env['PATHEXT'].split(path.delimiter)) {
- if (extension) {
- extensions.push(extension);
+ if (err) {
+ var safeResults = {};
+ Object.keys(results).forEach(rkey => {
+ safeResults[rkey] = results[rkey];
+ });
+ safeResults[key] = result;
+ hasError = true;
+ listeners = Object.create(null);
+ if (canceled) return
+ callback(err, safeResults);
+ } else {
+ results[key] = result;
+ taskComplete(key);
}
+ });
+
+ runningTasks++;
+ var taskFn = wrapAsync(task[task.length - 1]);
+ if (task.length > 1) {
+ taskFn(results, taskCallback);
+ } else {
+ taskFn(taskCallback);
}
}
- // if it's rooted, return it if exists. otherwise return empty.
- if (ioUtil.isRooted(tool)) {
- const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);
- if (filePath) {
- return [filePath];
+
+ function checkForDeadlocks() {
+ // Kahn's algorithm
+ // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm
+ // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html
+ var currentTask;
+ var counter = 0;
+ while (readyToCheck.length) {
+ currentTask = readyToCheck.pop();
+ counter++;
+ getDependents(currentTask).forEach(dependent => {
+ if (--uncheckedDependencies[dependent] === 0) {
+ readyToCheck.push(dependent);
+ }
+ });
+ }
+
+ if (counter !== numTasks) {
+ throw new Error(
+ 'async.auto cannot execute tasks due to a recursive dependency'
+ );
}
- return [];
}
- // if any path separators, return empty
- if (tool.includes(path.sep)) {
- return [];
+
+ function getDependents(taskName) {
+ var result = [];
+ Object.keys(tasks).forEach(key => {
+ const task = tasks[key];
+ if (Array.isArray(task) && task.indexOf(taskName) >= 0) {
+ result.push(key);
+ }
+ });
+ return result;
}
- // build the list of directories
- //
- // Note, technically "where" checks the current directory on Windows. From a toolkit perspective,
- // it feels like we should not do this. Checking the current directory seems like more of a use
- // case of a shell, and the which() function exposed by the toolkit should strive for consistency
- // across platforms.
- const directories = [];
- if (process.env.PATH) {
- for (const p of process.env.PATH.split(path.delimiter)) {
- if (p) {
- directories.push(p);
+
+ return callback[PROMISE_SYMBOL]
+ }
+
+ var FN_ARGS = /^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/;
+ var ARROW_FN_ARGS = /^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/;
+ var FN_ARG_SPLIT = /,/;
+ var FN_ARG = /(=.+)?(\s*)$/;
+
+ function stripComments(string) {
+ let stripped = '';
+ let index = 0;
+ let endBlockComment = string.indexOf('*/');
+ while (index < string.length) {
+ if (string[index] === '/' && string[index+1] === '/') {
+ // inline comment
+ let endIndex = string.indexOf('\n', index);
+ index = (endIndex === -1) ? string.length : endIndex;
+ } else if ((endBlockComment !== -1) && (string[index] === '/') && (string[index+1] === '*')) {
+ // block comment
+ let endIndex = string.indexOf('*/', index);
+ if (endIndex !== -1) {
+ index = endIndex + 2;
+ endBlockComment = string.indexOf('*/', index);
+ } else {
+ stripped += string[index];
+ index++;
}
+ } else {
+ stripped += string[index];
+ index++;
}
}
- // find all matches
- const matches = [];
- for (const directory of directories) {
- const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);
- if (filePath) {
- matches.push(filePath);
- }
- }
- return matches;
- });
-}
-function readCopyOptions(options) {
- const force = options.force == null ? true : options.force;
- const recursive = Boolean(options.recursive);
- const copySourceDirectory = options.copySourceDirectory == null
- ? true
- : Boolean(options.copySourceDirectory);
- return { force, recursive, copySourceDirectory };
-}
-function cpDirRecursive(sourceDir, destDir, currentDepth, force) {
- return __awaiter(this, void 0, void 0, function* () {
- // Ensure there is not a run away recursive copy
- if (currentDepth >= 255)
- return;
- currentDepth++;
- yield mkdirP(destDir);
- const files = yield ioUtil.readdir(sourceDir);
- for (const fileName of files) {
- const srcFile = `${sourceDir}/${fileName}`;
- const destFile = `${destDir}/${fileName}`;
- const srcFileStat = yield ioUtil.lstat(srcFile);
- if (srcFileStat.isDirectory()) {
- // Recurse
- yield cpDirRecursive(srcFile, destFile, currentDepth, force);
- }
- else {
- yield copyFile(srcFile, destFile, force);
- }
+ return stripped;
+ }
+
+ function parseParams(func) {
+ const src = stripComments(func.toString());
+ let match = src.match(FN_ARGS);
+ if (!match) {
+ match = src.match(ARROW_FN_ARGS);
}
- // Change the mode for the newly created directory
- yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);
- });
-}
-// Buffered file copy
-function copyFile(srcFile, destFile, force) {
- return __awaiter(this, void 0, void 0, function* () {
- if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {
- // unlink/re-link it
- try {
- yield ioUtil.lstat(destFile);
- yield ioUtil.unlink(destFile);
- }
- catch (e) {
- // Try to override file permission
- if (e.code === 'EPERM') {
- yield ioUtil.chmod(destFile, '0666');
- yield ioUtil.unlink(destFile);
+ if (!match) throw new Error('could not parse args in autoInject\nSource:\n' + src)
+ let [, args] = match;
+ return args
+ .replace(/\s/g, '')
+ .split(FN_ARG_SPLIT)
+ .map((arg) => arg.replace(FN_ARG, '').trim());
+ }
+
+ /**
+ * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent
+ * tasks are specified as parameters to the function, after the usual callback
+ * parameter, with the parameter names matching the names of the tasks it
+ * depends on. This can provide even more readable task graphs which can be
+ * easier to maintain.
+ *
+ * If a final callback is specified, the task results are similarly injected,
+ * specified as named parameters after the initial error parameter.
+ *
+ * The autoInject function is purely syntactic sugar and its semantics are
+ * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}.
+ *
+ * @name autoInject
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.auto]{@link module:ControlFlow.auto}
+ * @category Control Flow
+ * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of
+ * the form 'func([dependencies...], callback). The object's key of a property
+ * serves as the name of the task defined by that property, i.e. can be used
+ * when specifying requirements for other tasks.
+ * * The `callback` parameter is a `callback(err, result)` which must be called
+ * when finished, passing an `error` (which can be `null`) and the result of
+ * the function's execution. The remaining parameters name other tasks on
+ * which the task is dependent, and the results from those tasks are the
+ * arguments of those parameters.
+ * @param {Function} [callback] - An optional callback which is called when all
+ * the tasks have been completed. It receives the `err` argument if any `tasks`
+ * pass an error to their callback, and a `results` object with any completed
+ * task results, similar to `auto`.
+ * @returns {Promise} a promise, if no callback is passed
+ * @example
+ *
+ * // The example from `auto` can be rewritten as follows:
+ * async.autoInject({
+ * get_data: function(callback) {
+ * // async code to get some data
+ * callback(null, 'data', 'converted to array');
+ * },
+ * make_folder: function(callback) {
+ * // async code to create a directory to store a file in
+ * // this is run at the same time as getting the data
+ * callback(null, 'folder');
+ * },
+ * write_file: function(get_data, make_folder, callback) {
+ * // once there is some data and the directory exists,
+ * // write the data to a file in the directory
+ * callback(null, 'filename');
+ * },
+ * email_link: function(write_file, callback) {
+ * // once the file is written let's email a link to it...
+ * // write_file contains the filename returned by write_file.
+ * callback(null, {'file':write_file, 'email':'user@example.com'});
+ * }
+ * }, function(err, results) {
+ * console.log('err = ', err);
+ * console.log('email_link = ', results.email_link);
+ * });
+ *
+ * // If you are using a JS minifier that mangles parameter names, `autoInject`
+ * // will not work with plain functions, since the parameter names will be
+ * // collapsed to a single letter identifier. To work around this, you can
+ * // explicitly specify the names of the parameters your task function needs
+ * // in an array, similar to Angular.js dependency injection.
+ *
+ * // This still has an advantage over plain `auto`, since the results a task
+ * // depends on are still spread into arguments.
+ * async.autoInject({
+ * //...
+ * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) {
+ * callback(null, 'filename');
+ * }],
+ * email_link: ['write_file', function(write_file, callback) {
+ * callback(null, {'file':write_file, 'email':'user@example.com'});
+ * }]
+ * //...
+ * }, function(err, results) {
+ * console.log('err = ', err);
+ * console.log('email_link = ', results.email_link);
+ * });
+ */
+ function autoInject(tasks, callback) {
+ var newTasks = {};
+
+ Object.keys(tasks).forEach(key => {
+ var taskFn = tasks[key];
+ var params;
+ var fnIsAsync = isAsync(taskFn);
+ var hasNoDeps =
+ (!fnIsAsync && taskFn.length === 1) ||
+ (fnIsAsync && taskFn.length === 0);
+
+ if (Array.isArray(taskFn)) {
+ params = [...taskFn];
+ taskFn = params.pop();
+
+ newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);
+ } else if (hasNoDeps) {
+ // no dependencies, use the function as-is
+ newTasks[key] = taskFn;
+ } else {
+ params = parseParams(taskFn);
+ if ((taskFn.length === 0 && !fnIsAsync) && params.length === 0) {
+ throw new Error("autoInject task functions require explicit parameters.");
}
- // other errors = it doesn't exist, no work to do
- }
- // Copy over symlink
- const symlinkFull = yield ioUtil.readlink(srcFile);
- yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);
- }
- else if (!(yield ioUtil.exists(destFile)) || force) {
- yield ioUtil.copyFile(srcFile, destFile);
- }
- });
-}
-//# sourceMappingURL=io.js.map
-/***/ }),
+ // remove callback param
+ if (!fnIsAsync) params.pop();
-/***/ 40334:
-/***/ ((module) => {
+ newTasks[key] = params.concat(newTask);
+ }
-"use strict";
+ function newTask(results, taskCb) {
+ var newArgs = params.map(name => results[name]);
+ newArgs.push(taskCb);
+ wrapAsync(taskFn)(...newArgs);
+ }
+ });
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
-};
-var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
-};
-var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+ return auto(newTasks, callback);
+ }
-// pkg/dist-src/index.js
-var dist_src_exports = {};
-__export(dist_src_exports, {
- createTokenAuth: () => createTokenAuth
-});
-module.exports = __toCommonJS(dist_src_exports);
+ // Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation
+ // used for queues. This implementation assumes that the node provided by the user can be modified
+ // to adjust the next and last properties. We implement only the minimal functionality
+ // for queue support.
+ class DLL {
+ constructor() {
+ this.head = this.tail = null;
+ this.length = 0;
+ }
-// pkg/dist-src/auth.js
-var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
-var REGEX_IS_INSTALLATION = /^ghs_/;
-var REGEX_IS_USER_TO_SERVER = /^ghu_/;
-async function auth(token) {
- const isApp = token.split(/\./).length === 3;
- const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);
- const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
- const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
- return {
- type: "token",
- token,
- tokenType
- };
-}
+ removeLink(node) {
+ if (node.prev) node.prev.next = node.next;
+ else this.head = node.next;
+ if (node.next) node.next.prev = node.prev;
+ else this.tail = node.prev;
-// pkg/dist-src/with-authorization-prefix.js
-function withAuthorizationPrefix(token) {
- if (token.split(/\./).length === 3) {
- return `bearer ${token}`;
- }
- return `token ${token}`;
-}
+ node.prev = node.next = null;
+ this.length -= 1;
+ return node;
+ }
-// pkg/dist-src/hook.js
-async function hook(token, request, route, parameters) {
- const endpoint = request.endpoint.merge(
- route,
- parameters
- );
- endpoint.headers.authorization = withAuthorizationPrefix(token);
- return request(endpoint);
-}
+ empty () {
+ while(this.head) this.shift();
+ return this;
+ }
-// pkg/dist-src/index.js
-var createTokenAuth = function createTokenAuth2(token) {
- if (!token) {
- throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
- }
- if (typeof token !== "string") {
- throw new Error(
- "[@octokit/auth-token] Token passed to createTokenAuth is not a string"
- );
- }
- token = token.replace(/^(token|bearer) +/i, "");
- return Object.assign(auth.bind(null, token), {
- hook: hook.bind(null, token)
- });
-};
-// Annotate the CommonJS export names for ESM import in node:
-0 && (0);
+ insertAfter(node, newNode) {
+ newNode.prev = node;
+ newNode.next = node.next;
+ if (node.next) node.next.prev = newNode;
+ else this.tail = newNode;
+ node.next = newNode;
+ this.length += 1;
+ }
+ insertBefore(node, newNode) {
+ newNode.prev = node.prev;
+ newNode.next = node;
+ if (node.prev) node.prev.next = newNode;
+ else this.head = newNode;
+ node.prev = newNode;
+ this.length += 1;
+ }
-/***/ }),
+ unshift(node) {
+ if (this.head) this.insertBefore(this.head, node);
+ else setInitial(this, node);
+ }
-/***/ 76762:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+ push(node) {
+ if (this.tail) this.insertAfter(this.tail, node);
+ else setInitial(this, node);
+ }
-"use strict";
+ shift() {
+ return this.head && this.removeLink(this.head);
+ }
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
-};
-var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
-};
-var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+ pop() {
+ return this.tail && this.removeLink(this.tail);
+ }
-// pkg/dist-src/index.js
-var index_exports = {};
-__export(index_exports, {
- Octokit: () => Octokit
-});
-module.exports = __toCommonJS(index_exports);
-var import_universal_user_agent = __nccwpck_require__(45030);
-var import_before_after_hook = __nccwpck_require__(83682);
-var import_request = __nccwpck_require__(36234);
-var import_graphql = __nccwpck_require__(88467);
-var import_auth_token = __nccwpck_require__(40334);
+ toArray() {
+ return [...this]
+ }
-// pkg/dist-src/version.js
-var VERSION = "5.2.2";
+ *[Symbol.iterator] () {
+ var cur = this.head;
+ while (cur) {
+ yield cur.data;
+ cur = cur.next;
+ }
+ }
-// pkg/dist-src/index.js
-var noop = () => {
-};
-var consoleWarn = console.warn.bind(console);
-var consoleError = console.error.bind(console);
-function createLogger(logger = {}) {
- if (typeof logger.debug !== "function") {
- logger.debug = noop;
- }
- if (typeof logger.info !== "function") {
- logger.info = noop;
- }
- if (typeof logger.warn !== "function") {
- logger.warn = consoleWarn;
- }
- if (typeof logger.error !== "function") {
- logger.error = consoleError;
- }
- return logger;
-}
-var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
-var Octokit = class {
- static {
- this.VERSION = VERSION;
- }
- static defaults(defaults) {
- const OctokitWithDefaults = class extends this {
- constructor(...args) {
- const options = args[0] || {};
- if (typeof defaults === "function") {
- super(defaults(options));
- return;
+ remove (testFn) {
+ var curr = this.head;
+ while(curr) {
+ var {next} = curr;
+ if (testFn(curr)) {
+ this.removeLink(curr);
+ }
+ curr = next;
+ }
+ return this;
}
- super(
- Object.assign(
- {},
- defaults,
- options,
- options.userAgent && defaults.userAgent ? {
- userAgent: `${options.userAgent} ${defaults.userAgent}`
- } : null
- )
- );
- }
- };
- return OctokitWithDefaults;
- }
- static {
- this.plugins = [];
- }
- /**
- * Attach a plugin (or many) to your Octokit instance.
- *
- * @example
- * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
- */
- static plugin(...newPlugins) {
- const currentPlugins = this.plugins;
- const NewOctokit = class extends this {
- static {
- this.plugins = currentPlugins.concat(
- newPlugins.filter((plugin) => !currentPlugins.includes(plugin))
- );
- }
- };
- return NewOctokit;
- }
- constructor(options = {}) {
- const hook = new import_before_after_hook.Collection();
- const requestDefaults = {
- baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl,
- headers: {},
- request: Object.assign({}, options.request, {
- // @ts-ignore internal usage only, no need to type
- hook: hook.bind(null, "request")
- }),
- mediaType: {
- previews: [],
- format: ""
- }
- };
- requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail;
- if (options.baseUrl) {
- requestDefaults.baseUrl = options.baseUrl;
- }
- if (options.previews) {
- requestDefaults.mediaType.previews = options.previews;
- }
- if (options.timeZone) {
- requestDefaults.headers["time-zone"] = options.timeZone;
- }
- this.request = import_request.request.defaults(requestDefaults);
- this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults);
- this.log = createLogger(options.log);
- this.hook = hook;
- if (!options.authStrategy) {
- if (!options.auth) {
- this.auth = async () => ({
- type: "unauthenticated"
- });
- } else {
- const auth = (0, import_auth_token.createTokenAuth)(options.auth);
- hook.wrap("request", auth.hook);
- this.auth = auth;
- }
- } else {
- const { authStrategy, ...otherOptions } = options;
- const auth = authStrategy(
- Object.assign(
- {
- request: this.request,
- log: this.log,
- // we pass the current octokit instance as well as its constructor options
- // to allow for authentication strategies that return a new octokit instance
- // that shares the same internal state as the current one. The original
- // requirement for this was the "event-octokit" authentication strategy
- // of https://github.com/probot/octokit-auth-probot.
- octokit: this,
- octokitOptions: otherOptions
- },
- options.auth
- )
- );
- hook.wrap("request", auth.hook);
- this.auth = auth;
}
- const classConstructor = this.constructor;
- for (let i = 0; i < classConstructor.plugins.length; ++i) {
- Object.assign(this, classConstructor.plugins[i](this, options));
+
+ function setInitial(dll, node) {
+ dll.length = 1;
+ dll.head = dll.tail = node;
}
- }
-};
-// Annotate the CommonJS export names for ESM import in node:
-0 && (0);
+ function queue$1(worker, concurrency, payload) {
+ if (concurrency == null) {
+ concurrency = 1;
+ }
+ else if(concurrency === 0) {
+ throw new RangeError('Concurrency must not be zero');
+ }
-/***/ }),
+ var _worker = wrapAsync(worker);
+ var numRunning = 0;
+ var workersList = [];
+ const events = {
+ error: [],
+ drain: [],
+ saturated: [],
+ unsaturated: [],
+ empty: []
+ };
-/***/ 59440:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+ function on (event, handler) {
+ events[event].push(handler);
+ }
-"use strict";
+ function once (event, handler) {
+ const handleAndRemove = (...args) => {
+ off(event, handleAndRemove);
+ handler(...args);
+ };
+ events[event].push(handleAndRemove);
+ }
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
-};
-var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
-};
-var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+ function off (event, handler) {
+ if (!event) return Object.keys(events).forEach(ev => events[ev] = [])
+ if (!handler) return events[event] = []
+ events[event] = events[event].filter(ev => ev !== handler);
+ }
-// pkg/dist-src/index.js
-var dist_src_exports = {};
-__export(dist_src_exports, {
- endpoint: () => endpoint
-});
-module.exports = __toCommonJS(dist_src_exports);
+ function trigger (event, ...args) {
+ events[event].forEach(handler => handler(...args));
+ }
-// pkg/dist-src/defaults.js
-var import_universal_user_agent = __nccwpck_require__(45030);
+ var processingScheduled = false;
+ function _insert(data, insertAtFront, rejectOnError, callback) {
+ if (callback != null && typeof callback !== 'function') {
+ throw new Error('task callback must be a function');
+ }
+ q.started = true;
-// pkg/dist-src/version.js
-var VERSION = "9.0.6";
+ var res, rej;
+ function promiseCallback (err, ...args) {
+ // we don't care about the error, let the global error handler
+ // deal with it
+ if (err) return rejectOnError ? rej(err) : res()
+ if (args.length <= 1) return res(args[0])
+ res(args);
+ }
-// pkg/dist-src/defaults.js
-var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
-var DEFAULTS = {
- method: "GET",
- baseUrl: "https://api.github.com",
- headers: {
- accept: "application/vnd.github.v3+json",
- "user-agent": userAgent
- },
- mediaType: {
- format: ""
- }
-};
+ var item = q._createTaskItem(
+ data,
+ rejectOnError ? promiseCallback :
+ (callback || promiseCallback)
+ );
-// pkg/dist-src/util/lowercase-keys.js
-function lowercaseKeys(object) {
- if (!object) {
- return {};
- }
- return Object.keys(object).reduce((newObj, key) => {
- newObj[key.toLowerCase()] = object[key];
- return newObj;
- }, {});
-}
-
-// pkg/dist-src/util/is-plain-object.js
-function isPlainObject(value) {
- if (typeof value !== "object" || value === null)
- return false;
- if (Object.prototype.toString.call(value) !== "[object Object]")
- return false;
- const proto = Object.getPrototypeOf(value);
- if (proto === null)
- return true;
- const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
- return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
-}
-
-// pkg/dist-src/util/merge-deep.js
-function mergeDeep(defaults, options) {
- const result = Object.assign({}, defaults);
- Object.keys(options).forEach((key) => {
- if (isPlainObject(options[key])) {
- if (!(key in defaults))
- Object.assign(result, { [key]: options[key] });
- else
- result[key] = mergeDeep(defaults[key], options[key]);
- } else {
- Object.assign(result, { [key]: options[key] });
- }
- });
- return result;
-}
-
-// pkg/dist-src/util/remove-undefined-properties.js
-function removeUndefinedProperties(obj) {
- for (const key in obj) {
- if (obj[key] === void 0) {
- delete obj[key];
- }
- }
- return obj;
-}
-
-// pkg/dist-src/merge.js
-function merge(defaults, route, options) {
- if (typeof route === "string") {
- let [method, url] = route.split(" ");
- options = Object.assign(url ? { method, url } : { url: method }, options);
- } else {
- options = Object.assign({}, route);
- }
- options.headers = lowercaseKeys(options.headers);
- removeUndefinedProperties(options);
- removeUndefinedProperties(options.headers);
- const mergedOptions = mergeDeep(defaults || {}, options);
- if (options.url === "/graphql") {
- if (defaults && defaults.mediaType.previews?.length) {
- mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(
- (preview) => !mergedOptions.mediaType.previews.includes(preview)
- ).concat(mergedOptions.mediaType.previews);
- }
- mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, ""));
- }
- return mergedOptions;
-}
-
-// pkg/dist-src/util/add-query-parameters.js
-function addQueryParameters(url, parameters) {
- const separator = /\?/.test(url) ? "&" : "?";
- const names = Object.keys(parameters);
- if (names.length === 0) {
- return url;
- }
- return url + separator + names.map((name) => {
- if (name === "q") {
- return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
- }
- return `${name}=${encodeURIComponent(parameters[name])}`;
- }).join("&");
-}
-
-// pkg/dist-src/util/extract-url-variable-names.js
-var urlVariableRegex = /\{[^{}}]+\}/g;
-function removeNonChars(variableName) {
- return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []);
-}
-
-// pkg/dist-src/util/omit.js
-function omit(object, keysToOmit) {
- const result = { __proto__: null };
- for (const key of Object.keys(object)) {
- if (keysToOmit.indexOf(key) === -1) {
- result[key] = object[key];
- }
- }
- return result;
-}
+ if (insertAtFront) {
+ q._tasks.unshift(item);
+ } else {
+ q._tasks.push(item);
+ }
-// pkg/dist-src/util/url-template.js
-function encodeReserved(str) {
- return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
- if (!/%[0-9A-Fa-f]/.test(part)) {
- part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
- }
- return part;
- }).join("");
-}
-function encodeUnreserved(str) {
- return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
- return "%" + c.charCodeAt(0).toString(16).toUpperCase();
- });
-}
-function encodeValue(operator, value, key) {
- value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value);
- if (key) {
- return encodeUnreserved(key) + "=" + value;
- } else {
- return value;
- }
-}
-function isDefined(value) {
- return value !== void 0 && value !== null;
-}
-function isKeyOperator(operator) {
- return operator === ";" || operator === "&" || operator === "?";
-}
-function getValues(context, operator, key, modifier) {
- var value = context[key], result = [];
- if (isDefined(value) && value !== "") {
- if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
- value = value.toString();
- if (modifier && modifier !== "*") {
- value = value.substring(0, parseInt(modifier, 10));
- }
- result.push(
- encodeValue(operator, value, isKeyOperator(operator) ? key : "")
- );
- } else {
- if (modifier === "*") {
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function(value2) {
- result.push(
- encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
- );
- });
- } else {
- Object.keys(value).forEach(function(k) {
- if (isDefined(value[k])) {
- result.push(encodeValue(operator, value[k], k));
+ if (!processingScheduled) {
+ processingScheduled = true;
+ setImmediate$1(() => {
+ processingScheduled = false;
+ q.process();
+ });
}
- });
- }
- } else {
- const tmp = [];
- if (Array.isArray(value)) {
- value.filter(isDefined).forEach(function(value2) {
- tmp.push(encodeValue(operator, value2));
- });
- } else {
- Object.keys(value).forEach(function(k) {
- if (isDefined(value[k])) {
- tmp.push(encodeUnreserved(k));
- tmp.push(encodeValue(operator, value[k].toString()));
+
+ if (rejectOnError || !callback) {
+ return new Promise((resolve, reject) => {
+ res = resolve;
+ rej = reject;
+ })
}
- });
- }
- if (isKeyOperator(operator)) {
- result.push(encodeUnreserved(key) + "=" + tmp.join(","));
- } else if (tmp.length !== 0) {
- result.push(tmp.join(","));
- }
- }
- }
- } else {
- if (operator === ";") {
- if (isDefined(value)) {
- result.push(encodeUnreserved(key));
- }
- } else if (value === "" && (operator === "&" || operator === "?")) {
- result.push(encodeUnreserved(key) + "=");
- } else if (value === "") {
- result.push("");
- }
- }
- return result;
-}
-function parseUrl(template) {
- return {
- expand: expand.bind(null, template)
- };
-}
-function expand(template, context) {
- var operators = ["+", "#", ".", "/", ";", "?", "&"];
- template = template.replace(
- /\{([^\{\}]+)\}|([^\{\}]+)/g,
- function(_, expression, literal) {
- if (expression) {
- let operator = "";
- const values = [];
- if (operators.indexOf(expression.charAt(0)) !== -1) {
- operator = expression.charAt(0);
- expression = expression.substr(1);
- }
- expression.split(/,/g).forEach(function(variable) {
- var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
- values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
- });
- if (operator && operator !== "+") {
- var separator = ",";
- if (operator === "?") {
- separator = "&";
- } else if (operator !== "#") {
- separator = operator;
- }
- return (values.length !== 0 ? operator : "") + values.join(separator);
- } else {
- return values.join(",");
}
- } else {
- return encodeReserved(literal);
- }
- }
- );
- if (template === "/") {
- return template;
- } else {
- return template.replace(/\/$/, "");
- }
-}
-// pkg/dist-src/parse.js
-function parse(options) {
- let method = options.method.toUpperCase();
- let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
- let headers = Object.assign({}, options.headers);
- let body;
- let parameters = omit(options, [
- "method",
- "baseUrl",
- "url",
- "headers",
- "request",
- "mediaType"
- ]);
- const urlVariableNames = extractUrlVariableNames(url);
- url = parseUrl(url).expand(parameters);
- if (!/^http/.test(url)) {
- url = options.baseUrl + url;
- }
- const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl");
- const remainingParameters = omit(parameters, omittedParameters);
- const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
- if (!isBinaryRequest) {
- if (options.mediaType.format) {
- headers.accept = headers.accept.split(/,/).map(
- (format) => format.replace(
- /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
- `application/vnd$1$2.${options.mediaType.format}`
- )
- ).join(",");
- }
- if (url.endsWith("/graphql")) {
- if (options.mediaType.previews?.length) {
- const previewsFromAcceptHeader = headers.accept.match(/(? {
- const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
- return `application/vnd.github.${preview}-preview${format}`;
- }).join(",");
- }
- }
- }
- if (["GET", "HEAD"].includes(method)) {
- url = addQueryParameters(url, remainingParameters);
- } else {
- if ("data" in remainingParameters) {
- body = remainingParameters.data;
- } else {
- if (Object.keys(remainingParameters).length) {
- body = remainingParameters;
- }
- }
- }
- if (!headers["content-type"] && typeof body !== "undefined") {
- headers["content-type"] = "application/json; charset=utf-8";
- }
- if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
- body = "";
- }
- return Object.assign(
- { method, url, headers },
- typeof body !== "undefined" ? { body } : null,
- options.request ? { request: options.request } : null
- );
-}
+ function _createCB(tasks) {
+ return function (err, ...args) {
+ numRunning -= 1;
-// pkg/dist-src/endpoint-with-defaults.js
-function endpointWithDefaults(defaults, route, options) {
- return parse(merge(defaults, route, options));
-}
+ for (var i = 0, l = tasks.length; i < l; i++) {
+ var task = tasks[i];
-// pkg/dist-src/with-defaults.js
-function withDefaults(oldDefaults, newDefaults) {
- const DEFAULTS2 = merge(oldDefaults, newDefaults);
- const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);
- return Object.assign(endpoint2, {
- DEFAULTS: DEFAULTS2,
- defaults: withDefaults.bind(null, DEFAULTS2),
- merge: merge.bind(null, DEFAULTS2),
- parse
- });
-}
+ var index = workersList.indexOf(task);
+ if (index === 0) {
+ workersList.shift();
+ } else if (index > 0) {
+ workersList.splice(index, 1);
+ }
-// pkg/dist-src/index.js
-var endpoint = withDefaults(null, DEFAULTS);
-// Annotate the CommonJS export names for ESM import in node:
-0 && (0);
+ task.callback(err, ...args);
+ if (err != null) {
+ trigger('error', err, task.data);
+ }
+ }
-/***/ }),
+ if (numRunning <= (q.concurrency - q.buffer) ) {
+ trigger('unsaturated');
+ }
-/***/ 88467:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+ if (q.idle()) {
+ trigger('drain');
+ }
+ q.process();
+ };
+ }
-"use strict";
+ function _maybeDrain(data) {
+ if (data.length === 0 && q.idle()) {
+ // call drain immediately if there are no tasks
+ setImmediate$1(() => trigger('drain'));
+ return true
+ }
+ return false
+ }
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
-};
-var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
-};
-var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+ const eventMethod = (name) => (handler) => {
+ if (!handler) {
+ return new Promise((resolve, reject) => {
+ once(name, (err, data) => {
+ if (err) return reject(err)
+ resolve(data);
+ });
+ })
+ }
+ off(name);
+ on(name, handler);
-// pkg/dist-src/index.js
-var index_exports = {};
-__export(index_exports, {
- GraphqlResponseError: () => GraphqlResponseError,
- graphql: () => graphql2,
- withCustomRequest: () => withCustomRequest
-});
-module.exports = __toCommonJS(index_exports);
-var import_request3 = __nccwpck_require__(36234);
-var import_universal_user_agent = __nccwpck_require__(45030);
+ };
-// pkg/dist-src/version.js
-var VERSION = "7.1.1";
+ var isProcessing = false;
+ var q = {
+ _tasks: new DLL(),
+ _createTaskItem (data, callback) {
+ return {
+ data,
+ callback
+ };
+ },
+ *[Symbol.iterator] () {
+ yield* q._tasks[Symbol.iterator]();
+ },
+ concurrency,
+ payload,
+ buffer: concurrency / 4,
+ started: false,
+ paused: false,
+ push (data, callback) {
+ if (Array.isArray(data)) {
+ if (_maybeDrain(data)) return
+ return data.map(datum => _insert(datum, false, false, callback))
+ }
+ return _insert(data, false, false, callback);
+ },
+ pushAsync (data, callback) {
+ if (Array.isArray(data)) {
+ if (_maybeDrain(data)) return
+ return data.map(datum => _insert(datum, false, true, callback))
+ }
+ return _insert(data, false, true, callback);
+ },
+ kill () {
+ off();
+ q._tasks.empty();
+ },
+ unshift (data, callback) {
+ if (Array.isArray(data)) {
+ if (_maybeDrain(data)) return
+ return data.map(datum => _insert(datum, true, false, callback))
+ }
+ return _insert(data, true, false, callback);
+ },
+ unshiftAsync (data, callback) {
+ if (Array.isArray(data)) {
+ if (_maybeDrain(data)) return
+ return data.map(datum => _insert(datum, true, true, callback))
+ }
+ return _insert(data, true, true, callback);
+ },
+ remove (testFn) {
+ q._tasks.remove(testFn);
+ },
+ process () {
+ // Avoid trying to start too many processing operations. This can occur
+ // when callbacks resolve synchronously (#1267).
+ if (isProcessing) {
+ return;
+ }
+ isProcessing = true;
+ while(!q.paused && numRunning < q.concurrency && q._tasks.length){
+ var tasks = [], data = [];
+ var l = q._tasks.length;
+ if (q.payload) l = Math.min(l, q.payload);
+ for (var i = 0; i < l; i++) {
+ var node = q._tasks.shift();
+ tasks.push(node);
+ workersList.push(node);
+ data.push(node.data);
+ }
-// pkg/dist-src/with-defaults.js
-var import_request2 = __nccwpck_require__(36234);
+ numRunning += 1;
-// pkg/dist-src/graphql.js
-var import_request = __nccwpck_require__(36234);
+ if (q._tasks.length === 0) {
+ trigger('empty');
+ }
-// pkg/dist-src/error.js
-function _buildMessageForResponseErrors(data) {
- return `Request failed due to following response errors:
-` + data.errors.map((e) => ` - ${e.message}`).join("\n");
-}
-var GraphqlResponseError = class extends Error {
- constructor(request2, headers, response) {
- super(_buildMessageForResponseErrors(response));
- this.request = request2;
- this.headers = headers;
- this.response = response;
- this.name = "GraphqlResponseError";
- this.errors = response.errors;
- this.data = response.data;
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
- }
-};
+ if (numRunning === q.concurrency) {
+ trigger('saturated');
+ }
-// pkg/dist-src/graphql.js
-var NON_VARIABLE_OPTIONS = [
- "method",
- "baseUrl",
- "url",
- "headers",
- "request",
- "query",
- "mediaType"
-];
-var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
-var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
-function graphql(request2, query, options) {
- if (options) {
- if (typeof query === "string" && "query" in options) {
- return Promise.reject(
- new Error(`[@octokit/graphql] "query" cannot be used as variable name`)
- );
- }
- for (const key in options) {
- if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
- return Promise.reject(
- new Error(
- `[@octokit/graphql] "${key}" cannot be used as variable name`
- )
- );
- }
- }
- const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;
- const requestOptions = Object.keys(
- parsedOptions
- ).reduce((result, key) => {
- if (NON_VARIABLE_OPTIONS.includes(key)) {
- result[key] = parsedOptions[key];
- return result;
- }
- if (!result.variables) {
- result.variables = {};
- }
- result.variables[key] = parsedOptions[key];
- return result;
- }, {});
- const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;
- if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {
- requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
- }
- return request2(requestOptions).then((response) => {
- if (response.data.errors) {
- const headers = {};
- for (const key of Object.keys(response.headers)) {
- headers[key] = response.headers[key];
- }
- throw new GraphqlResponseError(
- requestOptions,
- headers,
- response.data
- );
+ var cb = onlyOnce(_createCB(tasks));
+ _worker(data, cb);
+ }
+ isProcessing = false;
+ },
+ length () {
+ return q._tasks.length;
+ },
+ running () {
+ return numRunning;
+ },
+ workersList () {
+ return workersList;
+ },
+ idle() {
+ return q._tasks.length + numRunning === 0;
+ },
+ pause () {
+ q.paused = true;
+ },
+ resume () {
+ if (q.paused === false) { return; }
+ q.paused = false;
+ setImmediate$1(q.process);
+ }
+ };
+ // define these as fixed properties, so people get useful errors when updating
+ Object.defineProperties(q, {
+ saturated: {
+ writable: false,
+ value: eventMethod('saturated')
+ },
+ unsaturated: {
+ writable: false,
+ value: eventMethod('unsaturated')
+ },
+ empty: {
+ writable: false,
+ value: eventMethod('empty')
+ },
+ drain: {
+ writable: false,
+ value: eventMethod('drain')
+ },
+ error: {
+ writable: false,
+ value: eventMethod('error')
+ },
+ });
+ return q;
}
- return response.data.data;
- });
-}
-// pkg/dist-src/with-defaults.js
-function withDefaults(request2, newDefaults) {
- const newRequest = request2.defaults(newDefaults);
- const newApi = (query, options) => {
- return graphql(newRequest, query, options);
- };
- return Object.assign(newApi, {
- defaults: withDefaults.bind(null, newRequest),
- endpoint: newRequest.endpoint
- });
-}
+ /**
+ * Creates a `cargo` object with the specified payload. Tasks added to the
+ * cargo will be processed altogether (up to the `payload` limit). If the
+ * `worker` is in progress, the task is queued until it becomes available. Once
+ * the `worker` has completed some tasks, each callback of those tasks is
+ * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
+ * for how `cargo` and `queue` work.
+ *
+ * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
+ * at a time, cargo passes an array of tasks to a single worker, repeating
+ * when the worker is finished.
+ *
+ * @name cargo
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.queue]{@link module:ControlFlow.queue}
+ * @category Control Flow
+ * @param {AsyncFunction} worker - An asynchronous function for processing an array
+ * of queued tasks. Invoked with `(tasks, callback)`.
+ * @param {number} [payload=Infinity] - An optional `integer` for determining
+ * how many tasks should be processed per round; if omitted, the default is
+ * unlimited.
+ * @returns {module:ControlFlow.QueueObject} A cargo object to manage the tasks. Callbacks can
+ * attached as certain properties to listen for specific events during the
+ * lifecycle of the cargo and inner queue.
+ * @example
+ *
+ * // create a cargo object with payload 2
+ * var cargo = async.cargo(function(tasks, callback) {
+ * for (var i=0; i {
+ * console.log(result);
+ * // 6000
+ * // which is the sum of the file sizes of the three files
+ * }).catch( err => {
+ * console.log(err);
+ * });
+ *
+ * // Error Handling
+ * async.reduce(withMissingFileList, 0, getFileSizeInBytes)
+ * .then( result => {
+ * console.log(result);
+ * }).catch( err => {
+ * console.log(err);
+ * // [ Error: ENOENT: no such file or directory ]
+ * });
+ *
+ * // Using async/await
+ * async () => {
+ * try {
+ * let result = await async.reduce(fileList, 0, getFileSizeInBytes);
+ * console.log(result);
+ * // 6000
+ * // which is the sum of the file sizes of the three files
+ * }
+ * catch (err) {
+ * console.log(err);
+ * }
+ * }
+ *
+ * // Error Handling
+ * async () => {
+ * try {
+ * let result = await async.reduce(withMissingFileList, 0, getFileSizeInBytes);
+ * console.log(result);
+ * }
+ * catch (err) {
+ * console.log(err);
+ * // [ Error: ENOENT: no such file or directory ]
+ * }
+ * }
+ *
+ */
+ function reduce(coll, memo, iteratee, callback) {
+ callback = once(callback);
+ var _iteratee = wrapAsync(iteratee);
+ return eachOfSeries$1(coll, (x, i, iterCb) => {
+ _iteratee(memo, x, (err, v) => {
+ memo = v;
+ iterCb(err);
+ });
+ }, err => callback(err, memo));
+ }
+ var reduce$1 = awaitify(reduce, 4);
-/***/ }),
+ /**
+ * Version of the compose function that is more natural to read. Each function
+ * consumes the return value of the previous function. It is the equivalent of
+ * [compose]{@link module:ControlFlow.compose} with the arguments reversed.
+ *
+ * Each function is executed with the `this` binding of the composed function.
+ *
+ * @name seq
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.compose]{@link module:ControlFlow.compose}
+ * @category Control Flow
+ * @param {...AsyncFunction} functions - the asynchronous functions to compose
+ * @returns {Function} a function that composes the `functions` in order
+ * @example
+ *
+ * // Requires lodash (or underscore), express3 and dresende's orm2.
+ * // Part of an app, that fetches cats of the logged user.
+ * // This example uses `seq` function to avoid overnesting and error
+ * // handling clutter.
+ * app.get('/cats', function(request, response) {
+ * var User = request.models.User;
+ * async.seq(
+ * User.get.bind(User), // 'User.get' has signature (id, callback(err, data))
+ * function(user, fn) {
+ * user.getCats(fn); // 'getCats' has signature (callback(err, data))
+ * }
+ * )(req.session.user_id, function (err, cats) {
+ * if (err) {
+ * console.error(err);
+ * response.json({ status: 'error', message: err.message });
+ * } else {
+ * response.json({ status: 'ok', message: 'Cats found', data: cats });
+ * }
+ * });
+ * });
+ */
+ function seq(...functions) {
+ var _functions = functions.map(wrapAsync);
+ return function (...args) {
+ var that = this;
-/***/ 64193:
-/***/ ((module) => {
+ var cb = args[args.length - 1];
+ if (typeof cb == 'function') {
+ args.pop();
+ } else {
+ cb = promiseCallback();
+ }
-"use strict";
+ reduce$1(_functions, args, (newargs, fn, iterCb) => {
+ fn.apply(that, newargs.concat((err, ...nextargs) => {
+ iterCb(err, nextargs);
+ }));
+ },
+ (err, results) => cb(err, ...results));
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
-};
-var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
-};
-var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+ return cb[PROMISE_SYMBOL]
+ };
+ }
-// pkg/dist-src/index.js
-var dist_src_exports = {};
-__export(dist_src_exports, {
- composePaginateRest: () => composePaginateRest,
- isPaginatingEndpoint: () => isPaginatingEndpoint,
- paginateRest: () => paginateRest,
- paginatingEndpoints: () => paginatingEndpoints
-});
-module.exports = __toCommonJS(dist_src_exports);
+ /**
+ * Creates a function which is a composition of the passed asynchronous
+ * functions. Each function consumes the return value of the function that
+ * follows. Composing functions `f()`, `g()`, and `h()` would produce the result
+ * of `f(g(h()))`, only this version uses callbacks to obtain the return values.
+ *
+ * If the last argument to the composed function is not a function, a promise
+ * is returned when you call it.
+ *
+ * Each function is executed with the `this` binding of the composed function.
+ *
+ * @name compose
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @category Control Flow
+ * @param {...AsyncFunction} functions - the asynchronous functions to compose
+ * @returns {Function} an asynchronous function that is the composed
+ * asynchronous `functions`
+ * @example
+ *
+ * function add1(n, callback) {
+ * setTimeout(function () {
+ * callback(null, n + 1);
+ * }, 10);
+ * }
+ *
+ * function mul3(n, callback) {
+ * setTimeout(function () {
+ * callback(null, n * 3);
+ * }, 10);
+ * }
+ *
+ * var add1mul3 = async.compose(mul3, add1);
+ * add1mul3(4, function (err, result) {
+ * // result now equals 15
+ * });
+ */
+ function compose(...args) {
+ return seq(...args.reverse());
+ }
-// pkg/dist-src/version.js
-var VERSION = "9.2.2";
+ /**
+ * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name mapLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.map]{@link module:Collections.map}
+ * @category Collection
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * The iteratee should complete with the transformed item.
+ * Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called when all `iteratee`
+ * functions have finished, or an error occurs. Results is an array of the
+ * transformed items from the `coll`. Invoked with (err, results).
+ * @returns {Promise} a promise, if no callback is passed
+ */
+ function mapLimit (coll, limit, iteratee, callback) {
+ return _asyncMap(eachOfLimit$2(limit), coll, iteratee, callback)
+ }
+ var mapLimit$1 = awaitify(mapLimit, 4);
-// pkg/dist-src/normalize-paginated-list-response.js
-function normalizePaginatedListResponse(response) {
- if (!response.data) {
- return {
- ...response,
- data: []
- };
- }
- const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data);
- if (!responseNeedsNormalization)
- return response;
- const incompleteResults = response.data.incomplete_results;
- const repositorySelection = response.data.repository_selection;
- const totalCount = response.data.total_count;
- delete response.data.incomplete_results;
- delete response.data.repository_selection;
- delete response.data.total_count;
- const namespaceKey = Object.keys(response.data)[0];
- const data = response.data[namespaceKey];
- response.data = data;
- if (typeof incompleteResults !== "undefined") {
- response.data.incomplete_results = incompleteResults;
- }
- if (typeof repositorySelection !== "undefined") {
- response.data.repository_selection = repositorySelection;
- }
- response.data.total_count = totalCount;
- return response;
-}
+ /**
+ * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name concatLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.concat]{@link module:Collections.concat}
+ * @category Collection
+ * @alias flatMapLimit
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
+ * which should use an array as its result. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished, or an error occurs. Results is an array
+ * containing the concatenated results of the `iteratee` function. Invoked with
+ * (err, results).
+ * @returns A Promise, if no callback is passed
+ */
+ function concatLimit(coll, limit, iteratee, callback) {
+ var _iteratee = wrapAsync(iteratee);
+ return mapLimit$1(coll, limit, (val, iterCb) => {
+ _iteratee(val, (err, ...args) => {
+ if (err) return iterCb(err);
+ return iterCb(err, args);
+ });
+ }, (err, mapResults) => {
+ var result = [];
+ for (var i = 0; i < mapResults.length; i++) {
+ if (mapResults[i]) {
+ result = result.concat(...mapResults[i]);
+ }
+ }
-// pkg/dist-src/iterator.js
-function iterator(octokit, route, parameters) {
- const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);
- const requestMethod = typeof route === "function" ? route : octokit.request;
- const method = options.method;
- const headers = options.headers;
- let url = options.url;
- return {
- [Symbol.asyncIterator]: () => ({
- async next() {
- if (!url)
- return { done: true };
- try {
- const response = await requestMethod({ method, url, headers });
- const normalizedResponse = normalizePaginatedListResponse(response);
- url = ((normalizedResponse.headers.link || "").match(
- /<([^<>]+)>;\s*rel="next"/
- ) || [])[1];
- return { value: normalizedResponse };
- } catch (error) {
- if (error.status !== 409)
- throw error;
- url = "";
- return {
- value: {
- status: 200,
- headers: {},
- data: []
- }
- };
- }
- }
- })
- };
-}
-
-// pkg/dist-src/paginate.js
-function paginate(octokit, route, parameters, mapFn) {
- if (typeof parameters === "function") {
- mapFn = parameters;
- parameters = void 0;
- }
- return gather(
- octokit,
- [],
- iterator(octokit, route, parameters)[Symbol.asyncIterator](),
- mapFn
- );
-}
-function gather(octokit, results, iterator2, mapFn) {
- return iterator2.next().then((result) => {
- if (result.done) {
- return results;
- }
- let earlyExit = false;
- function done() {
- earlyExit = true;
+ return callback(err, result);
+ });
}
- results = results.concat(
- mapFn ? mapFn(result.value, done) : result.value.data
- );
- if (earlyExit) {
- return results;
+ var concatLimit$1 = awaitify(concatLimit, 4);
+
+ /**
+ * Applies `iteratee` to each item in `coll`, concatenating the results. Returns
+ * the concatenated list. The `iteratee`s are called in parallel, and the
+ * results are concatenated as they return. The results array will be returned in
+ * the original order of `coll` passed to the `iteratee` function.
+ *
+ * @name concat
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @category Collection
+ * @alias flatMap
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
+ * which should use an array as its result. Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished, or an error occurs. Results is an array
+ * containing the concatenated results of the `iteratee` function. Invoked with
+ * (err, results).
+ * @returns A Promise, if no callback is passed
+ * @example
+ *
+ * // dir1 is a directory that contains file1.txt, file2.txt
+ * // dir2 is a directory that contains file3.txt, file4.txt
+ * // dir3 is a directory that contains file5.txt
+ * // dir4 does not exist
+ *
+ * let directoryList = ['dir1','dir2','dir3'];
+ * let withMissingDirectoryList = ['dir1','dir2','dir3', 'dir4'];
+ *
+ * // Using callbacks
+ * async.concat(directoryList, fs.readdir, function(err, results) {
+ * if (err) {
+ * console.log(err);
+ * } else {
+ * console.log(results);
+ * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
+ * }
+ * });
+ *
+ * // Error Handling
+ * async.concat(withMissingDirectoryList, fs.readdir, function(err, results) {
+ * if (err) {
+ * console.log(err);
+ * // [ Error: ENOENT: no such file or directory ]
+ * // since dir4 does not exist
+ * } else {
+ * console.log(results);
+ * }
+ * });
+ *
+ * // Using Promises
+ * async.concat(directoryList, fs.readdir)
+ * .then(results => {
+ * console.log(results);
+ * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
+ * }).catch(err => {
+ * console.log(err);
+ * });
+ *
+ * // Error Handling
+ * async.concat(withMissingDirectoryList, fs.readdir)
+ * .then(results => {
+ * console.log(results);
+ * }).catch(err => {
+ * console.log(err);
+ * // [ Error: ENOENT: no such file or directory ]
+ * // since dir4 does not exist
+ * });
+ *
+ * // Using async/await
+ * async () => {
+ * try {
+ * let results = await async.concat(directoryList, fs.readdir);
+ * console.log(results);
+ * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
+ * } catch (err) {
+ * console.log(err);
+ * }
+ * }
+ *
+ * // Error Handling
+ * async () => {
+ * try {
+ * let results = await async.concat(withMissingDirectoryList, fs.readdir);
+ * console.log(results);
+ * } catch (err) {
+ * console.log(err);
+ * // [ Error: ENOENT: no such file or directory ]
+ * // since dir4 does not exist
+ * }
+ * }
+ *
+ */
+ function concat(coll, iteratee, callback) {
+ return concatLimit$1(coll, Infinity, iteratee, callback)
}
- return gather(octokit, results, iterator2, mapFn);
- });
-}
+ var concat$1 = awaitify(concat, 3);
-// pkg/dist-src/compose-paginate.js
-var composePaginateRest = Object.assign(paginate, {
- iterator
-});
+ /**
+ * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
+ *
+ * @name concatSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.concat]{@link module:Collections.concat}
+ * @category Collection
+ * @alias flatMapSeries
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`.
+ * The iteratee should complete with an array an array of results.
+ * Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called after all the
+ * `iteratee` functions have finished, or an error occurs. Results is an array
+ * containing the concatenated results of the `iteratee` function. Invoked with
+ * (err, results).
+ * @returns A Promise, if no callback is passed
+ */
+ function concatSeries(coll, iteratee, callback) {
+ return concatLimit$1(coll, 1, iteratee, callback)
+ }
+ var concatSeries$1 = awaitify(concatSeries, 3);
-// pkg/dist-src/generated/paginating-endpoints.js
-var paginatingEndpoints = [
- "GET /advisories",
- "GET /app/hook/deliveries",
- "GET /app/installation-requests",
- "GET /app/installations",
- "GET /assignments/{assignment_id}/accepted_assignments",
- "GET /classrooms",
- "GET /classrooms/{classroom_id}/assignments",
- "GET /enterprises/{enterprise}/dependabot/alerts",
- "GET /enterprises/{enterprise}/secret-scanning/alerts",
- "GET /events",
- "GET /gists",
- "GET /gists/public",
- "GET /gists/starred",
- "GET /gists/{gist_id}/comments",
- "GET /gists/{gist_id}/commits",
- "GET /gists/{gist_id}/forks",
- "GET /installation/repositories",
- "GET /issues",
- "GET /licenses",
- "GET /marketplace_listing/plans",
- "GET /marketplace_listing/plans/{plan_id}/accounts",
- "GET /marketplace_listing/stubbed/plans",
- "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts",
- "GET /networks/{owner}/{repo}/events",
- "GET /notifications",
- "GET /organizations",
- "GET /orgs/{org}/actions/cache/usage-by-repository",
- "GET /orgs/{org}/actions/permissions/repositories",
- "GET /orgs/{org}/actions/runners",
- "GET /orgs/{org}/actions/secrets",
- "GET /orgs/{org}/actions/secrets/{secret_name}/repositories",
- "GET /orgs/{org}/actions/variables",
- "GET /orgs/{org}/actions/variables/{name}/repositories",
- "GET /orgs/{org}/blocks",
- "GET /orgs/{org}/code-scanning/alerts",
- "GET /orgs/{org}/codespaces",
- "GET /orgs/{org}/codespaces/secrets",
- "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories",
- "GET /orgs/{org}/copilot/billing/seats",
- "GET /orgs/{org}/dependabot/alerts",
- "GET /orgs/{org}/dependabot/secrets",
- "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories",
- "GET /orgs/{org}/events",
- "GET /orgs/{org}/failed_invitations",
- "GET /orgs/{org}/hooks",
- "GET /orgs/{org}/hooks/{hook_id}/deliveries",
- "GET /orgs/{org}/installations",
- "GET /orgs/{org}/invitations",
- "GET /orgs/{org}/invitations/{invitation_id}/teams",
- "GET /orgs/{org}/issues",
- "GET /orgs/{org}/members",
- "GET /orgs/{org}/members/{username}/codespaces",
- "GET /orgs/{org}/migrations",
- "GET /orgs/{org}/migrations/{migration_id}/repositories",
- "GET /orgs/{org}/organization-roles/{role_id}/teams",
- "GET /orgs/{org}/organization-roles/{role_id}/users",
- "GET /orgs/{org}/outside_collaborators",
- "GET /orgs/{org}/packages",
- "GET /orgs/{org}/packages/{package_type}/{package_name}/versions",
- "GET /orgs/{org}/personal-access-token-requests",
- "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories",
- "GET /orgs/{org}/personal-access-tokens",
- "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories",
- "GET /orgs/{org}/projects",
- "GET /orgs/{org}/properties/values",
- "GET /orgs/{org}/public_members",
- "GET /orgs/{org}/repos",
- "GET /orgs/{org}/rulesets",
- "GET /orgs/{org}/rulesets/rule-suites",
- "GET /orgs/{org}/secret-scanning/alerts",
- "GET /orgs/{org}/security-advisories",
- "GET /orgs/{org}/teams",
- "GET /orgs/{org}/teams/{team_slug}/discussions",
- "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments",
- "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions",
- "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions",
- "GET /orgs/{org}/teams/{team_slug}/invitations",
- "GET /orgs/{org}/teams/{team_slug}/members",
- "GET /orgs/{org}/teams/{team_slug}/projects",
- "GET /orgs/{org}/teams/{team_slug}/repos",
- "GET /orgs/{org}/teams/{team_slug}/teams",
- "GET /projects/columns/{column_id}/cards",
- "GET /projects/{project_id}/collaborators",
- "GET /projects/{project_id}/columns",
- "GET /repos/{owner}/{repo}/actions/artifacts",
- "GET /repos/{owner}/{repo}/actions/caches",
- "GET /repos/{owner}/{repo}/actions/organization-secrets",
- "GET /repos/{owner}/{repo}/actions/organization-variables",
- "GET /repos/{owner}/{repo}/actions/runners",
- "GET /repos/{owner}/{repo}/actions/runs",
- "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts",
- "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs",
- "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs",
- "GET /repos/{owner}/{repo}/actions/secrets",
- "GET /repos/{owner}/{repo}/actions/variables",
- "GET /repos/{owner}/{repo}/actions/workflows",
- "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs",
- "GET /repos/{owner}/{repo}/activity",
- "GET /repos/{owner}/{repo}/assignees",
- "GET /repos/{owner}/{repo}/branches",
- "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations",
- "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs",
- "GET /repos/{owner}/{repo}/code-scanning/alerts",
- "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",
- "GET /repos/{owner}/{repo}/code-scanning/analyses",
- "GET /repos/{owner}/{repo}/codespaces",
- "GET /repos/{owner}/{repo}/codespaces/devcontainers",
- "GET /repos/{owner}/{repo}/codespaces/secrets",
- "GET /repos/{owner}/{repo}/collaborators",
- "GET /repos/{owner}/{repo}/comments",
- "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions",
- "GET /repos/{owner}/{repo}/commits",
- "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments",
- "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls",
- "GET /repos/{owner}/{repo}/commits/{ref}/check-runs",
- "GET /repos/{owner}/{repo}/commits/{ref}/check-suites",
- "GET /repos/{owner}/{repo}/commits/{ref}/status",
- "GET /repos/{owner}/{repo}/commits/{ref}/statuses",
- "GET /repos/{owner}/{repo}/contributors",
- "GET /repos/{owner}/{repo}/dependabot/alerts",
- "GET /repos/{owner}/{repo}/dependabot/secrets",
- "GET /repos/{owner}/{repo}/deployments",
- "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses",
- "GET /repos/{owner}/{repo}/environments",
- "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies",
- "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps",
- "GET /repos/{owner}/{repo}/events",
- "GET /repos/{owner}/{repo}/forks",
- "GET /repos/{owner}/{repo}/hooks",
- "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries",
- "GET /repos/{owner}/{repo}/invitations",
- "GET /repos/{owner}/{repo}/issues",
- "GET /repos/{owner}/{repo}/issues/comments",
- "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",
- "GET /repos/{owner}/{repo}/issues/events",
- "GET /repos/{owner}/{repo}/issues/{issue_number}/comments",
- "GET /repos/{owner}/{repo}/issues/{issue_number}/events",
- "GET /repos/{owner}/{repo}/issues/{issue_number}/labels",
- "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions",
- "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline",
- "GET /repos/{owner}/{repo}/keys",
- "GET /repos/{owner}/{repo}/labels",
- "GET /repos/{owner}/{repo}/milestones",
- "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels",
- "GET /repos/{owner}/{repo}/notifications",
- "GET /repos/{owner}/{repo}/pages/builds",
- "GET /repos/{owner}/{repo}/projects",
- "GET /repos/{owner}/{repo}/pulls",
- "GET /repos/{owner}/{repo}/pulls/comments",
- "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions",
- "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments",
- "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits",
- "GET /repos/{owner}/{repo}/pulls/{pull_number}/files",
- "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews",
- "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments",
- "GET /repos/{owner}/{repo}/releases",
- "GET /repos/{owner}/{repo}/releases/{release_id}/assets",
- "GET /repos/{owner}/{repo}/releases/{release_id}/reactions",
- "GET /repos/{owner}/{repo}/rules/branches/{branch}",
- "GET /repos/{owner}/{repo}/rulesets",
- "GET /repos/{owner}/{repo}/rulesets/rule-suites",
- "GET /repos/{owner}/{repo}/secret-scanning/alerts",
- "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations",
- "GET /repos/{owner}/{repo}/security-advisories",
- "GET /repos/{owner}/{repo}/stargazers",
- "GET /repos/{owner}/{repo}/subscribers",
- "GET /repos/{owner}/{repo}/tags",
- "GET /repos/{owner}/{repo}/teams",
- "GET /repos/{owner}/{repo}/topics",
- "GET /repositories",
- "GET /repositories/{repository_id}/environments/{environment_name}/secrets",
- "GET /repositories/{repository_id}/environments/{environment_name}/variables",
- "GET /search/code",
- "GET /search/commits",
- "GET /search/issues",
- "GET /search/labels",
- "GET /search/repositories",
- "GET /search/topics",
- "GET /search/users",
- "GET /teams/{team_id}/discussions",
- "GET /teams/{team_id}/discussions/{discussion_number}/comments",
- "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions",
- "GET /teams/{team_id}/discussions/{discussion_number}/reactions",
- "GET /teams/{team_id}/invitations",
- "GET /teams/{team_id}/members",
- "GET /teams/{team_id}/projects",
- "GET /teams/{team_id}/repos",
- "GET /teams/{team_id}/teams",
- "GET /user/blocks",
- "GET /user/codespaces",
- "GET /user/codespaces/secrets",
- "GET /user/emails",
- "GET /user/followers",
- "GET /user/following",
- "GET /user/gpg_keys",
- "GET /user/installations",
- "GET /user/installations/{installation_id}/repositories",
- "GET /user/issues",
- "GET /user/keys",
- "GET /user/marketplace_purchases",
- "GET /user/marketplace_purchases/stubbed",
- "GET /user/memberships/orgs",
- "GET /user/migrations",
- "GET /user/migrations/{migration_id}/repositories",
- "GET /user/orgs",
- "GET /user/packages",
- "GET /user/packages/{package_type}/{package_name}/versions",
- "GET /user/public_emails",
- "GET /user/repos",
- "GET /user/repository_invitations",
- "GET /user/social_accounts",
- "GET /user/ssh_signing_keys",
- "GET /user/starred",
- "GET /user/subscriptions",
- "GET /user/teams",
- "GET /users",
- "GET /users/{username}/events",
- "GET /users/{username}/events/orgs/{org}",
- "GET /users/{username}/events/public",
- "GET /users/{username}/followers",
- "GET /users/{username}/following",
- "GET /users/{username}/gists",
- "GET /users/{username}/gpg_keys",
- "GET /users/{username}/keys",
- "GET /users/{username}/orgs",
- "GET /users/{username}/packages",
- "GET /users/{username}/projects",
- "GET /users/{username}/received_events",
- "GET /users/{username}/received_events/public",
- "GET /users/{username}/repos",
- "GET /users/{username}/social_accounts",
- "GET /users/{username}/ssh_signing_keys",
- "GET /users/{username}/starred",
- "GET /users/{username}/subscriptions"
-];
+ /**
+ * Returns a function that when called, calls-back with the values provided.
+ * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to
+ * [`auto`]{@link module:ControlFlow.auto}.
+ *
+ * @name constant
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {...*} arguments... - Any number of arguments to automatically invoke
+ * callback with.
+ * @returns {AsyncFunction} Returns a function that when invoked, automatically
+ * invokes the callback with the previous given arguments.
+ * @example
+ *
+ * async.waterfall([
+ * async.constant(42),
+ * function (value, next) {
+ * // value === 42
+ * },
+ * //...
+ * ], callback);
+ *
+ * async.waterfall([
+ * async.constant(filename, "utf8"),
+ * fs.readFile,
+ * function (fileData, next) {
+ * //...
+ * }
+ * //...
+ * ], callback);
+ *
+ * async.auto({
+ * hostname: async.constant("https://server.net/"),
+ * port: findFreePort,
+ * launchServer: ["hostname", "port", function (options, cb) {
+ * startServer(options, cb);
+ * }],
+ * //...
+ * }, callback);
+ */
+ function constant$1(...args) {
+ return function (...ignoredArgs/*, callback*/) {
+ var callback = ignoredArgs.pop();
+ return callback(null, ...args);
+ };
+ }
-// pkg/dist-src/paginating-endpoints.js
-function isPaginatingEndpoint(arg) {
- if (typeof arg === "string") {
- return paginatingEndpoints.includes(arg);
- } else {
- return false;
- }
-}
+ function _createTester(check, getResult) {
+ return (eachfn, arr, _iteratee, cb) => {
+ var testPassed = false;
+ var testResult;
+ const iteratee = wrapAsync(_iteratee);
+ eachfn(arr, (value, _, callback) => {
+ iteratee(value, (err, result) => {
+ if (err || err === false) return callback(err);
-// pkg/dist-src/index.js
-function paginateRest(octokit) {
- return {
- paginate: Object.assign(paginate.bind(null, octokit), {
- iterator: iterator.bind(null, octokit)
- })
- };
-}
-paginateRest.VERSION = VERSION;
-// Annotate the CommonJS export names for ESM import in node:
-0 && (0);
+ if (check(result) && !testResult) {
+ testPassed = true;
+ testResult = getResult(true, value);
+ return callback(null, breakLoop);
+ }
+ callback();
+ });
+ }, err => {
+ if (err) return cb(err);
+ cb(null, testPassed ? testResult : getResult(false));
+ });
+ };
+ }
+ /**
+ * Returns the first value in `coll` that passes an async truth test. The
+ * `iteratee` is applied in parallel, meaning the first iteratee to return
+ * `true` will fire the detect `callback` with that result. That means the
+ * result might not be the first item in the original `coll` (in terms of order)
+ * that passes the test.
-/***/ }),
+ * If order within the original `coll` is important, then look at
+ * [`detectSeries`]{@link module:Collections.detectSeries}.
+ *
+ * @name detect
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias find
+ * @category Collections
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
+ * The iteratee must complete with a boolean value as its result.
+ * Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the `iteratee` functions have finished.
+ * Result will be the first item in the array that passes the truth test
+ * (iteratee) or the value `undefined` if none passed. Invoked with
+ * (err, result).
+ * @returns {Promise} a promise, if a callback is omitted
+ * @example
+ *
+ * // dir1 is a directory that contains file1.txt, file2.txt
+ * // dir2 is a directory that contains file3.txt, file4.txt
+ * // dir3 is a directory that contains file5.txt
+ *
+ * // asynchronous function that checks if a file exists
+ * function fileExists(file, callback) {
+ * fs.access(file, fs.constants.F_OK, (err) => {
+ * callback(null, !err);
+ * });
+ * }
+ *
+ * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists,
+ * function(err, result) {
+ * console.log(result);
+ * // dir1/file1.txt
+ * // result now equals the first file in the list that exists
+ * }
+ *);
+ *
+ * // Using Promises
+ * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists)
+ * .then(result => {
+ * console.log(result);
+ * // dir1/file1.txt
+ * // result now equals the first file in the list that exists
+ * }).catch(err => {
+ * console.log(err);
+ * });
+ *
+ * // Using async/await
+ * async () => {
+ * try {
+ * let result = await async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists);
+ * console.log(result);
+ * // dir1/file1.txt
+ * // result now equals the file in the list that exists
+ * }
+ * catch (err) {
+ * console.log(err);
+ * }
+ * }
+ *
+ */
+ function detect(coll, iteratee, callback) {
+ return _createTester(bool => bool, (res, item) => item)(eachOf$1, coll, iteratee, callback)
+ }
+ var detect$1 = awaitify(detect, 3);
-/***/ 68883:
-/***/ ((__unused_webpack_module, exports) => {
+ /**
+ * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
+ * time.
+ *
+ * @name detectLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.detect]{@link module:Collections.detect}
+ * @alias findLimit
+ * @category Collections
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
+ * The iteratee must complete with a boolean value as its result.
+ * Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the `iteratee` functions have finished.
+ * Result will be the first item in the array that passes the truth test
+ * (iteratee) or the value `undefined` if none passed. Invoked with
+ * (err, result).
+ * @returns {Promise} a promise, if a callback is omitted
+ */
+ function detectLimit(coll, limit, iteratee, callback) {
+ return _createTester(bool => bool, (res, item) => item)(eachOfLimit$2(limit), coll, iteratee, callback)
+ }
+ var detectLimit$1 = awaitify(detectLimit, 4);
-"use strict";
+ /**
+ * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
+ *
+ * @name detectSeries
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.detect]{@link module:Collections.detect}
+ * @alias findSeries
+ * @category Collections
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
+ * The iteratee must complete with a boolean value as its result.
+ * Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called as soon as any
+ * iteratee returns `true`, or after all the `iteratee` functions have finished.
+ * Result will be the first item in the array that passes the truth test
+ * (iteratee) or the value `undefined` if none passed. Invoked with
+ * (err, result).
+ * @returns {Promise} a promise, if a callback is omitted
+ */
+ function detectSeries(coll, iteratee, callback) {
+ return _createTester(bool => bool, (res, item) => item)(eachOfLimit$2(1), coll, iteratee, callback)
+ }
+ var detectSeries$1 = awaitify(detectSeries, 3);
-Object.defineProperty(exports, "__esModule", ({ value: true }));
+ function consoleFunc(name) {
+ return (fn, ...args) => wrapAsync(fn)(...args, (err, ...resultArgs) => {
+ /* istanbul ignore else */
+ if (typeof console === 'object') {
+ /* istanbul ignore else */
+ if (err) {
+ /* istanbul ignore else */
+ if (console.error) {
+ console.error(err);
+ }
+ } else if (console[name]) { /* istanbul ignore else */
+ resultArgs.forEach(x => console[name](x));
+ }
+ }
+ })
+ }
-const VERSION = "1.0.4";
+ /**
+ * Logs the result of an [`async` function]{@link AsyncFunction} to the
+ * `console` using `console.dir` to display the properties of the resulting object.
+ * Only works in Node.js or in browsers that support `console.dir` and
+ * `console.error` (such as FF and Chrome).
+ * If multiple arguments are returned from the async function,
+ * `console.dir` is called on each argument in order.
+ *
+ * @name dir
+ * @static
+ * @memberOf module:Utils
+ * @method
+ * @category Util
+ * @param {AsyncFunction} function - The function you want to eventually apply
+ * all arguments to.
+ * @param {...*} arguments... - Any number of arguments to apply to the function.
+ * @example
+ *
+ * // in a module
+ * var hello = function(name, callback) {
+ * setTimeout(function() {
+ * callback(null, {hello: name});
+ * }, 1000);
+ * };
+ *
+ * // in the node repl
+ * node> async.dir(hello, 'world');
+ * {hello: 'world'}
+ */
+ var dir = consoleFunc('dir');
-/**
- * @param octokit Octokit instance
- * @param options Options passed to Octokit constructor
- */
+ /**
+ * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
+ * the order of operations, the arguments `test` and `iteratee` are switched.
+ *
+ * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
+ *
+ * @name doWhilst
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.whilst]{@link module:ControlFlow.whilst}
+ * @category Control Flow
+ * @param {AsyncFunction} iteratee - A function which is called each time `test`
+ * passes. Invoked with (callback).
+ * @param {AsyncFunction} test - asynchronous truth test to perform after each
+ * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the
+ * non-error args from the previous callback of `iteratee`.
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has failed and repeated execution of `iteratee` has stopped.
+ * `callback` will be passed an error and any arguments passed to the final
+ * `iteratee`'s callback. Invoked with (err, [results]);
+ * @returns {Promise} a promise, if no callback is passed
+ */
+ function doWhilst(iteratee, test, callback) {
+ callback = onlyOnce(callback);
+ var _fn = wrapAsync(iteratee);
+ var _test = wrapAsync(test);
+ var results;
-function requestLog(octokit) {
- octokit.hook.wrap("request", (request, options) => {
- octokit.log.debug("request", options);
- const start = Date.now();
- const requestOptions = octokit.request.endpoint.parse(options);
- const path = requestOptions.url.replace(options.baseUrl, "");
- return request(options).then(response => {
- octokit.log.info(`${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`);
- return response;
- }).catch(error => {
- octokit.log.info(`${requestOptions.method} ${path} - ${error.status} in ${Date.now() - start}ms`);
- throw error;
- });
- });
-}
-requestLog.VERSION = VERSION;
+ function next(err, ...args) {
+ if (err) return callback(err);
+ if (err === false) return;
+ results = args;
+ _test(...args, check);
+ }
-exports.requestLog = requestLog;
-//# sourceMappingURL=index.js.map
+ function check(err, truth) {
+ if (err) return callback(err);
+ if (err === false) return;
+ if (!truth) return callback(null, ...results);
+ _fn(next);
+ }
+ return check(null, true);
+ }
-/***/ }),
+ var doWhilst$1 = awaitify(doWhilst, 3);
-/***/ 83044:
-/***/ ((module) => {
+ /**
+ * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the
+ * argument ordering differs from `until`.
+ *
+ * @name doUntil
+ * @static
+ * @memberOf module:ControlFlow
+ * @method
+ * @see [async.doWhilst]{@link module:ControlFlow.doWhilst}
+ * @category Control Flow
+ * @param {AsyncFunction} iteratee - An async function which is called each time
+ * `test` fails. Invoked with (callback).
+ * @param {AsyncFunction} test - asynchronous truth test to perform after each
+ * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the
+ * non-error args from the previous callback of `iteratee`
+ * @param {Function} [callback] - A callback which is called after the test
+ * function has passed and repeated execution of `iteratee` has stopped. `callback`
+ * will be passed an error and any arguments passed to the final `iteratee`'s
+ * callback. Invoked with (err, [results]);
+ * @returns {Promise} a promise, if no callback is passed
+ */
+ function doUntil(iteratee, test, callback) {
+ const _test = wrapAsync(test);
+ return doWhilst$1(iteratee, (...args) => {
+ const cb = args.pop();
+ _test(...args, (err, truth) => cb (err, !truth));
+ }, callback);
+ }
-"use strict";
+ function _withoutIndex(iteratee) {
+ return (value, index, callback) => iteratee(value, callback);
+ }
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
-};
-var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
-};
-var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+ /**
+ * Applies the function `iteratee` to each item in `coll`, in parallel.
+ * The `iteratee` is called with an item from the list, and a callback for when
+ * it has finished. If the `iteratee` passes an error to its `callback`, the
+ * main `callback` (for the `each` function) is immediately called with the
+ * error.
+ *
+ * Note, that since this function applies `iteratee` to each item in parallel,
+ * there is no guarantee that the iteratee functions will complete in order.
+ *
+ * @name each
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @alias forEach
+ * @category Collection
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {AsyncFunction} iteratee - An async function to apply to
+ * each item in `coll`. Invoked with (item, callback).
+ * The array index is not passed to the iteratee.
+ * If you need the index, use `eachOf`.
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ * @returns {Promise} a promise, if a callback is omitted
+ * @example
+ *
+ * // dir1 is a directory that contains file1.txt, file2.txt
+ * // dir2 is a directory that contains file3.txt, file4.txt
+ * // dir3 is a directory that contains file5.txt
+ * // dir4 does not exist
+ *
+ * const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt'];
+ * const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt'];
+ *
+ * // asynchronous function that deletes a file
+ * const deleteFile = function(file, callback) {
+ * fs.unlink(file, callback);
+ * };
+ *
+ * // Using callbacks
+ * async.each(fileList, deleteFile, function(err) {
+ * if( err ) {
+ * console.log(err);
+ * } else {
+ * console.log('All files have been deleted successfully');
+ * }
+ * });
+ *
+ * // Error Handling
+ * async.each(withMissingFileList, deleteFile, function(err){
+ * console.log(err);
+ * // [ Error: ENOENT: no such file or directory ]
+ * // since dir4/file2.txt does not exist
+ * // dir1/file1.txt could have been deleted
+ * });
+ *
+ * // Using Promises
+ * async.each(fileList, deleteFile)
+ * .then( () => {
+ * console.log('All files have been deleted successfully');
+ * }).catch( err => {
+ * console.log(err);
+ * });
+ *
+ * // Error Handling
+ * async.each(fileList, deleteFile)
+ * .then( () => {
+ * console.log('All files have been deleted successfully');
+ * }).catch( err => {
+ * console.log(err);
+ * // [ Error: ENOENT: no such file or directory ]
+ * // since dir4/file2.txt does not exist
+ * // dir1/file1.txt could have been deleted
+ * });
+ *
+ * // Using async/await
+ * async () => {
+ * try {
+ * await async.each(files, deleteFile);
+ * }
+ * catch (err) {
+ * console.log(err);
+ * }
+ * }
+ *
+ * // Error Handling
+ * async () => {
+ * try {
+ * await async.each(withMissingFileList, deleteFile);
+ * }
+ * catch (err) {
+ * console.log(err);
+ * // [ Error: ENOENT: no such file or directory ]
+ * // since dir4/file2.txt does not exist
+ * // dir1/file1.txt could have been deleted
+ * }
+ * }
+ *
+ */
+ function eachLimit$2(coll, iteratee, callback) {
+ return eachOf$1(coll, _withoutIndex(wrapAsync(iteratee)), callback);
+ }
-// pkg/dist-src/index.js
-var dist_src_exports = {};
-__export(dist_src_exports, {
- legacyRestEndpointMethods: () => legacyRestEndpointMethods,
- restEndpointMethods: () => restEndpointMethods
-});
-module.exports = __toCommonJS(dist_src_exports);
+ var each = awaitify(eachLimit$2, 3);
-// pkg/dist-src/version.js
-var VERSION = "10.4.1";
+ /**
+ * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
+ *
+ * @name eachLimit
+ * @static
+ * @memberOf module:Collections
+ * @method
+ * @see [async.each]{@link module:Collections.each}
+ * @alias forEachLimit
+ * @category Collection
+ * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
+ * @param {number} limit - The maximum number of async operations at a time.
+ * @param {AsyncFunction} iteratee - An async function to apply to each item in
+ * `coll`.
+ * The array index is not passed to the iteratee.
+ * If you need the index, use `eachOfLimit`.
+ * Invoked with (item, callback).
+ * @param {Function} [callback] - A callback which is called when all
+ * `iteratee` functions have finished, or an error occurs. Invoked with (err).
+ * @returns {Promise} a promise, if a callback is omitted
+ */
+ function eachLimit(coll, limit, iteratee, callback) {
+ return eachOfLimit$2(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback);
+ }
+ var eachLimit$1 = awaitify(eachLimit, 4);
-// pkg/dist-src/generated/endpoints.js
-var Endpoints = {
- actions: {
- addCustomLabelsToSelfHostedRunnerForOrg: [
- "POST /orgs/{org}/actions/runners/{runner_id}/labels"
- ],
- addCustomLabelsToSelfHostedRunnerForRepo: [
- "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
- ],
- addSelectedRepoToOrgSecret: [
- "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"
- ],
- addSelectedRepoToOrgVariable: [
- "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"
- ],
- approveWorkflowRun: [
- "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"
- ],
- cancelWorkflowRun: [
- "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"
- ],
- createEnvironmentVariable: [
- "POST /repositories/{repository_id}/environments/{environment_name}/variables"
- ],
- createOrUpdateEnvironmentSecret: [
- "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"
- ],
- createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"],
- createOrUpdateRepoSecret: [
- "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"
- ],
- createOrgVariable: ["POST /orgs/{org}/actions/variables"],
- createRegistrationTokenForOrg: [
- "POST /orgs/{org}/actions/runners/registration-token"
- ],
- createRegistrationTokenForRepo: [
- "POST /repos/{owner}/{repo}/actions/runners/registration-token"
- ],
- createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"],
- createRemoveTokenForRepo: [
- "POST /repos/{owner}/{repo}/actions/runners/remove-token"
- ],
- createRepoVariable: ["POST /repos/{owner}/{repo}/actions/variables"],
- createWorkflowDispatch: [
- "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"
- ],
- deleteActionsCacheById: [
- "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"
- ],
- deleteActionsCacheByKey: [
- "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"
- ],
- deleteArtifact: [
- "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"
- ],
- deleteEnvironmentSecret: [
- "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"
- ],
- deleteEnvironmentVariable: [
- "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}"
- ],
- deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"],
- deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"],
- deleteRepoSecret: [
- "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"
- ],
- deleteRepoVariable: [
- "DELETE /repos/{owner}/{repo}/actions/variables/{name}"
- ],
- deleteSelfHostedRunnerFromOrg: [
- "DELETE /orgs/{org}/actions/runners/{runner_id}"
- ],
- deleteSelfHostedRunnerFromRepo: [
- "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"
- ],
- deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],
- deleteWorkflowRunLogs: [
- "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"
- ],
- disableSelectedRepositoryGithubActionsOrganization: [
- "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"
- ],
- disableWorkflow: [
- "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"
- ],
- downloadArtifact: [
- "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"
- ],
- downloadJobLogsForWorkflowRun: [
- "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"
- ],
- downloadWorkflowRunAttemptLogs: [
- "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"
- ],
- downloadWorkflowRunLogs: [
- "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"
- ],
- enableSelectedRepositoryGithubActionsOrganization: [
- "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"
- ],
- enableWorkflow: [
- "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"
- ],
- forceCancelWorkflowRun: [
- "POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel"
- ],
- generateRunnerJitconfigForOrg: [
- "POST /orgs/{org}/actions/runners/generate-jitconfig"
- ],
- generateRunnerJitconfigForRepo: [
- "POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig"
- ],
- getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"],
- getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"],
- getActionsCacheUsageByRepoForOrg: [
- "GET /orgs/{org}/actions/cache/usage-by-repository"
- ],
- getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"],
- getAllowedActionsOrganization: [
- "GET /orgs/{org}/actions/permissions/selected-actions"
- ],
- getAllowedActionsRepository: [
- "GET /repos/{owner}/{repo}/actions/permissions/selected-actions"
- ],
- getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],
- getCustomOidcSubClaimForRepo: [
- "GET /repos/{owner}/{repo}/actions/oidc/customization/sub"
- ],
- getEnvironmentPublicKey: [
- "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"
- ],
- getEnvironmentSecret: [
- "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"
- ],
- getEnvironmentVariable: [
- "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}"
- ],
- getGithubActionsDefaultWorkflowPermissionsOrganization: [
- "GET /orgs/{org}/actions/permissions/workflow"
- ],
- getGithubActionsDefaultWorkflowPermissionsRepository: [
- "GET /repos/{owner}/{repo}/actions/permissions/workflow"
- ],
- getGithubActionsPermissionsOrganization: [
- "GET /orgs/{org}/actions/permissions"
- ],
- getGithubActionsPermissionsRepository: [
- "GET /repos/{owner}/{repo}/actions/permissions"
- ],
- getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],
- getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"],
- getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"],
- getOrgVariable: ["GET /orgs/{org}/actions/variables/{name}"],
- getPendingDeploymentsForRun: [
- "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"
- ],
- getRepoPermissions: [
- "GET /repos/{owner}/{repo}/actions/permissions",
- {},
- { renamed: ["actions", "getGithubActionsPermissionsRepository"] }
- ],
- getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"],
- getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],
- getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"],
- getReviewsForRun: [
- "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"
- ],
- getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"],
- getSelfHostedRunnerForRepo: [
- "GET /repos/{owner}/{repo}/actions/runners/{runner_id}"
- ],
- getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],
- getWorkflowAccessToRepository: [
- "GET /repos/{owner}/{repo}/actions/permissions/access"
- ],
- getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],
- getWorkflowRunAttempt: [
- "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"
- ],
- getWorkflowRunUsage: [
- "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"
- ],
- getWorkflowUsage: [
- "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"
- ],
- listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"],
- listEnvironmentSecrets: [
- "GET /repositories/{repository_id}/environments/{environment_name}/secrets"
- ],
- listEnvironmentVariables: [
- "GET /repositories/{repository_id}/environments/{environment_name}/variables"
- ],
- listJobsForWorkflowRun: [
- "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"
- ],
- listJobsForWorkflowRunAttempt: [
- "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"
- ],
- listLabelsForSelfHostedRunnerForOrg: [
- "GET /orgs/{org}/actions/runners/{runner_id}/labels"
- ],
- listLabelsForSelfHostedRunnerForRepo: [
- "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
- ],
- listOrgSecrets: ["GET /orgs/{org}/actions/secrets"],
- listOrgVariables: ["GET /orgs/{org}/actions/variables"],
- listRepoOrganizationSecrets: [
- "GET /repos/{owner}/{repo}/actions/organization-secrets"
- ],
- listRepoOrganizationVariables: [
- "GET /repos/{owner}/{repo}/actions/organization-variables"
- ],
- listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"],
- listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"],
- listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"],
- listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"],
- listRunnerApplicationsForRepo: [
- "GET /repos/{owner}/{repo}/actions/runners/downloads"
- ],
- listSelectedReposForOrgSecret: [
- "GET /orgs/{org}/actions/secrets/{secret_name}/repositories"
- ],
- listSelectedReposForOrgVariable: [
- "GET /orgs/{org}/actions/variables/{name}/repositories"
- ],
- listSelectedRepositoriesEnabledGithubActionsOrganization: [
- "GET /orgs/{org}/actions/permissions/repositories"
- ],
- listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"],
- listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"],
- listWorkflowRunArtifacts: [
- "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"
- ],
- listWorkflowRuns: [
- "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"
- ],
- listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"],
- reRunJobForWorkflowRun: [
- "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"
- ],
- reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],
- reRunWorkflowFailedJobs: [
- "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"
- ],
- removeAllCustomLabelsFromSelfHostedRunnerForOrg: [
- "DELETE /orgs/{org}/actions/runners/{runner_id}/labels"
- ],
- removeAllCustomLabelsFromSelfHostedRunnerForRepo: [
- "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
- ],
- removeCustomLabelFromSelfHostedRunnerForOrg: [
- "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"
- ],
- removeCustomLabelFromSelfHostedRunnerForRepo: [
- "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"
- ],
- removeSelectedRepoFromOrgSecret: [
- "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"
- ],
- removeSelectedRepoFromOrgVariable: [
- "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"
- ],
- reviewCustomGatesForRun: [
- "POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule"
- ],
- reviewPendingDeploymentsForRun: [
- "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"
- ],
- setAllowedActionsOrganization: [
- "PUT /orgs/{org}/actions/permissions/selected-actions"
- ],
- setAllowedActionsRepository: [
- "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"
- ],
- setCustomLabelsForSelfHostedRunnerForOrg: [
- "PUT /orgs/{org}/actions/runners/{runner_id}/labels"
- ],
- setCustomLabelsForSelfHostedRunnerForRepo: [
- "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
- ],
- setCustomOidcSubClaimForRepo: [
- "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub"
- ],
- setGithubActionsDefaultWorkflowPermissionsOrganization: [
- "PUT /orgs/{org}/actions/permissions/workflow"
- ],
- setGithubActionsDefaultWorkflowPermissionsRepository: [
- "PUT /repos/{owner}/{repo}/actions/permissions/workflow"
- ],
- setGithubActionsPermissionsOrganization: [
- "PUT /orgs/{org}/actions/permissions"
- ],
- setGithubActionsPermissionsRepository: [
- "PUT /repos/{owner}/{repo}/actions/permissions"
- ],
- setSelectedReposForOrgSecret: [
- "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"
- ],
- setSelectedReposForOrgVariable: [
- "PUT /orgs/{org}/actions/variables/{name}/repositories"
- ],
- setSelectedRepositoriesEnabledGithubActionsOrganization: [
- "PUT /orgs/{org}/actions/permissions/repositories"
- ],
- setWorkflowAccessToRepository: [
- "PUT /repos/{owner}/{repo}/actions/permissions/access"
- ],
- updateEnvironmentVariable: [
- "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}"
- ],
- updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"],
- updateRepoVariable: [
- "PATCH /repos/{owner}/{repo}/actions/variables/{name}"
- ]
- },
- activity: {
- checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"],
- deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"],
- deleteThreadSubscription: [
- "DELETE /notifications/threads/{thread_id}/subscription"
- ],
- getFeeds: ["GET /feeds"],
- getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"],
- getThread: ["GET /notifications/threads/{thread_id}"],
- getThreadSubscriptionForAuthenticatedUser: [
- "GET /notifications/threads/{thread_id}/subscription"
- ],
- listEventsForAuthenticatedUser: ["GET /users/{username}/events"],
- listNotificationsForAuthenticatedUser: ["GET /notifications"],
- listOrgEventsForAuthenticatedUser: [
- "GET /users/{username}/events/orgs/{org}"
- ],
- listPublicEvents: ["GET /events"],
- listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"],
- listPublicEventsForUser: ["GET /users/{username}/events/public"],
- listPublicOrgEvents: ["GET /orgs/{org}/events"],
- listReceivedEventsForUser: ["GET /users/{username}/received_events"],
- listReceivedPublicEventsForUser: [
- "GET /users/{username}/received_events/public"
- ],
- listRepoEvents: ["GET /repos/{owner}/{repo}/events"],
- listRepoNotificationsForAuthenticatedUser: [
- "GET /repos/{owner}/{repo}/notifications"
- ],
- listReposStarredByAuthenticatedUser: ["GET /user/starred"],
- listReposStarredByUser: ["GET /users/{username}/starred"],
- listReposWatchedByUser: ["GET /users/{username}/subscriptions"],
- listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"],
- listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"],
- listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"],
- markNotificationsAsRead: ["PUT /notifications"],
- markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"],
- markThreadAsDone: ["DELETE /notifications/threads/{thread_id}"],
- markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"],
- setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"],
- setThreadSubscription: [
- "PUT /notifications/threads/{thread_id}/subscription"
- ],
- starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"],
- unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"]
- },
- apps: {
- addRepoToInstallation: [
- "PUT /user/installations/{installation_id}/repositories/{repository_id}",
- {},
- { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] }
- ],
- addRepoToInstallationForAuthenticatedUser: [
- "PUT /user/installations/{installation_id}/repositories/{repository_id}"
- ],
- checkToken: ["POST /applications/{client_id}/token"],
- createFromManifest: ["POST /app-manifests/{code}/conversions"],
- createInstallationAccessToken: [
- "POST /app/installations/{installation_id}/access_tokens"
- ],
- deleteAuthorization: ["DELETE /applications/{client_id}/grant"],
- deleteInstallation: ["DELETE /app/installations/{installation_id}"],
- deleteToken: ["DELETE /applications/{client_id}/token"],
- getAuthenticated: ["GET /app"],
- getBySlug: ["GET /apps/{app_slug}"],
- getInstallation: ["GET /app/installations/{installation_id}"],
- getOrgInstallation: ["GET /orgs/{org}/installation"],
- getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"],
- getSubscriptionPlanForAccount: [
- "GET /marketplace_listing/accounts/{account_id}"
- ],
- getSubscriptionPlanForAccountStubbed: [
- "GET /marketplace_listing/stubbed/accounts/{account_id}"
- ],
- getUserInstallation: ["GET /users/{username}/installation"],
- getWebhookConfigForApp: ["GET /app/hook/config"],
- getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"],
- listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"],
- listAccountsForPlanStubbed: [
- "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"
- ],
- listInstallationReposForAuthenticatedUser: [
- "GET /user/installations/{installation_id}/repositories"
- ],
- listInstallationRequestsForAuthenticatedApp: [
- "GET /app/installation-requests"
- ],
- listInstallations: ["GET /app/installations"],
- listInstallationsForAuthenticatedUser: ["GET /user/installations"],
- listPlans: ["GET /marketplace_listing/plans"],
- listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"],
- listReposAccessibleToInstallation: ["GET /installation/repositories"],
- listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"],
- listSubscriptionsForAuthenticatedUserStubbed: [
- "GET /user/marketplace_purchases/stubbed"
- ],
- listWebhookDeliveries: ["GET /app/hook/deliveries"],
- redeliverWebhookDelivery: [
- "POST /app/hook/deliveries/{delivery_id}/attempts"
- ],
- removeRepoFromInstallation: [
- "DELETE /user/installations/{installation_id}/repositories/{repository_id}",
- {},
- { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] }
- ],
- removeRepoFromInstallationForAuthenticatedUser: [
- "DELETE /user/installations/{installation_id}/repositories/{repository_id}"
- ],
- resetToken: ["PATCH /applications/{client_id}/token"],
- revokeInstallationAccessToken: ["DELETE /installation/token"],
- scopeToken: ["POST /applications/{client_id}/token/scoped"],
- suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"],
- unsuspendInstallation: [
- "DELETE /app/installations/{installation_id}/suspended"
- ],
- updateWebhookConfigForApp: ["PATCH /app/hook/config"]
- },
- billing: {
- getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"],
- getGithubActionsBillingUser: [
- "GET /users/{username}/settings/billing/actions"
- ],
- getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"],
- getGithubPackagesBillingUser: [
- "GET /users/{username}/settings/billing/packages"
- ],
- getSharedStorageBillingOrg: [
- "GET /orgs/{org}/settings/billing/shared-storage"
- ],
- getSharedStorageBillingUser: [
- "GET /users/{username}/settings/billing/shared-storage"
- ]
- },
- checks: {
- create: ["POST /repos/{owner}/{repo}/check-runs"],
- createSuite: ["POST /repos/{owner}/{repo}/check-suites"],
- get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"],
- getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"],
- listAnnotations: [
- "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"
- ],
- listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],
- listForSuite: [
- "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"
- ],
- listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"],
- rerequestRun: [
- "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"
- ],
- rerequestSuite: [
- "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"
- ],
- setSuitesPreferences: [
- "PATCH /repos/{owner}/{repo}/check-suites/preferences"
- ],
- update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]
- },
- codeScanning: {
- deleteAnalysis: [
- "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"
- ],
- getAlert: [
- "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}",
- {},
- { renamedParameters: { alert_id: "alert_number" } }
- ],
- getAnalysis: [
- "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"
- ],
- getCodeqlDatabase: [
- "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
- ],
- getDefaultSetup: ["GET /repos/{owner}/{repo}/code-scanning/default-setup"],
- getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"],
- listAlertInstances: [
- "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"
- ],
- listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"],
- listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"],
- listAlertsInstances: [
- "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",
- {},
- { renamed: ["codeScanning", "listAlertInstances"] }
- ],
- listCodeqlDatabases: [
- "GET /repos/{owner}/{repo}/code-scanning/codeql/databases"
- ],
- listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"],
- updateAlert: [
- "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"
- ],
- updateDefaultSetup: [
- "PATCH /repos/{owner}/{repo}/code-scanning/default-setup"
- ],
- uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"]
- },
- codesOfConduct: {
- getAllCodesOfConduct: ["GET /codes_of_conduct"],
- getConductCode: ["GET /codes_of_conduct/{key}"]
- },
- codespaces: {
- addRepositoryForSecretForAuthenticatedUser: [
- "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"
- ],
- addSelectedRepoToOrgSecret: [
- "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"
- ],
- checkPermissionsForDevcontainer: [
- "GET /repos/{owner}/{repo}/codespaces/permissions_check"
- ],
- codespaceMachinesForAuthenticatedUser: [
- "GET /user/codespaces/{codespace_name}/machines"
- ],
- createForAuthenticatedUser: ["POST /user/codespaces"],
- createOrUpdateOrgSecret: [
- "PUT /orgs/{org}/codespaces/secrets/{secret_name}"
- ],
- createOrUpdateRepoSecret: [
- "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"
- ],
- createOrUpdateSecretForAuthenticatedUser: [
- "PUT /user/codespaces/secrets/{secret_name}"
- ],
- createWithPrForAuthenticatedUser: [
- "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"
- ],
- createWithRepoForAuthenticatedUser: [
- "POST /repos/{owner}/{repo}/codespaces"
- ],
- deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"],
- deleteFromOrganization: [
- "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"
- ],
- deleteOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"],
- deleteRepoSecret: [
- "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"
- ],
- deleteSecretForAuthenticatedUser: [
- "DELETE /user/codespaces/secrets/{secret_name}"
- ],
- exportForAuthenticatedUser: [
- "POST /user/codespaces/{codespace_name}/exports"
- ],
- getCodespacesForUserInOrg: [
- "GET /orgs/{org}/members/{username}/codespaces"
- ],
- getExportDetailsForAuthenticatedUser: [
- "GET /user/codespaces/{codespace_name}/exports/{export_id}"
- ],
- getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"],
- getOrgPublicKey: ["GET /orgs/{org}/codespaces/secrets/public-key"],
- getOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}"],
- getPublicKeyForAuthenticatedUser: [
- "GET /user/codespaces/secrets/public-key"
- ],
- getRepoPublicKey: [
- "GET /repos/{owner}/{repo}/codespaces/secrets/public-key"
- ],
- getRepoSecret: [
- "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"
- ],
- getSecretForAuthenticatedUser: [
- "GET /user/codespaces/secrets/{secret_name}"
- ],
- listDevcontainersInRepositoryForAuthenticatedUser: [
- "GET /repos/{owner}/{repo}/codespaces/devcontainers"
- ],
- listForAuthenticatedUser: ["GET /user/codespaces"],
- listInOrganization: [
- "GET /orgs/{org}/codespaces",
- {},
- { renamedParameters: { org_id: "org" } }
- ],
- listInRepositoryForAuthenticatedUser: [
- "GET /repos/{owner}/{repo}/codespaces"
- ],
- listOrgSecrets: ["GET /orgs/{org}/codespaces/secrets"],
- listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"],
- listRepositoriesForSecretForAuthenticatedUser: [
- "GET /user/codespaces/secrets/{secret_name}/repositories"
- ],
- listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"],
- listSelectedReposForOrgSecret: [
- "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories"
- ],
- preFlightWithRepoForAuthenticatedUser: [
- "GET /repos/{owner}/{repo}/codespaces/new"
- ],
- publishForAuthenticatedUser: [
- "POST /user/codespaces/{codespace_name}/publish"
- ],
- removeRepositoryForSecretForAuthenticatedUser: [
- "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"
- ],
- removeSelectedRepoFromOrgSecret: [
- "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"
- ],
- repoMachinesForAuthenticatedUser: [
- "GET /repos/{owner}/{repo}/codespaces/machines"
- ],
- setRepositoriesForSecretForAuthenticatedUser: [
- "PUT /user/codespaces/secrets/{secret_name}/repositories"
- ],
- setSelectedReposForOrgSecret: [
- "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories"
- ],
- startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"],
- stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"],
- stopInOrganization: [
- "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"
- ],
- updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"]
- },
- copilot: {
- addCopilotSeatsForTeams: [
- "POST /orgs/{org}/copilot/billing/selected_teams"
- ],
- addCopilotSeatsForUsers: [
- "POST /orgs/{org}/copilot/billing/selected_users"
- ],
- cancelCopilotSeatAssignmentForTeams: [
- "DELETE /orgs/{org}/copilot/billing/selected_teams"
- ],
- cancelCopilotSeatAssignmentForUsers: [
- "DELETE /orgs/{org}/copilot/billing/selected_users"
- ],
- getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"],
- getCopilotSeatDetailsForUser: [
- "GET /orgs/{org}/members/{username}/copilot"
- ],
- listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"]
- },
- dependabot: {
- addSelectedRepoToOrgSecret: [
- "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"
- ],
- createOrUpdateOrgSecret: [
- "PUT /orgs/{org}/dependabot/secrets/{secret_name}"
- ],
- createOrUpdateRepoSecret: [
- "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"
- ],
- deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"],
- deleteRepoSecret: [
- "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"
- ],
- getAlert: ["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"],
- getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"],
- getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"],
- getRepoPublicKey: [
- "GET /repos/{owner}/{repo}/dependabot/secrets/public-key"
- ],
- getRepoSecret: [
- "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"
- ],
- listAlertsForEnterprise: [
- "GET /enterprises/{enterprise}/dependabot/alerts"
- ],
- listAlertsForOrg: ["GET /orgs/{org}/dependabot/alerts"],
- listAlertsForRepo: ["GET /repos/{owner}/{repo}/dependabot/alerts"],
- listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"],
- listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"],
- listSelectedReposForOrgSecret: [
- "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"
- ],
- removeSelectedRepoFromOrgSecret: [
- "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"
- ],
- setSelectedReposForOrgSecret: [
- "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"
- ],
- updateAlert: [
- "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"
- ]
- },
- dependencyGraph: {
- createRepositorySnapshot: [
- "POST /repos/{owner}/{repo}/dependency-graph/snapshots"
- ],
- diffRange: [
- "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"
- ],
- exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"]
- },
- emojis: { get: ["GET /emojis"] },
- gists: {
- checkIsStarred: ["GET /gists/{gist_id}/star"],
- create: ["POST /gists"],
- createComment: ["POST /gists/{gist_id}/comments"],
- delete: ["DELETE /gists/{gist_id}"],
- deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"],
- fork: ["POST /gists/{gist_id}/forks"],
- get: ["GET /gists/{gist_id}"],
- getComment: ["GET /gists/{gist_id}/comments/{comment_id}"],
- getRevision: ["GET /gists/{gist_id}/{sha}"],
- list: ["GET /gists"],
- listComments: ["GET /gists/{gist_id}/comments"],
- listCommits: ["GET /gists/{gist_id}/commits"],
- listForUser: ["GET /users/{username}/gists"],
- listForks: ["GET /gists/{gist_id}/forks"],
- listPublic: ["GET /gists/public"],
- listStarred: ["GET /gists/starred"],
- star: ["PUT /gists/{gist_id}/star"],
- unstar: ["DELETE /gists/{gist_id}/star"],
- update: ["PATCH /gists/{gist_id}"],
- updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"]
- },
- git: {
- createBlob: ["POST /repos/{owner}/{repo}/git/blobs"],
- createCommit: ["POST /repos/{owner}/{repo}/git/commits"],
- createRef: ["POST /repos/{owner}/{repo}/git/refs"],
- createTag: ["POST /repos/{owner}/{repo}/git/tags"],
- createTree: ["POST /repos/{owner}/{repo}/git/trees"],
- deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"],
- getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"],
- getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"],
- getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"],
- getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"],
- getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"],
- listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"],
- updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]
- },
- gitignore: {
- getAllTemplates: ["GET /gitignore/templates"],
- getTemplate: ["GET /gitignore/templates/{name}"]
- },
- interactions: {
- getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"],
- getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"],
- getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"],
- getRestrictionsForYourPublicRepos: [
- "GET /user/interaction-limits",
- {},
- { renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] }
- ],
- removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"],
- removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"],
- removeRestrictionsForRepo: [
- "DELETE /repos/{owner}/{repo}/interaction-limits"
- ],
- removeRestrictionsForYourPublicRepos: [
- "DELETE /user/interaction-limits",
- {},
- { renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] }
- ],
- setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"],
- setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"],
- setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"],
- setRestrictionsForYourPublicRepos: [
- "PUT /user/interaction-limits",
- {},
- { renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] }
- ]
- },
- issues: {
- addAssignees: [
- "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"
- ],
- addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],
- checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"],
- checkUserCanBeAssignedToIssue: [
- "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}"
- ],
- create: ["POST /repos/{owner}/{repo}/issues"],
- createComment: [
- "POST /repos/{owner}/{repo}/issues/{issue_number}/comments"
- ],
- createLabel: ["POST /repos/{owner}/{repo}/labels"],
- createMilestone: ["POST /repos/{owner}/{repo}/milestones"],
- deleteComment: [
- "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"
- ],
- deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"],
- deleteMilestone: [
- "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"
- ],
- get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"],
- getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"],
- getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"],
- getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"],
- getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],
- list: ["GET /issues"],
- listAssignees: ["GET /repos/{owner}/{repo}/assignees"],
- listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],
- listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"],
- listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],
- listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"],
- listEventsForTimeline: [
- "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"
- ],
- listForAuthenticatedUser: ["GET /user/issues"],
- listForOrg: ["GET /orgs/{org}/issues"],
- listForRepo: ["GET /repos/{owner}/{repo}/issues"],
- listLabelsForMilestone: [
- "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"
- ],
- listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"],
- listLabelsOnIssue: [
- "GET /repos/{owner}/{repo}/issues/{issue_number}/labels"
- ],
- listMilestones: ["GET /repos/{owner}/{repo}/milestones"],
- lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],
- removeAllLabels: [
- "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"
- ],
- removeAssignees: [
- "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"
- ],
- removeLabel: [
- "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"
- ],
- setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],
- unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],
- update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],
- updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],
- updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"],
- updateMilestone: [
- "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"
- ]
- },
- licenses: {
- get: ["GET /licenses/{license}"],
- getAllCommonlyUsed: ["GET /licenses"],
- getForRepo: ["GET /repos/{owner}/{repo}/license"]
- },
- markdown: {
- render: ["POST /markdown"],
- renderRaw: [
- "POST /markdown/raw",
- { headers: { "content-type": "text/plain; charset=utf-8" } }
- ]
- },
- meta: {
- get: ["GET /meta"],
- getAllVersions: ["GET /versions"],
- getOctocat: ["GET /octocat"],
- getZen: ["GET /zen"],
- root: ["GET /"]
- },
- migrations: {
- cancelImport: [
- "DELETE /repos/{owner}/{repo}/import",
- {},
- {
- deprecated: "octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import"
- }
- ],
- deleteArchiveForAuthenticatedUser: [
- "DELETE /user/migrations/{migration_id}/archive"
- ],
- deleteArchiveForOrg: [
- "DELETE /orgs/{org}/migrations/{migration_id}/archive"
- ],
- downloadArchiveForOrg: [
- "GET /orgs/{org}/migrations/{migration_id}/archive"
- ],
- getArchiveForAuthenticatedUser: [
- "GET /user/migrations/{migration_id}/archive"
- ],
- getCommitAuthors: [
- "GET /repos/{owner}/{repo}/import/authors",
- {},
- {
- deprecated: "octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors"
- }
- ],
- getImportStatus: [
- "GET /repos/{owner}/{repo}/import",
- {},
- {
- deprecated: "octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status"
- }
- ],
- getLargeFiles: [
- "GET /repos/{owner}/{repo}/import/large_files",
- {},
- {
- deprecated: "octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files"
- }
- ],
- getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"],
- getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"],
- listForAuthenticatedUser: ["GET /user/migrations"],
- listForOrg: ["GET /orgs/{org}/migrations"],
- listReposForAuthenticatedUser: [
- "GET /user/migrations/{migration_id}/repositories"
- ],
- listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"],
- listReposForUser: [
- "GET /user/migrations/{migration_id}/repositories",
- {},
- { renamed: ["migrations", "listReposForAuthenticatedUser"] }
- ],
- mapCommitAuthor: [
- "PATCH /repos/{owner}/{repo}/import/authors/{author_id}",
- {},
- {
- deprecated: "octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author"
- }
- ],
- setLfsPreference: [
- "PATCH /repos/{owner}/{repo}/import/lfs",
- {},
- {
- deprecated: "octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference"
- }
- ],
- startForAuthenticatedUser: ["POST /user/migrations"],
- startForOrg: ["POST /orgs/{org}/migrations"],
- startImport: [
- "PUT /repos/{owner}/{repo}/import",
- {},
- {
- deprecated: "octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import"
- }
- ],
- unlockRepoForAuthenticatedUser: [
- "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"
- ],
- unlockRepoForOrg: [
- "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"
- ],
- updateImport: [
- "PATCH /repos/{owner}/{repo}/import",
- {},
- {
- deprecated: "octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import"
- }
- ]
- },
- oidc: {
- getOidcCustomSubTemplateForOrg: [
- "GET /orgs/{org}/actions/oidc/customization/sub"
- ],
- updateOidcCustomSubTemplateForOrg: [
- "PUT /orgs/{org}/actions/oidc/customization/sub"
- ]
- },
- orgs: {
- addSecurityManagerTeam: [
- "PUT /orgs/{org}/security-managers/teams/{team_slug}"
- ],
- assignTeamToOrgRole: [
- "PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"
- ],
- assignUserToOrgRole: [
- "PUT /orgs/{org}/organization-roles/users/{username}/{role_id}"
- ],
- blockUser: ["PUT /orgs/{org}/blocks/{username}"],
- cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"],
- checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"],
- checkMembershipForUser: ["GET /orgs/{org}/members/{username}"],
- checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"],
- convertMemberToOutsideCollaborator: [
- "PUT /orgs/{org}/outside_collaborators/{username}"
- ],
- createCustomOrganizationRole: ["POST /orgs/{org}/organization-roles"],
- createInvitation: ["POST /orgs/{org}/invitations"],
- createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"],
- createOrUpdateCustomPropertiesValuesForRepos: [
- "PATCH /orgs/{org}/properties/values"
- ],
- createOrUpdateCustomProperty: [
- "PUT /orgs/{org}/properties/schema/{custom_property_name}"
- ],
- createWebhook: ["POST /orgs/{org}/hooks"],
- delete: ["DELETE /orgs/{org}"],
- deleteCustomOrganizationRole: [
- "DELETE /orgs/{org}/organization-roles/{role_id}"
- ],
- deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
- enableOrDisableSecurityProductOnAllOrgRepos: [
- "POST /orgs/{org}/{security_product}/{enablement}"
- ],
- get: ["GET /orgs/{org}"],
- getAllCustomProperties: ["GET /orgs/{org}/properties/schema"],
- getCustomProperty: [
- "GET /orgs/{org}/properties/schema/{custom_property_name}"
- ],
- getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"],
- getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"],
- getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"],
- getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"],
- getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"],
- getWebhookDelivery: [
- "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"
- ],
- list: ["GET /organizations"],
- listAppInstallations: ["GET /orgs/{org}/installations"],
- listBlockedUsers: ["GET /orgs/{org}/blocks"],
- listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"],
- listFailedInvitations: ["GET /orgs/{org}/failed_invitations"],
- listForAuthenticatedUser: ["GET /user/orgs"],
- listForUser: ["GET /users/{username}/orgs"],
- listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"],
- listMembers: ["GET /orgs/{org}/members"],
- listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"],
- listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"],
- listOrgRoleUsers: ["GET /orgs/{org}/organization-roles/{role_id}/users"],
- listOrgRoles: ["GET /orgs/{org}/organization-roles"],
- listOrganizationFineGrainedPermissions: [
- "GET /orgs/{org}/organization-fine-grained-permissions"
- ],
- listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"],
- listPatGrantRepositories: [
- "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"
- ],
- listPatGrantRequestRepositories: [
- "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories"
- ],
- listPatGrantRequests: ["GET /orgs/{org}/personal-access-token-requests"],
- listPatGrants: ["GET /orgs/{org}/personal-access-tokens"],
- listPendingInvitations: ["GET /orgs/{org}/invitations"],
- listPublicMembers: ["GET /orgs/{org}/public_members"],
- listSecurityManagerTeams: ["GET /orgs/{org}/security-managers"],
- listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"],
- listWebhooks: ["GET /orgs/{org}/hooks"],
- patchCustomOrganizationRole: [
- "PATCH /orgs/{org}/organization-roles/{role_id}"
- ],
- pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"],
- redeliverWebhookDelivery: [
- "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"
- ],
- removeCustomProperty: [
- "DELETE /orgs/{org}/properties/schema/{custom_property_name}"
- ],
- removeMember: ["DELETE /orgs/{org}/members/{username}"],
- removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"],
- removeOutsideCollaborator: [
- "DELETE /orgs/{org}/outside_collaborators/{username}"
- ],
- removePublicMembershipForAuthenticatedUser: [
- "DELETE /orgs/{org}/public_members/{username}"
- ],
- removeSecurityManagerTeam: [
- "DELETE /orgs/{org}/security-managers/teams/{team_slug}"
- ],
- reviewPatGrantRequest: [
- "POST /orgs/{org}/personal-access-token-requests/{pat_request_id}"
- ],
- reviewPatGrantRequestsInBulk: [
- "POST /orgs/{org}/personal-access-token-requests"
- ],
- revokeAllOrgRolesTeam: [
- "DELETE /orgs/{org}/organization-roles/teams/{team_slug}"
- ],
- revokeAllOrgRolesUser: [
- "DELETE /orgs/{org}/organization-roles/users/{username}"
- ],
- revokeOrgRoleTeam: [
- "DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"
- ],
- revokeOrgRoleUser: [
- "DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}"
- ],
- setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"],
- setPublicMembershipForAuthenticatedUser: [
- "PUT /orgs/{org}/public_members/{username}"
- ],
- unblockUser: ["DELETE /orgs/{org}/blocks/{username}"],
- update: ["PATCH /orgs/{org}"],
- updateMembershipForAuthenticatedUser: [
- "PATCH /user/memberships/orgs/{org}"
- ],
- updatePatAccess: ["POST /orgs/{org}/personal-access-tokens/{pat_id}"],
- updatePatAccesses: ["POST /orgs/{org}/personal-access-tokens"],
- updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"],
- updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"]
- },
- packages: {
- deletePackageForAuthenticatedUser: [
- "DELETE /user/packages/{package_type}/{package_name}"
- ],
- deletePackageForOrg: [
- "DELETE /orgs/{org}/packages/{package_type}/{package_name}"
- ],
- deletePackageForUser: [
- "DELETE /users/{username}/packages/{package_type}/{package_name}"
- ],
- deletePackageVersionForAuthenticatedUser: [
- "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"
- ],
- deletePackageVersionForOrg: [
- "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"
- ],
- deletePackageVersionForUser: [
- "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"
- ],
- getAllPackageVersionsForAPackageOwnedByAnOrg: [
- "GET /orgs/{org}/packages/{package_type}/{package_name}/versions",
- {},
- { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] }
- ],
- getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [
- "GET /user/packages/{package_type}/{package_name}/versions",
- {},
- {
- renamed: [
- "packages",
- "getAllPackageVersionsForPackageOwnedByAuthenticatedUser"
- ]
- }
- ],
- getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [
- "GET /user/packages/{package_type}/{package_name}/versions"
- ],
- getAllPackageVersionsForPackageOwnedByOrg: [
- "GET /orgs/{org}/packages/{package_type}/{package_name}/versions"
- ],
- getAllPackageVersionsForPackageOwnedByUser: [
- "GET /users/{username}/packages/{package_type}/{package_name}/versions"
- ],
- getPackageForAuthenticatedUser: [
- "GET /user/packages/{package_type}/{package_name}"
- ],
- getPackageForOrganization: [
- "GET /orgs/{org}/packages/{package_type}/{package_name}"
- ],
- getPackageForUser: [
- "GET /users/{username}/packages/{package_type}/{package_name}"
- ],
- getPackageVersionForAuthenticatedUser: [
- "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"
- ],
- getPackageVersionForOrganization: [
- "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"
- ],
- getPackageVersionForUser: [
- "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"
- ],
- listDockerMigrationConflictingPackagesForAuthenticatedUser: [
- "GET /user/docker/conflicts"
- ],
- listDockerMigrationConflictingPackagesForOrganization: [
- "GET /orgs/{org}/docker/conflicts"
- ],
- listDockerMigrationConflictingPackagesForUser: [
- "GET /users/{username}/docker/conflicts"
- ],
- listPackagesForAuthenticatedUser: ["GET /user/packages"],
- listPackagesForOrganization: ["GET /orgs/{org}/packages"],
- listPackagesForUser: ["GET /users/{username}/packages"],
- restorePackageForAuthenticatedUser: [
- "POST /user/packages/{package_type}/{package_name}/restore{?token}"
- ],
- restorePackageForOrg: [
- "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"
- ],
- restorePackageForUser: [
- "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"
- ],
- restorePackageVersionForAuthenticatedUser: [
- "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"
- ],
- restorePackageVersionForOrg: [
- "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"
- ],
- restorePackageVersionForUser: [
- "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"
- ]
- },
- projects: {
- addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"],
- createCard: ["POST /projects/columns/{column_id}/cards"],
- createColumn: ["POST /projects/{project_id}/columns"],
- createForAuthenticatedUser: ["POST /user/projects"],
- createForOrg: ["POST /orgs/{org}/projects"],
- createForRepo: ["POST /repos/{owner}/{repo}/projects"],
- delete: ["DELETE /projects/{project_id}"],
- deleteCard: ["DELETE /projects/columns/cards/{card_id}"],
- deleteColumn: ["DELETE /projects/columns/{column_id}"],
- get: ["GET /projects/{project_id}"],
- getCard: ["GET /projects/columns/cards/{card_id}"],
- getColumn: ["GET /projects/columns/{column_id}"],
- getPermissionForUser: [
- "GET /projects/{project_id}/collaborators/{username}/permission"
- ],
- listCards: ["GET /projects/columns/{column_id}/cards"],
- listCollaborators: ["GET /projects/{project_id}/collaborators"],
- listColumns: ["GET /projects/{project_id}/columns"],
- listForOrg: ["GET /orgs/{org}/projects"],
- listForRepo: ["GET /repos/{owner}/{repo}/projects"],
- listForUser: ["GET /users/{username}/projects"],
- moveCard: ["POST /projects/columns/cards/{card_id}/moves"],
- moveColumn: ["POST /projects/columns/{column_id}/moves"],
- removeCollaborator: [
- "DELETE /projects/{project_id}/collaborators/{username}"
- ],
- update: ["PATCH /projects/{project_id}"],
- updateCard: ["PATCH /projects/columns/cards/{card_id}"],
- updateColumn: ["PATCH /projects/columns/{column_id}"]
- },
- pulls: {
- checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
- create: ["POST /repos/{owner}/{repo}/pulls"],
- createReplyForReviewComment: [
- "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"
- ],
- createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],
- createReviewComment: [
- "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"
- ],
- deletePendingReview: [
- "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"
- ],
- deleteReviewComment: [
- "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"
- ],
- dismissReview: [
- "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"
- ],
- get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"],
- getReview: [
- "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"
- ],
- getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],
- list: ["GET /repos/{owner}/{repo}/pulls"],
- listCommentsForReview: [
- "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"
- ],
- listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],
- listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],
- listRequestedReviewers: [
- "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"
- ],
- listReviewComments: [
- "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"
- ],
- listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"],
- listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],
- merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
- removeRequestedReviewers: [
- "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"
- ],
- requestReviewers: [
- "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"
- ],
- submitReview: [
- "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"
- ],
- update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],
- updateBranch: [
- "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"
- ],
- updateReview: [
- "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"
- ],
- updateReviewComment: [
- "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"
- ]
- },
- rateLimit: { get: ["GET /rate_limit"] },
- reactions: {
- createForCommitComment: [
- "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"
- ],
- createForIssue: [
- "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"
- ],
- createForIssueComment: [
- "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"
- ],
- createForPullRequestReviewComment: [
- "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"
- ],
- createForRelease: [
- "POST /repos/{owner}/{repo}/releases/{release_id}/reactions"
- ],
- createForTeamDiscussionCommentInOrg: [
- "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"
- ],
- createForTeamDiscussionInOrg: [
- "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"
- ],
- deleteForCommitComment: [
- "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"
- ],
- deleteForIssue: [
- "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"
- ],
- deleteForIssueComment: [
- "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"
- ],
- deleteForPullRequestComment: [
- "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"
- ],
- deleteForRelease: [
- "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"
- ],
- deleteForTeamDiscussion: [
- "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"
- ],
- deleteForTeamDiscussionComment: [
- "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"
- ],
- listForCommitComment: [
- "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"
- ],
- listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"],
- listForIssueComment: [
- "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"
- ],
- listForPullRequestReviewComment: [
- "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"
- ],
- listForRelease: [
- "GET /repos/{owner}/{repo}/releases/{release_id}/reactions"
- ],
- listForTeamDiscussionCommentInOrg: [
- "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"
- ],
- listForTeamDiscussionInOrg: [
- "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"
- ]
- },
- repos: {
- acceptInvitation: [
- "PATCH /user/repository_invitations/{invitation_id}",
- {},
- { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] }
- ],
- acceptInvitationForAuthenticatedUser: [
- "PATCH /user/repository_invitations/{invitation_id}"
- ],
- addAppAccessRestrictions: [
- "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
- {},
- { mapToData: "apps" }
- ],
- addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"],
- addStatusCheckContexts: [
- "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",
- {},
- { mapToData: "contexts" }
- ],
- addTeamAccessRestrictions: [
- "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",
- {},
- { mapToData: "teams" }
- ],
- addUserAccessRestrictions: [
- "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",
- {},
- { mapToData: "users" }
- ],
- cancelPagesDeployment: [
- "POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel"
- ],
- checkAutomatedSecurityFixes: [
- "GET /repos/{owner}/{repo}/automated-security-fixes"
- ],
- checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"],
- checkVulnerabilityAlerts: [
- "GET /repos/{owner}/{repo}/vulnerability-alerts"
- ],
- codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"],
- compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"],
- compareCommitsWithBasehead: [
- "GET /repos/{owner}/{repo}/compare/{basehead}"
- ],
- createAutolink: ["POST /repos/{owner}/{repo}/autolinks"],
- createCommitComment: [
- "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"
- ],
- createCommitSignatureProtection: [
- "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"
- ],
- createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"],
- createDeployKey: ["POST /repos/{owner}/{repo}/keys"],
- createDeployment: ["POST /repos/{owner}/{repo}/deployments"],
- createDeploymentBranchPolicy: [
- "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"
- ],
- createDeploymentProtectionRule: [
- "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"
- ],
- createDeploymentStatus: [
- "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"
- ],
- createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"],
- createForAuthenticatedUser: ["POST /user/repos"],
- createFork: ["POST /repos/{owner}/{repo}/forks"],
- createInOrg: ["POST /orgs/{org}/repos"],
- createOrUpdateCustomPropertiesValues: [
- "PATCH /repos/{owner}/{repo}/properties/values"
- ],
- createOrUpdateEnvironment: [
- "PUT /repos/{owner}/{repo}/environments/{environment_name}"
- ],
- createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"],
- createOrgRuleset: ["POST /orgs/{org}/rulesets"],
- createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments"],
- createPagesSite: ["POST /repos/{owner}/{repo}/pages"],
- createRelease: ["POST /repos/{owner}/{repo}/releases"],
- createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"],
- createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"],
- createUsingTemplate: [
- "POST /repos/{template_owner}/{template_repo}/generate"
- ],
- createWebhook: ["POST /repos/{owner}/{repo}/hooks"],
- declineInvitation: [
- "DELETE /user/repository_invitations/{invitation_id}",
- {},
- { renamed: ["repos", "declineInvitationForAuthenticatedUser"] }
- ],
- declineInvitationForAuthenticatedUser: [
- "DELETE /user/repository_invitations/{invitation_id}"
- ],
- delete: ["DELETE /repos/{owner}/{repo}"],
- deleteAccessRestrictions: [
- "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"
- ],
- deleteAdminBranchProtection: [
- "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"
- ],
- deleteAnEnvironment: [
- "DELETE /repos/{owner}/{repo}/environments/{environment_name}"
- ],
- deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"],
- deleteBranchProtection: [
- "DELETE /repos/{owner}/{repo}/branches/{branch}/protection"
- ],
- deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],
- deleteCommitSignatureProtection: [
- "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"
- ],
- deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"],
- deleteDeployment: [
- "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"
- ],
- deleteDeploymentBranchPolicy: [
- "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"
- ],
- deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"],
- deleteInvitation: [
- "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"
- ],
- deleteOrgRuleset: ["DELETE /orgs/{org}/rulesets/{ruleset_id}"],
- deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"],
- deletePullRequestReviewProtection: [
- "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"
- ],
- deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"],
- deleteReleaseAsset: [
- "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"
- ],
- deleteRepoRuleset: ["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"],
- deleteTagProtection: [
- "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}"
- ],
- deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],
- disableAutomatedSecurityFixes: [
- "DELETE /repos/{owner}/{repo}/automated-security-fixes"
- ],
- disableDeploymentProtectionRule: [
- "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"
- ],
- disablePrivateVulnerabilityReporting: [
- "DELETE /repos/{owner}/{repo}/private-vulnerability-reporting"
- ],
- disableVulnerabilityAlerts: [
- "DELETE /repos/{owner}/{repo}/vulnerability-alerts"
- ],
- downloadArchive: [
- "GET /repos/{owner}/{repo}/zipball/{ref}",
- {},
- { renamed: ["repos", "downloadZipballArchive"] }
- ],
- downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"],
- downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"],
- enableAutomatedSecurityFixes: [
- "PUT /repos/{owner}/{repo}/automated-security-fixes"
- ],
- enablePrivateVulnerabilityReporting: [
- "PUT /repos/{owner}/{repo}/private-vulnerability-reporting"
- ],
- enableVulnerabilityAlerts: [
- "PUT /repos/{owner}/{repo}/vulnerability-alerts"
- ],
- generateReleaseNotes: [
- "POST /repos/{owner}/{repo}/releases/generate-notes"
- ],
- get: ["GET /repos/{owner}/{repo}"],
- getAccessRestrictions: [
- "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"
- ],
- getAdminBranchProtection: [
- "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"
- ],
- getAllDeploymentProtectionRules: [
- "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"
- ],
- getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"],
- getAllStatusCheckContexts: [
- "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"
- ],
- getAllTopics: ["GET /repos/{owner}/{repo}/topics"],
- getAppsWithAccessToProtectedBranch: [
- "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"
- ],
- getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"],
- getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"],
- getBranchProtection: [
- "GET /repos/{owner}/{repo}/branches/{branch}/protection"
- ],
- getBranchRules: ["GET /repos/{owner}/{repo}/rules/branches/{branch}"],
- getClones: ["GET /repos/{owner}/{repo}/traffic/clones"],
- getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"],
- getCollaboratorPermissionLevel: [
- "GET /repos/{owner}/{repo}/collaborators/{username}/permission"
- ],
- getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"],
- getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"],
- getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"],
- getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"],
- getCommitSignatureProtection: [
- "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"
- ],
- getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"],
- getContent: ["GET /repos/{owner}/{repo}/contents/{path}"],
- getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"],
- getCustomDeploymentProtectionRule: [
- "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"
- ],
- getCustomPropertiesValues: ["GET /repos/{owner}/{repo}/properties/values"],
- getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"],
- getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],
- getDeploymentBranchPolicy: [
- "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"
- ],
- getDeploymentStatus: [
- "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"
- ],
- getEnvironment: [
- "GET /repos/{owner}/{repo}/environments/{environment_name}"
- ],
- getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"],
- getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"],
- getOrgRuleSuite: ["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"],
- getOrgRuleSuites: ["GET /orgs/{org}/rulesets/rule-suites"],
- getOrgRuleset: ["GET /orgs/{org}/rulesets/{ruleset_id}"],
- getOrgRulesets: ["GET /orgs/{org}/rulesets"],
- getPages: ["GET /repos/{owner}/{repo}/pages"],
- getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],
- getPagesDeployment: [
- "GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}"
- ],
- getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"],
- getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"],
- getPullRequestReviewProtection: [
- "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"
- ],
- getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"],
- getReadme: ["GET /repos/{owner}/{repo}/readme"],
- getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"],
- getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"],
- getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"],
- getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"],
- getRepoRuleSuite: [
- "GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"
- ],
- getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"],
- getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"],
- getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"],
- getStatusChecksProtection: [
- "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"
- ],
- getTeamsWithAccessToProtectedBranch: [
- "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"
- ],
- getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"],
- getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"],
- getUsersWithAccessToProtectedBranch: [
- "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"
- ],
- getViews: ["GET /repos/{owner}/{repo}/traffic/views"],
- getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"],
- getWebhookConfigForRepo: [
- "GET /repos/{owner}/{repo}/hooks/{hook_id}/config"
- ],
- getWebhookDelivery: [
- "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"
- ],
- listActivities: ["GET /repos/{owner}/{repo}/activity"],
- listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"],
- listBranches: ["GET /repos/{owner}/{repo}/branches"],
- listBranchesForHeadCommit: [
- "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"
- ],
- listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"],
- listCommentsForCommit: [
- "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"
- ],
- listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"],
- listCommitStatusesForRef: [
- "GET /repos/{owner}/{repo}/commits/{ref}/statuses"
- ],
- listCommits: ["GET /repos/{owner}/{repo}/commits"],
- listContributors: ["GET /repos/{owner}/{repo}/contributors"],
- listCustomDeploymentRuleIntegrations: [
- "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps"
- ],
- listDeployKeys: ["GET /repos/{owner}/{repo}/keys"],
- listDeploymentBranchPolicies: [
- "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"
- ],
- listDeploymentStatuses: [
- "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"
- ],
- listDeployments: ["GET /repos/{owner}/{repo}/deployments"],
- listForAuthenticatedUser: ["GET /user/repos"],
- listForOrg: ["GET /orgs/{org}/repos"],
- listForUser: ["GET /users/{username}/repos"],
- listForks: ["GET /repos/{owner}/{repo}/forks"],
- listInvitations: ["GET /repos/{owner}/{repo}/invitations"],
- listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"],
- listLanguages: ["GET /repos/{owner}/{repo}/languages"],
- listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"],
- listPublic: ["GET /repositories"],
- listPullRequestsAssociatedWithCommit: [
- "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"
- ],
- listReleaseAssets: [
- "GET /repos/{owner}/{repo}/releases/{release_id}/assets"
- ],
- listReleases: ["GET /repos/{owner}/{repo}/releases"],
- listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"],
- listTags: ["GET /repos/{owner}/{repo}/tags"],
- listTeams: ["GET /repos/{owner}/{repo}/teams"],
- listWebhookDeliveries: [
- "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"
- ],
- listWebhooks: ["GET /repos/{owner}/{repo}/hooks"],
- merge: ["POST /repos/{owner}/{repo}/merges"],
- mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"],
- pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],
- redeliverWebhookDelivery: [
- "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"
- ],
- removeAppAccessRestrictions: [
- "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
- {},
- { mapToData: "apps" }
- ],
- removeCollaborator: [
- "DELETE /repos/{owner}/{repo}/collaborators/{username}"
- ],
- removeStatusCheckContexts: [
- "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",
- {},
- { mapToData: "contexts" }
- ],
- removeStatusCheckProtection: [
- "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"
- ],
- removeTeamAccessRestrictions: [
- "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",
- {},
- { mapToData: "teams" }
- ],
- removeUserAccessRestrictions: [
- "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",
- {},
- { mapToData: "users" }
- ],
- renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"],
- replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"],
- requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"],
- setAdminBranchProtection: [
- "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"
- ],
- setAppAccessRestrictions: [
- "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
- {},
- { mapToData: "apps" }
- ],
- setStatusCheckContexts: [
- "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",
- {},
- { mapToData: "contexts" }
- ],
- setTeamAccessRestrictions: [
- "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",
- {},
- { mapToData: "teams" }
- ],
- setUserAccessRestrictions: [
- "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",
- {},
- { mapToData: "users" }
- ],
- testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],
- transfer: ["POST /repos/{owner}/{repo}/transfer"],
- update: ["PATCH /repos/{owner}/{repo}"],
- updateBranchProtection: [
- "PUT /repos/{owner}/{repo}/branches/{branch}/protection"
- ],
- updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],
- updateDeploymentBranchPolicy: [
- "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"
- ],
- updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"],
- updateInvitation: [
- "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"
- ],
- updateOrgRuleset: ["PUT /orgs/{org}/rulesets/{ruleset_id}"],
- updatePullRequestReviewProtection: [
- "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"
- ],
- updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"],
- updateReleaseAsset: [
- "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"
- ],
- updateRepoRuleset: ["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"],
- updateStatusCheckPotection: [
- "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks",
- {},
- { renamed: ["repos", "updateStatusCheckProtection"] }
- ],
- updateStatusCheckProtection: [
- "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"
- ],
- updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],
- updateWebhookConfigForRepo: [
- "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"
- ],
- uploadReleaseAsset: [
- "POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}",
- { baseUrl: "https://uploads.github.com" }
- ]
- },
- search: {
- code: ["GET /search/code"],
- commits: ["GET /search/commits"],
- issuesAndPullRequests: ["GET /search/issues"],
- labels: ["GET /search/labels"],
- repos: ["GET /search/repositories"],
- topics: ["GET /search/topics"],
- users: ["GET /search/users"]
- },
- secretScanning: {
- getAlert: [
- "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"
- ],
- listAlertsForEnterprise: [
- "GET /enterprises/{enterprise}/secret-scanning/alerts"
- ],
- listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"],
- listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"],
- listLocationsForAlert: [
- "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"
- ],
- updateAlert: [
- "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"
- ]
- },
- securityAdvisories: {
- createFork: [
- "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"
- ],
- createPrivateVulnerabilityReport: [
- "POST /repos/{owner}/{repo}/security-advisories/reports"
- ],
- createRepositoryAdvisory: [
- "POST /repos/{owner}/{repo}/security-advisories"
- ],
- createRepositoryAdvisoryCveRequest: [
- "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"
- ],
- getGlobalAdvisory: ["GET /advisories/{ghsa_id}"],
- getRepositoryAdvisory: [
- "GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}"
- ],
- listGlobalAdvisories: ["GET /advisories"],
- listOrgRepositoryAdvisories: ["GET /orgs/{org}/security-advisories"],
- listRepositoryAdvisories: ["GET /repos/{owner}/{repo}/security-advisories"],
- updateRepositoryAdvisory: [
- "PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}"
- ]
- },
- teams: {
- addOrUpdateMembershipForUserInOrg: [
- "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"
- ],
- addOrUpdateProjectPermissionsInOrg: [
- "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"
- ],
- addOrUpdateRepoPermissionsInOrg: [
- "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"
- ],
- checkPermissionsForProjectInOrg: [
- "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"
- ],
- checkPermissionsForRepoInOrg: [
- "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"
- ],
- create: ["POST /orgs/{org}/teams"],
- createDiscussionCommentInOrg: [
- "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"
- ],
- createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"],
- deleteDiscussionCommentInOrg: [
- "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"
- ],
- deleteDiscussionInOrg: [
- "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"
- ],
- deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"],
- getByName: ["GET /orgs/{org}/teams/{team_slug}"],
- getDiscussionCommentInOrg: [
- "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"
- ],
- getDiscussionInOrg: [
- "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"
- ],
- getMembershipForUserInOrg: [
- "GET /orgs/{org}/teams/{team_slug}/memberships/{username}"
- ],
- list: ["GET /orgs/{org}/teams"],
- listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"],
- listDiscussionCommentsInOrg: [
- "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"
- ],
- listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"],
- listForAuthenticatedUser: ["GET /user/teams"],
- listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"],
- listPendingInvitationsInOrg: [
- "GET /orgs/{org}/teams/{team_slug}/invitations"
- ],
- listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"],
- listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"],
- removeMembershipForUserInOrg: [
- "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"
- ],
- removeProjectInOrg: [
- "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"
- ],
- removeRepoInOrg: [
- "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"
- ],
- updateDiscussionCommentInOrg: [
- "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"
- ],
- updateDiscussionInOrg: [
- "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"
- ],
- updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"]
- },
- users: {
- addEmailForAuthenticated: [
- "POST /user/emails",
- {},
- { renamed: ["users", "addEmailForAuthenticatedUser"] }
- ],
- addEmailForAuthenticatedUser: ["POST /user/emails"],
- addSocialAccountForAuthenticatedUser: ["POST /user/social_accounts"],
- block: ["PUT /user/blocks/{username}"],
- checkBlocked: ["GET /user/blocks/{username}"],
- checkFollowingForUser: ["GET /users/{username}/following/{target_user}"],
- checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"],
- createGpgKeyForAuthenticated: [
- "POST /user/gpg_keys",
- {},
- { renamed: ["users", "createGpgKeyForAuthenticatedUser"] }
- ],
- createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"],
- createPublicSshKeyForAuthenticated: [
- "POST /user/keys",
- {},
- { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] }
- ],
- createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"],
- createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"],
- deleteEmailForAuthenticated: [
- "DELETE /user/emails",
- {},
- { renamed: ["users", "deleteEmailForAuthenticatedUser"] }
- ],
- deleteEmailForAuthenticatedUser: ["DELETE /user/emails"],
- deleteGpgKeyForAuthenticated: [
- "DELETE /user/gpg_keys/{gpg_key_id}",
- {},
- { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] }
- ],
- deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"],
- deletePublicSshKeyForAuthenticated: [
- "DELETE /user/keys/{key_id}",
- {},
- { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] }
- ],
- deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"],
- deleteSocialAccountForAuthenticatedUser: ["DELETE /user/social_accounts"],
- deleteSshSigningKeyForAuthenticatedUser: [
- "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}"
- ],
- follow: ["PUT /user/following/{username}"],
- getAuthenticated: ["GET /user"],
- getByUsername: ["GET /users/{username}"],
- getContextForUser: ["GET /users/{username}/hovercard"],
- getGpgKeyForAuthenticated: [
- "GET /user/gpg_keys/{gpg_key_id}",
- {},
- { renamed: ["users", "getGpgKeyForAuthenticatedUser"] }
- ],
- getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"],
- getPublicSshKeyForAuthenticated: [
- "GET /user/keys/{key_id}",
- {},
- { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] }
- ],
- getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"],
- getSshSigningKeyForAuthenticatedUser: [
- "GET /user/ssh_signing_keys/{ssh_signing_key_id}"
- ],
- list: ["GET /users"],
- listBlockedByAuthenticated: [
- "GET /user/blocks",
- {},
- { renamed: ["users", "listBlockedByAuthenticatedUser"] }
- ],
- listBlockedByAuthenticatedUser: ["GET /user/blocks"],
- listEmailsForAuthenticated: [
- "GET /user/emails",
- {},
- { renamed: ["users", "listEmailsForAuthenticatedUser"] }
- ],
- listEmailsForAuthenticatedUser: ["GET /user/emails"],
- listFollowedByAuthenticated: [
- "GET /user/following",
- {},
- { renamed: ["users", "listFollowedByAuthenticatedUser"] }
- ],
- listFollowedByAuthenticatedUser: ["GET /user/following"],
- listFollowersForAuthenticatedUser: ["GET /user/followers"],
- listFollowersForUser: ["GET /users/{username}/followers"],
- listFollowingForUser: ["GET /users/{username}/following"],
- listGpgKeysForAuthenticated: [
- "GET /user/gpg_keys",
- {},
- { renamed: ["users", "listGpgKeysForAuthenticatedUser"] }
- ],
- listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"],
- listGpgKeysForUser: ["GET /users/{username}/gpg_keys"],
- listPublicEmailsForAuthenticated: [
- "GET /user/public_emails",
- {},
- { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] }
- ],
- listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"],
- listPublicKeysForUser: ["GET /users/{username}/keys"],
- listPublicSshKeysForAuthenticated: [
- "GET /user/keys",
- {},
- { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] }
- ],
- listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"],
- listSocialAccountsForAuthenticatedUser: ["GET /user/social_accounts"],
- listSocialAccountsForUser: ["GET /users/{username}/social_accounts"],
- listSshSigningKeysForAuthenticatedUser: ["GET /user/ssh_signing_keys"],
- listSshSigningKeysForUser: ["GET /users/{username}/ssh_signing_keys"],
- setPrimaryEmailVisibilityForAuthenticated: [
- "PATCH /user/email/visibility",
- {},
- { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] }
- ],
- setPrimaryEmailVisibilityForAuthenticatedUser: [
- "PATCH /user/email/visibility"
- ],
- unblock: ["DELETE /user/blocks/{username}"],
- unfollow: ["DELETE /user/following/{username}"],
- updateAuthenticated: ["PATCH /user"]
- }
-};
-var endpoints_default = Endpoints;
-
-// pkg/dist-src/endpoints-to-methods.js
-var endpointMethodsMap = /* @__PURE__ */ new Map();
-for (const [scope, endpoints] of Object.entries(endpoints_default)) {
- for (const [methodName, endpoint] of Object.entries(endpoints)) {
- const [route, defaults, decorations] = endpoint;
- const [method, url] = route.split(/ /);
- const endpointDefaults = Object.assign(
- {
- method,
- url
- },
- defaults
- );
- if (!endpointMethodsMap.has(scope)) {
- endpointMethodsMap.set(scope, /* @__PURE__ */ new Map());
- }
- endpointMethodsMap.get(scope).set(methodName, {
- scope,
- methodName,
- endpointDefaults,
- decorations
- });
- }
-}
-var handler = {
- has({ scope }, methodName) {
- return endpointMethodsMap.get(scope).has(methodName);
- },
- getOwnPropertyDescriptor(target, methodName) {
- return {
- value: this.get(target, methodName),
- // ensures method is in the cache
- configurable: true,
- writable: true,
- enumerable: true
- };
- },
- defineProperty(target, methodName, descriptor) {
- Object.defineProperty(target.cache, methodName, descriptor);
- return true;
- },
- deleteProperty(target, methodName) {
- delete target.cache[methodName];
- return true;
- },
- ownKeys({ scope }) {
- return [...endpointMethodsMap.get(scope).keys()];
- },
- set(target, methodName, value) {
- return target.cache[methodName] = value;
- },
- get({ octokit, scope, cache }, methodName) {
- if (cache[methodName]) {
- return cache[methodName];
- }
- const method = endpointMethodsMap.get(scope).get(methodName);
- if (!method) {
- return void 0;
- }
- const { endpointDefaults, decorations } = method;
- if (decorations) {
- cache[methodName] = decorate(
- octokit,
- scope,
- methodName,
- endpointDefaults,
- decorations
- );
- } else {
- cache[methodName] = octokit.request.defaults(endpointDefaults);
- }
- return cache[methodName];
- }
-};
-function endpointsToMethods(octokit) {
- const newMethods = {};
- for (const scope of endpointMethodsMap.keys()) {
- newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler);
- }
- return newMethods;
-}
-function decorate(octokit, scope, methodName, defaults, decorations) {
- const requestWithDefaults = octokit.request.defaults(defaults);
- function withDecorations(...args) {
- let options = requestWithDefaults.endpoint.merge(...args);
- if (decorations.mapToData) {
- options = Object.assign({}, options, {
- data: options[decorations.mapToData],
- [decorations.mapToData]: void 0
- });
- return requestWithDefaults(options);
- }
- if (decorations.renamed) {
- const [newScope, newMethodName] = decorations.renamed;
- octokit.log.warn(
- `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`
- );
- }
- if (decorations.deprecated) {
- octokit.log.warn(decorations.deprecated);
- }
- if (decorations.renamedParameters) {
- const options2 = requestWithDefaults.endpoint.merge(...args);
- for (const [name, alias] of Object.entries(
- decorations.renamedParameters
- )) {
- if (name in options2) {
- octokit.log.warn(
- `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`
- );
- if (!(alias in options2)) {
- options2[alias] = options2[name];
- }
- delete options2[name];
- }
- }
- return requestWithDefaults(options2);
- }
- return requestWithDefaults(...args);
- }
- return Object.assign(withDecorations, requestWithDefaults);
-}
-
-// pkg/dist-src/index.js
-function restEndpointMethods(octokit) {
- const api = endpointsToMethods(octokit);
- return {
- rest: api
- };
-}
-restEndpointMethods.VERSION = VERSION;
-function legacyRestEndpointMethods(octokit) {
- const api = endpointsToMethods(octokit);
- return {
- ...api,
- rest: api
- };
-}
-legacyRestEndpointMethods.VERSION = VERSION;
-// Annotate the CommonJS export names for ESM import in node:
-0 && (0);
-
-
-/***/ }),
-
-/***/ 86298:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-
-function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
-var Bottleneck = _interopDefault(__nccwpck_require__(11174));
-
-// @ts-ignore
-async function errorRequest(octokit, state, error, options) {
- if (!error.request || !error.request.request) {
- // address https://github.com/octokit/plugin-retry.js/issues/8
- throw error;
- } // retry all >= 400 && not doNotRetry
-
-
- if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {
- const retries = options.request.retries != null ? options.request.retries : state.retries;
- const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);
- throw octokit.retry.retryRequest(error, retries, retryAfter);
- } // Maybe eventually there will be more cases here
-
-
- throw error;
-}
-
-// @ts-ignore
-
-async function wrapRequest(state, request, options) {
- const limiter = new Bottleneck(); // @ts-ignore
-
- limiter.on("failed", function (error, info) {
- const maxRetries = ~~error.request.request.retries;
- const after = ~~error.request.request.retryAfter;
- options.request.retryCount = info.retryCount + 1;
-
- if (maxRetries > info.retryCount) {
- // Returning a number instructs the limiter to retry
- // the request after that number of milliseconds have passed
- return after * state.retryAfterBaseValue;
- }
- });
- return limiter.schedule(request, options);
-}
-
-const VERSION = "3.0.9";
-function retry(octokit, octokitOptions) {
- const state = Object.assign({
- enabled: true,
- retryAfterBaseValue: 1000,
- doNotRetry: [400, 401, 403, 404, 422],
- retries: 3
- }, octokitOptions.retry);
-
- if (state.enabled) {
- octokit.hook.error("request", errorRequest.bind(null, octokit, state));
- octokit.hook.wrap("request", wrapRequest.bind(null, state));
- }
-
- return {
- retry: {
- retryRequest: (error, retries, retryAfter) => {
- error.request.request = Object.assign({}, error.request.request, {
- retries: retries,
- retryAfter: retryAfter
- });
- return error;
- }
- }
- };
-}
-retry.VERSION = VERSION;
-
-exports.VERSION = VERSION;
-exports.retry = retry;
-//# sourceMappingURL=index.js.map
-
-
-/***/ }),
-
-/***/ 10537:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-"use strict";
-
-var __create = Object.create;
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __getProtoOf = Object.getPrototypeOf;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
-};
-var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
-};
-var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
- // If the importer is in node compatibility mode or this is not an ESM
- // file that has been converted to a CommonJS file using a Babel-
- // compatible transform (i.e. "__esModule" has not been set), then set
- // "default" to the CommonJS "module.exports" for node compatibility.
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
- mod
-));
-var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
-
-// pkg/dist-src/index.js
-var dist_src_exports = {};
-__export(dist_src_exports, {
- RequestError: () => RequestError
-});
-module.exports = __toCommonJS(dist_src_exports);
-var import_deprecation = __nccwpck_require__(58932);
-var import_once = __toESM(__nccwpck_require__(1223));
-var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));
-var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));
-var RequestError = class extends Error {
- constructor(message, statusCode, options) {
- super(message);
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
- this.name = "HttpError";
- this.status = statusCode;
- let headers;
- if ("headers" in options && typeof options.headers !== "undefined") {
- headers = options.headers;
- }
- if ("response" in options) {
- this.response = options.response;
- headers = options.response.headers;
- }
- const requestCopy = Object.assign({}, options.request);
- if (options.request.headers.authorization) {
- requestCopy.headers = Object.assign({}, options.request.headers, {
- authorization: options.request.headers.authorization.replace(
- /(? {
-
-"use strict";
-
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
-};
-var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames(from))
- if (!__hasOwnProp.call(to, key) && key !== except)
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
-};
-var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
-
-// pkg/dist-src/index.js
-var dist_src_exports = {};
-__export(dist_src_exports, {
- request: () => request
-});
-module.exports = __toCommonJS(dist_src_exports);
-var import_endpoint = __nccwpck_require__(59440);
-var import_universal_user_agent = __nccwpck_require__(45030);
-
-// pkg/dist-src/version.js
-var VERSION = "8.4.1";
-
-// pkg/dist-src/is-plain-object.js
-function isPlainObject(value) {
- if (typeof value !== "object" || value === null)
- return false;
- if (Object.prototype.toString.call(value) !== "[object Object]")
- return false;
- const proto = Object.getPrototypeOf(value);
- if (proto === null)
- return true;
- const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
- return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
-}
-
-// pkg/dist-src/fetch-wrapper.js
-var import_request_error = __nccwpck_require__(10537);
-
-// pkg/dist-src/get-buffer-response.js
-function getBufferResponse(response) {
- return response.arrayBuffer();
-}
-
-// pkg/dist-src/fetch-wrapper.js
-function fetchWrapper(requestOptions) {
- var _a, _b, _c, _d;
- const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
- const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
- if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
- requestOptions.body = JSON.stringify(requestOptions.body);
- }
- let headers = {};
- let status;
- let url;
- let { fetch } = globalThis;
- if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {
- fetch = requestOptions.request.fetch;
- }
- if (!fetch) {
- throw new Error(
- "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
- );
- }
- return fetch(requestOptions.url, {
- method: requestOptions.method,
- body: requestOptions.body,
- redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,
- headers: requestOptions.headers,
- signal: (_d = requestOptions.request) == null ? void 0 : _d.signal,
- // duplex must be set if request.body is ReadableStream or Async Iterables.
- // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.
- ...requestOptions.body && { duplex: "half" }
- }).then(async (response) => {
- url = response.url;
- status = response.status;
- for (const keyAndValue of response.headers) {
- headers[keyAndValue[0]] = keyAndValue[1];
- }
- if ("deprecation" in headers) {
- const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/);
- const deprecationLink = matches && matches.pop();
- log.warn(
- `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
- );
- }
- if (status === 204 || status === 205) {
- return;
- }
- if (requestOptions.method === "HEAD") {
- if (status < 400) {
- return;
- }
- throw new import_request_error.RequestError(response.statusText, status, {
- response: {
- url,
- status,
- headers,
- data: void 0
- },
- request: requestOptions
- });
- }
- if (status === 304) {
- throw new import_request_error.RequestError("Not modified", status, {
- response: {
- url,
- status,
- headers,
- data: await getResponseData(response)
- },
- request: requestOptions
- });
- }
- if (status >= 400) {
- const data = await getResponseData(response);
- const error = new import_request_error.RequestError(toErrorMessage(data), status, {
- response: {
- url,
- status,
- headers,
- data
- },
- request: requestOptions
- });
- throw error;
- }
- return parseSuccessResponseBody ? await getResponseData(response) : response.body;
- }).then((data) => {
- return {
- status,
- url,
- headers,
- data
- };
- }).catch((error) => {
- if (error instanceof import_request_error.RequestError)
- throw error;
- else if (error.name === "AbortError")
- throw error;
- let message = error.message;
- if (error.name === "TypeError" && "cause" in error) {
- if (error.cause instanceof Error) {
- message = error.cause.message;
- } else if (typeof error.cause === "string") {
- message = error.cause;
- }
- }
- throw new import_request_error.RequestError(message, 500, {
- request: requestOptions
- });
- });
-}
-async function getResponseData(response) {
- const contentType = response.headers.get("content-type");
- if (/application\/json/.test(contentType)) {
- return response.json().catch(() => response.text()).catch(() => "");
- }
- if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
- return response.text();
- }
- return getBufferResponse(response);
-}
-function toErrorMessage(data) {
- if (typeof data === "string")
- return data;
- let suffix;
- if ("documentation_url" in data) {
- suffix = ` - ${data.documentation_url}`;
- } else {
- suffix = "";
- }
- if ("message" in data) {
- if (Array.isArray(data.errors)) {
- return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`;
- }
- return `${data.message}${suffix}`;
- }
- return `Unknown error: ${JSON.stringify(data)}`;
-}
-
-// pkg/dist-src/with-defaults.js
-function withDefaults(oldEndpoint, newDefaults) {
- const endpoint2 = oldEndpoint.defaults(newDefaults);
- const newApi = function(route, parameters) {
- const endpointOptions = endpoint2.merge(route, parameters);
- if (!endpointOptions.request || !endpointOptions.request.hook) {
- return fetchWrapper(endpoint2.parse(endpointOptions));
- }
- const request2 = (route2, parameters2) => {
- return fetchWrapper(
- endpoint2.parse(endpoint2.merge(route2, parameters2))
- );
- };
- Object.assign(request2, {
- endpoint: endpoint2,
- defaults: withDefaults.bind(null, endpoint2)
- });
- return endpointOptions.request.hook(request2, endpointOptions);
- };
- return Object.assign(newApi, {
- endpoint: endpoint2,
- defaults: withDefaults.bind(null, endpoint2)
- });
-}
-
-// pkg/dist-src/index.js
-var request = withDefaults(import_endpoint.endpoint, {
- headers: {
- "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
- }
-});
-// Annotate the CommonJS export names for ESM import in node:
-0 && (0);
-
-
-/***/ }),
-
-/***/ 29912:
-/***/ (function(__unused_webpack_module, exports) {
-
-"use strict";
-
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ClientStreamingCall = void 0;
-/**
- * A client streaming RPC call. This means that the clients sends 0, 1, or
- * more messages to the server, and the server replies with exactly one
- * message.
- */
-class ClientStreamingCall {
- constructor(method, requestHeaders, request, headers, response, status, trailers) {
- this.method = method;
- this.requestHeaders = requestHeaders;
- this.requests = request;
- this.headers = headers;
- this.response = response;
- this.status = status;
- this.trailers = trailers;
- }
- /**
- * Instead of awaiting the response status and trailers, you can
- * just as well await this call itself to receive the server outcome.
- * Note that it may still be valid to send more request messages.
- */
- then(onfulfilled, onrejected) {
- return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));
- }
- promiseFinished() {
- return __awaiter(this, void 0, void 0, function* () {
- let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
- return {
- method: this.method,
- requestHeaders: this.requestHeaders,
- headers,
- response,
- status,
- trailers
- };
- });
- }
-}
-exports.ClientStreamingCall = ClientStreamingCall;
-
-
-/***/ }),
-
-/***/ 85702:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.Deferred = exports.DeferredState = void 0;
-var DeferredState;
-(function (DeferredState) {
- DeferredState[DeferredState["PENDING"] = 0] = "PENDING";
- DeferredState[DeferredState["REJECTED"] = 1] = "REJECTED";
- DeferredState[DeferredState["RESOLVED"] = 2] = "RESOLVED";
-})(DeferredState = exports.DeferredState || (exports.DeferredState = {}));
-/**
- * A deferred promise. This is a "controller" for a promise, which lets you
- * pass a promise around and reject or resolve it from the outside.
- *
- * Warning: This class is to be used with care. Using it can make code very
- * difficult to read. It is intended for use in library code that exposes
- * promises, not for regular business logic.
- */
-class Deferred {
- /**
- * @param preventUnhandledRejectionWarning - prevents the warning
- * "Unhandled Promise rejection" by adding a noop rejection handler.
- * Working with calls returned from the runtime-rpc package in an
- * async function usually means awaiting one call property after
- * the other. This means that the "status" is not being awaited when
- * an earlier await for the "headers" is rejected. This causes the
- * "unhandled promise reject" warning. A more correct behaviour for
- * calls might be to become aware whether at least one of the
- * promises is handled and swallow the rejection warning for the
- * others.
- */
- constructor(preventUnhandledRejectionWarning = true) {
- this._state = DeferredState.PENDING;
- this._promise = new Promise((resolve, reject) => {
- this._resolve = resolve;
- this._reject = reject;
- });
- if (preventUnhandledRejectionWarning) {
- this._promise.catch(_ => { });
- }
- }
- /**
- * Get the current state of the promise.
- */
- get state() {
- return this._state;
- }
- /**
- * Get the deferred promise.
- */
- get promise() {
- return this._promise;
- }
- /**
- * Resolve the promise. Throws if the promise is already resolved or rejected.
- */
- resolve(value) {
- if (this.state !== DeferredState.PENDING)
- throw new Error(`cannot resolve ${DeferredState[this.state].toLowerCase()}`);
- this._resolve(value);
- this._state = DeferredState.RESOLVED;
- }
- /**
- * Reject the promise. Throws if the promise is already resolved or rejected.
- */
- reject(reason) {
- if (this.state !== DeferredState.PENDING)
- throw new Error(`cannot reject ${DeferredState[this.state].toLowerCase()}`);
- this._reject(reason);
- this._state = DeferredState.REJECTED;
- }
- /**
- * Resolve the promise. Ignore if not pending.
- */
- resolvePending(val) {
- if (this._state === DeferredState.PENDING)
- this.resolve(val);
- }
- /**
- * Reject the promise. Ignore if not pending.
- */
- rejectPending(reason) {
- if (this._state === DeferredState.PENDING)
- this.reject(reason);
- }
-}
-exports.Deferred = Deferred;
-
-
-/***/ }),
-
-/***/ 17042:
-/***/ (function(__unused_webpack_module, exports) {
-
-"use strict";
-
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.DuplexStreamingCall = void 0;
-/**
- * A duplex streaming RPC call. This means that the clients sends an
- * arbitrary amount of messages to the server, while at the same time,
- * the server sends an arbitrary amount of messages to the client.
- */
-class DuplexStreamingCall {
- constructor(method, requestHeaders, request, headers, response, status, trailers) {
- this.method = method;
- this.requestHeaders = requestHeaders;
- this.requests = request;
- this.headers = headers;
- this.responses = response;
- this.status = status;
- this.trailers = trailers;
- }
- /**
- * Instead of awaiting the response status and trailers, you can
- * just as well await this call itself to receive the server outcome.
- * Note that it may still be valid to send more request messages.
- */
- then(onfulfilled, onrejected) {
- return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));
- }
- promiseFinished() {
- return __awaiter(this, void 0, void 0, function* () {
- let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]);
- return {
- method: this.method,
- requestHeaders: this.requestHeaders,
- headers,
- status,
- trailers,
- };
- });
- }
-}
-exports.DuplexStreamingCall = DuplexStreamingCall;
-
-
-/***/ }),
-
-/***/ 60012:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-// Public API of the rpc runtime.
-// Note: we do not use `export * from ...` to help tree shakers,
-// webpack verbose output hints that this should be useful
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-var service_type_1 = __nccwpck_require__(14107);
-Object.defineProperty(exports, "ServiceType", ({ enumerable: true, get: function () { return service_type_1.ServiceType; } }));
-var reflection_info_1 = __nccwpck_require__(44331);
-Object.defineProperty(exports, "readMethodOptions", ({ enumerable: true, get: function () { return reflection_info_1.readMethodOptions; } }));
-Object.defineProperty(exports, "readMethodOption", ({ enumerable: true, get: function () { return reflection_info_1.readMethodOption; } }));
-Object.defineProperty(exports, "readServiceOption", ({ enumerable: true, get: function () { return reflection_info_1.readServiceOption; } }));
-var rpc_error_1 = __nccwpck_require__(63159);
-Object.defineProperty(exports, "RpcError", ({ enumerable: true, get: function () { return rpc_error_1.RpcError; } }));
-var rpc_options_1 = __nccwpck_require__(67386);
-Object.defineProperty(exports, "mergeRpcOptions", ({ enumerable: true, get: function () { return rpc_options_1.mergeRpcOptions; } }));
-var rpc_output_stream_1 = __nccwpck_require__(76637);
-Object.defineProperty(exports, "RpcOutputStreamController", ({ enumerable: true, get: function () { return rpc_output_stream_1.RpcOutputStreamController; } }));
-var test_transport_1 = __nccwpck_require__(87008);
-Object.defineProperty(exports, "TestTransport", ({ enumerable: true, get: function () { return test_transport_1.TestTransport; } }));
-var deferred_1 = __nccwpck_require__(85702);
-Object.defineProperty(exports, "Deferred", ({ enumerable: true, get: function () { return deferred_1.Deferred; } }));
-Object.defineProperty(exports, "DeferredState", ({ enumerable: true, get: function () { return deferred_1.DeferredState; } }));
-var duplex_streaming_call_1 = __nccwpck_require__(17042);
-Object.defineProperty(exports, "DuplexStreamingCall", ({ enumerable: true, get: function () { return duplex_streaming_call_1.DuplexStreamingCall; } }));
-var client_streaming_call_1 = __nccwpck_require__(29912);
-Object.defineProperty(exports, "ClientStreamingCall", ({ enumerable: true, get: function () { return client_streaming_call_1.ClientStreamingCall; } }));
-var server_streaming_call_1 = __nccwpck_require__(30066);
-Object.defineProperty(exports, "ServerStreamingCall", ({ enumerable: true, get: function () { return server_streaming_call_1.ServerStreamingCall; } }));
-var unary_call_1 = __nccwpck_require__(84175);
-Object.defineProperty(exports, "UnaryCall", ({ enumerable: true, get: function () { return unary_call_1.UnaryCall; } }));
-var rpc_interceptor_1 = __nccwpck_require__(51680);
-Object.defineProperty(exports, "stackIntercept", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackIntercept; } }));
-Object.defineProperty(exports, "stackDuplexStreamingInterceptors", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackDuplexStreamingInterceptors; } }));
-Object.defineProperty(exports, "stackClientStreamingInterceptors", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackClientStreamingInterceptors; } }));
-Object.defineProperty(exports, "stackServerStreamingInterceptors", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackServerStreamingInterceptors; } }));
-Object.defineProperty(exports, "stackUnaryInterceptors", ({ enumerable: true, get: function () { return rpc_interceptor_1.stackUnaryInterceptors; } }));
-var server_call_context_1 = __nccwpck_require__(25320);
-Object.defineProperty(exports, "ServerCallContextController", ({ enumerable: true, get: function () { return server_call_context_1.ServerCallContextController; } }));
-
-
-/***/ }),
-
-/***/ 44331:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.readServiceOption = exports.readMethodOption = exports.readMethodOptions = exports.normalizeMethodInfo = void 0;
-const runtime_1 = __nccwpck_require__(4061);
-/**
- * Turns PartialMethodInfo into MethodInfo.
- */
-function normalizeMethodInfo(method, service) {
- var _a, _b, _c;
- let m = method;
- m.service = service;
- m.localName = (_a = m.localName) !== null && _a !== void 0 ? _a : runtime_1.lowerCamelCase(m.name);
- // noinspection PointlessBooleanExpressionJS
- m.serverStreaming = !!m.serverStreaming;
- // noinspection PointlessBooleanExpressionJS
- m.clientStreaming = !!m.clientStreaming;
- m.options = (_b = m.options) !== null && _b !== void 0 ? _b : {};
- m.idempotency = (_c = m.idempotency) !== null && _c !== void 0 ? _c : undefined;
- return m;
-}
-exports.normalizeMethodInfo = normalizeMethodInfo;
-/**
- * Read custom method options from a generated service client.
- *
- * @deprecated use readMethodOption()
- */
-function readMethodOptions(service, methodName, extensionName, extensionType) {
- var _a;
- const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options;
- return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : undefined;
-}
-exports.readMethodOptions = readMethodOptions;
-function readMethodOption(service, methodName, extensionName, extensionType) {
- var _a;
- const options = (_a = service.methods.find((m, i) => m.localName === methodName || i === methodName)) === null || _a === void 0 ? void 0 : _a.options;
- if (!options) {
- return undefined;
- }
- const optionVal = options[extensionName];
- if (optionVal === undefined) {
- return optionVal;
- }
- return extensionType ? extensionType.fromJson(optionVal) : optionVal;
-}
-exports.readMethodOption = readMethodOption;
-function readServiceOption(service, extensionName, extensionType) {
- const options = service.options;
- if (!options) {
- return undefined;
- }
- const optionVal = options[extensionName];
- if (optionVal === undefined) {
- return optionVal;
- }
- return extensionType ? extensionType.fromJson(optionVal) : optionVal;
-}
-exports.readServiceOption = readServiceOption;
-
-
-/***/ }),
-
-/***/ 63159:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.RpcError = void 0;
-/**
- * An error that occurred while calling a RPC method.
- */
-class RpcError extends Error {
- constructor(message, code = 'UNKNOWN', meta) {
- super(message);
- this.name = 'RpcError';
- // see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#example
- Object.setPrototypeOf(this, new.target.prototype);
- this.code = code;
- this.meta = meta !== null && meta !== void 0 ? meta : {};
- }
- toString() {
- const l = [this.name + ': ' + this.message];
- if (this.code) {
- l.push('');
- l.push('Code: ' + this.code);
- }
- if (this.serviceName && this.methodName) {
- l.push('Method: ' + this.serviceName + '/' + this.methodName);
- }
- let m = Object.entries(this.meta);
- if (m.length) {
- l.push('');
- l.push('Meta:');
- for (let [k, v] of m) {
- l.push(` ${k}: ${v}`);
- }
- }
- return l.join('\n');
- }
-}
-exports.RpcError = RpcError;
-
-
-/***/ }),
-
-/***/ 51680:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.stackDuplexStreamingInterceptors = exports.stackClientStreamingInterceptors = exports.stackServerStreamingInterceptors = exports.stackUnaryInterceptors = exports.stackIntercept = void 0;
-const runtime_1 = __nccwpck_require__(4061);
-/**
- * Creates a "stack" of of all interceptors specified in the given `RpcOptions`.
- * Used by generated client implementations.
- * @internal
- */
-function stackIntercept(kind, transport, method, options, input) {
- var _a, _b, _c, _d;
- if (kind == "unary") {
- let tail = (mtd, inp, opt) => transport.unary(mtd, inp, opt);
- for (const curr of ((_a = options.interceptors) !== null && _a !== void 0 ? _a : []).filter(i => i.interceptUnary).reverse()) {
- const next = tail;
- tail = (mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt);
- }
- return tail(method, input, options);
- }
- if (kind == "serverStreaming") {
- let tail = (mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt);
- for (const curr of ((_b = options.interceptors) !== null && _b !== void 0 ? _b : []).filter(i => i.interceptServerStreaming).reverse()) {
- const next = tail;
- tail = (mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt);
- }
- return tail(method, input, options);
- }
- if (kind == "clientStreaming") {
- let tail = (mtd, opt) => transport.clientStreaming(mtd, opt);
- for (const curr of ((_c = options.interceptors) !== null && _c !== void 0 ? _c : []).filter(i => i.interceptClientStreaming).reverse()) {
- const next = tail;
- tail = (mtd, opt) => curr.interceptClientStreaming(next, mtd, opt);
- }
- return tail(method, options);
- }
- if (kind == "duplex") {
- let tail = (mtd, opt) => transport.duplex(mtd, opt);
- for (const curr of ((_d = options.interceptors) !== null && _d !== void 0 ? _d : []).filter(i => i.interceptDuplex).reverse()) {
- const next = tail;
- tail = (mtd, opt) => curr.interceptDuplex(next, mtd, opt);
- }
- return tail(method, options);
- }
- runtime_1.assertNever(kind);
-}
-exports.stackIntercept = stackIntercept;
-/**
- * @deprecated replaced by `stackIntercept()`, still here to support older generated code
- */
-function stackUnaryInterceptors(transport, method, input, options) {
- return stackIntercept("unary", transport, method, options, input);
-}
-exports.stackUnaryInterceptors = stackUnaryInterceptors;
-/**
- * @deprecated replaced by `stackIntercept()`, still here to support older generated code
- */
-function stackServerStreamingInterceptors(transport, method, input, options) {
- return stackIntercept("serverStreaming", transport, method, options, input);
-}
-exports.stackServerStreamingInterceptors = stackServerStreamingInterceptors;
-/**
- * @deprecated replaced by `stackIntercept()`, still here to support older generated code
- */
-function stackClientStreamingInterceptors(transport, method, options) {
- return stackIntercept("clientStreaming", transport, method, options);
-}
-exports.stackClientStreamingInterceptors = stackClientStreamingInterceptors;
-/**
- * @deprecated replaced by `stackIntercept()`, still here to support older generated code
- */
-function stackDuplexStreamingInterceptors(transport, method, options) {
- return stackIntercept("duplex", transport, method, options);
-}
-exports.stackDuplexStreamingInterceptors = stackDuplexStreamingInterceptors;
-
-
-/***/ }),
-
-/***/ 67386:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.mergeRpcOptions = void 0;
-const runtime_1 = __nccwpck_require__(4061);
-/**
- * Merges custom RPC options with defaults. Returns a new instance and keeps
- * the "defaults" and the "options" unmodified.
- *
- * Merges `RpcMetadata` "meta", overwriting values from "defaults" with
- * values from "options". Does not append values to existing entries.
- *
- * Merges "jsonOptions", including "jsonOptions.typeRegistry", by creating
- * a new array that contains types from "options.jsonOptions.typeRegistry"
- * first, then types from "defaults.jsonOptions.typeRegistry".
- *
- * Merges "binaryOptions".
- *
- * Merges "interceptors" by creating a new array that contains interceptors
- * from "defaults" first, then interceptors from "options".
- *
- * Works with objects that extend `RpcOptions`, but only if the added
- * properties are of type Date, primitive like string, boolean, or Array
- * of primitives. If you have other property types, you have to merge them
- * yourself.
- */
-function mergeRpcOptions(defaults, options) {
- if (!options)
- return defaults;
- let o = {};
- copy(defaults, o);
- copy(options, o);
- for (let key of Object.keys(options)) {
- let val = options[key];
- switch (key) {
- case "jsonOptions":
- o.jsonOptions = runtime_1.mergeJsonOptions(defaults.jsonOptions, o.jsonOptions);
- break;
- case "binaryOptions":
- o.binaryOptions = runtime_1.mergeBinaryOptions(defaults.binaryOptions, o.binaryOptions);
- break;
- case "meta":
- o.meta = {};
- copy(defaults.meta, o.meta);
- copy(options.meta, o.meta);
- break;
- case "interceptors":
- o.interceptors = defaults.interceptors ? defaults.interceptors.concat(val) : val.concat();
- break;
- }
- }
- return o;
-}
-exports.mergeRpcOptions = mergeRpcOptions;
-function copy(a, into) {
- if (!a)
- return;
- let c = into;
- for (let [k, v] of Object.entries(a)) {
- if (v instanceof Date)
- c[k] = new Date(v.getTime());
- else if (Array.isArray(v))
- c[k] = v.concat();
- else
- c[k] = v;
- }
-}
-
-
-/***/ }),
-
-/***/ 76637:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.RpcOutputStreamController = void 0;
-const deferred_1 = __nccwpck_require__(85702);
-const runtime_1 = __nccwpck_require__(4061);
-/**
- * A `RpcOutputStream` that you control.
- */
-class RpcOutputStreamController {
- constructor() {
- this._lis = {
- nxt: [],
- msg: [],
- err: [],
- cmp: [],
- };
- this._closed = false;
- // --- RpcOutputStream async iterator API
- // iterator state.
- // is undefined when no iterator has been acquired yet.
- this._itState = { q: [] };
- }
- // --- RpcOutputStream callback API
- onNext(callback) {
- return this.addLis(callback, this._lis.nxt);
- }
- onMessage(callback) {
- return this.addLis(callback, this._lis.msg);
- }
- onError(callback) {
- return this.addLis(callback, this._lis.err);
- }
- onComplete(callback) {
- return this.addLis(callback, this._lis.cmp);
- }
- addLis(callback, list) {
- list.push(callback);
- return () => {
- let i = list.indexOf(callback);
- if (i >= 0)
- list.splice(i, 1);
- };
- }
- // remove all listeners
- clearLis() {
- for (let l of Object.values(this._lis))
- l.splice(0, l.length);
- }
- // --- Controller API
- /**
- * Is this stream already closed by a completion or error?
- */
- get closed() {
- return this._closed !== false;
- }
- /**
- * Emit message, close with error, or close successfully, but only one
- * at a time.
- * Can be used to wrap a stream by using the other stream's `onNext`.
- */
- notifyNext(message, error, complete) {
- runtime_1.assert((message ? 1 : 0) + (error ? 1 : 0) + (complete ? 1 : 0) <= 1, 'only one emission at a time');
- if (message)
- this.notifyMessage(message);
- if (error)
- this.notifyError(error);
- if (complete)
- this.notifyComplete();
- }
- /**
- * Emits a new message. Throws if stream is closed.
- *
- * Triggers onNext and onMessage callbacks.
- */
- notifyMessage(message) {
- runtime_1.assert(!this.closed, 'stream is closed');
- this.pushIt({ value: message, done: false });
- this._lis.msg.forEach(l => l(message));
- this._lis.nxt.forEach(l => l(message, undefined, false));
- }
- /**
- * Closes the stream with an error. Throws if stream is closed.
- *
- * Triggers onNext and onError callbacks.
- */
- notifyError(error) {
- runtime_1.assert(!this.closed, 'stream is closed');
- this._closed = error;
- this.pushIt(error);
- this._lis.err.forEach(l => l(error));
- this._lis.nxt.forEach(l => l(undefined, error, false));
- this.clearLis();
- }
- /**
- * Closes the stream successfully. Throws if stream is closed.
- *
- * Triggers onNext and onComplete callbacks.
- */
- notifyComplete() {
- runtime_1.assert(!this.closed, 'stream is closed');
- this._closed = true;
- this.pushIt({ value: null, done: true });
- this._lis.cmp.forEach(l => l());
- this._lis.nxt.forEach(l => l(undefined, undefined, true));
- this.clearLis();
- }
- /**
- * Creates an async iterator (that can be used with `for await {...}`)
- * to consume the stream.
- *
- * Some things to note:
- * - If an error occurs, the `for await` will throw it.
- * - If an error occurred before the `for await` was started, `for await`
- * will re-throw it.
- * - If the stream is already complete, the `for await` will be empty.
- * - If your `for await` consumes slower than the stream produces,
- * for example because you are relaying messages in a slow operation,
- * messages are queued.
- */
- [Symbol.asyncIterator]() {
- // if we are closed, we are definitely not receiving any more messages.
- // but we can't let the iterator get stuck. we want to either:
- // a) finish the new iterator immediately, because we are completed
- // b) reject the new iterator, because we errored
- if (this._closed === true)
- this.pushIt({ value: null, done: true });
- else if (this._closed !== false)
- this.pushIt(this._closed);
- // the async iterator
- return {
- next: () => {
- let state = this._itState;
- runtime_1.assert(state, "bad state"); // if we don't have a state here, code is broken
- // there should be no pending result.
- // did the consumer call next() before we resolved our previous result promise?
- runtime_1.assert(!state.p, "iterator contract broken");
- // did we produce faster than the iterator consumed?
- // return the oldest result from the queue.
- let first = state.q.shift();
- if (first)
- return ("value" in first) ? Promise.resolve(first) : Promise.reject(first);
- // we have no result ATM, but we promise one.
- // as soon as we have a result, we must resolve promise.
- state.p = new deferred_1.Deferred();
- return state.p.promise;
- },
- };
- }
- // "push" a new iterator result.
- // this either resolves a pending promise, or enqueues the result.
- pushIt(result) {
- let state = this._itState;
- // is the consumer waiting for us?
- if (state.p) {
- // yes, consumer is waiting for this promise.
- const p = state.p;
- runtime_1.assert(p.state == deferred_1.DeferredState.PENDING, "iterator contract broken");
- // resolve the promise
- ("value" in result) ? p.resolve(result) : p.reject(result);
- // must cleanup, otherwise iterator.next() would pick it up again.
- delete state.p;
- }
- else {
- // we are producing faster than the iterator consumes.
- // push result onto queue.
- state.q.push(result);
- }
- }
-}
-exports.RpcOutputStreamController = RpcOutputStreamController;
-
-
-/***/ }),
-
-/***/ 25320:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ServerCallContextController = void 0;
-class ServerCallContextController {
- constructor(method, headers, deadline, sendResponseHeadersFn, defaultStatus = { code: 'OK', detail: '' }) {
- this._cancelled = false;
- this._listeners = [];
- this.method = method;
- this.headers = headers;
- this.deadline = deadline;
- this.trailers = {};
- this._sendRH = sendResponseHeadersFn;
- this.status = defaultStatus;
- }
- /**
- * Set the call cancelled.
- *
- * Invokes all callbacks registered with onCancel() and
- * sets `cancelled = true`.
- */
- notifyCancelled() {
- if (!this._cancelled) {
- this._cancelled = true;
- for (let l of this._listeners) {
- l();
- }
- }
- }
- /**
- * Send response headers.
- */
- sendResponseHeaders(data) {
- this._sendRH(data);
- }
- /**
- * Is the call cancelled?
- *
- * When the client closes the connection before the server
- * is done, the call is cancelled.
- *
- * If you want to cancel a request on the server, throw a
- * RpcError with the CANCELLED status code.
- */
- get cancelled() {
- return this._cancelled;
- }
- /**
- * Add a callback for cancellation.
- */
- onCancel(callback) {
- const l = this._listeners;
- l.push(callback);
- return () => {
- let i = l.indexOf(callback);
- if (i >= 0)
- l.splice(i, 1);
- };
- }
-}
-exports.ServerCallContextController = ServerCallContextController;
-
-
-/***/ }),
-
-/***/ 30066:
-/***/ (function(__unused_webpack_module, exports) {
-
-"use strict";
-
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ServerStreamingCall = void 0;
-/**
- * A server streaming RPC call. The client provides exactly one input message
- * but the server may respond with 0, 1, or more messages.
- */
-class ServerStreamingCall {
- constructor(method, requestHeaders, request, headers, response, status, trailers) {
- this.method = method;
- this.requestHeaders = requestHeaders;
- this.request = request;
- this.headers = headers;
- this.responses = response;
- this.status = status;
- this.trailers = trailers;
- }
- /**
- * Instead of awaiting the response status and trailers, you can
- * just as well await this call itself to receive the server outcome.
- * You should first setup some listeners to the `request` to
- * see the actual messages the server replied with.
- */
- then(onfulfilled, onrejected) {
- return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));
- }
- promiseFinished() {
- return __awaiter(this, void 0, void 0, function* () {
- let [headers, status, trailers] = yield Promise.all([this.headers, this.status, this.trailers]);
- return {
- method: this.method,
- requestHeaders: this.requestHeaders,
- request: this.request,
- headers,
- status,
- trailers,
- };
- });
- }
-}
-exports.ServerStreamingCall = ServerStreamingCall;
-
-
-/***/ }),
-
-/***/ 14107:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ServiceType = void 0;
-const reflection_info_1 = __nccwpck_require__(44331);
-class ServiceType {
- constructor(typeName, methods, options) {
- this.typeName = typeName;
- this.methods = methods.map(i => reflection_info_1.normalizeMethodInfo(i, this));
- this.options = options !== null && options !== void 0 ? options : {};
- }
-}
-exports.ServiceType = ServiceType;
-
-
-/***/ }),
-
-/***/ 87008:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
-
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.TestTransport = void 0;
-const rpc_error_1 = __nccwpck_require__(63159);
-const runtime_1 = __nccwpck_require__(4061);
-const rpc_output_stream_1 = __nccwpck_require__(76637);
-const rpc_options_1 = __nccwpck_require__(67386);
-const unary_call_1 = __nccwpck_require__(84175);
-const server_streaming_call_1 = __nccwpck_require__(30066);
-const client_streaming_call_1 = __nccwpck_require__(29912);
-const duplex_streaming_call_1 = __nccwpck_require__(17042);
-/**
- * Transport for testing.
- */
-class TestTransport {
- /**
- * Initialize with mock data. Omitted fields have default value.
- */
- constructor(data) {
- /**
- * Suppress warning / error about uncaught rejections of
- * "status" and "trailers".
- */
- this.suppressUncaughtRejections = true;
- this.headerDelay = 10;
- this.responseDelay = 50;
- this.betweenResponseDelay = 10;
- this.afterResponseDelay = 10;
- this.data = data !== null && data !== void 0 ? data : {};
- }
- /**
- * Sent message(s) during the last operation.
- */
- get sentMessages() {
- if (this.lastInput instanceof TestInputStream) {
- return this.lastInput.sent;
- }
- else if (typeof this.lastInput == "object") {
- return [this.lastInput.single];
- }
- return [];
- }
- /**
- * Sending message(s) completed?
- */
- get sendComplete() {
- if (this.lastInput instanceof TestInputStream) {
- return this.lastInput.completed;
- }
- else if (typeof this.lastInput == "object") {
- return true;
- }
- return false;
- }
- // Creates a promise for response headers from the mock data.
- promiseHeaders() {
- var _a;
- const headers = (_a = this.data.headers) !== null && _a !== void 0 ? _a : TestTransport.defaultHeaders;
- return headers instanceof rpc_error_1.RpcError
- ? Promise.reject(headers)
- : Promise.resolve(headers);
- }
- // Creates a promise for a single, valid, message from the mock data.
- promiseSingleResponse(method) {
- if (this.data.response instanceof rpc_error_1.RpcError) {
- return Promise.reject(this.data.response);
- }
- let r;
- if (Array.isArray(this.data.response)) {
- runtime_1.assert(this.data.response.length > 0);
- r = this.data.response[0];
- }
- else if (this.data.response !== undefined) {
- r = this.data.response;
- }
- else {
- r = method.O.create();
- }
- runtime_1.assert(method.O.is(r));
- return Promise.resolve(r);
- }
- /**
- * Pushes response messages from the mock data to the output stream.
- * If an error response, status or trailers are mocked, the stream is
- * closed with the respective error.
- * Otherwise, stream is completed successfully.
- *
- * The returned promise resolves when the stream is closed. It should
- * not reject. If it does, code is broken.
- */
- streamResponses(method, stream, abort) {
- return __awaiter(this, void 0, void 0, function* () {
- // normalize "data.response" into an array of valid output messages
- const messages = [];
- if (this.data.response === undefined) {
- messages.push(method.O.create());
- }
- else if (Array.isArray(this.data.response)) {
- for (let msg of this.data.response) {
- runtime_1.assert(method.O.is(msg));
- messages.push(msg);
- }
- }
- else if (!(this.data.response instanceof rpc_error_1.RpcError)) {
- runtime_1.assert(method.O.is(this.data.response));
- messages.push(this.data.response);
- }
- // start the stream with an initial delay.
- // if the request is cancelled, notify() error and exit.
- try {
- yield delay(this.responseDelay, abort)(undefined);
- }
- catch (error) {
- stream.notifyError(error);
- return;
- }
- // if error response was mocked, notify() error (stream is now closed with error) and exit.
- if (this.data.response instanceof rpc_error_1.RpcError) {
- stream.notifyError(this.data.response);
- return;
- }
- // regular response messages were mocked. notify() them.
- for (let msg of messages) {
- stream.notifyMessage(msg);
- // add a short delay between responses
- // if the request is cancelled, notify() error and exit.
- try {
- yield delay(this.betweenResponseDelay, abort)(undefined);
- }
- catch (error) {
- stream.notifyError(error);
- return;
- }
- }
- // error status was mocked, notify() error (stream is now closed with error) and exit.
- if (this.data.status instanceof rpc_error_1.RpcError) {
- stream.notifyError(this.data.status);
- return;
- }
- // error trailers were mocked, notify() error (stream is now closed with error) and exit.
- if (this.data.trailers instanceof rpc_error_1.RpcError) {
- stream.notifyError(this.data.trailers);
- return;
- }
- // stream completed successfully
- stream.notifyComplete();
- });
- }
- // Creates a promise for response status from the mock data.
- promiseStatus() {
- var _a;
- const status = (_a = this.data.status) !== null && _a !== void 0 ? _a : TestTransport.defaultStatus;
- return status instanceof rpc_error_1.RpcError
- ? Promise.reject(status)
- : Promise.resolve(status);
- }
- // Creates a promise for response trailers from the mock data.
- promiseTrailers() {
- var _a;
- const trailers = (_a = this.data.trailers) !== null && _a !== void 0 ? _a : TestTransport.defaultTrailers;
- return trailers instanceof rpc_error_1.RpcError
- ? Promise.reject(trailers)
- : Promise.resolve(trailers);
- }
- maybeSuppressUncaught(...promise) {
- if (this.suppressUncaughtRejections) {
- for (let p of promise) {
- p.catch(() => {
- });
- }
- }
- }
- mergeOptions(options) {
- return rpc_options_1.mergeRpcOptions({}, options);
- }
- unary(method, input, options) {
- var _a;
- const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()
- .then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise
- .catch(_ => {
- })
- .then(delay(this.responseDelay, options.abort))
- .then(_ => this.promiseSingleResponse(method)), statusPromise = responsePromise
- .catch(_ => {
- })
- .then(delay(this.afterResponseDelay, options.abort))
- .then(_ => this.promiseStatus()), trailersPromise = responsePromise
- .catch(_ => {
- })
- .then(delay(this.afterResponseDelay, options.abort))
- .then(_ => this.promiseTrailers());
- this.maybeSuppressUncaught(statusPromise, trailersPromise);
- this.lastInput = { single: input };
- return new unary_call_1.UnaryCall(method, requestHeaders, input, headersPromise, responsePromise, statusPromise, trailersPromise);
- }
- serverStreaming(method, input, options) {
- var _a;
- const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()
- .then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise
- .then(delay(this.responseDelay, options.abort))
- .catch(() => {
- })
- .then(() => this.streamResponses(method, outputStream, options.abort))
- .then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise
- .then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise
- .then(() => this.promiseTrailers());
- this.maybeSuppressUncaught(statusPromise, trailersPromise);
- this.lastInput = { single: input };
- return new server_streaming_call_1.ServerStreamingCall(method, requestHeaders, input, headersPromise, outputStream, statusPromise, trailersPromise);
- }
- clientStreaming(method, options) {
- var _a;
- const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()
- .then(delay(this.headerDelay, options.abort)), responsePromise = headersPromise
- .catch(_ => {
- })
- .then(delay(this.responseDelay, options.abort))
- .then(_ => this.promiseSingleResponse(method)), statusPromise = responsePromise
- .catch(_ => {
- })
- .then(delay(this.afterResponseDelay, options.abort))
- .then(_ => this.promiseStatus()), trailersPromise = responsePromise
- .catch(_ => {
- })
- .then(delay(this.afterResponseDelay, options.abort))
- .then(_ => this.promiseTrailers());
- this.maybeSuppressUncaught(statusPromise, trailersPromise);
- this.lastInput = new TestInputStream(this.data, options.abort);
- return new client_streaming_call_1.ClientStreamingCall(method, requestHeaders, this.lastInput, headersPromise, responsePromise, statusPromise, trailersPromise);
- }
- duplex(method, options) {
- var _a;
- const requestHeaders = (_a = options.meta) !== null && _a !== void 0 ? _a : {}, headersPromise = this.promiseHeaders()
- .then(delay(this.headerDelay, options.abort)), outputStream = new rpc_output_stream_1.RpcOutputStreamController(), responseStreamClosedPromise = headersPromise
- .then(delay(this.responseDelay, options.abort))
- .catch(() => {
- })
- .then(() => this.streamResponses(method, outputStream, options.abort))
- .then(delay(this.afterResponseDelay, options.abort)), statusPromise = responseStreamClosedPromise
- .then(() => this.promiseStatus()), trailersPromise = responseStreamClosedPromise
- .then(() => this.promiseTrailers());
- this.maybeSuppressUncaught(statusPromise, trailersPromise);
- this.lastInput = new TestInputStream(this.data, options.abort);
- return new duplex_streaming_call_1.DuplexStreamingCall(method, requestHeaders, this.lastInput, headersPromise, outputStream, statusPromise, trailersPromise);
- }
-}
-exports.TestTransport = TestTransport;
-TestTransport.defaultHeaders = {
- responseHeader: "test"
-};
-TestTransport.defaultStatus = {
- code: "OK", detail: "all good"
-};
-TestTransport.defaultTrailers = {
- responseTrailer: "test"
-};
-function delay(ms, abort) {
- return (v) => new Promise((resolve, reject) => {
- if (abort === null || abort === void 0 ? void 0 : abort.aborted) {
- reject(new rpc_error_1.RpcError("user cancel", "CANCELLED"));
- }
- else {
- const id = setTimeout(() => resolve(v), ms);
- if (abort) {
- abort.addEventListener("abort", ev => {
- clearTimeout(id);
- reject(new rpc_error_1.RpcError("user cancel", "CANCELLED"));
- });
- }
- }
- });
-}
-class TestInputStream {
- constructor(data, abort) {
- this._completed = false;
- this._sent = [];
- this.data = data;
- this.abort = abort;
- }
- get sent() {
- return this._sent;
- }
- get completed() {
- return this._completed;
- }
- send(message) {
- if (this.data.inputMessage instanceof rpc_error_1.RpcError) {
- return Promise.reject(this.data.inputMessage);
- }
- const delayMs = this.data.inputMessage === undefined
- ? 10
- : this.data.inputMessage;
- return Promise.resolve(undefined)
- .then(() => {
- this._sent.push(message);
- })
- .then(delay(delayMs, this.abort));
- }
- complete() {
- if (this.data.inputComplete instanceof rpc_error_1.RpcError) {
- return Promise.reject(this.data.inputComplete);
- }
- const delayMs = this.data.inputComplete === undefined
- ? 10
- : this.data.inputComplete;
- return Promise.resolve(undefined)
- .then(() => {
- this._completed = true;
- })
- .then(delay(delayMs, this.abort));
- }
-}
-
-
-/***/ }),
-
-/***/ 84175:
-/***/ (function(__unused_webpack_module, exports) {
-
-"use strict";
-
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.UnaryCall = void 0;
-/**
- * A unary RPC call. Unary means there is exactly one input message and
- * exactly one output message unless an error occurred.
- */
-class UnaryCall {
- constructor(method, requestHeaders, request, headers, response, status, trailers) {
- this.method = method;
- this.requestHeaders = requestHeaders;
- this.request = request;
- this.headers = headers;
- this.response = response;
- this.status = status;
- this.trailers = trailers;
- }
- /**
- * If you are only interested in the final outcome of this call,
- * you can await it to receive a `FinishedUnaryCall`.
- */
- then(onfulfilled, onrejected) {
- return this.promiseFinished().then(value => onfulfilled ? Promise.resolve(onfulfilled(value)) : value, reason => onrejected ? Promise.resolve(onrejected(reason)) : Promise.reject(reason));
- }
- promiseFinished() {
- return __awaiter(this, void 0, void 0, function* () {
- let [headers, response, status, trailers] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
- return {
- method: this.method,
- requestHeaders: this.requestHeaders,
- request: this.request,
- headers,
- response,
- status,
- trailers
- };
- });
- }
-}
-exports.UnaryCall = UnaryCall;
-
-
-/***/ }),
-
-/***/ 54253:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.assertFloat32 = exports.assertUInt32 = exports.assertInt32 = exports.assertNever = exports.assert = void 0;
-/**
- * assert that condition is true or throw error (with message)
- */
-function assert(condition, msg) {
- if (!condition) {
- throw new Error(msg);
- }
-}
-exports.assert = assert;
-/**
- * assert that value cannot exist = type `never`. throw runtime error if it does.
- */
-function assertNever(value, msg) {
- throw new Error(msg !== null && msg !== void 0 ? msg : 'Unexpected object: ' + value);
-}
-exports.assertNever = assertNever;
-const FLOAT32_MAX = 3.4028234663852886e+38, FLOAT32_MIN = -3.4028234663852886e+38, UINT32_MAX = 0xFFFFFFFF, INT32_MAX = 0X7FFFFFFF, INT32_MIN = -0X80000000;
-function assertInt32(arg) {
- if (typeof arg !== "number")
- throw new Error('invalid int 32: ' + typeof arg);
- if (!Number.isInteger(arg) || arg > INT32_MAX || arg < INT32_MIN)
- throw new Error('invalid int 32: ' + arg);
-}
-exports.assertInt32 = assertInt32;
-function assertUInt32(arg) {
- if (typeof arg !== "number")
- throw new Error('invalid uint 32: ' + typeof arg);
- if (!Number.isInteger(arg) || arg > UINT32_MAX || arg < 0)
- throw new Error('invalid uint 32: ' + arg);
-}
-exports.assertUInt32 = assertUInt32;
-function assertFloat32(arg) {
- if (typeof arg !== "number")
- throw new Error('invalid float 32: ' + typeof arg);
- if (!Number.isFinite(arg))
- return;
- if (arg > FLOAT32_MAX || arg < FLOAT32_MIN)
- throw new Error('invalid float 32: ' + arg);
-}
-exports.assertFloat32 = assertFloat32;
-
-
-/***/ }),
-
-/***/ 20196:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.base64encode = exports.base64decode = void 0;
-// lookup table from base64 character to byte
-let encTable = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
-// lookup table from base64 character *code* to byte because lookup by number is fast
-let decTable = [];
-for (let i = 0; i < encTable.length; i++)
- decTable[encTable[i].charCodeAt(0)] = i;
-// support base64url variants
-decTable["-".charCodeAt(0)] = encTable.indexOf("+");
-decTable["_".charCodeAt(0)] = encTable.indexOf("/");
-/**
- * Decodes a base64 string to a byte array.
- *
- * - ignores white-space, including line breaks and tabs
- * - allows inner padding (can decode concatenated base64 strings)
- * - does not require padding
- * - understands base64url encoding:
- * "-" instead of "+",
- * "_" instead of "/",
- * no padding
- */
-function base64decode(base64Str) {
- // estimate byte size, not accounting for inner padding and whitespace
- let es = base64Str.length * 3 / 4;
- // if (es % 3 !== 0)
- // throw new Error('invalid base64 string');
- if (base64Str[base64Str.length - 2] == '=')
- es -= 2;
- else if (base64Str[base64Str.length - 1] == '=')
- es -= 1;
- let bytes = new Uint8Array(es), bytePos = 0, // position in byte array
- groupPos = 0, // position in base64 group
- b, // current byte
- p = 0 // previous byte
- ;
- for (let i = 0; i < base64Str.length; i++) {
- b = decTable[base64Str.charCodeAt(i)];
- if (b === undefined) {
- // noinspection FallThroughInSwitchStatementJS
- switch (base64Str[i]) {
- case '=':
- groupPos = 0; // reset state when padding found
- case '\n':
- case '\r':
- case '\t':
- case ' ':
- continue; // skip white-space, and padding
- default:
- throw Error(`invalid base64 string.`);
- }
- }
- switch (groupPos) {
- case 0:
- p = b;
- groupPos = 1;
- break;
- case 1:
- bytes[bytePos++] = p << 2 | (b & 48) >> 4;
- p = b;
- groupPos = 2;
- break;
- case 2:
- bytes[bytePos++] = (p & 15) << 4 | (b & 60) >> 2;
- p = b;
- groupPos = 3;
- break;
- case 3:
- bytes[bytePos++] = (p & 3) << 6 | b;
- groupPos = 0;
- break;
- }
- }
- if (groupPos == 1)
- throw Error(`invalid base64 string.`);
- return bytes.subarray(0, bytePos);
-}
-exports.base64decode = base64decode;
-/**
- * Encodes a byte array to a base64 string.
- * Adds padding at the end.
- * Does not insert newlines.
- */
-function base64encode(bytes) {
- let base64 = '', groupPos = 0, // position in base64 group
- b, // current byte
- p = 0; // carry over from previous byte
- for (let i = 0; i < bytes.length; i++) {
- b = bytes[i];
- switch (groupPos) {
- case 0:
- base64 += encTable[b >> 2];
- p = (b & 3) << 4;
- groupPos = 1;
- break;
- case 1:
- base64 += encTable[p | b >> 4];
- p = (b & 15) << 2;
- groupPos = 2;
- break;
- case 2:
- base64 += encTable[p | b >> 6];
- base64 += encTable[b & 63];
- groupPos = 0;
- break;
- }
- }
- // padding required?
- if (groupPos) {
- base64 += encTable[p];
- base64 += '=';
- if (groupPos == 1)
- base64 += '=';
- }
- return base64;
-}
-exports.base64encode = base64encode;
-
-
-/***/ }),
-
-/***/ 84921:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.WireType = exports.mergeBinaryOptions = exports.UnknownFieldHandler = void 0;
-/**
- * This handler implements the default behaviour for unknown fields.
- * When reading data, unknown fields are stored on the message, in a
- * symbol property.
- * When writing data, the symbol property is queried and unknown fields
- * are serialized into the output again.
- */
-var UnknownFieldHandler;
-(function (UnknownFieldHandler) {
- /**
- * The symbol used to store unknown fields for a message.
- * The property must conform to `UnknownFieldContainer`.
- */
- UnknownFieldHandler.symbol = Symbol.for("protobuf-ts/unknown");
- /**
- * Store an unknown field during binary read directly on the message.
- * This method is compatible with `BinaryReadOptions.readUnknownField`.
- */
- UnknownFieldHandler.onRead = (typeName, message, fieldNo, wireType, data) => {
- let container = is(message) ? message[UnknownFieldHandler.symbol] : message[UnknownFieldHandler.symbol] = [];
- container.push({ no: fieldNo, wireType, data });
- };
- /**
- * Write unknown fields stored for the message to the writer.
- * This method is compatible with `BinaryWriteOptions.writeUnknownFields`.
- */
- UnknownFieldHandler.onWrite = (typeName, message, writer) => {
- for (let { no, wireType, data } of UnknownFieldHandler.list(message))
- writer.tag(no, wireType).raw(data);
- };
- /**
- * List unknown fields stored for the message.
- * Note that there may be multiples fields with the same number.
- */
- UnknownFieldHandler.list = (message, fieldNo) => {
- if (is(message)) {
- let all = message[UnknownFieldHandler.symbol];
- return fieldNo ? all.filter(uf => uf.no == fieldNo) : all;
- }
- return [];
- };
- /**
- * Returns the last unknown field by field number.
- */
- UnknownFieldHandler.last = (message, fieldNo) => UnknownFieldHandler.list(message, fieldNo).slice(-1)[0];
- const is = (message) => message && Array.isArray(message[UnknownFieldHandler.symbol]);
-})(UnknownFieldHandler = exports.UnknownFieldHandler || (exports.UnknownFieldHandler = {}));
-/**
- * Merges binary write or read options. Later values override earlier values.
- */
-function mergeBinaryOptions(a, b) {
- return Object.assign(Object.assign({}, a), b);
-}
-exports.mergeBinaryOptions = mergeBinaryOptions;
-/**
- * Protobuf binary format wire types.
- *
- * A wire type provides just enough information to find the length of the
- * following value.
- *
- * See https://developers.google.com/protocol-buffers/docs/encoding#structure
- */
-var WireType;
-(function (WireType) {
- /**
- * Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum
- */
- WireType[WireType["Varint"] = 0] = "Varint";
- /**
- * Used for fixed64, sfixed64, double.
- * Always 8 bytes with little-endian byte order.
- */
- WireType[WireType["Bit64"] = 1] = "Bit64";
- /**
- * Used for string, bytes, embedded messages, packed repeated fields
- *
- * Only repeated numeric types (types which use the varint, 32-bit,
- * or 64-bit wire types) can be packed. In proto3, such fields are
- * packed by default.
- */
- WireType[WireType["LengthDelimited"] = 2] = "LengthDelimited";
- /**
- * Used for groups
- * @deprecated
- */
- WireType[WireType["StartGroup"] = 3] = "StartGroup";
- /**
- * Used for groups
- * @deprecated
- */
- WireType[WireType["EndGroup"] = 4] = "EndGroup";
- /**
- * Used for fixed32, sfixed32, float.
- * Always 4 bytes with little-endian byte order.
- */
- WireType[WireType["Bit32"] = 5] = "Bit32";
-})(WireType = exports.WireType || (exports.WireType = {}));
-
-
-/***/ }),
-
-/***/ 65210:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.BinaryReader = exports.binaryReadOptions = void 0;
-const binary_format_contract_1 = __nccwpck_require__(84921);
-const pb_long_1 = __nccwpck_require__(47777);
-const goog_varint_1 = __nccwpck_require__(30433);
-const defaultsRead = {
- readUnknownField: true,
- readerFactory: bytes => new BinaryReader(bytes),
-};
-/**
- * Make options for reading binary data form partial options.
- */
-function binaryReadOptions(options) {
- return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead;
-}
-exports.binaryReadOptions = binaryReadOptions;
-class BinaryReader {
- constructor(buf, textDecoder) {
- this.varint64 = goog_varint_1.varint64read; // dirty cast for `this`
- /**
- * Read a `uint32` field, an unsigned 32 bit varint.
- */
- this.uint32 = goog_varint_1.varint32read; // dirty cast for `this` and access to protected `buf`
- this.buf = buf;
- this.len = buf.length;
- this.pos = 0;
- this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);
- this.textDecoder = textDecoder !== null && textDecoder !== void 0 ? textDecoder : new TextDecoder("utf-8", {
- fatal: true,
- ignoreBOM: true,
- });
- }
- /**
- * Reads a tag - field number and wire type.
- */
- tag() {
- let tag = this.uint32(), fieldNo = tag >>> 3, wireType = tag & 7;
- if (fieldNo <= 0 || wireType < 0 || wireType > 5)
- throw new Error("illegal tag: field no " + fieldNo + " wire type " + wireType);
- return [fieldNo, wireType];
- }
- /**
- * Skip one element on the wire and return the skipped data.
- * Supports WireType.StartGroup since v2.0.0-alpha.23.
- */
- skip(wireType) {
- let start = this.pos;
- // noinspection FallThroughInSwitchStatementJS
- switch (wireType) {
- case binary_format_contract_1.WireType.Varint:
- while (this.buf[this.pos++] & 0x80) {
- // ignore
- }
- break;
- case binary_format_contract_1.WireType.Bit64:
- this.pos += 4;
- case binary_format_contract_1.WireType.Bit32:
- this.pos += 4;
- break;
- case binary_format_contract_1.WireType.LengthDelimited:
- let len = this.uint32();
- this.pos += len;
- break;
- case binary_format_contract_1.WireType.StartGroup:
- // From descriptor.proto: Group type is deprecated, not supported in proto3.
- // But we must still be able to parse and treat as unknown.
- let t;
- while ((t = this.tag()[1]) !== binary_format_contract_1.WireType.EndGroup) {
- this.skip(t);
- }
- break;
- default:
- throw new Error("cant skip wire type " + wireType);
- }
- this.assertBounds();
- return this.buf.subarray(start, this.pos);
- }
- /**
- * Throws error if position in byte array is out of range.
- */
- assertBounds() {
- if (this.pos > this.len)
- throw new RangeError("premature EOF");
- }
- /**
- * Read a `int32` field, a signed 32 bit varint.
- */
- int32() {
- return this.uint32() | 0;
- }
- /**
- * Read a `sint32` field, a signed, zigzag-encoded 32-bit varint.
- */
- sint32() {
- let zze = this.uint32();
- // decode zigzag
- return (zze >>> 1) ^ -(zze & 1);
- }
- /**
- * Read a `int64` field, a signed 64-bit varint.
- */
- int64() {
- return new pb_long_1.PbLong(...this.varint64());
- }
- /**
- * Read a `uint64` field, an unsigned 64-bit varint.
- */
- uint64() {
- return new pb_long_1.PbULong(...this.varint64());
- }
- /**
- * Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.
- */
- sint64() {
- let [lo, hi] = this.varint64();
- // decode zig zag
- let s = -(lo & 1);
- lo = ((lo >>> 1 | (hi & 1) << 31) ^ s);
- hi = (hi >>> 1 ^ s);
- return new pb_long_1.PbLong(lo, hi);
- }
- /**
- * Read a `bool` field, a variant.
- */
- bool() {
- let [lo, hi] = this.varint64();
- return lo !== 0 || hi !== 0;
- }
- /**
- * Read a `fixed32` field, an unsigned, fixed-length 32-bit integer.
- */
- fixed32() {
- return this.view.getUint32((this.pos += 4) - 4, true);
- }
- /**
- * Read a `sfixed32` field, a signed, fixed-length 32-bit integer.
- */
- sfixed32() {
- return this.view.getInt32((this.pos += 4) - 4, true);
- }
- /**
- * Read a `fixed64` field, an unsigned, fixed-length 64 bit integer.
- */
- fixed64() {
- return new pb_long_1.PbULong(this.sfixed32(), this.sfixed32());
- }
- /**
- * Read a `fixed64` field, a signed, fixed-length 64-bit integer.
- */
- sfixed64() {
- return new pb_long_1.PbLong(this.sfixed32(), this.sfixed32());
- }
- /**
- * Read a `float` field, 32-bit floating point number.
- */
- float() {
- return this.view.getFloat32((this.pos += 4) - 4, true);
- }
- /**
- * Read a `double` field, a 64-bit floating point number.
- */
- double() {
- return this.view.getFloat64((this.pos += 8) - 8, true);
- }
- /**
- * Read a `bytes` field, length-delimited arbitrary data.
- */
- bytes() {
- let len = this.uint32();
- let start = this.pos;
- this.pos += len;
- this.assertBounds();
- return this.buf.subarray(start, start + len);
- }
- /**
- * Read a `string` field, length-delimited data converted to UTF-8 text.
- */
- string() {
- return this.textDecoder.decode(this.bytes());
- }
-}
-exports.BinaryReader = BinaryReader;
-
-
-/***/ }),
-
-/***/ 44354:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.BinaryWriter = exports.binaryWriteOptions = void 0;
-const pb_long_1 = __nccwpck_require__(47777);
-const goog_varint_1 = __nccwpck_require__(30433);
-const assert_1 = __nccwpck_require__(54253);
-const defaultsWrite = {
- writeUnknownFields: true,
- writerFactory: () => new BinaryWriter(),
-};
-/**
- * Make options for writing binary data form partial options.
- */
-function binaryWriteOptions(options) {
- return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite;
-}
-exports.binaryWriteOptions = binaryWriteOptions;
-class BinaryWriter {
- constructor(textEncoder) {
- /**
- * Previous fork states.
- */
- this.stack = [];
- this.textEncoder = textEncoder !== null && textEncoder !== void 0 ? textEncoder : new TextEncoder();
- this.chunks = [];
- this.buf = [];
- }
- /**
- * Return all bytes written and reset this writer.
- */
- finish() {
- this.chunks.push(new Uint8Array(this.buf)); // flush the buffer
- let len = 0;
- for (let i = 0; i < this.chunks.length; i++)
- len += this.chunks[i].length;
- let bytes = new Uint8Array(len);
- let offset = 0;
- for (let i = 0; i < this.chunks.length; i++) {
- bytes.set(this.chunks[i], offset);
- offset += this.chunks[i].length;
- }
- this.chunks = [];
- return bytes;
- }
- /**
- * Start a new fork for length-delimited data like a message
- * or a packed repeated field.
- *
- * Must be joined later with `join()`.
- */
- fork() {
- this.stack.push({ chunks: this.chunks, buf: this.buf });
- this.chunks = [];
- this.buf = [];
- return this;
- }
- /**
- * Join the last fork. Write its length and bytes, then
- * return to the previous state.
- */
- join() {
- // get chunk of fork
- let chunk = this.finish();
- // restore previous state
- let prev = this.stack.pop();
- if (!prev)
- throw new Error('invalid state, fork stack empty');
- this.chunks = prev.chunks;
- this.buf = prev.buf;
- // write length of chunk as varint
- this.uint32(chunk.byteLength);
- return this.raw(chunk);
- }
- /**
- * Writes a tag (field number and wire type).
- *
- * Equivalent to `uint32( (fieldNo << 3 | type) >>> 0 )`.
- *
- * Generated code should compute the tag ahead of time and call `uint32()`.
- */
- tag(fieldNo, type) {
- return this.uint32((fieldNo << 3 | type) >>> 0);
- }
- /**
- * Write a chunk of raw bytes.
- */
- raw(chunk) {
- if (this.buf.length) {
- this.chunks.push(new Uint8Array(this.buf));
- this.buf = [];
- }
- this.chunks.push(chunk);
- return this;
- }
- /**
- * Write a `uint32` value, an unsigned 32 bit varint.
- */
- uint32(value) {
- assert_1.assertUInt32(value);
- // write value as varint 32, inlined for speed
- while (value > 0x7f) {
- this.buf.push((value & 0x7f) | 0x80);
- value = value >>> 7;
- }
- this.buf.push(value);
- return this;
- }
- /**
- * Write a `int32` value, a signed 32 bit varint.
- */
- int32(value) {
- assert_1.assertInt32(value);
- goog_varint_1.varint32write(value, this.buf);
- return this;
- }
- /**
- * Write a `bool` value, a variant.
- */
- bool(value) {
- this.buf.push(value ? 1 : 0);
- return this;
- }
- /**
- * Write a `bytes` value, length-delimited arbitrary data.
- */
- bytes(value) {
- this.uint32(value.byteLength); // write length of chunk as varint
- return this.raw(value);
- }
- /**
- * Write a `string` value, length-delimited data converted to UTF-8 text.
- */
- string(value) {
- let chunk = this.textEncoder.encode(value);
- this.uint32(chunk.byteLength); // write length of chunk as varint
- return this.raw(chunk);
- }
- /**
- * Write a `float` value, 32-bit floating point number.
- */
- float(value) {
- assert_1.assertFloat32(value);
- let chunk = new Uint8Array(4);
- new DataView(chunk.buffer).setFloat32(0, value, true);
- return this.raw(chunk);
- }
- /**
- * Write a `double` value, a 64-bit floating point number.
- */
- double(value) {
- let chunk = new Uint8Array(8);
- new DataView(chunk.buffer).setFloat64(0, value, true);
- return this.raw(chunk);
- }
- /**
- * Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
- */
- fixed32(value) {
- assert_1.assertUInt32(value);
- let chunk = new Uint8Array(4);
- new DataView(chunk.buffer).setUint32(0, value, true);
- return this.raw(chunk);
- }
- /**
- * Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
- */
- sfixed32(value) {
- assert_1.assertInt32(value);
- let chunk = new Uint8Array(4);
- new DataView(chunk.buffer).setInt32(0, value, true);
- return this.raw(chunk);
- }
- /**
- * Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
- */
- sint32(value) {
- assert_1.assertInt32(value);
- // zigzag encode
- value = ((value << 1) ^ (value >> 31)) >>> 0;
- goog_varint_1.varint32write(value, this.buf);
- return this;
- }
- /**
- * Write a `fixed64` value, a signed, fixed-length 64-bit integer.
- */
- sfixed64(value) {
- let chunk = new Uint8Array(8);
- let view = new DataView(chunk.buffer);
- let long = pb_long_1.PbLong.from(value);
- view.setInt32(0, long.lo, true);
- view.setInt32(4, long.hi, true);
- return this.raw(chunk);
- }
- /**
- * Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.
- */
- fixed64(value) {
- let chunk = new Uint8Array(8);
- let view = new DataView(chunk.buffer);
- let long = pb_long_1.PbULong.from(value);
- view.setInt32(0, long.lo, true);
- view.setInt32(4, long.hi, true);
- return this.raw(chunk);
- }
- /**
- * Write a `int64` value, a signed 64-bit varint.
- */
- int64(value) {
- let long = pb_long_1.PbLong.from(value);
- goog_varint_1.varint64write(long.lo, long.hi, this.buf);
- return this;
- }
- /**
- * Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
- */
- sint64(value) {
- let long = pb_long_1.PbLong.from(value),
- // zigzag encode
- sign = long.hi >> 31, lo = (long.lo << 1) ^ sign, hi = ((long.hi << 1) | (long.lo >>> 31)) ^ sign;
- goog_varint_1.varint64write(lo, hi, this.buf);
- return this;
- }
- /**
- * Write a `uint64` value, an unsigned 64-bit varint.
- */
- uint64(value) {
- let long = pb_long_1.PbULong.from(value);
- goog_varint_1.varint64write(long.lo, long.hi, this.buf);
- return this;
- }
-}
-exports.BinaryWriter = BinaryWriter;
-
-
-/***/ }),
-
-/***/ 20085:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.listEnumNumbers = exports.listEnumNames = exports.listEnumValues = exports.isEnumObject = void 0;
-/**
- * Is this a lookup object generated by Typescript, for a Typescript enum
- * generated by protobuf-ts?
- *
- * - No `const enum` (enum must not be inlined, we need reverse mapping).
- * - No string enum (we need int32 for protobuf).
- * - Must have a value for 0 (otherwise, we would need to support custom default values).
- */
-function isEnumObject(arg) {
- if (typeof arg != 'object' || arg === null) {
- return false;
- }
- if (!arg.hasOwnProperty(0)) {
- return false;
- }
- for (let k of Object.keys(arg)) {
- let num = parseInt(k);
- if (!Number.isNaN(num)) {
- // is there a name for the number?
- let nam = arg[num];
- if (nam === undefined)
- return false;
- // does the name resolve back to the number?
- if (arg[nam] !== num)
- return false;
- }
- else {
- // is there a number for the name?
- let num = arg[k];
- if (num === undefined)
- return false;
- // is it a string enum?
- if (typeof num !== 'number')
- return false;
- // do we know the number?
- if (arg[num] === undefined)
- return false;
- }
- }
- return true;
-}
-exports.isEnumObject = isEnumObject;
-/**
- * Lists all values of a Typescript enum, as an array of objects with a "name"
- * property and a "number" property.
- *
- * Note that it is possible that a number appears more than once, because it is
- * possible to have aliases in an enum.
- *
- * Throws if the enum does not adhere to the rules of enums generated by
- * protobuf-ts. See `isEnumObject()`.
- */
-function listEnumValues(enumObject) {
- if (!isEnumObject(enumObject))
- throw new Error("not a typescript enum object");
- let values = [];
- for (let [name, number] of Object.entries(enumObject))
- if (typeof number == "number")
- values.push({ name, number });
- return values;
-}
-exports.listEnumValues = listEnumValues;
-/**
- * Lists the names of a Typescript enum.
- *
- * Throws if the enum does not adhere to the rules of enums generated by
- * protobuf-ts. See `isEnumObject()`.
- */
-function listEnumNames(enumObject) {
- return listEnumValues(enumObject).map(val => val.name);
-}
-exports.listEnumNames = listEnumNames;
-/**
- * Lists the numbers of a Typescript enum.
- *
- * Throws if the enum does not adhere to the rules of enums generated by
- * protobuf-ts. See `isEnumObject()`.
- */
-function listEnumNumbers(enumObject) {
- return listEnumValues(enumObject)
- .map(val => val.number)
- .filter((num, index, arr) => arr.indexOf(num) == index);
-}
-exports.listEnumNumbers = listEnumNumbers;
-
-
-/***/ }),
-
-/***/ 30433:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-// Copyright 2008 Google Inc. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Code generated by the Protocol Buffer compiler is owned by the owner
-// of the input file used when generating it. This code is not
-// standalone and requires a support library to be linked with it. This
-// support library is itself covered by the above license.
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.varint32read = exports.varint32write = exports.int64toString = exports.int64fromString = exports.varint64write = exports.varint64read = void 0;
-/**
- * Read a 64 bit varint as two JS numbers.
- *
- * Returns tuple:
- * [0]: low bits
- * [0]: high bits
- *
- * Copyright 2008 Google Inc. All rights reserved.
- *
- * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L175
- */
-function varint64read() {
- let lowBits = 0;
- let highBits = 0;
- for (let shift = 0; shift < 28; shift += 7) {
- let b = this.buf[this.pos++];
- lowBits |= (b & 0x7F) << shift;
- if ((b & 0x80) == 0) {
- this.assertBounds();
- return [lowBits, highBits];
- }
- }
- let middleByte = this.buf[this.pos++];
- // last four bits of the first 32 bit number
- lowBits |= (middleByte & 0x0F) << 28;
- // 3 upper bits are part of the next 32 bit number
- highBits = (middleByte & 0x70) >> 4;
- if ((middleByte & 0x80) == 0) {
- this.assertBounds();
- return [lowBits, highBits];
- }
- for (let shift = 3; shift <= 31; shift += 7) {
- let b = this.buf[this.pos++];
- highBits |= (b & 0x7F) << shift;
- if ((b & 0x80) == 0) {
- this.assertBounds();
- return [lowBits, highBits];
- }
- }
- throw new Error('invalid varint');
-}
-exports.varint64read = varint64read;
-/**
- * Write a 64 bit varint, given as two JS numbers, to the given bytes array.
- *
- * Copyright 2008 Google Inc. All rights reserved.
- *
- * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344
- */
-function varint64write(lo, hi, bytes) {
- for (let i = 0; i < 28; i = i + 7) {
- const shift = lo >>> i;
- const hasNext = !((shift >>> 7) == 0 && hi == 0);
- const byte = (hasNext ? shift | 0x80 : shift) & 0xFF;
- bytes.push(byte);
- if (!hasNext) {
- return;
- }
- }
- const splitBits = ((lo >>> 28) & 0x0F) | ((hi & 0x07) << 4);
- const hasMoreBits = !((hi >> 3) == 0);
- bytes.push((hasMoreBits ? splitBits | 0x80 : splitBits) & 0xFF);
- if (!hasMoreBits) {
- return;
- }
- for (let i = 3; i < 31; i = i + 7) {
- const shift = hi >>> i;
- const hasNext = !((shift >>> 7) == 0);
- const byte = (hasNext ? shift | 0x80 : shift) & 0xFF;
- bytes.push(byte);
- if (!hasNext) {
- return;
- }
- }
- bytes.push((hi >>> 31) & 0x01);
-}
-exports.varint64write = varint64write;
-// constants for binary math
-const TWO_PWR_32_DBL = (1 << 16) * (1 << 16);
-/**
- * Parse decimal string of 64 bit integer value as two JS numbers.
- *
- * Returns tuple:
- * [0]: minus sign?
- * [1]: low bits
- * [2]: high bits
- *
- * Copyright 2008 Google Inc.
- */
-function int64fromString(dec) {
- // Check for minus sign.
- let minus = dec[0] == '-';
- if (minus)
- dec = dec.slice(1);
- // Work 6 decimal digits at a time, acting like we're converting base 1e6
- // digits to binary. This is safe to do with floating point math because
- // Number.isSafeInteger(ALL_32_BITS * 1e6) == true.
- const base = 1e6;
- let lowBits = 0;
- let highBits = 0;
- function add1e6digit(begin, end) {
- // Note: Number('') is 0.
- const digit1e6 = Number(dec.slice(begin, end));
- highBits *= base;
- lowBits = lowBits * base + digit1e6;
- // Carry bits from lowBits to highBits
- if (lowBits >= TWO_PWR_32_DBL) {
- highBits = highBits + ((lowBits / TWO_PWR_32_DBL) | 0);
- lowBits = lowBits % TWO_PWR_32_DBL;
- }
- }
- add1e6digit(-24, -18);
- add1e6digit(-18, -12);
- add1e6digit(-12, -6);
- add1e6digit(-6);
- return [minus, lowBits, highBits];
-}
-exports.int64fromString = int64fromString;
-/**
- * Format 64 bit integer value (as two JS numbers) to decimal string.
- *
- * Copyright 2008 Google Inc.
- */
-function int64toString(bitsLow, bitsHigh) {
- // Skip the expensive conversion if the number is small enough to use the
- // built-in conversions.
- if ((bitsHigh >>> 0) <= 0x1FFFFF) {
- return '' + (TWO_PWR_32_DBL * bitsHigh + (bitsLow >>> 0));
- }
- // What this code is doing is essentially converting the input number from
- // base-2 to base-1e7, which allows us to represent the 64-bit range with
- // only 3 (very large) digits. Those digits are then trivial to convert to
- // a base-10 string.
- // The magic numbers used here are -
- // 2^24 = 16777216 = (1,6777216) in base-1e7.
- // 2^48 = 281474976710656 = (2,8147497,6710656) in base-1e7.
- // Split 32:32 representation into 16:24:24 representation so our
- // intermediate digits don't overflow.
- let low = bitsLow & 0xFFFFFF;
- let mid = (((bitsLow >>> 24) | (bitsHigh << 8)) >>> 0) & 0xFFFFFF;
- let high = (bitsHigh >> 16) & 0xFFFF;
- // Assemble our three base-1e7 digits, ignoring carries. The maximum
- // value in a digit at this step is representable as a 48-bit integer, which
- // can be stored in a 64-bit floating point number.
- let digitA = low + (mid * 6777216) + (high * 6710656);
- let digitB = mid + (high * 8147497);
- let digitC = (high * 2);
- // Apply carries from A to B and from B to C.
- let base = 10000000;
- if (digitA >= base) {
- digitB += Math.floor(digitA / base);
- digitA %= base;
- }
- if (digitB >= base) {
- digitC += Math.floor(digitB / base);
- digitB %= base;
- }
- // Convert base-1e7 digits to base-10, with optional leading zeroes.
- function decimalFrom1e7(digit1e7, needLeadingZeros) {
- let partial = digit1e7 ? String(digit1e7) : '';
- if (needLeadingZeros) {
- return '0000000'.slice(partial.length) + partial;
- }
- return partial;
- }
- return decimalFrom1e7(digitC, /*needLeadingZeros=*/ 0) +
- decimalFrom1e7(digitB, /*needLeadingZeros=*/ digitC) +
- // If the final 1e7 digit didn't need leading zeros, we would have
- // returned via the trivial code path at the top.
- decimalFrom1e7(digitA, /*needLeadingZeros=*/ 1);
-}
-exports.int64toString = int64toString;
-/**
- * Write a 32 bit varint, signed or unsigned. Same as `varint64write(0, value, bytes)`
- *
- * Copyright 2008 Google Inc. All rights reserved.
- *
- * See https://github.com/protocolbuffers/protobuf/blob/1b18833f4f2a2f681f4e4a25cdf3b0a43115ec26/js/binary/encoder.js#L144
- */
-function varint32write(value, bytes) {
- if (value >= 0) {
- // write value as varint 32
- while (value > 0x7f) {
- bytes.push((value & 0x7f) | 0x80);
- value = value >>> 7;
- }
- bytes.push(value);
- }
- else {
- for (let i = 0; i < 9; i++) {
- bytes.push(value & 127 | 128);
- value = value >> 7;
- }
- bytes.push(1);
- }
-}
-exports.varint32write = varint32write;
-/**
- * Read an unsigned 32 bit varint.
- *
- * See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L220
- */
-function varint32read() {
- let b = this.buf[this.pos++];
- let result = b & 0x7F;
- if ((b & 0x80) == 0) {
- this.assertBounds();
- return result;
- }
- b = this.buf[this.pos++];
- result |= (b & 0x7F) << 7;
- if ((b & 0x80) == 0) {
- this.assertBounds();
- return result;
- }
- b = this.buf[this.pos++];
- result |= (b & 0x7F) << 14;
- if ((b & 0x80) == 0) {
- this.assertBounds();
- return result;
- }
- b = this.buf[this.pos++];
- result |= (b & 0x7F) << 21;
- if ((b & 0x80) == 0) {
- this.assertBounds();
- return result;
- }
- // Extract only last 4 bits
- b = this.buf[this.pos++];
- result |= (b & 0x0F) << 28;
- for (let readBytes = 5; ((b & 0x80) !== 0) && readBytes < 10; readBytes++)
- b = this.buf[this.pos++];
- if ((b & 0x80) != 0)
- throw new Error('invalid varint');
- this.assertBounds();
- // Result can have 32 bits, convert it to unsigned
- return result >>> 0;
-}
-exports.varint32read = varint32read;
-
-
-/***/ }),
-
-/***/ 4061:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-// Public API of the protobuf-ts runtime.
-// Note: we do not use `export * from ...` to help tree shakers,
-// webpack verbose output hints that this should be useful
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-// Convenience JSON typings and corresponding type guards
-var json_typings_1 = __nccwpck_require__(70661);
-Object.defineProperty(exports, "typeofJsonValue", ({ enumerable: true, get: function () { return json_typings_1.typeofJsonValue; } }));
-Object.defineProperty(exports, "isJsonObject", ({ enumerable: true, get: function () { return json_typings_1.isJsonObject; } }));
-// Base 64 encoding
-var base64_1 = __nccwpck_require__(20196);
-Object.defineProperty(exports, "base64decode", ({ enumerable: true, get: function () { return base64_1.base64decode; } }));
-Object.defineProperty(exports, "base64encode", ({ enumerable: true, get: function () { return base64_1.base64encode; } }));
-// UTF8 encoding
-var protobufjs_utf8_1 = __nccwpck_require__(95290);
-Object.defineProperty(exports, "utf8read", ({ enumerable: true, get: function () { return protobufjs_utf8_1.utf8read; } }));
-// Binary format contracts, options for reading and writing, for example
-var binary_format_contract_1 = __nccwpck_require__(84921);
-Object.defineProperty(exports, "WireType", ({ enumerable: true, get: function () { return binary_format_contract_1.WireType; } }));
-Object.defineProperty(exports, "mergeBinaryOptions", ({ enumerable: true, get: function () { return binary_format_contract_1.mergeBinaryOptions; } }));
-Object.defineProperty(exports, "UnknownFieldHandler", ({ enumerable: true, get: function () { return binary_format_contract_1.UnknownFieldHandler; } }));
-// Standard IBinaryReader implementation
-var binary_reader_1 = __nccwpck_require__(65210);
-Object.defineProperty(exports, "BinaryReader", ({ enumerable: true, get: function () { return binary_reader_1.BinaryReader; } }));
-Object.defineProperty(exports, "binaryReadOptions", ({ enumerable: true, get: function () { return binary_reader_1.binaryReadOptions; } }));
-// Standard IBinaryWriter implementation
-var binary_writer_1 = __nccwpck_require__(44354);
-Object.defineProperty(exports, "BinaryWriter", ({ enumerable: true, get: function () { return binary_writer_1.BinaryWriter; } }));
-Object.defineProperty(exports, "binaryWriteOptions", ({ enumerable: true, get: function () { return binary_writer_1.binaryWriteOptions; } }));
-// Int64 and UInt64 implementations required for the binary format
-var pb_long_1 = __nccwpck_require__(47777);
-Object.defineProperty(exports, "PbLong", ({ enumerable: true, get: function () { return pb_long_1.PbLong; } }));
-Object.defineProperty(exports, "PbULong", ({ enumerable: true, get: function () { return pb_long_1.PbULong; } }));
-// JSON format contracts, options for reading and writing, for example
-var json_format_contract_1 = __nccwpck_require__(48139);
-Object.defineProperty(exports, "jsonReadOptions", ({ enumerable: true, get: function () { return json_format_contract_1.jsonReadOptions; } }));
-Object.defineProperty(exports, "jsonWriteOptions", ({ enumerable: true, get: function () { return json_format_contract_1.jsonWriteOptions; } }));
-Object.defineProperty(exports, "mergeJsonOptions", ({ enumerable: true, get: function () { return json_format_contract_1.mergeJsonOptions; } }));
-// Message type contract
-var message_type_contract_1 = __nccwpck_require__(1682);
-Object.defineProperty(exports, "MESSAGE_TYPE", ({ enumerable: true, get: function () { return message_type_contract_1.MESSAGE_TYPE; } }));
-// Message type implementation via reflection
-var message_type_1 = __nccwpck_require__(63664);
-Object.defineProperty(exports, "MessageType", ({ enumerable: true, get: function () { return message_type_1.MessageType; } }));
-// Reflection info, generated by the plugin, exposed to the user, used by reflection ops
-var reflection_info_1 = __nccwpck_require__(21370);
-Object.defineProperty(exports, "ScalarType", ({ enumerable: true, get: function () { return reflection_info_1.ScalarType; } }));
-Object.defineProperty(exports, "LongType", ({ enumerable: true, get: function () { return reflection_info_1.LongType; } }));
-Object.defineProperty(exports, "RepeatType", ({ enumerable: true, get: function () { return reflection_info_1.RepeatType; } }));
-Object.defineProperty(exports, "normalizeFieldInfo", ({ enumerable: true, get: function () { return reflection_info_1.normalizeFieldInfo; } }));
-Object.defineProperty(exports, "readFieldOptions", ({ enumerable: true, get: function () { return reflection_info_1.readFieldOptions; } }));
-Object.defineProperty(exports, "readFieldOption", ({ enumerable: true, get: function () { return reflection_info_1.readFieldOption; } }));
-Object.defineProperty(exports, "readMessageOption", ({ enumerable: true, get: function () { return reflection_info_1.readMessageOption; } }));
-// Message operations via reflection
-var reflection_type_check_1 = __nccwpck_require__(20903);
-Object.defineProperty(exports, "ReflectionTypeCheck", ({ enumerable: true, get: function () { return reflection_type_check_1.ReflectionTypeCheck; } }));
-var reflection_create_1 = __nccwpck_require__(60390);
-Object.defineProperty(exports, "reflectionCreate", ({ enumerable: true, get: function () { return reflection_create_1.reflectionCreate; } }));
-var reflection_scalar_default_1 = __nccwpck_require__(74863);
-Object.defineProperty(exports, "reflectionScalarDefault", ({ enumerable: true, get: function () { return reflection_scalar_default_1.reflectionScalarDefault; } }));
-var reflection_merge_partial_1 = __nccwpck_require__(7869);
-Object.defineProperty(exports, "reflectionMergePartial", ({ enumerable: true, get: function () { return reflection_merge_partial_1.reflectionMergePartial; } }));
-var reflection_equals_1 = __nccwpck_require__(39473);
-Object.defineProperty(exports, "reflectionEquals", ({ enumerable: true, get: function () { return reflection_equals_1.reflectionEquals; } }));
-var reflection_binary_reader_1 = __nccwpck_require__(91593);
-Object.defineProperty(exports, "ReflectionBinaryReader", ({ enumerable: true, get: function () { return reflection_binary_reader_1.ReflectionBinaryReader; } }));
-var reflection_binary_writer_1 = __nccwpck_require__(57170);
-Object.defineProperty(exports, "ReflectionBinaryWriter", ({ enumerable: true, get: function () { return reflection_binary_writer_1.ReflectionBinaryWriter; } }));
-var reflection_json_reader_1 = __nccwpck_require__(229);
-Object.defineProperty(exports, "ReflectionJsonReader", ({ enumerable: true, get: function () { return reflection_json_reader_1.ReflectionJsonReader; } }));
-var reflection_json_writer_1 = __nccwpck_require__(68980);
-Object.defineProperty(exports, "ReflectionJsonWriter", ({ enumerable: true, get: function () { return reflection_json_writer_1.ReflectionJsonWriter; } }));
-var reflection_contains_message_type_1 = __nccwpck_require__(67317);
-Object.defineProperty(exports, "containsMessageType", ({ enumerable: true, get: function () { return reflection_contains_message_type_1.containsMessageType; } }));
-// Oneof helpers
-var oneof_1 = __nccwpck_require__(78531);
-Object.defineProperty(exports, "isOneofGroup", ({ enumerable: true, get: function () { return oneof_1.isOneofGroup; } }));
-Object.defineProperty(exports, "setOneofValue", ({ enumerable: true, get: function () { return oneof_1.setOneofValue; } }));
-Object.defineProperty(exports, "getOneofValue", ({ enumerable: true, get: function () { return oneof_1.getOneofValue; } }));
-Object.defineProperty(exports, "clearOneofValue", ({ enumerable: true, get: function () { return oneof_1.clearOneofValue; } }));
-Object.defineProperty(exports, "getSelectedOneofValue", ({ enumerable: true, get: function () { return oneof_1.getSelectedOneofValue; } }));
-// Enum object type guard and reflection util, may be interesting to the user.
-var enum_object_1 = __nccwpck_require__(20085);
-Object.defineProperty(exports, "listEnumValues", ({ enumerable: true, get: function () { return enum_object_1.listEnumValues; } }));
-Object.defineProperty(exports, "listEnumNames", ({ enumerable: true, get: function () { return enum_object_1.listEnumNames; } }));
-Object.defineProperty(exports, "listEnumNumbers", ({ enumerable: true, get: function () { return enum_object_1.listEnumNumbers; } }));
-Object.defineProperty(exports, "isEnumObject", ({ enumerable: true, get: function () { return enum_object_1.isEnumObject; } }));
-// lowerCamelCase() is exported for plugin, rpc-runtime and other rpc packages
-var lower_camel_case_1 = __nccwpck_require__(34772);
-Object.defineProperty(exports, "lowerCamelCase", ({ enumerable: true, get: function () { return lower_camel_case_1.lowerCamelCase; } }));
-// assertion functions are exported for plugin, may also be useful to user
-var assert_1 = __nccwpck_require__(54253);
-Object.defineProperty(exports, "assert", ({ enumerable: true, get: function () { return assert_1.assert; } }));
-Object.defineProperty(exports, "assertNever", ({ enumerable: true, get: function () { return assert_1.assertNever; } }));
-Object.defineProperty(exports, "assertInt32", ({ enumerable: true, get: function () { return assert_1.assertInt32; } }));
-Object.defineProperty(exports, "assertUInt32", ({ enumerable: true, get: function () { return assert_1.assertUInt32; } }));
-Object.defineProperty(exports, "assertFloat32", ({ enumerable: true, get: function () { return assert_1.assertFloat32; } }));
-
-
-/***/ }),
-
-/***/ 48139:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.mergeJsonOptions = exports.jsonWriteOptions = exports.jsonReadOptions = void 0;
-const defaultsWrite = {
- emitDefaultValues: false,
- enumAsInteger: false,
- useProtoFieldName: false,
- prettySpaces: 0,
-}, defaultsRead = {
- ignoreUnknownFields: false,
-};
-/**
- * Make options for reading JSON data from partial options.
- */
-function jsonReadOptions(options) {
- return options ? Object.assign(Object.assign({}, defaultsRead), options) : defaultsRead;
-}
-exports.jsonReadOptions = jsonReadOptions;
-/**
- * Make options for writing JSON data from partial options.
- */
-function jsonWriteOptions(options) {
- return options ? Object.assign(Object.assign({}, defaultsWrite), options) : defaultsWrite;
-}
-exports.jsonWriteOptions = jsonWriteOptions;
-/**
- * Merges JSON write or read options. Later values override earlier values. Type registries are merged.
- */
-function mergeJsonOptions(a, b) {
- var _a, _b;
- let c = Object.assign(Object.assign({}, a), b);
- c.typeRegistry = [...((_a = a === null || a === void 0 ? void 0 : a.typeRegistry) !== null && _a !== void 0 ? _a : []), ...((_b = b === null || b === void 0 ? void 0 : b.typeRegistry) !== null && _b !== void 0 ? _b : [])];
- return c;
-}
-exports.mergeJsonOptions = mergeJsonOptions;
-
-
-/***/ }),
-
-/***/ 70661:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.isJsonObject = exports.typeofJsonValue = void 0;
-/**
- * Get the type of a JSON value.
- * Distinguishes between array, null and object.
- */
-function typeofJsonValue(value) {
- let t = typeof value;
- if (t == "object") {
- if (Array.isArray(value))
- return "array";
- if (value === null)
- return "null";
- }
- return t;
-}
-exports.typeofJsonValue = typeofJsonValue;
-/**
- * Is this a JSON object (instead of an array or null)?
- */
-function isJsonObject(value) {
- return value !== null && typeof value == "object" && !Array.isArray(value);
-}
-exports.isJsonObject = isJsonObject;
-
-
-/***/ }),
-
-/***/ 34772:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.lowerCamelCase = void 0;
-/**
- * Converts snake_case to lowerCamelCase.
- *
- * Should behave like protoc:
- * https://github.com/protocolbuffers/protobuf/blob/e8ae137c96444ea313485ed1118c5e43b2099cf1/src/google/protobuf/compiler/java/java_helpers.cc#L118
- */
-function lowerCamelCase(snakeCase) {
- let capNext = false;
- const sb = [];
- for (let i = 0; i < snakeCase.length; i++) {
- let next = snakeCase.charAt(i);
- if (next == '_') {
- capNext = true;
- }
- else if (/\d/.test(next)) {
- sb.push(next);
- capNext = true;
- }
- else if (capNext) {
- sb.push(next.toUpperCase());
- capNext = false;
- }
- else if (i == 0) {
- sb.push(next.toLowerCase());
- }
- else {
- sb.push(next);
- }
- }
- return sb.join('');
-}
-exports.lowerCamelCase = lowerCamelCase;
-
-
-/***/ }),
-
-/***/ 1682:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.MESSAGE_TYPE = void 0;
-/**
- * The symbol used as a key on message objects to store the message type.
- *
- * Note that this is an experimental feature - it is here to stay, but
- * implementation details may change without notice.
- */
-exports.MESSAGE_TYPE = Symbol.for("protobuf-ts/message-type");
-
-
-/***/ }),
-
-/***/ 63664:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.MessageType = void 0;
-const message_type_contract_1 = __nccwpck_require__(1682);
-const reflection_info_1 = __nccwpck_require__(21370);
-const reflection_type_check_1 = __nccwpck_require__(20903);
-const reflection_json_reader_1 = __nccwpck_require__(229);
-const reflection_json_writer_1 = __nccwpck_require__(68980);
-const reflection_binary_reader_1 = __nccwpck_require__(91593);
-const reflection_binary_writer_1 = __nccwpck_require__(57170);
-const reflection_create_1 = __nccwpck_require__(60390);
-const reflection_merge_partial_1 = __nccwpck_require__(7869);
-const json_typings_1 = __nccwpck_require__(70661);
-const json_format_contract_1 = __nccwpck_require__(48139);
-const reflection_equals_1 = __nccwpck_require__(39473);
-const binary_writer_1 = __nccwpck_require__(44354);
-const binary_reader_1 = __nccwpck_require__(65210);
-const baseDescriptors = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
-const messageTypeDescriptor = baseDescriptors[message_type_contract_1.MESSAGE_TYPE] = {};
-/**
- * This standard message type provides reflection-based
- * operations to work with a message.
- */
-class MessageType {
- constructor(name, fields, options) {
- this.defaultCheckDepth = 16;
- this.typeName = name;
- this.fields = fields.map(reflection_info_1.normalizeFieldInfo);
- this.options = options !== null && options !== void 0 ? options : {};
- messageTypeDescriptor.value = this;
- this.messagePrototype = Object.create(null, baseDescriptors);
- this.refTypeCheck = new reflection_type_check_1.ReflectionTypeCheck(this);
- this.refJsonReader = new reflection_json_reader_1.ReflectionJsonReader(this);
- this.refJsonWriter = new reflection_json_writer_1.ReflectionJsonWriter(this);
- this.refBinReader = new reflection_binary_reader_1.ReflectionBinaryReader(this);
- this.refBinWriter = new reflection_binary_writer_1.ReflectionBinaryWriter(this);
- }
- create(value) {
- let message = reflection_create_1.reflectionCreate(this);
- if (value !== undefined) {
- reflection_merge_partial_1.reflectionMergePartial(this, message, value);
- }
- return message;
- }
- /**
- * Clone the message.
- *
- * Unknown fields are discarded.
- */
- clone(message) {
- let copy = this.create();
- reflection_merge_partial_1.reflectionMergePartial(this, copy, message);
- return copy;
- }
- /**
- * Determines whether two message of the same type have the same field values.
- * Checks for deep equality, traversing repeated fields, oneof groups, maps
- * and messages recursively.
- * Will also return true if both messages are `undefined`.
- */
- equals(a, b) {
- return reflection_equals_1.reflectionEquals(this, a, b);
- }
- /**
- * Is the given value assignable to our message type
- * and contains no [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?
- */
- is(arg, depth = this.defaultCheckDepth) {
- return this.refTypeCheck.is(arg, depth, false);
- }
- /**
- * Is the given value assignable to our message type,
- * regardless of [excess properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#excess-property-checks)?
- */
- isAssignable(arg, depth = this.defaultCheckDepth) {
- return this.refTypeCheck.is(arg, depth, true);
- }
- /**
- * Copy partial data into the target message.
- */
- mergePartial(target, source) {
- reflection_merge_partial_1.reflectionMergePartial(this, target, source);
- }
- /**
- * Create a new message from binary format.
- */
- fromBinary(data, options) {
- let opt = binary_reader_1.binaryReadOptions(options);
- return this.internalBinaryRead(opt.readerFactory(data), data.byteLength, opt);
- }
- /**
- * Read a new message from a JSON value.
- */
- fromJson(json, options) {
- return this.internalJsonRead(json, json_format_contract_1.jsonReadOptions(options));
- }
- /**
- * Read a new message from a JSON string.
- * This is equivalent to `T.fromJson(JSON.parse(json))`.
- */
- fromJsonString(json, options) {
- let value = JSON.parse(json);
- return this.fromJson(value, options);
- }
- /**
- * Write the message to canonical JSON value.
- */
- toJson(message, options) {
- return this.internalJsonWrite(message, json_format_contract_1.jsonWriteOptions(options));
- }
- /**
- * Convert the message to canonical JSON string.
- * This is equivalent to `JSON.stringify(T.toJson(t))`
- */
- toJsonString(message, options) {
- var _a;
- let value = this.toJson(message, options);
- return JSON.stringify(value, null, (_a = options === null || options === void 0 ? void 0 : options.prettySpaces) !== null && _a !== void 0 ? _a : 0);
- }
- /**
- * Write the message to binary format.
- */
- toBinary(message, options) {
- let opt = binary_writer_1.binaryWriteOptions(options);
- return this.internalBinaryWrite(message, opt.writerFactory(), opt).finish();
- }
- /**
- * This is an internal method. If you just want to read a message from
- * JSON, use `fromJson()` or `fromJsonString()`.
- *
- * Reads JSON value and merges the fields into the target
- * according to protobuf rules. If the target is omitted,
- * a new instance is created first.
- */
- internalJsonRead(json, options, target) {
- if (json !== null && typeof json == "object" && !Array.isArray(json)) {
- let message = target !== null && target !== void 0 ? target : this.create();
- this.refJsonReader.read(json, message, options);
- return message;
- }
- throw new Error(`Unable to parse message ${this.typeName} from JSON ${json_typings_1.typeofJsonValue(json)}.`);
- }
- /**
- * This is an internal method. If you just want to write a message
- * to JSON, use `toJson()` or `toJsonString().
- *
- * Writes JSON value and returns it.
- */
- internalJsonWrite(message, options) {
- return this.refJsonWriter.write(message, options);
- }
- /**
- * This is an internal method. If you just want to write a message
- * in binary format, use `toBinary()`.
- *
- * Serializes the message in binary format and appends it to the given
- * writer. Returns passed writer.
- */
- internalBinaryWrite(message, writer, options) {
- this.refBinWriter.write(message, writer, options);
- return writer;
- }
- /**
- * This is an internal method. If you just want to read a message from
- * binary data, use `fromBinary()`.
- *
- * Reads data from binary format and merges the fields into
- * the target according to protobuf rules. If the target is
- * omitted, a new instance is created first.
- */
- internalBinaryRead(reader, length, options, target) {
- let message = target !== null && target !== void 0 ? target : this.create();
- this.refBinReader.read(reader, message, options, length);
- return message;
- }
-}
-exports.MessageType = MessageType;
-
-
-/***/ }),
-
-/***/ 78531:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.getSelectedOneofValue = exports.clearOneofValue = exports.setUnknownOneofValue = exports.setOneofValue = exports.getOneofValue = exports.isOneofGroup = void 0;
-/**
- * Is the given value a valid oneof group?
- *
- * We represent protobuf `oneof` as algebraic data types (ADT) in generated
- * code. But when working with messages of unknown type, the ADT does not
- * help us.
- *
- * This type guard checks if the given object adheres to the ADT rules, which
- * are as follows:
- *
- * 1) Must be an object.
- *
- * 2) Must have a "oneofKind" discriminator property.
- *
- * 3) If "oneofKind" is `undefined`, no member field is selected. The object
- * must not have any other properties.
- *
- * 4) If "oneofKind" is a `string`, the member field with this name is
- * selected.
- *
- * 5) If a member field is selected, the object must have a second property
- * with this name. The property must not be `undefined`.
- *
- * 6) No extra properties are allowed. The object has either one property
- * (no selection) or two properties (selection).
- *
- */
-function isOneofGroup(any) {
- if (typeof any != 'object' || any === null || !any.hasOwnProperty('oneofKind')) {
- return false;
- }
- switch (typeof any.oneofKind) {
- case "string":
- if (any[any.oneofKind] === undefined)
- return false;
- return Object.keys(any).length == 2;
- case "undefined":
- return Object.keys(any).length == 1;
- default:
- return false;
- }
-}
-exports.isOneofGroup = isOneofGroup;
-/**
- * Returns the value of the given field in a oneof group.
- */
-function getOneofValue(oneof, kind) {
- return oneof[kind];
-}
-exports.getOneofValue = getOneofValue;
-function setOneofValue(oneof, kind, value) {
- if (oneof.oneofKind !== undefined) {
- delete oneof[oneof.oneofKind];
- }
- oneof.oneofKind = kind;
- if (value !== undefined) {
- oneof[kind] = value;
- }
-}
-exports.setOneofValue = setOneofValue;
-function setUnknownOneofValue(oneof, kind, value) {
- if (oneof.oneofKind !== undefined) {
- delete oneof[oneof.oneofKind];
- }
- oneof.oneofKind = kind;
- if (value !== undefined && kind !== undefined) {
- oneof[kind] = value;
- }
-}
-exports.setUnknownOneofValue = setUnknownOneofValue;
-/**
- * Removes the selected field in a oneof group.
- *
- * Note that the recommended way to modify a oneof group is to set
- * a new object:
- *
- * ```ts
- * message.result = { oneofKind: undefined };
- * ```
- */
-function clearOneofValue(oneof) {
- if (oneof.oneofKind !== undefined) {
- delete oneof[oneof.oneofKind];
- }
- oneof.oneofKind = undefined;
-}
-exports.clearOneofValue = clearOneofValue;
-/**
- * Returns the selected value of the given oneof group.
- *
- * Not that the recommended way to access a oneof group is to check
- * the "oneofKind" property and let TypeScript narrow down the union
- * type for you:
- *
- * ```ts
- * if (message.result.oneofKind === "error") {
- * message.result.error; // string
- * }
- * ```
- *
- * In the rare case you just need the value, and do not care about
- * which protobuf field is selected, you can use this function
- * for convenience.
- */
-function getSelectedOneofValue(oneof) {
- if (oneof.oneofKind === undefined) {
- return undefined;
- }
- return oneof[oneof.oneofKind];
-}
-exports.getSelectedOneofValue = getSelectedOneofValue;
-
-
-/***/ }),
-
-/***/ 47777:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.PbLong = exports.PbULong = exports.detectBi = void 0;
-const goog_varint_1 = __nccwpck_require__(30433);
-let BI;
-function detectBi() {
- const dv = new DataView(new ArrayBuffer(8));
- const ok = globalThis.BigInt !== undefined
- && typeof dv.getBigInt64 === "function"
- && typeof dv.getBigUint64 === "function"
- && typeof dv.setBigInt64 === "function"
- && typeof dv.setBigUint64 === "function";
- BI = ok ? {
- MIN: BigInt("-9223372036854775808"),
- MAX: BigInt("9223372036854775807"),
- UMIN: BigInt("0"),
- UMAX: BigInt("18446744073709551615"),
- C: BigInt,
- V: dv,
- } : undefined;
-}
-exports.detectBi = detectBi;
-detectBi();
-function assertBi(bi) {
- if (!bi)
- throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support");
-}
-// used to validate from(string) input (when bigint is unavailable)
-const RE_DECIMAL_STR = /^-?[0-9]+$/;
-// constants for binary math
-const TWO_PWR_32_DBL = 0x100000000;
-const HALF_2_PWR_32 = 0x080000000;
-// base class for PbLong and PbULong provides shared code
-class SharedPbLong {
- /**
- * Create a new instance with the given bits.
- */
- constructor(lo, hi) {
- this.lo = lo | 0;
- this.hi = hi | 0;
- }
- /**
- * Is this instance equal to 0?
- */
- isZero() {
- return this.lo == 0 && this.hi == 0;
- }
- /**
- * Convert to a native number.
- */
- toNumber() {
- let result = this.hi * TWO_PWR_32_DBL + (this.lo >>> 0);
- if (!Number.isSafeInteger(result))
- throw new Error("cannot convert to safe number");
- return result;
- }
-}
-/**
- * 64-bit unsigned integer as two 32-bit values.
- * Converts between `string`, `number` and `bigint` representations.
- */
-class PbULong extends SharedPbLong {
- /**
- * Create instance from a `string`, `number` or `bigint`.
- */
- static from(value) {
- if (BI)
- // noinspection FallThroughInSwitchStatementJS
- switch (typeof value) {
- case "string":
- if (value == "0")
- return this.ZERO;
- if (value == "")
- throw new Error('string is no integer');
- value = BI.C(value);
- case "number":
- if (value === 0)
- return this.ZERO;
- value = BI.C(value);
- case "bigint":
- if (!value)
- return this.ZERO;
- if (value < BI.UMIN)
- throw new Error('signed value for ulong');
- if (value > BI.UMAX)
- throw new Error('ulong too large');
- BI.V.setBigUint64(0, value, true);
- return new PbULong(BI.V.getInt32(0, true), BI.V.getInt32(4, true));
- }
- else
- switch (typeof value) {
- case "string":
- if (value == "0")
- return this.ZERO;
- value = value.trim();
- if (!RE_DECIMAL_STR.test(value))
- throw new Error('string is no integer');
- let [minus, lo, hi] = goog_varint_1.int64fromString(value);
- if (minus)
- throw new Error('signed value for ulong');
- return new PbULong(lo, hi);
- case "number":
- if (value == 0)
- return this.ZERO;
- if (!Number.isSafeInteger(value))
- throw new Error('number is no integer');
- if (value < 0)
- throw new Error('signed value for ulong');
- return new PbULong(value, value / TWO_PWR_32_DBL);
- }
- throw new Error('unknown value ' + typeof value);
- }
- /**
- * Convert to decimal string.
- */
- toString() {
- return BI ? this.toBigInt().toString() : goog_varint_1.int64toString(this.lo, this.hi);
- }
- /**
- * Convert to native bigint.
- */
- toBigInt() {
- assertBi(BI);
- BI.V.setInt32(0, this.lo, true);
- BI.V.setInt32(4, this.hi, true);
- return BI.V.getBigUint64(0, true);
- }
-}
-exports.PbULong = PbULong;
-/**
- * ulong 0 singleton.
- */
-PbULong.ZERO = new PbULong(0, 0);
-/**
- * 64-bit signed integer as two 32-bit values.
- * Converts between `string`, `number` and `bigint` representations.
- */
-class PbLong extends SharedPbLong {
- /**
- * Create instance from a `string`, `number` or `bigint`.
- */
- static from(value) {
- if (BI)
- // noinspection FallThroughInSwitchStatementJS
- switch (typeof value) {
- case "string":
- if (value == "0")
- return this.ZERO;
- if (value == "")
- throw new Error('string is no integer');
- value = BI.C(value);
- case "number":
- if (value === 0)
- return this.ZERO;
- value = BI.C(value);
- case "bigint":
- if (!value)
- return this.ZERO;
- if (value < BI.MIN)
- throw new Error('signed long too small');
- if (value > BI.MAX)
- throw new Error('signed long too large');
- BI.V.setBigInt64(0, value, true);
- return new PbLong(BI.V.getInt32(0, true), BI.V.getInt32(4, true));
- }
- else
- switch (typeof value) {
- case "string":
- if (value == "0")
- return this.ZERO;
- value = value.trim();
- if (!RE_DECIMAL_STR.test(value))
- throw new Error('string is no integer');
- let [minus, lo, hi] = goog_varint_1.int64fromString(value);
- if (minus) {
- if (hi > HALF_2_PWR_32 || (hi == HALF_2_PWR_32 && lo != 0))
- throw new Error('signed long too small');
- }
- else if (hi >= HALF_2_PWR_32)
- throw new Error('signed long too large');
- let pbl = new PbLong(lo, hi);
- return minus ? pbl.negate() : pbl;
- case "number":
- if (value == 0)
- return this.ZERO;
- if (!Number.isSafeInteger(value))
- throw new Error('number is no integer');
- return value > 0
- ? new PbLong(value, value / TWO_PWR_32_DBL)
- : new PbLong(-value, -value / TWO_PWR_32_DBL).negate();
- }
- throw new Error('unknown value ' + typeof value);
- }
- /**
- * Do we have a minus sign?
- */
- isNegative() {
- return (this.hi & HALF_2_PWR_32) !== 0;
- }
- /**
- * Negate two's complement.
- * Invert all the bits and add one to the result.
- */
- negate() {
- let hi = ~this.hi, lo = this.lo;
- if (lo)
- lo = ~lo + 1;
- else
- hi += 1;
- return new PbLong(lo, hi);
- }
- /**
- * Convert to decimal string.
- */
- toString() {
- if (BI)
- return this.toBigInt().toString();
- if (this.isNegative()) {
- let n = this.negate();
- return '-' + goog_varint_1.int64toString(n.lo, n.hi);
- }
- return goog_varint_1.int64toString(this.lo, this.hi);
- }
- /**
- * Convert to native bigint.
- */
- toBigInt() {
- assertBi(BI);
- BI.V.setInt32(0, this.lo, true);
- BI.V.setInt32(4, this.hi, true);
- return BI.V.getBigInt64(0, true);
- }
-}
-exports.PbLong = PbLong;
-/**
- * long 0 singleton.
- */
-PbLong.ZERO = new PbLong(0, 0);
-
-
-/***/ }),
-
-/***/ 95290:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-// Copyright (c) 2016, Daniel Wirtz All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-// * Neither the name of its author, nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.utf8read = void 0;
-const fromCharCodes = (chunk) => String.fromCharCode.apply(String, chunk);
-/**
- * @deprecated This function will no longer be exported with the next major
- * release, since protobuf-ts has switch to TextDecoder API. If you need this
- * function, please migrate to @protobufjs/utf8. For context, see
- * https://github.com/timostamm/protobuf-ts/issues/184
- *
- * Reads UTF8 bytes as a string.
- *
- * See [protobufjs / utf8](https://github.com/protobufjs/protobuf.js/blob/9893e35b854621cce64af4bf6be2cff4fb892796/lib/utf8/index.js#L40)
- *
- * Copyright (c) 2016, Daniel Wirtz
- */
-function utf8read(bytes) {
- if (bytes.length < 1)
- return "";
- let pos = 0, // position in bytes
- parts = [], chunk = [], i = 0, // char offset
- t; // temporary
- let len = bytes.length;
- while (pos < len) {
- t = bytes[pos++];
- if (t < 128)
- chunk[i++] = t;
- else if (t > 191 && t < 224)
- chunk[i++] = (t & 31) << 6 | bytes[pos++] & 63;
- else if (t > 239 && t < 365) {
- t = ((t & 7) << 18 | (bytes[pos++] & 63) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63) - 0x10000;
- chunk[i++] = 0xD800 + (t >> 10);
- chunk[i++] = 0xDC00 + (t & 1023);
- }
- else
- chunk[i++] = (t & 15) << 12 | (bytes[pos++] & 63) << 6 | bytes[pos++] & 63;
- if (i > 8191) {
- parts.push(fromCharCodes(chunk));
- i = 0;
- }
- }
- if (parts.length) {
- if (i)
- parts.push(fromCharCodes(chunk.slice(0, i)));
- return parts.join("");
- }
- return fromCharCodes(chunk.slice(0, i));
-}
-exports.utf8read = utf8read;
-
-
-/***/ }),
-
-/***/ 91593:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ReflectionBinaryReader = void 0;
-const binary_format_contract_1 = __nccwpck_require__(84921);
-const reflection_info_1 = __nccwpck_require__(21370);
-const reflection_long_convert_1 = __nccwpck_require__(24612);
-const reflection_scalar_default_1 = __nccwpck_require__(74863);
-/**
- * Reads proto3 messages in binary format using reflection information.
- *
- * https://developers.google.com/protocol-buffers/docs/encoding
- */
-class ReflectionBinaryReader {
- constructor(info) {
- this.info = info;
- }
- prepare() {
- var _a;
- if (!this.fieldNoToField) {
- const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : [];
- this.fieldNoToField = new Map(fieldsInput.map(field => [field.no, field]));
- }
- }
- /**
- * Reads a message from binary format into the target message.
- *
- * Repeated fields are appended. Map entries are added, overwriting
- * existing keys.
- *
- * If a message field is already present, it will be merged with the
- * new data.
- */
- read(reader, message, options, length) {
- this.prepare();
- const end = length === undefined ? reader.len : reader.pos + length;
- while (reader.pos < end) {
- // read the tag and find the field
- const [fieldNo, wireType] = reader.tag(), field = this.fieldNoToField.get(fieldNo);
- if (!field) {
- let u = options.readUnknownField;
- if (u == "throw")
- throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.info.typeName}`);
- let d = reader.skip(wireType);
- if (u !== false)
- (u === true ? binary_format_contract_1.UnknownFieldHandler.onRead : u)(this.info.typeName, message, fieldNo, wireType, d);
- continue;
- }
- // target object for the field we are reading
- let target = message, repeated = field.repeat, localName = field.localName;
- // if field is member of oneof ADT, use ADT as target
- if (field.oneof) {
- target = target[field.oneof];
- // if other oneof member selected, set new ADT
- if (target.oneofKind !== localName)
- target = message[field.oneof] = {
- oneofKind: localName
- };
- }
- // we have handled oneof above, we just have read the value into `target[localName]`
- switch (field.kind) {
- case "scalar":
- case "enum":
- let T = field.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.T;
- let L = field.kind == "scalar" ? field.L : undefined;
- if (repeated) {
- let arr = target[localName]; // safe to assume presence of array, oneof cannot contain repeated values
- if (wireType == binary_format_contract_1.WireType.LengthDelimited && T != reflection_info_1.ScalarType.STRING && T != reflection_info_1.ScalarType.BYTES) {
- let e = reader.uint32() + reader.pos;
- while (reader.pos < e)
- arr.push(this.scalar(reader, T, L));
- }
- else
- arr.push(this.scalar(reader, T, L));
- }
- else
- target[localName] = this.scalar(reader, T, L);
- break;
- case "message":
- if (repeated) {
- let arr = target[localName]; // safe to assume presence of array, oneof cannot contain repeated values
- let msg = field.T().internalBinaryRead(reader, reader.uint32(), options);
- arr.push(msg);
- }
- else
- target[localName] = field.T().internalBinaryRead(reader, reader.uint32(), options, target[localName]);
- break;
- case "map":
- let [mapKey, mapVal] = this.mapEntry(field, reader, options);
- // safe to assume presence of map object, oneof cannot contain repeated values
- target[localName][mapKey] = mapVal;
- break;
- }
- }
- }
- /**
- * Read a map field, expecting key field = 1, value field = 2
- */
- mapEntry(field, reader, options) {
- let length = reader.uint32();
- let end = reader.pos + length;
- let key = undefined; // javascript only allows number or string for object properties
- let val = undefined;
- while (reader.pos < end) {
- let [fieldNo, wireType] = reader.tag();
- switch (fieldNo) {
- case 1:
- if (field.K == reflection_info_1.ScalarType.BOOL)
- key = reader.bool().toString();
- else
- // long types are read as string, number types are okay as number
- key = this.scalar(reader, field.K, reflection_info_1.LongType.STRING);
- break;
- case 2:
- switch (field.V.kind) {
- case "scalar":
- val = this.scalar(reader, field.V.T, field.V.L);
- break;
- case "enum":
- val = reader.int32();
- break;
- case "message":
- val = field.V.T().internalBinaryRead(reader, reader.uint32(), options);
- break;
- }
- break;
- default:
- throw new Error(`Unknown field ${fieldNo} (wire type ${wireType}) in map entry for ${this.info.typeName}#${field.name}`);
- }
- }
- if (key === undefined) {
- let keyRaw = reflection_scalar_default_1.reflectionScalarDefault(field.K);
- key = field.K == reflection_info_1.ScalarType.BOOL ? keyRaw.toString() : keyRaw;
- }
- if (val === undefined)
- switch (field.V.kind) {
- case "scalar":
- val = reflection_scalar_default_1.reflectionScalarDefault(field.V.T, field.V.L);
- break;
- case "enum":
- val = 0;
- break;
- case "message":
- val = field.V.T().create();
- break;
- }
- return [key, val];
- }
- scalar(reader, type, longType) {
- switch (type) {
- case reflection_info_1.ScalarType.INT32:
- return reader.int32();
- case reflection_info_1.ScalarType.STRING:
- return reader.string();
- case reflection_info_1.ScalarType.BOOL:
- return reader.bool();
- case reflection_info_1.ScalarType.DOUBLE:
- return reader.double();
- case reflection_info_1.ScalarType.FLOAT:
- return reader.float();
- case reflection_info_1.ScalarType.INT64:
- return reflection_long_convert_1.reflectionLongConvert(reader.int64(), longType);
- case reflection_info_1.ScalarType.UINT64:
- return reflection_long_convert_1.reflectionLongConvert(reader.uint64(), longType);
- case reflection_info_1.ScalarType.FIXED64:
- return reflection_long_convert_1.reflectionLongConvert(reader.fixed64(), longType);
- case reflection_info_1.ScalarType.FIXED32:
- return reader.fixed32();
- case reflection_info_1.ScalarType.BYTES:
- return reader.bytes();
- case reflection_info_1.ScalarType.UINT32:
- return reader.uint32();
- case reflection_info_1.ScalarType.SFIXED32:
- return reader.sfixed32();
- case reflection_info_1.ScalarType.SFIXED64:
- return reflection_long_convert_1.reflectionLongConvert(reader.sfixed64(), longType);
- case reflection_info_1.ScalarType.SINT32:
- return reader.sint32();
- case reflection_info_1.ScalarType.SINT64:
- return reflection_long_convert_1.reflectionLongConvert(reader.sint64(), longType);
- }
- }
-}
-exports.ReflectionBinaryReader = ReflectionBinaryReader;
-
-
-/***/ }),
-
-/***/ 57170:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ReflectionBinaryWriter = void 0;
-const binary_format_contract_1 = __nccwpck_require__(84921);
-const reflection_info_1 = __nccwpck_require__(21370);
-const assert_1 = __nccwpck_require__(54253);
-const pb_long_1 = __nccwpck_require__(47777);
-/**
- * Writes proto3 messages in binary format using reflection information.
- *
- * https://developers.google.com/protocol-buffers/docs/encoding
- */
-class ReflectionBinaryWriter {
- constructor(info) {
- this.info = info;
- }
- prepare() {
- if (!this.fields) {
- const fieldsInput = this.info.fields ? this.info.fields.concat() : [];
- this.fields = fieldsInput.sort((a, b) => a.no - b.no);
- }
- }
- /**
- * Writes the message to binary format.
- */
- write(message, writer, options) {
- this.prepare();
- for (const field of this.fields) {
- let value, // this will be our field value, whether it is member of a oneof or not
- emitDefault, // whether we emit the default value (only true for oneof members)
- repeated = field.repeat, localName = field.localName;
- // handle oneof ADT
- if (field.oneof) {
- const group = message[field.oneof];
- if (group.oneofKind !== localName)
- continue; // if field is not selected, skip
- value = group[localName];
- emitDefault = true;
- }
- else {
- value = message[localName];
- emitDefault = false;
- }
- // we have handled oneof above. we just have to honor `emitDefault`.
- switch (field.kind) {
- case "scalar":
- case "enum":
- let T = field.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.T;
- if (repeated) {
- assert_1.assert(Array.isArray(value));
- if (repeated == reflection_info_1.RepeatType.PACKED)
- this.packed(writer, T, field.no, value);
- else
- for (const item of value)
- this.scalar(writer, T, field.no, item, true);
- }
- else if (value === undefined)
- assert_1.assert(field.opt);
- else
- this.scalar(writer, T, field.no, value, emitDefault || field.opt);
- break;
- case "message":
- if (repeated) {
- assert_1.assert(Array.isArray(value));
- for (const item of value)
- this.message(writer, options, field.T(), field.no, item);
- }
- else {
- this.message(writer, options, field.T(), field.no, value);
- }
- break;
- case "map":
- assert_1.assert(typeof value == 'object' && value !== null);
- for (const [key, val] of Object.entries(value))
- this.mapEntry(writer, options, field, key, val);
- break;
- }
- }
- let u = options.writeUnknownFields;
- if (u !== false)
- (u === true ? binary_format_contract_1.UnknownFieldHandler.onWrite : u)(this.info.typeName, message, writer);
- }
- mapEntry(writer, options, field, key, value) {
- writer.tag(field.no, binary_format_contract_1.WireType.LengthDelimited);
- writer.fork();
- // javascript only allows number or string for object properties
- // we convert from our representation to the protobuf type
- let keyValue = key;
- switch (field.K) {
- case reflection_info_1.ScalarType.INT32:
- case reflection_info_1.ScalarType.FIXED32:
- case reflection_info_1.ScalarType.UINT32:
- case reflection_info_1.ScalarType.SFIXED32:
- case reflection_info_1.ScalarType.SINT32:
- keyValue = Number.parseInt(key);
- break;
- case reflection_info_1.ScalarType.BOOL:
- assert_1.assert(key == 'true' || key == 'false');
- keyValue = key == 'true';
- break;
- }
- // write key, expecting key field number = 1
- this.scalar(writer, field.K, 1, keyValue, true);
- // write value, expecting value field number = 2
- switch (field.V.kind) {
- case 'scalar':
- this.scalar(writer, field.V.T, 2, value, true);
- break;
- case 'enum':
- this.scalar(writer, reflection_info_1.ScalarType.INT32, 2, value, true);
- break;
- case 'message':
- this.message(writer, options, field.V.T(), 2, value);
- break;
- }
- writer.join();
- }
- message(writer, options, handler, fieldNo, value) {
- if (value === undefined)
- return;
- handler.internalBinaryWrite(value, writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited).fork(), options);
- writer.join();
- }
- /**
- * Write a single scalar value.
- */
- scalar(writer, type, fieldNo, value, emitDefault) {
- let [wireType, method, isDefault] = this.scalarInfo(type, value);
- if (!isDefault || emitDefault) {
- writer.tag(fieldNo, wireType);
- writer[method](value);
- }
- }
- /**
- * Write an array of scalar values in packed format.
- */
- packed(writer, type, fieldNo, value) {
- if (!value.length)
- return;
- assert_1.assert(type !== reflection_info_1.ScalarType.BYTES && type !== reflection_info_1.ScalarType.STRING);
- // write tag
- writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited);
- // begin length-delimited
- writer.fork();
- // write values without tags
- let [, method,] = this.scalarInfo(type);
- for (let i = 0; i < value.length; i++)
- writer[method](value[i]);
- // end length delimited
- writer.join();
- }
- /**
- * Get information for writing a scalar value.
- *
- * Returns tuple:
- * [0]: appropriate WireType
- * [1]: name of the appropriate method of IBinaryWriter
- * [2]: whether the given value is a default value
- *
- * If argument `value` is omitted, [2] is always false.
- */
- scalarInfo(type, value) {
- let t = binary_format_contract_1.WireType.Varint;
- let m;
- let i = value === undefined;
- let d = value === 0;
- switch (type) {
- case reflection_info_1.ScalarType.INT32:
- m = "int32";
- break;
- case reflection_info_1.ScalarType.STRING:
- d = i || !value.length;
- t = binary_format_contract_1.WireType.LengthDelimited;
- m = "string";
- break;
- case reflection_info_1.ScalarType.BOOL:
- d = value === false;
- m = "bool";
- break;
- case reflection_info_1.ScalarType.UINT32:
- m = "uint32";
- break;
- case reflection_info_1.ScalarType.DOUBLE:
- t = binary_format_contract_1.WireType.Bit64;
- m = "double";
- break;
- case reflection_info_1.ScalarType.FLOAT:
- t = binary_format_contract_1.WireType.Bit32;
- m = "float";
- break;
- case reflection_info_1.ScalarType.INT64:
- d = i || pb_long_1.PbLong.from(value).isZero();
- m = "int64";
- break;
- case reflection_info_1.ScalarType.UINT64:
- d = i || pb_long_1.PbULong.from(value).isZero();
- m = "uint64";
- break;
- case reflection_info_1.ScalarType.FIXED64:
- d = i || pb_long_1.PbULong.from(value).isZero();
- t = binary_format_contract_1.WireType.Bit64;
- m = "fixed64";
- break;
- case reflection_info_1.ScalarType.BYTES:
- d = i || !value.byteLength;
- t = binary_format_contract_1.WireType.LengthDelimited;
- m = "bytes";
- break;
- case reflection_info_1.ScalarType.FIXED32:
- t = binary_format_contract_1.WireType.Bit32;
- m = "fixed32";
- break;
- case reflection_info_1.ScalarType.SFIXED32:
- t = binary_format_contract_1.WireType.Bit32;
- m = "sfixed32";
- break;
- case reflection_info_1.ScalarType.SFIXED64:
- d = i || pb_long_1.PbLong.from(value).isZero();
- t = binary_format_contract_1.WireType.Bit64;
- m = "sfixed64";
- break;
- case reflection_info_1.ScalarType.SINT32:
- m = "sint32";
- break;
- case reflection_info_1.ScalarType.SINT64:
- d = i || pb_long_1.PbLong.from(value).isZero();
- m = "sint64";
- break;
- }
- return [t, m, i || d];
- }
-}
-exports.ReflectionBinaryWriter = ReflectionBinaryWriter;
-
-
-/***/ }),
-
-/***/ 67317:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.containsMessageType = void 0;
-const message_type_contract_1 = __nccwpck_require__(1682);
-/**
- * Check if the provided object is a proto message.
- *
- * Note that this is an experimental feature - it is here to stay, but
- * implementation details may change without notice.
- */
-function containsMessageType(msg) {
- return msg[message_type_contract_1.MESSAGE_TYPE] != null;
-}
-exports.containsMessageType = containsMessageType;
-
-
-/***/ }),
-
-/***/ 60390:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.reflectionCreate = void 0;
-const reflection_scalar_default_1 = __nccwpck_require__(74863);
-const message_type_contract_1 = __nccwpck_require__(1682);
-/**
- * Creates an instance of the generic message, using the field
- * information.
- */
-function reflectionCreate(type) {
- /**
- * This ternary can be removed in the next major version.
- * The `Object.create()` code path utilizes a new `messagePrototype`
- * property on the `IMessageType` which has this same `MESSAGE_TYPE`
- * non-enumerable property on it. Doing it this way means that we only
- * pay the cost of `Object.defineProperty()` once per `IMessageType`
- * class of once per "instance". The falsy code path is only provided
- * for backwards compatibility in cases where the runtime library is
- * updated without also updating the generated code.
- */
- const msg = type.messagePrototype
- ? Object.create(type.messagePrototype)
- : Object.defineProperty({}, message_type_contract_1.MESSAGE_TYPE, { value: type });
- for (let field of type.fields) {
- let name = field.localName;
- if (field.opt)
- continue;
- if (field.oneof)
- msg[field.oneof] = { oneofKind: undefined };
- else if (field.repeat)
- msg[name] = [];
- else
- switch (field.kind) {
- case "scalar":
- msg[name] = reflection_scalar_default_1.reflectionScalarDefault(field.T, field.L);
- break;
- case "enum":
- // we require 0 to be default value for all enums
- msg[name] = 0;
- break;
- case "map":
- msg[name] = {};
- break;
- }
- }
- return msg;
-}
-exports.reflectionCreate = reflectionCreate;
-
-
-/***/ }),
-
-/***/ 39473:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.reflectionEquals = void 0;
-const reflection_info_1 = __nccwpck_require__(21370);
-/**
- * Determines whether two message of the same type have the same field values.
- * Checks for deep equality, traversing repeated fields, oneof groups, maps
- * and messages recursively.
- * Will also return true if both messages are `undefined`.
- */
-function reflectionEquals(info, a, b) {
- if (a === b)
- return true;
- if (!a || !b)
- return false;
- for (let field of info.fields) {
- let localName = field.localName;
- let val_a = field.oneof ? a[field.oneof][localName] : a[localName];
- let val_b = field.oneof ? b[field.oneof][localName] : b[localName];
- switch (field.kind) {
- case "enum":
- case "scalar":
- let t = field.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.T;
- if (!(field.repeat
- ? repeatedPrimitiveEq(t, val_a, val_b)
- : primitiveEq(t, val_a, val_b)))
- return false;
- break;
- case "map":
- if (!(field.V.kind == "message"
- ? repeatedMsgEq(field.V.T(), objectValues(val_a), objectValues(val_b))
- : repeatedPrimitiveEq(field.V.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.V.T, objectValues(val_a), objectValues(val_b))))
- return false;
- break;
- case "message":
- let T = field.T();
- if (!(field.repeat
- ? repeatedMsgEq(T, val_a, val_b)
- : T.equals(val_a, val_b)))
- return false;
- break;
- }
- }
- return true;
-}
-exports.reflectionEquals = reflectionEquals;
-const objectValues = Object.values;
-function primitiveEq(type, a, b) {
- if (a === b)
- return true;
- if (type !== reflection_info_1.ScalarType.BYTES)
- return false;
- let ba = a;
- let bb = b;
- if (ba.length !== bb.length)
- return false;
- for (let i = 0; i < ba.length; i++)
- if (ba[i] != bb[i])
- return false;
- return true;
-}
-function repeatedPrimitiveEq(type, a, b) {
- if (a.length !== b.length)
- return false;
- for (let i = 0; i < a.length; i++)
- if (!primitiveEq(type, a[i], b[i]))
- return false;
- return true;
-}
-function repeatedMsgEq(type, a, b) {
- if (a.length !== b.length)
- return false;
- for (let i = 0; i < a.length; i++)
- if (!type.equals(a[i], b[i]))
- return false;
- return true;
-}
-
-
-/***/ }),
-
-/***/ 21370:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.readMessageOption = exports.readFieldOption = exports.readFieldOptions = exports.normalizeFieldInfo = exports.RepeatType = exports.LongType = exports.ScalarType = void 0;
-const lower_camel_case_1 = __nccwpck_require__(34772);
-/**
- * Scalar value types. This is a subset of field types declared by protobuf
- * enum google.protobuf.FieldDescriptorProto.Type The types GROUP and MESSAGE
- * are omitted, but the numerical values are identical.
- */
-var ScalarType;
-(function (ScalarType) {
- // 0 is reserved for errors.
- // Order is weird for historical reasons.
- ScalarType[ScalarType["DOUBLE"] = 1] = "DOUBLE";
- ScalarType[ScalarType["FLOAT"] = 2] = "FLOAT";
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
- // negative values are likely.
- ScalarType[ScalarType["INT64"] = 3] = "INT64";
- ScalarType[ScalarType["UINT64"] = 4] = "UINT64";
- // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
- // negative values are likely.
- ScalarType[ScalarType["INT32"] = 5] = "INT32";
- ScalarType[ScalarType["FIXED64"] = 6] = "FIXED64";
- ScalarType[ScalarType["FIXED32"] = 7] = "FIXED32";
- ScalarType[ScalarType["BOOL"] = 8] = "BOOL";
- ScalarType[ScalarType["STRING"] = 9] = "STRING";
- // Tag-delimited aggregate.
- // Group type is deprecated and not supported in proto3. However, Proto3
- // implementations should still be able to parse the group wire format and
- // treat group fields as unknown fields.
- // TYPE_GROUP = 10,
- // TYPE_MESSAGE = 11, // Length-delimited aggregate.
- // New in version 2.
- ScalarType[ScalarType["BYTES"] = 12] = "BYTES";
- ScalarType[ScalarType["UINT32"] = 13] = "UINT32";
- // TYPE_ENUM = 14,
- ScalarType[ScalarType["SFIXED32"] = 15] = "SFIXED32";
- ScalarType[ScalarType["SFIXED64"] = 16] = "SFIXED64";
- ScalarType[ScalarType["SINT32"] = 17] = "SINT32";
- ScalarType[ScalarType["SINT64"] = 18] = "SINT64";
-})(ScalarType = exports.ScalarType || (exports.ScalarType = {}));
-/**
- * JavaScript representation of 64 bit integral types. Equivalent to the
- * field option "jstype".
- *
- * By default, protobuf-ts represents 64 bit types as `bigint`.
- *
- * You can change the default behaviour by enabling the plugin parameter
- * `long_type_string`, which will represent 64 bit types as `string`.
- *
- * Alternatively, you can change the behaviour for individual fields
- * with the field option "jstype":
- *
- * ```protobuf
- * uint64 my_field = 1 [jstype = JS_STRING];
- * uint64 other_field = 2 [jstype = JS_NUMBER];
- * ```
- */
-var LongType;
-(function (LongType) {
- /**
- * Use JavaScript `bigint`.
- *
- * Field option `[jstype = JS_NORMAL]`.
- */
- LongType[LongType["BIGINT"] = 0] = "BIGINT";
- /**
- * Use JavaScript `string`.
- *
- * Field option `[jstype = JS_STRING]`.
- */
- LongType[LongType["STRING"] = 1] = "STRING";
- /**
- * Use JavaScript `number`.
- *
- * Large values will loose precision.
- *
- * Field option `[jstype = JS_NUMBER]`.
- */
- LongType[LongType["NUMBER"] = 2] = "NUMBER";
-})(LongType = exports.LongType || (exports.LongType = {}));
-/**
- * Protobuf 2.1.0 introduced packed repeated fields.
- * Setting the field option `[packed = true]` enables packing.
- *
- * In proto3, all repeated fields are packed by default.
- * Setting the field option `[packed = false]` disables packing.
- *
- * Packed repeated fields are encoded with a single tag,
- * then a length-delimiter, then the element values.
- *
- * Unpacked repeated fields are encoded with a tag and
- * value for each element.
- *
- * `bytes` and `string` cannot be packed.
- */
-var RepeatType;
-(function (RepeatType) {
- /**
- * The field is not repeated.
- */
- RepeatType[RepeatType["NO"] = 0] = "NO";
- /**
- * The field is repeated and should be packed.
- * Invalid for `bytes` and `string`, they cannot be packed.
- */
- RepeatType[RepeatType["PACKED"] = 1] = "PACKED";
- /**
- * The field is repeated but should not be packed.
- * The only valid repeat type for repeated `bytes` and `string`.
- */
- RepeatType[RepeatType["UNPACKED"] = 2] = "UNPACKED";
-})(RepeatType = exports.RepeatType || (exports.RepeatType = {}));
-/**
- * Turns PartialFieldInfo into FieldInfo.
- */
-function normalizeFieldInfo(field) {
- var _a, _b, _c, _d;
- field.localName = (_a = field.localName) !== null && _a !== void 0 ? _a : lower_camel_case_1.lowerCamelCase(field.name);
- field.jsonName = (_b = field.jsonName) !== null && _b !== void 0 ? _b : lower_camel_case_1.lowerCamelCase(field.name);
- field.repeat = (_c = field.repeat) !== null && _c !== void 0 ? _c : RepeatType.NO;
- field.opt = (_d = field.opt) !== null && _d !== void 0 ? _d : (field.repeat ? false : field.oneof ? false : field.kind == "message");
- return field;
-}
-exports.normalizeFieldInfo = normalizeFieldInfo;
-/**
- * Read custom field options from a generated message type.
- *
- * @deprecated use readFieldOption()
- */
-function readFieldOptions(messageType, fieldName, extensionName, extensionType) {
- var _a;
- const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options;
- return options && options[extensionName] ? extensionType.fromJson(options[extensionName]) : undefined;
-}
-exports.readFieldOptions = readFieldOptions;
-function readFieldOption(messageType, fieldName, extensionName, extensionType) {
- var _a;
- const options = (_a = messageType.fields.find((m, i) => m.localName == fieldName || i == fieldName)) === null || _a === void 0 ? void 0 : _a.options;
- if (!options) {
- return undefined;
- }
- const optionVal = options[extensionName];
- if (optionVal === undefined) {
- return optionVal;
- }
- return extensionType ? extensionType.fromJson(optionVal) : optionVal;
-}
-exports.readFieldOption = readFieldOption;
-function readMessageOption(messageType, extensionName, extensionType) {
- const options = messageType.options;
- const optionVal = options[extensionName];
- if (optionVal === undefined) {
- return optionVal;
- }
- return extensionType ? extensionType.fromJson(optionVal) : optionVal;
-}
-exports.readMessageOption = readMessageOption;
-
-
-/***/ }),
-
-/***/ 229:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ReflectionJsonReader = void 0;
-const json_typings_1 = __nccwpck_require__(70661);
-const base64_1 = __nccwpck_require__(20196);
-const reflection_info_1 = __nccwpck_require__(21370);
-const pb_long_1 = __nccwpck_require__(47777);
-const assert_1 = __nccwpck_require__(54253);
-const reflection_long_convert_1 = __nccwpck_require__(24612);
-/**
- * Reads proto3 messages in canonical JSON format using reflection information.
- *
- * https://developers.google.com/protocol-buffers/docs/proto3#json
- */
-class ReflectionJsonReader {
- constructor(info) {
- this.info = info;
- }
- prepare() {
- var _a;
- if (this.fMap === undefined) {
- this.fMap = {};
- const fieldsInput = (_a = this.info.fields) !== null && _a !== void 0 ? _a : [];
- for (const field of fieldsInput) {
- this.fMap[field.name] = field;
- this.fMap[field.jsonName] = field;
- this.fMap[field.localName] = field;
- }
- }
- }
- // Cannot parse JSON for #.
- assert(condition, fieldName, jsonValue) {
- if (!condition) {
- let what = json_typings_1.typeofJsonValue(jsonValue);
- if (what == "number" || what == "boolean")
- what = jsonValue.toString();
- throw new Error(`Cannot parse JSON ${what} for ${this.info.typeName}#${fieldName}`);
- }
- }
- /**
- * Reads a message from canonical JSON format into the target message.
- *
- * Repeated fields are appended. Map entries are added, overwriting
- * existing keys.
- *
- * If a message field is already present, it will be merged with the
- * new data.
- */
- read(input, message, options) {
- this.prepare();
- const oneofsHandled = [];
- for (const [jsonKey, jsonValue] of Object.entries(input)) {
- const field = this.fMap[jsonKey];
- if (!field) {
- if (!options.ignoreUnknownFields)
- throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${jsonKey}`);
- continue;
- }
- const localName = field.localName;
- // handle oneof ADT
- let target; // this will be the target for the field value, whether it is member of a oneof or not
- if (field.oneof) {
- if (jsonValue === null && (field.kind !== 'enum' || field.T()[0] !== 'google.protobuf.NullValue')) {
- continue;
- }
- // since json objects are unordered by specification, it is not possible to take the last of multiple oneofs
- if (oneofsHandled.includes(field.oneof))
- throw new Error(`Multiple members of the oneof group "${field.oneof}" of ${this.info.typeName} are present in JSON.`);
- oneofsHandled.push(field.oneof);
- target = message[field.oneof] = {
- oneofKind: localName
- };
- }
- else {
- target = message;
- }
- // we have handled oneof above. we just have read the value into `target`.
- if (field.kind == 'map') {
- if (jsonValue === null) {
- continue;
- }
- // check input
- this.assert(json_typings_1.isJsonObject(jsonValue), field.name, jsonValue);
- // our target to put map entries into
- const fieldObj = target[localName];
- // read entries
- for (const [jsonObjKey, jsonObjValue] of Object.entries(jsonValue)) {
- this.assert(jsonObjValue !== null, field.name + " map value", null);
- // read value
- let val;
- switch (field.V.kind) {
- case "message":
- val = field.V.T().internalJsonRead(jsonObjValue, options);
- break;
- case "enum":
- val = this.enum(field.V.T(), jsonObjValue, field.name, options.ignoreUnknownFields);
- if (val === false)
- continue;
- break;
- case "scalar":
- val = this.scalar(jsonObjValue, field.V.T, field.V.L, field.name);
- break;
- }
- this.assert(val !== undefined, field.name + " map value", jsonObjValue);
- // read key
- let key = jsonObjKey;
- if (field.K == reflection_info_1.ScalarType.BOOL)
- key = key == "true" ? true : key == "false" ? false : key;
- key = this.scalar(key, field.K, reflection_info_1.LongType.STRING, field.name).toString();
- fieldObj[key] = val;
- }
- }
- else if (field.repeat) {
- if (jsonValue === null)
- continue;
- // check input
- this.assert(Array.isArray(jsonValue), field.name, jsonValue);
- // our target to put array entries into
- const fieldArr = target[localName];
- // read array entries
- for (const jsonItem of jsonValue) {
- this.assert(jsonItem !== null, field.name, null);
- let val;
- switch (field.kind) {
- case "message":
- val = field.T().internalJsonRead(jsonItem, options);
- break;
- case "enum":
- val = this.enum(field.T(), jsonItem, field.name, options.ignoreUnknownFields);
- if (val === false)
- continue;
- break;
- case "scalar":
- val = this.scalar(jsonItem, field.T, field.L, field.name);
- break;
- }
- this.assert(val !== undefined, field.name, jsonValue);
- fieldArr.push(val);
- }
- }
- else {
- switch (field.kind) {
- case "message":
- if (jsonValue === null && field.T().typeName != 'google.protobuf.Value') {
- this.assert(field.oneof === undefined, field.name + " (oneof member)", null);
- continue;
- }
- target[localName] = field.T().internalJsonRead(jsonValue, options, target[localName]);
- break;
- case "enum":
- if (jsonValue === null)
- continue;
- let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields);
- if (val === false)
- continue;
- target[localName] = val;
- break;
- case "scalar":
- if (jsonValue === null)
- continue;
- target[localName] = this.scalar(jsonValue, field.T, field.L, field.name);
- break;
- }
- }
- }
- }
- /**
- * Returns `false` for unrecognized string representations.
- *
- * google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`).
- */
- enum(type, json, fieldName, ignoreUnknownFields) {
- if (type[0] == 'google.protobuf.NullValue')
- assert_1.assert(json === null || json === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} only accepts null.`);
- if (json === null)
- // we require 0 to be default value for all enums
- return 0;
- switch (typeof json) {
- case "number":
- assert_1.assert(Number.isInteger(json), `Unable to parse field ${this.info.typeName}#${fieldName}, enum can only be integral number, got ${json}.`);
- return json;
- case "string":
- let localEnumName = json;
- if (type[2] && json.substring(0, type[2].length) === type[2])
- // lookup without the shared prefix
- localEnumName = json.substring(type[2].length);
- let enumNumber = type[1][localEnumName];
- if (typeof enumNumber === 'undefined' && ignoreUnknownFields) {
- return false;
- }
- assert_1.assert(typeof enumNumber == "number", `Unable to parse field ${this.info.typeName}#${fieldName}, enum ${type[0]} has no value for "${json}".`);
- return enumNumber;
- }
- assert_1.assert(false, `Unable to parse field ${this.info.typeName}#${fieldName}, cannot parse enum value from ${typeof json}".`);
- }
- scalar(json, type, longType, fieldName) {
- let e;
- try {
- switch (type) {
- // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
- // Either numbers or strings are accepted. Exponent notation is also accepted.
- case reflection_info_1.ScalarType.DOUBLE:
- case reflection_info_1.ScalarType.FLOAT:
- if (json === null)
- return .0;
- if (json === "NaN")
- return Number.NaN;
- if (json === "Infinity")
- return Number.POSITIVE_INFINITY;
- if (json === "-Infinity")
- return Number.NEGATIVE_INFINITY;
- if (json === "") {
- e = "empty string";
- break;
- }
- if (typeof json == "string" && json.trim().length !== json.length) {
- e = "extra whitespace";
- break;
- }
- if (typeof json != "string" && typeof json != "number") {
- break;
- }
- let float = Number(json);
- if (Number.isNaN(float)) {
- e = "not a number";
- break;
- }
- if (!Number.isFinite(float)) {
- // infinity and -infinity are handled by string representation above, so this is an error
- e = "too large or small";
- break;
- }
- if (type == reflection_info_1.ScalarType.FLOAT)
- assert_1.assertFloat32(float);
- return float;
- // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.
- case reflection_info_1.ScalarType.INT32:
- case reflection_info_1.ScalarType.FIXED32:
- case reflection_info_1.ScalarType.SFIXED32:
- case reflection_info_1.ScalarType.SINT32:
- case reflection_info_1.ScalarType.UINT32:
- if (json === null)
- return 0;
- let int32;
- if (typeof json == "number")
- int32 = json;
- else if (json === "")
- e = "empty string";
- else if (typeof json == "string") {
- if (json.trim().length !== json.length)
- e = "extra whitespace";
- else
- int32 = Number(json);
- }
- if (int32 === undefined)
- break;
- if (type == reflection_info_1.ScalarType.UINT32)
- assert_1.assertUInt32(int32);
- else
- assert_1.assertInt32(int32);
- return int32;
- // int64, fixed64, uint64: JSON value will be a decimal string. Either numbers or strings are accepted.
- case reflection_info_1.ScalarType.INT64:
- case reflection_info_1.ScalarType.SFIXED64:
- case reflection_info_1.ScalarType.SINT64:
- if (json === null)
- return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType);
- if (typeof json != "number" && typeof json != "string")
- break;
- return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.from(json), longType);
- case reflection_info_1.ScalarType.FIXED64:
- case reflection_info_1.ScalarType.UINT64:
- if (json === null)
- return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType);
- if (typeof json != "number" && typeof json != "string")
- break;
- return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.from(json), longType);
- // bool:
- case reflection_info_1.ScalarType.BOOL:
- if (json === null)
- return false;
- if (typeof json !== "boolean")
- break;
- return json;
- // string:
- case reflection_info_1.ScalarType.STRING:
- if (json === null)
- return "";
- if (typeof json !== "string") {
- e = "extra whitespace";
- break;
- }
- try {
- encodeURIComponent(json);
- }
- catch (e) {
- e = "invalid UTF8";
- break;
- }
- return json;
- // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
- // Either standard or URL-safe base64 encoding with/without paddings are accepted.
- case reflection_info_1.ScalarType.BYTES:
- if (json === null || json === "")
- return new Uint8Array(0);
- if (typeof json !== 'string')
- break;
- return base64_1.base64decode(json);
- }
- }
- catch (error) {
- e = error.message;
- }
- this.assert(false, fieldName + (e ? " - " + e : ""), json);
- }
-}
-exports.ReflectionJsonReader = ReflectionJsonReader;
-
-
-/***/ }),
-
-/***/ 68980:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ReflectionJsonWriter = void 0;
-const base64_1 = __nccwpck_require__(20196);
-const pb_long_1 = __nccwpck_require__(47777);
-const reflection_info_1 = __nccwpck_require__(21370);
-const assert_1 = __nccwpck_require__(54253);
-/**
- * Writes proto3 messages in canonical JSON format using reflection
- * information.
- *
- * https://developers.google.com/protocol-buffers/docs/proto3#json
- */
-class ReflectionJsonWriter {
- constructor(info) {
- var _a;
- this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : [];
- }
- /**
- * Converts the message to a JSON object, based on the field descriptors.
- */
- write(message, options) {
- const json = {}, source = message;
- for (const field of this.fields) {
- // field is not part of a oneof, simply write as is
- if (!field.oneof) {
- let jsonValue = this.field(field, source[field.localName], options);
- if (jsonValue !== undefined)
- json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue;
- continue;
- }
- // field is part of a oneof
- const group = source[field.oneof];
- if (group.oneofKind !== field.localName)
- continue; // not selected, skip
- const opt = field.kind == 'scalar' || field.kind == 'enum'
- ? Object.assign(Object.assign({}, options), { emitDefaultValues: true }) : options;
- let jsonValue = this.field(field, group[field.localName], opt);
- assert_1.assert(jsonValue !== undefined);
- json[options.useProtoFieldName ? field.name : field.jsonName] = jsonValue;
- }
- return json;
- }
- field(field, value, options) {
- let jsonValue = undefined;
- if (field.kind == 'map') {
- assert_1.assert(typeof value == "object" && value !== null);
- const jsonObj = {};
- switch (field.V.kind) {
- case "scalar":
- for (const [entryKey, entryValue] of Object.entries(value)) {
- const val = this.scalar(field.V.T, entryValue, field.name, false, true);
- assert_1.assert(val !== undefined);
- jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key
- }
- break;
- case "message":
- const messageType = field.V.T();
- for (const [entryKey, entryValue] of Object.entries(value)) {
- const val = this.message(messageType, entryValue, field.name, options);
- assert_1.assert(val !== undefined);
- jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key
- }
- break;
- case "enum":
- const enumInfo = field.V.T();
- for (const [entryKey, entryValue] of Object.entries(value)) {
- assert_1.assert(entryValue === undefined || typeof entryValue == 'number');
- const val = this.enum(enumInfo, entryValue, field.name, false, true, options.enumAsInteger);
- assert_1.assert(val !== undefined);
- jsonObj[entryKey.toString()] = val; // JSON standard allows only (double quoted) string as property key
- }
- break;
- }
- if (options.emitDefaultValues || Object.keys(jsonObj).length > 0)
- jsonValue = jsonObj;
- }
- else if (field.repeat) {
- assert_1.assert(Array.isArray(value));
- const jsonArr = [];
- switch (field.kind) {
- case "scalar":
- for (let i = 0; i < value.length; i++) {
- const val = this.scalar(field.T, value[i], field.name, field.opt, true);
- assert_1.assert(val !== undefined);
- jsonArr.push(val);
- }
- break;
- case "enum":
- const enumInfo = field.T();
- for (let i = 0; i < value.length; i++) {
- assert_1.assert(value[i] === undefined || typeof value[i] == 'number');
- const val = this.enum(enumInfo, value[i], field.name, field.opt, true, options.enumAsInteger);
- assert_1.assert(val !== undefined);
- jsonArr.push(val);
- }
- break;
- case "message":
- const messageType = field.T();
- for (let i = 0; i < value.length; i++) {
- const val = this.message(messageType, value[i], field.name, options);
- assert_1.assert(val !== undefined);
- jsonArr.push(val);
- }
- break;
- }
- // add converted array to json output
- if (options.emitDefaultValues || jsonArr.length > 0 || options.emitDefaultValues)
- jsonValue = jsonArr;
- }
- else {
- switch (field.kind) {
- case "scalar":
- jsonValue = this.scalar(field.T, value, field.name, field.opt, options.emitDefaultValues);
- break;
- case "enum":
- jsonValue = this.enum(field.T(), value, field.name, field.opt, options.emitDefaultValues, options.enumAsInteger);
- break;
- case "message":
- jsonValue = this.message(field.T(), value, field.name, options);
- break;
- }
- }
- return jsonValue;
- }
- /**
- * Returns `null` as the default for google.protobuf.NullValue.
- */
- enum(type, value, fieldName, optional, emitDefaultValues, enumAsInteger) {
- if (type[0] == 'google.protobuf.NullValue')
- return !emitDefaultValues && !optional ? undefined : null;
- if (value === undefined) {
- assert_1.assert(optional);
- return undefined;
- }
- if (value === 0 && !emitDefaultValues && !optional)
- // we require 0 to be default value for all enums
- return undefined;
- assert_1.assert(typeof value == 'number');
- assert_1.assert(Number.isInteger(value));
- if (enumAsInteger || !type[1].hasOwnProperty(value))
- // if we don't now the enum value, just return the number
- return value;
- if (type[2])
- // restore the dropped prefix
- return type[2] + type[1][value];
- return type[1][value];
- }
- message(type, value, fieldName, options) {
- if (value === undefined)
- return options.emitDefaultValues ? null : undefined;
- return type.internalJsonWrite(value, options);
- }
- scalar(type, value, fieldName, optional, emitDefaultValues) {
- if (value === undefined) {
- assert_1.assert(optional);
- return undefined;
- }
- const ed = emitDefaultValues || optional;
- // noinspection FallThroughInSwitchStatementJS
- switch (type) {
- // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.
- case reflection_info_1.ScalarType.INT32:
- case reflection_info_1.ScalarType.SFIXED32:
- case reflection_info_1.ScalarType.SINT32:
- if (value === 0)
- return ed ? 0 : undefined;
- assert_1.assertInt32(value);
- return value;
- case reflection_info_1.ScalarType.FIXED32:
- case reflection_info_1.ScalarType.UINT32:
- if (value === 0)
- return ed ? 0 : undefined;
- assert_1.assertUInt32(value);
- return value;
- // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
- // Either numbers or strings are accepted. Exponent notation is also accepted.
- case reflection_info_1.ScalarType.FLOAT:
- assert_1.assertFloat32(value);
- case reflection_info_1.ScalarType.DOUBLE:
- if (value === 0)
- return ed ? 0 : undefined;
- assert_1.assert(typeof value == 'number');
- if (Number.isNaN(value))
- return 'NaN';
- if (value === Number.POSITIVE_INFINITY)
- return 'Infinity';
- if (value === Number.NEGATIVE_INFINITY)
- return '-Infinity';
- return value;
- // string:
- case reflection_info_1.ScalarType.STRING:
- if (value === "")
- return ed ? '' : undefined;
- assert_1.assert(typeof value == 'string');
- return value;
- // bool:
- case reflection_info_1.ScalarType.BOOL:
- if (value === false)
- return ed ? false : undefined;
- assert_1.assert(typeof value == 'boolean');
- return value;
- // JSON value will be a decimal string. Either numbers or strings are accepted.
- case reflection_info_1.ScalarType.UINT64:
- case reflection_info_1.ScalarType.FIXED64:
- assert_1.assert(typeof value == 'number' || typeof value == 'string' || typeof value == 'bigint');
- let ulong = pb_long_1.PbULong.from(value);
- if (ulong.isZero() && !ed)
- return undefined;
- return ulong.toString();
- // JSON value will be a decimal string. Either numbers or strings are accepted.
- case reflection_info_1.ScalarType.INT64:
- case reflection_info_1.ScalarType.SFIXED64:
- case reflection_info_1.ScalarType.SINT64:
- assert_1.assert(typeof value == 'number' || typeof value == 'string' || typeof value == 'bigint');
- let long = pb_long_1.PbLong.from(value);
- if (long.isZero() && !ed)
- return undefined;
- return long.toString();
- // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
- // Either standard or URL-safe base64 encoding with/without paddings are accepted.
- case reflection_info_1.ScalarType.BYTES:
- assert_1.assert(value instanceof Uint8Array);
- if (!value.byteLength)
- return ed ? "" : undefined;
- return base64_1.base64encode(value);
- }
- }
-}
-exports.ReflectionJsonWriter = ReflectionJsonWriter;
-
-
-/***/ }),
-
-/***/ 24612:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.reflectionLongConvert = void 0;
-const reflection_info_1 = __nccwpck_require__(21370);
-/**
- * Utility method to convert a PbLong or PbUlong to a JavaScript
- * representation during runtime.
- *
- * Works with generated field information, `undefined` is equivalent
- * to `STRING`.
- */
-function reflectionLongConvert(long, type) {
- switch (type) {
- case reflection_info_1.LongType.BIGINT:
- return long.toBigInt();
- case reflection_info_1.LongType.NUMBER:
- return long.toNumber();
- default:
- // case undefined:
- // case LongType.STRING:
- return long.toString();
- }
-}
-exports.reflectionLongConvert = reflectionLongConvert;
-
-
-/***/ }),
-
-/***/ 7869:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.reflectionMergePartial = void 0;
-/**
- * Copy partial data into the target message.
- *
- * If a singular scalar or enum field is present in the source, it
- * replaces the field in the target.
- *
- * If a singular message field is present in the source, it is merged
- * with the target field by calling mergePartial() of the responsible
- * message type.
- *
- * If a repeated field is present in the source, its values replace
- * all values in the target array, removing extraneous values.
- * Repeated message fields are copied, not merged.
- *
- * If a map field is present in the source, entries are added to the
- * target map, replacing entries with the same key. Entries that only
- * exist in the target remain. Entries with message values are copied,
- * not merged.
- *
- * Note that this function differs from protobuf merge semantics,
- * which appends repeated fields.
- */
-function reflectionMergePartial(info, target, source) {
- let fieldValue, // the field value we are working with
- input = source, output; // where we want our field value to go
- for (let field of info.fields) {
- let name = field.localName;
- if (field.oneof) {
- const group = input[field.oneof]; // this is the oneof`s group in the source
- if ((group === null || group === void 0 ? void 0 : group.oneofKind) == undefined) { // the user is free to omit
- continue; // we skip this field, and all other members too
- }
- fieldValue = group[name]; // our value comes from the the oneof group of the source
- output = target[field.oneof]; // and our output is the oneof group of the target
- output.oneofKind = group.oneofKind; // always update discriminator
- if (fieldValue == undefined) {
- delete output[name]; // remove any existing value
- continue; // skip further work on field
- }
- }
- else {
- fieldValue = input[name]; // we are using the source directly
- output = target; // we want our field value to go directly into the target
- if (fieldValue == undefined) {
- continue; // skip further work on field, existing value is used as is
- }
- }
- if (field.repeat)
- output[name].length = fieldValue.length; // resize target array to match source array
- // now we just work with `fieldValue` and `output` to merge the value
- switch (field.kind) {
- case "scalar":
- case "enum":
- if (field.repeat)
- for (let i = 0; i < fieldValue.length; i++)
- output[name][i] = fieldValue[i]; // not a reference type
- else
- output[name] = fieldValue; // not a reference type
- break;
- case "message":
- let T = field.T();
- if (field.repeat)
- for (let i = 0; i < fieldValue.length; i++)
- output[name][i] = T.create(fieldValue[i]);
- else if (output[name] === undefined)
- output[name] = T.create(fieldValue); // nothing to merge with
- else
- T.mergePartial(output[name], fieldValue);
- break;
- case "map":
- // Map and repeated fields are simply overwritten, not appended or merged
- switch (field.V.kind) {
- case "scalar":
- case "enum":
- Object.assign(output[name], fieldValue); // elements are not reference types
- break;
- case "message":
- let T = field.V.T();
- for (let k of Object.keys(fieldValue))
- output[name][k] = T.create(fieldValue[k]);
- break;
- }
- break;
- }
- }
-}
-exports.reflectionMergePartial = reflectionMergePartial;
-
-
-/***/ }),
-
-/***/ 74863:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.reflectionScalarDefault = void 0;
-const reflection_info_1 = __nccwpck_require__(21370);
-const reflection_long_convert_1 = __nccwpck_require__(24612);
-const pb_long_1 = __nccwpck_require__(47777);
-/**
- * Creates the default value for a scalar type.
- */
-function reflectionScalarDefault(type, longType = reflection_info_1.LongType.STRING) {
- switch (type) {
- case reflection_info_1.ScalarType.BOOL:
- return false;
- case reflection_info_1.ScalarType.UINT64:
- case reflection_info_1.ScalarType.FIXED64:
- return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbULong.ZERO, longType);
- case reflection_info_1.ScalarType.INT64:
- case reflection_info_1.ScalarType.SFIXED64:
- case reflection_info_1.ScalarType.SINT64:
- return reflection_long_convert_1.reflectionLongConvert(pb_long_1.PbLong.ZERO, longType);
- case reflection_info_1.ScalarType.DOUBLE:
- case reflection_info_1.ScalarType.FLOAT:
- return 0.0;
- case reflection_info_1.ScalarType.BYTES:
- return new Uint8Array(0);
- case reflection_info_1.ScalarType.STRING:
- return "";
- default:
- // case ScalarType.INT32:
- // case ScalarType.UINT32:
- // case ScalarType.SINT32:
- // case ScalarType.FIXED32:
- // case ScalarType.SFIXED32:
- return 0;
- }
-}
-exports.reflectionScalarDefault = reflectionScalarDefault;
-
-
-/***/ }),
-
-/***/ 20903:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.ReflectionTypeCheck = void 0;
-const reflection_info_1 = __nccwpck_require__(21370);
-const oneof_1 = __nccwpck_require__(78531);
-// noinspection JSMethodCanBeStatic
-class ReflectionTypeCheck {
- constructor(info) {
- var _a;
- this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : [];
- }
- prepare() {
- if (this.data)
- return;
- const req = [], known = [], oneofs = [];
- for (let field of this.fields) {
- if (field.oneof) {
- if (!oneofs.includes(field.oneof)) {
- oneofs.push(field.oneof);
- req.push(field.oneof);
- known.push(field.oneof);
- }
- }
- else {
- known.push(field.localName);
- switch (field.kind) {
- case "scalar":
- case "enum":
- if (!field.opt || field.repeat)
- req.push(field.localName);
- break;
- case "message":
- if (field.repeat)
- req.push(field.localName);
- break;
- case "map":
- req.push(field.localName);
- break;
- }
- }
- }
- this.data = { req, known, oneofs: Object.values(oneofs) };
- }
- /**
- * Is the argument a valid message as specified by the
- * reflection information?
- *
- * Checks all field types recursively. The `depth`
- * specifies how deep into the structure the check will be.
- *
- * With a depth of 0, only the presence of fields
- * is checked.
- *
- * With a depth of 1 or more, the field types are checked.
- *
- * With a depth of 2 or more, the members of map, repeated
- * and message fields are checked.
- *
- * Message fields will be checked recursively with depth - 1.
- *
- * The number of map entries / repeated values being checked
- * is < depth.
- */
- is(message, depth, allowExcessProperties = false) {
- if (depth < 0)
- return true;
- if (message === null || message === undefined || typeof message != 'object')
- return false;
- this.prepare();
- let keys = Object.keys(message), data = this.data;
- // if a required field is missing in arg, this cannot be a T
- if (keys.length < data.req.length || data.req.some(n => !keys.includes(n)))
- return false;
- if (!allowExcessProperties) {
- // if the arg contains a key we dont know, this is not a literal T
- if (keys.some(k => !data.known.includes(k)))
- return false;
- }
- // "With a depth of 0, only the presence and absence of fields is checked."
- // "With a depth of 1 or more, the field types are checked."
- if (depth < 1) {
- return true;
- }
- // check oneof group
- for (const name of data.oneofs) {
- const group = message[name];
- if (!oneof_1.isOneofGroup(group))
- return false;
- if (group.oneofKind === undefined)
- continue;
- const field = this.fields.find(f => f.localName === group.oneofKind);
- if (!field)
- return false; // we found no field, but have a kind, something is wrong
- if (!this.field(group[group.oneofKind], field, allowExcessProperties, depth))
- return false;
- }
- // check types
- for (const field of this.fields) {
- if (field.oneof !== undefined)
- continue;
- if (!this.field(message[field.localName], field, allowExcessProperties, depth))
- return false;
- }
- return true;
- }
- field(arg, field, allowExcessProperties, depth) {
- let repeated = field.repeat;
- switch (field.kind) {
- case "scalar":
- if (arg === undefined)
- return field.opt;
- if (repeated)
- return this.scalars(arg, field.T, depth, field.L);
- return this.scalar(arg, field.T, field.L);
- case "enum":
- if (arg === undefined)
- return field.opt;
- if (repeated)
- return this.scalars(arg, reflection_info_1.ScalarType.INT32, depth);
- return this.scalar(arg, reflection_info_1.ScalarType.INT32);
- case "message":
- if (arg === undefined)
- return true;
- if (repeated)
- return this.messages(arg, field.T(), allowExcessProperties, depth);
- return this.message(arg, field.T(), allowExcessProperties, depth);
- case "map":
- if (typeof arg != 'object' || arg === null)
- return false;
- if (depth < 2)
- return true;
- if (!this.mapKeys(arg, field.K, depth))
- return false;
- switch (field.V.kind) {
- case "scalar":
- return this.scalars(Object.values(arg), field.V.T, depth, field.V.L);
- case "enum":
- return this.scalars(Object.values(arg), reflection_info_1.ScalarType.INT32, depth);
- case "message":
- return this.messages(Object.values(arg), field.V.T(), allowExcessProperties, depth);
- }
- break;
- }
- return true;
- }
- message(arg, type, allowExcessProperties, depth) {
- if (allowExcessProperties) {
- return type.isAssignable(arg, depth);
- }
- return type.is(arg, depth);
- }
- messages(arg, type, allowExcessProperties, depth) {
- if (!Array.isArray(arg))
- return false;
- if (depth < 2)
- return true;
- if (allowExcessProperties) {
- for (let i = 0; i < arg.length && i < depth; i++)
- if (!type.isAssignable(arg[i], depth - 1))
- return false;
- }
- else {
- for (let i = 0; i < arg.length && i < depth; i++)
- if (!type.is(arg[i], depth - 1))
- return false;
- }
- return true;
- }
- scalar(arg, type, longType) {
- let argType = typeof arg;
- switch (type) {
- case reflection_info_1.ScalarType.UINT64:
- case reflection_info_1.ScalarType.FIXED64:
- case reflection_info_1.ScalarType.INT64:
- case reflection_info_1.ScalarType.SFIXED64:
- case reflection_info_1.ScalarType.SINT64:
- switch (longType) {
- case reflection_info_1.LongType.BIGINT:
- return argType == "bigint";
- case reflection_info_1.LongType.NUMBER:
- return argType == "number" && !isNaN(arg);
- default:
- return argType == "string";
- }
- case reflection_info_1.ScalarType.BOOL:
- return argType == 'boolean';
- case reflection_info_1.ScalarType.STRING:
- return argType == 'string';
- case reflection_info_1.ScalarType.BYTES:
- return arg instanceof Uint8Array;
- case reflection_info_1.ScalarType.DOUBLE:
- case reflection_info_1.ScalarType.FLOAT:
- return argType == 'number' && !isNaN(arg);
- default:
- // case ScalarType.UINT32:
- // case ScalarType.FIXED32:
- // case ScalarType.INT32:
- // case ScalarType.SINT32:
- // case ScalarType.SFIXED32:
- return argType == 'number' && Number.isInteger(arg);
- }
- }
- scalars(arg, type, depth, longType) {
- if (!Array.isArray(arg))
- return false;
- if (depth < 2)
- return true;
- if (Array.isArray(arg))
- for (let i = 0; i < arg.length && i < depth; i++)
- if (!this.scalar(arg[i], type, longType))
- return false;
- return true;
- }
- mapKeys(map, type, depth) {
- let keys = Object.keys(map);
- switch (type) {
- case reflection_info_1.ScalarType.INT32:
- case reflection_info_1.ScalarType.FIXED32:
- case reflection_info_1.ScalarType.SFIXED32:
- case reflection_info_1.ScalarType.SINT32:
- case reflection_info_1.ScalarType.UINT32:
- return this.scalars(keys.slice(0, depth).map(k => parseInt(k)), type, depth);
- case reflection_info_1.ScalarType.BOOL:
- return this.scalars(keys.slice(0, depth).map(k => k == 'true' ? true : k == 'false' ? false : k), type, depth);
- default:
- return this.scalars(keys, type, depth, reflection_info_1.LongType.STRING);
- }
- }
-}
-exports.ReflectionTypeCheck = ReflectionTypeCheck;
-
-
-/***/ }),
-
-/***/ 61659:
-/***/ ((module, exports, __nccwpck_require__) => {
-
-"use strict";
-/**
- * @author Toru Nagashima
- * See LICENSE file in root directory for full license.
- */
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-
-var eventTargetShim = __nccwpck_require__(84697);
-
-/**
- * The signal class.
- * @see https://dom.spec.whatwg.org/#abortsignal
- */
-class AbortSignal extends eventTargetShim.EventTarget {
- /**
- * AbortSignal cannot be constructed directly.
- */
- constructor() {
- super();
- throw new TypeError("AbortSignal cannot be constructed directly");
- }
- /**
- * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise.
- */
- get aborted() {
- const aborted = abortedFlags.get(this);
- if (typeof aborted !== "boolean") {
- throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`);
- }
- return aborted;
- }
-}
-eventTargetShim.defineEventAttribute(AbortSignal.prototype, "abort");
-/**
- * Create an AbortSignal object.
- */
-function createAbortSignal() {
- const signal = Object.create(AbortSignal.prototype);
- eventTargetShim.EventTarget.call(signal);
- abortedFlags.set(signal, false);
- return signal;
-}
-/**
- * Abort a given signal.
- */
-function abortSignal(signal) {
- if (abortedFlags.get(signal) !== false) {
- return;
- }
- abortedFlags.set(signal, true);
- signal.dispatchEvent({ type: "abort" });
-}
-/**
- * Aborted flag for each instances.
- */
-const abortedFlags = new WeakMap();
-// Properties should be enumerable.
-Object.defineProperties(AbortSignal.prototype, {
- aborted: { enumerable: true },
-});
-// `toString()` should return `"[object AbortSignal]"`
-if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") {
- Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, {
- configurable: true,
- value: "AbortSignal",
- });
-}
-
-/**
- * The AbortController.
- * @see https://dom.spec.whatwg.org/#abortcontroller
- */
-class AbortController {
- /**
- * Initialize this controller.
- */
- constructor() {
- signals.set(this, createAbortSignal());
- }
- /**
- * Returns the `AbortSignal` object associated with this object.
- */
- get signal() {
- return getSignal(this);
- }
- /**
- * Abort and signal to any observers that the associated activity is to be aborted.
- */
- abort() {
- abortSignal(getSignal(this));
- }
-}
-/**
- * Associated signals.
- */
-const signals = new WeakMap();
-/**
- * Get the associated signal of a given controller.
- */
-function getSignal(controller) {
- const signal = signals.get(controller);
- if (signal == null) {
- throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`);
- }
- return signal;
-}
-// Properties should be enumerable.
-Object.defineProperties(AbortController.prototype, {
- signal: { enumerable: true },
- abort: { enumerable: true },
-});
-if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") {
- Object.defineProperty(AbortController.prototype, Symbol.toStringTag, {
- configurable: true,
- value: "AbortController",
- });
-}
-
-exports.AbortController = AbortController;
-exports.AbortSignal = AbortSignal;
-exports["default"] = AbortController;
-
-module.exports = AbortController
-module.exports.AbortController = module.exports["default"] = AbortController
-module.exports.AbortSignal = AbortSignal
-//# sourceMappingURL=abort-controller.js.map
-
-
-/***/ }),
-
-/***/ 8348:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
-
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.req = exports.json = exports.toBuffer = void 0;
-const http = __importStar(__nccwpck_require__(13685));
-const https = __importStar(__nccwpck_require__(95687));
-async function toBuffer(stream) {
- let length = 0;
- const chunks = [];
- for await (const chunk of stream) {
- length += chunk.length;
- chunks.push(chunk);
- }
- return Buffer.concat(chunks, length);
-}
-exports.toBuffer = toBuffer;
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-async function json(stream) {
- const buf = await toBuffer(stream);
- const str = buf.toString('utf8');
- try {
- return JSON.parse(str);
- }
- catch (_err) {
- const err = _err;
- err.message += ` (input: ${str})`;
- throw err;
- }
-}
-exports.json = json;
-function req(url, opts = {}) {
- const href = typeof url === 'string' ? url : url.href;
- const req = (href.startsWith('https:') ? https : http).request(url, opts);
- const promise = new Promise((resolve, reject) => {
- req
- .once('response', resolve)
- .once('error', reject)
- .end();
- });
- req.then = promise.then.bind(promise);
- return req;
-}
-exports.req = req;
-//# sourceMappingURL=helpers.js.map
-
-/***/ }),
-
-/***/ 70694:
-/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
-
-"use strict";
-
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
- __setModuleDefault(result, mod);
- return result;
-};
-var __exportStar = (this && this.__exportStar) || function(m, exports) {
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
-};
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.Agent = void 0;
-const net = __importStar(__nccwpck_require__(41808));
-const http = __importStar(__nccwpck_require__(13685));
-const https_1 = __nccwpck_require__(95687);
-__exportStar(__nccwpck_require__(8348), exports);
-const INTERNAL = Symbol('AgentBaseInternalState');
-class Agent extends http.Agent {
- constructor(opts) {
- super(opts);
- this[INTERNAL] = {};
- }
- /**
- * Determine whether this is an `http` or `https` request.
- */
- isSecureEndpoint(options) {
- if (options) {
- // First check the `secureEndpoint` property explicitly, since this
- // means that a parent `Agent` is "passing through" to this instance.
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- if (typeof options.secureEndpoint === 'boolean') {
- return options.secureEndpoint;
- }
- // If no explicit `secure` endpoint, check if `protocol` property is
- // set. This will usually be the case since using a full string URL
- // or `URL` instance should be the most common usage.
- if (typeof options.protocol === 'string') {
- return options.protocol === 'https:';
- }
- }
- // Finally, if no `protocol` property was set, then fall back to
- // checking the stack trace of the current call stack, and try to
- // detect the "https" module.
- const { stack } = new Error();
- if (typeof stack !== 'string')
- return false;
- return stack
- .split('\n')
- .some((l) => l.indexOf('(https.js:') !== -1 ||
- l.indexOf('node:https:') !== -1);
- }
- // In order to support async signatures in `connect()` and Node's native
- // connection pooling in `http.Agent`, the array of sockets for each origin
- // has to be updated synchronously. This is so the length of the array is
- // accurate when `addRequest()` is next called. We achieve this by creating a
- // fake socket and adding it to `sockets[origin]` and incrementing
- // `totalSocketCount`.
- incrementSockets(name) {
- // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no
- // need to create a fake socket because Node.js native connection pooling
- // will never be invoked.
- if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
- return null;
- }
- // All instances of `sockets` are expected TypeScript errors. The
- // alternative is to add it as a private property of this class but that
- // will break TypeScript subclassing.
- if (!this.sockets[name]) {
- // @ts-expect-error `sockets` is readonly in `@types/node`
- this.sockets[name] = [];
- }
- const fakeSocket = new net.Socket({ writable: false });
- this.sockets[name].push(fakeSocket);
- // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`
- this.totalSocketCount++;
- return fakeSocket;
- }
- decrementSockets(name, socket) {
- if (!this.sockets[name] || socket === null) {
- return;
- }
- const sockets = this.sockets[name];
- const index = sockets.indexOf(socket);
- if (index !== -1) {
- sockets.splice(index, 1);
- // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`
- this.totalSocketCount--;
- if (sockets.length === 0) {
- // @ts-expect-error `sockets` is readonly in `@types/node`
- delete this.sockets[name];
- }
- }
- }
- // In order to properly update the socket pool, we need to call `getName()` on
- // the core `https.Agent` if it is a secureEndpoint.
- getName(options) {
- const secureEndpoint = this.isSecureEndpoint(options);
- if (secureEndpoint) {
- // @ts-expect-error `getName()` isn't defined in `@types/node`
- return https_1.Agent.prototype.getName.call(this, options);
- }
- // @ts-expect-error `getName()` isn't defined in `@types/node`
- return super.getName(options);
- }
- createSocket(req, options, cb) {
- const connectOpts = {
- ...options,
- secureEndpoint: this.isSecureEndpoint(options),
- };
- const name = this.getName(connectOpts);
- const fakeSocket = this.incrementSockets(name);
- Promise.resolve()
- .then(() => this.connect(req, connectOpts))
- .then((socket) => {
- this.decrementSockets(name, fakeSocket);
- if (socket instanceof http.Agent) {
- try {
- // @ts-expect-error `addRequest()` isn't defined in `@types/node`
- return socket.addRequest(req, connectOpts);
- }
- catch (err) {
- return cb(err);
- }
- }
- this[INTERNAL].currentSocket = socket;
- // @ts-expect-error `createSocket()` isn't defined in `@types/node`
- super.createSocket(req, options, cb);
- }, (err) => {
- this.decrementSockets(name, fakeSocket);
- cb(err);
- });
- }
- createConnection() {
- const socket = this[INTERNAL].currentSocket;
- this[INTERNAL].currentSocket = undefined;
- if (!socket) {
- throw new Error('No socket was returned in the `connect()` function');
- }
- return socket;
- }
- get defaultPort() {
- return (this[INTERNAL].defaultPort ??
- (this.protocol === 'https:' ? 443 : 80));
- }
- set defaultPort(v) {
- if (this[INTERNAL]) {
- this[INTERNAL].defaultPort = v;
- }
- }
- get protocol() {
- return (this[INTERNAL].protocol ??
- (this.isSecureEndpoint() ? 'https:' : 'http:'));
- }
- set protocol(v) {
- if (this[INTERNAL]) {
- this[INTERNAL].protocol = v;
- }
- }
-}
-exports.Agent = Agent;
-//# sourceMappingURL=index.js.map
-
-/***/ }),
-
-/***/ 81231:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * archiver-utils
- *
- * Copyright (c) 2012-2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-archiver/blob/master/LICENSE-MIT
- */
-var fs = __nccwpck_require__(77758);
-var path = __nccwpck_require__(71017);
-
-var flatten = __nccwpck_require__(42394);
-var difference = __nccwpck_require__(44031);
-var union = __nccwpck_require__(11620);
-var isPlainObject = __nccwpck_require__(46169);
-
-var glob = __nccwpck_require__(19834);
-
-var file = module.exports = {};
-
-var pathSeparatorRe = /[\/\\]/g;
-
-// Process specified wildcard glob patterns or filenames against a
-// callback, excluding and uniquing files in the result set.
-var processPatterns = function(patterns, fn) {
- // Filepaths to return.
- var result = [];
- // Iterate over flattened patterns array.
- flatten(patterns).forEach(function(pattern) {
- // If the first character is ! it should be omitted
- var exclusion = pattern.indexOf('!') === 0;
- // If the pattern is an exclusion, remove the !
- if (exclusion) { pattern = pattern.slice(1); }
- // Find all matching files for this pattern.
- var matches = fn(pattern);
- if (exclusion) {
- // If an exclusion, remove matching files.
- result = difference(result, matches);
- } else {
- // Otherwise add matching files.
- result = union(result, matches);
- }
- });
- return result;
-};
-
-// True if the file path exists.
-file.exists = function() {
- var filepath = path.join.apply(path, arguments);
- return fs.existsSync(filepath);
-};
-
-// Return an array of all file paths that match the given wildcard patterns.
-file.expand = function(...args) {
- // If the first argument is an options object, save those options to pass
- // into the File.prototype.glob.sync method.
- var options = isPlainObject(args[0]) ? args.shift() : {};
- // Use the first argument if it's an Array, otherwise convert the arguments
- // object to an array and use that.
- var patterns = Array.isArray(args[0]) ? args[0] : args;
- // Return empty set if there are no patterns or filepaths.
- if (patterns.length === 0) { return []; }
- // Return all matching filepaths.
- var matches = processPatterns(patterns, function(pattern) {
- // Find all matching files for this pattern.
- return glob.sync(pattern, options);
- });
- // Filter result set?
- if (options.filter) {
- matches = matches.filter(function(filepath) {
- filepath = path.join(options.cwd || '', filepath);
- try {
- if (typeof options.filter === 'function') {
- return options.filter(filepath);
- } else {
- // If the file is of the right type and exists, this should work.
- return fs.statSync(filepath)[options.filter]();
- }
- } catch(e) {
- // Otherwise, it's probably not the right type.
- return false;
- }
- });
- }
- return matches;
-};
-
-// Build a multi task "files" object dynamically.
-file.expandMapping = function(patterns, destBase, options) {
- options = Object.assign({
- rename: function(destBase, destPath) {
- return path.join(destBase || '', destPath);
- }
- }, options);
- var files = [];
- var fileByDest = {};
- // Find all files matching pattern, using passed-in options.
- file.expand(options, patterns).forEach(function(src) {
- var destPath = src;
- // Flatten?
- if (options.flatten) {
- destPath = path.basename(destPath);
- }
- // Change the extension?
- if (options.ext) {
- destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext);
- }
- // Generate destination filename.
- var dest = options.rename(destBase, destPath, options);
- // Prepend cwd to src path if necessary.
- if (options.cwd) { src = path.join(options.cwd, src); }
- // Normalize filepaths to be unix-style.
- dest = dest.replace(pathSeparatorRe, '/');
- src = src.replace(pathSeparatorRe, '/');
- // Map correct src path to dest path.
- if (fileByDest[dest]) {
- // If dest already exists, push this src onto that dest's src array.
- fileByDest[dest].src.push(src);
- } else {
- // Otherwise create a new src-dest file mapping object.
- files.push({
- src: [src],
- dest: dest,
- });
- // And store a reference for later use.
- fileByDest[dest] = files[files.length - 1];
- }
- });
- return files;
-};
-
-// reusing bits of grunt's multi-task source normalization
-file.normalizeFilesArray = function(data) {
- var files = [];
-
- data.forEach(function(obj) {
- var prop;
- if ('src' in obj || 'dest' in obj) {
- files.push(obj);
- }
- });
-
- if (files.length === 0) {
- return [];
- }
-
- files = _(files).chain().forEach(function(obj) {
- if (!('src' in obj) || !obj.src) { return; }
- // Normalize .src properties to flattened array.
- if (Array.isArray(obj.src)) {
- obj.src = flatten(obj.src);
- } else {
- obj.src = [obj.src];
- }
- }).map(function(obj) {
- // Build options object, removing unwanted properties.
- var expandOptions = Object.assign({}, obj);
- delete expandOptions.src;
- delete expandOptions.dest;
-
- // Expand file mappings.
- if (obj.expand) {
- return file.expandMapping(obj.src, obj.dest, expandOptions).map(function(mapObj) {
- // Copy obj properties to result.
- var result = Object.assign({}, obj);
- // Make a clone of the orig obj available.
- result.orig = Object.assign({}, obj);
- // Set .src and .dest, processing both as templates.
- result.src = mapObj.src;
- result.dest = mapObj.dest;
- // Remove unwanted properties.
- ['expand', 'cwd', 'flatten', 'rename', 'ext'].forEach(function(prop) {
- delete result[prop];
- });
- return result;
- });
- }
-
- // Copy obj properties to result, adding an .orig property.
- var result = Object.assign({}, obj);
- // Make a clone of the orig obj available.
- result.orig = Object.assign({}, obj);
-
- if ('src' in result) {
- // Expose an expand-on-demand getter method as .src.
- Object.defineProperty(result, 'src', {
- enumerable: true,
- get: function fn() {
- var src;
- if (!('result' in fn)) {
- src = obj.src;
- // If src is an array, flatten it. Otherwise, make it into an array.
- src = Array.isArray(src) ? flatten(src) : [src];
- // Expand src files, memoizing result.
- fn.result = file.expand(expandOptions, src);
- }
- return fn.result;
- }
- });
- }
-
- if ('dest' in result) {
- result.dest = obj.dest;
- }
-
- return result;
- }).flatten().value();
-
- return files;
-};
-
-
-/***/ }),
-
-/***/ 82072:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * archiver-utils
- *
- * Copyright (c) 2015 Chris Talkington.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/archiver-utils/blob/master/LICENSE
- */
-var fs = __nccwpck_require__(77758);
-var path = __nccwpck_require__(71017);
-var isStream = __nccwpck_require__(41554);
-var lazystream = __nccwpck_require__(12084);
-var normalizePath = __nccwpck_require__(55388);
-var defaults = __nccwpck_require__(3508);
-
-var Stream = (__nccwpck_require__(12781).Stream);
-var PassThrough = (__nccwpck_require__(45193).PassThrough);
-
-var utils = module.exports = {};
-utils.file = __nccwpck_require__(81231);
-
-utils.collectStream = function(source, callback) {
- var collection = [];
- var size = 0;
-
- source.on('error', callback);
-
- source.on('data', function(chunk) {
- collection.push(chunk);
- size += chunk.length;
- });
-
- source.on('end', function() {
- var buf = Buffer.alloc(size);
- var offset = 0;
-
- collection.forEach(function(data) {
- data.copy(buf, offset);
- offset += data.length;
- });
-
- callback(null, buf);
- });
-};
-
-utils.dateify = function(dateish) {
- dateish = dateish || new Date();
-
- if (dateish instanceof Date) {
- dateish = dateish;
- } else if (typeof dateish === 'string') {
- dateish = new Date(dateish);
- } else {
- dateish = new Date();
- }
-
- return dateish;
-};
-
-// this is slightly different from lodash version
-utils.defaults = function(object, source, guard) {
- var args = arguments;
- args[0] = args[0] || {};
-
- return defaults(...args);
-};
-
-utils.isStream = function(source) {
- return isStream(source);
-};
-
-utils.lazyReadStream = function(filepath) {
- return new lazystream.Readable(function() {
- return fs.createReadStream(filepath);
- });
-};
-
-utils.normalizeInputSource = function(source) {
- if (source === null) {
- return Buffer.alloc(0);
- } else if (typeof source === 'string') {
- return Buffer.from(source);
- } else if (utils.isStream(source)) {
- // Always pipe through a PassThrough stream to guarantee pausing the stream if it's already flowing,
- // since it will only be processed in a (distant) future iteration of the event loop, and will lose
- // data if already flowing now.
- return source.pipe(new PassThrough());
- }
-
- return source;
-};
-
-utils.sanitizePath = function(filepath) {
- return normalizePath(filepath, false).replace(/^\w+:/, '').replace(/^(\.\.\/|\/)+/, '');
-};
-
-utils.trailingSlashIt = function(str) {
- return str.slice(-1) !== '/' ? str + '/' : str;
-};
-
-utils.unixifyPath = function(filepath) {
- return normalizePath(filepath, false).replace(/^\w+:/, '');
-};
-
-utils.walkdir = function(dirpath, base, callback) {
- var results = [];
-
- if (typeof base === 'function') {
- callback = base;
- base = dirpath;
- }
-
- fs.readdir(dirpath, function(err, list) {
- var i = 0;
- var file;
- var filepath;
-
- if (err) {
- return callback(err);
- }
-
- (function next() {
- file = list[i++];
-
- if (!file) {
- return callback(null, results);
- }
-
- filepath = path.join(dirpath, file);
-
- fs.stat(filepath, function(err, stats) {
- results.push({
- path: filepath,
- relative: path.relative(base, filepath).replace(/\\/g, '/'),
- stats: stats
- });
-
- if (stats && stats.isDirectory()) {
- utils.walkdir(filepath, base, function(err, res) {
- if(err){
- return callback(err);
- }
-
- res.forEach(function(dirEntry) {
- results.push(dirEntry);
- });
-
- next();
- });
- } else {
- next();
- }
- });
- })();
- });
-};
-
-
-/***/ }),
-
-/***/ 43084:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * Archiver Vending
- *
- * @ignore
- * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
- * @copyright (c) 2012-2014 Chris Talkington, contributors.
- */
-var Archiver = __nccwpck_require__(35010);
-
-var formats = {};
-
-/**
- * Dispenses a new Archiver instance.
- *
- * @constructor
- * @param {String} format The archive format to use.
- * @param {Object} options See [Archiver]{@link Archiver}
- * @return {Archiver}
- */
-var vending = function(format, options) {
- return vending.create(format, options);
-};
-
-/**
- * Creates a new Archiver instance.
- *
- * @param {String} format The archive format to use.
- * @param {Object} options See [Archiver]{@link Archiver}
- * @return {Archiver}
- */
-vending.create = function(format, options) {
- if (formats[format]) {
- var instance = new Archiver(format, options);
- instance.setFormat(format);
- instance.setModule(new formats[format](options));
-
- return instance;
- } else {
- throw new Error('create(' + format + '): format not registered');
- }
-};
-
-/**
- * Registers a format for use with archiver.
- *
- * @param {String} format The name of the format.
- * @param {Function} module The function for archiver to interact with.
- * @return void
- */
-vending.registerFormat = function(format, module) {
- if (formats[format]) {
- throw new Error('register(' + format + '): format already registered');
- }
-
- if (typeof module !== 'function') {
- throw new Error('register(' + format + '): format module invalid');
- }
-
- if (typeof module.prototype.append !== 'function' || typeof module.prototype.finalize !== 'function') {
- throw new Error('register(' + format + '): format module missing methods');
- }
-
- formats[format] = module;
-};
-
-/**
- * Check if the format is already registered.
- *
- * @param {String} format the name of the format.
- * @return boolean
- */
-vending.isRegisteredFormat = function (format) {
- if (formats[format]) {
- return true;
- }
-
- return false;
-};
-
-vending.registerFormat('zip', __nccwpck_require__(8987));
-vending.registerFormat('tar', __nccwpck_require__(33614));
-vending.registerFormat('json', __nccwpck_require__(99827));
-
-module.exports = vending;
-
-/***/ }),
-
-/***/ 35010:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * Archiver Core
- *
- * @ignore
- * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
- * @copyright (c) 2012-2014 Chris Talkington, contributors.
- */
-var fs = __nccwpck_require__(57147);
-var glob = __nccwpck_require__(17978);
-var async = __nccwpck_require__(57888);
-var path = __nccwpck_require__(71017);
-var util = __nccwpck_require__(82072);
-
-var inherits = (__nccwpck_require__(73837).inherits);
-var ArchiverError = __nccwpck_require__(13143);
-var Transform = (__nccwpck_require__(45193).Transform);
-
-var win32 = process.platform === 'win32';
-
-/**
- * @constructor
- * @param {String} format The archive format to use.
- * @param {(CoreOptions|TransformOptions)} options See also {@link ZipOptions} and {@link TarOptions}.
- */
-var Archiver = function(format, options) {
- if (!(this instanceof Archiver)) {
- return new Archiver(format, options);
- }
-
- if (typeof format !== 'string') {
- options = format;
- format = 'zip';
- }
-
- options = this.options = util.defaults(options, {
- highWaterMark: 1024 * 1024,
- statConcurrency: 4
- });
-
- Transform.call(this, options);
-
- this._format = false;
- this._module = false;
- this._pending = 0;
- this._pointer = 0;
-
- this._entriesCount = 0;
- this._entriesProcessedCount = 0;
- this._fsEntriesTotalBytes = 0;
- this._fsEntriesProcessedBytes = 0;
-
- this._queue = async.queue(this._onQueueTask.bind(this), 1);
- this._queue.drain(this._onQueueDrain.bind(this));
-
- this._statQueue = async.queue(this._onStatQueueTask.bind(this), options.statConcurrency);
- this._statQueue.drain(this._onQueueDrain.bind(this));
-
- this._state = {
- aborted: false,
- finalize: false,
- finalizing: false,
- finalized: false,
- modulePiped: false
- };
-
- this._streams = [];
-};
-
-inherits(Archiver, Transform);
-
-/**
- * Internal logic for `abort`.
- *
- * @private
- * @return void
- */
-Archiver.prototype._abort = function() {
- this._state.aborted = true;
- this._queue.kill();
- this._statQueue.kill();
-
- if (this._queue.idle()) {
- this._shutdown();
- }
-};
-
-/**
- * Internal helper for appending files.
- *
- * @private
- * @param {String} filepath The source filepath.
- * @param {EntryData} data The entry data.
- * @return void
- */
-Archiver.prototype._append = function(filepath, data) {
- data = data || {};
-
- var task = {
- source: null,
- filepath: filepath
- };
-
- if (!data.name) {
- data.name = filepath;
- }
-
- data.sourcePath = filepath;
- task.data = data;
- this._entriesCount++;
-
- if (data.stats && data.stats instanceof fs.Stats) {
- task = this._updateQueueTaskWithStats(task, data.stats);
- if (task) {
- if (data.stats.size) {
- this._fsEntriesTotalBytes += data.stats.size;
- }
-
- this._queue.push(task);
- }
- } else {
- this._statQueue.push(task);
- }
-};
-
-/**
- * Internal logic for `finalize`.
- *
- * @private
- * @return void
- */
-Archiver.prototype._finalize = function() {
- if (this._state.finalizing || this._state.finalized || this._state.aborted) {
- return;
- }
-
- this._state.finalizing = true;
-
- this._moduleFinalize();
-
- this._state.finalizing = false;
- this._state.finalized = true;
-};
-
-/**
- * Checks the various state variables to determine if we can `finalize`.
- *
- * @private
- * @return {Boolean}
- */
-Archiver.prototype._maybeFinalize = function() {
- if (this._state.finalizing || this._state.finalized || this._state.aborted) {
- return false;
- }
-
- if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
- this._finalize();
- return true;
- }
-
- return false;
-};
-
-/**
- * Appends an entry to the module.
- *
- * @private
- * @fires Archiver#entry
- * @param {(Buffer|Stream)} source
- * @param {EntryData} data
- * @param {Function} callback
- * @return void
- */
-Archiver.prototype._moduleAppend = function(source, data, callback) {
- if (this._state.aborted) {
- callback();
- return;
- }
-
- this._module.append(source, data, function(err) {
- this._task = null;
-
- if (this._state.aborted) {
- this._shutdown();
- return;
- }
-
- if (err) {
- this.emit('error', err);
- setImmediate(callback);
- return;
- }
-
- /**
- * Fires when the entry's input has been processed and appended to the archive.
- *
- * @event Archiver#entry
- * @type {EntryData}
- */
- this.emit('entry', data);
- this._entriesProcessedCount++;
-
- if (data.stats && data.stats.size) {
- this._fsEntriesProcessedBytes += data.stats.size;
- }
-
- /**
- * @event Archiver#progress
- * @type {ProgressData}
- */
- this.emit('progress', {
- entries: {
- total: this._entriesCount,
- processed: this._entriesProcessedCount
- },
- fs: {
- totalBytes: this._fsEntriesTotalBytes,
- processedBytes: this._fsEntriesProcessedBytes
- }
- });
-
- setImmediate(callback);
- }.bind(this));
-};
-
-/**
- * Finalizes the module.
- *
- * @private
- * @return void
- */
-Archiver.prototype._moduleFinalize = function() {
- if (typeof this._module.finalize === 'function') {
- this._module.finalize();
- } else if (typeof this._module.end === 'function') {
- this._module.end();
- } else {
- this.emit('error', new ArchiverError('NOENDMETHOD'));
- }
-};
-
-/**
- * Pipes the module to our internal stream with error bubbling.
- *
- * @private
- * @return void
- */
-Archiver.prototype._modulePipe = function() {
- this._module.on('error', this._onModuleError.bind(this));
- this._module.pipe(this);
- this._state.modulePiped = true;
-};
-
-/**
- * Determines if the current module supports a defined feature.
- *
- * @private
- * @param {String} key
- * @return {Boolean}
- */
-Archiver.prototype._moduleSupports = function(key) {
- if (!this._module.supports || !this._module.supports[key]) {
- return false;
- }
-
- return this._module.supports[key];
-};
-
-/**
- * Unpipes the module from our internal stream.
- *
- * @private
- * @return void
- */
-Archiver.prototype._moduleUnpipe = function() {
- this._module.unpipe(this);
- this._state.modulePiped = false;
-};
-
-/**
- * Normalizes entry data with fallbacks for key properties.
- *
- * @private
- * @param {Object} data
- * @param {fs.Stats} stats
- * @return {Object}
- */
-Archiver.prototype._normalizeEntryData = function(data, stats) {
- data = util.defaults(data, {
- type: 'file',
- name: null,
- date: null,
- mode: null,
- prefix: null,
- sourcePath: null,
- stats: false
- });
-
- if (stats && data.stats === false) {
- data.stats = stats;
- }
-
- var isDir = data.type === 'directory';
-
- if (data.name) {
- if (typeof data.prefix === 'string' && '' !== data.prefix) {
- data.name = data.prefix + '/' + data.name;
- data.prefix = null;
- }
-
- data.name = util.sanitizePath(data.name);
-
- if (data.type !== 'symlink' && data.name.slice(-1) === '/') {
- isDir = true;
- data.type = 'directory';
- } else if (isDir) {
- data.name += '/';
- }
- }
-
- // 511 === 0777; 493 === 0755; 438 === 0666; 420 === 0644
- if (typeof data.mode === 'number') {
- if (win32) {
- data.mode &= 511;
- } else {
- data.mode &= 4095
- }
- } else if (data.stats && data.mode === null) {
- if (win32) {
- data.mode = data.stats.mode & 511;
- } else {
- data.mode = data.stats.mode & 4095;
- }
-
- // stat isn't reliable on windows; force 0755 for dir
- if (win32 && isDir) {
- data.mode = 493;
- }
- } else if (data.mode === null) {
- data.mode = isDir ? 493 : 420;
- }
-
- if (data.stats && data.date === null) {
- data.date = data.stats.mtime;
- } else {
- data.date = util.dateify(data.date);
- }
-
- return data;
-};
-
-/**
- * Error listener that re-emits error on to our internal stream.
- *
- * @private
- * @param {Error} err
- * @return void
- */
-Archiver.prototype._onModuleError = function(err) {
- /**
- * @event Archiver#error
- * @type {ErrorData}
- */
- this.emit('error', err);
-};
-
-/**
- * Checks the various state variables after queue has drained to determine if
- * we need to `finalize`.
- *
- * @private
- * @return void
- */
-Archiver.prototype._onQueueDrain = function() {
- if (this._state.finalizing || this._state.finalized || this._state.aborted) {
- return;
- }
-
- if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
- this._finalize();
- }
-};
-
-/**
- * Appends each queue task to the module.
- *
- * @private
- * @param {Object} task
- * @param {Function} callback
- * @return void
- */
-Archiver.prototype._onQueueTask = function(task, callback) {
- var fullCallback = () => {
- if(task.data.callback) {
- task.data.callback();
- }
- callback();
- }
-
- if (this._state.finalizing || this._state.finalized || this._state.aborted) {
- fullCallback();
- return;
- }
-
- this._task = task;
- this._moduleAppend(task.source, task.data, fullCallback);
-};
-
-/**
- * Performs a file stat and reinjects the task back into the queue.
- *
- * @private
- * @param {Object} task
- * @param {Function} callback
- * @return void
- */
-Archiver.prototype._onStatQueueTask = function(task, callback) {
- if (this._state.finalizing || this._state.finalized || this._state.aborted) {
- callback();
- return;
- }
-
- fs.lstat(task.filepath, function(err, stats) {
- if (this._state.aborted) {
- setImmediate(callback);
- return;
- }
-
- if (err) {
- this._entriesCount--;
-
- /**
- * @event Archiver#warning
- * @type {ErrorData}
- */
- this.emit('warning', err);
- setImmediate(callback);
- return;
- }
-
- task = this._updateQueueTaskWithStats(task, stats);
-
- if (task) {
- if (stats.size) {
- this._fsEntriesTotalBytes += stats.size;
- }
-
- this._queue.push(task);
- }
-
- setImmediate(callback);
- }.bind(this));
-};
-
-/**
- * Unpipes the module and ends our internal stream.
- *
- * @private
- * @return void
- */
-Archiver.prototype._shutdown = function() {
- this._moduleUnpipe();
- this.end();
-};
-
-/**
- * Tracks the bytes emitted by our internal stream.
- *
- * @private
- * @param {Buffer} chunk
- * @param {String} encoding
- * @param {Function} callback
- * @return void
- */
-Archiver.prototype._transform = function(chunk, encoding, callback) {
- if (chunk) {
- this._pointer += chunk.length;
- }
-
- callback(null, chunk);
-};
-
-/**
- * Updates and normalizes a queue task using stats data.
- *
- * @private
- * @param {Object} task
- * @param {fs.Stats} stats
- * @return {Object}
- */
-Archiver.prototype._updateQueueTaskWithStats = function(task, stats) {
- if (stats.isFile()) {
- task.data.type = 'file';
- task.data.sourceType = 'stream';
- task.source = util.lazyReadStream(task.filepath);
- } else if (stats.isDirectory() && this._moduleSupports('directory')) {
- task.data.name = util.trailingSlashIt(task.data.name);
- task.data.type = 'directory';
- task.data.sourcePath = util.trailingSlashIt(task.filepath);
- task.data.sourceType = 'buffer';
- task.source = Buffer.concat([]);
- } else if (stats.isSymbolicLink() && this._moduleSupports('symlink')) {
- var linkPath = fs.readlinkSync(task.filepath);
- var dirName = path.dirname(task.filepath);
- task.data.type = 'symlink';
- task.data.linkname = path.relative(dirName, path.resolve(dirName, linkPath));
- task.data.sourceType = 'buffer';
- task.source = Buffer.concat([]);
- } else {
- if (stats.isDirectory()) {
- this.emit('warning', new ArchiverError('DIRECTORYNOTSUPPORTED', task.data));
- } else if (stats.isSymbolicLink()) {
- this.emit('warning', new ArchiverError('SYMLINKNOTSUPPORTED', task.data));
- } else {
- this.emit('warning', new ArchiverError('ENTRYNOTSUPPORTED', task.data));
- }
-
- return null;
- }
-
- task.data = this._normalizeEntryData(task.data, stats);
-
- return task;
-};
-
-/**
- * Aborts the archiving process, taking a best-effort approach, by:
- *
- * - removing any pending queue tasks
- * - allowing any active queue workers to finish
- * - detaching internal module pipes
- * - ending both sides of the Transform stream
- *
- * It will NOT drain any remaining sources.
- *
- * @return {this}
- */
-Archiver.prototype.abort = function() {
- if (this._state.aborted || this._state.finalized) {
- return this;
- }
-
- this._abort();
-
- return this;
-};
-
-/**
- * Appends an input source (text string, buffer, or stream) to the instance.
- *
- * When the instance has received, processed, and emitted the input, the `entry`
- * event is fired.
- *
- * @fires Archiver#entry
- * @param {(Buffer|Stream|String)} source The input source.
- * @param {EntryData} data See also {@link ZipEntryData} and {@link TarEntryData}.
- * @return {this}
- */
-Archiver.prototype.append = function(source, data) {
- if (this._state.finalize || this._state.aborted) {
- this.emit('error', new ArchiverError('QUEUECLOSED'));
- return this;
- }
-
- data = this._normalizeEntryData(data);
-
- if (typeof data.name !== 'string' || data.name.length === 0) {
- this.emit('error', new ArchiverError('ENTRYNAMEREQUIRED'));
- return this;
- }
-
- if (data.type === 'directory' && !this._moduleSupports('directory')) {
- this.emit('error', new ArchiverError('DIRECTORYNOTSUPPORTED', { name: data.name }));
- return this;
- }
-
- source = util.normalizeInputSource(source);
-
- if (Buffer.isBuffer(source)) {
- data.sourceType = 'buffer';
- } else if (util.isStream(source)) {
- data.sourceType = 'stream';
- } else {
- this.emit('error', new ArchiverError('INPUTSTEAMBUFFERREQUIRED', { name: data.name }));
- return this;
- }
-
- this._entriesCount++;
- this._queue.push({
- data: data,
- source: source
- });
-
- return this;
-};
-
-/**
- * Appends a directory and its files, recursively, given its dirpath.
- *
- * @param {String} dirpath The source directory path.
- * @param {String} destpath The destination path within the archive.
- * @param {(EntryData|Function)} data See also [ZipEntryData]{@link ZipEntryData} and
- * [TarEntryData]{@link TarEntryData}.
- * @return {this}
- */
-Archiver.prototype.directory = function(dirpath, destpath, data) {
- if (this._state.finalize || this._state.aborted) {
- this.emit('error', new ArchiverError('QUEUECLOSED'));
- return this;
- }
-
- if (typeof dirpath !== 'string' || dirpath.length === 0) {
- this.emit('error', new ArchiverError('DIRECTORYDIRPATHREQUIRED'));
- return this;
- }
-
- this._pending++;
-
- if (destpath === false) {
- destpath = '';
- } else if (typeof destpath !== 'string'){
- destpath = dirpath;
- }
-
- var dataFunction = false;
- if (typeof data === 'function') {
- dataFunction = data;
- data = {};
- } else if (typeof data !== 'object') {
- data = {};
- }
-
- var globOptions = {
- stat: true,
- dot: true
- };
-
- function onGlobEnd() {
- this._pending--;
- this._maybeFinalize();
- }
-
- function onGlobError(err) {
- this.emit('error', err);
- }
-
- function onGlobMatch(match){
- globber.pause();
-
- var ignoreMatch = false;
- var entryData = Object.assign({}, data);
- entryData.name = match.relative;
- entryData.prefix = destpath;
- entryData.stats = match.stat;
- entryData.callback = globber.resume.bind(globber);
-
- try {
- if (dataFunction) {
- entryData = dataFunction(entryData);
-
- if (entryData === false) {
- ignoreMatch = true;
- } else if (typeof entryData !== 'object') {
- throw new ArchiverError('DIRECTORYFUNCTIONINVALIDDATA', { dirpath: dirpath });
- }
- }
- } catch(e) {
- this.emit('error', e);
- return;
- }
-
- if (ignoreMatch) {
- globber.resume();
- return;
- }
-
- this._append(match.absolute, entryData);
- }
-
- var globber = glob(dirpath, globOptions);
- globber.on('error', onGlobError.bind(this));
- globber.on('match', onGlobMatch.bind(this));
- globber.on('end', onGlobEnd.bind(this));
-
- return this;
-};
-
-/**
- * Appends a file given its filepath using a
- * [lazystream]{@link https://github.com/jpommerening/node-lazystream} wrapper to
- * prevent issues with open file limits.
- *
- * When the instance has received, processed, and emitted the file, the `entry`
- * event is fired.
- *
- * @param {String} filepath The source filepath.
- * @param {EntryData} data See also [ZipEntryData]{@link ZipEntryData} and
- * [TarEntryData]{@link TarEntryData}.
- * @return {this}
- */
-Archiver.prototype.file = function(filepath, data) {
- if (this._state.finalize || this._state.aborted) {
- this.emit('error', new ArchiverError('QUEUECLOSED'));
- return this;
- }
-
- if (typeof filepath !== 'string' || filepath.length === 0) {
- this.emit('error', new ArchiverError('FILEFILEPATHREQUIRED'));
- return this;
- }
-
- this._append(filepath, data);
-
- return this;
-};
-
-/**
- * Appends multiple files that match a glob pattern.
- *
- * @param {String} pattern The [glob pattern]{@link https://github.com/isaacs/minimatch} to match.
- * @param {Object} options See [node-readdir-glob]{@link https://github.com/yqnn/node-readdir-glob#options}.
- * @param {EntryData} data See also [ZipEntryData]{@link ZipEntryData} and
- * [TarEntryData]{@link TarEntryData}.
- * @return {this}
- */
-Archiver.prototype.glob = function(pattern, options, data) {
- this._pending++;
-
- options = util.defaults(options, {
- stat: true,
- pattern: pattern
- });
-
- function onGlobEnd() {
- this._pending--;
- this._maybeFinalize();
- }
-
- function onGlobError(err) {
- this.emit('error', err);
- }
-
- function onGlobMatch(match){
- globber.pause();
- var entryData = Object.assign({}, data);
- entryData.callback = globber.resume.bind(globber);
- entryData.stats = match.stat;
- entryData.name = match.relative;
-
- this._append(match.absolute, entryData);
- }
-
- var globber = glob(options.cwd || '.', options);
- globber.on('error', onGlobError.bind(this));
- globber.on('match', onGlobMatch.bind(this));
- globber.on('end', onGlobEnd.bind(this));
-
- return this;
-};
-
-/**
- * Finalizes the instance and prevents further appending to the archive
- * structure (queue will continue til drained).
- *
- * The `end`, `close` or `finish` events on the destination stream may fire
- * right after calling this method so you should set listeners beforehand to
- * properly detect stream completion.
- *
- * @return {Promise}
- */
-Archiver.prototype.finalize = function() {
- if (this._state.aborted) {
- var abortedError = new ArchiverError('ABORTED');
- this.emit('error', abortedError);
- return Promise.reject(abortedError);
- }
-
- if (this._state.finalize) {
- var finalizingError = new ArchiverError('FINALIZING');
- this.emit('error', finalizingError);
- return Promise.reject(finalizingError);
- }
-
- this._state.finalize = true;
-
- if (this._pending === 0 && this._queue.idle() && this._statQueue.idle()) {
- this._finalize();
- }
-
- var self = this;
-
- return new Promise(function(resolve, reject) {
- var errored;
-
- self._module.on('end', function() {
- if (!errored) {
- resolve();
- }
- })
-
- self._module.on('error', function(err) {
- errored = true;
- reject(err);
- })
- })
-};
-
-/**
- * Sets the module format name used for archiving.
- *
- * @param {String} format The name of the format.
- * @return {this}
- */
-Archiver.prototype.setFormat = function(format) {
- if (this._format) {
- this.emit('error', new ArchiverError('FORMATSET'));
- return this;
- }
-
- this._format = format;
-
- return this;
-};
-
-/**
- * Sets the module used for archiving.
- *
- * @param {Function} module The function for archiver to interact with.
- * @return {this}
- */
-Archiver.prototype.setModule = function(module) {
- if (this._state.aborted) {
- this.emit('error', new ArchiverError('ABORTED'));
- return this;
- }
-
- if (this._state.module) {
- this.emit('error', new ArchiverError('MODULESET'));
- return this;
- }
-
- this._module = module;
- this._modulePipe();
-
- return this;
-};
-
-/**
- * Appends a symlink to the instance.
- *
- * This does NOT interact with filesystem and is used for programmatically creating symlinks.
- *
- * @param {String} filepath The symlink path (within archive).
- * @param {String} target The target path (within archive).
- * @param {Number} mode Sets the entry permissions.
- * @return {this}
- */
-Archiver.prototype.symlink = function(filepath, target, mode) {
- if (this._state.finalize || this._state.aborted) {
- this.emit('error', new ArchiverError('QUEUECLOSED'));
- return this;
- }
-
- if (typeof filepath !== 'string' || filepath.length === 0) {
- this.emit('error', new ArchiverError('SYMLINKFILEPATHREQUIRED'));
- return this;
- }
-
- if (typeof target !== 'string' || target.length === 0) {
- this.emit('error', new ArchiverError('SYMLINKTARGETREQUIRED', { filepath: filepath }));
- return this;
- }
-
- if (!this._moduleSupports('symlink')) {
- this.emit('error', new ArchiverError('SYMLINKNOTSUPPORTED', { filepath: filepath }));
- return this;
- }
-
- var data = {};
- data.type = 'symlink';
- data.name = filepath.replace(/\\/g, '/');
- data.linkname = target.replace(/\\/g, '/');
- data.sourceType = 'buffer';
-
- if (typeof mode === "number") {
- data.mode = mode;
- }
-
- this._entriesCount++;
- this._queue.push({
- data: data,
- source: Buffer.concat([])
- });
-
- return this;
-};
-
-/**
- * Returns the current length (in bytes) that has been emitted.
- *
- * @return {Number}
- */
-Archiver.prototype.pointer = function() {
- return this._pointer;
-};
-
-/**
- * Middleware-like helper that has yet to be fully implemented.
- *
- * @private
- * @param {Function} plugin
- * @return {this}
- */
-Archiver.prototype.use = function(plugin) {
- this._streams.push(plugin);
- return this;
-};
-
-module.exports = Archiver;
-
-/**
- * @typedef {Object} CoreOptions
- * @global
- * @property {Number} [statConcurrency=4] Sets the number of workers used to
- * process the internal fs stat queue.
- */
-
-/**
- * @typedef {Object} TransformOptions
- * @property {Boolean} [allowHalfOpen=true] If set to false, then the stream
- * will automatically end the readable side when the writable side ends and vice
- * versa.
- * @property {Boolean} [readableObjectMode=false] Sets objectMode for readable
- * side of the stream. Has no effect if objectMode is true.
- * @property {Boolean} [writableObjectMode=false] Sets objectMode for writable
- * side of the stream. Has no effect if objectMode is true.
- * @property {Boolean} [decodeStrings=true] Whether or not to decode strings
- * into Buffers before passing them to _write(). `Writable`
- * @property {String} [encoding=NULL] If specified, then buffers will be decoded
- * to strings using the specified encoding. `Readable`
- * @property {Number} [highWaterMark=16kb] The maximum number of bytes to store
- * in the internal buffer before ceasing to read from the underlying resource.
- * `Readable` `Writable`
- * @property {Boolean} [objectMode=false] Whether this stream should behave as a
- * stream of objects. Meaning that stream.read(n) returns a single value instead
- * of a Buffer of size n. `Readable` `Writable`
- */
-
-/**
- * @typedef {Object} EntryData
- * @property {String} name Sets the entry name including internal path.
- * @property {(String|Date)} [date=NOW()] Sets the entry date.
- * @property {Number} [mode=D:0755/F:0644] Sets the entry permissions.
- * @property {String} [prefix] Sets a path prefix for the entry name. Useful
- * when working with methods like `directory` or `glob`.
- * @property {fs.Stats} [stats] Sets the fs stat data for this entry allowing
- * for reduction of fs stat calls when stat data is already known.
- */
-
-/**
- * @typedef {Object} ErrorData
- * @property {String} message The message of the error.
- * @property {String} code The error code assigned to this error.
- * @property {String} data Additional data provided for reporting or debugging (where available).
- */
-
-/**
- * @typedef {Object} ProgressData
- * @property {Object} entries
- * @property {Number} entries.total Number of entries that have been appended.
- * @property {Number} entries.processed Number of entries that have been processed.
- * @property {Object} fs
- * @property {Number} fs.totalBytes Number of bytes that have been appended. Calculated asynchronously and might not be accurate: it growth while entries are added. (based on fs.Stats)
- * @property {Number} fs.processedBytes Number of bytes that have been processed. (based on fs.Stats)
- */
-
-
-/***/ }),
-
-/***/ 13143:
-/***/ ((module, exports, __nccwpck_require__) => {
-
-/**
- * Archiver Core
- *
- * @ignore
- * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
- * @copyright (c) 2012-2014 Chris Talkington, contributors.
- */
-
-var util = __nccwpck_require__(73837);
-
-const ERROR_CODES = {
- 'ABORTED': 'archive was aborted',
- 'DIRECTORYDIRPATHREQUIRED': 'diretory dirpath argument must be a non-empty string value',
- 'DIRECTORYFUNCTIONINVALIDDATA': 'invalid data returned by directory custom data function',
- 'ENTRYNAMEREQUIRED': 'entry name must be a non-empty string value',
- 'FILEFILEPATHREQUIRED': 'file filepath argument must be a non-empty string value',
- 'FINALIZING': 'archive already finalizing',
- 'QUEUECLOSED': 'queue closed',
- 'NOENDMETHOD': 'no suitable finalize/end method defined by module',
- 'DIRECTORYNOTSUPPORTED': 'support for directory entries not defined by module',
- 'FORMATSET': 'archive format already set',
- 'INPUTSTEAMBUFFERREQUIRED': 'input source must be valid Stream or Buffer instance',
- 'MODULESET': 'module already set',
- 'SYMLINKNOTSUPPORTED': 'support for symlink entries not defined by module',
- 'SYMLINKFILEPATHREQUIRED': 'symlink filepath argument must be a non-empty string value',
- 'SYMLINKTARGETREQUIRED': 'symlink target argument must be a non-empty string value',
- 'ENTRYNOTSUPPORTED': 'entry not supported'
-};
-
-function ArchiverError(code, data) {
- Error.captureStackTrace(this, this.constructor);
- //this.name = this.constructor.name;
- this.message = ERROR_CODES[code] || code;
- this.code = code;
- this.data = data;
-}
-
-util.inherits(ArchiverError, Error);
-
-exports = module.exports = ArchiverError;
-
-/***/ }),
-
-/***/ 99827:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * JSON Format Plugin
- *
- * @module plugins/json
- * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
- * @copyright (c) 2012-2014 Chris Talkington, contributors.
- */
-var inherits = (__nccwpck_require__(73837).inherits);
-var Transform = (__nccwpck_require__(45193).Transform);
-
-var crc32 = __nccwpck_require__(54119);
-var util = __nccwpck_require__(82072);
-
-/**
- * @constructor
- * @param {(JsonOptions|TransformOptions)} options
- */
-var Json = function(options) {
- if (!(this instanceof Json)) {
- return new Json(options);
- }
-
- options = this.options = util.defaults(options, {});
-
- Transform.call(this, options);
-
- this.supports = {
- directory: true,
- symlink: true
- };
-
- this.files = [];
-};
-
-inherits(Json, Transform);
-
-/**
- * [_transform description]
- *
- * @private
- * @param {Buffer} chunk
- * @param {String} encoding
- * @param {Function} callback
- * @return void
- */
-Json.prototype._transform = function(chunk, encoding, callback) {
- callback(null, chunk);
-};
-
-/**
- * [_writeStringified description]
- *
- * @private
- * @return void
- */
-Json.prototype._writeStringified = function() {
- var fileString = JSON.stringify(this.files);
- this.write(fileString);
-};
-
-/**
- * [append description]
- *
- * @param {(Buffer|Stream)} source
- * @param {EntryData} data
- * @param {Function} callback
- * @return void
- */
-Json.prototype.append = function(source, data, callback) {
- var self = this;
-
- data.crc32 = 0;
-
- function onend(err, sourceBuffer) {
- if (err) {
- callback(err);
- return;
- }
-
- data.size = sourceBuffer.length || 0;
- data.crc32 = crc32.unsigned(sourceBuffer);
-
- self.files.push(data);
-
- callback(null, data);
- }
-
- if (data.sourceType === 'buffer') {
- onend(null, source);
- } else if (data.sourceType === 'stream') {
- util.collectStream(source, onend);
- }
-};
-
-/**
- * [finalize description]
- *
- * @return void
- */
-Json.prototype.finalize = function() {
- this._writeStringified();
- this.end();
-};
-
-module.exports = Json;
-
-/**
- * @typedef {Object} JsonOptions
- * @global
- */
-
-
-/***/ }),
-
-/***/ 33614:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * TAR Format Plugin
- *
- * @module plugins/tar
- * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
- * @copyright (c) 2012-2014 Chris Talkington, contributors.
- */
-var zlib = __nccwpck_require__(59796);
-
-var engine = __nccwpck_require__(2283);
-var util = __nccwpck_require__(82072);
-
-/**
- * @constructor
- * @param {TarOptions} options
- */
-var Tar = function(options) {
- if (!(this instanceof Tar)) {
- return new Tar(options);
- }
-
- options = this.options = util.defaults(options, {
- gzip: false
- });
-
- if (typeof options.gzipOptions !== 'object') {
- options.gzipOptions = {};
- }
-
- this.supports = {
- directory: true,
- symlink: true
- };
-
- this.engine = engine.pack(options);
- this.compressor = false;
-
- if (options.gzip) {
- this.compressor = zlib.createGzip(options.gzipOptions);
- this.compressor.on('error', this._onCompressorError.bind(this));
- }
-};
-
-/**
- * [_onCompressorError description]
- *
- * @private
- * @param {Error} err
- * @return void
- */
-Tar.prototype._onCompressorError = function(err) {
- this.engine.emit('error', err);
-};
-
-/**
- * [append description]
- *
- * @param {(Buffer|Stream)} source
- * @param {TarEntryData} data
- * @param {Function} callback
- * @return void
- */
-Tar.prototype.append = function(source, data, callback) {
- var self = this;
-
- data.mtime = data.date;
-
- function append(err, sourceBuffer) {
- if (err) {
- callback(err);
- return;
- }
-
- self.engine.entry(data, sourceBuffer, function(err) {
- callback(err, data);
- });
- }
-
- if (data.sourceType === 'buffer') {
- append(null, source);
- } else if (data.sourceType === 'stream' && data.stats) {
- data.size = data.stats.size;
-
- var entry = self.engine.entry(data, function(err) {
- callback(err, data);
- });
-
- source.pipe(entry);
- } else if (data.sourceType === 'stream') {
- util.collectStream(source, append);
- }
-};
-
-/**
- * [finalize description]
- *
- * @return void
- */
-Tar.prototype.finalize = function() {
- this.engine.finalize();
-};
-
-/**
- * [on description]
- *
- * @return this.engine
- */
-Tar.prototype.on = function() {
- return this.engine.on.apply(this.engine, arguments);
-};
-
-/**
- * [pipe description]
- *
- * @param {String} destination
- * @param {Object} options
- * @return this.engine
- */
-Tar.prototype.pipe = function(destination, options) {
- if (this.compressor) {
- return this.engine.pipe.apply(this.engine, [this.compressor]).pipe(destination, options);
- } else {
- return this.engine.pipe.apply(this.engine, arguments);
- }
-};
-
-/**
- * [unpipe description]
- *
- * @return this.engine
- */
-Tar.prototype.unpipe = function() {
- if (this.compressor) {
- return this.compressor.unpipe.apply(this.compressor, arguments);
- } else {
- return this.engine.unpipe.apply(this.engine, arguments);
- }
-};
-
-module.exports = Tar;
-
-/**
- * @typedef {Object} TarOptions
- * @global
- * @property {Boolean} [gzip=false] Compress the tar archive using gzip.
- * @property {Object} [gzipOptions] Passed to [zlib]{@link https://nodejs.org/api/zlib.html#zlib_class_options}
- * to control compression.
- * @property {*} [*] See [tar-stream]{@link https://github.com/mafintosh/tar-stream} documentation for additional properties.
- */
-
-/**
- * @typedef {Object} TarEntryData
- * @global
- * @property {String} name Sets the entry name including internal path.
- * @property {(String|Date)} [date=NOW()] Sets the entry date.
- * @property {Number} [mode=D:0755/F:0644] Sets the entry permissions.
- * @property {String} [prefix] Sets a path prefix for the entry name. Useful
- * when working with methods like `directory` or `glob`.
- * @property {fs.Stats} [stats] Sets the fs stat data for this entry allowing
- * for reduction of fs stat calls when stat data is already known.
- */
-
-/**
- * TarStream Module
- * @external TarStream
- * @see {@link https://github.com/mafintosh/tar-stream}
- */
-
-
-/***/ }),
-
-/***/ 8987:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * ZIP Format Plugin
- *
- * @module plugins/zip
- * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
- * @copyright (c) 2012-2014 Chris Talkington, contributors.
- */
-var engine = __nccwpck_require__(86454);
-var util = __nccwpck_require__(82072);
-
-/**
- * @constructor
- * @param {ZipOptions} [options]
- * @param {String} [options.comment] Sets the zip archive comment.
- * @param {Boolean} [options.forceLocalTime=false] Forces the archive to contain local file times instead of UTC.
- * @param {Boolean} [options.forceZip64=false] Forces the archive to contain ZIP64 headers.
- * @param {Boolean} [options.namePrependSlash=false] Prepends a forward slash to archive file paths.
- * @param {Boolean} [options.store=false] Sets the compression method to STORE.
- * @param {Object} [options.zlib] Passed to [zlib]{@link https://nodejs.org/api/zlib.html#zlib_class_options}
- */
-var Zip = function(options) {
- if (!(this instanceof Zip)) {
- return new Zip(options);
- }
-
- options = this.options = util.defaults(options, {
- comment: '',
- forceUTC: false,
- namePrependSlash: false,
- store: false
- });
-
- this.supports = {
- directory: true,
- symlink: true
- };
-
- this.engine = new engine(options);
-};
-
-/**
- * @param {(Buffer|Stream)} source
- * @param {ZipEntryData} data
- * @param {String} data.name Sets the entry name including internal path.
- * @param {(String|Date)} [data.date=NOW()] Sets the entry date.
- * @param {Number} [data.mode=D:0755/F:0644] Sets the entry permissions.
- * @param {String} [data.prefix] Sets a path prefix for the entry name. Useful
- * when working with methods like `directory` or `glob`.
- * @param {fs.Stats} [data.stats] Sets the fs stat data for this entry allowing
- * for reduction of fs stat calls when stat data is already known.
- * @param {Boolean} [data.store=ZipOptions.store] Sets the compression method to STORE.
- * @param {Function} callback
- * @return void
- */
-Zip.prototype.append = function(source, data, callback) {
- this.engine.entry(source, data, callback);
-};
-
-/**
- * @return void
- */
-Zip.prototype.finalize = function() {
- this.engine.finalize();
-};
-
-/**
- * @return this.engine
- */
-Zip.prototype.on = function() {
- return this.engine.on.apply(this.engine, arguments);
-};
-
-/**
- * @return this.engine
- */
-Zip.prototype.pipe = function() {
- return this.engine.pipe.apply(this.engine, arguments);
-};
-
-/**
- * @return this.engine
- */
-Zip.prototype.unpipe = function() {
- return this.engine.unpipe.apply(this.engine, arguments);
-};
-
-module.exports = Zip;
-
-/**
- * @typedef {Object} ZipOptions
- * @global
- * @property {String} [comment] Sets the zip archive comment.
- * @property {Boolean} [forceLocalTime=false] Forces the archive to contain local file times instead of UTC.
- * @property {Boolean} [forceZip64=false] Forces the archive to contain ZIP64 headers.
- * @prpperty {Boolean} [namePrependSlash=false] Prepends a forward slash to archive file paths.
- * @property {Boolean} [store=false] Sets the compression method to STORE.
- * @property {Object} [zlib] Passed to [zlib]{@link https://nodejs.org/api/zlib.html#zlib_class_options}
- * to control compression.
- * @property {*} [*] See [zip-stream]{@link https://archiverjs.com/zip-stream/ZipStream.html} documentation for current list of properties.
- */
-
-/**
- * @typedef {Object} ZipEntryData
- * @global
- * @property {String} name Sets the entry name including internal path.
- * @property {(String|Date)} [date=NOW()] Sets the entry date.
- * @property {Number} [mode=D:0755/F:0644] Sets the entry permissions.
- * @property {Boolean} [namePrependSlash=ZipOptions.namePrependSlash] Prepends a forward slash to archive file paths.
- * @property {String} [prefix] Sets a path prefix for the entry name. Useful
- * when working with methods like `directory` or `glob`.
- * @property {fs.Stats} [stats] Sets the fs stat data for this entry allowing
- * for reduction of fs stat calls when stat data is already known.
- * @property {Boolean} [store=ZipOptions.store] Sets the compression method to STORE.
- */
-
-/**
- * ZipStream Module
- * @external ZipStream
- * @see {@link https://www.archiverjs.com/zip-stream/ZipStream.html}
- */
-
-
-/***/ }),
-
-/***/ 57888:
-/***/ (function(__unused_webpack_module, exports) {
-
-(function (global, factory) {
- true ? factory(exports) :
- 0;
-})(this, (function (exports) { 'use strict';
-
- /**
- * Creates a continuation function with some arguments already applied.
- *
- * Useful as a shorthand when combined with other control flow functions. Any
- * arguments passed to the returned function are added to the arguments
- * originally passed to apply.
- *
- * @name apply
- * @static
- * @memberOf module:Utils
- * @method
- * @category Util
- * @param {Function} fn - The function you want to eventually apply all
- * arguments to. Invokes with (arguments...).
- * @param {...*} arguments... - Any number of arguments to automatically apply
- * when the continuation is called.
- * @returns {Function} the partially-applied function
- * @example
- *
- * // using apply
- * async.parallel([
- * async.apply(fs.writeFile, 'testfile1', 'test1'),
- * async.apply(fs.writeFile, 'testfile2', 'test2')
- * ]);
- *
- *
- * // the same process without using apply
- * async.parallel([
- * function(callback) {
- * fs.writeFile('testfile1', 'test1', callback);
- * },
- * function(callback) {
- * fs.writeFile('testfile2', 'test2', callback);
- * }
- * ]);
- *
- * // It's possible to pass any number of additional arguments when calling the
- * // continuation:
- *
- * node> var fn = async.apply(sys.puts, 'one');
- * node> fn('two', 'three');
- * one
- * two
- * three
- */
- function apply(fn, ...args) {
- return (...callArgs) => fn(...args,...callArgs);
- }
-
- function initialParams (fn) {
- return function (...args/*, callback*/) {
- var callback = args.pop();
- return fn.call(this, args, callback);
- };
- }
-
- /* istanbul ignore file */
-
- var hasQueueMicrotask = typeof queueMicrotask === 'function' && queueMicrotask;
- var hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
- var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';
-
- function fallback(fn) {
- setTimeout(fn, 0);
- }
-
- function wrap(defer) {
- return (fn, ...args) => defer(() => fn(...args));
- }
-
- var _defer$1;
-
- if (hasQueueMicrotask) {
- _defer$1 = queueMicrotask;
- } else if (hasSetImmediate) {
- _defer$1 = setImmediate;
- } else if (hasNextTick) {
- _defer$1 = process.nextTick;
- } else {
- _defer$1 = fallback;
- }
-
- var setImmediate$1 = wrap(_defer$1);
-
- /**
- * Take a sync function and make it async, passing its return value to a
- * callback. This is useful for plugging sync functions into a waterfall,
- * series, or other async functions. Any arguments passed to the generated
- * function will be passed to the wrapped function (except for the final
- * callback argument). Errors thrown will be passed to the callback.
- *
- * If the function passed to `asyncify` returns a Promise, that promises's
- * resolved/rejected state will be used to call the callback, rather than simply
- * the synchronous return value.
- *
- * This also means you can asyncify ES2017 `async` functions.
- *
- * @name asyncify
- * @static
- * @memberOf module:Utils
- * @method
- * @alias wrapSync
- * @category Util
- * @param {Function} func - The synchronous function, or Promise-returning
- * function to convert to an {@link AsyncFunction}.
- * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be
- * invoked with `(args..., callback)`.
- * @example
- *
- * // passing a regular synchronous function
- * async.waterfall([
- * async.apply(fs.readFile, filename, "utf8"),
- * async.asyncify(JSON.parse),
- * function (data, next) {
- * // data is the result of parsing the text.
- * // If there was a parsing error, it would have been caught.
- * }
- * ], callback);
- *
- * // passing a function returning a promise
- * async.waterfall([
- * async.apply(fs.readFile, filename, "utf8"),
- * async.asyncify(function (contents) {
- * return db.model.create(contents);
- * }),
- * function (model, next) {
- * // `model` is the instantiated model object.
- * // If there was an error, this function would be skipped.
- * }
- * ], callback);
- *
- * // es2017 example, though `asyncify` is not needed if your JS environment
- * // supports async functions out of the box
- * var q = async.queue(async.asyncify(async function(file) {
- * var intermediateStep = await processFile(file);
- * return await somePromise(intermediateStep)
- * }));
- *
- * q.push(files);
- */
- function asyncify(func) {
- if (isAsync(func)) {
- return function (...args/*, callback*/) {
- const callback = args.pop();
- const promise = func.apply(this, args);
- return handlePromise(promise, callback)
- }
- }
-
- return initialParams(function (args, callback) {
- var result;
- try {
- result = func.apply(this, args);
- } catch (e) {
- return callback(e);
- }
- // if result is Promise object
- if (result && typeof result.then === 'function') {
- return handlePromise(result, callback)
- } else {
- callback(null, result);
- }
- });
- }
-
- function handlePromise(promise, callback) {
- return promise.then(value => {
- invokeCallback(callback, null, value);
- }, err => {
- invokeCallback(callback, err && (err instanceof Error || err.message) ? err : new Error(err));
- });
- }
-
- function invokeCallback(callback, error, value) {
- try {
- callback(error, value);
- } catch (err) {
- setImmediate$1(e => { throw e }, err);
- }
- }
-
- function isAsync(fn) {
- return fn[Symbol.toStringTag] === 'AsyncFunction';
- }
-
- function isAsyncGenerator(fn) {
- return fn[Symbol.toStringTag] === 'AsyncGenerator';
- }
-
- function isAsyncIterable(obj) {
- return typeof obj[Symbol.asyncIterator] === 'function';
- }
-
- function wrapAsync(asyncFn) {
- if (typeof asyncFn !== 'function') throw new Error('expected a function')
- return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn;
- }
-
- // conditionally promisify a function.
- // only return a promise if a callback is omitted
- function awaitify (asyncFn, arity) {
- if (!arity) arity = asyncFn.length;
- if (!arity) throw new Error('arity is undefined')
- function awaitable (...args) {
- if (typeof args[arity - 1] === 'function') {
- return asyncFn.apply(this, args)
- }
-
- return new Promise((resolve, reject) => {
- args[arity - 1] = (err, ...cbArgs) => {
- if (err) return reject(err)
- resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
- };
- asyncFn.apply(this, args);
- })
- }
-
- return awaitable
- }
-
- function applyEach$1 (eachfn) {
- return function applyEach(fns, ...callArgs) {
- const go = awaitify(function (callback) {
- var that = this;
- return eachfn(fns, (fn, cb) => {
- wrapAsync(fn).apply(that, callArgs.concat(cb));
- }, callback);
- });
- return go;
- };
- }
-
- function _asyncMap(eachfn, arr, iteratee, callback) {
- arr = arr || [];
- var results = [];
- var counter = 0;
- var _iteratee = wrapAsync(iteratee);
-
- return eachfn(arr, (value, _, iterCb) => {
- var index = counter++;
- _iteratee(value, (err, v) => {
- results[index] = v;
- iterCb(err);
- });
- }, err => {
- callback(err, results);
- });
- }
-
- function isArrayLike(value) {
- return value &&
- typeof value.length === 'number' &&
- value.length >= 0 &&
- value.length % 1 === 0;
- }
-
- // A temporary value used to identify if the loop should be broken.
- // See #1064, #1293
- const breakLoop = {};
-
- function once(fn) {
- function wrapper (...args) {
- if (fn === null) return;
- var callFn = fn;
- fn = null;
- callFn.apply(this, args);
- }
- Object.assign(wrapper, fn);
- return wrapper
- }
-
- function getIterator (coll) {
- return coll[Symbol.iterator] && coll[Symbol.iterator]();
- }
-
- function createArrayIterator(coll) {
- var i = -1;
- var len = coll.length;
- return function next() {
- return ++i < len ? {value: coll[i], key: i} : null;
- }
- }
-
- function createES2015Iterator(iterator) {
- var i = -1;
- return function next() {
- var item = iterator.next();
- if (item.done)
- return null;
- i++;
- return {value: item.value, key: i};
- }
- }
-
- function createObjectIterator(obj) {
- var okeys = obj ? Object.keys(obj) : [];
- var i = -1;
- var len = okeys.length;
- return function next() {
- var key = okeys[++i];
- if (key === '__proto__') {
- return next();
- }
- return i < len ? {value: obj[key], key} : null;
- };
- }
-
- function createIterator(coll) {
- if (isArrayLike(coll)) {
- return createArrayIterator(coll);
- }
-
- var iterator = getIterator(coll);
- return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);
- }
-
- function onlyOnce(fn) {
- return function (...args) {
- if (fn === null) throw new Error("Callback was already called.");
- var callFn = fn;
- fn = null;
- callFn.apply(this, args);
- };
- }
-
- // for async generators
- function asyncEachOfLimit(generator, limit, iteratee, callback) {
- let done = false;
- let canceled = false;
- let awaiting = false;
- let running = 0;
- let idx = 0;
-
- function replenish() {
- //console.log('replenish')
- if (running >= limit || awaiting || done) return
- //console.log('replenish awaiting')
- awaiting = true;
- generator.next().then(({value, done: iterDone}) => {
- //console.log('got value', value)
- if (canceled || done) return
- awaiting = false;
- if (iterDone) {
- done = true;
- if (running <= 0) {
- //console.log('done nextCb')
- callback(null);
- }
- return;
- }
- running++;
- iteratee(value, idx, iterateeCallback);
- idx++;
- replenish();
- }).catch(handleError);
- }
-
- function iterateeCallback(err, result) {
- //console.log('iterateeCallback')
- running -= 1;
- if (canceled) return
- if (err) return handleError(err)
-
- if (err === false) {
- done = true;
- canceled = true;
- return
- }
-
- if (result === breakLoop || (done && running <= 0)) {
- done = true;
- //console.log('done iterCb')
- return callback(null);
- }
- replenish();
- }
-
- function handleError(err) {
- if (canceled) return
- awaiting = false;
- done = true;
- callback(err);
- }
-
- replenish();
- }
-
- var eachOfLimit$2 = (limit) => {
- return (obj, iteratee, callback) => {
- callback = once(callback);
- if (limit <= 0) {
- throw new RangeError('concurrency limit cannot be less than 1')
- }
- if (!obj) {
- return callback(null);
- }
- if (isAsyncGenerator(obj)) {
- return asyncEachOfLimit(obj, limit, iteratee, callback)
- }
- if (isAsyncIterable(obj)) {
- return asyncEachOfLimit(obj[Symbol.asyncIterator](), limit, iteratee, callback)
- }
- var nextElem = createIterator(obj);
- var done = false;
- var canceled = false;
- var running = 0;
- var looping = false;
-
- function iterateeCallback(err, value) {
- if (canceled) return
- running -= 1;
- if (err) {
- done = true;
- callback(err);
- }
- else if (err === false) {
- done = true;
- canceled = true;
- }
- else if (value === breakLoop || (done && running <= 0)) {
- done = true;
- return callback(null);
- }
- else if (!looping) {
- replenish();
- }
- }
-
- function replenish () {
- looping = true;
- while (running < limit && !done) {
- var elem = nextElem();
- if (elem === null) {
- done = true;
- if (running <= 0) {
- callback(null);
- }
- return;
- }
- running += 1;
- iteratee(elem.value, elem.key, onlyOnce(iterateeCallback));
- }
- looping = false;
- }
-
- replenish();
- };
- };
-
- /**
- * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
- * time.
- *
- * @name eachOfLimit
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.eachOf]{@link module:Collections.eachOf}
- * @alias forEachOfLimit
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {number} limit - The maximum number of async operations at a time.
- * @param {AsyncFunction} iteratee - An async function to apply to each
- * item in `coll`. The `key` is the item's key, or index in the case of an
- * array.
- * Invoked with (item, key, callback).
- * @param {Function} [callback] - A callback which is called when all
- * `iteratee` functions have finished, or an error occurs. Invoked with (err).
- * @returns {Promise} a promise, if a callback is omitted
- */
- function eachOfLimit(coll, limit, iteratee, callback) {
- return eachOfLimit$2(limit)(coll, wrapAsync(iteratee), callback);
- }
-
- var eachOfLimit$1 = awaitify(eachOfLimit, 4);
-
- // eachOf implementation optimized for array-likes
- function eachOfArrayLike(coll, iteratee, callback) {
- callback = once(callback);
- var index = 0,
- completed = 0,
- {length} = coll,
- canceled = false;
- if (length === 0) {
- callback(null);
- }
-
- function iteratorCallback(err, value) {
- if (err === false) {
- canceled = true;
- }
- if (canceled === true) return
- if (err) {
- callback(err);
- } else if ((++completed === length) || value === breakLoop) {
- callback(null);
- }
- }
-
- for (; index < length; index++) {
- iteratee(coll[index], index, onlyOnce(iteratorCallback));
- }
- }
-
- // a generic version of eachOf which can handle array, object, and iterator cases.
- function eachOfGeneric (coll, iteratee, callback) {
- return eachOfLimit$1(coll, Infinity, iteratee, callback);
- }
-
- /**
- * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument
- * to the iteratee.
- *
- * @name eachOf
- * @static
- * @memberOf module:Collections
- * @method
- * @alias forEachOf
- * @category Collection
- * @see [async.each]{@link module:Collections.each}
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - A function to apply to each
- * item in `coll`.
- * The `key` is the item's key, or index in the case of an array.
- * Invoked with (item, key, callback).
- * @param {Function} [callback] - A callback which is called when all
- * `iteratee` functions have finished, or an error occurs. Invoked with (err).
- * @returns {Promise} a promise, if a callback is omitted
- * @example
- *
- * // dev.json is a file containing a valid json object config for dev environment
- * // dev.json is a file containing a valid json object config for test environment
- * // prod.json is a file containing a valid json object config for prod environment
- * // invalid.json is a file with a malformed json object
- *
- * let configs = {}; //global variable
- * let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'};
- * let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'};
- *
- * // asynchronous function that reads a json file and parses the contents as json object
- * function parseFile(file, key, callback) {
- * fs.readFile(file, "utf8", function(err, data) {
- * if (err) return calback(err);
- * try {
- * configs[key] = JSON.parse(data);
- * } catch (e) {
- * return callback(e);
- * }
- * callback();
- * });
- * }
- *
- * // Using callbacks
- * async.forEachOf(validConfigFileMap, parseFile, function (err) {
- * if (err) {
- * console.error(err);
- * } else {
- * console.log(configs);
- * // configs is now a map of JSON data, e.g.
- * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
- * }
- * });
- *
- * //Error handing
- * async.forEachOf(invalidConfigFileMap, parseFile, function (err) {
- * if (err) {
- * console.error(err);
- * // JSON parse error exception
- * } else {
- * console.log(configs);
- * }
- * });
- *
- * // Using Promises
- * async.forEachOf(validConfigFileMap, parseFile)
- * .then( () => {
- * console.log(configs);
- * // configs is now a map of JSON data, e.g.
- * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
- * }).catch( err => {
- * console.error(err);
- * });
- *
- * //Error handing
- * async.forEachOf(invalidConfigFileMap, parseFile)
- * .then( () => {
- * console.log(configs);
- * }).catch( err => {
- * console.error(err);
- * // JSON parse error exception
- * });
- *
- * // Using async/await
- * async () => {
- * try {
- * let result = await async.forEachOf(validConfigFileMap, parseFile);
- * console.log(configs);
- * // configs is now a map of JSON data, e.g.
- * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- * //Error handing
- * async () => {
- * try {
- * let result = await async.forEachOf(invalidConfigFileMap, parseFile);
- * console.log(configs);
- * }
- * catch (err) {
- * console.log(err);
- * // JSON parse error exception
- * }
- * }
- *
- */
- function eachOf(coll, iteratee, callback) {
- var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric;
- return eachOfImplementation(coll, wrapAsync(iteratee), callback);
- }
-
- var eachOf$1 = awaitify(eachOf, 3);
-
- /**
- * Produces a new collection of values by mapping each value in `coll` through
- * the `iteratee` function. The `iteratee` is called with an item from `coll`
- * and a callback for when it has finished processing. Each of these callbacks
- * takes 2 arguments: an `error`, and the transformed item from `coll`. If
- * `iteratee` passes an error to its callback, the main `callback` (for the
- * `map` function) is immediately called with the error.
- *
- * Note, that since this function applies the `iteratee` to each item in
- * parallel, there is no guarantee that the `iteratee` functions will complete
- * in order. However, the results array will be in the same order as the
- * original `coll`.
- *
- * If `map` is passed an Object, the results will be an Array. The results
- * will roughly be in the order of the original Objects' keys (but this can
- * vary across JavaScript engines).
- *
- * @name map
- * @static
- * @memberOf module:Collections
- * @method
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - An async function to apply to each item in
- * `coll`.
- * The iteratee should complete with the transformed item.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called when all `iteratee`
- * functions have finished, or an error occurs. Results is an Array of the
- * transformed items from the `coll`. Invoked with (err, results).
- * @returns {Promise} a promise, if no callback is passed
- * @example
- *
- * // file1.txt is a file that is 1000 bytes in size
- * // file2.txt is a file that is 2000 bytes in size
- * // file3.txt is a file that is 3000 bytes in size
- * // file4.txt does not exist
- *
- * const fileList = ['file1.txt','file2.txt','file3.txt'];
- * const withMissingFileList = ['file1.txt','file2.txt','file4.txt'];
- *
- * // asynchronous function that returns the file size in bytes
- * function getFileSizeInBytes(file, callback) {
- * fs.stat(file, function(err, stat) {
- * if (err) {
- * return callback(err);
- * }
- * callback(null, stat.size);
- * });
- * }
- *
- * // Using callbacks
- * async.map(fileList, getFileSizeInBytes, function(err, results) {
- * if (err) {
- * console.log(err);
- * } else {
- * console.log(results);
- * // results is now an array of the file size in bytes for each file, e.g.
- * // [ 1000, 2000, 3000]
- * }
- * });
- *
- * // Error Handling
- * async.map(withMissingFileList, getFileSizeInBytes, function(err, results) {
- * if (err) {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * } else {
- * console.log(results);
- * }
- * });
- *
- * // Using Promises
- * async.map(fileList, getFileSizeInBytes)
- * .then( results => {
- * console.log(results);
- * // results is now an array of the file size in bytes for each file, e.g.
- * // [ 1000, 2000, 3000]
- * }).catch( err => {
- * console.log(err);
- * });
- *
- * // Error Handling
- * async.map(withMissingFileList, getFileSizeInBytes)
- * .then( results => {
- * console.log(results);
- * }).catch( err => {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * });
- *
- * // Using async/await
- * async () => {
- * try {
- * let results = await async.map(fileList, getFileSizeInBytes);
- * console.log(results);
- * // results is now an array of the file size in bytes for each file, e.g.
- * // [ 1000, 2000, 3000]
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- * // Error Handling
- * async () => {
- * try {
- * let results = await async.map(withMissingFileList, getFileSizeInBytes);
- * console.log(results);
- * }
- * catch (err) {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * }
- * }
- *
- */
- function map (coll, iteratee, callback) {
- return _asyncMap(eachOf$1, coll, iteratee, callback)
- }
- var map$1 = awaitify(map, 3);
-
- /**
- * Applies the provided arguments to each function in the array, calling
- * `callback` after all functions have completed. If you only provide the first
- * argument, `fns`, then it will return a function which lets you pass in the
- * arguments as if it were a single function call. If more arguments are
- * provided, `callback` is required while `args` is still optional. The results
- * for each of the applied async functions are passed to the final callback
- * as an array.
- *
- * @name applyEach
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @category Control Flow
- * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s
- * to all call with the same arguments
- * @param {...*} [args] - any number of separate arguments to pass to the
- * function.
- * @param {Function} [callback] - the final argument should be the callback,
- * called when all functions have completed processing.
- * @returns {AsyncFunction} - Returns a function that takes no args other than
- * an optional callback, that is the result of applying the `args` to each
- * of the functions.
- * @example
- *
- * const appliedFn = async.applyEach([enableSearch, updateSchema], 'bucket')
- *
- * appliedFn((err, results) => {
- * // results[0] is the results for `enableSearch`
- * // results[1] is the results for `updateSchema`
- * });
- *
- * // partial application example:
- * async.each(
- * buckets,
- * async (bucket) => async.applyEach([enableSearch, updateSchema], bucket)(),
- * callback
- * );
- */
- var applyEach = applyEach$1(map$1);
-
- /**
- * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
- *
- * @name eachOfSeries
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.eachOf]{@link module:Collections.eachOf}
- * @alias forEachOfSeries
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - An async function to apply to each item in
- * `coll`.
- * Invoked with (item, key, callback).
- * @param {Function} [callback] - A callback which is called when all `iteratee`
- * functions have finished, or an error occurs. Invoked with (err).
- * @returns {Promise} a promise, if a callback is omitted
- */
- function eachOfSeries(coll, iteratee, callback) {
- return eachOfLimit$1(coll, 1, iteratee, callback)
- }
- var eachOfSeries$1 = awaitify(eachOfSeries, 3);
-
- /**
- * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.
- *
- * @name mapSeries
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.map]{@link module:Collections.map}
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - An async function to apply to each item in
- * `coll`.
- * The iteratee should complete with the transformed item.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called when all `iteratee`
- * functions have finished, or an error occurs. Results is an array of the
- * transformed items from the `coll`. Invoked with (err, results).
- * @returns {Promise} a promise, if no callback is passed
- */
- function mapSeries (coll, iteratee, callback) {
- return _asyncMap(eachOfSeries$1, coll, iteratee, callback)
- }
- var mapSeries$1 = awaitify(mapSeries, 3);
-
- /**
- * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.
- *
- * @name applyEachSeries
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @see [async.applyEach]{@link module:ControlFlow.applyEach}
- * @category Control Flow
- * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s to all
- * call with the same arguments
- * @param {...*} [args] - any number of separate arguments to pass to the
- * function.
- * @param {Function} [callback] - the final argument should be the callback,
- * called when all functions have completed processing.
- * @returns {AsyncFunction} - A function, that when called, is the result of
- * appling the `args` to the list of functions. It takes no args, other than
- * a callback.
- */
- var applyEachSeries = applyEach$1(mapSeries$1);
-
- const PROMISE_SYMBOL = Symbol('promiseCallback');
-
- function promiseCallback () {
- let resolve, reject;
- function callback (err, ...args) {
- if (err) return reject(err)
- resolve(args.length > 1 ? args : args[0]);
- }
-
- callback[PROMISE_SYMBOL] = new Promise((res, rej) => {
- resolve = res,
- reject = rej;
- });
-
- return callback
- }
-
- /**
- * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on
- * their requirements. Each function can optionally depend on other functions
- * being completed first, and each function is run as soon as its requirements
- * are satisfied.
- *
- * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence
- * will stop. Further tasks will not execute (so any other functions depending
- * on it will not run), and the main `callback` is immediately called with the
- * error.
- *
- * {@link AsyncFunction}s also receive an object containing the results of functions which
- * have completed so far as the first argument, if they have dependencies. If a
- * task function has no dependencies, it will only be passed a callback.
- *
- * @name auto
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @category Control Flow
- * @param {Object} tasks - An object. Each of its properties is either a
- * function or an array of requirements, with the {@link AsyncFunction} itself the last item
- * in the array. The object's key of a property serves as the name of the task
- * defined by that property, i.e. can be used when specifying requirements for
- * other tasks. The function receives one or two arguments:
- * * a `results` object, containing the results of the previously executed
- * functions, only passed if the task has any dependencies,
- * * a `callback(err, result)` function, which must be called when finished,
- * passing an `error` (which can be `null`) and the result of the function's
- * execution.
- * @param {number} [concurrency=Infinity] - An optional `integer` for
- * determining the maximum number of tasks that can be run in parallel. By
- * default, as many as possible.
- * @param {Function} [callback] - An optional callback which is called when all
- * the tasks have been completed. It receives the `err` argument if any `tasks`
- * pass an error to their callback. Results are always returned; however, if an
- * error occurs, no further `tasks` will be performed, and the results object
- * will only contain partial results. Invoked with (err, results).
- * @returns {Promise} a promise, if a callback is not passed
- * @example
- *
- * //Using Callbacks
- * async.auto({
- * get_data: function(callback) {
- * // async code to get some data
- * callback(null, 'data', 'converted to array');
- * },
- * make_folder: function(callback) {
- * // async code to create a directory to store a file in
- * // this is run at the same time as getting the data
- * callback(null, 'folder');
- * },
- * write_file: ['get_data', 'make_folder', function(results, callback) {
- * // once there is some data and the directory exists,
- * // write the data to a file in the directory
- * callback(null, 'filename');
- * }],
- * email_link: ['write_file', function(results, callback) {
- * // once the file is written let's email a link to it...
- * callback(null, {'file':results.write_file, 'email':'user@example.com'});
- * }]
- * }, function(err, results) {
- * if (err) {
- * console.log('err = ', err);
- * }
- * console.log('results = ', results);
- * // results = {
- * // get_data: ['data', 'converted to array']
- * // make_folder; 'folder',
- * // write_file: 'filename'
- * // email_link: { file: 'filename', email: 'user@example.com' }
- * // }
- * });
- *
- * //Using Promises
- * async.auto({
- * get_data: function(callback) {
- * console.log('in get_data');
- * // async code to get some data
- * callback(null, 'data', 'converted to array');
- * },
- * make_folder: function(callback) {
- * console.log('in make_folder');
- * // async code to create a directory to store a file in
- * // this is run at the same time as getting the data
- * callback(null, 'folder');
- * },
- * write_file: ['get_data', 'make_folder', function(results, callback) {
- * // once there is some data and the directory exists,
- * // write the data to a file in the directory
- * callback(null, 'filename');
- * }],
- * email_link: ['write_file', function(results, callback) {
- * // once the file is written let's email a link to it...
- * callback(null, {'file':results.write_file, 'email':'user@example.com'});
- * }]
- * }).then(results => {
- * console.log('results = ', results);
- * // results = {
- * // get_data: ['data', 'converted to array']
- * // make_folder; 'folder',
- * // write_file: 'filename'
- * // email_link: { file: 'filename', email: 'user@example.com' }
- * // }
- * }).catch(err => {
- * console.log('err = ', err);
- * });
- *
- * //Using async/await
- * async () => {
- * try {
- * let results = await async.auto({
- * get_data: function(callback) {
- * // async code to get some data
- * callback(null, 'data', 'converted to array');
- * },
- * make_folder: function(callback) {
- * // async code to create a directory to store a file in
- * // this is run at the same time as getting the data
- * callback(null, 'folder');
- * },
- * write_file: ['get_data', 'make_folder', function(results, callback) {
- * // once there is some data and the directory exists,
- * // write the data to a file in the directory
- * callback(null, 'filename');
- * }],
- * email_link: ['write_file', function(results, callback) {
- * // once the file is written let's email a link to it...
- * callback(null, {'file':results.write_file, 'email':'user@example.com'});
- * }]
- * });
- * console.log('results = ', results);
- * // results = {
- * // get_data: ['data', 'converted to array']
- * // make_folder; 'folder',
- * // write_file: 'filename'
- * // email_link: { file: 'filename', email: 'user@example.com' }
- * // }
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- */
- function auto(tasks, concurrency, callback) {
- if (typeof concurrency !== 'number') {
- // concurrency is optional, shift the args.
- callback = concurrency;
- concurrency = null;
- }
- callback = once(callback || promiseCallback());
- var numTasks = Object.keys(tasks).length;
- if (!numTasks) {
- return callback(null);
- }
- if (!concurrency) {
- concurrency = numTasks;
- }
-
- var results = {};
- var runningTasks = 0;
- var canceled = false;
- var hasError = false;
-
- var listeners = Object.create(null);
-
- var readyTasks = [];
-
- // for cycle detection:
- var readyToCheck = []; // tasks that have been identified as reachable
- // without the possibility of returning to an ancestor task
- var uncheckedDependencies = {};
-
- Object.keys(tasks).forEach(key => {
- var task = tasks[key];
- if (!Array.isArray(task)) {
- // no dependencies
- enqueueTask(key, [task]);
- readyToCheck.push(key);
- return;
- }
-
- var dependencies = task.slice(0, task.length - 1);
- var remainingDependencies = dependencies.length;
- if (remainingDependencies === 0) {
- enqueueTask(key, task);
- readyToCheck.push(key);
- return;
- }
- uncheckedDependencies[key] = remainingDependencies;
-
- dependencies.forEach(dependencyName => {
- if (!tasks[dependencyName]) {
- throw new Error('async.auto task `' + key +
- '` has a non-existent dependency `' +
- dependencyName + '` in ' +
- dependencies.join(', '));
- }
- addListener(dependencyName, () => {
- remainingDependencies--;
- if (remainingDependencies === 0) {
- enqueueTask(key, task);
- }
- });
- });
- });
-
- checkForDeadlocks();
- processQueue();
-
- function enqueueTask(key, task) {
- readyTasks.push(() => runTask(key, task));
- }
-
- function processQueue() {
- if (canceled) return
- if (readyTasks.length === 0 && runningTasks === 0) {
- return callback(null, results);
- }
- while(readyTasks.length && runningTasks < concurrency) {
- var run = readyTasks.shift();
- run();
- }
-
- }
-
- function addListener(taskName, fn) {
- var taskListeners = listeners[taskName];
- if (!taskListeners) {
- taskListeners = listeners[taskName] = [];
- }
-
- taskListeners.push(fn);
- }
-
- function taskComplete(taskName) {
- var taskListeners = listeners[taskName] || [];
- taskListeners.forEach(fn => fn());
- processQueue();
- }
-
-
- function runTask(key, task) {
- if (hasError) return;
-
- var taskCallback = onlyOnce((err, ...result) => {
- runningTasks--;
- if (err === false) {
- canceled = true;
- return
- }
- if (result.length < 2) {
- [result] = result;
- }
- if (err) {
- var safeResults = {};
- Object.keys(results).forEach(rkey => {
- safeResults[rkey] = results[rkey];
- });
- safeResults[key] = result;
- hasError = true;
- listeners = Object.create(null);
- if (canceled) return
- callback(err, safeResults);
- } else {
- results[key] = result;
- taskComplete(key);
- }
- });
-
- runningTasks++;
- var taskFn = wrapAsync(task[task.length - 1]);
- if (task.length > 1) {
- taskFn(results, taskCallback);
- } else {
- taskFn(taskCallback);
- }
- }
-
- function checkForDeadlocks() {
- // Kahn's algorithm
- // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm
- // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html
- var currentTask;
- var counter = 0;
- while (readyToCheck.length) {
- currentTask = readyToCheck.pop();
- counter++;
- getDependents(currentTask).forEach(dependent => {
- if (--uncheckedDependencies[dependent] === 0) {
- readyToCheck.push(dependent);
- }
- });
- }
-
- if (counter !== numTasks) {
- throw new Error(
- 'async.auto cannot execute tasks due to a recursive dependency'
- );
- }
- }
-
- function getDependents(taskName) {
- var result = [];
- Object.keys(tasks).forEach(key => {
- const task = tasks[key];
- if (Array.isArray(task) && task.indexOf(taskName) >= 0) {
- result.push(key);
- }
- });
- return result;
- }
-
- return callback[PROMISE_SYMBOL]
- }
-
- var FN_ARGS = /^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/;
- var ARROW_FN_ARGS = /^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/;
- var FN_ARG_SPLIT = /,/;
- var FN_ARG = /(=.+)?(\s*)$/;
-
- function stripComments(string) {
- let stripped = '';
- let index = 0;
- let endBlockComment = string.indexOf('*/');
- while (index < string.length) {
- if (string[index] === '/' && string[index+1] === '/') {
- // inline comment
- let endIndex = string.indexOf('\n', index);
- index = (endIndex === -1) ? string.length : endIndex;
- } else if ((endBlockComment !== -1) && (string[index] === '/') && (string[index+1] === '*')) {
- // block comment
- let endIndex = string.indexOf('*/', index);
- if (endIndex !== -1) {
- index = endIndex + 2;
- endBlockComment = string.indexOf('*/', index);
- } else {
- stripped += string[index];
- index++;
- }
- } else {
- stripped += string[index];
- index++;
- }
- }
- return stripped;
- }
-
- function parseParams(func) {
- const src = stripComments(func.toString());
- let match = src.match(FN_ARGS);
- if (!match) {
- match = src.match(ARROW_FN_ARGS);
- }
- if (!match) throw new Error('could not parse args in autoInject\nSource:\n' + src)
- let [, args] = match;
- return args
- .replace(/\s/g, '')
- .split(FN_ARG_SPLIT)
- .map((arg) => arg.replace(FN_ARG, '').trim());
- }
-
- /**
- * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent
- * tasks are specified as parameters to the function, after the usual callback
- * parameter, with the parameter names matching the names of the tasks it
- * depends on. This can provide even more readable task graphs which can be
- * easier to maintain.
- *
- * If a final callback is specified, the task results are similarly injected,
- * specified as named parameters after the initial error parameter.
- *
- * The autoInject function is purely syntactic sugar and its semantics are
- * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}.
- *
- * @name autoInject
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @see [async.auto]{@link module:ControlFlow.auto}
- * @category Control Flow
- * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of
- * the form 'func([dependencies...], callback). The object's key of a property
- * serves as the name of the task defined by that property, i.e. can be used
- * when specifying requirements for other tasks.
- * * The `callback` parameter is a `callback(err, result)` which must be called
- * when finished, passing an `error` (which can be `null`) and the result of
- * the function's execution. The remaining parameters name other tasks on
- * which the task is dependent, and the results from those tasks are the
- * arguments of those parameters.
- * @param {Function} [callback] - An optional callback which is called when all
- * the tasks have been completed. It receives the `err` argument if any `tasks`
- * pass an error to their callback, and a `results` object with any completed
- * task results, similar to `auto`.
- * @returns {Promise} a promise, if no callback is passed
- * @example
- *
- * // The example from `auto` can be rewritten as follows:
- * async.autoInject({
- * get_data: function(callback) {
- * // async code to get some data
- * callback(null, 'data', 'converted to array');
- * },
- * make_folder: function(callback) {
- * // async code to create a directory to store a file in
- * // this is run at the same time as getting the data
- * callback(null, 'folder');
- * },
- * write_file: function(get_data, make_folder, callback) {
- * // once there is some data and the directory exists,
- * // write the data to a file in the directory
- * callback(null, 'filename');
- * },
- * email_link: function(write_file, callback) {
- * // once the file is written let's email a link to it...
- * // write_file contains the filename returned by write_file.
- * callback(null, {'file':write_file, 'email':'user@example.com'});
- * }
- * }, function(err, results) {
- * console.log('err = ', err);
- * console.log('email_link = ', results.email_link);
- * });
- *
- * // If you are using a JS minifier that mangles parameter names, `autoInject`
- * // will not work with plain functions, since the parameter names will be
- * // collapsed to a single letter identifier. To work around this, you can
- * // explicitly specify the names of the parameters your task function needs
- * // in an array, similar to Angular.js dependency injection.
- *
- * // This still has an advantage over plain `auto`, since the results a task
- * // depends on are still spread into arguments.
- * async.autoInject({
- * //...
- * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) {
- * callback(null, 'filename');
- * }],
- * email_link: ['write_file', function(write_file, callback) {
- * callback(null, {'file':write_file, 'email':'user@example.com'});
- * }]
- * //...
- * }, function(err, results) {
- * console.log('err = ', err);
- * console.log('email_link = ', results.email_link);
- * });
- */
- function autoInject(tasks, callback) {
- var newTasks = {};
-
- Object.keys(tasks).forEach(key => {
- var taskFn = tasks[key];
- var params;
- var fnIsAsync = isAsync(taskFn);
- var hasNoDeps =
- (!fnIsAsync && taskFn.length === 1) ||
- (fnIsAsync && taskFn.length === 0);
-
- if (Array.isArray(taskFn)) {
- params = [...taskFn];
- taskFn = params.pop();
-
- newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);
- } else if (hasNoDeps) {
- // no dependencies, use the function as-is
- newTasks[key] = taskFn;
- } else {
- params = parseParams(taskFn);
- if ((taskFn.length === 0 && !fnIsAsync) && params.length === 0) {
- throw new Error("autoInject task functions require explicit parameters.");
- }
-
- // remove callback param
- if (!fnIsAsync) params.pop();
-
- newTasks[key] = params.concat(newTask);
- }
-
- function newTask(results, taskCb) {
- var newArgs = params.map(name => results[name]);
- newArgs.push(taskCb);
- wrapAsync(taskFn)(...newArgs);
- }
- });
-
- return auto(newTasks, callback);
- }
-
- // Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation
- // used for queues. This implementation assumes that the node provided by the user can be modified
- // to adjust the next and last properties. We implement only the minimal functionality
- // for queue support.
- class DLL {
- constructor() {
- this.head = this.tail = null;
- this.length = 0;
- }
-
- removeLink(node) {
- if (node.prev) node.prev.next = node.next;
- else this.head = node.next;
- if (node.next) node.next.prev = node.prev;
- else this.tail = node.prev;
-
- node.prev = node.next = null;
- this.length -= 1;
- return node;
- }
-
- empty () {
- while(this.head) this.shift();
- return this;
- }
-
- insertAfter(node, newNode) {
- newNode.prev = node;
- newNode.next = node.next;
- if (node.next) node.next.prev = newNode;
- else this.tail = newNode;
- node.next = newNode;
- this.length += 1;
- }
-
- insertBefore(node, newNode) {
- newNode.prev = node.prev;
- newNode.next = node;
- if (node.prev) node.prev.next = newNode;
- else this.head = newNode;
- node.prev = newNode;
- this.length += 1;
- }
-
- unshift(node) {
- if (this.head) this.insertBefore(this.head, node);
- else setInitial(this, node);
- }
-
- push(node) {
- if (this.tail) this.insertAfter(this.tail, node);
- else setInitial(this, node);
- }
-
- shift() {
- return this.head && this.removeLink(this.head);
- }
-
- pop() {
- return this.tail && this.removeLink(this.tail);
- }
-
- toArray() {
- return [...this]
- }
-
- *[Symbol.iterator] () {
- var cur = this.head;
- while (cur) {
- yield cur.data;
- cur = cur.next;
- }
- }
-
- remove (testFn) {
- var curr = this.head;
- while(curr) {
- var {next} = curr;
- if (testFn(curr)) {
- this.removeLink(curr);
- }
- curr = next;
- }
- return this;
- }
- }
-
- function setInitial(dll, node) {
- dll.length = 1;
- dll.head = dll.tail = node;
- }
-
- function queue$1(worker, concurrency, payload) {
- if (concurrency == null) {
- concurrency = 1;
- }
- else if(concurrency === 0) {
- throw new RangeError('Concurrency must not be zero');
- }
-
- var _worker = wrapAsync(worker);
- var numRunning = 0;
- var workersList = [];
- const events = {
- error: [],
- drain: [],
- saturated: [],
- unsaturated: [],
- empty: []
- };
-
- function on (event, handler) {
- events[event].push(handler);
- }
-
- function once (event, handler) {
- const handleAndRemove = (...args) => {
- off(event, handleAndRemove);
- handler(...args);
- };
- events[event].push(handleAndRemove);
- }
-
- function off (event, handler) {
- if (!event) return Object.keys(events).forEach(ev => events[ev] = [])
- if (!handler) return events[event] = []
- events[event] = events[event].filter(ev => ev !== handler);
- }
-
- function trigger (event, ...args) {
- events[event].forEach(handler => handler(...args));
- }
-
- var processingScheduled = false;
- function _insert(data, insertAtFront, rejectOnError, callback) {
- if (callback != null && typeof callback !== 'function') {
- throw new Error('task callback must be a function');
- }
- q.started = true;
-
- var res, rej;
- function promiseCallback (err, ...args) {
- // we don't care about the error, let the global error handler
- // deal with it
- if (err) return rejectOnError ? rej(err) : res()
- if (args.length <= 1) return res(args[0])
- res(args);
- }
-
- var item = q._createTaskItem(
- data,
- rejectOnError ? promiseCallback :
- (callback || promiseCallback)
- );
-
- if (insertAtFront) {
- q._tasks.unshift(item);
- } else {
- q._tasks.push(item);
- }
-
- if (!processingScheduled) {
- processingScheduled = true;
- setImmediate$1(() => {
- processingScheduled = false;
- q.process();
- });
- }
-
- if (rejectOnError || !callback) {
- return new Promise((resolve, reject) => {
- res = resolve;
- rej = reject;
- })
- }
- }
-
- function _createCB(tasks) {
- return function (err, ...args) {
- numRunning -= 1;
-
- for (var i = 0, l = tasks.length; i < l; i++) {
- var task = tasks[i];
-
- var index = workersList.indexOf(task);
- if (index === 0) {
- workersList.shift();
- } else if (index > 0) {
- workersList.splice(index, 1);
- }
-
- task.callback(err, ...args);
-
- if (err != null) {
- trigger('error', err, task.data);
- }
- }
-
- if (numRunning <= (q.concurrency - q.buffer) ) {
- trigger('unsaturated');
- }
-
- if (q.idle()) {
- trigger('drain');
- }
- q.process();
- };
- }
-
- function _maybeDrain(data) {
- if (data.length === 0 && q.idle()) {
- // call drain immediately if there are no tasks
- setImmediate$1(() => trigger('drain'));
- return true
- }
- return false
- }
-
- const eventMethod = (name) => (handler) => {
- if (!handler) {
- return new Promise((resolve, reject) => {
- once(name, (err, data) => {
- if (err) return reject(err)
- resolve(data);
- });
- })
- }
- off(name);
- on(name, handler);
-
- };
-
- var isProcessing = false;
- var q = {
- _tasks: new DLL(),
- _createTaskItem (data, callback) {
- return {
- data,
- callback
- };
- },
- *[Symbol.iterator] () {
- yield* q._tasks[Symbol.iterator]();
- },
- concurrency,
- payload,
- buffer: concurrency / 4,
- started: false,
- paused: false,
- push (data, callback) {
- if (Array.isArray(data)) {
- if (_maybeDrain(data)) return
- return data.map(datum => _insert(datum, false, false, callback))
- }
- return _insert(data, false, false, callback);
- },
- pushAsync (data, callback) {
- if (Array.isArray(data)) {
- if (_maybeDrain(data)) return
- return data.map(datum => _insert(datum, false, true, callback))
- }
- return _insert(data, false, true, callback);
- },
- kill () {
- off();
- q._tasks.empty();
- },
- unshift (data, callback) {
- if (Array.isArray(data)) {
- if (_maybeDrain(data)) return
- return data.map(datum => _insert(datum, true, false, callback))
- }
- return _insert(data, true, false, callback);
- },
- unshiftAsync (data, callback) {
- if (Array.isArray(data)) {
- if (_maybeDrain(data)) return
- return data.map(datum => _insert(datum, true, true, callback))
- }
- return _insert(data, true, true, callback);
- },
- remove (testFn) {
- q._tasks.remove(testFn);
- },
- process () {
- // Avoid trying to start too many processing operations. This can occur
- // when callbacks resolve synchronously (#1267).
- if (isProcessing) {
- return;
- }
- isProcessing = true;
- while(!q.paused && numRunning < q.concurrency && q._tasks.length){
- var tasks = [], data = [];
- var l = q._tasks.length;
- if (q.payload) l = Math.min(l, q.payload);
- for (var i = 0; i < l; i++) {
- var node = q._tasks.shift();
- tasks.push(node);
- workersList.push(node);
- data.push(node.data);
- }
-
- numRunning += 1;
-
- if (q._tasks.length === 0) {
- trigger('empty');
- }
-
- if (numRunning === q.concurrency) {
- trigger('saturated');
- }
-
- var cb = onlyOnce(_createCB(tasks));
- _worker(data, cb);
- }
- isProcessing = false;
- },
- length () {
- return q._tasks.length;
- },
- running () {
- return numRunning;
- },
- workersList () {
- return workersList;
- },
- idle() {
- return q._tasks.length + numRunning === 0;
- },
- pause () {
- q.paused = true;
- },
- resume () {
- if (q.paused === false) { return; }
- q.paused = false;
- setImmediate$1(q.process);
- }
- };
- // define these as fixed properties, so people get useful errors when updating
- Object.defineProperties(q, {
- saturated: {
- writable: false,
- value: eventMethod('saturated')
- },
- unsaturated: {
- writable: false,
- value: eventMethod('unsaturated')
- },
- empty: {
- writable: false,
- value: eventMethod('empty')
- },
- drain: {
- writable: false,
- value: eventMethod('drain')
- },
- error: {
- writable: false,
- value: eventMethod('error')
- },
- });
- return q;
- }
-
- /**
- * Creates a `cargo` object with the specified payload. Tasks added to the
- * cargo will be processed altogether (up to the `payload` limit). If the
- * `worker` is in progress, the task is queued until it becomes available. Once
- * the `worker` has completed some tasks, each callback of those tasks is
- * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
- * for how `cargo` and `queue` work.
- *
- * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
- * at a time, cargo passes an array of tasks to a single worker, repeating
- * when the worker is finished.
- *
- * @name cargo
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @see [async.queue]{@link module:ControlFlow.queue}
- * @category Control Flow
- * @param {AsyncFunction} worker - An asynchronous function for processing an array
- * of queued tasks. Invoked with `(tasks, callback)`.
- * @param {number} [payload=Infinity] - An optional `integer` for determining
- * how many tasks should be processed per round; if omitted, the default is
- * unlimited.
- * @returns {module:ControlFlow.QueueObject} A cargo object to manage the tasks. Callbacks can
- * attached as certain properties to listen for specific events during the
- * lifecycle of the cargo and inner queue.
- * @example
- *
- * // create a cargo object with payload 2
- * var cargo = async.cargo(function(tasks, callback) {
- * for (var i=0; i {
- * console.log(result);
- * // 6000
- * // which is the sum of the file sizes of the three files
- * }).catch( err => {
- * console.log(err);
- * });
- *
- * // Error Handling
- * async.reduce(withMissingFileList, 0, getFileSizeInBytes)
- * .then( result => {
- * console.log(result);
- * }).catch( err => {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * });
- *
- * // Using async/await
- * async () => {
- * try {
- * let result = await async.reduce(fileList, 0, getFileSizeInBytes);
- * console.log(result);
- * // 6000
- * // which is the sum of the file sizes of the three files
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- * // Error Handling
- * async () => {
- * try {
- * let result = await async.reduce(withMissingFileList, 0, getFileSizeInBytes);
- * console.log(result);
- * }
- * catch (err) {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * }
- * }
- *
- */
- function reduce(coll, memo, iteratee, callback) {
- callback = once(callback);
- var _iteratee = wrapAsync(iteratee);
- return eachOfSeries$1(coll, (x, i, iterCb) => {
- _iteratee(memo, x, (err, v) => {
- memo = v;
- iterCb(err);
- });
- }, err => callback(err, memo));
- }
- var reduce$1 = awaitify(reduce, 4);
-
- /**
- * Version of the compose function that is more natural to read. Each function
- * consumes the return value of the previous function. It is the equivalent of
- * [compose]{@link module:ControlFlow.compose} with the arguments reversed.
- *
- * Each function is executed with the `this` binding of the composed function.
- *
- * @name seq
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @see [async.compose]{@link module:ControlFlow.compose}
- * @category Control Flow
- * @param {...AsyncFunction} functions - the asynchronous functions to compose
- * @returns {Function} a function that composes the `functions` in order
- * @example
- *
- * // Requires lodash (or underscore), express3 and dresende's orm2.
- * // Part of an app, that fetches cats of the logged user.
- * // This example uses `seq` function to avoid overnesting and error
- * // handling clutter.
- * app.get('/cats', function(request, response) {
- * var User = request.models.User;
- * async.seq(
- * User.get.bind(User), // 'User.get' has signature (id, callback(err, data))
- * function(user, fn) {
- * user.getCats(fn); // 'getCats' has signature (callback(err, data))
- * }
- * )(req.session.user_id, function (err, cats) {
- * if (err) {
- * console.error(err);
- * response.json({ status: 'error', message: err.message });
- * } else {
- * response.json({ status: 'ok', message: 'Cats found', data: cats });
- * }
- * });
- * });
- */
- function seq(...functions) {
- var _functions = functions.map(wrapAsync);
- return function (...args) {
- var that = this;
-
- var cb = args[args.length - 1];
- if (typeof cb == 'function') {
- args.pop();
- } else {
- cb = promiseCallback();
- }
-
- reduce$1(_functions, args, (newargs, fn, iterCb) => {
- fn.apply(that, newargs.concat((err, ...nextargs) => {
- iterCb(err, nextargs);
- }));
- },
- (err, results) => cb(err, ...results));
-
- return cb[PROMISE_SYMBOL]
- };
- }
-
- /**
- * Creates a function which is a composition of the passed asynchronous
- * functions. Each function consumes the return value of the function that
- * follows. Composing functions `f()`, `g()`, and `h()` would produce the result
- * of `f(g(h()))`, only this version uses callbacks to obtain the return values.
- *
- * If the last argument to the composed function is not a function, a promise
- * is returned when you call it.
- *
- * Each function is executed with the `this` binding of the composed function.
- *
- * @name compose
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @category Control Flow
- * @param {...AsyncFunction} functions - the asynchronous functions to compose
- * @returns {Function} an asynchronous function that is the composed
- * asynchronous `functions`
- * @example
- *
- * function add1(n, callback) {
- * setTimeout(function () {
- * callback(null, n + 1);
- * }, 10);
- * }
- *
- * function mul3(n, callback) {
- * setTimeout(function () {
- * callback(null, n * 3);
- * }, 10);
- * }
- *
- * var add1mul3 = async.compose(mul3, add1);
- * add1mul3(4, function (err, result) {
- * // result now equals 15
- * });
- */
- function compose(...args) {
- return seq(...args.reverse());
- }
-
- /**
- * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.
- *
- * @name mapLimit
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.map]{@link module:Collections.map}
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {number} limit - The maximum number of async operations at a time.
- * @param {AsyncFunction} iteratee - An async function to apply to each item in
- * `coll`.
- * The iteratee should complete with the transformed item.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called when all `iteratee`
- * functions have finished, or an error occurs. Results is an array of the
- * transformed items from the `coll`. Invoked with (err, results).
- * @returns {Promise} a promise, if no callback is passed
- */
- function mapLimit (coll, limit, iteratee, callback) {
- return _asyncMap(eachOfLimit$2(limit), coll, iteratee, callback)
- }
- var mapLimit$1 = awaitify(mapLimit, 4);
-
- /**
- * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time.
- *
- * @name concatLimit
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.concat]{@link module:Collections.concat}
- * @category Collection
- * @alias flatMapLimit
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {number} limit - The maximum number of async operations at a time.
- * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
- * which should use an array as its result. Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished, or an error occurs. Results is an array
- * containing the concatenated results of the `iteratee` function. Invoked with
- * (err, results).
- * @returns A Promise, if no callback is passed
- */
- function concatLimit(coll, limit, iteratee, callback) {
- var _iteratee = wrapAsync(iteratee);
- return mapLimit$1(coll, limit, (val, iterCb) => {
- _iteratee(val, (err, ...args) => {
- if (err) return iterCb(err);
- return iterCb(err, args);
- });
- }, (err, mapResults) => {
- var result = [];
- for (var i = 0; i < mapResults.length; i++) {
- if (mapResults[i]) {
- result = result.concat(...mapResults[i]);
- }
- }
-
- return callback(err, result);
- });
- }
- var concatLimit$1 = awaitify(concatLimit, 4);
-
- /**
- * Applies `iteratee` to each item in `coll`, concatenating the results. Returns
- * the concatenated list. The `iteratee`s are called in parallel, and the
- * results are concatenated as they return. The results array will be returned in
- * the original order of `coll` passed to the `iteratee` function.
- *
- * @name concat
- * @static
- * @memberOf module:Collections
- * @method
- * @category Collection
- * @alias flatMap
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
- * which should use an array as its result. Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished, or an error occurs. Results is an array
- * containing the concatenated results of the `iteratee` function. Invoked with
- * (err, results).
- * @returns A Promise, if no callback is passed
- * @example
- *
- * // dir1 is a directory that contains file1.txt, file2.txt
- * // dir2 is a directory that contains file3.txt, file4.txt
- * // dir3 is a directory that contains file5.txt
- * // dir4 does not exist
- *
- * let directoryList = ['dir1','dir2','dir3'];
- * let withMissingDirectoryList = ['dir1','dir2','dir3', 'dir4'];
- *
- * // Using callbacks
- * async.concat(directoryList, fs.readdir, function(err, results) {
- * if (err) {
- * console.log(err);
- * } else {
- * console.log(results);
- * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
- * }
- * });
- *
- * // Error Handling
- * async.concat(withMissingDirectoryList, fs.readdir, function(err, results) {
- * if (err) {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * // since dir4 does not exist
- * } else {
- * console.log(results);
- * }
- * });
- *
- * // Using Promises
- * async.concat(directoryList, fs.readdir)
- * .then(results => {
- * console.log(results);
- * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
- * }).catch(err => {
- * console.log(err);
- * });
- *
- * // Error Handling
- * async.concat(withMissingDirectoryList, fs.readdir)
- * .then(results => {
- * console.log(results);
- * }).catch(err => {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * // since dir4 does not exist
- * });
- *
- * // Using async/await
- * async () => {
- * try {
- * let results = await async.concat(directoryList, fs.readdir);
- * console.log(results);
- * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
- * } catch (err) {
- * console.log(err);
- * }
- * }
- *
- * // Error Handling
- * async () => {
- * try {
- * let results = await async.concat(withMissingDirectoryList, fs.readdir);
- * console.log(results);
- * } catch (err) {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * // since dir4 does not exist
- * }
- * }
- *
- */
- function concat(coll, iteratee, callback) {
- return concatLimit$1(coll, Infinity, iteratee, callback)
- }
- var concat$1 = awaitify(concat, 3);
-
- /**
- * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
- *
- * @name concatSeries
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.concat]{@link module:Collections.concat}
- * @category Collection
- * @alias flatMapSeries
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`.
- * The iteratee should complete with an array an array of results.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished, or an error occurs. Results is an array
- * containing the concatenated results of the `iteratee` function. Invoked with
- * (err, results).
- * @returns A Promise, if no callback is passed
- */
- function concatSeries(coll, iteratee, callback) {
- return concatLimit$1(coll, 1, iteratee, callback)
- }
- var concatSeries$1 = awaitify(concatSeries, 3);
-
- /**
- * Returns a function that when called, calls-back with the values provided.
- * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to
- * [`auto`]{@link module:ControlFlow.auto}.
- *
- * @name constant
- * @static
- * @memberOf module:Utils
- * @method
- * @category Util
- * @param {...*} arguments... - Any number of arguments to automatically invoke
- * callback with.
- * @returns {AsyncFunction} Returns a function that when invoked, automatically
- * invokes the callback with the previous given arguments.
- * @example
- *
- * async.waterfall([
- * async.constant(42),
- * function (value, next) {
- * // value === 42
- * },
- * //...
- * ], callback);
- *
- * async.waterfall([
- * async.constant(filename, "utf8"),
- * fs.readFile,
- * function (fileData, next) {
- * //...
- * }
- * //...
- * ], callback);
- *
- * async.auto({
- * hostname: async.constant("https://server.net/"),
- * port: findFreePort,
- * launchServer: ["hostname", "port", function (options, cb) {
- * startServer(options, cb);
- * }],
- * //...
- * }, callback);
- */
- function constant$1(...args) {
- return function (...ignoredArgs/*, callback*/) {
- var callback = ignoredArgs.pop();
- return callback(null, ...args);
- };
- }
-
- function _createTester(check, getResult) {
- return (eachfn, arr, _iteratee, cb) => {
- var testPassed = false;
- var testResult;
- const iteratee = wrapAsync(_iteratee);
- eachfn(arr, (value, _, callback) => {
- iteratee(value, (err, result) => {
- if (err || err === false) return callback(err);
-
- if (check(result) && !testResult) {
- testPassed = true;
- testResult = getResult(true, value);
- return callback(null, breakLoop);
- }
- callback();
- });
- }, err => {
- if (err) return cb(err);
- cb(null, testPassed ? testResult : getResult(false));
- });
- };
- }
-
- /**
- * Returns the first value in `coll` that passes an async truth test. The
- * `iteratee` is applied in parallel, meaning the first iteratee to return
- * `true` will fire the detect `callback` with that result. That means the
- * result might not be the first item in the original `coll` (in terms of order)
- * that passes the test.
-
- * If order within the original `coll` is important, then look at
- * [`detectSeries`]{@link module:Collections.detectSeries}.
- *
- * @name detect
- * @static
- * @memberOf module:Collections
- * @method
- * @alias find
- * @category Collections
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
- * The iteratee must complete with a boolean value as its result.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called as soon as any
- * iteratee returns `true`, or after all the `iteratee` functions have finished.
- * Result will be the first item in the array that passes the truth test
- * (iteratee) or the value `undefined` if none passed. Invoked with
- * (err, result).
- * @returns {Promise} a promise, if a callback is omitted
- * @example
- *
- * // dir1 is a directory that contains file1.txt, file2.txt
- * // dir2 is a directory that contains file3.txt, file4.txt
- * // dir3 is a directory that contains file5.txt
- *
- * // asynchronous function that checks if a file exists
- * function fileExists(file, callback) {
- * fs.access(file, fs.constants.F_OK, (err) => {
- * callback(null, !err);
- * });
- * }
- *
- * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists,
- * function(err, result) {
- * console.log(result);
- * // dir1/file1.txt
- * // result now equals the first file in the list that exists
- * }
- *);
- *
- * // Using Promises
- * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists)
- * .then(result => {
- * console.log(result);
- * // dir1/file1.txt
- * // result now equals the first file in the list that exists
- * }).catch(err => {
- * console.log(err);
- * });
- *
- * // Using async/await
- * async () => {
- * try {
- * let result = await async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists);
- * console.log(result);
- * // dir1/file1.txt
- * // result now equals the file in the list that exists
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- */
- function detect(coll, iteratee, callback) {
- return _createTester(bool => bool, (res, item) => item)(eachOf$1, coll, iteratee, callback)
- }
- var detect$1 = awaitify(detect, 3);
-
- /**
- * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
- * time.
- *
- * @name detectLimit
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.detect]{@link module:Collections.detect}
- * @alias findLimit
- * @category Collections
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {number} limit - The maximum number of async operations at a time.
- * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
- * The iteratee must complete with a boolean value as its result.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called as soon as any
- * iteratee returns `true`, or after all the `iteratee` functions have finished.
- * Result will be the first item in the array that passes the truth test
- * (iteratee) or the value `undefined` if none passed. Invoked with
- * (err, result).
- * @returns {Promise} a promise, if a callback is omitted
- */
- function detectLimit(coll, limit, iteratee, callback) {
- return _createTester(bool => bool, (res, item) => item)(eachOfLimit$2(limit), coll, iteratee, callback)
- }
- var detectLimit$1 = awaitify(detectLimit, 4);
-
- /**
- * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
- *
- * @name detectSeries
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.detect]{@link module:Collections.detect}
- * @alias findSeries
- * @category Collections
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
- * The iteratee must complete with a boolean value as its result.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called as soon as any
- * iteratee returns `true`, or after all the `iteratee` functions have finished.
- * Result will be the first item in the array that passes the truth test
- * (iteratee) or the value `undefined` if none passed. Invoked with
- * (err, result).
- * @returns {Promise} a promise, if a callback is omitted
- */
- function detectSeries(coll, iteratee, callback) {
- return _createTester(bool => bool, (res, item) => item)(eachOfLimit$2(1), coll, iteratee, callback)
- }
-
- var detectSeries$1 = awaitify(detectSeries, 3);
-
- function consoleFunc(name) {
- return (fn, ...args) => wrapAsync(fn)(...args, (err, ...resultArgs) => {
- /* istanbul ignore else */
- if (typeof console === 'object') {
- /* istanbul ignore else */
- if (err) {
- /* istanbul ignore else */
- if (console.error) {
- console.error(err);
- }
- } else if (console[name]) { /* istanbul ignore else */
- resultArgs.forEach(x => console[name](x));
- }
- }
- })
- }
-
- /**
- * Logs the result of an [`async` function]{@link AsyncFunction} to the
- * `console` using `console.dir` to display the properties of the resulting object.
- * Only works in Node.js or in browsers that support `console.dir` and
- * `console.error` (such as FF and Chrome).
- * If multiple arguments are returned from the async function,
- * `console.dir` is called on each argument in order.
- *
- * @name dir
- * @static
- * @memberOf module:Utils
- * @method
- * @category Util
- * @param {AsyncFunction} function - The function you want to eventually apply
- * all arguments to.
- * @param {...*} arguments... - Any number of arguments to apply to the function.
- * @example
- *
- * // in a module
- * var hello = function(name, callback) {
- * setTimeout(function() {
- * callback(null, {hello: name});
- * }, 1000);
- * };
- *
- * // in the node repl
- * node> async.dir(hello, 'world');
- * {hello: 'world'}
- */
- var dir = consoleFunc('dir');
-
- /**
- * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
- * the order of operations, the arguments `test` and `iteratee` are switched.
- *
- * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
- *
- * @name doWhilst
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @see [async.whilst]{@link module:ControlFlow.whilst}
- * @category Control Flow
- * @param {AsyncFunction} iteratee - A function which is called each time `test`
- * passes. Invoked with (callback).
- * @param {AsyncFunction} test - asynchronous truth test to perform after each
- * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the
- * non-error args from the previous callback of `iteratee`.
- * @param {Function} [callback] - A callback which is called after the test
- * function has failed and repeated execution of `iteratee` has stopped.
- * `callback` will be passed an error and any arguments passed to the final
- * `iteratee`'s callback. Invoked with (err, [results]);
- * @returns {Promise} a promise, if no callback is passed
- */
- function doWhilst(iteratee, test, callback) {
- callback = onlyOnce(callback);
- var _fn = wrapAsync(iteratee);
- var _test = wrapAsync(test);
- var results;
-
- function next(err, ...args) {
- if (err) return callback(err);
- if (err === false) return;
- results = args;
- _test(...args, check);
- }
-
- function check(err, truth) {
- if (err) return callback(err);
- if (err === false) return;
- if (!truth) return callback(null, ...results);
- _fn(next);
- }
-
- return check(null, true);
- }
-
- var doWhilst$1 = awaitify(doWhilst, 3);
-
- /**
- * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the
- * argument ordering differs from `until`.
- *
- * @name doUntil
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @see [async.doWhilst]{@link module:ControlFlow.doWhilst}
- * @category Control Flow
- * @param {AsyncFunction} iteratee - An async function which is called each time
- * `test` fails. Invoked with (callback).
- * @param {AsyncFunction} test - asynchronous truth test to perform after each
- * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the
- * non-error args from the previous callback of `iteratee`
- * @param {Function} [callback] - A callback which is called after the test
- * function has passed and repeated execution of `iteratee` has stopped. `callback`
- * will be passed an error and any arguments passed to the final `iteratee`'s
- * callback. Invoked with (err, [results]);
- * @returns {Promise} a promise, if no callback is passed
- */
- function doUntil(iteratee, test, callback) {
- const _test = wrapAsync(test);
- return doWhilst$1(iteratee, (...args) => {
- const cb = args.pop();
- _test(...args, (err, truth) => cb (err, !truth));
- }, callback);
- }
-
- function _withoutIndex(iteratee) {
- return (value, index, callback) => iteratee(value, callback);
- }
-
- /**
- * Applies the function `iteratee` to each item in `coll`, in parallel.
- * The `iteratee` is called with an item from the list, and a callback for when
- * it has finished. If the `iteratee` passes an error to its `callback`, the
- * main `callback` (for the `each` function) is immediately called with the
- * error.
- *
- * Note, that since this function applies `iteratee` to each item in parallel,
- * there is no guarantee that the iteratee functions will complete in order.
- *
- * @name each
- * @static
- * @memberOf module:Collections
- * @method
- * @alias forEach
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - An async function to apply to
- * each item in `coll`. Invoked with (item, callback).
- * The array index is not passed to the iteratee.
- * If you need the index, use `eachOf`.
- * @param {Function} [callback] - A callback which is called when all
- * `iteratee` functions have finished, or an error occurs. Invoked with (err).
- * @returns {Promise} a promise, if a callback is omitted
- * @example
- *
- * // dir1 is a directory that contains file1.txt, file2.txt
- * // dir2 is a directory that contains file3.txt, file4.txt
- * // dir3 is a directory that contains file5.txt
- * // dir4 does not exist
- *
- * const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt'];
- * const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt'];
- *
- * // asynchronous function that deletes a file
- * const deleteFile = function(file, callback) {
- * fs.unlink(file, callback);
- * };
- *
- * // Using callbacks
- * async.each(fileList, deleteFile, function(err) {
- * if( err ) {
- * console.log(err);
- * } else {
- * console.log('All files have been deleted successfully');
- * }
- * });
- *
- * // Error Handling
- * async.each(withMissingFileList, deleteFile, function(err){
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * // since dir4/file2.txt does not exist
- * // dir1/file1.txt could have been deleted
- * });
- *
- * // Using Promises
- * async.each(fileList, deleteFile)
- * .then( () => {
- * console.log('All files have been deleted successfully');
- * }).catch( err => {
- * console.log(err);
- * });
- *
- * // Error Handling
- * async.each(fileList, deleteFile)
- * .then( () => {
- * console.log('All files have been deleted successfully');
- * }).catch( err => {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * // since dir4/file2.txt does not exist
- * // dir1/file1.txt could have been deleted
- * });
- *
- * // Using async/await
- * async () => {
- * try {
- * await async.each(files, deleteFile);
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- * // Error Handling
- * async () => {
- * try {
- * await async.each(withMissingFileList, deleteFile);
- * }
- * catch (err) {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * // since dir4/file2.txt does not exist
- * // dir1/file1.txt could have been deleted
- * }
- * }
- *
- */
- function eachLimit$2(coll, iteratee, callback) {
- return eachOf$1(coll, _withoutIndex(wrapAsync(iteratee)), callback);
- }
-
- var each = awaitify(eachLimit$2, 3);
-
- /**
- * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
- *
- * @name eachLimit
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.each]{@link module:Collections.each}
- * @alias forEachLimit
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {number} limit - The maximum number of async operations at a time.
- * @param {AsyncFunction} iteratee - An async function to apply to each item in
- * `coll`.
- * The array index is not passed to the iteratee.
- * If you need the index, use `eachOfLimit`.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called when all
- * `iteratee` functions have finished, or an error occurs. Invoked with (err).
- * @returns {Promise} a promise, if a callback is omitted
- */
- function eachLimit(coll, limit, iteratee, callback) {
- return eachOfLimit$2(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback);
- }
- var eachLimit$1 = awaitify(eachLimit, 4);
-
- /**
- * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.
- *
- * Note, that unlike [`each`]{@link module:Collections.each}, this function applies iteratee to each item
- * in series and therefore the iteratee functions will complete in order.
-
- * @name eachSeries
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.each]{@link module:Collections.each}
- * @alias forEachSeries
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - An async function to apply to each
- * item in `coll`.
- * The array index is not passed to the iteratee.
- * If you need the index, use `eachOfSeries`.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called when all
- * `iteratee` functions have finished, or an error occurs. Invoked with (err).
- * @returns {Promise} a promise, if a callback is omitted
- */
- function eachSeries(coll, iteratee, callback) {
- return eachLimit$1(coll, 1, iteratee, callback)
- }
- var eachSeries$1 = awaitify(eachSeries, 3);
-
- /**
- * Wrap an async function and ensure it calls its callback on a later tick of
- * the event loop. If the function already calls its callback on a next tick,
- * no extra deferral is added. This is useful for preventing stack overflows
- * (`RangeError: Maximum call stack size exceeded`) and generally keeping
- * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)
- * contained. ES2017 `async` functions are returned as-is -- they are immune
- * to Zalgo's corrupting influences, as they always resolve on a later tick.
- *
- * @name ensureAsync
- * @static
- * @memberOf module:Utils
- * @method
- * @category Util
- * @param {AsyncFunction} fn - an async function, one that expects a node-style
- * callback as its last argument.
- * @returns {AsyncFunction} Returns a wrapped function with the exact same call
- * signature as the function passed in.
- * @example
- *
- * function sometimesAsync(arg, callback) {
- * if (cache[arg]) {
- * return callback(null, cache[arg]); // this would be synchronous!!
- * } else {
- * doSomeIO(arg, callback); // this IO would be asynchronous
- * }
- * }
- *
- * // this has a risk of stack overflows if many results are cached in a row
- * async.mapSeries(args, sometimesAsync, done);
- *
- * // this will defer sometimesAsync's callback if necessary,
- * // preventing stack overflows
- * async.mapSeries(args, async.ensureAsync(sometimesAsync), done);
- */
- function ensureAsync(fn) {
- if (isAsync(fn)) return fn;
- return function (...args/*, callback*/) {
- var callback = args.pop();
- var sync = true;
- args.push((...innerArgs) => {
- if (sync) {
- setImmediate$1(() => callback(...innerArgs));
- } else {
- callback(...innerArgs);
- }
- });
- fn.apply(this, args);
- sync = false;
- };
- }
-
- /**
- * Returns `true` if every element in `coll` satisfies an async test. If any
- * iteratee call returns `false`, the main `callback` is immediately called.
- *
- * @name every
- * @static
- * @memberOf module:Collections
- * @method
- * @alias all
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - An async truth test to apply to each item
- * in the collection in parallel.
- * The iteratee must complete with a boolean result value.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished. Result will be either `true` or `false`
- * depending on the values of the async tests. Invoked with (err, result).
- * @returns {Promise} a promise, if no callback provided
- * @example
- *
- * // dir1 is a directory that contains file1.txt, file2.txt
- * // dir2 is a directory that contains file3.txt, file4.txt
- * // dir3 is a directory that contains file5.txt
- * // dir4 does not exist
- *
- * const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file5.txt'];
- * const withMissingFileList = ['file1.txt','file2.txt','file4.txt'];
- *
- * // asynchronous function that checks if a file exists
- * function fileExists(file, callback) {
- * fs.access(file, fs.constants.F_OK, (err) => {
- * callback(null, !err);
- * });
- * }
- *
- * // Using callbacks
- * async.every(fileList, fileExists, function(err, result) {
- * console.log(result);
- * // true
- * // result is true since every file exists
- * });
- *
- * async.every(withMissingFileList, fileExists, function(err, result) {
- * console.log(result);
- * // false
- * // result is false since NOT every file exists
- * });
- *
- * // Using Promises
- * async.every(fileList, fileExists)
- * .then( result => {
- * console.log(result);
- * // true
- * // result is true since every file exists
- * }).catch( err => {
- * console.log(err);
- * });
- *
- * async.every(withMissingFileList, fileExists)
- * .then( result => {
- * console.log(result);
- * // false
- * // result is false since NOT every file exists
- * }).catch( err => {
- * console.log(err);
- * });
- *
- * // Using async/await
- * async () => {
- * try {
- * let result = await async.every(fileList, fileExists);
- * console.log(result);
- * // true
- * // result is true since every file exists
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- * async () => {
- * try {
- * let result = await async.every(withMissingFileList, fileExists);
- * console.log(result);
- * // false
- * // result is false since NOT every file exists
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- */
- function every(coll, iteratee, callback) {
- return _createTester(bool => !bool, res => !res)(eachOf$1, coll, iteratee, callback)
- }
- var every$1 = awaitify(every, 3);
-
- /**
- * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
- *
- * @name everyLimit
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.every]{@link module:Collections.every}
- * @alias allLimit
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {number} limit - The maximum number of async operations at a time.
- * @param {AsyncFunction} iteratee - An async truth test to apply to each item
- * in the collection in parallel.
- * The iteratee must complete with a boolean result value.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished. Result will be either `true` or `false`
- * depending on the values of the async tests. Invoked with (err, result).
- * @returns {Promise} a promise, if no callback provided
- */
- function everyLimit(coll, limit, iteratee, callback) {
- return _createTester(bool => !bool, res => !res)(eachOfLimit$2(limit), coll, iteratee, callback)
- }
- var everyLimit$1 = awaitify(everyLimit, 4);
-
- /**
- * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
- *
- * @name everySeries
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.every]{@link module:Collections.every}
- * @alias allSeries
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - An async truth test to apply to each item
- * in the collection in series.
- * The iteratee must complete with a boolean result value.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished. Result will be either `true` or `false`
- * depending on the values of the async tests. Invoked with (err, result).
- * @returns {Promise} a promise, if no callback provided
- */
- function everySeries(coll, iteratee, callback) {
- return _createTester(bool => !bool, res => !res)(eachOfSeries$1, coll, iteratee, callback)
- }
- var everySeries$1 = awaitify(everySeries, 3);
-
- function filterArray(eachfn, arr, iteratee, callback) {
- var truthValues = new Array(arr.length);
- eachfn(arr, (x, index, iterCb) => {
- iteratee(x, (err, v) => {
- truthValues[index] = !!v;
- iterCb(err);
- });
- }, err => {
- if (err) return callback(err);
- var results = [];
- for (var i = 0; i < arr.length; i++) {
- if (truthValues[i]) results.push(arr[i]);
- }
- callback(null, results);
- });
- }
-
- function filterGeneric(eachfn, coll, iteratee, callback) {
- var results = [];
- eachfn(coll, (x, index, iterCb) => {
- iteratee(x, (err, v) => {
- if (err) return iterCb(err);
- if (v) {
- results.push({index, value: x});
- }
- iterCb(err);
- });
- }, err => {
- if (err) return callback(err);
- callback(null, results
- .sort((a, b) => a.index - b.index)
- .map(v => v.value));
- });
- }
-
- function _filter(eachfn, coll, iteratee, callback) {
- var filter = isArrayLike(coll) ? filterArray : filterGeneric;
- return filter(eachfn, coll, wrapAsync(iteratee), callback);
- }
-
- /**
- * Returns a new array of all the values in `coll` which pass an async truth
- * test. This operation is performed in parallel, but the results array will be
- * in the same order as the original.
- *
- * @name filter
- * @static
- * @memberOf module:Collections
- * @method
- * @alias select
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A truth test to apply to each item in `coll`.
- * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
- * with a boolean argument once it has completed. Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished. Invoked with (err, results).
- * @returns {Promise} a promise, if no callback provided
- * @example
- *
- * // dir1 is a directory that contains file1.txt, file2.txt
- * // dir2 is a directory that contains file3.txt, file4.txt
- * // dir3 is a directory that contains file5.txt
- *
- * const files = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt'];
- *
- * // asynchronous function that checks if a file exists
- * function fileExists(file, callback) {
- * fs.access(file, fs.constants.F_OK, (err) => {
- * callback(null, !err);
- * });
- * }
- *
- * // Using callbacks
- * async.filter(files, fileExists, function(err, results) {
- * if(err) {
- * console.log(err);
- * } else {
- * console.log(results);
- * // [ 'dir1/file1.txt', 'dir2/file3.txt' ]
- * // results is now an array of the existing files
- * }
- * });
- *
- * // Using Promises
- * async.filter(files, fileExists)
- * .then(results => {
- * console.log(results);
- * // [ 'dir1/file1.txt', 'dir2/file3.txt' ]
- * // results is now an array of the existing files
- * }).catch(err => {
- * console.log(err);
- * });
- *
- * // Using async/await
- * async () => {
- * try {
- * let results = await async.filter(files, fileExists);
- * console.log(results);
- * // [ 'dir1/file1.txt', 'dir2/file3.txt' ]
- * // results is now an array of the existing files
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- */
- function filter (coll, iteratee, callback) {
- return _filter(eachOf$1, coll, iteratee, callback)
- }
- var filter$1 = awaitify(filter, 3);
-
- /**
- * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a
- * time.
- *
- * @name filterLimit
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.filter]{@link module:Collections.filter}
- * @alias selectLimit
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {number} limit - The maximum number of async operations at a time.
- * @param {Function} iteratee - A truth test to apply to each item in `coll`.
- * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
- * with a boolean argument once it has completed. Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished. Invoked with (err, results).
- * @returns {Promise} a promise, if no callback provided
- */
- function filterLimit (coll, limit, iteratee, callback) {
- return _filter(eachOfLimit$2(limit), coll, iteratee, callback)
- }
- var filterLimit$1 = awaitify(filterLimit, 4);
-
- /**
- * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.
- *
- * @name filterSeries
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.filter]{@link module:Collections.filter}
- * @alias selectSeries
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - A truth test to apply to each item in `coll`.
- * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
- * with a boolean argument once it has completed. Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished. Invoked with (err, results)
- * @returns {Promise} a promise, if no callback provided
- */
- function filterSeries (coll, iteratee, callback) {
- return _filter(eachOfSeries$1, coll, iteratee, callback)
- }
- var filterSeries$1 = awaitify(filterSeries, 3);
-
- /**
- * Calls the asynchronous function `fn` with a callback parameter that allows it
- * to call itself again, in series, indefinitely.
-
- * If an error is passed to the callback then `errback` is called with the
- * error, and execution stops, otherwise it will never be called.
- *
- * @name forever
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @category Control Flow
- * @param {AsyncFunction} fn - an async function to call repeatedly.
- * Invoked with (next).
- * @param {Function} [errback] - when `fn` passes an error to it's callback,
- * this function will be called, and execution stops. Invoked with (err).
- * @returns {Promise} a promise that rejects if an error occurs and an errback
- * is not passed
- * @example
- *
- * async.forever(
- * function(next) {
- * // next is suitable for passing to things that need a callback(err [, whatever]);
- * // it will result in this function being called again.
- * },
- * function(err) {
- * // if next is called with a value in its first parameter, it will appear
- * // in here as 'err', and execution will stop.
- * }
- * );
- */
- function forever(fn, errback) {
- var done = onlyOnce(errback);
- var task = wrapAsync(ensureAsync(fn));
-
- function next(err) {
- if (err) return done(err);
- if (err === false) return;
- task(next);
- }
- return next();
- }
- var forever$1 = awaitify(forever, 2);
-
- /**
- * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time.
- *
- * @name groupByLimit
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.groupBy]{@link module:Collections.groupBy}
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {number} limit - The maximum number of async operations at a time.
- * @param {AsyncFunction} iteratee - An async function to apply to each item in
- * `coll`.
- * The iteratee should complete with a `key` to group the value under.
- * Invoked with (value, callback).
- * @param {Function} [callback] - A callback which is called when all `iteratee`
- * functions have finished, or an error occurs. Result is an `Object` whoses
- * properties are arrays of values which returned the corresponding key.
- * @returns {Promise} a promise, if no callback is passed
- */
- function groupByLimit(coll, limit, iteratee, callback) {
- var _iteratee = wrapAsync(iteratee);
- return mapLimit$1(coll, limit, (val, iterCb) => {
- _iteratee(val, (err, key) => {
- if (err) return iterCb(err);
- return iterCb(err, {key, val});
- });
- }, (err, mapResults) => {
- var result = {};
- // from MDN, handle object having an `hasOwnProperty` prop
- var {hasOwnProperty} = Object.prototype;
-
- for (var i = 0; i < mapResults.length; i++) {
- if (mapResults[i]) {
- var {key} = mapResults[i];
- var {val} = mapResults[i];
-
- if (hasOwnProperty.call(result, key)) {
- result[key].push(val);
- } else {
- result[key] = [val];
- }
- }
- }
-
- return callback(err, result);
- });
- }
-
- var groupByLimit$1 = awaitify(groupByLimit, 4);
-
- /**
- * Returns a new object, where each value corresponds to an array of items, from
- * `coll`, that returned the corresponding key. That is, the keys of the object
- * correspond to the values passed to the `iteratee` callback.
- *
- * Note: Since this function applies the `iteratee` to each item in parallel,
- * there is no guarantee that the `iteratee` functions will complete in order.
- * However, the values for each key in the `result` will be in the same order as
- * the original `coll`. For Objects, the values will roughly be in the order of
- * the original Objects' keys (but this can vary across JavaScript engines).
- *
- * @name groupBy
- * @static
- * @memberOf module:Collections
- * @method
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - An async function to apply to each item in
- * `coll`.
- * The iteratee should complete with a `key` to group the value under.
- * Invoked with (value, callback).
- * @param {Function} [callback] - A callback which is called when all `iteratee`
- * functions have finished, or an error occurs. Result is an `Object` whoses
- * properties are arrays of values which returned the corresponding key.
- * @returns {Promise} a promise, if no callback is passed
- * @example
- *
- * // dir1 is a directory that contains file1.txt, file2.txt
- * // dir2 is a directory that contains file3.txt, file4.txt
- * // dir3 is a directory that contains file5.txt
- * // dir4 does not exist
- *
- * const files = ['dir1/file1.txt','dir2','dir4']
- *
- * // asynchronous function that detects file type as none, file, or directory
- * function detectFile(file, callback) {
- * fs.stat(file, function(err, stat) {
- * if (err) {
- * return callback(null, 'none');
- * }
- * callback(null, stat.isDirectory() ? 'directory' : 'file');
- * });
- * }
- *
- * //Using callbacks
- * async.groupBy(files, detectFile, function(err, result) {
- * if(err) {
- * console.log(err);
- * } else {
- * console.log(result);
- * // {
- * // file: [ 'dir1/file1.txt' ],
- * // none: [ 'dir4' ],
- * // directory: [ 'dir2']
- * // }
- * // result is object containing the files grouped by type
- * }
- * });
- *
- * // Using Promises
- * async.groupBy(files, detectFile)
- * .then( result => {
- * console.log(result);
- * // {
- * // file: [ 'dir1/file1.txt' ],
- * // none: [ 'dir4' ],
- * // directory: [ 'dir2']
- * // }
- * // result is object containing the files grouped by type
- * }).catch( err => {
- * console.log(err);
- * });
- *
- * // Using async/await
- * async () => {
- * try {
- * let result = await async.groupBy(files, detectFile);
- * console.log(result);
- * // {
- * // file: [ 'dir1/file1.txt' ],
- * // none: [ 'dir4' ],
- * // directory: [ 'dir2']
- * // }
- * // result is object containing the files grouped by type
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- */
- function groupBy (coll, iteratee, callback) {
- return groupByLimit$1(coll, Infinity, iteratee, callback)
- }
-
- /**
- * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time.
- *
- * @name groupBySeries
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.groupBy]{@link module:Collections.groupBy}
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - An async function to apply to each item in
- * `coll`.
- * The iteratee should complete with a `key` to group the value under.
- * Invoked with (value, callback).
- * @param {Function} [callback] - A callback which is called when all `iteratee`
- * functions have finished, or an error occurs. Result is an `Object` whose
- * properties are arrays of values which returned the corresponding key.
- * @returns {Promise} a promise, if no callback is passed
- */
- function groupBySeries (coll, iteratee, callback) {
- return groupByLimit$1(coll, 1, iteratee, callback)
- }
-
- /**
- * Logs the result of an `async` function to the `console`. Only works in
- * Node.js or in browsers that support `console.log` and `console.error` (such
- * as FF and Chrome). If multiple arguments are returned from the async
- * function, `console.log` is called on each argument in order.
- *
- * @name log
- * @static
- * @memberOf module:Utils
- * @method
- * @category Util
- * @param {AsyncFunction} function - The function you want to eventually apply
- * all arguments to.
- * @param {...*} arguments... - Any number of arguments to apply to the function.
- * @example
- *
- * // in a module
- * var hello = function(name, callback) {
- * setTimeout(function() {
- * callback(null, 'hello ' + name);
- * }, 1000);
- * };
- *
- * // in the node repl
- * node> async.log(hello, 'world');
- * 'hello world'
- */
- var log = consoleFunc('log');
-
- /**
- * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a
- * time.
- *
- * @name mapValuesLimit
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.mapValues]{@link module:Collections.mapValues}
- * @category Collection
- * @param {Object} obj - A collection to iterate over.
- * @param {number} limit - The maximum number of async operations at a time.
- * @param {AsyncFunction} iteratee - A function to apply to each value and key
- * in `coll`.
- * The iteratee should complete with the transformed value as its result.
- * Invoked with (value, key, callback).
- * @param {Function} [callback] - A callback which is called when all `iteratee`
- * functions have finished, or an error occurs. `result` is a new object consisting
- * of each key from `obj`, with each transformed value on the right-hand side.
- * Invoked with (err, result).
- * @returns {Promise} a promise, if no callback is passed
- */
- function mapValuesLimit(obj, limit, iteratee, callback) {
- callback = once(callback);
- var newObj = {};
- var _iteratee = wrapAsync(iteratee);
- return eachOfLimit$2(limit)(obj, (val, key, next) => {
- _iteratee(val, key, (err, result) => {
- if (err) return next(err);
- newObj[key] = result;
- next(err);
- });
- }, err => callback(err, newObj));
- }
-
- var mapValuesLimit$1 = awaitify(mapValuesLimit, 4);
-
- /**
- * A relative of [`map`]{@link module:Collections.map}, designed for use with objects.
- *
- * Produces a new Object by mapping each value of `obj` through the `iteratee`
- * function. The `iteratee` is called each `value` and `key` from `obj` and a
- * callback for when it has finished processing. Each of these callbacks takes
- * two arguments: an `error`, and the transformed item from `obj`. If `iteratee`
- * passes an error to its callback, the main `callback` (for the `mapValues`
- * function) is immediately called with the error.
- *
- * Note, the order of the keys in the result is not guaranteed. The keys will
- * be roughly in the order they complete, (but this is very engine-specific)
- *
- * @name mapValues
- * @static
- * @memberOf module:Collections
- * @method
- * @category Collection
- * @param {Object} obj - A collection to iterate over.
- * @param {AsyncFunction} iteratee - A function to apply to each value and key
- * in `coll`.
- * The iteratee should complete with the transformed value as its result.
- * Invoked with (value, key, callback).
- * @param {Function} [callback] - A callback which is called when all `iteratee`
- * functions have finished, or an error occurs. `result` is a new object consisting
- * of each key from `obj`, with each transformed value on the right-hand side.
- * Invoked with (err, result).
- * @returns {Promise} a promise, if no callback is passed
- * @example
- *
- * // file1.txt is a file that is 1000 bytes in size
- * // file2.txt is a file that is 2000 bytes in size
- * // file3.txt is a file that is 3000 bytes in size
- * // file4.txt does not exist
- *
- * const fileMap = {
- * f1: 'file1.txt',
- * f2: 'file2.txt',
- * f3: 'file3.txt'
- * };
- *
- * const withMissingFileMap = {
- * f1: 'file1.txt',
- * f2: 'file2.txt',
- * f3: 'file4.txt'
- * };
- *
- * // asynchronous function that returns the file size in bytes
- * function getFileSizeInBytes(file, key, callback) {
- * fs.stat(file, function(err, stat) {
- * if (err) {
- * return callback(err);
- * }
- * callback(null, stat.size);
- * });
- * }
- *
- * // Using callbacks
- * async.mapValues(fileMap, getFileSizeInBytes, function(err, result) {
- * if (err) {
- * console.log(err);
- * } else {
- * console.log(result);
- * // result is now a map of file size in bytes for each file, e.g.
- * // {
- * // f1: 1000,
- * // f2: 2000,
- * // f3: 3000
- * // }
- * }
- * });
- *
- * // Error handling
- * async.mapValues(withMissingFileMap, getFileSizeInBytes, function(err, result) {
- * if (err) {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * } else {
- * console.log(result);
- * }
- * });
- *
- * // Using Promises
- * async.mapValues(fileMap, getFileSizeInBytes)
- * .then( result => {
- * console.log(result);
- * // result is now a map of file size in bytes for each file, e.g.
- * // {
- * // f1: 1000,
- * // f2: 2000,
- * // f3: 3000
- * // }
- * }).catch (err => {
- * console.log(err);
- * });
- *
- * // Error Handling
- * async.mapValues(withMissingFileMap, getFileSizeInBytes)
- * .then( result => {
- * console.log(result);
- * }).catch (err => {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * });
- *
- * // Using async/await
- * async () => {
- * try {
- * let result = await async.mapValues(fileMap, getFileSizeInBytes);
- * console.log(result);
- * // result is now a map of file size in bytes for each file, e.g.
- * // {
- * // f1: 1000,
- * // f2: 2000,
- * // f3: 3000
- * // }
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- * // Error Handling
- * async () => {
- * try {
- * let result = await async.mapValues(withMissingFileMap, getFileSizeInBytes);
- * console.log(result);
- * }
- * catch (err) {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * }
- * }
- *
- */
- function mapValues(obj, iteratee, callback) {
- return mapValuesLimit$1(obj, Infinity, iteratee, callback)
- }
-
- /**
- * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.
- *
- * @name mapValuesSeries
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.mapValues]{@link module:Collections.mapValues}
- * @category Collection
- * @param {Object} obj - A collection to iterate over.
- * @param {AsyncFunction} iteratee - A function to apply to each value and key
- * in `coll`.
- * The iteratee should complete with the transformed value as its result.
- * Invoked with (value, key, callback).
- * @param {Function} [callback] - A callback which is called when all `iteratee`
- * functions have finished, or an error occurs. `result` is a new object consisting
- * of each key from `obj`, with each transformed value on the right-hand side.
- * Invoked with (err, result).
- * @returns {Promise} a promise, if no callback is passed
- */
- function mapValuesSeries(obj, iteratee, callback) {
- return mapValuesLimit$1(obj, 1, iteratee, callback)
- }
-
- /**
- * Caches the results of an async function. When creating a hash to store
- * function results against, the callback is omitted from the hash and an
- * optional hash function can be used.
- *
- * **Note: if the async function errs, the result will not be cached and
- * subsequent calls will call the wrapped function.**
- *
- * If no hash function is specified, the first argument is used as a hash key,
- * which may work reasonably if it is a string or a data type that converts to a
- * distinct string. Note that objects and arrays will not behave reasonably.
- * Neither will cases where the other arguments are significant. In such cases,
- * specify your own hash function.
- *
- * The cache of results is exposed as the `memo` property of the function
- * returned by `memoize`.
- *
- * @name memoize
- * @static
- * @memberOf module:Utils
- * @method
- * @category Util
- * @param {AsyncFunction} fn - The async function to proxy and cache results from.
- * @param {Function} hasher - An optional function for generating a custom hash
- * for storing results. It has all the arguments applied to it apart from the
- * callback, and must be synchronous.
- * @returns {AsyncFunction} a memoized version of `fn`
- * @example
- *
- * var slow_fn = function(name, callback) {
- * // do something
- * callback(null, result);
- * };
- * var fn = async.memoize(slow_fn);
- *
- * // fn can now be used as if it were slow_fn
- * fn('some name', function() {
- * // callback
- * });
- */
- function memoize(fn, hasher = v => v) {
- var memo = Object.create(null);
- var queues = Object.create(null);
- var _fn = wrapAsync(fn);
- var memoized = initialParams((args, callback) => {
- var key = hasher(...args);
- if (key in memo) {
- setImmediate$1(() => callback(null, ...memo[key]));
- } else if (key in queues) {
- queues[key].push(callback);
- } else {
- queues[key] = [callback];
- _fn(...args, (err, ...resultArgs) => {
- // #1465 don't memoize if an error occurred
- if (!err) {
- memo[key] = resultArgs;
- }
- var q = queues[key];
- delete queues[key];
- for (var i = 0, l = q.length; i < l; i++) {
- q[i](err, ...resultArgs);
- }
- });
- }
- });
- memoized.memo = memo;
- memoized.unmemoized = fn;
- return memoized;
- }
-
- /* istanbul ignore file */
-
- /**
- * Calls `callback` on a later loop around the event loop. In Node.js this just
- * calls `process.nextTick`. In the browser it will use `setImmediate` if
- * available, otherwise `setTimeout(callback, 0)`, which means other higher
- * priority events may precede the execution of `callback`.
- *
- * This is used internally for browser-compatibility purposes.
- *
- * @name nextTick
- * @static
- * @memberOf module:Utils
- * @method
- * @see [async.setImmediate]{@link module:Utils.setImmediate}
- * @category Util
- * @param {Function} callback - The function to call on a later loop around
- * the event loop. Invoked with (args...).
- * @param {...*} args... - any number of additional arguments to pass to the
- * callback on the next tick.
- * @example
- *
- * var call_order = [];
- * async.nextTick(function() {
- * call_order.push('two');
- * // call_order now equals ['one','two']
- * });
- * call_order.push('one');
- *
- * async.setImmediate(function (a, b, c) {
- * // a, b, and c equal 1, 2, and 3
- * }, 1, 2, 3);
- */
- var _defer;
-
- if (hasNextTick) {
- _defer = process.nextTick;
- } else if (hasSetImmediate) {
- _defer = setImmediate;
- } else {
- _defer = fallback;
- }
-
- var nextTick = wrap(_defer);
-
- var _parallel = awaitify((eachfn, tasks, callback) => {
- var results = isArrayLike(tasks) ? [] : {};
-
- eachfn(tasks, (task, key, taskCb) => {
- wrapAsync(task)((err, ...result) => {
- if (result.length < 2) {
- [result] = result;
- }
- results[key] = result;
- taskCb(err);
- });
- }, err => callback(err, results));
- }, 3);
-
- /**
- * Run the `tasks` collection of functions in parallel, without waiting until
- * the previous function has completed. If any of the functions pass an error to
- * its callback, the main `callback` is immediately called with the value of the
- * error. Once the `tasks` have completed, the results are passed to the final
- * `callback` as an array.
- *
- * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about
- * parallel execution of code. If your tasks do not use any timers or perform
- * any I/O, they will actually be executed in series. Any synchronous setup
- * sections for each task will happen one after the other. JavaScript remains
- * single-threaded.
- *
- * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the
- * execution of other tasks when a task fails.
- *
- * It is also possible to use an object instead of an array. Each property will
- * be run as a function and the results will be passed to the final `callback`
- * as an object instead of an array. This can be a more readable way of handling
- * results from {@link async.parallel}.
- *
- * @name parallel
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @category Control Flow
- * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of
- * [async functions]{@link AsyncFunction} to run.
- * Each async function can complete with any number of optional `result` values.
- * @param {Function} [callback] - An optional callback to run once all the
- * functions have completed successfully. This function gets a results array
- * (or object) containing all the result arguments passed to the task callbacks.
- * Invoked with (err, results).
- * @returns {Promise} a promise, if a callback is not passed
- *
- * @example
- *
- * //Using Callbacks
- * async.parallel([
- * function(callback) {
- * setTimeout(function() {
- * callback(null, 'one');
- * }, 200);
- * },
- * function(callback) {
- * setTimeout(function() {
- * callback(null, 'two');
- * }, 100);
- * }
- * ], function(err, results) {
- * console.log(results);
- * // results is equal to ['one','two'] even though
- * // the second function had a shorter timeout.
- * });
- *
- * // an example using an object instead of an array
- * async.parallel({
- * one: function(callback) {
- * setTimeout(function() {
- * callback(null, 1);
- * }, 200);
- * },
- * two: function(callback) {
- * setTimeout(function() {
- * callback(null, 2);
- * }, 100);
- * }
- * }, function(err, results) {
- * console.log(results);
- * // results is equal to: { one: 1, two: 2 }
- * });
- *
- * //Using Promises
- * async.parallel([
- * function(callback) {
- * setTimeout(function() {
- * callback(null, 'one');
- * }, 200);
- * },
- * function(callback) {
- * setTimeout(function() {
- * callback(null, 'two');
- * }, 100);
- * }
- * ]).then(results => {
- * console.log(results);
- * // results is equal to ['one','two'] even though
- * // the second function had a shorter timeout.
- * }).catch(err => {
- * console.log(err);
- * });
- *
- * // an example using an object instead of an array
- * async.parallel({
- * one: function(callback) {
- * setTimeout(function() {
- * callback(null, 1);
- * }, 200);
- * },
- * two: function(callback) {
- * setTimeout(function() {
- * callback(null, 2);
- * }, 100);
- * }
- * }).then(results => {
- * console.log(results);
- * // results is equal to: { one: 1, two: 2 }
- * }).catch(err => {
- * console.log(err);
- * });
- *
- * //Using async/await
- * async () => {
- * try {
- * let results = await async.parallel([
- * function(callback) {
- * setTimeout(function() {
- * callback(null, 'one');
- * }, 200);
- * },
- * function(callback) {
- * setTimeout(function() {
- * callback(null, 'two');
- * }, 100);
- * }
- * ]);
- * console.log(results);
- * // results is equal to ['one','two'] even though
- * // the second function had a shorter timeout.
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- * // an example using an object instead of an array
- * async () => {
- * try {
- * let results = await async.parallel({
- * one: function(callback) {
- * setTimeout(function() {
- * callback(null, 1);
- * }, 200);
- * },
- * two: function(callback) {
- * setTimeout(function() {
- * callback(null, 2);
- * }, 100);
- * }
- * });
- * console.log(results);
- * // results is equal to: { one: 1, two: 2 }
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- */
- function parallel(tasks, callback) {
- return _parallel(eachOf$1, tasks, callback);
- }
-
- /**
- * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a
- * time.
- *
- * @name parallelLimit
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @see [async.parallel]{@link module:ControlFlow.parallel}
- * @category Control Flow
- * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of
- * [async functions]{@link AsyncFunction} to run.
- * Each async function can complete with any number of optional `result` values.
- * @param {number} limit - The maximum number of async operations at a time.
- * @param {Function} [callback] - An optional callback to run once all the
- * functions have completed successfully. This function gets a results array
- * (or object) containing all the result arguments passed to the task callbacks.
- * Invoked with (err, results).
- * @returns {Promise} a promise, if a callback is not passed
- */
- function parallelLimit(tasks, limit, callback) {
- return _parallel(eachOfLimit$2(limit), tasks, callback);
- }
-
- /**
- * A queue of tasks for the worker function to complete.
- * @typedef {Iterable} QueueObject
- * @memberOf module:ControlFlow
- * @property {Function} length - a function returning the number of items
- * waiting to be processed. Invoke with `queue.length()`.
- * @property {boolean} started - a boolean indicating whether or not any
- * items have been pushed and processed by the queue.
- * @property {Function} running - a function returning the number of items
- * currently being processed. Invoke with `queue.running()`.
- * @property {Function} workersList - a function returning the array of items
- * currently being processed. Invoke with `queue.workersList()`.
- * @property {Function} idle - a function returning false if there are items
- * waiting or being processed, or true if not. Invoke with `queue.idle()`.
- * @property {number} concurrency - an integer for determining how many `worker`
- * functions should be run in parallel. This property can be changed after a
- * `queue` is created to alter the concurrency on-the-fly.
- * @property {number} payload - an integer that specifies how many items are
- * passed to the worker function at a time. only applies if this is a
- * [cargo]{@link module:ControlFlow.cargo} object
- * @property {AsyncFunction} push - add a new task to the `queue`. Calls `callback`
- * once the `worker` has finished processing the task. Instead of a single task,
- * a `tasks` array can be submitted. The respective callback is used for every
- * task in the list. Invoke with `queue.push(task, [callback])`,
- * @property {AsyncFunction} unshift - add a new task to the front of the `queue`.
- * Invoke with `queue.unshift(task, [callback])`.
- * @property {AsyncFunction} pushAsync - the same as `q.push`, except this returns
- * a promise that rejects if an error occurs.
- * @property {AsyncFunction} unshiftAsync - the same as `q.unshift`, except this returns
- * a promise that rejects if an error occurs.
- * @property {Function} remove - remove items from the queue that match a test
- * function. The test function will be passed an object with a `data` property,
- * and a `priority` property, if this is a
- * [priorityQueue]{@link module:ControlFlow.priorityQueue} object.
- * Invoked with `queue.remove(testFn)`, where `testFn` is of the form
- * `function ({data, priority}) {}` and returns a Boolean.
- * @property {Function} saturated - a function that sets a callback that is
- * called when the number of running workers hits the `concurrency` limit, and
- * further tasks will be queued. If the callback is omitted, `q.saturated()`
- * returns a promise for the next occurrence.
- * @property {Function} unsaturated - a function that sets a callback that is
- * called when the number of running workers is less than the `concurrency` &
- * `buffer` limits, and further tasks will not be queued. If the callback is
- * omitted, `q.unsaturated()` returns a promise for the next occurrence.
- * @property {number} buffer - A minimum threshold buffer in order to say that
- * the `queue` is `unsaturated`.
- * @property {Function} empty - a function that sets a callback that is called
- * when the last item from the `queue` is given to a `worker`. If the callback
- * is omitted, `q.empty()` returns a promise for the next occurrence.
- * @property {Function} drain - a function that sets a callback that is called
- * when the last item from the `queue` has returned from the `worker`. If the
- * callback is omitted, `q.drain()` returns a promise for the next occurrence.
- * @property {Function} error - a function that sets a callback that is called
- * when a task errors. Has the signature `function(error, task)`. If the
- * callback is omitted, `error()` returns a promise that rejects on the next
- * error.
- * @property {boolean} paused - a boolean for determining whether the queue is
- * in a paused state.
- * @property {Function} pause - a function that pauses the processing of tasks
- * until `resume()` is called. Invoke with `queue.pause()`.
- * @property {Function} resume - a function that resumes the processing of
- * queued tasks when the queue is paused. Invoke with `queue.resume()`.
- * @property {Function} kill - a function that removes the `drain` callback and
- * empties remaining tasks from the queue forcing it to go idle. No more tasks
- * should be pushed to the queue after calling this function. Invoke with `queue.kill()`.
- *
- * @example
- * const q = async.queue(worker, 2)
- * q.push(item1)
- * q.push(item2)
- * q.push(item3)
- * // queues are iterable, spread into an array to inspect
- * const items = [...q] // [item1, item2, item3]
- * // or use for of
- * for (let item of q) {
- * console.log(item)
- * }
- *
- * q.drain(() => {
- * console.log('all done')
- * })
- * // or
- * await q.drain()
- */
-
- /**
- * Creates a `queue` object with the specified `concurrency`. Tasks added to the
- * `queue` are processed in parallel (up to the `concurrency` limit). If all
- * `worker`s are in progress, the task is queued until one becomes available.
- * Once a `worker` completes a `task`, that `task`'s callback is called.
- *
- * @name queue
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @category Control Flow
- * @param {AsyncFunction} worker - An async function for processing a queued task.
- * If you want to handle errors from an individual task, pass a callback to
- * `q.push()`. Invoked with (task, callback).
- * @param {number} [concurrency=1] - An `integer` for determining how many
- * `worker` functions should be run in parallel. If omitted, the concurrency
- * defaults to `1`. If the concurrency is `0`, an error is thrown.
- * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can be
- * attached as certain properties to listen for specific events during the
- * lifecycle of the queue.
- * @example
- *
- * // create a queue object with concurrency 2
- * var q = async.queue(function(task, callback) {
- * console.log('hello ' + task.name);
- * callback();
- * }, 2);
- *
- * // assign a callback
- * q.drain(function() {
- * console.log('all items have been processed');
- * });
- * // or await the end
- * await q.drain()
- *
- * // assign an error callback
- * q.error(function(err, task) {
- * console.error('task experienced an error');
- * });
- *
- * // add some items to the queue
- * q.push({name: 'foo'}, function(err) {
- * console.log('finished processing foo');
- * });
- * // callback is optional
- * q.push({name: 'bar'});
- *
- * // add some items to the queue (batch-wise)
- * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) {
- * console.log('finished processing item');
- * });
- *
- * // add some items to the front of the queue
- * q.unshift({name: 'bar'}, function (err) {
- * console.log('finished processing bar');
- * });
- */
- function queue (worker, concurrency) {
- var _worker = wrapAsync(worker);
- return queue$1((items, cb) => {
- _worker(items[0], cb);
- }, concurrency, 1);
- }
-
- // Binary min-heap implementation used for priority queue.
- // Implementation is stable, i.e. push time is considered for equal priorities
- class Heap {
- constructor() {
- this.heap = [];
- this.pushCount = Number.MIN_SAFE_INTEGER;
- }
-
- get length() {
- return this.heap.length;
- }
-
- empty () {
- this.heap = [];
- return this;
- }
-
- percUp(index) {
- let p;
-
- while (index > 0 && smaller(this.heap[index], this.heap[p=parent(index)])) {
- let t = this.heap[index];
- this.heap[index] = this.heap[p];
- this.heap[p] = t;
-
- index = p;
- }
- }
-
- percDown(index) {
- let l;
-
- while ((l=leftChi(index)) < this.heap.length) {
- if (l+1 < this.heap.length && smaller(this.heap[l+1], this.heap[l])) {
- l = l+1;
- }
-
- if (smaller(this.heap[index], this.heap[l])) {
- break;
- }
-
- let t = this.heap[index];
- this.heap[index] = this.heap[l];
- this.heap[l] = t;
-
- index = l;
- }
- }
-
- push(node) {
- node.pushCount = ++this.pushCount;
- this.heap.push(node);
- this.percUp(this.heap.length-1);
- }
-
- unshift(node) {
- return this.heap.push(node);
- }
-
- shift() {
- let [top] = this.heap;
-
- this.heap[0] = this.heap[this.heap.length-1];
- this.heap.pop();
- this.percDown(0);
-
- return top;
- }
-
- toArray() {
- return [...this];
- }
-
- *[Symbol.iterator] () {
- for (let i = 0; i < this.heap.length; i++) {
- yield this.heap[i].data;
- }
- }
-
- remove (testFn) {
- let j = 0;
- for (let i = 0; i < this.heap.length; i++) {
- if (!testFn(this.heap[i])) {
- this.heap[j] = this.heap[i];
- j++;
- }
- }
-
- this.heap.splice(j);
-
- for (let i = parent(this.heap.length-1); i >= 0; i--) {
- this.percDown(i);
- }
-
- return this;
- }
- }
-
- function leftChi(i) {
- return (i<<1)+1;
- }
-
- function parent(i) {
- return ((i+1)>>1)-1;
- }
-
- function smaller(x, y) {
- if (x.priority !== y.priority) {
- return x.priority < y.priority;
- }
- else {
- return x.pushCount < y.pushCount;
- }
- }
-
- /**
- * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and
- * completed in ascending priority order.
- *
- * @name priorityQueue
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @see [async.queue]{@link module:ControlFlow.queue}
- * @category Control Flow
- * @param {AsyncFunction} worker - An async function for processing a queued task.
- * If you want to handle errors from an individual task, pass a callback to
- * `q.push()`.
- * Invoked with (task, callback).
- * @param {number} concurrency - An `integer` for determining how many `worker`
- * functions should be run in parallel. If omitted, the concurrency defaults to
- * `1`. If the concurrency is `0`, an error is thrown.
- * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are three
- * differences between `queue` and `priorityQueue` objects:
- * * `push(task, priority, [callback])` - `priority` should be a number. If an
- * array of `tasks` is given, all tasks will be assigned the same priority.
- * * `pushAsync(task, priority, [callback])` - the same as `priorityQueue.push`,
- * except this returns a promise that rejects if an error occurs.
- * * The `unshift` and `unshiftAsync` methods were removed.
- */
- function priorityQueue(worker, concurrency) {
- // Start with a normal queue
- var q = queue(worker, concurrency);
-
- var {
- push,
- pushAsync
- } = q;
-
- q._tasks = new Heap();
- q._createTaskItem = ({data, priority}, callback) => {
- return {
- data,
- priority,
- callback
- };
- };
-
- function createDataItems(tasks, priority) {
- if (!Array.isArray(tasks)) {
- return {data: tasks, priority};
- }
- return tasks.map(data => { return {data, priority}; });
- }
-
- // Override push to accept second parameter representing priority
- q.push = function(data, priority = 0, callback) {
- return push(createDataItems(data, priority), callback);
- };
-
- q.pushAsync = function(data, priority = 0, callback) {
- return pushAsync(createDataItems(data, priority), callback);
- };
-
- // Remove unshift functions
- delete q.unshift;
- delete q.unshiftAsync;
-
- return q;
- }
-
- /**
- * Runs the `tasks` array of functions in parallel, without waiting until the
- * previous function has completed. Once any of the `tasks` complete or pass an
- * error to its callback, the main `callback` is immediately called. It's
- * equivalent to `Promise.race()`.
- *
- * @name race
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @category Control Flow
- * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction}
- * to run. Each function can complete with an optional `result` value.
- * @param {Function} callback - A callback to run once any of the functions have
- * completed. This function gets an error or result from the first function that
- * completed. Invoked with (err, result).
- * @returns {Promise} a promise, if a callback is omitted
- * @example
- *
- * async.race([
- * function(callback) {
- * setTimeout(function() {
- * callback(null, 'one');
- * }, 200);
- * },
- * function(callback) {
- * setTimeout(function() {
- * callback(null, 'two');
- * }, 100);
- * }
- * ],
- * // main callback
- * function(err, result) {
- * // the result will be equal to 'two' as it finishes earlier
- * });
- */
- function race(tasks, callback) {
- callback = once(callback);
- if (!Array.isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions'));
- if (!tasks.length) return callback();
- for (var i = 0, l = tasks.length; i < l; i++) {
- wrapAsync(tasks[i])(callback);
- }
- }
-
- var race$1 = awaitify(race, 2);
-
- /**
- * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order.
- *
- * @name reduceRight
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.reduce]{@link module:Collections.reduce}
- * @alias foldr
- * @category Collection
- * @param {Array} array - A collection to iterate over.
- * @param {*} memo - The initial state of the reduction.
- * @param {AsyncFunction} iteratee - A function applied to each item in the
- * array to produce the next step in the reduction.
- * The `iteratee` should complete with the next state of the reduction.
- * If the iteratee completes with an error, the reduction is stopped and the
- * main `callback` is immediately called with the error.
- * Invoked with (memo, item, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished. Result is the reduced value. Invoked with
- * (err, result).
- * @returns {Promise} a promise, if no callback is passed
- */
- function reduceRight (array, memo, iteratee, callback) {
- var reversed = [...array].reverse();
- return reduce$1(reversed, memo, iteratee, callback);
- }
-
- /**
- * Wraps the async function in another function that always completes with a
- * result object, even when it errors.
- *
- * The result object has either the property `error` or `value`.
- *
- * @name reflect
- * @static
- * @memberOf module:Utils
- * @method
- * @category Util
- * @param {AsyncFunction} fn - The async function you want to wrap
- * @returns {Function} - A function that always passes null to it's callback as
- * the error. The second argument to the callback will be an `object` with
- * either an `error` or a `value` property.
- * @example
- *
- * async.parallel([
- * async.reflect(function(callback) {
- * // do some stuff ...
- * callback(null, 'one');
- * }),
- * async.reflect(function(callback) {
- * // do some more stuff but error ...
- * callback('bad stuff happened');
- * }),
- * async.reflect(function(callback) {
- * // do some more stuff ...
- * callback(null, 'two');
- * })
- * ],
- * // optional callback
- * function(err, results) {
- * // values
- * // results[0].value = 'one'
- * // results[1].error = 'bad stuff happened'
- * // results[2].value = 'two'
- * });
- */
- function reflect(fn) {
- var _fn = wrapAsync(fn);
- return initialParams(function reflectOn(args, reflectCallback) {
- args.push((error, ...cbArgs) => {
- let retVal = {};
- if (error) {
- retVal.error = error;
- }
- if (cbArgs.length > 0){
- var value = cbArgs;
- if (cbArgs.length <= 1) {
- [value] = cbArgs;
- }
- retVal.value = value;
- }
- reflectCallback(null, retVal);
- });
-
- return _fn.apply(this, args);
- });
- }
-
- /**
- * A helper function that wraps an array or an object of functions with `reflect`.
- *
- * @name reflectAll
- * @static
- * @memberOf module:Utils
- * @method
- * @see [async.reflect]{@link module:Utils.reflect}
- * @category Util
- * @param {Array|Object|Iterable} tasks - The collection of
- * [async functions]{@link AsyncFunction} to wrap in `async.reflect`.
- * @returns {Array} Returns an array of async functions, each wrapped in
- * `async.reflect`
- * @example
- *
- * let tasks = [
- * function(callback) {
- * setTimeout(function() {
- * callback(null, 'one');
- * }, 200);
- * },
- * function(callback) {
- * // do some more stuff but error ...
- * callback(new Error('bad stuff happened'));
- * },
- * function(callback) {
- * setTimeout(function() {
- * callback(null, 'two');
- * }, 100);
- * }
- * ];
- *
- * async.parallel(async.reflectAll(tasks),
- * // optional callback
- * function(err, results) {
- * // values
- * // results[0].value = 'one'
- * // results[1].error = Error('bad stuff happened')
- * // results[2].value = 'two'
- * });
- *
- * // an example using an object instead of an array
- * let tasks = {
- * one: function(callback) {
- * setTimeout(function() {
- * callback(null, 'one');
- * }, 200);
- * },
- * two: function(callback) {
- * callback('two');
- * },
- * three: function(callback) {
- * setTimeout(function() {
- * callback(null, 'three');
- * }, 100);
- * }
- * };
- *
- * async.parallel(async.reflectAll(tasks),
- * // optional callback
- * function(err, results) {
- * // values
- * // results.one.value = 'one'
- * // results.two.error = 'two'
- * // results.three.value = 'three'
- * });
- */
- function reflectAll(tasks) {
- var results;
- if (Array.isArray(tasks)) {
- results = tasks.map(reflect);
- } else {
- results = {};
- Object.keys(tasks).forEach(key => {
- results[key] = reflect.call(this, tasks[key]);
- });
- }
- return results;
- }
-
- function reject$2(eachfn, arr, _iteratee, callback) {
- const iteratee = wrapAsync(_iteratee);
- return _filter(eachfn, arr, (value, cb) => {
- iteratee(value, (err, v) => {
- cb(err, !v);
- });
- }, callback);
- }
-
- /**
- * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.
- *
- * @name reject
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.filter]{@link module:Collections.filter}
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - An async truth test to apply to each item in
- * `coll`.
- * The should complete with a boolean value as its `result`.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished. Invoked with (err, results).
- * @returns {Promise} a promise, if no callback is passed
- * @example
- *
- * // dir1 is a directory that contains file1.txt, file2.txt
- * // dir2 is a directory that contains file3.txt, file4.txt
- * // dir3 is a directory that contains file5.txt
- *
- * const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt'];
- *
- * // asynchronous function that checks if a file exists
- * function fileExists(file, callback) {
- * fs.access(file, fs.constants.F_OK, (err) => {
- * callback(null, !err);
- * });
- * }
- *
- * // Using callbacks
- * async.reject(fileList, fileExists, function(err, results) {
- * // [ 'dir3/file6.txt' ]
- * // results now equals an array of the non-existing files
- * });
- *
- * // Using Promises
- * async.reject(fileList, fileExists)
- * .then( results => {
- * console.log(results);
- * // [ 'dir3/file6.txt' ]
- * // results now equals an array of the non-existing files
- * }).catch( err => {
- * console.log(err);
- * });
- *
- * // Using async/await
- * async () => {
- * try {
- * let results = await async.reject(fileList, fileExists);
- * console.log(results);
- * // [ 'dir3/file6.txt' ]
- * // results now equals an array of the non-existing files
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- */
- function reject (coll, iteratee, callback) {
- return reject$2(eachOf$1, coll, iteratee, callback)
- }
- var reject$1 = awaitify(reject, 3);
-
- /**
- * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a
- * time.
- *
- * @name rejectLimit
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.reject]{@link module:Collections.reject}
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {number} limit - The maximum number of async operations at a time.
- * @param {Function} iteratee - An async truth test to apply to each item in
- * `coll`.
- * The should complete with a boolean value as its `result`.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished. Invoked with (err, results).
- * @returns {Promise} a promise, if no callback is passed
- */
- function rejectLimit (coll, limit, iteratee, callback) {
- return reject$2(eachOfLimit$2(limit), coll, iteratee, callback)
- }
- var rejectLimit$1 = awaitify(rejectLimit, 4);
-
- /**
- * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time.
- *
- * @name rejectSeries
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.reject]{@link module:Collections.reject}
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {Function} iteratee - An async truth test to apply to each item in
- * `coll`.
- * The should complete with a boolean value as its `result`.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished. Invoked with (err, results).
- * @returns {Promise} a promise, if no callback is passed
- */
- function rejectSeries (coll, iteratee, callback) {
- return reject$2(eachOfSeries$1, coll, iteratee, callback)
- }
- var rejectSeries$1 = awaitify(rejectSeries, 3);
-
- function constant(value) {
- return function () {
- return value;
- }
- }
-
- /**
- * Attempts to get a successful response from `task` no more than `times` times
- * before returning an error. If the task is successful, the `callback` will be
- * passed the result of the successful task. If all attempts fail, the callback
- * will be passed the error and result (if any) of the final attempt.
- *
- * @name retry
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @category Control Flow
- * @see [async.retryable]{@link module:ControlFlow.retryable}
- * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an
- * object with `times` and `interval` or a number.
- * * `times` - The number of attempts to make before giving up. The default
- * is `5`.
- * * `interval` - The time to wait between retries, in milliseconds. The
- * default is `0`. The interval may also be specified as a function of the
- * retry count (see example).
- * * `errorFilter` - An optional synchronous function that is invoked on
- * erroneous result. If it returns `true` the retry attempts will continue;
- * if the function returns `false` the retry flow is aborted with the current
- * attempt's error and result being returned to the final callback.
- * Invoked with (err).
- * * If `opts` is a number, the number specifies the number of times to retry,
- * with the default interval of `0`.
- * @param {AsyncFunction} task - An async function to retry.
- * Invoked with (callback).
- * @param {Function} [callback] - An optional callback which is called when the
- * task has succeeded, or after the final failed attempt. It receives the `err`
- * and `result` arguments of the last attempt at completing the `task`. Invoked
- * with (err, results).
- * @returns {Promise} a promise if no callback provided
- *
- * @example
- *
- * // The `retry` function can be used as a stand-alone control flow by passing
- * // a callback, as shown below:
- *
- * // try calling apiMethod 3 times
- * async.retry(3, apiMethod, function(err, result) {
- * // do something with the result
- * });
- *
- * // try calling apiMethod 3 times, waiting 200 ms between each retry
- * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) {
- * // do something with the result
- * });
- *
- * // try calling apiMethod 10 times with exponential backoff
- * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds)
- * async.retry({
- * times: 10,
- * interval: function(retryCount) {
- * return 50 * Math.pow(2, retryCount);
- * }
- * }, apiMethod, function(err, result) {
- * // do something with the result
- * });
- *
- * // try calling apiMethod the default 5 times no delay between each retry
- * async.retry(apiMethod, function(err, result) {
- * // do something with the result
- * });
- *
- * // try calling apiMethod only when error condition satisfies, all other
- * // errors will abort the retry control flow and return to final callback
- * async.retry({
- * errorFilter: function(err) {
- * return err.message === 'Temporary error'; // only retry on a specific error
- * }
- * }, apiMethod, function(err, result) {
- * // do something with the result
- * });
- *
- * // to retry individual methods that are not as reliable within other
- * // control flow functions, use the `retryable` wrapper:
- * async.auto({
- * users: api.getUsers.bind(api),
- * payments: async.retryable(3, api.getPayments.bind(api))
- * }, function(err, results) {
- * // do something with the results
- * });
- *
- */
- const DEFAULT_TIMES = 5;
- const DEFAULT_INTERVAL = 0;
-
- function retry(opts, task, callback) {
- var options = {
- times: DEFAULT_TIMES,
- intervalFunc: constant(DEFAULT_INTERVAL)
- };
-
- if (arguments.length < 3 && typeof opts === 'function') {
- callback = task || promiseCallback();
- task = opts;
- } else {
- parseTimes(options, opts);
- callback = callback || promiseCallback();
- }
-
- if (typeof task !== 'function') {
- throw new Error("Invalid arguments for async.retry");
- }
-
- var _task = wrapAsync(task);
-
- var attempt = 1;
- function retryAttempt() {
- _task((err, ...args) => {
- if (err === false) return
- if (err && attempt++ < options.times &&
- (typeof options.errorFilter != 'function' ||
- options.errorFilter(err))) {
- setTimeout(retryAttempt, options.intervalFunc(attempt - 1));
- } else {
- callback(err, ...args);
- }
- });
- }
-
- retryAttempt();
- return callback[PROMISE_SYMBOL]
- }
-
- function parseTimes(acc, t) {
- if (typeof t === 'object') {
- acc.times = +t.times || DEFAULT_TIMES;
-
- acc.intervalFunc = typeof t.interval === 'function' ?
- t.interval :
- constant(+t.interval || DEFAULT_INTERVAL);
-
- acc.errorFilter = t.errorFilter;
- } else if (typeof t === 'number' || typeof t === 'string') {
- acc.times = +t || DEFAULT_TIMES;
- } else {
- throw new Error("Invalid arguments for async.retry");
- }
- }
-
- /**
- * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method
- * wraps a task and makes it retryable, rather than immediately calling it
- * with retries.
- *
- * @name retryable
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @see [async.retry]{@link module:ControlFlow.retry}
- * @category Control Flow
- * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional
- * options, exactly the same as from `retry`, except for a `opts.arity` that
- * is the arity of the `task` function, defaulting to `task.length`
- * @param {AsyncFunction} task - the asynchronous function to wrap.
- * This function will be passed any arguments passed to the returned wrapper.
- * Invoked with (...args, callback).
- * @returns {AsyncFunction} The wrapped function, which when invoked, will
- * retry on an error, based on the parameters specified in `opts`.
- * This function will accept the same parameters as `task`.
- * @example
- *
- * async.auto({
- * dep1: async.retryable(3, getFromFlakyService),
- * process: ["dep1", async.retryable(3, function (results, cb) {
- * maybeProcessData(results.dep1, cb);
- * })]
- * }, callback);
- */
- function retryable (opts, task) {
- if (!task) {
- task = opts;
- opts = null;
- }
- let arity = (opts && opts.arity) || task.length;
- if (isAsync(task)) {
- arity += 1;
- }
- var _task = wrapAsync(task);
- return initialParams((args, callback) => {
- if (args.length < arity - 1 || callback == null) {
- args.push(callback);
- callback = promiseCallback();
- }
- function taskFn(cb) {
- _task(...args, cb);
- }
-
- if (opts) retry(opts, taskFn, callback);
- else retry(taskFn, callback);
-
- return callback[PROMISE_SYMBOL]
- });
- }
-
- /**
- * Run the functions in the `tasks` collection in series, each one running once
- * the previous function has completed. If any functions in the series pass an
- * error to its callback, no more functions are run, and `callback` is
- * immediately called with the value of the error. Otherwise, `callback`
- * receives an array of results when `tasks` have completed.
- *
- * It is also possible to use an object instead of an array. Each property will
- * be run as a function, and the results will be passed to the final `callback`
- * as an object instead of an array. This can be a more readable way of handling
- * results from {@link async.series}.
- *
- * **Note** that while many implementations preserve the order of object
- * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)
- * explicitly states that
- *
- * > The mechanics and order of enumerating the properties is not specified.
- *
- * So if you rely on the order in which your series of functions are executed,
- * and want this to work on all platforms, consider using an array.
- *
- * @name series
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @category Control Flow
- * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing
- * [async functions]{@link AsyncFunction} to run in series.
- * Each function can complete with any number of optional `result` values.
- * @param {Function} [callback] - An optional callback to run once all the
- * functions have completed. This function gets a results array (or object)
- * containing all the result arguments passed to the `task` callbacks. Invoked
- * with (err, result).
- * @return {Promise} a promise, if no callback is passed
- * @example
- *
- * //Using Callbacks
- * async.series([
- * function(callback) {
- * setTimeout(function() {
- * // do some async task
- * callback(null, 'one');
- * }, 200);
- * },
- * function(callback) {
- * setTimeout(function() {
- * // then do another async task
- * callback(null, 'two');
- * }, 100);
- * }
- * ], function(err, results) {
- * console.log(results);
- * // results is equal to ['one','two']
- * });
- *
- * // an example using objects instead of arrays
- * async.series({
- * one: function(callback) {
- * setTimeout(function() {
- * // do some async task
- * callback(null, 1);
- * }, 200);
- * },
- * two: function(callback) {
- * setTimeout(function() {
- * // then do another async task
- * callback(null, 2);
- * }, 100);
- * }
- * }, function(err, results) {
- * console.log(results);
- * // results is equal to: { one: 1, two: 2 }
- * });
- *
- * //Using Promises
- * async.series([
- * function(callback) {
- * setTimeout(function() {
- * callback(null, 'one');
- * }, 200);
- * },
- * function(callback) {
- * setTimeout(function() {
- * callback(null, 'two');
- * }, 100);
- * }
- * ]).then(results => {
- * console.log(results);
- * // results is equal to ['one','two']
- * }).catch(err => {
- * console.log(err);
- * });
- *
- * // an example using an object instead of an array
- * async.series({
- * one: function(callback) {
- * setTimeout(function() {
- * // do some async task
- * callback(null, 1);
- * }, 200);
- * },
- * two: function(callback) {
- * setTimeout(function() {
- * // then do another async task
- * callback(null, 2);
- * }, 100);
- * }
- * }).then(results => {
- * console.log(results);
- * // results is equal to: { one: 1, two: 2 }
- * }).catch(err => {
- * console.log(err);
- * });
- *
- * //Using async/await
- * async () => {
- * try {
- * let results = await async.series([
- * function(callback) {
- * setTimeout(function() {
- * // do some async task
- * callback(null, 'one');
- * }, 200);
- * },
- * function(callback) {
- * setTimeout(function() {
- * // then do another async task
- * callback(null, 'two');
- * }, 100);
- * }
- * ]);
- * console.log(results);
- * // results is equal to ['one','two']
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- * // an example using an object instead of an array
- * async () => {
- * try {
- * let results = await async.parallel({
- * one: function(callback) {
- * setTimeout(function() {
- * // do some async task
- * callback(null, 1);
- * }, 200);
- * },
- * two: function(callback) {
- * setTimeout(function() {
- * // then do another async task
- * callback(null, 2);
- * }, 100);
- * }
- * });
- * console.log(results);
- * // results is equal to: { one: 1, two: 2 }
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- */
- function series(tasks, callback) {
- return _parallel(eachOfSeries$1, tasks, callback);
- }
-
- /**
- * Returns `true` if at least one element in the `coll` satisfies an async test.
- * If any iteratee call returns `true`, the main `callback` is immediately
- * called.
- *
- * @name some
- * @static
- * @memberOf module:Collections
- * @method
- * @alias any
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - An async truth test to apply to each item
- * in the collections in parallel.
- * The iteratee should complete with a boolean `result` value.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called as soon as any
- * iteratee returns `true`, or after all the iteratee functions have finished.
- * Result will be either `true` or `false` depending on the values of the async
- * tests. Invoked with (err, result).
- * @returns {Promise} a promise, if no callback provided
- * @example
- *
- * // dir1 is a directory that contains file1.txt, file2.txt
- * // dir2 is a directory that contains file3.txt, file4.txt
- * // dir3 is a directory that contains file5.txt
- * // dir4 does not exist
- *
- * // asynchronous function that checks if a file exists
- * function fileExists(file, callback) {
- * fs.access(file, fs.constants.F_OK, (err) => {
- * callback(null, !err);
- * });
- * }
- *
- * // Using callbacks
- * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists,
- * function(err, result) {
- * console.log(result);
- * // true
- * // result is true since some file in the list exists
- * }
- *);
- *
- * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists,
- * function(err, result) {
- * console.log(result);
- * // false
- * // result is false since none of the files exists
- * }
- *);
- *
- * // Using Promises
- * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists)
- * .then( result => {
- * console.log(result);
- * // true
- * // result is true since some file in the list exists
- * }).catch( err => {
- * console.log(err);
- * });
- *
- * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists)
- * .then( result => {
- * console.log(result);
- * // false
- * // result is false since none of the files exists
- * }).catch( err => {
- * console.log(err);
- * });
- *
- * // Using async/await
- * async () => {
- * try {
- * let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists);
- * console.log(result);
- * // true
- * // result is true since some file in the list exists
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- * async () => {
- * try {
- * let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists);
- * console.log(result);
- * // false
- * // result is false since none of the files exists
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- */
- function some(coll, iteratee, callback) {
- return _createTester(Boolean, res => res)(eachOf$1, coll, iteratee, callback)
- }
- var some$1 = awaitify(some, 3);
-
- /**
- * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.
- *
- * @name someLimit
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.some]{@link module:Collections.some}
- * @alias anyLimit
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {number} limit - The maximum number of async operations at a time.
- * @param {AsyncFunction} iteratee - An async truth test to apply to each item
- * in the collections in parallel.
- * The iteratee should complete with a boolean `result` value.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called as soon as any
- * iteratee returns `true`, or after all the iteratee functions have finished.
- * Result will be either `true` or `false` depending on the values of the async
- * tests. Invoked with (err, result).
- * @returns {Promise} a promise, if no callback provided
- */
- function someLimit(coll, limit, iteratee, callback) {
- return _createTester(Boolean, res => res)(eachOfLimit$2(limit), coll, iteratee, callback)
- }
- var someLimit$1 = awaitify(someLimit, 4);
-
- /**
- * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time.
- *
- * @name someSeries
- * @static
- * @memberOf module:Collections
- * @method
- * @see [async.some]{@link module:Collections.some}
- * @alias anySeries
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - An async truth test to apply to each item
- * in the collections in series.
- * The iteratee should complete with a boolean `result` value.
- * Invoked with (item, callback).
- * @param {Function} [callback] - A callback which is called as soon as any
- * iteratee returns `true`, or after all the iteratee functions have finished.
- * Result will be either `true` or `false` depending on the values of the async
- * tests. Invoked with (err, result).
- * @returns {Promise} a promise, if no callback provided
- */
- function someSeries(coll, iteratee, callback) {
- return _createTester(Boolean, res => res)(eachOfSeries$1, coll, iteratee, callback)
- }
- var someSeries$1 = awaitify(someSeries, 3);
-
- /**
- * Sorts a list by the results of running each `coll` value through an async
- * `iteratee`.
- *
- * @name sortBy
- * @static
- * @memberOf module:Collections
- * @method
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {AsyncFunction} iteratee - An async function to apply to each item in
- * `coll`.
- * The iteratee should complete with a value to use as the sort criteria as
- * its `result`.
- * Invoked with (item, callback).
- * @param {Function} callback - A callback which is called after all the
- * `iteratee` functions have finished, or an error occurs. Results is the items
- * from the original `coll` sorted by the values returned by the `iteratee`
- * calls. Invoked with (err, results).
- * @returns {Promise} a promise, if no callback passed
- * @example
- *
- * // bigfile.txt is a file that is 251100 bytes in size
- * // mediumfile.txt is a file that is 11000 bytes in size
- * // smallfile.txt is a file that is 121 bytes in size
- *
- * // asynchronous function that returns the file size in bytes
- * function getFileSizeInBytes(file, callback) {
- * fs.stat(file, function(err, stat) {
- * if (err) {
- * return callback(err);
- * }
- * callback(null, stat.size);
- * });
- * }
- *
- * // Using callbacks
- * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], getFileSizeInBytes,
- * function(err, results) {
- * if (err) {
- * console.log(err);
- * } else {
- * console.log(results);
- * // results is now the original array of files sorted by
- * // file size (ascending by default), e.g.
- * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt']
- * }
- * }
- * );
- *
- * // By modifying the callback parameter the
- * // sorting order can be influenced:
- *
- * // ascending order
- * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], function(file, callback) {
- * getFileSizeInBytes(file, function(getFileSizeErr, fileSize) {
- * if (getFileSizeErr) return callback(getFileSizeErr);
- * callback(null, fileSize);
- * });
- * }, function(err, results) {
- * if (err) {
- * console.log(err);
- * } else {
- * console.log(results);
- * // results is now the original array of files sorted by
- * // file size (ascending by default), e.g.
- * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt']
- * }
- * }
- * );
- *
- * // descending order
- * async.sortBy(['bigfile.txt','mediumfile.txt','smallfile.txt'], function(file, callback) {
- * getFileSizeInBytes(file, function(getFileSizeErr, fileSize) {
- * if (getFileSizeErr) {
- * return callback(getFileSizeErr);
- * }
- * callback(null, fileSize * -1);
- * });
- * }, function(err, results) {
- * if (err) {
- * console.log(err);
- * } else {
- * console.log(results);
- * // results is now the original array of files sorted by
- * // file size (ascending by default), e.g.
- * // [ 'bigfile.txt', 'mediumfile.txt', 'smallfile.txt']
- * }
- * }
- * );
- *
- * // Error handling
- * async.sortBy(['mediumfile.txt','smallfile.txt','missingfile.txt'], getFileSizeInBytes,
- * function(err, results) {
- * if (err) {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * } else {
- * console.log(results);
- * }
- * }
- * );
- *
- * // Using Promises
- * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], getFileSizeInBytes)
- * .then( results => {
- * console.log(results);
- * // results is now the original array of files sorted by
- * // file size (ascending by default), e.g.
- * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt']
- * }).catch( err => {
- * console.log(err);
- * });
- *
- * // Error handling
- * async.sortBy(['mediumfile.txt','smallfile.txt','missingfile.txt'], getFileSizeInBytes)
- * .then( results => {
- * console.log(results);
- * }).catch( err => {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * });
- *
- * // Using async/await
- * (async () => {
- * try {
- * let results = await async.sortBy(['bigfile.txt','mediumfile.txt','smallfile.txt'], getFileSizeInBytes);
- * console.log(results);
- * // results is now the original array of files sorted by
- * // file size (ascending by default), e.g.
- * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt']
- * }
- * catch (err) {
- * console.log(err);
- * }
- * })();
- *
- * // Error handling
- * async () => {
- * try {
- * let results = await async.sortBy(['missingfile.txt','mediumfile.txt','smallfile.txt'], getFileSizeInBytes);
- * console.log(results);
- * }
- * catch (err) {
- * console.log(err);
- * // [ Error: ENOENT: no such file or directory ]
- * }
- * }
- *
- */
- function sortBy (coll, iteratee, callback) {
- var _iteratee = wrapAsync(iteratee);
- return map$1(coll, (x, iterCb) => {
- _iteratee(x, (err, criteria) => {
- if (err) return iterCb(err);
- iterCb(err, {value: x, criteria});
- });
- }, (err, results) => {
- if (err) return callback(err);
- callback(null, results.sort(comparator).map(v => v.value));
- });
-
- function comparator(left, right) {
- var a = left.criteria, b = right.criteria;
- return a < b ? -1 : a > b ? 1 : 0;
- }
- }
- var sortBy$1 = awaitify(sortBy, 3);
-
- /**
- * Sets a time limit on an asynchronous function. If the function does not call
- * its callback within the specified milliseconds, it will be called with a
- * timeout error. The code property for the error object will be `'ETIMEDOUT'`.
- *
- * @name timeout
- * @static
- * @memberOf module:Utils
- * @method
- * @category Util
- * @param {AsyncFunction} asyncFn - The async function to limit in time.
- * @param {number} milliseconds - The specified time limit.
- * @param {*} [info] - Any variable you want attached (`string`, `object`, etc)
- * to timeout Error for more information..
- * @returns {AsyncFunction} Returns a wrapped function that can be used with any
- * of the control flow functions.
- * Invoke this function with the same parameters as you would `asyncFunc`.
- * @example
- *
- * function myFunction(foo, callback) {
- * doAsyncTask(foo, function(err, data) {
- * // handle errors
- * if (err) return callback(err);
- *
- * // do some stuff ...
- *
- * // return processed data
- * return callback(null, data);
- * });
- * }
- *
- * var wrapped = async.timeout(myFunction, 1000);
- *
- * // call `wrapped` as you would `myFunction`
- * wrapped({ bar: 'bar' }, function(err, data) {
- * // if `myFunction` takes < 1000 ms to execute, `err`
- * // and `data` will have their expected values
- *
- * // else `err` will be an Error with the code 'ETIMEDOUT'
- * });
- */
- function timeout(asyncFn, milliseconds, info) {
- var fn = wrapAsync(asyncFn);
-
- return initialParams((args, callback) => {
- var timedOut = false;
- var timer;
-
- function timeoutCallback() {
- var name = asyncFn.name || 'anonymous';
- var error = new Error('Callback function "' + name + '" timed out.');
- error.code = 'ETIMEDOUT';
- if (info) {
- error.info = info;
- }
- timedOut = true;
- callback(error);
- }
-
- args.push((...cbArgs) => {
- if (!timedOut) {
- callback(...cbArgs);
- clearTimeout(timer);
- }
- });
-
- // setup timer and call original function
- timer = setTimeout(timeoutCallback, milliseconds);
- fn(...args);
- });
- }
-
- function range(size) {
- var result = Array(size);
- while (size--) {
- result[size] = size;
- }
- return result;
- }
-
- /**
- * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a
- * time.
- *
- * @name timesLimit
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @see [async.times]{@link module:ControlFlow.times}
- * @category Control Flow
- * @param {number} count - The number of times to run the function.
- * @param {number} limit - The maximum number of async operations at a time.
- * @param {AsyncFunction} iteratee - The async function to call `n` times.
- * Invoked with the iteration index and a callback: (n, next).
- * @param {Function} callback - see [async.map]{@link module:Collections.map}.
- * @returns {Promise} a promise, if no callback is provided
- */
- function timesLimit(count, limit, iteratee, callback) {
- var _iteratee = wrapAsync(iteratee);
- return mapLimit$1(range(count), limit, _iteratee, callback);
- }
-
- /**
- * Calls the `iteratee` function `n` times, and accumulates results in the same
- * manner you would use with [map]{@link module:Collections.map}.
- *
- * @name times
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @see [async.map]{@link module:Collections.map}
- * @category Control Flow
- * @param {number} n - The number of times to run the function.
- * @param {AsyncFunction} iteratee - The async function to call `n` times.
- * Invoked with the iteration index and a callback: (n, next).
- * @param {Function} callback - see {@link module:Collections.map}.
- * @returns {Promise} a promise, if no callback is provided
- * @example
- *
- * // Pretend this is some complicated async factory
- * var createUser = function(id, callback) {
- * callback(null, {
- * id: 'user' + id
- * });
- * };
- *
- * // generate 5 users
- * async.times(5, function(n, next) {
- * createUser(n, function(err, user) {
- * next(err, user);
- * });
- * }, function(err, users) {
- * // we should now have 5 users
- * });
- */
- function times (n, iteratee, callback) {
- return timesLimit(n, Infinity, iteratee, callback)
- }
-
- /**
- * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.
- *
- * @name timesSeries
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @see [async.times]{@link module:ControlFlow.times}
- * @category Control Flow
- * @param {number} n - The number of times to run the function.
- * @param {AsyncFunction} iteratee - The async function to call `n` times.
- * Invoked with the iteration index and a callback: (n, next).
- * @param {Function} callback - see {@link module:Collections.map}.
- * @returns {Promise} a promise, if no callback is provided
- */
- function timesSeries (n, iteratee, callback) {
- return timesLimit(n, 1, iteratee, callback)
- }
-
- /**
- * A relative of `reduce`. Takes an Object or Array, and iterates over each
- * element in parallel, each step potentially mutating an `accumulator` value.
- * The type of the accumulator defaults to the type of collection passed in.
- *
- * @name transform
- * @static
- * @memberOf module:Collections
- * @method
- * @category Collection
- * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
- * @param {*} [accumulator] - The initial state of the transform. If omitted,
- * it will default to an empty Object or Array, depending on the type of `coll`
- * @param {AsyncFunction} iteratee - A function applied to each item in the
- * collection that potentially modifies the accumulator.
- * Invoked with (accumulator, item, key, callback).
- * @param {Function} [callback] - A callback which is called after all the
- * `iteratee` functions have finished. Result is the transformed accumulator.
- * Invoked with (err, result).
- * @returns {Promise} a promise, if no callback provided
- * @example
- *
- * // file1.txt is a file that is 1000 bytes in size
- * // file2.txt is a file that is 2000 bytes in size
- * // file3.txt is a file that is 3000 bytes in size
- *
- * // helper function that returns human-readable size format from bytes
- * function formatBytes(bytes, decimals = 2) {
- * // implementation not included for brevity
- * return humanReadbleFilesize;
- * }
- *
- * const fileList = ['file1.txt','file2.txt','file3.txt'];
- *
- * // asynchronous function that returns the file size, transformed to human-readable format
- * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc.
- * function transformFileSize(acc, value, key, callback) {
- * fs.stat(value, function(err, stat) {
- * if (err) {
- * return callback(err);
- * }
- * acc[key] = formatBytes(stat.size);
- * callback(null);
- * });
- * }
- *
- * // Using callbacks
- * async.transform(fileList, transformFileSize, function(err, result) {
- * if(err) {
- * console.log(err);
- * } else {
- * console.log(result);
- * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ]
- * }
- * });
- *
- * // Using Promises
- * async.transform(fileList, transformFileSize)
- * .then(result => {
- * console.log(result);
- * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ]
- * }).catch(err => {
- * console.log(err);
- * });
- *
- * // Using async/await
- * (async () => {
- * try {
- * let result = await async.transform(fileList, transformFileSize);
- * console.log(result);
- * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ]
- * }
- * catch (err) {
- * console.log(err);
- * }
- * })();
- *
- * @example
- *
- * // file1.txt is a file that is 1000 bytes in size
- * // file2.txt is a file that is 2000 bytes in size
- * // file3.txt is a file that is 3000 bytes in size
- *
- * // helper function that returns human-readable size format from bytes
- * function formatBytes(bytes, decimals = 2) {
- * // implementation not included for brevity
- * return humanReadbleFilesize;
- * }
- *
- * const fileMap = { f1: 'file1.txt', f2: 'file2.txt', f3: 'file3.txt' };
- *
- * // asynchronous function that returns the file size, transformed to human-readable format
- * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc.
- * function transformFileSize(acc, value, key, callback) {
- * fs.stat(value, function(err, stat) {
- * if (err) {
- * return callback(err);
- * }
- * acc[key] = formatBytes(stat.size);
- * callback(null);
- * });
- * }
- *
- * // Using callbacks
- * async.transform(fileMap, transformFileSize, function(err, result) {
- * if(err) {
- * console.log(err);
- * } else {
- * console.log(result);
- * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' }
- * }
- * });
- *
- * // Using Promises
- * async.transform(fileMap, transformFileSize)
- * .then(result => {
- * console.log(result);
- * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' }
- * }).catch(err => {
- * console.log(err);
- * });
- *
- * // Using async/await
- * async () => {
- * try {
- * let result = await async.transform(fileMap, transformFileSize);
- * console.log(result);
- * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' }
- * }
- * catch (err) {
- * console.log(err);
- * }
- * }
- *
- */
- function transform (coll, accumulator, iteratee, callback) {
- if (arguments.length <= 3 && typeof accumulator === 'function') {
- callback = iteratee;
- iteratee = accumulator;
- accumulator = Array.isArray(coll) ? [] : {};
- }
- callback = once(callback || promiseCallback());
- var _iteratee = wrapAsync(iteratee);
-
- eachOf$1(coll, (v, k, cb) => {
- _iteratee(accumulator, v, k, cb);
- }, err => callback(err, accumulator));
- return callback[PROMISE_SYMBOL]
- }
-
- /**
- * It runs each task in series but stops whenever any of the functions were
- * successful. If one of the tasks were successful, the `callback` will be
- * passed the result of the successful task. If all tasks fail, the callback
- * will be passed the error and result (if any) of the final attempt.
- *
- * @name tryEach
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @category Control Flow
- * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing functions to
- * run, each function is passed a `callback(err, result)` it must call on
- * completion with an error `err` (which can be `null`) and an optional `result`
- * value.
- * @param {Function} [callback] - An optional callback which is called when one
- * of the tasks has succeeded, or all have failed. It receives the `err` and
- * `result` arguments of the last attempt at completing the `task`. Invoked with
- * (err, results).
- * @returns {Promise} a promise, if no callback is passed
- * @example
- * async.tryEach([
- * function getDataFromFirstWebsite(callback) {
- * // Try getting the data from the first website
- * callback(err, data);
- * },
- * function getDataFromSecondWebsite(callback) {
- * // First website failed,
- * // Try getting the data from the backup website
- * callback(err, data);
- * }
- * ],
- * // optional callback
- * function(err, results) {
- * Now do something with the data.
- * });
- *
- */
- function tryEach(tasks, callback) {
- var error = null;
- var result;
- return eachSeries$1(tasks, (task, taskCb) => {
- wrapAsync(task)((err, ...args) => {
- if (err === false) return taskCb(err);
-
- if (args.length < 2) {
- [result] = args;
- } else {
- result = args;
- }
- error = err;
- taskCb(err ? null : {});
- });
- }, () => callback(error, result));
- }
-
- var tryEach$1 = awaitify(tryEach);
-
- /**
- * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,
- * unmemoized form. Handy for testing.
- *
- * @name unmemoize
- * @static
- * @memberOf module:Utils
- * @method
- * @see [async.memoize]{@link module:Utils.memoize}
- * @category Util
- * @param {AsyncFunction} fn - the memoized function
- * @returns {AsyncFunction} a function that calls the original unmemoized function
- */
- function unmemoize(fn) {
- return (...args) => {
- return (fn.unmemoized || fn)(...args);
- };
- }
-
- /**
- * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when
- * stopped, or an error occurs.
- *
- * @name whilst
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @category Control Flow
- * @param {AsyncFunction} test - asynchronous truth test to perform before each
- * execution of `iteratee`. Invoked with (callback).
- * @param {AsyncFunction} iteratee - An async function which is called each time
- * `test` passes. Invoked with (callback).
- * @param {Function} [callback] - A callback which is called after the test
- * function has failed and repeated execution of `iteratee` has stopped. `callback`
- * will be passed an error and any arguments passed to the final `iteratee`'s
- * callback. Invoked with (err, [results]);
- * @returns {Promise} a promise, if no callback is passed
- * @example
- *
- * var count = 0;
- * async.whilst(
- * function test(cb) { cb(null, count < 5); },
- * function iter(callback) {
- * count++;
- * setTimeout(function() {
- * callback(null, count);
- * }, 1000);
- * },
- * function (err, n) {
- * // 5 seconds have passed, n = 5
- * }
- * );
- */
- function whilst(test, iteratee, callback) {
- callback = onlyOnce(callback);
- var _fn = wrapAsync(iteratee);
- var _test = wrapAsync(test);
- var results = [];
-
- function next(err, ...rest) {
- if (err) return callback(err);
- results = rest;
- if (err === false) return;
- _test(check);
- }
-
- function check(err, truth) {
- if (err) return callback(err);
- if (err === false) return;
- if (!truth) return callback(null, ...results);
- _fn(next);
- }
-
- return _test(check);
- }
- var whilst$1 = awaitify(whilst, 3);
-
- /**
- * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when
- * stopped, or an error occurs. `callback` will be passed an error and any
- * arguments passed to the final `iteratee`'s callback.
- *
- * The inverse of [whilst]{@link module:ControlFlow.whilst}.
- *
- * @name until
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @see [async.whilst]{@link module:ControlFlow.whilst}
- * @category Control Flow
- * @param {AsyncFunction} test - asynchronous truth test to perform before each
- * execution of `iteratee`. Invoked with (callback).
- * @param {AsyncFunction} iteratee - An async function which is called each time
- * `test` fails. Invoked with (callback).
- * @param {Function} [callback] - A callback which is called after the test
- * function has passed and repeated execution of `iteratee` has stopped. `callback`
- * will be passed an error and any arguments passed to the final `iteratee`'s
- * callback. Invoked with (err, [results]);
- * @returns {Promise} a promise, if a callback is not passed
- *
- * @example
- * const results = []
- * let finished = false
- * async.until(function test(cb) {
- * cb(null, finished)
- * }, function iter(next) {
- * fetchPage(url, (err, body) => {
- * if (err) return next(err)
- * results = results.concat(body.objects)
- * finished = !!body.next
- * next(err)
- * })
- * }, function done (err) {
- * // all pages have been fetched
- * })
- */
- function until(test, iteratee, callback) {
- const _test = wrapAsync(test);
- return whilst$1((cb) => _test((err, truth) => cb (err, !truth)), iteratee, callback);
- }
-
- /**
- * Runs the `tasks` array of functions in series, each passing their results to
- * the next in the array. However, if any of the `tasks` pass an error to their
- * own callback, the next function is not executed, and the main `callback` is
- * immediately called with the error.
- *
- * @name waterfall
- * @static
- * @memberOf module:ControlFlow
- * @method
- * @category Control Flow
- * @param {Array} tasks - An array of [async functions]{@link AsyncFunction}
- * to run.
- * Each function should complete with any number of `result` values.
- * The `result` values will be passed as arguments, in order, to the next task.
- * @param {Function} [callback] - An optional callback to run once all the
- * functions have completed. This will be passed the results of the last task's
- * callback. Invoked with (err, [results]).
- * @returns {Promise} a promise, if a callback is omitted
- * @example
- *
- * async.waterfall([
- * function(callback) {
- * callback(null, 'one', 'two');
- * },
- * function(arg1, arg2, callback) {
- * // arg1 now equals 'one' and arg2 now equals 'two'
- * callback(null, 'three');
- * },
- * function(arg1, callback) {
- * // arg1 now equals 'three'
- * callback(null, 'done');
- * }
- * ], function (err, result) {
- * // result now equals 'done'
- * });
- *
- * // Or, with named functions:
- * async.waterfall([
- * myFirstFunction,
- * mySecondFunction,
- * myLastFunction,
- * ], function (err, result) {
- * // result now equals 'done'
- * });
- * function myFirstFunction(callback) {
- * callback(null, 'one', 'two');
- * }
- * function mySecondFunction(arg1, arg2, callback) {
- * // arg1 now equals 'one' and arg2 now equals 'two'
- * callback(null, 'three');
- * }
- * function myLastFunction(arg1, callback) {
- * // arg1 now equals 'three'
- * callback(null, 'done');
- * }
- */
- function waterfall (tasks, callback) {
- callback = once(callback);
- if (!Array.isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions'));
- if (!tasks.length) return callback();
- var taskIndex = 0;
-
- function nextTask(args) {
- var task = wrapAsync(tasks[taskIndex++]);
- task(...args, onlyOnce(next));
- }
-
- function next(err, ...args) {
- if (err === false) return
- if (err || taskIndex === tasks.length) {
- return callback(err, ...args);
- }
- nextTask(args);
- }
-
- nextTask([]);
- }
-
- var waterfall$1 = awaitify(waterfall);
-
- /**
- * An "async function" in the context of Async is an asynchronous function with
- * a variable number of parameters, with the final parameter being a callback.
- * (`function (arg1, arg2, ..., callback) {}`)
- * The final callback is of the form `callback(err, results...)`, which must be
- * called once the function is completed. The callback should be called with a
- * Error as its first argument to signal that an error occurred.
- * Otherwise, if no error occurred, it should be called with `null` as the first
- * argument, and any additional `result` arguments that may apply, to signal
- * successful completion.
- * The callback must be called exactly once, ideally on a later tick of the
- * JavaScript event loop.
- *
- * This type of function is also referred to as a "Node-style async function",
- * or a "continuation passing-style function" (CPS). Most of the methods of this
- * library are themselves CPS/Node-style async functions, or functions that
- * return CPS/Node-style async functions.
- *
- * Wherever we accept a Node-style async function, we also directly accept an
- * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}.
- * In this case, the `async` function will not be passed a final callback
- * argument, and any thrown error will be used as the `err` argument of the
- * implicit callback, and the return value will be used as the `result` value.
- * (i.e. a `rejected` of the returned Promise becomes the `err` callback
- * argument, and a `resolved` value becomes the `result`.)
- *
- * Note, due to JavaScript limitations, we can only detect native `async`
- * functions and not transpilied implementations.
- * Your environment must have `async`/`await` support for this to work.
- * (e.g. Node > v7.6, or a recent version of a modern browser).
- * If you are using `async` functions through a transpiler (e.g. Babel), you
- * must still wrap the function with [asyncify]{@link module:Utils.asyncify},
- * because the `async function` will be compiled to an ordinary function that
- * returns a promise.
- *
- * @typedef {Function} AsyncFunction
- * @static
- */
-
-
- var index = {
- apply,
- applyEach,
- applyEachSeries,
- asyncify,
- auto,
- autoInject,
- cargo: cargo$1,
- cargoQueue: cargo,
- compose,
- concat: concat$1,
- concatLimit: concatLimit$1,
- concatSeries: concatSeries$1,
- constant: constant$1,
- detect: detect$1,
- detectLimit: detectLimit$1,
- detectSeries: detectSeries$1,
- dir,
- doUntil,
- doWhilst: doWhilst$1,
- each,
- eachLimit: eachLimit$1,
- eachOf: eachOf$1,
- eachOfLimit: eachOfLimit$1,
- eachOfSeries: eachOfSeries$1,
- eachSeries: eachSeries$1,
- ensureAsync,
- every: every$1,
- everyLimit: everyLimit$1,
- everySeries: everySeries$1,
- filter: filter$1,
- filterLimit: filterLimit$1,
- filterSeries: filterSeries$1,
- forever: forever$1,
- groupBy,
- groupByLimit: groupByLimit$1,
- groupBySeries,
- log,
- map: map$1,
- mapLimit: mapLimit$1,
- mapSeries: mapSeries$1,
- mapValues,
- mapValuesLimit: mapValuesLimit$1,
- mapValuesSeries,
- memoize,
- nextTick,
- parallel,
- parallelLimit,
- priorityQueue,
- queue,
- race: race$1,
- reduce: reduce$1,
- reduceRight,
- reflect,
- reflectAll,
- reject: reject$1,
- rejectLimit: rejectLimit$1,
- rejectSeries: rejectSeries$1,
- retry,
- retryable,
- seq,
- series,
- setImmediate: setImmediate$1,
- some: some$1,
- someLimit: someLimit$1,
- someSeries: someSeries$1,
- sortBy: sortBy$1,
- timeout,
- times,
- timesLimit,
- timesSeries,
- transform,
- tryEach: tryEach$1,
- unmemoize,
- until,
- waterfall: waterfall$1,
- whilst: whilst$1,
-
- // aliases
- all: every$1,
- allLimit: everyLimit$1,
- allSeries: everySeries$1,
- any: some$1,
- anyLimit: someLimit$1,
- anySeries: someSeries$1,
- find: detect$1,
- findLimit: detectLimit$1,
- findSeries: detectSeries$1,
- flatMap: concat$1,
- flatMapLimit: concatLimit$1,
- flatMapSeries: concatSeries$1,
- forEach: each,
- forEachSeries: eachSeries$1,
- forEachLimit: eachLimit$1,
- forEachOf: eachOf$1,
- forEachOfSeries: eachOfSeries$1,
- forEachOfLimit: eachOfLimit$1,
- inject: reduce$1,
- foldl: reduce$1,
- foldr: reduceRight,
- select: filter$1,
- selectLimit: filterLimit$1,
- selectSeries: filterSeries$1,
- wrapSync: asyncify,
- during: whilst$1,
- doDuring: doWhilst$1
- };
-
- exports.all = every$1;
- exports.allLimit = everyLimit$1;
- exports.allSeries = everySeries$1;
- exports.any = some$1;
- exports.anyLimit = someLimit$1;
- exports.anySeries = someSeries$1;
- exports.apply = apply;
- exports.applyEach = applyEach;
- exports.applyEachSeries = applyEachSeries;
- exports.asyncify = asyncify;
- exports.auto = auto;
- exports.autoInject = autoInject;
- exports.cargo = cargo$1;
- exports.cargoQueue = cargo;
- exports.compose = compose;
- exports.concat = concat$1;
- exports.concatLimit = concatLimit$1;
- exports.concatSeries = concatSeries$1;
- exports.constant = constant$1;
- exports.default = index;
- exports.detect = detect$1;
- exports.detectLimit = detectLimit$1;
- exports.detectSeries = detectSeries$1;
- exports.dir = dir;
- exports.doDuring = doWhilst$1;
- exports.doUntil = doUntil;
- exports.doWhilst = doWhilst$1;
- exports.during = whilst$1;
- exports.each = each;
- exports.eachLimit = eachLimit$1;
- exports.eachOf = eachOf$1;
- exports.eachOfLimit = eachOfLimit$1;
- exports.eachOfSeries = eachOfSeries$1;
- exports.eachSeries = eachSeries$1;
- exports.ensureAsync = ensureAsync;
- exports.every = every$1;
- exports.everyLimit = everyLimit$1;
- exports.everySeries = everySeries$1;
- exports.filter = filter$1;
- exports.filterLimit = filterLimit$1;
- exports.filterSeries = filterSeries$1;
- exports.find = detect$1;
- exports.findLimit = detectLimit$1;
- exports.findSeries = detectSeries$1;
- exports.flatMap = concat$1;
- exports.flatMapLimit = concatLimit$1;
- exports.flatMapSeries = concatSeries$1;
- exports.foldl = reduce$1;
- exports.foldr = reduceRight;
- exports.forEach = each;
- exports.forEachLimit = eachLimit$1;
- exports.forEachOf = eachOf$1;
- exports.forEachOfLimit = eachOfLimit$1;
- exports.forEachOfSeries = eachOfSeries$1;
- exports.forEachSeries = eachSeries$1;
- exports.forever = forever$1;
- exports.groupBy = groupBy;
- exports.groupByLimit = groupByLimit$1;
- exports.groupBySeries = groupBySeries;
- exports.inject = reduce$1;
- exports.log = log;
- exports.map = map$1;
- exports.mapLimit = mapLimit$1;
- exports.mapSeries = mapSeries$1;
- exports.mapValues = mapValues;
- exports.mapValuesLimit = mapValuesLimit$1;
- exports.mapValuesSeries = mapValuesSeries;
- exports.memoize = memoize;
- exports.nextTick = nextTick;
- exports.parallel = parallel;
- exports.parallelLimit = parallelLimit;
- exports.priorityQueue = priorityQueue;
- exports.queue = queue;
- exports.race = race$1;
- exports.reduce = reduce$1;
- exports.reduceRight = reduceRight;
- exports.reflect = reflect;
- exports.reflectAll = reflectAll;
- exports.reject = reject$1;
- exports.rejectLimit = rejectLimit$1;
- exports.rejectSeries = rejectSeries$1;
- exports.retry = retry;
- exports.retryable = retryable;
- exports.select = filter$1;
- exports.selectLimit = filterLimit$1;
- exports.selectSeries = filterSeries$1;
- exports.seq = seq;
- exports.series = series;
- exports.setImmediate = setImmediate$1;
- exports.some = some$1;
- exports.someLimit = someLimit$1;
- exports.someSeries = someSeries$1;
- exports.sortBy = sortBy$1;
- exports.timeout = timeout;
- exports.times = times;
- exports.timesLimit = timesLimit;
- exports.timesSeries = timesSeries;
- exports.transform = transform;
- exports.tryEach = tryEach$1;
- exports.unmemoize = unmemoize;
- exports.until = until;
- exports.waterfall = waterfall$1;
- exports.whilst = whilst$1;
- exports.wrapSync = asyncify;
-
- Object.defineProperty(exports, '__esModule', { value: true });
-
-}));
-
-
-/***/ }),
-
-/***/ 33497:
-/***/ ((module) => {
-
-function isBuffer(value) {
- return Buffer.isBuffer(value) || value instanceof Uint8Array
-}
-
-function isEncoding(encoding) {
- return Buffer.isEncoding(encoding)
-}
-
-function alloc(size, fill, encoding) {
- return Buffer.alloc(size, fill, encoding)
-}
-
-function allocUnsafe(size) {
- return Buffer.allocUnsafe(size)
-}
-
-function allocUnsafeSlow(size) {
- return Buffer.allocUnsafeSlow(size)
-}
-
-function byteLength(string, encoding) {
- return Buffer.byteLength(string, encoding)
-}
-
-function compare(a, b) {
- return Buffer.compare(a, b)
-}
-
-function concat(buffers, totalLength) {
- return Buffer.concat(buffers, totalLength)
-}
-
-function copy(source, target, targetStart, start, end) {
- return toBuffer(source).copy(target, targetStart, start, end)
-}
-
-function equals(a, b) {
- return toBuffer(a).equals(b)
-}
-
-function fill(buffer, value, offset, end, encoding) {
- return toBuffer(buffer).fill(value, offset, end, encoding)
-}
-
-function from(value, encodingOrOffset, length) {
- return Buffer.from(value, encodingOrOffset, length)
-}
-
-function includes(buffer, value, byteOffset, encoding) {
- return toBuffer(buffer).includes(value, byteOffset, encoding)
-}
-
-function indexOf(buffer, value, byfeOffset, encoding) {
- return toBuffer(buffer).indexOf(value, byfeOffset, encoding)
-}
-
-function lastIndexOf(buffer, value, byteOffset, encoding) {
- return toBuffer(buffer).lastIndexOf(value, byteOffset, encoding)
-}
-
-function swap16(buffer) {
- return toBuffer(buffer).swap16()
-}
-
-function swap32(buffer) {
- return toBuffer(buffer).swap32()
-}
-
-function swap64(buffer) {
- return toBuffer(buffer).swap64()
-}
-
-function toBuffer(buffer) {
- if (Buffer.isBuffer(buffer)) return buffer
- return Buffer.from(buffer.buffer, buffer.byteOffset, buffer.byteLength)
-}
-
-function toString(buffer, encoding, start, end) {
- return toBuffer(buffer).toString(encoding, start, end)
-}
-
-function write(buffer, string, offset, length, encoding) {
- return toBuffer(buffer).write(string, offset, length, encoding)
-}
-
-function readDoubleBE(buffer, offset) {
- return toBuffer(buffer).readDoubleBE(offset)
-}
-
-function readDoubleLE(buffer, offset) {
- return toBuffer(buffer).readDoubleLE(offset)
-}
-
-function readFloatBE(buffer, offset) {
- return toBuffer(buffer).readFloatBE(offset)
-}
-
-function readFloatLE(buffer, offset) {
- return toBuffer(buffer).readFloatLE(offset)
-}
-
-function readInt32BE(buffer, offset) {
- return toBuffer(buffer).readInt32BE(offset)
-}
-
-function readInt32LE(buffer, offset) {
- return toBuffer(buffer).readInt32LE(offset)
-}
-
-function readUInt32BE(buffer, offset) {
- return toBuffer(buffer).readUInt32BE(offset)
-}
-
-function readUInt32LE(buffer, offset) {
- return toBuffer(buffer).readUInt32LE(offset)
-}
-
-function writeDoubleBE(buffer, value, offset) {
- return toBuffer(buffer).writeDoubleBE(value, offset)
-}
-
-function writeDoubleLE(buffer, value, offset) {
- return toBuffer(buffer).writeDoubleLE(value, offset)
-}
-
-function writeFloatBE(buffer, value, offset) {
- return toBuffer(buffer).writeFloatBE(value, offset)
-}
-
-function writeFloatLE(buffer, value, offset) {
- return toBuffer(buffer).writeFloatLE(value, offset)
-}
-
-function writeInt32BE(buffer, value, offset) {
- return toBuffer(buffer).writeInt32BE(value, offset)
-}
-
-function writeInt32LE(buffer, value, offset) {
- return toBuffer(buffer).writeInt32LE(value, offset)
-}
-
-function writeUInt32BE(buffer, value, offset) {
- return toBuffer(buffer).writeUInt32BE(value, offset)
-}
-
-function writeUInt32LE(buffer, value, offset) {
- return toBuffer(buffer).writeUInt32LE(value, offset)
-}
-
-module.exports = {
- isBuffer,
- isEncoding,
- alloc,
- allocUnsafe,
- allocUnsafeSlow,
- byteLength,
- compare,
- concat,
- copy,
- equals,
- fill,
- from,
- includes,
- indexOf,
- lastIndexOf,
- swap16,
- swap32,
- swap64,
- toBuffer,
- toString,
- write,
- readDoubleBE,
- readDoubleLE,
- readFloatBE,
- readFloatLE,
- readInt32BE,
- readInt32LE,
- readUInt32BE,
- readUInt32LE,
- writeDoubleBE,
- writeDoubleLE,
- writeFloatBE,
- writeFloatLE,
- writeInt32BE,
- writeInt32LE,
- writeUInt32BE,
- writeUInt32LE
-}
-
-
-/***/ }),
-
-/***/ 9417:
-/***/ ((module) => {
-
-"use strict";
-
-module.exports = balanced;
-function balanced(a, b, str) {
- if (a instanceof RegExp) a = maybeMatch(a, str);
- if (b instanceof RegExp) b = maybeMatch(b, str);
-
- var r = range(a, b, str);
-
- return r && {
- start: r[0],
- end: r[1],
- pre: str.slice(0, r[0]),
- body: str.slice(r[0] + a.length, r[1]),
- post: str.slice(r[1] + b.length)
- };
-}
-
-function maybeMatch(reg, str) {
- var m = str.match(reg);
- return m ? m[0] : null;
-}
-
-balanced.range = range;
-function range(a, b, str) {
- var begs, beg, left, right, result;
- var ai = str.indexOf(a);
- var bi = str.indexOf(b, ai + 1);
- var i = ai;
-
- if (ai >= 0 && bi > 0) {
- if(a===b) {
- return [ai, bi];
- }
- begs = [];
- left = str.length;
-
- while (i >= 0 && !result) {
- if (i == ai) {
- begs.push(i);
- ai = str.indexOf(a, i + 1);
- } else if (begs.length == 1) {
- result = [ begs.pop(), bi ];
- } else {
- beg = begs.pop();
- if (beg < left) {
- left = beg;
- right = bi;
- }
-
- bi = str.indexOf(b, i + 1);
- }
-
- i = ai < bi && ai >= 0 ? ai : bi;
- }
-
- if (begs.length) {
- result = [ left, right ];
- }
- }
-
- return result;
-}
-
-
-/***/ }),
-
-/***/ 83682:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-var register = __nccwpck_require__(44670);
-var addHook = __nccwpck_require__(5549);
-var removeHook = __nccwpck_require__(6819);
-
-// bind with array of arguments: https://stackoverflow.com/a/21792913
-var bind = Function.bind;
-var bindable = bind.bind(bind);
-
-function bindApi(hook, state, name) {
- var removeHookRef = bindable(removeHook, null).apply(
- null,
- name ? [state, name] : [state]
- );
- hook.api = { remove: removeHookRef };
- hook.remove = removeHookRef;
- ["before", "error", "after", "wrap"].forEach(function (kind) {
- var args = name ? [state, kind, name] : [state, kind];
- hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args);
- });
-}
-
-function HookSingular() {
- var singularHookName = "h";
- var singularHookState = {
- registry: {},
- };
- var singularHook = register.bind(null, singularHookState, singularHookName);
- bindApi(singularHook, singularHookState, singularHookName);
- return singularHook;
-}
-
-function HookCollection() {
- var state = {
- registry: {},
- };
-
- var hook = register.bind(null, state);
- bindApi(hook, state);
-
- return hook;
-}
-
-var collectionHookDeprecationMessageDisplayed = false;
-function Hook() {
- if (!collectionHookDeprecationMessageDisplayed) {
- console.warn(
- '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4'
- );
- collectionHookDeprecationMessageDisplayed = true;
- }
- return HookCollection();
-}
-
-Hook.Singular = HookSingular.bind();
-Hook.Collection = HookCollection.bind();
-
-module.exports = Hook;
-// expose constructors as a named property for TypeScript
-module.exports.Hook = Hook;
-module.exports.Singular = Hook.Singular;
-module.exports.Collection = Hook.Collection;
-
-
-/***/ }),
-
-/***/ 5549:
-/***/ ((module) => {
-
-module.exports = addHook;
-
-function addHook(state, kind, name, hook) {
- var orig = hook;
- if (!state.registry[name]) {
- state.registry[name] = [];
- }
-
- if (kind === "before") {
- hook = function (method, options) {
- return Promise.resolve()
- .then(orig.bind(null, options))
- .then(method.bind(null, options));
- };
- }
-
- if (kind === "after") {
- hook = function (method, options) {
- var result;
- return Promise.resolve()
- .then(method.bind(null, options))
- .then(function (result_) {
- result = result_;
- return orig(result, options);
- })
- .then(function () {
- return result;
- });
- };
- }
-
- if (kind === "error") {
- hook = function (method, options) {
- return Promise.resolve()
- .then(method.bind(null, options))
- .catch(function (error) {
- return orig(error, options);
- });
- };
- }
-
- state.registry[name].push({
- hook: hook,
- orig: orig,
- });
-}
-
-
-/***/ }),
-
-/***/ 44670:
-/***/ ((module) => {
-
-module.exports = register;
-
-function register(state, name, method, options) {
- if (typeof method !== "function") {
- throw new Error("method for before hook must be a function");
- }
-
- if (!options) {
- options = {};
- }
-
- if (Array.isArray(name)) {
- return name.reverse().reduce(function (callback, name) {
- return register.bind(null, state, name, callback, options);
- }, method)();
- }
-
- return Promise.resolve().then(function () {
- if (!state.registry[name]) {
- return method(options);
- }
-
- return state.registry[name].reduce(function (method, registered) {
- return registered.hook.bind(null, method, options);
- }, method)();
- });
-}
-
-
-/***/ }),
-
-/***/ 6819:
-/***/ ((module) => {
-
-module.exports = removeHook;
-
-function removeHook(state, name, method) {
- if (!state.registry[name]) {
- return;
- }
-
- var index = state.registry[name]
- .map(function (registered) {
- return registered.orig;
- })
- .indexOf(method);
-
- if (index === -1) {
- return;
- }
-
- state.registry[name].splice(index, 1);
-}
-
-
-/***/ }),
-
-/***/ 66474:
-/***/ ((module, exports, __nccwpck_require__) => {
-
-var Chainsaw = __nccwpck_require__(46533);
-var EventEmitter = (__nccwpck_require__(82361).EventEmitter);
-var Buffers = __nccwpck_require__(51590);
-var Vars = __nccwpck_require__(13755);
-var Stream = (__nccwpck_require__(12781).Stream);
-
-exports = module.exports = function (bufOrEm, eventName) {
- if (Buffer.isBuffer(bufOrEm)) {
- return exports.parse(bufOrEm);
- }
-
- var s = exports.stream();
- if (bufOrEm && bufOrEm.pipe) {
- bufOrEm.pipe(s);
- }
- else if (bufOrEm) {
- bufOrEm.on(eventName || 'data', function (buf) {
- s.write(buf);
- });
-
- bufOrEm.on('end', function () {
- s.end();
- });
- }
- return s;
-};
-
-exports.stream = function (input) {
- if (input) return exports.apply(null, arguments);
-
- var pending = null;
- function getBytes (bytes, cb, skip) {
- pending = {
- bytes : bytes,
- skip : skip,
- cb : function (buf) {
- pending = null;
- cb(buf);
- },
- };
- dispatch();
- }
-
- var offset = null;
- function dispatch () {
- if (!pending) {
- if (caughtEnd) done = true;
- return;
- }
- if (typeof pending === 'function') {
- pending();
- }
- else {
- var bytes = offset + pending.bytes;
-
- if (buffers.length >= bytes) {
- var buf;
- if (offset == null) {
- buf = buffers.splice(0, bytes);
- if (!pending.skip) {
- buf = buf.slice();
- }
- }
- else {
- if (!pending.skip) {
- buf = buffers.slice(offset, bytes);
- }
- offset = bytes;
- }
-
- if (pending.skip) {
- pending.cb();
- }
- else {
- pending.cb(buf);
- }
- }
- }
- }
-
- function builder (saw) {
- function next () { if (!done) saw.next() }
-
- var self = words(function (bytes, cb) {
- return function (name) {
- getBytes(bytes, function (buf) {
- vars.set(name, cb(buf));
- next();
- });
- };
- });
-
- self.tap = function (cb) {
- saw.nest(cb, vars.store);
- };
-
- self.into = function (key, cb) {
- if (!vars.get(key)) vars.set(key, {});
- var parent = vars;
- vars = Vars(parent.get(key));
-
- saw.nest(function () {
- cb.apply(this, arguments);
- this.tap(function () {
- vars = parent;
- });
- }, vars.store);
- };
-
- self.flush = function () {
- vars.store = {};
- next();
- };
-
- self.loop = function (cb) {
- var end = false;
-
- saw.nest(false, function loop () {
- this.vars = vars.store;
- cb.call(this, function () {
- end = true;
- next();
- }, vars.store);
- this.tap(function () {
- if (end) saw.next()
- else loop.call(this)
- }.bind(this));
- }, vars.store);
- };
-
- self.buffer = function (name, bytes) {
- if (typeof bytes === 'string') {
- bytes = vars.get(bytes);
- }
-
- getBytes(bytes, function (buf) {
- vars.set(name, buf);
- next();
- });
- };
-
- self.skip = function (bytes) {
- if (typeof bytes === 'string') {
- bytes = vars.get(bytes);
- }
-
- getBytes(bytes, function () {
- next();
- });
- };
-
- self.scan = function find (name, search) {
- if (typeof search === 'string') {
- search = new Buffer(search);
- }
- else if (!Buffer.isBuffer(search)) {
- throw new Error('search must be a Buffer or a string');
- }
-
- var taken = 0;
- pending = function () {
- var pos = buffers.indexOf(search, offset + taken);
- var i = pos-offset-taken;
- if (pos !== -1) {
- pending = null;
- if (offset != null) {
- vars.set(
- name,
- buffers.slice(offset, offset + taken + i)
- );
- offset += taken + i + search.length;
- }
- else {
- vars.set(
- name,
- buffers.slice(0, taken + i)
- );
- buffers.splice(0, taken + i + search.length);
- }
- next();
- dispatch();
- } else {
- i = Math.max(buffers.length - search.length - offset - taken, 0);
- }
- taken += i;
- };
- dispatch();
- };
-
- self.peek = function (cb) {
- offset = 0;
- saw.nest(function () {
- cb.call(this, vars.store);
- this.tap(function () {
- offset = null;
- });
- });
- };
-
- return self;
- };
-
- var stream = Chainsaw.light(builder);
- stream.writable = true;
-
- var buffers = Buffers();
-
- stream.write = function (buf) {
- buffers.push(buf);
- dispatch();
- };
-
- var vars = Vars();
-
- var done = false, caughtEnd = false;
- stream.end = function () {
- caughtEnd = true;
- };
-
- stream.pipe = Stream.prototype.pipe;
- Object.getOwnPropertyNames(EventEmitter.prototype).forEach(function (name) {
- stream[name] = EventEmitter.prototype[name];
- });
-
- return stream;
-};
-
-exports.parse = function parse (buffer) {
- var self = words(function (bytes, cb) {
- return function (name) {
- if (offset + bytes <= buffer.length) {
- var buf = buffer.slice(offset, offset + bytes);
- offset += bytes;
- vars.set(name, cb(buf));
- }
- else {
- vars.set(name, null);
- }
- return self;
- };
- });
-
- var offset = 0;
- var vars = Vars();
- self.vars = vars.store;
-
- self.tap = function (cb) {
- cb.call(self, vars.store);
- return self;
- };
-
- self.into = function (key, cb) {
- if (!vars.get(key)) {
- vars.set(key, {});
- }
- var parent = vars;
- vars = Vars(parent.get(key));
- cb.call(self, vars.store);
- vars = parent;
- return self;
- };
-
- self.loop = function (cb) {
- var end = false;
- var ender = function () { end = true };
- while (end === false) {
- cb.call(self, ender, vars.store);
- }
- return self;
- };
-
- self.buffer = function (name, size) {
- if (typeof size === 'string') {
- size = vars.get(size);
- }
- var buf = buffer.slice(offset, Math.min(buffer.length, offset + size));
- offset += size;
- vars.set(name, buf);
-
- return self;
- };
-
- self.skip = function (bytes) {
- if (typeof bytes === 'string') {
- bytes = vars.get(bytes);
- }
- offset += bytes;
-
- return self;
- };
-
- self.scan = function (name, search) {
- if (typeof search === 'string') {
- search = new Buffer(search);
- }
- else if (!Buffer.isBuffer(search)) {
- throw new Error('search must be a Buffer or a string');
- }
- vars.set(name, null);
-
- // simple but slow string search
- for (var i = 0; i + offset <= buffer.length - search.length + 1; i++) {
- for (
- var j = 0;
- j < search.length && buffer[offset+i+j] === search[j];
- j++
- );
- if (j === search.length) break;
- }
-
- vars.set(name, buffer.slice(offset, offset + i));
- offset += i + search.length;
- return self;
- };
-
- self.peek = function (cb) {
- var was = offset;
- cb.call(self, vars.store);
- offset = was;
- return self;
- };
-
- self.flush = function () {
- vars.store = {};
- return self;
- };
-
- self.eof = function () {
- return offset >= buffer.length;
- };
-
- return self;
-};
-
-// convert byte strings to unsigned little endian numbers
-function decodeLEu (bytes) {
- var acc = 0;
- for (var i = 0; i < bytes.length; i++) {
- acc += Math.pow(256,i) * bytes[i];
- }
- return acc;
-}
-
-// convert byte strings to unsigned big endian numbers
-function decodeBEu (bytes) {
- var acc = 0;
- for (var i = 0; i < bytes.length; i++) {
- acc += Math.pow(256, bytes.length - i - 1) * bytes[i];
- }
- return acc;
-}
-
-// convert byte strings to signed big endian numbers
-function decodeBEs (bytes) {
- var val = decodeBEu(bytes);
- if ((bytes[0] & 0x80) == 0x80) {
- val -= Math.pow(256, bytes.length);
- }
- return val;
-}
-
-// convert byte strings to signed little endian numbers
-function decodeLEs (bytes) {
- var val = decodeLEu(bytes);
- if ((bytes[bytes.length - 1] & 0x80) == 0x80) {
- val -= Math.pow(256, bytes.length);
- }
- return val;
-}
-
-function words (decode) {
- var self = {};
-
- [ 1, 2, 4, 8 ].forEach(function (bytes) {
- var bits = bytes * 8;
-
- self['word' + bits + 'le']
- = self['word' + bits + 'lu']
- = decode(bytes, decodeLEu);
-
- self['word' + bits + 'ls']
- = decode(bytes, decodeLEs);
-
- self['word' + bits + 'be']
- = self['word' + bits + 'bu']
- = decode(bytes, decodeBEu);
-
- self['word' + bits + 'bs']
- = decode(bytes, decodeBEs);
- });
-
- // word8be(n) == word8le(n) for all n
- self.word8 = self.word8u = self.word8be;
- self.word8s = self.word8bs;
-
- return self;
-}
-
-
-/***/ }),
-
-/***/ 13755:
-/***/ ((module) => {
-
-module.exports = function (store) {
- function getset (name, value) {
- var node = vars.store;
- var keys = name.split('.');
- keys.slice(0,-1).forEach(function (k) {
- if (node[k] === undefined) node[k] = {};
- node = node[k]
- });
- var key = keys[keys.length - 1];
- if (arguments.length == 1) {
- return node[key];
- }
- else {
- return node[key] = value;
- }
- }
-
- var vars = {
- get : function (name) {
- return getset(name);
- },
- set : function (name, value) {
- return getset(name, value);
- },
- store : store || {},
- };
- return vars;
-};
-
-
-/***/ }),
-
-/***/ 11174:
-/***/ (function(module) {
-
-/**
- * This file contains the Bottleneck library (MIT), compiled to ES2017, and without Clustering support.
- * https://github.com/SGrondin/bottleneck
- */
-(function (global, factory) {
- true ? module.exports = factory() :
- 0;
-}(this, (function () { 'use strict';
-
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
-
- function getCjsExportFromNamespace (n) {
- return n && n['default'] || n;
- }
-
- var load = function(received, defaults, onto = {}) {
- var k, ref, v;
- for (k in defaults) {
- v = defaults[k];
- onto[k] = (ref = received[k]) != null ? ref : v;
- }
- return onto;
- };
-
- var overwrite = function(received, defaults, onto = {}) {
- var k, v;
- for (k in received) {
- v = received[k];
- if (defaults[k] !== void 0) {
- onto[k] = v;
- }
- }
- return onto;
- };
-
- var parser = {
- load: load,
- overwrite: overwrite
- };
-
- var DLList;
-
- DLList = class DLList {
- constructor(incr, decr) {
- this.incr = incr;
- this.decr = decr;
- this._first = null;
- this._last = null;
- this.length = 0;
- }
-
- push(value) {
- var node;
- this.length++;
- if (typeof this.incr === "function") {
- this.incr();
- }
- node = {
- value,
- prev: this._last,
- next: null
- };
- if (this._last != null) {
- this._last.next = node;
- this._last = node;
- } else {
- this._first = this._last = node;
- }
- return void 0;
- }
-
- shift() {
- var value;
- if (this._first == null) {
- return;
- } else {
- this.length--;
- if (typeof this.decr === "function") {
- this.decr();
- }
- }
- value = this._first.value;
- if ((this._first = this._first.next) != null) {
- this._first.prev = null;
- } else {
- this._last = null;
- }
- return value;
- }
-
- first() {
- if (this._first != null) {
- return this._first.value;
- }
- }
-
- getArray() {
- var node, ref, results;
- node = this._first;
- results = [];
- while (node != null) {
- results.push((ref = node, node = node.next, ref.value));
- }
- return results;
- }
-
- forEachShift(cb) {
- var node;
- node = this.shift();
- while (node != null) {
- (cb(node), node = this.shift());
- }
- return void 0;
- }
-
- debug() {
- var node, ref, ref1, ref2, results;
- node = this._first;
- results = [];
- while (node != null) {
- results.push((ref = node, node = node.next, {
- value: ref.value,
- prev: (ref1 = ref.prev) != null ? ref1.value : void 0,
- next: (ref2 = ref.next) != null ? ref2.value : void 0
- }));
- }
- return results;
- }
-
- };
-
- var DLList_1 = DLList;
-
- var Events;
-
- Events = class Events {
- constructor(instance) {
- this.instance = instance;
- this._events = {};
- if ((this.instance.on != null) || (this.instance.once != null) || (this.instance.removeAllListeners != null)) {
- throw new Error("An Emitter already exists for this object");
- }
- this.instance.on = (name, cb) => {
- return this._addListener(name, "many", cb);
- };
- this.instance.once = (name, cb) => {
- return this._addListener(name, "once", cb);
- };
- this.instance.removeAllListeners = (name = null) => {
- if (name != null) {
- return delete this._events[name];
- } else {
- return this._events = {};
- }
- };
- }
-
- _addListener(name, status, cb) {
- var base;
- if ((base = this._events)[name] == null) {
- base[name] = [];
- }
- this._events[name].push({cb, status});
- return this.instance;
- }
-
- listenerCount(name) {
- if (this._events[name] != null) {
- return this._events[name].length;
- } else {
- return 0;
- }
- }
-
- async trigger(name, ...args) {
- var e, promises;
- try {
- if (name !== "debug") {
- this.trigger("debug", `Event triggered: ${name}`, args);
- }
- if (this._events[name] == null) {
- return;
- }
- this._events[name] = this._events[name].filter(function(listener) {
- return listener.status !== "none";
- });
- promises = this._events[name].map(async(listener) => {
- var e, returned;
- if (listener.status === "none") {
- return;
- }
- if (listener.status === "once") {
- listener.status = "none";
- }
- try {
- returned = typeof listener.cb === "function" ? listener.cb(...args) : void 0;
- if (typeof (returned != null ? returned.then : void 0) === "function") {
- return (await returned);
- } else {
- return returned;
- }
- } catch (error) {
- e = error;
- {
- this.trigger("error", e);
- }
- return null;
- }
- });
- return ((await Promise.all(promises))).find(function(x) {
- return x != null;
- });
- } catch (error) {
- e = error;
- {
- this.trigger("error", e);
- }
- return null;
- }
- }
-
- };
-
- var Events_1 = Events;
-
- var DLList$1, Events$1, Queues;
-
- DLList$1 = DLList_1;
-
- Events$1 = Events_1;
-
- Queues = class Queues {
- constructor(num_priorities) {
- var i;
- this.Events = new Events$1(this);
- this._length = 0;
- this._lists = (function() {
- var j, ref, results;
- results = [];
- for (i = j = 1, ref = num_priorities; (1 <= ref ? j <= ref : j >= ref); i = 1 <= ref ? ++j : --j) {
- results.push(new DLList$1((() => {
- return this.incr();
- }), (() => {
- return this.decr();
- })));
- }
- return results;
- }).call(this);
- }
-
- incr() {
- if (this._length++ === 0) {
- return this.Events.trigger("leftzero");
- }
- }
-
- decr() {
- if (--this._length === 0) {
- return this.Events.trigger("zero");
- }
- }
-
- push(job) {
- return this._lists[job.options.priority].push(job);
- }
-
- queued(priority) {
- if (priority != null) {
- return this._lists[priority].length;
- } else {
- return this._length;
- }
- }
-
- shiftAll(fn) {
- return this._lists.forEach(function(list) {
- return list.forEachShift(fn);
- });
- }
-
- getFirst(arr = this._lists) {
- var j, len, list;
- for (j = 0, len = arr.length; j < len; j++) {
- list = arr[j];
- if (list.length > 0) {
- return list;
- }
- }
- return [];
- }
-
- shiftLastFrom(priority) {
- return this.getFirst(this._lists.slice(priority).reverse()).shift();
- }
-
- };
-
- var Queues_1 = Queues;
-
- var BottleneckError;
-
- BottleneckError = class BottleneckError extends Error {};
-
- var BottleneckError_1 = BottleneckError;
-
- var BottleneckError$1, DEFAULT_PRIORITY, Job, NUM_PRIORITIES, parser$1;
-
- NUM_PRIORITIES = 10;
-
- DEFAULT_PRIORITY = 5;
-
- parser$1 = parser;
-
- BottleneckError$1 = BottleneckError_1;
-
- Job = class Job {
- constructor(task, args, options, jobDefaults, rejectOnDrop, Events, _states, Promise) {
- this.task = task;
- this.args = args;
- this.rejectOnDrop = rejectOnDrop;
- this.Events = Events;
- this._states = _states;
- this.Promise = Promise;
- this.options = parser$1.load(options, jobDefaults);
- this.options.priority = this._sanitizePriority(this.options.priority);
- if (this.options.id === jobDefaults.id) {
- this.options.id = `${this.options.id}-${this._randomIndex()}`;
- }
- this.promise = new this.Promise((_resolve, _reject) => {
- this._resolve = _resolve;
- this._reject = _reject;
- });
- this.retryCount = 0;
- }
-
- _sanitizePriority(priority) {
- var sProperty;
- sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority;
- if (sProperty < 0) {
- return 0;
- } else if (sProperty > NUM_PRIORITIES - 1) {
- return NUM_PRIORITIES - 1;
- } else {
- return sProperty;
- }
- }
-
- _randomIndex() {
- return Math.random().toString(36).slice(2);
- }
-
- doDrop({error, message = "This job has been dropped by Bottleneck"} = {}) {
- if (this._states.remove(this.options.id)) {
- if (this.rejectOnDrop) {
- this._reject(error != null ? error : new BottleneckError$1(message));
- }
- this.Events.trigger("dropped", {args: this.args, options: this.options, task: this.task, promise: this.promise});
- return true;
- } else {
- return false;
- }
- }
-
- _assertStatus(expected) {
- var status;
- status = this._states.jobStatus(this.options.id);
- if (!(status === expected || (expected === "DONE" && status === null))) {
- throw new BottleneckError$1(`Invalid job status ${status}, expected ${expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`);
- }
- }
-
- doReceive() {
- this._states.start(this.options.id);
- return this.Events.trigger("received", {args: this.args, options: this.options});
- }
-
- doQueue(reachedHWM, blocked) {
- this._assertStatus("RECEIVED");
- this._states.next(this.options.id);
- return this.Events.trigger("queued", {args: this.args, options: this.options, reachedHWM, blocked});
- }
-
- doRun() {
- if (this.retryCount === 0) {
- this._assertStatus("QUEUED");
- this._states.next(this.options.id);
- } else {
- this._assertStatus("EXECUTING");
- }
- return this.Events.trigger("scheduled", {args: this.args, options: this.options});
- }
-
- async doExecute(chained, clearGlobalState, run, free) {
- var error, eventInfo, passed;
- if (this.retryCount === 0) {
- this._assertStatus("RUNNING");
- this._states.next(this.options.id);
- } else {
- this._assertStatus("EXECUTING");
- }
- eventInfo = {args: this.args, options: this.options, retryCount: this.retryCount};
- this.Events.trigger("executing", eventInfo);
- try {
- passed = (await (chained != null ? chained.schedule(this.options, this.task, ...this.args) : this.task(...this.args)));
- if (clearGlobalState()) {
- this.doDone(eventInfo);
- await free(this.options, eventInfo);
- this._assertStatus("DONE");
- return this._resolve(passed);
- }
- } catch (error1) {
- error = error1;
- return this._onFailure(error, eventInfo, clearGlobalState, run, free);
- }
- }
-
- doExpire(clearGlobalState, run, free) {
- var error, eventInfo;
- if (this._states.jobStatus(this.options.id === "RUNNING")) {
- this._states.next(this.options.id);
- }
- this._assertStatus("EXECUTING");
- eventInfo = {args: this.args, options: this.options, retryCount: this.retryCount};
- error = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`);
- return this._onFailure(error, eventInfo, clearGlobalState, run, free);
- }
-
- async _onFailure(error, eventInfo, clearGlobalState, run, free) {
- var retry, retryAfter;
- if (clearGlobalState()) {
- retry = (await this.Events.trigger("failed", error, eventInfo));
- if (retry != null) {
- retryAfter = ~~retry;
- this.Events.trigger("retry", `Retrying ${this.options.id} after ${retryAfter} ms`, eventInfo);
- this.retryCount++;
- return run(retryAfter);
- } else {
- this.doDone(eventInfo);
- await free(this.options, eventInfo);
- this._assertStatus("DONE");
- return this._reject(error);
- }
- }
- }
-
- doDone(eventInfo) {
- this._assertStatus("EXECUTING");
- this._states.next(this.options.id);
- return this.Events.trigger("done", eventInfo);
- }
-
- };
-
- var Job_1 = Job;
-
- var BottleneckError$2, LocalDatastore, parser$2;
-
- parser$2 = parser;
-
- BottleneckError$2 = BottleneckError_1;
-
- LocalDatastore = class LocalDatastore {
- constructor(instance, storeOptions, storeInstanceOptions) {
- this.instance = instance;
- this.storeOptions = storeOptions;
- this.clientId = this.instance._randomIndex();
- parser$2.load(storeInstanceOptions, storeInstanceOptions, this);
- this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now();
- this._running = 0;
- this._done = 0;
- this._unblockTime = 0;
- this.ready = this.Promise.resolve();
- this.clients = {};
- this._startHeartbeat();
- }
-
- _startHeartbeat() {
- var base;
- if ((this.heartbeat == null) && (((this.storeOptions.reservoirRefreshInterval != null) && (this.storeOptions.reservoirRefreshAmount != null)) || ((this.storeOptions.reservoirIncreaseInterval != null) && (this.storeOptions.reservoirIncreaseAmount != null)))) {
- return typeof (base = (this.heartbeat = setInterval(() => {
- var amount, incr, maximum, now, reservoir;
- now = Date.now();
- if ((this.storeOptions.reservoirRefreshInterval != null) && now >= this._lastReservoirRefresh + this.storeOptions.reservoirRefreshInterval) {
- this._lastReservoirRefresh = now;
- this.storeOptions.reservoir = this.storeOptions.reservoirRefreshAmount;
- this.instance._drainAll(this.computeCapacity());
- }
- if ((this.storeOptions.reservoirIncreaseInterval != null) && now >= this._lastReservoirIncrease + this.storeOptions.reservoirIncreaseInterval) {
- ({
- reservoirIncreaseAmount: amount,
- reservoirIncreaseMaximum: maximum,
- reservoir
- } = this.storeOptions);
- this._lastReservoirIncrease = now;
- incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount;
- if (incr > 0) {
- this.storeOptions.reservoir += incr;
- return this.instance._drainAll(this.computeCapacity());
- }
- }
- }, this.heartbeatInterval))).unref === "function" ? base.unref() : void 0;
- } else {
- return clearInterval(this.heartbeat);
- }
- }
-
- async __publish__(message) {
- await this.yieldLoop();
- return this.instance.Events.trigger("message", message.toString());
- }
-
- async __disconnect__(flush) {
- await this.yieldLoop();
- clearInterval(this.heartbeat);
- return this.Promise.resolve();
- }
-
- yieldLoop(t = 0) {
- return new this.Promise(function(resolve, reject) {
- return setTimeout(resolve, t);
- });
- }
-
- computePenalty() {
- var ref;
- return (ref = this.storeOptions.penalty) != null ? ref : (15 * this.storeOptions.minTime) || 5000;
- }
-
- async __updateSettings__(options) {
- await this.yieldLoop();
- parser$2.overwrite(options, options, this.storeOptions);
- this._startHeartbeat();
- this.instance._drainAll(this.computeCapacity());
- return true;
- }
-
- async __running__() {
- await this.yieldLoop();
- return this._running;
- }
-
- async __queued__() {
- await this.yieldLoop();
- return this.instance.queued();
- }
-
- async __done__() {
- await this.yieldLoop();
- return this._done;
- }
-
- async __groupCheck__(time) {
- await this.yieldLoop();
- return (this._nextRequest + this.timeout) < time;
- }
-
- computeCapacity() {
- var maxConcurrent, reservoir;
- ({maxConcurrent, reservoir} = this.storeOptions);
- if ((maxConcurrent != null) && (reservoir != null)) {
- return Math.min(maxConcurrent - this._running, reservoir);
- } else if (maxConcurrent != null) {
- return maxConcurrent - this._running;
- } else if (reservoir != null) {
- return reservoir;
- } else {
- return null;
- }
- }
-
- conditionsCheck(weight) {
- var capacity;
- capacity = this.computeCapacity();
- return (capacity == null) || weight <= capacity;
- }
-
- async __incrementReservoir__(incr) {
- var reservoir;
- await this.yieldLoop();
- reservoir = this.storeOptions.reservoir += incr;
- this.instance._drainAll(this.computeCapacity());
- return reservoir;
- }
-
- async __currentReservoir__() {
- await this.yieldLoop();
- return this.storeOptions.reservoir;
- }
-
- isBlocked(now) {
- return this._unblockTime >= now;
- }
-
- check(weight, now) {
- return this.conditionsCheck(weight) && (this._nextRequest - now) <= 0;
- }
-
- async __check__(weight) {
- var now;
- await this.yieldLoop();
- now = Date.now();
- return this.check(weight, now);
- }
-
- async __register__(index, weight, expiration) {
- var now, wait;
- await this.yieldLoop();
- now = Date.now();
- if (this.conditionsCheck(weight)) {
- this._running += weight;
- if (this.storeOptions.reservoir != null) {
- this.storeOptions.reservoir -= weight;
- }
- wait = Math.max(this._nextRequest - now, 0);
- this._nextRequest = now + wait + this.storeOptions.minTime;
- return {
- success: true,
- wait,
- reservoir: this.storeOptions.reservoir
- };
- } else {
- return {
- success: false
- };
- }
- }
-
- strategyIsBlock() {
- return this.storeOptions.strategy === 3;
- }
-
- async __submit__(queueLength, weight) {
- var blocked, now, reachedHWM;
- await this.yieldLoop();
- if ((this.storeOptions.maxConcurrent != null) && weight > this.storeOptions.maxConcurrent) {
- throw new BottleneckError$2(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${this.storeOptions.maxConcurrent}`);
- }
- now = Date.now();
- reachedHWM = (this.storeOptions.highWater != null) && queueLength === this.storeOptions.highWater && !this.check(weight, now);
- blocked = this.strategyIsBlock() && (reachedHWM || this.isBlocked(now));
- if (blocked) {
- this._unblockTime = now + this.computePenalty();
- this._nextRequest = this._unblockTime + this.storeOptions.minTime;
- this.instance._dropAllQueued();
- }
- return {
- reachedHWM,
- blocked,
- strategy: this.storeOptions.strategy
- };
- }
-
- async __free__(index, weight) {
- await this.yieldLoop();
- this._running -= weight;
- this._done += weight;
- this.instance._drainAll(this.computeCapacity());
- return {
- running: this._running
- };
- }
-
- };
-
- var LocalDatastore_1 = LocalDatastore;
-
- var BottleneckError$3, States;
-
- BottleneckError$3 = BottleneckError_1;
-
- States = class States {
- constructor(status1) {
- this.status = status1;
- this._jobs = {};
- this.counts = this.status.map(function() {
- return 0;
- });
- }
-
- next(id) {
- var current, next;
- current = this._jobs[id];
- next = current + 1;
- if ((current != null) && next < this.status.length) {
- this.counts[current]--;
- this.counts[next]++;
- return this._jobs[id]++;
- } else if (current != null) {
- this.counts[current]--;
- return delete this._jobs[id];
- }
- }
-
- start(id) {
- var initial;
- initial = 0;
- this._jobs[id] = initial;
- return this.counts[initial]++;
- }
-
- remove(id) {
- var current;
- current = this._jobs[id];
- if (current != null) {
- this.counts[current]--;
- delete this._jobs[id];
- }
- return current != null;
- }
-
- jobStatus(id) {
- var ref;
- return (ref = this.status[this._jobs[id]]) != null ? ref : null;
- }
-
- statusJobs(status) {
- var k, pos, ref, results, v;
- if (status != null) {
- pos = this.status.indexOf(status);
- if (pos < 0) {
- throw new BottleneckError$3(`status must be one of ${this.status.join(', ')}`);
- }
- ref = this._jobs;
- results = [];
- for (k in ref) {
- v = ref[k];
- if (v === pos) {
- results.push(k);
- }
- }
- return results;
- } else {
- return Object.keys(this._jobs);
- }
- }
-
- statusCounts() {
- return this.counts.reduce(((acc, v, i) => {
- acc[this.status[i]] = v;
- return acc;
- }), {});
- }
-
- };
-
- var States_1 = States;
-
- var DLList$2, Sync;
-
- DLList$2 = DLList_1;
-
- Sync = class Sync {
- constructor(name, Promise) {
- this.schedule = this.schedule.bind(this);
- this.name = name;
- this.Promise = Promise;
- this._running = 0;
- this._queue = new DLList$2();
- }
-
- isEmpty() {
- return this._queue.length === 0;
- }
-
- async _tryToRun() {
- var args, cb, error, reject, resolve, returned, task;
- if ((this._running < 1) && this._queue.length > 0) {
- this._running++;
- ({task, args, resolve, reject} = this._queue.shift());
- cb = (await (async function() {
- try {
- returned = (await task(...args));
- return function() {
- return resolve(returned);
- };
- } catch (error1) {
- error = error1;
- return function() {
- return reject(error);
- };
- }
- })());
- this._running--;
- this._tryToRun();
- return cb();
- }
- }
-
- schedule(task, ...args) {
- var promise, reject, resolve;
- resolve = reject = null;
- promise = new this.Promise(function(_resolve, _reject) {
- resolve = _resolve;
- return reject = _reject;
- });
- this._queue.push({task, args, resolve, reject});
- this._tryToRun();
- return promise;
- }
-
- };
-
- var Sync_1 = Sync;
-
- var version = "2.19.5";
- var version$1 = {
- version: version
- };
-
- var version$2 = /*#__PURE__*/Object.freeze({
- version: version,
- default: version$1
- });
-
- var require$$2 = () => console.log('You must import the full version of Bottleneck in order to use this feature.');
-
- var require$$3 = () => console.log('You must import the full version of Bottleneck in order to use this feature.');
-
- var require$$4 = () => console.log('You must import the full version of Bottleneck in order to use this feature.');
-
- var Events$2, Group, IORedisConnection$1, RedisConnection$1, Scripts$1, parser$3;
-
- parser$3 = parser;
-
- Events$2 = Events_1;
-
- RedisConnection$1 = require$$2;
-
- IORedisConnection$1 = require$$3;
-
- Scripts$1 = require$$4;
-
- Group = (function() {
- class Group {
- constructor(limiterOptions = {}) {
- this.deleteKey = this.deleteKey.bind(this);
- this.limiterOptions = limiterOptions;
- parser$3.load(this.limiterOptions, this.defaults, this);
- this.Events = new Events$2(this);
- this.instances = {};
- this.Bottleneck = Bottleneck_1;
- this._startAutoCleanup();
- this.sharedConnection = this.connection != null;
- if (this.connection == null) {
- if (this.limiterOptions.datastore === "redis") {
- this.connection = new RedisConnection$1(Object.assign({}, this.limiterOptions, {Events: this.Events}));
- } else if (this.limiterOptions.datastore === "ioredis") {
- this.connection = new IORedisConnection$1(Object.assign({}, this.limiterOptions, {Events: this.Events}));
- }
- }
- }
-
- key(key = "") {
- var ref;
- return (ref = this.instances[key]) != null ? ref : (() => {
- var limiter;
- limiter = this.instances[key] = new this.Bottleneck(Object.assign(this.limiterOptions, {
- id: `${this.id}-${key}`,
- timeout: this.timeout,
- connection: this.connection
- }));
- this.Events.trigger("created", limiter, key);
- return limiter;
- })();
- }
-
- async deleteKey(key = "") {
- var deleted, instance;
- instance = this.instances[key];
- if (this.connection) {
- deleted = (await this.connection.__runCommand__(['del', ...Scripts$1.allKeys(`${this.id}-${key}`)]));
- }
- if (instance != null) {
- delete this.instances[key];
- await instance.disconnect();
- }
- return (instance != null) || deleted > 0;
- }
-
- limiters() {
- var k, ref, results, v;
- ref = this.instances;
- results = [];
- for (k in ref) {
- v = ref[k];
- results.push({
- key: k,
- limiter: v
- });
- }
- return results;
- }
-
- keys() {
- return Object.keys(this.instances);
- }
-
- async clusterKeys() {
- var cursor, end, found, i, k, keys, len, next, start;
- if (this.connection == null) {
- return this.Promise.resolve(this.keys());
- }
- keys = [];
- cursor = null;
- start = `b_${this.id}-`.length;
- end = "_settings".length;
- while (cursor !== 0) {
- [next, found] = (await this.connection.__runCommand__(["scan", cursor != null ? cursor : 0, "match", `b_${this.id}-*_settings`, "count", 10000]));
- cursor = ~~next;
- for (i = 0, len = found.length; i < len; i++) {
- k = found[i];
- keys.push(k.slice(start, -end));
- }
- }
- return keys;
- }
-
- _startAutoCleanup() {
- var base;
- clearInterval(this.interval);
- return typeof (base = (this.interval = setInterval(async() => {
- var e, k, ref, results, time, v;
- time = Date.now();
- ref = this.instances;
- results = [];
- for (k in ref) {
- v = ref[k];
- try {
- if ((await v._store.__groupCheck__(time))) {
- results.push(this.deleteKey(k));
- } else {
- results.push(void 0);
- }
- } catch (error) {
- e = error;
- results.push(v.Events.trigger("error", e));
- }
- }
- return results;
- }, this.timeout / 2))).unref === "function" ? base.unref() : void 0;
- }
-
- updateSettings(options = {}) {
- parser$3.overwrite(options, this.defaults, this);
- parser$3.overwrite(options, options, this.limiterOptions);
- if (options.timeout != null) {
- return this._startAutoCleanup();
- }
- }
-
- disconnect(flush = true) {
- var ref;
- if (!this.sharedConnection) {
- return (ref = this.connection) != null ? ref.disconnect(flush) : void 0;
- }
- }
-
- }
- Group.prototype.defaults = {
- timeout: 1000 * 60 * 5,
- connection: null,
- Promise: Promise,
- id: "group-key"
- };
-
- return Group;
-
- }).call(commonjsGlobal);
-
- var Group_1 = Group;
-
- var Batcher, Events$3, parser$4;
-
- parser$4 = parser;
-
- Events$3 = Events_1;
-
- Batcher = (function() {
- class Batcher {
- constructor(options = {}) {
- this.options = options;
- parser$4.load(this.options, this.defaults, this);
- this.Events = new Events$3(this);
- this._arr = [];
- this._resetPromise();
- this._lastFlush = Date.now();
- }
-
- _resetPromise() {
- return this._promise = new this.Promise((res, rej) => {
- return this._resolve = res;
- });
- }
-
- _flush() {
- clearTimeout(this._timeout);
- this._lastFlush = Date.now();
- this._resolve();
- this.Events.trigger("batch", this._arr);
- this._arr = [];
- return this._resetPromise();
- }
-
- add(data) {
- var ret;
- this._arr.push(data);
- ret = this._promise;
- if (this._arr.length === this.maxSize) {
- this._flush();
- } else if ((this.maxTime != null) && this._arr.length === 1) {
- this._timeout = setTimeout(() => {
- return this._flush();
- }, this.maxTime);
- }
- return ret;
- }
-
- }
- Batcher.prototype.defaults = {
- maxTime: null,
- maxSize: null,
- Promise: Promise
- };
-
- return Batcher;
-
- }).call(commonjsGlobal);
-
- var Batcher_1 = Batcher;
-
- var require$$4$1 = () => console.log('You must import the full version of Bottleneck in order to use this feature.');
-
- var require$$8 = getCjsExportFromNamespace(version$2);
-
- var Bottleneck, DEFAULT_PRIORITY$1, Events$4, Job$1, LocalDatastore$1, NUM_PRIORITIES$1, Queues$1, RedisDatastore$1, States$1, Sync$1, parser$5,
- splice = [].splice;
-
- NUM_PRIORITIES$1 = 10;
-
- DEFAULT_PRIORITY$1 = 5;
-
- parser$5 = parser;
-
- Queues$1 = Queues_1;
-
- Job$1 = Job_1;
-
- LocalDatastore$1 = LocalDatastore_1;
-
- RedisDatastore$1 = require$$4$1;
-
- Events$4 = Events_1;
-
- States$1 = States_1;
-
- Sync$1 = Sync_1;
-
- Bottleneck = (function() {
- class Bottleneck {
- constructor(options = {}, ...invalid) {
- var storeInstanceOptions, storeOptions;
- this._addToQueue = this._addToQueue.bind(this);
- this._validateOptions(options, invalid);
- parser$5.load(options, this.instanceDefaults, this);
- this._queues = new Queues$1(NUM_PRIORITIES$1);
- this._scheduled = {};
- this._states = new States$1(["RECEIVED", "QUEUED", "RUNNING", "EXECUTING"].concat(this.trackDoneStatus ? ["DONE"] : []));
- this._limiter = null;
- this.Events = new Events$4(this);
- this._submitLock = new Sync$1("submit", this.Promise);
- this._registerLock = new Sync$1("register", this.Promise);
- storeOptions = parser$5.load(options, this.storeDefaults, {});
- this._store = (function() {
- if (this.datastore === "redis" || this.datastore === "ioredis" || (this.connection != null)) {
- storeInstanceOptions = parser$5.load(options, this.redisStoreDefaults, {});
- return new RedisDatastore$1(this, storeOptions, storeInstanceOptions);
- } else if (this.datastore === "local") {
- storeInstanceOptions = parser$5.load(options, this.localStoreDefaults, {});
- return new LocalDatastore$1(this, storeOptions, storeInstanceOptions);
- } else {
- throw new Bottleneck.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`);
- }
- }).call(this);
- this._queues.on("leftzero", () => {
- var ref;
- return (ref = this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0;
- });
- this._queues.on("zero", () => {
- var ref;
- return (ref = this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0;
- });
- }
-
- _validateOptions(options, invalid) {
- if (!((options != null) && typeof options === "object" && invalid.length === 0)) {
- throw new Bottleneck.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1.");
- }
- }
-
- ready() {
- return this._store.ready;
- }
-
- clients() {
- return this._store.clients;
- }
-
- channel() {
- return `b_${this.id}`;
- }
-
- channel_client() {
- return `b_${this.id}_${this._store.clientId}`;
- }
-
- publish(message) {
- return this._store.__publish__(message);
- }
-
- disconnect(flush = true) {
- return this._store.__disconnect__(flush);
- }
-
- chain(_limiter) {
- this._limiter = _limiter;
- return this;
- }
-
- queued(priority) {
- return this._queues.queued(priority);
- }
-
- clusterQueued() {
- return this._store.__queued__();
- }
-
- empty() {
- return this.queued() === 0 && this._submitLock.isEmpty();
- }
-
- running() {
- return this._store.__running__();
- }
-
- done() {
- return this._store.__done__();
- }
-
- jobStatus(id) {
- return this._states.jobStatus(id);
- }
-
- jobs(status) {
- return this._states.statusJobs(status);
- }
-
- counts() {
- return this._states.statusCounts();
- }
-
- _randomIndex() {
- return Math.random().toString(36).slice(2);
- }
-
- check(weight = 1) {
- return this._store.__check__(weight);
- }
-
- _clearGlobalState(index) {
- if (this._scheduled[index] != null) {
- clearTimeout(this._scheduled[index].expiration);
- delete this._scheduled[index];
- return true;
- } else {
- return false;
- }
- }
-
- async _free(index, job, options, eventInfo) {
- var e, running;
- try {
- ({running} = (await this._store.__free__(index, options.weight)));
- this.Events.trigger("debug", `Freed ${options.id}`, eventInfo);
- if (running === 0 && this.empty()) {
- return this.Events.trigger("idle");
- }
- } catch (error1) {
- e = error1;
- return this.Events.trigger("error", e);
- }
- }
-
- _run(index, job, wait) {
- var clearGlobalState, free, run;
- job.doRun();
- clearGlobalState = this._clearGlobalState.bind(this, index);
- run = this._run.bind(this, index, job);
- free = this._free.bind(this, index, job);
- return this._scheduled[index] = {
- timeout: setTimeout(() => {
- return job.doExecute(this._limiter, clearGlobalState, run, free);
- }, wait),
- expiration: job.options.expiration != null ? setTimeout(function() {
- return job.doExpire(clearGlobalState, run, free);
- }, wait + job.options.expiration) : void 0,
- job: job
- };
- }
-
- _drainOne(capacity) {
- return this._registerLock.schedule(() => {
- var args, index, next, options, queue;
- if (this.queued() === 0) {
- return this.Promise.resolve(null);
- }
- queue = this._queues.getFirst();
- ({options, args} = next = queue.first());
- if ((capacity != null) && options.weight > capacity) {
- return this.Promise.resolve(null);
- }
- this.Events.trigger("debug", `Draining ${options.id}`, {args, options});
- index = this._randomIndex();
- return this._store.__register__(index, options.weight, options.expiration).then(({success, wait, reservoir}) => {
- var empty;
- this.Events.trigger("debug", `Drained ${options.id}`, {success, args, options});
- if (success) {
- queue.shift();
- empty = this.empty();
- if (empty) {
- this.Events.trigger("empty");
- }
- if (reservoir === 0) {
- this.Events.trigger("depleted", empty);
- }
- this._run(index, next, wait);
- return this.Promise.resolve(options.weight);
- } else {
- return this.Promise.resolve(null);
- }
- });
- });
- }
-
- _drainAll(capacity, total = 0) {
- return this._drainOne(capacity).then((drained) => {
- var newCapacity;
- if (drained != null) {
- newCapacity = capacity != null ? capacity - drained : capacity;
- return this._drainAll(newCapacity, total + drained);
- } else {
- return this.Promise.resolve(total);
- }
- }).catch((e) => {
- return this.Events.trigger("error", e);
- });
- }
-
- _dropAllQueued(message) {
- return this._queues.shiftAll(function(job) {
- return job.doDrop({message});
- });
- }
-
- stop(options = {}) {
- var done, waitForExecuting;
- options = parser$5.load(options, this.stopDefaults);
- waitForExecuting = (at) => {
- var finished;
- finished = () => {
- var counts;
- counts = this._states.counts;
- return (counts[0] + counts[1] + counts[2] + counts[3]) === at;
- };
- return new this.Promise((resolve, reject) => {
- if (finished()) {
- return resolve();
- } else {
- return this.on("done", () => {
- if (finished()) {
- this.removeAllListeners("done");
- return resolve();
- }
- });
- }
- });
- };
- done = options.dropWaitingJobs ? (this._run = function(index, next) {
- return next.doDrop({
- message: options.dropErrorMessage
- });
- }, this._drainOne = () => {
- return this.Promise.resolve(null);
- }, this._registerLock.schedule(() => {
- return this._submitLock.schedule(() => {
- var k, ref, v;
- ref = this._scheduled;
- for (k in ref) {
- v = ref[k];
- if (this.jobStatus(v.job.options.id) === "RUNNING") {
- clearTimeout(v.timeout);
- clearTimeout(v.expiration);
- v.job.doDrop({
- message: options.dropErrorMessage
- });
- }
- }
- this._dropAllQueued(options.dropErrorMessage);
- return waitForExecuting(0);
- });
- })) : this.schedule({
- priority: NUM_PRIORITIES$1 - 1,
- weight: 0
- }, () => {
- return waitForExecuting(1);
- });
- this._receive = function(job) {
- return job._reject(new Bottleneck.prototype.BottleneckError(options.enqueueErrorMessage));
- };
- this.stop = () => {
- return this.Promise.reject(new Bottleneck.prototype.BottleneckError("stop() has already been called"));
- };
- return done;
- }
-
- async _addToQueue(job) {
- var args, blocked, error, options, reachedHWM, shifted, strategy;
- ({args, options} = job);
- try {
- ({reachedHWM, blocked, strategy} = (await this._store.__submit__(this.queued(), options.weight)));
- } catch (error1) {
- error = error1;
- this.Events.trigger("debug", `Could not queue ${options.id}`, {args, options, error});
- job.doDrop({error});
- return false;
- }
- if (blocked) {
- job.doDrop();
- return true;
- } else if (reachedHWM) {
- shifted = strategy === Bottleneck.prototype.strategy.LEAK ? this._queues.shiftLastFrom(options.priority) : strategy === Bottleneck.prototype.strategy.OVERFLOW_PRIORITY ? this._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck.prototype.strategy.OVERFLOW ? job : void 0;
- if (shifted != null) {
- shifted.doDrop();
- }
- if ((shifted == null) || strategy === Bottleneck.prototype.strategy.OVERFLOW) {
- if (shifted == null) {
- job.doDrop();
- }
- return reachedHWM;
- }
- }
- job.doQueue(reachedHWM, blocked);
- this._queues.push(job);
- await this._drainAll();
- return reachedHWM;
- }
-
- _receive(job) {
- if (this._states.jobStatus(job.options.id) != null) {
- job._reject(new Bottleneck.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`));
- return false;
- } else {
- job.doReceive();
- return this._submitLock.schedule(this._addToQueue, job);
- }
- }
-
- submit(...args) {
- var cb, fn, job, options, ref, ref1, task;
- if (typeof args[0] === "function") {
- ref = args, [fn, ...args] = ref, [cb] = splice.call(args, -1);
- options = parser$5.load({}, this.jobDefaults);
- } else {
- ref1 = args, [options, fn, ...args] = ref1, [cb] = splice.call(args, -1);
- options = parser$5.load(options, this.jobDefaults);
- }
- task = (...args) => {
- return new this.Promise(function(resolve, reject) {
- return fn(...args, function(...args) {
- return (args[0] != null ? reject : resolve)(args);
- });
- });
- };
- job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise);
- job.promise.then(function(args) {
- return typeof cb === "function" ? cb(...args) : void 0;
- }).catch(function(args) {
- if (Array.isArray(args)) {
- return typeof cb === "function" ? cb(...args) : void 0;
- } else {
- return typeof cb === "function" ? cb(args) : void 0;
- }
- });
- return this._receive(job);
- }
-
- schedule(...args) {
- var job, options, task;
- if (typeof args[0] === "function") {
- [task, ...args] = args;
- options = {};
- } else {
- [options, task, ...args] = args;
- }
- job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise);
- this._receive(job);
- return job.promise;
- }
-
- wrap(fn) {
- var schedule, wrapped;
- schedule = this.schedule.bind(this);
- wrapped = function(...args) {
- return schedule(fn.bind(this), ...args);
- };
- wrapped.withOptions = function(options, ...args) {
- return schedule(options, fn, ...args);
- };
- return wrapped;
- }
-
- async updateSettings(options = {}) {
- await this._store.__updateSettings__(parser$5.overwrite(options, this.storeDefaults));
- parser$5.overwrite(options, this.instanceDefaults, this);
- return this;
- }
-
- currentReservoir() {
- return this._store.__currentReservoir__();
- }
-
- incrementReservoir(incr = 0) {
- return this._store.__incrementReservoir__(incr);
- }
-
- }
- Bottleneck.default = Bottleneck;
-
- Bottleneck.Events = Events$4;
-
- Bottleneck.version = Bottleneck.prototype.version = require$$8.version;
-
- Bottleneck.strategy = Bottleneck.prototype.strategy = {
- LEAK: 1,
- OVERFLOW: 2,
- OVERFLOW_PRIORITY: 4,
- BLOCK: 3
- };
-
- Bottleneck.BottleneckError = Bottleneck.prototype.BottleneckError = BottleneckError_1;
-
- Bottleneck.Group = Bottleneck.prototype.Group = Group_1;
-
- Bottleneck.RedisConnection = Bottleneck.prototype.RedisConnection = require$$2;
-
- Bottleneck.IORedisConnection = Bottleneck.prototype.IORedisConnection = require$$3;
-
- Bottleneck.Batcher = Bottleneck.prototype.Batcher = Batcher_1;
-
- Bottleneck.prototype.jobDefaults = {
- priority: DEFAULT_PRIORITY$1,
- weight: 1,
- expiration: null,
- id: ""
- };
-
- Bottleneck.prototype.storeDefaults = {
- maxConcurrent: null,
- minTime: 0,
- highWater: null,
- strategy: Bottleneck.prototype.strategy.LEAK,
- penalty: null,
- reservoir: null,
- reservoirRefreshInterval: null,
- reservoirRefreshAmount: null,
- reservoirIncreaseInterval: null,
- reservoirIncreaseAmount: null,
- reservoirIncreaseMaximum: null
- };
-
- Bottleneck.prototype.localStoreDefaults = {
- Promise: Promise,
- timeout: null,
- heartbeatInterval: 250
- };
-
- Bottleneck.prototype.redisStoreDefaults = {
- Promise: Promise,
- timeout: null,
- heartbeatInterval: 5000,
- clientTimeout: 10000,
- Redis: null,
- clientOptions: {},
- clusterNodes: null,
- clearDatastore: false,
- connection: null
- };
-
- Bottleneck.prototype.instanceDefaults = {
- datastore: "local",
- connection: null,
- id: "",
- rejectOnDrop: true,
- trackDoneStatus: false,
- Promise: Promise
- };
-
- Bottleneck.prototype.stopDefaults = {
- enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.",
- dropWaitingJobs: true,
- dropErrorMessage: "This limiter has been stopped."
- };
-
- return Bottleneck;
-
- }).call(commonjsGlobal);
-
- var Bottleneck_1 = Bottleneck;
-
- var lib = Bottleneck_1;
-
- return lib;
-
-})));
-
-
-/***/ }),
-
-/***/ 33717:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-var balanced = __nccwpck_require__(9417);
-
-module.exports = expandTop;
-
-var escSlash = '\0SLASH'+Math.random()+'\0';
-var escOpen = '\0OPEN'+Math.random()+'\0';
-var escClose = '\0CLOSE'+Math.random()+'\0';
-var escComma = '\0COMMA'+Math.random()+'\0';
-var escPeriod = '\0PERIOD'+Math.random()+'\0';
-
-function numeric(str) {
- return parseInt(str, 10) == str
- ? parseInt(str, 10)
- : str.charCodeAt(0);
-}
-
-function escapeBraces(str) {
- return str.split('\\\\').join(escSlash)
- .split('\\{').join(escOpen)
- .split('\\}').join(escClose)
- .split('\\,').join(escComma)
- .split('\\.').join(escPeriod);
-}
-
-function unescapeBraces(str) {
- return str.split(escSlash).join('\\')
- .split(escOpen).join('{')
- .split(escClose).join('}')
- .split(escComma).join(',')
- .split(escPeriod).join('.');
-}
-
-
-// Basically just str.split(","), but handling cases
-// where we have nested braced sections, which should be
-// treated as individual members, like {a,{b,c},d}
-function parseCommaParts(str) {
- if (!str)
- return [''];
-
- var parts = [];
- var m = balanced('{', '}', str);
-
- if (!m)
- return str.split(',');
-
- var pre = m.pre;
- var body = m.body;
- var post = m.post;
- var p = pre.split(',');
-
- p[p.length-1] += '{' + body + '}';
- var postParts = parseCommaParts(post);
- if (post.length) {
- p[p.length-1] += postParts.shift();
- p.push.apply(p, postParts);
- }
-
- parts.push.apply(parts, p);
-
- return parts;
-}
-
-function expandTop(str) {
- if (!str)
- return [];
-
- // I don't know why Bash 4.3 does this, but it does.
- // Anything starting with {} will have the first two bytes preserved
- // but *only* at the top level, so {},a}b will not expand to anything,
- // but a{},b}c will be expanded to [a}c,abc].
- // One could argue that this is a bug in Bash, but since the goal of
- // this module is to match Bash's rules, we escape a leading {}
- if (str.substr(0, 2) === '{}') {
- str = '\\{\\}' + str.substr(2);
- }
-
- return expand(escapeBraces(str), true).map(unescapeBraces);
-}
-
-function embrace(str) {
- return '{' + str + '}';
-}
-function isPadded(el) {
- return /^-?0\d/.test(el);
-}
-
-function lte(i, y) {
- return i <= y;
-}
-function gte(i, y) {
- return i >= y;
-}
-
-function expand(str, isTop) {
- var expansions = [];
-
- var m = balanced('{', '}', str);
- if (!m) return [str];
-
- // no need to expand pre, since it is guaranteed to be free of brace-sets
- var pre = m.pre;
- var post = m.post.length
- ? expand(m.post, false)
- : [''];
-
- if (/\$$/.test(m.pre)) {
- for (var k = 0; k < post.length; k++) {
- var expansion = pre+ '{' + m.body + '}' + post[k];
- expansions.push(expansion);
- }
- } else {
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
- var isSequence = isNumericSequence || isAlphaSequence;
- var isOptions = m.body.indexOf(',') >= 0;
- if (!isSequence && !isOptions) {
- // {a},b}
- if (m.post.match(/,(?!,).*\}/)) {
- str = m.pre + '{' + m.body + escClose + m.post;
- return expand(str);
- }
- return [str];
- }
-
- var n;
- if (isSequence) {
- n = m.body.split(/\.\./);
- } else {
- n = parseCommaParts(m.body);
- if (n.length === 1) {
- // x{{a,b}}y ==> x{a}y x{b}y
- n = expand(n[0], false).map(embrace);
- if (n.length === 1) {
- return post.map(function(p) {
- return m.pre + n[0] + p;
- });
- }
- }
- }
-
- // at this point, n is the parts, and we know it's not a comma set
- // with a single entry.
- var N;
-
- if (isSequence) {
- var x = numeric(n[0]);
- var y = numeric(n[1]);
- var width = Math.max(n[0].length, n[1].length)
- var incr = n.length == 3
- ? Math.abs(numeric(n[2]))
- : 1;
- var test = lte;
- var reverse = y < x;
- if (reverse) {
- incr *= -1;
- test = gte;
- }
- var pad = n.some(isPadded);
-
- N = [];
-
- for (var i = x; test(i, y); i += incr) {
- var c;
- if (isAlphaSequence) {
- c = String.fromCharCode(i);
- if (c === '\\')
- c = '';
- } else {
- c = String(i);
- if (pad) {
- var need = width - c.length;
- if (need > 0) {
- var z = new Array(need + 1).join('0');
- if (i < 0)
- c = '-' + z + c.slice(1);
- else
- c = z + c;
- }
- }
- }
- N.push(c);
- }
- } else {
- N = [];
-
- for (var j = 0; j < n.length; j++) {
- N.push.apply(N, expand(n[j], false));
- }
- }
-
- for (var j = 0; j < N.length; j++) {
- for (var k = 0; k < post.length; k++) {
- var expansion = pre + N[j] + post[k];
- if (!isTop || isSequence || expansion)
- expansions.push(expansion);
- }
- }
- }
-
- return expansions;
-}
-
-
-
-/***/ }),
-
-/***/ 51590:
-/***/ ((module) => {
-
-module.exports = Buffers;
-
-function Buffers (bufs) {
- if (!(this instanceof Buffers)) return new Buffers(bufs);
- this.buffers = bufs || [];
- this.length = this.buffers.reduce(function (size, buf) {
- return size + buf.length
- }, 0);
-}
-
-Buffers.prototype.push = function () {
- for (var i = 0; i < arguments.length; i++) {
- if (!Buffer.isBuffer(arguments[i])) {
- throw new TypeError('Tried to push a non-buffer');
- }
- }
-
- for (var i = 0; i < arguments.length; i++) {
- var buf = arguments[i];
- this.buffers.push(buf);
- this.length += buf.length;
- }
- return this.length;
-};
-
-Buffers.prototype.unshift = function () {
- for (var i = 0; i < arguments.length; i++) {
- if (!Buffer.isBuffer(arguments[i])) {
- throw new TypeError('Tried to unshift a non-buffer');
- }
- }
-
- for (var i = 0; i < arguments.length; i++) {
- var buf = arguments[i];
- this.buffers.unshift(buf);
- this.length += buf.length;
- }
- return this.length;
-};
-
-Buffers.prototype.copy = function (dst, dStart, start, end) {
- return this.slice(start, end).copy(dst, dStart, 0, end - start);
-};
-
-Buffers.prototype.splice = function (i, howMany) {
- var buffers = this.buffers;
- var index = i >= 0 ? i : this.length - i;
- var reps = [].slice.call(arguments, 2);
-
- if (howMany === undefined) {
- howMany = this.length - index;
- }
- else if (howMany > this.length - index) {
- howMany = this.length - index;
- }
-
- for (var i = 0; i < reps.length; i++) {
- this.length += reps[i].length;
- }
-
- var removed = new Buffers();
- var bytes = 0;
-
- var startBytes = 0;
- for (
- var ii = 0;
- ii < buffers.length && startBytes + buffers[ii].length < index;
- ii ++
- ) { startBytes += buffers[ii].length }
-
- if (index - startBytes > 0) {
- var start = index - startBytes;
-
- if (start + howMany < buffers[ii].length) {
- removed.push(buffers[ii].slice(start, start + howMany));
-
- var orig = buffers[ii];
- //var buf = new Buffer(orig.length - howMany);
- var buf0 = new Buffer(start);
- for (var i = 0; i < start; i++) {
- buf0[i] = orig[i];
- }
-
- var buf1 = new Buffer(orig.length - start - howMany);
- for (var i = start + howMany; i < orig.length; i++) {
- buf1[ i - howMany - start ] = orig[i]
- }
-
- if (reps.length > 0) {
- var reps_ = reps.slice();
- reps_.unshift(buf0);
- reps_.push(buf1);
- buffers.splice.apply(buffers, [ ii, 1 ].concat(reps_));
- ii += reps_.length;
- reps = [];
- }
- else {
- buffers.splice(ii, 1, buf0, buf1);
- //buffers[ii] = buf;
- ii += 2;
- }
- }
- else {
- removed.push(buffers[ii].slice(start));
- buffers[ii] = buffers[ii].slice(0, start);
- ii ++;
- }
- }
-
- if (reps.length > 0) {
- buffers.splice.apply(buffers, [ ii, 0 ].concat(reps));
- ii += reps.length;
- }
-
- while (removed.length < howMany) {
- var buf = buffers[ii];
- var len = buf.length;
- var take = Math.min(len, howMany - removed.length);
-
- if (take === len) {
- removed.push(buf);
- buffers.splice(ii, 1);
- }
- else {
- removed.push(buf.slice(0, take));
- buffers[ii] = buffers[ii].slice(take);
- }
- }
-
- this.length -= removed.length;
-
- return removed;
-};
-
-Buffers.prototype.slice = function (i, j) {
- var buffers = this.buffers;
- if (j === undefined) j = this.length;
- if (i === undefined) i = 0;
-
- if (j > this.length) j = this.length;
-
- var startBytes = 0;
- for (
- var si = 0;
- si < buffers.length && startBytes + buffers[si].length <= i;
- si ++
- ) { startBytes += buffers[si].length }
-
- var target = new Buffer(j - i);
-
- var ti = 0;
- for (var ii = si; ti < j - i && ii < buffers.length; ii++) {
- var len = buffers[ii].length;
-
- var start = ti === 0 ? i - startBytes : 0;
- var end = ti + len >= j - i
- ? Math.min(start + (j - i) - ti, len)
- : len
- ;
-
- buffers[ii].copy(target, ti, start, end);
- ti += end - start;
- }
-
- return target;
-};
-
-Buffers.prototype.pos = function (i) {
- if (i < 0 || i >= this.length) throw new Error('oob');
- var l = i, bi = 0, bu = null;
- for (;;) {
- bu = this.buffers[bi];
- if (l < bu.length) {
- return {buf: bi, offset: l};
- } else {
- l -= bu.length;
- }
- bi++;
- }
-};
-
-Buffers.prototype.get = function get (i) {
- var pos = this.pos(i);
-
- return this.buffers[pos.buf].get(pos.offset);
-};
-
-Buffers.prototype.set = function set (i, b) {
- var pos = this.pos(i);
-
- return this.buffers[pos.buf].set(pos.offset, b);
-};
-
-Buffers.prototype.indexOf = function (needle, offset) {
- if ("string" === typeof needle) {
- needle = new Buffer(needle);
- } else if (needle instanceof Buffer) {
- // already a buffer
- } else {
- throw new Error('Invalid type for a search string');
- }
-
- if (!needle.length) {
- return 0;
- }
-
- if (!this.length) {
- return -1;
- }
-
- var i = 0, j = 0, match = 0, mstart, pos = 0;
-
- // start search from a particular point in the virtual buffer
- if (offset) {
- var p = this.pos(offset);
- i = p.buf;
- j = p.offset;
- pos = offset;
- }
-
- // for each character in virtual buffer
- for (;;) {
- while (j >= this.buffers[i].length) {
- j = 0;
- i++;
-
- if (i >= this.buffers.length) {
- // search string not found
- return -1;
- }
- }
-
- var char = this.buffers[i][j];
-
- if (char == needle[match]) {
- // keep track where match started
- if (match == 0) {
- mstart = {
- i: i,
- j: j,
- pos: pos
- };
- }
- match++;
- if (match == needle.length) {
- // full match
- return mstart.pos;
- }
- } else if (match != 0) {
- // a partial match ended, go back to match starting position
- // this will continue the search at the next character
- i = mstart.i;
- j = mstart.j;
- pos = mstart.pos;
- match = 0;
- }
-
- j++;
- pos++;
- }
-};
-
-Buffers.prototype.toBuffer = function() {
- return this.slice();
-}
-
-Buffers.prototype.toString = function(encoding, start, end) {
- return this.slice(start, end).toString(encoding);
-}
-
-
-/***/ }),
-
-/***/ 46533:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-var Traverse = __nccwpck_require__(8588);
-var EventEmitter = (__nccwpck_require__(82361).EventEmitter);
-
-module.exports = Chainsaw;
-function Chainsaw (builder) {
- var saw = Chainsaw.saw(builder, {});
- var r = builder.call(saw.handlers, saw);
- if (r !== undefined) saw.handlers = r;
- saw.record();
- return saw.chain();
-};
-
-Chainsaw.light = function ChainsawLight (builder) {
- var saw = Chainsaw.saw(builder, {});
- var r = builder.call(saw.handlers, saw);
- if (r !== undefined) saw.handlers = r;
- return saw.chain();
-};
-
-Chainsaw.saw = function (builder, handlers) {
- var saw = new EventEmitter;
- saw.handlers = handlers;
- saw.actions = [];
-
- saw.chain = function () {
- var ch = Traverse(saw.handlers).map(function (node) {
- if (this.isRoot) return node;
- var ps = this.path;
-
- if (typeof node === 'function') {
- this.update(function () {
- saw.actions.push({
- path : ps,
- args : [].slice.call(arguments)
- });
- return ch;
- });
- }
- });
-
- process.nextTick(function () {
- saw.emit('begin');
- saw.next();
- });
-
- return ch;
- };
-
- saw.pop = function () {
- return saw.actions.shift();
- };
-
- saw.next = function () {
- var action = saw.pop();
-
- if (!action) {
- saw.emit('end');
- }
- else if (!action.trap) {
- var node = saw.handlers;
- action.path.forEach(function (key) { node = node[key] });
- node.apply(saw.handlers, action.args);
- }
- };
-
- saw.nest = function (cb) {
- var args = [].slice.call(arguments, 1);
- var autonext = true;
-
- if (typeof cb === 'boolean') {
- var autonext = cb;
- cb = args.shift();
- }
-
- var s = Chainsaw.saw(builder, {});
- var r = builder.call(s.handlers, s);
-
- if (r !== undefined) s.handlers = r;
-
- // If we are recording...
- if ("undefined" !== typeof saw.step) {
- // ... our children should, too
- s.record();
- }
-
- cb.apply(s.chain(), args);
- if (autonext !== false) s.on('end', saw.next);
- };
-
- saw.record = function () {
- upgradeChainsaw(saw);
- };
-
- ['trap', 'down', 'jump'].forEach(function (method) {
- saw[method] = function () {
- throw new Error("To use the trap, down and jump features, please "+
- "call record() first to start recording actions.");
- };
- });
-
- return saw;
-};
-
-function upgradeChainsaw(saw) {
- saw.step = 0;
-
- // override pop
- saw.pop = function () {
- return saw.actions[saw.step++];
- };
-
- saw.trap = function (name, cb) {
- var ps = Array.isArray(name) ? name : [name];
- saw.actions.push({
- path : ps,
- step : saw.step,
- cb : cb,
- trap : true
- });
- };
-
- saw.down = function (name) {
- var ps = (Array.isArray(name) ? name : [name]).join('/');
- var i = saw.actions.slice(saw.step).map(function (x) {
- if (x.trap && x.step <= saw.step) return false;
- return x.path.join('/') == ps;
- }).indexOf(true);
-
- if (i >= 0) saw.step += i;
- else saw.step = saw.actions.length;
-
- var act = saw.actions[saw.step - 1];
- if (act && act.trap) {
- // It's a trap!
- saw.step = act.step;
- act.cb();
- }
- else saw.next();
- };
-
- saw.jump = function (step) {
- saw.step = step;
- saw.next();
- };
-};
-
-
-/***/ }),
-
-/***/ 92240:
-/***/ ((module) => {
-
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-compress-commons/blob/master/LICENSE-MIT
- */
-var ArchiveEntry = module.exports = function() {};
-
-ArchiveEntry.prototype.getName = function() {};
-
-ArchiveEntry.prototype.getSize = function() {};
-
-ArchiveEntry.prototype.getLastModifiedDate = function() {};
-
-ArchiveEntry.prototype.isDirectory = function() {};
-
-/***/ }),
-
-/***/ 36728:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-compress-commons/blob/master/LICENSE-MIT
- */
-var inherits = (__nccwpck_require__(73837).inherits);
-var isStream = __nccwpck_require__(41554);
-var Transform = (__nccwpck_require__(45193).Transform);
-
-var ArchiveEntry = __nccwpck_require__(92240);
-var util = __nccwpck_require__(95208);
-
-var ArchiveOutputStream = module.exports = function(options) {
- if (!(this instanceof ArchiveOutputStream)) {
- return new ArchiveOutputStream(options);
- }
-
- Transform.call(this, options);
-
- this.offset = 0;
- this._archive = {
- finish: false,
- finished: false,
- processing: false
- };
-};
-
-inherits(ArchiveOutputStream, Transform);
-
-ArchiveOutputStream.prototype._appendBuffer = function(zae, source, callback) {
- // scaffold only
-};
-
-ArchiveOutputStream.prototype._appendStream = function(zae, source, callback) {
- // scaffold only
-};
-
-ArchiveOutputStream.prototype._emitErrorCallback = function(err) {
- if (err) {
- this.emit('error', err);
- }
-};
-
-ArchiveOutputStream.prototype._finish = function(ae) {
- // scaffold only
-};
-
-ArchiveOutputStream.prototype._normalizeEntry = function(ae) {
- // scaffold only
-};
-
-ArchiveOutputStream.prototype._transform = function(chunk, encoding, callback) {
- callback(null, chunk);
-};
-
-ArchiveOutputStream.prototype.entry = function(ae, source, callback) {
- source = source || null;
-
- if (typeof callback !== 'function') {
- callback = this._emitErrorCallback.bind(this);
- }
-
- if (!(ae instanceof ArchiveEntry)) {
- callback(new Error('not a valid instance of ArchiveEntry'));
- return;
- }
-
- if (this._archive.finish || this._archive.finished) {
- callback(new Error('unacceptable entry after finish'));
- return;
- }
-
- if (this._archive.processing) {
- callback(new Error('already processing an entry'));
- return;
- }
-
- this._archive.processing = true;
- this._normalizeEntry(ae);
- this._entry = ae;
-
- source = util.normalizeInputSource(source);
-
- if (Buffer.isBuffer(source)) {
- this._appendBuffer(ae, source, callback);
- } else if (isStream(source)) {
- this._appendStream(ae, source, callback);
- } else {
- this._archive.processing = false;
- callback(new Error('input source must be valid Stream or Buffer instance'));
- return;
- }
-
- return this;
-};
-
-ArchiveOutputStream.prototype.finish = function() {
- if (this._archive.processing) {
- this._archive.finish = true;
- return;
- }
-
- this._finish();
-};
-
-ArchiveOutputStream.prototype.getBytesWritten = function() {
- return this.offset;
-};
-
-ArchiveOutputStream.prototype.write = function(chunk, cb) {
- if (chunk) {
- this.offset += chunk.length;
- }
-
- return Transform.prototype.write.call(this, chunk, cb);
-};
-
-/***/ }),
-
-/***/ 11704:
-/***/ ((module) => {
-
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-compress-commons/blob/master/LICENSE-MIT
- */
-module.exports = {
- WORD: 4,
- DWORD: 8,
- EMPTY: Buffer.alloc(0),
-
- SHORT: 2,
- SHORT_MASK: 0xffff,
- SHORT_SHIFT: 16,
- SHORT_ZERO: Buffer.from(Array(2)),
- LONG: 4,
- LONG_ZERO: Buffer.from(Array(4)),
-
- MIN_VERSION_INITIAL: 10,
- MIN_VERSION_DATA_DESCRIPTOR: 20,
- MIN_VERSION_ZIP64: 45,
- VERSION_MADEBY: 45,
-
- METHOD_STORED: 0,
- METHOD_DEFLATED: 8,
-
- PLATFORM_UNIX: 3,
- PLATFORM_FAT: 0,
-
- SIG_LFH: 0x04034b50,
- SIG_DD: 0x08074b50,
- SIG_CFH: 0x02014b50,
- SIG_EOCD: 0x06054b50,
- SIG_ZIP64_EOCD: 0x06064B50,
- SIG_ZIP64_EOCD_LOC: 0x07064B50,
-
- ZIP64_MAGIC_SHORT: 0xffff,
- ZIP64_MAGIC: 0xffffffff,
- ZIP64_EXTRA_ID: 0x0001,
-
- ZLIB_NO_COMPRESSION: 0,
- ZLIB_BEST_SPEED: 1,
- ZLIB_BEST_COMPRESSION: 9,
- ZLIB_DEFAULT_COMPRESSION: -1,
-
- MODE_MASK: 0xFFF,
- DEFAULT_FILE_MODE: 33188, // 010644 = -rw-r--r-- = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
- DEFAULT_DIR_MODE: 16877, // 040755 = drwxr-xr-x = S_IFDIR | S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH
-
- EXT_FILE_ATTR_DIR: 1106051088, // 010173200020 = drwxr-xr-x = (((S_IFDIR | 0755) << 16) | S_DOS_D)
- EXT_FILE_ATTR_FILE: 2175008800, // 020151000040 = -rw-r--r-- = (((S_IFREG | 0644) << 16) | S_DOS_A) >>> 0
-
- // Unix file types
- S_IFMT: 61440, // 0170000 type of file mask
- S_IFIFO: 4096, // 010000 named pipe (fifo)
- S_IFCHR: 8192, // 020000 character special
- S_IFDIR: 16384, // 040000 directory
- S_IFBLK: 24576, // 060000 block special
- S_IFREG: 32768, // 0100000 regular
- S_IFLNK: 40960, // 0120000 symbolic link
- S_IFSOCK: 49152, // 0140000 socket
-
- // DOS file type flags
- S_DOS_A: 32, // 040 Archive
- S_DOS_D: 16, // 020 Directory
- S_DOS_V: 8, // 010 Volume
- S_DOS_S: 4, // 04 System
- S_DOS_H: 2, // 02 Hidden
- S_DOS_R: 1 // 01 Read Only
-};
-
-
-/***/ }),
-
-/***/ 63229:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-compress-commons/blob/master/LICENSE-MIT
- */
-var zipUtil = __nccwpck_require__(68682);
-
-var DATA_DESCRIPTOR_FLAG = 1 << 3;
-var ENCRYPTION_FLAG = 1 << 0;
-var NUMBER_OF_SHANNON_FANO_TREES_FLAG = 1 << 2;
-var SLIDING_DICTIONARY_SIZE_FLAG = 1 << 1;
-var STRONG_ENCRYPTION_FLAG = 1 << 6;
-var UFT8_NAMES_FLAG = 1 << 11;
-
-var GeneralPurposeBit = module.exports = function() {
- if (!(this instanceof GeneralPurposeBit)) {
- return new GeneralPurposeBit();
- }
-
- this.descriptor = false;
- this.encryption = false;
- this.utf8 = false;
- this.numberOfShannonFanoTrees = 0;
- this.strongEncryption = false;
- this.slidingDictionarySize = 0;
-
- return this;
-};
-
-GeneralPurposeBit.prototype.encode = function() {
- return zipUtil.getShortBytes(
- (this.descriptor ? DATA_DESCRIPTOR_FLAG : 0) |
- (this.utf8 ? UFT8_NAMES_FLAG : 0) |
- (this.encryption ? ENCRYPTION_FLAG : 0) |
- (this.strongEncryption ? STRONG_ENCRYPTION_FLAG : 0)
- );
-};
-
-GeneralPurposeBit.prototype.parse = function(buf, offset) {
- var flag = zipUtil.getShortBytesValue(buf, offset);
- var gbp = new GeneralPurposeBit();
-
- gbp.useDataDescriptor((flag & DATA_DESCRIPTOR_FLAG) !== 0);
- gbp.useUTF8ForNames((flag & UFT8_NAMES_FLAG) !== 0);
- gbp.useStrongEncryption((flag & STRONG_ENCRYPTION_FLAG) !== 0);
- gbp.useEncryption((flag & ENCRYPTION_FLAG) !== 0);
- gbp.setSlidingDictionarySize((flag & SLIDING_DICTIONARY_SIZE_FLAG) !== 0 ? 8192 : 4096);
- gbp.setNumberOfShannonFanoTrees((flag & NUMBER_OF_SHANNON_FANO_TREES_FLAG) !== 0 ? 3 : 2);
-
- return gbp;
-};
-
-GeneralPurposeBit.prototype.setNumberOfShannonFanoTrees = function(n) {
- this.numberOfShannonFanoTrees = n;
-};
-
-GeneralPurposeBit.prototype.getNumberOfShannonFanoTrees = function() {
- return this.numberOfShannonFanoTrees;
-};
-
-GeneralPurposeBit.prototype.setSlidingDictionarySize = function(n) {
- this.slidingDictionarySize = n;
-};
-
-GeneralPurposeBit.prototype.getSlidingDictionarySize = function() {
- return this.slidingDictionarySize;
-};
-
-GeneralPurposeBit.prototype.useDataDescriptor = function(b) {
- this.descriptor = b;
-};
-
-GeneralPurposeBit.prototype.usesDataDescriptor = function() {
- return this.descriptor;
-};
-
-GeneralPurposeBit.prototype.useEncryption = function(b) {
- this.encryption = b;
-};
-
-GeneralPurposeBit.prototype.usesEncryption = function() {
- return this.encryption;
-};
-
-GeneralPurposeBit.prototype.useStrongEncryption = function(b) {
- this.strongEncryption = b;
-};
-
-GeneralPurposeBit.prototype.usesStrongEncryption = function() {
- return this.strongEncryption;
-};
-
-GeneralPurposeBit.prototype.useUTF8ForNames = function(b) {
- this.utf8 = b;
-};
-
-GeneralPurposeBit.prototype.usesUTF8ForNames = function() {
- return this.utf8;
-};
-
-/***/ }),
-
-/***/ 70713:
-/***/ ((module) => {
-
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-compress-commons/blob/master/LICENSE-MIT
- */
-module.exports = {
- /**
- * Bits used for permissions (and sticky bit)
- */
- PERM_MASK: 4095, // 07777
-
- /**
- * Bits used to indicate the filesystem object type.
- */
- FILE_TYPE_FLAG: 61440, // 0170000
-
- /**
- * Indicates symbolic links.
- */
- LINK_FLAG: 40960, // 0120000
-
- /**
- * Indicates plain files.
- */
- FILE_FLAG: 32768, // 0100000
-
- /**
- * Indicates directories.
- */
- DIR_FLAG: 16384, // 040000
-
- // ----------------------------------------------------------
- // somewhat arbitrary choices that are quite common for shared
- // installations
- // -----------------------------------------------------------
-
- /**
- * Default permissions for symbolic links.
- */
- DEFAULT_LINK_PERM: 511, // 0777
-
- /**
- * Default permissions for directories.
- */
- DEFAULT_DIR_PERM: 493, // 0755
-
- /**
- * Default permissions for plain files.
- */
- DEFAULT_FILE_PERM: 420 // 0644
-};
-
-/***/ }),
-
-/***/ 68682:
-/***/ ((module) => {
-
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-compress-commons/blob/master/LICENSE-MIT
- */
-var util = module.exports = {};
-
-util.dateToDos = function(d, forceLocalTime) {
- forceLocalTime = forceLocalTime || false;
-
- var year = forceLocalTime ? d.getFullYear() : d.getUTCFullYear();
-
- if (year < 1980) {
- return 2162688; // 1980-1-1 00:00:00
- } else if (year >= 2044) {
- return 2141175677; // 2043-12-31 23:59:58
- }
-
- var val = {
- year: year,
- month: forceLocalTime ? d.getMonth() : d.getUTCMonth(),
- date: forceLocalTime ? d.getDate() : d.getUTCDate(),
- hours: forceLocalTime ? d.getHours() : d.getUTCHours(),
- minutes: forceLocalTime ? d.getMinutes() : d.getUTCMinutes(),
- seconds: forceLocalTime ? d.getSeconds() : d.getUTCSeconds()
- };
-
- return ((val.year - 1980) << 25) | ((val.month + 1) << 21) | (val.date << 16) |
- (val.hours << 11) | (val.minutes << 5) | (val.seconds / 2);
-};
-
-util.dosToDate = function(dos) {
- return new Date(((dos >> 25) & 0x7f) + 1980, ((dos >> 21) & 0x0f) - 1, (dos >> 16) & 0x1f, (dos >> 11) & 0x1f, (dos >> 5) & 0x3f, (dos & 0x1f) << 1);
-};
-
-util.fromDosTime = function(buf) {
- return util.dosToDate(buf.readUInt32LE(0));
-};
-
-util.getEightBytes = function(v) {
- var buf = Buffer.alloc(8);
- buf.writeUInt32LE(v % 0x0100000000, 0);
- buf.writeUInt32LE((v / 0x0100000000) | 0, 4);
-
- return buf;
-};
-
-util.getShortBytes = function(v) {
- var buf = Buffer.alloc(2);
- buf.writeUInt16LE((v & 0xFFFF) >>> 0, 0);
-
- return buf;
-};
-
-util.getShortBytesValue = function(buf, offset) {
- return buf.readUInt16LE(offset);
-};
-
-util.getLongBytes = function(v) {
- var buf = Buffer.alloc(4);
- buf.writeUInt32LE((v & 0xFFFFFFFF) >>> 0, 0);
-
- return buf;
-};
-
-util.getLongBytesValue = function(buf, offset) {
- return buf.readUInt32LE(offset);
-};
-
-util.toDosTime = function(d) {
- return util.getLongBytes(util.dateToDos(d));
-};
-
-/***/ }),
-
-/***/ 3179:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-compress-commons/blob/master/LICENSE-MIT
- */
-var inherits = (__nccwpck_require__(73837).inherits);
-var normalizePath = __nccwpck_require__(55388);
-
-var ArchiveEntry = __nccwpck_require__(92240);
-var GeneralPurposeBit = __nccwpck_require__(63229);
-var UnixStat = __nccwpck_require__(70713);
-
-var constants = __nccwpck_require__(11704);
-var zipUtil = __nccwpck_require__(68682);
-
-var ZipArchiveEntry = module.exports = function(name) {
- if (!(this instanceof ZipArchiveEntry)) {
- return new ZipArchiveEntry(name);
- }
-
- ArchiveEntry.call(this);
-
- this.platform = constants.PLATFORM_FAT;
- this.method = -1;
-
- this.name = null;
- this.size = 0;
- this.csize = 0;
- this.gpb = new GeneralPurposeBit();
- this.crc = 0;
- this.time = -1;
-
- this.minver = constants.MIN_VERSION_INITIAL;
- this.mode = -1;
- this.extra = null;
- this.exattr = 0;
- this.inattr = 0;
- this.comment = null;
-
- if (name) {
- this.setName(name);
- }
-};
-
-inherits(ZipArchiveEntry, ArchiveEntry);
-
-/**
- * Returns the extra fields related to the entry.
- *
- * @returns {Buffer}
- */
-ZipArchiveEntry.prototype.getCentralDirectoryExtra = function() {
- return this.getExtra();
-};
-
-/**
- * Returns the comment set for the entry.
- *
- * @returns {string}
- */
-ZipArchiveEntry.prototype.getComment = function() {
- return this.comment !== null ? this.comment : '';
-};
-
-/**
- * Returns the compressed size of the entry.
- *
- * @returns {number}
- */
-ZipArchiveEntry.prototype.getCompressedSize = function() {
- return this.csize;
-};
-
-/**
- * Returns the CRC32 digest for the entry.
- *
- * @returns {number}
- */
-ZipArchiveEntry.prototype.getCrc = function() {
- return this.crc;
-};
-
-/**
- * Returns the external file attributes for the entry.
- *
- * @returns {number}
- */
-ZipArchiveEntry.prototype.getExternalAttributes = function() {
- return this.exattr;
-};
-
-/**
- * Returns the extra fields related to the entry.
- *
- * @returns {Buffer}
- */
-ZipArchiveEntry.prototype.getExtra = function() {
- return this.extra !== null ? this.extra : constants.EMPTY;
-};
-
-/**
- * Returns the general purpose bits related to the entry.
- *
- * @returns {GeneralPurposeBit}
- */
-ZipArchiveEntry.prototype.getGeneralPurposeBit = function() {
- return this.gpb;
-};
-
-/**
- * Returns the internal file attributes for the entry.
- *
- * @returns {number}
- */
-ZipArchiveEntry.prototype.getInternalAttributes = function() {
- return this.inattr;
-};
-
-/**
- * Returns the last modified date of the entry.
- *
- * @returns {number}
- */
-ZipArchiveEntry.prototype.getLastModifiedDate = function() {
- return this.getTime();
-};
-
-/**
- * Returns the extra fields related to the entry.
- *
- * @returns {Buffer}
- */
-ZipArchiveEntry.prototype.getLocalFileDataExtra = function() {
- return this.getExtra();
-};
-
-/**
- * Returns the compression method used on the entry.
- *
- * @returns {number}
- */
-ZipArchiveEntry.prototype.getMethod = function() {
- return this.method;
-};
-
-/**
- * Returns the filename of the entry.
- *
- * @returns {string}
- */
-ZipArchiveEntry.prototype.getName = function() {
- return this.name;
-};
-
-/**
- * Returns the platform on which the entry was made.
- *
- * @returns {number}
- */
-ZipArchiveEntry.prototype.getPlatform = function() {
- return this.platform;
-};
-
-/**
- * Returns the size of the entry.
- *
- * @returns {number}
- */
-ZipArchiveEntry.prototype.getSize = function() {
- return this.size;
-};
-
-/**
- * Returns a date object representing the last modified date of the entry.
- *
- * @returns {number|Date}
- */
-ZipArchiveEntry.prototype.getTime = function() {
- return this.time !== -1 ? zipUtil.dosToDate(this.time) : -1;
-};
-
-/**
- * Returns the DOS timestamp for the entry.
- *
- * @returns {number}
- */
-ZipArchiveEntry.prototype.getTimeDos = function() {
- return this.time !== -1 ? this.time : 0;
-};
-
-/**
- * Returns the UNIX file permissions for the entry.
- *
- * @returns {number}
- */
-ZipArchiveEntry.prototype.getUnixMode = function() {
- return this.platform !== constants.PLATFORM_UNIX ? 0 : ((this.getExternalAttributes() >> constants.SHORT_SHIFT) & constants.SHORT_MASK);
-};
-
-/**
- * Returns the version of ZIP needed to extract the entry.
- *
- * @returns {number}
- */
-ZipArchiveEntry.prototype.getVersionNeededToExtract = function() {
- return this.minver;
-};
-
-/**
- * Sets the comment of the entry.
- *
- * @param comment
- */
-ZipArchiveEntry.prototype.setComment = function(comment) {
- if (Buffer.byteLength(comment) !== comment.length) {
- this.getGeneralPurposeBit().useUTF8ForNames(true);
- }
-
- this.comment = comment;
-};
-
-/**
- * Sets the compressed size of the entry.
- *
- * @param size
- */
-ZipArchiveEntry.prototype.setCompressedSize = function(size) {
- if (size < 0) {
- throw new Error('invalid entry compressed size');
- }
-
- this.csize = size;
-};
-
-/**
- * Sets the checksum of the entry.
- *
- * @param crc
- */
-ZipArchiveEntry.prototype.setCrc = function(crc) {
- if (crc < 0) {
- throw new Error('invalid entry crc32');
- }
-
- this.crc = crc;
-};
-
-/**
- * Sets the external file attributes of the entry.
- *
- * @param attr
- */
-ZipArchiveEntry.prototype.setExternalAttributes = function(attr) {
- this.exattr = attr >>> 0;
-};
-
-/**
- * Sets the extra fields related to the entry.
- *
- * @param extra
- */
-ZipArchiveEntry.prototype.setExtra = function(extra) {
- this.extra = extra;
-};
-
-/**
- * Sets the general purpose bits related to the entry.
- *
- * @param gpb
- */
-ZipArchiveEntry.prototype.setGeneralPurposeBit = function(gpb) {
- if (!(gpb instanceof GeneralPurposeBit)) {
- throw new Error('invalid entry GeneralPurposeBit');
- }
-
- this.gpb = gpb;
-};
-
-/**
- * Sets the internal file attributes of the entry.
- *
- * @param attr
- */
-ZipArchiveEntry.prototype.setInternalAttributes = function(attr) {
- this.inattr = attr;
-};
-
-/**
- * Sets the compression method of the entry.
- *
- * @param method
- */
-ZipArchiveEntry.prototype.setMethod = function(method) {
- if (method < 0) {
- throw new Error('invalid entry compression method');
- }
-
- this.method = method;
-};
-
-/**
- * Sets the name of the entry.
- *
- * @param name
- * @param prependSlash
- */
-ZipArchiveEntry.prototype.setName = function(name, prependSlash = false) {
- name = normalizePath(name, false)
- .replace(/^\w+:/, '')
- .replace(/^(\.\.\/|\/)+/, '');
-
- if (prependSlash) {
- name = `/${name}`;
- }
-
- if (Buffer.byteLength(name) !== name.length) {
- this.getGeneralPurposeBit().useUTF8ForNames(true);
- }
-
- this.name = name;
-};
-
-/**
- * Sets the platform on which the entry was made.
- *
- * @param platform
- */
-ZipArchiveEntry.prototype.setPlatform = function(platform) {
- this.platform = platform;
-};
-
-/**
- * Sets the size of the entry.
- *
- * @param size
- */
-ZipArchiveEntry.prototype.setSize = function(size) {
- if (size < 0) {
- throw new Error('invalid entry size');
- }
-
- this.size = size;
-};
-
-/**
- * Sets the time of the entry.
- *
- * @param time
- * @param forceLocalTime
- */
-ZipArchiveEntry.prototype.setTime = function(time, forceLocalTime) {
- if (!(time instanceof Date)) {
- throw new Error('invalid entry time');
- }
-
- this.time = zipUtil.dateToDos(time, forceLocalTime);
-};
-
-/**
- * Sets the UNIX file permissions for the entry.
- *
- * @param mode
- */
-ZipArchiveEntry.prototype.setUnixMode = function(mode) {
- mode |= this.isDirectory() ? constants.S_IFDIR : constants.S_IFREG;
-
- var extattr = 0;
- extattr |= (mode << constants.SHORT_SHIFT) | (this.isDirectory() ? constants.S_DOS_D : constants.S_DOS_A);
-
- this.setExternalAttributes(extattr);
- this.mode = mode & constants.MODE_MASK;
- this.platform = constants.PLATFORM_UNIX;
-};
-
-/**
- * Sets the version of ZIP needed to extract this entry.
- *
- * @param minver
- */
-ZipArchiveEntry.prototype.setVersionNeededToExtract = function(minver) {
- this.minver = minver;
-};
-
-/**
- * Returns true if this entry represents a directory.
- *
- * @returns {boolean}
- */
-ZipArchiveEntry.prototype.isDirectory = function() {
- return this.getName().slice(-1) === '/';
-};
-
-/**
- * Returns true if this entry represents a unix symlink,
- * in which case the entry's content contains the target path
- * for the symlink.
- *
- * @returns {boolean}
- */
-ZipArchiveEntry.prototype.isUnixSymlink = function() {
- return (this.getUnixMode() & UnixStat.FILE_TYPE_FLAG) === UnixStat.LINK_FLAG;
-};
-
-/**
- * Returns true if this entry is using the ZIP64 extension of ZIP.
- *
- * @returns {boolean}
- */
-ZipArchiveEntry.prototype.isZip64 = function() {
- return this.csize > constants.ZIP64_MAGIC || this.size > constants.ZIP64_MAGIC;
-};
-
-
-/***/ }),
-
-/***/ 44432:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-compress-commons/blob/master/LICENSE-MIT
- */
-var inherits = (__nccwpck_require__(73837).inherits);
-var crc32 = __nccwpck_require__(83201);
-var {CRC32Stream} = __nccwpck_require__(5101);
-var {DeflateCRC32Stream} = __nccwpck_require__(5101);
-
-var ArchiveOutputStream = __nccwpck_require__(36728);
-var ZipArchiveEntry = __nccwpck_require__(3179);
-var GeneralPurposeBit = __nccwpck_require__(63229);
-
-var constants = __nccwpck_require__(11704);
-var util = __nccwpck_require__(95208);
-var zipUtil = __nccwpck_require__(68682);
-
-var ZipArchiveOutputStream = module.exports = function(options) {
- if (!(this instanceof ZipArchiveOutputStream)) {
- return new ZipArchiveOutputStream(options);
- }
-
- options = this.options = this._defaults(options);
-
- ArchiveOutputStream.call(this, options);
-
- this._entry = null;
- this._entries = [];
- this._archive = {
- centralLength: 0,
- centralOffset: 0,
- comment: '',
- finish: false,
- finished: false,
- processing: false,
- forceZip64: options.forceZip64,
- forceLocalTime: options.forceLocalTime
- };
-};
-
-inherits(ZipArchiveOutputStream, ArchiveOutputStream);
-
-ZipArchiveOutputStream.prototype._afterAppend = function(ae) {
- this._entries.push(ae);
-
- if (ae.getGeneralPurposeBit().usesDataDescriptor()) {
- this._writeDataDescriptor(ae);
- }
-
- this._archive.processing = false;
- this._entry = null;
-
- if (this._archive.finish && !this._archive.finished) {
- this._finish();
- }
-};
-
-ZipArchiveOutputStream.prototype._appendBuffer = function(ae, source, callback) {
- if (source.length === 0) {
- ae.setMethod(constants.METHOD_STORED);
- }
-
- var method = ae.getMethod();
-
- if (method === constants.METHOD_STORED) {
- ae.setSize(source.length);
- ae.setCompressedSize(source.length);
- ae.setCrc(crc32.buf(source) >>> 0);
- }
-
- this._writeLocalFileHeader(ae);
-
- if (method === constants.METHOD_STORED) {
- this.write(source);
- this._afterAppend(ae);
- callback(null, ae);
- return;
- } else if (method === constants.METHOD_DEFLATED) {
- this._smartStream(ae, callback).end(source);
- return;
- } else {
- callback(new Error('compression method ' + method + ' not implemented'));
- return;
- }
-};
-
-ZipArchiveOutputStream.prototype._appendStream = function(ae, source, callback) {
- ae.getGeneralPurposeBit().useDataDescriptor(true);
- ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR);
-
- this._writeLocalFileHeader(ae);
-
- var smart = this._smartStream(ae, callback);
- source.once('error', function(err) {
- smart.emit('error', err);
- smart.end();
- })
- source.pipe(smart);
-};
-
-ZipArchiveOutputStream.prototype._defaults = function(o) {
- if (typeof o !== 'object') {
- o = {};
- }
-
- if (typeof o.zlib !== 'object') {
- o.zlib = {};
- }
-
- if (typeof o.zlib.level !== 'number') {
- o.zlib.level = constants.ZLIB_BEST_SPEED;
- }
-
- o.forceZip64 = !!o.forceZip64;
- o.forceLocalTime = !!o.forceLocalTime;
-
- return o;
-};
-
-ZipArchiveOutputStream.prototype._finish = function() {
- this._archive.centralOffset = this.offset;
-
- this._entries.forEach(function(ae) {
- this._writeCentralFileHeader(ae);
- }.bind(this));
-
- this._archive.centralLength = this.offset - this._archive.centralOffset;
-
- if (this.isZip64()) {
- this._writeCentralDirectoryZip64();
- }
-
- this._writeCentralDirectoryEnd();
-
- this._archive.processing = false;
- this._archive.finish = true;
- this._archive.finished = true;
- this.end();
-};
-
-ZipArchiveOutputStream.prototype._normalizeEntry = function(ae) {
- if (ae.getMethod() === -1) {
- ae.setMethod(constants.METHOD_DEFLATED);
- }
-
- if (ae.getMethod() === constants.METHOD_DEFLATED) {
- ae.getGeneralPurposeBit().useDataDescriptor(true);
- ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR);
- }
-
- if (ae.getTime() === -1) {
- ae.setTime(new Date(), this._archive.forceLocalTime);
- }
-
- ae._offsets = {
- file: 0,
- data: 0,
- contents: 0,
- };
-};
-
-ZipArchiveOutputStream.prototype._smartStream = function(ae, callback) {
- var deflate = ae.getMethod() === constants.METHOD_DEFLATED;
- var process = deflate ? new DeflateCRC32Stream(this.options.zlib) : new CRC32Stream();
- var error = null;
-
- function handleStuff() {
- var digest = process.digest().readUInt32BE(0);
- ae.setCrc(digest);
- ae.setSize(process.size());
- ae.setCompressedSize(process.size(true));
- this._afterAppend(ae);
- callback(error, ae);
- }
-
- process.once('end', handleStuff.bind(this));
- process.once('error', function(err) {
- error = err;
- });
-
- process.pipe(this, { end: false });
-
- return process;
-};
-
-ZipArchiveOutputStream.prototype._writeCentralDirectoryEnd = function() {
- var records = this._entries.length;
- var size = this._archive.centralLength;
- var offset = this._archive.centralOffset;
-
- if (this.isZip64()) {
- records = constants.ZIP64_MAGIC_SHORT;
- size = constants.ZIP64_MAGIC;
- offset = constants.ZIP64_MAGIC;
- }
-
- // signature
- this.write(zipUtil.getLongBytes(constants.SIG_EOCD));
-
- // disk numbers
- this.write(constants.SHORT_ZERO);
- this.write(constants.SHORT_ZERO);
-
- // number of entries
- this.write(zipUtil.getShortBytes(records));
- this.write(zipUtil.getShortBytes(records));
-
- // length and location of CD
- this.write(zipUtil.getLongBytes(size));
- this.write(zipUtil.getLongBytes(offset));
-
- // archive comment
- var comment = this.getComment();
- var commentLength = Buffer.byteLength(comment);
- this.write(zipUtil.getShortBytes(commentLength));
- this.write(comment);
-};
-
-ZipArchiveOutputStream.prototype._writeCentralDirectoryZip64 = function() {
- // signature
- this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD));
-
- // size of the ZIP64 EOCD record
- this.write(zipUtil.getEightBytes(44));
-
- // version made by
- this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64));
-
- // version to extract
- this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64));
-
- // disk numbers
- this.write(constants.LONG_ZERO);
- this.write(constants.LONG_ZERO);
-
- // number of entries
- this.write(zipUtil.getEightBytes(this._entries.length));
- this.write(zipUtil.getEightBytes(this._entries.length));
-
- // length and location of CD
- this.write(zipUtil.getEightBytes(this._archive.centralLength));
- this.write(zipUtil.getEightBytes(this._archive.centralOffset));
-
- // extensible data sector
- // not implemented at this time
-
- // end of central directory locator
- this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD_LOC));
-
- // disk number holding the ZIP64 EOCD record
- this.write(constants.LONG_ZERO);
-
- // relative offset of the ZIP64 EOCD record
- this.write(zipUtil.getEightBytes(this._archive.centralOffset + this._archive.centralLength));
-
- // total number of disks
- this.write(zipUtil.getLongBytes(1));
-};
-
-ZipArchiveOutputStream.prototype._writeCentralFileHeader = function(ae) {
- var gpb = ae.getGeneralPurposeBit();
- var method = ae.getMethod();
- var fileOffset = ae._offsets.file;
-
- var size = ae.getSize();
- var compressedSize = ae.getCompressedSize();
-
- if (ae.isZip64() || fileOffset > constants.ZIP64_MAGIC) {
- size = constants.ZIP64_MAGIC;
- compressedSize = constants.ZIP64_MAGIC;
- fileOffset = constants.ZIP64_MAGIC;
-
- ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64);
-
- var extraBuf = Buffer.concat([
- zipUtil.getShortBytes(constants.ZIP64_EXTRA_ID),
- zipUtil.getShortBytes(24),
- zipUtil.getEightBytes(ae.getSize()),
- zipUtil.getEightBytes(ae.getCompressedSize()),
- zipUtil.getEightBytes(ae._offsets.file)
- ], 28);
-
- ae.setExtra(extraBuf);
- }
-
- // signature
- this.write(zipUtil.getLongBytes(constants.SIG_CFH));
-
- // version made by
- this.write(zipUtil.getShortBytes((ae.getPlatform() << 8) | constants.VERSION_MADEBY));
-
- // version to extract and general bit flag
- this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract()));
- this.write(gpb.encode());
-
- // compression method
- this.write(zipUtil.getShortBytes(method));
-
- // datetime
- this.write(zipUtil.getLongBytes(ae.getTimeDos()));
-
- // crc32 checksum
- this.write(zipUtil.getLongBytes(ae.getCrc()));
-
- // sizes
- this.write(zipUtil.getLongBytes(compressedSize));
- this.write(zipUtil.getLongBytes(size));
-
- var name = ae.getName();
- var comment = ae.getComment();
- var extra = ae.getCentralDirectoryExtra();
-
- if (gpb.usesUTF8ForNames()) {
- name = Buffer.from(name);
- comment = Buffer.from(comment);
- }
-
- // name length
- this.write(zipUtil.getShortBytes(name.length));
-
- // extra length
- this.write(zipUtil.getShortBytes(extra.length));
-
- // comments length
- this.write(zipUtil.getShortBytes(comment.length));
-
- // disk number start
- this.write(constants.SHORT_ZERO);
-
- // internal attributes
- this.write(zipUtil.getShortBytes(ae.getInternalAttributes()));
-
- // external attributes
- this.write(zipUtil.getLongBytes(ae.getExternalAttributes()));
-
- // relative offset of LFH
- this.write(zipUtil.getLongBytes(fileOffset));
-
- // name
- this.write(name);
-
- // extra
- this.write(extra);
-
- // comment
- this.write(comment);
-};
-
-ZipArchiveOutputStream.prototype._writeDataDescriptor = function(ae) {
- // signature
- this.write(zipUtil.getLongBytes(constants.SIG_DD));
-
- // crc32 checksum
- this.write(zipUtil.getLongBytes(ae.getCrc()));
-
- // sizes
- if (ae.isZip64()) {
- this.write(zipUtil.getEightBytes(ae.getCompressedSize()));
- this.write(zipUtil.getEightBytes(ae.getSize()));
- } else {
- this.write(zipUtil.getLongBytes(ae.getCompressedSize()));
- this.write(zipUtil.getLongBytes(ae.getSize()));
- }
-};
-
-ZipArchiveOutputStream.prototype._writeLocalFileHeader = function(ae) {
- var gpb = ae.getGeneralPurposeBit();
- var method = ae.getMethod();
- var name = ae.getName();
- var extra = ae.getLocalFileDataExtra();
-
- if (ae.isZip64()) {
- gpb.useDataDescriptor(true);
- ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64);
- }
-
- if (gpb.usesUTF8ForNames()) {
- name = Buffer.from(name);
- }
-
- ae._offsets.file = this.offset;
-
- // signature
- this.write(zipUtil.getLongBytes(constants.SIG_LFH));
-
- // version to extract and general bit flag
- this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract()));
- this.write(gpb.encode());
-
- // compression method
- this.write(zipUtil.getShortBytes(method));
-
- // datetime
- this.write(zipUtil.getLongBytes(ae.getTimeDos()));
-
- ae._offsets.data = this.offset;
-
- // crc32 checksum and sizes
- if (gpb.usesDataDescriptor()) {
- this.write(constants.LONG_ZERO);
- this.write(constants.LONG_ZERO);
- this.write(constants.LONG_ZERO);
- } else {
- this.write(zipUtil.getLongBytes(ae.getCrc()));
- this.write(zipUtil.getLongBytes(ae.getCompressedSize()));
- this.write(zipUtil.getLongBytes(ae.getSize()));
- }
-
- // name length
- this.write(zipUtil.getShortBytes(name.length));
-
- // extra length
- this.write(zipUtil.getShortBytes(extra.length));
-
- // name
- this.write(name);
-
- // extra
- this.write(extra);
-
- ae._offsets.contents = this.offset;
-};
-
-ZipArchiveOutputStream.prototype.getComment = function(comment) {
- return this._archive.comment !== null ? this._archive.comment : '';
-};
-
-ZipArchiveOutputStream.prototype.isZip64 = function() {
- return this._archive.forceZip64 || this._entries.length > constants.ZIP64_MAGIC_SHORT || this._archive.centralLength > constants.ZIP64_MAGIC || this._archive.centralOffset > constants.ZIP64_MAGIC;
-};
-
-ZipArchiveOutputStream.prototype.setComment = function(comment) {
- this._archive.comment = comment;
-};
-
-
-/***/ }),
-
-/***/ 25445:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-compress-commons/blob/master/LICENSE-MIT
- */
-module.exports = {
- ArchiveEntry: __nccwpck_require__(92240),
- ZipArchiveEntry: __nccwpck_require__(3179),
- ArchiveOutputStream: __nccwpck_require__(36728),
- ZipArchiveOutputStream: __nccwpck_require__(44432)
-};
-
-/***/ }),
-
-/***/ 95208:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * node-compress-commons
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-compress-commons/blob/master/LICENSE-MIT
- */
-var Stream = (__nccwpck_require__(12781).Stream);
-var PassThrough = (__nccwpck_require__(45193).PassThrough);
-var isStream = __nccwpck_require__(41554);
-
-var util = module.exports = {};
-
-util.normalizeInputSource = function(source) {
- if (source === null) {
- return Buffer.alloc(0);
- } else if (typeof source === 'string') {
- return Buffer.from(source);
- } else if (isStream(source) && !source._readableState) {
- var normalized = new PassThrough();
- source.pipe(normalized);
-
- return normalized;
- }
-
- return source;
-};
-
-/***/ }),
-
-/***/ 86891:
-/***/ ((module) => {
-
-module.exports = function (xs, fn) {
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- var x = fn(xs[i], i);
- if (isArray(x)) res.push.apply(res, x);
- else res.push(x);
- }
- return res;
-};
-
-var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
-};
-
-
-/***/ }),
-
-/***/ 95898:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// NOTE: These type checking functions intentionally don't use `instanceof`
-// because it is fragile and can be easily faked with `Object.create()`.
-
-function isArray(arg) {
- if (Array.isArray) {
- return Array.isArray(arg);
- }
- return objectToString(arg) === '[object Array]';
-}
-exports.isArray = isArray;
-
-function isBoolean(arg) {
- return typeof arg === 'boolean';
-}
-exports.isBoolean = isBoolean;
-
-function isNull(arg) {
- return arg === null;
-}
-exports.isNull = isNull;
-
-function isNullOrUndefined(arg) {
- return arg == null;
-}
-exports.isNullOrUndefined = isNullOrUndefined;
-
-function isNumber(arg) {
- return typeof arg === 'number';
-}
-exports.isNumber = isNumber;
-
-function isString(arg) {
- return typeof arg === 'string';
-}
-exports.isString = isString;
-
-function isSymbol(arg) {
- return typeof arg === 'symbol';
-}
-exports.isSymbol = isSymbol;
-
-function isUndefined(arg) {
- return arg === void 0;
-}
-exports.isUndefined = isUndefined;
-
-function isRegExp(re) {
- return objectToString(re) === '[object RegExp]';
-}
-exports.isRegExp = isRegExp;
-
-function isObject(arg) {
- return typeof arg === 'object' && arg !== null;
-}
-exports.isObject = isObject;
-
-function isDate(d) {
- return objectToString(d) === '[object Date]';
-}
-exports.isDate = isDate;
-
-function isError(e) {
- return (objectToString(e) === '[object Error]' || e instanceof Error);
-}
-exports.isError = isError;
-
-function isFunction(arg) {
- return typeof arg === 'function';
-}
-exports.isFunction = isFunction;
-
-function isPrimitive(arg) {
- return arg === null ||
- typeof arg === 'boolean' ||
- typeof arg === 'number' ||
- typeof arg === 'string' ||
- typeof arg === 'symbol' || // ES6 symbol
- typeof arg === 'undefined';
-}
-exports.isPrimitive = isPrimitive;
-
-exports.isBuffer = __nccwpck_require__(14300).Buffer.isBuffer;
-
-function objectToString(o) {
- return Object.prototype.toString.call(o);
-}
-
-
-/***/ }),
-
-/***/ 83201:
-/***/ ((__unused_webpack_module, exports) => {
-
-/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */
-/* vim: set ts=2: */
-/*exported CRC32 */
-var CRC32;
-(function (factory) {
- /*jshint ignore:start */
- /*eslint-disable */
- if(typeof DO_NOT_EXPORT_CRC === 'undefined') {
- if(true) {
- factory(exports);
- } else {}
- } else {
- factory(CRC32 = {});
- }
- /*eslint-enable */
- /*jshint ignore:end */
-}(function(CRC32) {
-CRC32.version = '1.2.2';
-/*global Int32Array */
-function signed_crc_table() {
- var c = 0, table = new Array(256);
-
- for(var n =0; n != 256; ++n){
- c = n;
- c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
- c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
- c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
- c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
- c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
- c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
- c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
- c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
- table[n] = c;
- }
-
- return typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;
-}
-
-var T0 = signed_crc_table();
-function slice_by_16_tables(T) {
- var c = 0, v = 0, n = 0, table = typeof Int32Array !== 'undefined' ? new Int32Array(4096) : new Array(4096) ;
-
- for(n = 0; n != 256; ++n) table[n] = T[n];
- for(n = 0; n != 256; ++n) {
- v = T[n];
- for(c = 256 + n; c < 4096; c += 256) v = table[c] = (v >>> 8) ^ T[v & 0xFF];
- }
- var out = [];
- for(n = 1; n != 16; ++n) out[n - 1] = typeof Int32Array !== 'undefined' ? table.subarray(n * 256, n * 256 + 256) : table.slice(n * 256, n * 256 + 256);
- return out;
-}
-var TT = slice_by_16_tables(T0);
-var T1 = TT[0], T2 = TT[1], T3 = TT[2], T4 = TT[3], T5 = TT[4];
-var T6 = TT[5], T7 = TT[6], T8 = TT[7], T9 = TT[8], Ta = TT[9];
-var Tb = TT[10], Tc = TT[11], Td = TT[12], Te = TT[13], Tf = TT[14];
-function crc32_bstr(bstr, seed) {
- var C = seed ^ -1;
- for(var i = 0, L = bstr.length; i < L;) C = (C>>>8) ^ T0[(C^bstr.charCodeAt(i++))&0xFF];
- return ~C;
-}
-
-function crc32_buf(B, seed) {
- var C = seed ^ -1, L = B.length - 15, i = 0;
- for(; i < L;) C =
- Tf[B[i++] ^ (C & 255)] ^
- Te[B[i++] ^ ((C >> 8) & 255)] ^
- Td[B[i++] ^ ((C >> 16) & 255)] ^
- Tc[B[i++] ^ (C >>> 24)] ^
- Tb[B[i++]] ^ Ta[B[i++]] ^ T9[B[i++]] ^ T8[B[i++]] ^
- T7[B[i++]] ^ T6[B[i++]] ^ T5[B[i++]] ^ T4[B[i++]] ^
- T3[B[i++]] ^ T2[B[i++]] ^ T1[B[i++]] ^ T0[B[i++]];
- L += 15;
- while(i < L) C = (C>>>8) ^ T0[(C^B[i++])&0xFF];
- return ~C;
-}
-
-function crc32_str(str, seed) {
- var C = seed ^ -1;
- for(var i = 0, L = str.length, c = 0, d = 0; i < L;) {
- c = str.charCodeAt(i++);
- if(c < 0x80) {
- C = (C>>>8) ^ T0[(C^c)&0xFF];
- } else if(c < 0x800) {
- C = (C>>>8) ^ T0[(C ^ (192|((c>>6)&31)))&0xFF];
- C = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];
- } else if(c >= 0xD800 && c < 0xE000) {
- c = (c&1023)+64; d = str.charCodeAt(i++)&1023;
- C = (C>>>8) ^ T0[(C ^ (240|((c>>8)&7)))&0xFF];
- C = (C>>>8) ^ T0[(C ^ (128|((c>>2)&63)))&0xFF];
- C = (C>>>8) ^ T0[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF];
- C = (C>>>8) ^ T0[(C ^ (128|(d&63)))&0xFF];
- } else {
- C = (C>>>8) ^ T0[(C ^ (224|((c>>12)&15)))&0xFF];
- C = (C>>>8) ^ T0[(C ^ (128|((c>>6)&63)))&0xFF];
- C = (C>>>8) ^ T0[(C ^ (128|(c&63)))&0xFF];
- }
- }
- return ~C;
-}
-CRC32.table = T0;
-// $FlowIgnore
-CRC32.bstr = crc32_bstr;
-// $FlowIgnore
-CRC32.buf = crc32_buf;
-// $FlowIgnore
-CRC32.str = crc32_str;
-}));
-
-
-/***/ }),
-
-/***/ 94521:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-"use strict";
-/**
- * node-crc32-stream
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-crc32-stream/blob/master/LICENSE-MIT
- */
-
-
-
-const {Transform} = __nccwpck_require__(45193);
-
-const crc32 = __nccwpck_require__(83201);
-
-class CRC32Stream extends Transform {
- constructor(options) {
- super(options);
- this.checksum = Buffer.allocUnsafe(4);
- this.checksum.writeInt32BE(0, 0);
-
- this.rawSize = 0;
- }
-
- _transform(chunk, encoding, callback) {
- if (chunk) {
- this.checksum = crc32.buf(chunk, this.checksum) >>> 0;
- this.rawSize += chunk.length;
- }
-
- callback(null, chunk);
- }
-
- digest(encoding) {
- const checksum = Buffer.allocUnsafe(4);
- checksum.writeUInt32BE(this.checksum >>> 0, 0);
- return encoding ? checksum.toString(encoding) : checksum;
- }
-
- hex() {
- return this.digest('hex').toUpperCase();
- }
-
- size() {
- return this.rawSize;
- }
-}
-
-module.exports = CRC32Stream;
-
-
-/***/ }),
-
-/***/ 92563:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-"use strict";
-/**
- * node-crc32-stream
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-crc32-stream/blob/master/LICENSE-MIT
- */
-
-
-
-const {DeflateRaw} = __nccwpck_require__(59796);
-
-const crc32 = __nccwpck_require__(83201);
-
-class DeflateCRC32Stream extends DeflateRaw {
- constructor(options) {
- super(options);
-
- this.checksum = Buffer.allocUnsafe(4);
- this.checksum.writeInt32BE(0, 0);
-
- this.rawSize = 0;
- this.compressedSize = 0;
- }
-
- push(chunk, encoding) {
- if (chunk) {
- this.compressedSize += chunk.length;
- }
-
- return super.push(chunk, encoding);
- }
-
- _transform(chunk, encoding, callback) {
- if (chunk) {
- this.checksum = crc32.buf(chunk, this.checksum) >>> 0;
- this.rawSize += chunk.length;
- }
-
- super._transform(chunk, encoding, callback)
- }
-
- digest(encoding) {
- const checksum = Buffer.allocUnsafe(4);
- checksum.writeUInt32BE(this.checksum >>> 0, 0);
- return encoding ? checksum.toString(encoding) : checksum;
- }
-
- hex() {
- return this.digest('hex').toUpperCase();
- }
-
- size(compressed = false) {
- if (compressed) {
- return this.compressedSize;
- } else {
- return this.rawSize;
- }
- }
-}
-
-module.exports = DeflateCRC32Stream;
-
-
-/***/ }),
-
-/***/ 5101:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-"use strict";
-/**
- * node-crc32-stream
- *
- * Copyright (c) 2014 Chris Talkington, contributors.
- * Licensed under the MIT license.
- * https://github.com/archiverjs/node-crc32-stream/blob/master/LICENSE-MIT
- */
-
-
-
-module.exports = {
- CRC32Stream: __nccwpck_require__(94521),
- DeflateCRC32Stream: __nccwpck_require__(92563)
-}
-
-
-/***/ }),
-
-/***/ 28222:
-/***/ ((module, exports, __nccwpck_require__) => {
-
-/* eslint-env browser */
-
-/**
- * This is the web browser implementation of `debug()`.
- */
-
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-exports.storage = localstorage();
-exports.destroy = (() => {
- let warned = false;
-
- return () => {
- if (!warned) {
- warned = true;
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
- }
- };
-})();
-
-/**
- * Colors.
- */
-
-exports.colors = [
- '#0000CC',
- '#0000FF',
- '#0033CC',
- '#0033FF',
- '#0066CC',
- '#0066FF',
- '#0099CC',
- '#0099FF',
- '#00CC00',
- '#00CC33',
- '#00CC66',
- '#00CC99',
- '#00CCCC',
- '#00CCFF',
- '#3300CC',
- '#3300FF',
- '#3333CC',
- '#3333FF',
- '#3366CC',
- '#3366FF',
- '#3399CC',
- '#3399FF',
- '#33CC00',
- '#33CC33',
- '#33CC66',
- '#33CC99',
- '#33CCCC',
- '#33CCFF',
- '#6600CC',
- '#6600FF',
- '#6633CC',
- '#6633FF',
- '#66CC00',
- '#66CC33',
- '#9900CC',
- '#9900FF',
- '#9933CC',
- '#9933FF',
- '#99CC00',
- '#99CC33',
- '#CC0000',
- '#CC0033',
- '#CC0066',
- '#CC0099',
- '#CC00CC',
- '#CC00FF',
- '#CC3300',
- '#CC3333',
- '#CC3366',
- '#CC3399',
- '#CC33CC',
- '#CC33FF',
- '#CC6600',
- '#CC6633',
- '#CC9900',
- '#CC9933',
- '#CCCC00',
- '#CCCC33',
- '#FF0000',
- '#FF0033',
- '#FF0066',
- '#FF0099',
- '#FF00CC',
- '#FF00FF',
- '#FF3300',
- '#FF3333',
- '#FF3366',
- '#FF3399',
- '#FF33CC',
- '#FF33FF',
- '#FF6600',
- '#FF6633',
- '#FF9900',
- '#FF9933',
- '#FFCC00',
- '#FFCC33'
-];
-
-/**
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
- * and the Firebug extension (any Firefox version) are known
- * to support "%c" CSS customizations.
- *
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
- */
-
-// eslint-disable-next-line complexity
-function useColors() {
- // NB: In an Electron preload script, document will be defined but not fully
- // initialized. Since we know we're in Chrome, we'll just detect this case
- // explicitly
- if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
- return true;
- }
-
- // Internet Explorer and Edge do not support colors.
- if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
- return false;
- }
-
- let m;
-
- // Is webkit? http://stackoverflow.com/a/16459606/376773
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
- // eslint-disable-next-line no-return-assign
- return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
- // Is firebug? http://stackoverflow.com/a/398120/376773
- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
- // Is firefox >= v31?
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
- (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
- // Double check webkit in userAgent just in case we are in a worker
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
-}
-
-/**
- * Colorize log arguments if enabled.
- *
- * @api public
- */
-
-function formatArgs(args) {
- args[0] = (this.useColors ? '%c' : '') +
- this.namespace +
- (this.useColors ? ' %c' : ' ') +
- args[0] +
- (this.useColors ? '%c ' : ' ') +
- '+' + module.exports.humanize(this.diff);
-
- if (!this.useColors) {
- return;
- }
-
- const c = 'color: ' + this.color;
- args.splice(1, 0, c, 'color: inherit');
-
- // The final "%c" is somewhat tricky, because there could be other
- // arguments passed either before or after the %c, so we need to
- // figure out the correct index to insert the CSS into
- let index = 0;
- let lastC = 0;
- args[0].replace(/%[a-zA-Z%]/g, match => {
- if (match === '%%') {
- return;
- }
- index++;
- if (match === '%c') {
- // We only are interested in the *last* %c
- // (the user may have provided their own)
- lastC = index;
- }
- });
-
- args.splice(lastC, 0, c);
-}
-
-/**
- * Invokes `console.debug()` when available.
- * No-op when `console.debug` is not a "function".
- * If `console.debug` is not available, falls back
- * to `console.log`.
- *
- * @api public
- */
-exports.log = console.debug || console.log || (() => {});
-
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-function save(namespaces) {
- try {
- if (namespaces) {
- exports.storage.setItem('debug', namespaces);
- } else {
- exports.storage.removeItem('debug');
- }
- } catch (error) {
- // Swallow
- // XXX (@Qix-) should we be logging these?
- }
-}
-
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-function load() {
- let r;
- try {
- r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
- } catch (error) {
- // Swallow
- // XXX (@Qix-) should we be logging these?
- }
-
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
- if (!r && typeof process !== 'undefined' && 'env' in process) {
- r = process.env.DEBUG;
- }
-
- return r;
-}
-
-/**
- * Localstorage attempts to return the localstorage.
- *
- * This is necessary because safari throws
- * when a user disables cookies/localstorage
- * and you attempt to access it.
- *
- * @return {LocalStorage}
- * @api private
- */
-
-function localstorage() {
- try {
- // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
- // The Browser also has localStorage in the global context.
- return localStorage;
- } catch (error) {
- // Swallow
- // XXX (@Qix-) should we be logging these?
- }
-}
-
-module.exports = __nccwpck_require__(46243)(exports);
-
-const {formatters} = module.exports;
-
-/**
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
- */
-
-formatters.j = function (v) {
- try {
- return JSON.stringify(v);
- } catch (error) {
- return '[UnexpectedJSONParseError]: ' + error.message;
- }
-};
-
-
-/***/ }),
-
-/***/ 46243:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-
-/**
- * This is the common logic for both the Node.js and web browser
- * implementations of `debug()`.
- */
-
-function setup(env) {
- createDebug.debug = createDebug;
- createDebug.default = createDebug;
- createDebug.coerce = coerce;
- createDebug.disable = disable;
- createDebug.enable = enable;
- createDebug.enabled = enabled;
- createDebug.humanize = __nccwpck_require__(80900);
- createDebug.destroy = destroy;
-
- Object.keys(env).forEach(key => {
- createDebug[key] = env[key];
- });
-
- /**
- * The currently active debug mode names, and names to skip.
- */
-
- createDebug.names = [];
- createDebug.skips = [];
-
- /**
- * Map of special "%n" handling functions, for the debug "format" argument.
- *
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
- */
- createDebug.formatters = {};
-
- /**
- * Selects a color for a debug namespace
- * @param {String} namespace The namespace string for the debug instance to be colored
- * @return {Number|String} An ANSI color code for the given namespace
- * @api private
- */
- function selectColor(namespace) {
- let hash = 0;
-
- for (let i = 0; i < namespace.length; i++) {
- hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
- hash |= 0; // Convert to 32bit integer
- }
-
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
- }
- createDebug.selectColor = selectColor;
-
- /**
- * Create a debugger with the given `namespace`.
- *
- * @param {String} namespace
- * @return {Function}
- * @api public
- */
- function createDebug(namespace) {
- let prevTime;
- let enableOverride = null;
- let namespacesCache;
- let enabledCache;
-
- function debug(...args) {
- // Disabled?
- if (!debug.enabled) {
- return;
- }
-
- const self = debug;
-
- // Set `diff` timestamp
- const curr = Number(new Date());
- const ms = curr - (prevTime || curr);
- self.diff = ms;
- self.prev = prevTime;
- self.curr = curr;
- prevTime = curr;
-
- args[0] = createDebug.coerce(args[0]);
-
- if (typeof args[0] !== 'string') {
- // Anything else let's inspect with %O
- args.unshift('%O');
- }
-
- // Apply any `formatters` transformations
- let index = 0;
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
- // If we encounter an escaped % then don't increase the array index
- if (match === '%%') {
- return '%';
- }
- index++;
- const formatter = createDebug.formatters[format];
- if (typeof formatter === 'function') {
- const val = args[index];
- match = formatter.call(self, val);
-
- // Now we need to remove `args[index]` since it's inlined in the `format`
- args.splice(index, 1);
- index--;
- }
- return match;
- });
-
- // Apply env-specific formatting (colors, etc.)
- createDebug.formatArgs.call(self, args);
-
- const logFn = self.log || createDebug.log;
- logFn.apply(self, args);
- }
-
- debug.namespace = namespace;
- debug.useColors = createDebug.useColors();
- debug.color = createDebug.selectColor(namespace);
- debug.extend = extend;
- debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
-
- Object.defineProperty(debug, 'enabled', {
- enumerable: true,
- configurable: false,
- get: () => {
- if (enableOverride !== null) {
- return enableOverride;
- }
- if (namespacesCache !== createDebug.namespaces) {
- namespacesCache = createDebug.namespaces;
- enabledCache = createDebug.enabled(namespace);
- }
-
- return enabledCache;
- },
- set: v => {
- enableOverride = v;
- }
- });
-
- // Env-specific initialization logic for debug instances
- if (typeof createDebug.init === 'function') {
- createDebug.init(debug);
- }
-
- return debug;
- }
-
- function extend(namespace, delimiter) {
- const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
- newDebug.log = this.log;
- return newDebug;
- }
-
- /**
- * Enables a debug mode by namespaces. This can include modes
- * separated by a colon and wildcards.
- *
- * @param {String} namespaces
- * @api public
- */
- function enable(namespaces) {
- createDebug.save(namespaces);
- createDebug.namespaces = namespaces;
-
- createDebug.names = [];
- createDebug.skips = [];
-
- const split = (typeof namespaces === 'string' ? namespaces : '')
- .trim()
- .replace(/\s+/g, ',')
- .split(',')
- .filter(Boolean);
-
- for (const ns of split) {
- if (ns[0] === '-') {
- createDebug.skips.push(ns.slice(1));
- } else {
- createDebug.names.push(ns);
- }
- }
- }
-
- /**
- * Checks if the given string matches a namespace template, honoring
- * asterisks as wildcards.
- *
- * @param {String} search
- * @param {String} template
- * @return {Boolean}
- */
- function matchesTemplate(search, template) {
- let searchIndex = 0;
- let templateIndex = 0;
- let starIndex = -1;
- let matchIndex = 0;
-
- while (searchIndex < search.length) {
- if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
- // Match character or proceed with wildcard
- if (template[templateIndex] === '*') {
- starIndex = templateIndex;
- matchIndex = searchIndex;
- templateIndex++; // Skip the '*'
- } else {
- searchIndex++;
- templateIndex++;
- }
- } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
- // Backtrack to the last '*' and try to match more characters
- templateIndex = starIndex + 1;
- matchIndex++;
- searchIndex = matchIndex;
- } else {
- return false; // No match
- }
- }
-
- // Handle trailing '*' in template
- while (templateIndex < template.length && template[templateIndex] === '*') {
- templateIndex++;
- }
-
- return templateIndex === template.length;
- }
-
- /**
- * Disable debug output.
- *
- * @return {String} namespaces
- * @api public
- */
- function disable() {
- const namespaces = [
- ...createDebug.names,
- ...createDebug.skips.map(namespace => '-' + namespace)
- ].join(',');
- createDebug.enable('');
- return namespaces;
- }
-
- /**
- * Returns true if the given mode name is enabled, false otherwise.
- *
- * @param {String} name
- * @return {Boolean}
- * @api public
- */
- function enabled(name) {
- for (const skip of createDebug.skips) {
- if (matchesTemplate(name, skip)) {
- return false;
- }
- }
-
- for (const ns of createDebug.names) {
- if (matchesTemplate(name, ns)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Coerce `val`.
- *
- * @param {Mixed} val
- * @return {Mixed}
- * @api private
- */
- function coerce(val) {
- if (val instanceof Error) {
- return val.stack || val.message;
- }
- return val;
- }
-
- /**
- * XXX DO NOT USE. This is a temporary stub function.
- * XXX It WILL be removed in the next major release.
- */
- function destroy() {
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
- }
-
- createDebug.enable(createDebug.load());
-
- return createDebug;
-}
-
-module.exports = setup;
-
-
-/***/ }),
-
-/***/ 38237:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-/**
- * Detect Electron renderer / nwjs process, which is node, but we should
- * treat as a browser.
- */
-
-if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
- module.exports = __nccwpck_require__(28222);
-} else {
- module.exports = __nccwpck_require__(35332);
-}
-
-
-/***/ }),
-
-/***/ 35332:
-/***/ ((module, exports, __nccwpck_require__) => {
-
-/**
- * Module dependencies.
- */
-
-const tty = __nccwpck_require__(76224);
-const util = __nccwpck_require__(73837);
-
-/**
- * This is the Node.js implementation of `debug()`.
- */
-
-exports.init = init;
-exports.log = log;
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-exports.destroy = util.deprecate(
- () => {},
- 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
-);
-
-/**
- * Colors.
- */
-
-exports.colors = [6, 2, 3, 4, 5, 1];
-
-try {
- // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
- // eslint-disable-next-line import/no-extraneous-dependencies
- const supportsColor = __nccwpck_require__(59318);
-
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
- exports.colors = [
- 20,
- 21,
- 26,
- 27,
- 32,
- 33,
- 38,
- 39,
- 40,
- 41,
- 42,
- 43,
- 44,
- 45,
- 56,
- 57,
- 62,
- 63,
- 68,
- 69,
- 74,
- 75,
- 76,
- 77,
- 78,
- 79,
- 80,
- 81,
- 92,
- 93,
- 98,
- 99,
- 112,
- 113,
- 128,
- 129,
- 134,
- 135,
- 148,
- 149,
- 160,
- 161,
- 162,
- 163,
- 164,
- 165,
- 166,
- 167,
- 168,
- 169,
- 170,
- 171,
- 172,
- 173,
- 178,
- 179,
- 184,
- 185,
- 196,
- 197,
- 198,
- 199,
- 200,
- 201,
- 202,
- 203,
- 204,
- 205,
- 206,
- 207,
- 208,
- 209,
- 214,
- 215,
- 220,
- 221
- ];
- }
-} catch (error) {
- // Swallow - we only care if `supports-color` is available; it doesn't have to be.
-}
-
-/**
- * Build up the default `inspectOpts` object from the environment variables.
- *
- * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
- */
-
-exports.inspectOpts = Object.keys(process.env).filter(key => {
- return /^debug_/i.test(key);
-}).reduce((obj, key) => {
- // Camel-case
- const prop = key
- .substring(6)
- .toLowerCase()
- .replace(/_([a-z])/g, (_, k) => {
- return k.toUpperCase();
- });
-
- // Coerce string value into JS value
- let val = process.env[key];
- if (/^(yes|on|true|enabled)$/i.test(val)) {
- val = true;
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
- val = false;
- } else if (val === 'null') {
- val = null;
- } else {
- val = Number(val);
- }
-
- obj[prop] = val;
- return obj;
-}, {});
-
-/**
- * Is stdout a TTY? Colored output is enabled when `true`.
- */
-
-function useColors() {
- return 'colors' in exports.inspectOpts ?
- Boolean(exports.inspectOpts.colors) :
- tty.isatty(process.stderr.fd);
-}
-
-/**
- * Adds ANSI color escape codes if enabled.
- *
- * @api public
- */
-
-function formatArgs(args) {
- const {namespace: name, useColors} = this;
-
- if (useColors) {
- const c = this.color;
- const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
- const prefix = ` ${colorCode};1m${name} \u001B[0m`;
-
- args[0] = prefix + args[0].split('\n').join('\n' + prefix);
- args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
- } else {
- args[0] = getDate() + name + ' ' + args[0];
- }
-}
-
-function getDate() {
- if (exports.inspectOpts.hideDate) {
- return '';
- }
- return new Date().toISOString() + ' ';
-}
-
-/**
- * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
- */
-
-function log(...args) {
- return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
-}
-
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-function save(namespaces) {
- if (namespaces) {
- process.env.DEBUG = namespaces;
- } else {
- // If you set a process.env field to null or undefined, it gets cast to the
- // string 'null' or 'undefined'. Just delete instead.
- delete process.env.DEBUG;
- }
-}
-
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-
-function load() {
- return process.env.DEBUG;
-}
-
-/**
- * Init logic for `debug` instances.
- *
- * Create a new `inspectOpts` object in case `useColors` is set
- * differently for a particular `debug` instance.
- */
-
-function init(debug) {
- debug.inspectOpts = {};
-
- const keys = Object.keys(exports.inspectOpts);
- for (let i = 0; i < keys.length; i++) {
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
- }
-}
-
-module.exports = __nccwpck_require__(46243)(exports);
-
-const {formatters} = module.exports;
-
-/**
- * Map %o to `util.inspect()`, all on a single line.
- */
-
-formatters.o = function (v) {
- this.inspectOpts.colors = this.useColors;
- return util.inspect(v, this.inspectOpts)
- .split('\n')
- .map(str => str.trim())
- .join(' ');
-};
-
-/**
- * Map %O to `util.inspect()`, allowing multiple lines if needed.
- */
-
-formatters.O = function (v) {
- this.inspectOpts.colors = this.useColors;
- return util.inspect(v, this.inspectOpts);
-};
-
-
-/***/ }),
-
-/***/ 58932:
-/***/ ((__unused_webpack_module, exports) => {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-
-class Deprecation extends Error {
- constructor(message) {
- super(message); // Maintains proper stack trace (only available on V8)
-
- /* istanbul ignore next */
-
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, this.constructor);
- }
-
- this.name = 'Deprecation';
- }
-
-}
-
-exports.Deprecation = Deprecation;
-
-
-/***/ }),
-
-/***/ 84697:
-/***/ ((module, exports) => {
-
-"use strict";
-/**
- * @author Toru Nagashima
- * @copyright 2015 Toru Nagashima. All rights reserved.
- * See LICENSE file in root directory for full license.
- */
-
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-
-/**
- * @typedef {object} PrivateData
- * @property {EventTarget} eventTarget The event target.
- * @property {{type:string}} event The original event object.
- * @property {number} eventPhase The current event phase.
- * @property {EventTarget|null} currentTarget The current event target.
- * @property {boolean} canceled The flag to prevent default.
- * @property {boolean} stopped The flag to stop propagation.
- * @property {boolean} immediateStopped The flag to stop propagation immediately.
- * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.
- * @property {number} timeStamp The unix time.
- * @private
- */
-
-/**
- * Private data for event wrappers.
- * @type {WeakMap}
- * @private
- */
-const privateData = new WeakMap();
-
-/**
- * Cache for wrapper classes.
- * @type {WeakMap