Merge pull request #139 from Sparticuz/feature/116

This commit is contained in:
Kyle McNally 2023-08-18 17:25:53 -04:00 committed by GitHub
commit 27ba2eeaf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 205 additions and 493 deletions

View File

@ -2,37 +2,37 @@ name: AWS Lambda CI
on: on:
push: push:
branches: [ master ] branches: [master]
pull_request: pull_request:
branches: [ master ] branches: [master]
jobs: jobs:
build: build:
name: Build Lambda Layer name: Build Lambda Layer
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 18.x node-version: 18.x
- name: Install Packages - name: Install Packages
run: npm ci run: npm ci
- name: Compile Typescript - name: Compile Typescript
run: npm run build run: npm run build
- name: Create Lambda Layer - name: Create Lambda Layer
run: make chromium.zip run: make chromium.zip
- name: Upload Layer Artifact - name: Upload Layer Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: chromium name: chromium
path: chromium.zip path: chromium.zip
execute: execute:
name: Lambda (Node ${{ matrix.version }}.x) name: Lambda (Node ${{ matrix.version }}.x)
@ -46,27 +46,27 @@ jobs:
- 16 - 16
- 18 - 18
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: '3.x' python-version: "3.x"
- name: Setup AWS SAM CLI - name: Setup AWS SAM CLI
uses: aws-actions/setup-sam@v2 uses: aws-actions/setup-sam@v2
- name: Download Layer Artifact - name: Download Layer Artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: chromium name: chromium
- name: Provision Layer - name: Provision Layer
run: unzip chromium.zip -d _/amazon/code run: unzip chromium.zip -d _/amazon/code
- name: Install test dependencies - name: Install test dependencies
run: npm install --prefix _/amazon/handlers puppeteer-core --bin-links=false --fund=false --omit=optional --omit=dev --package-lock=false --save=false run: npm install --prefix _/amazon/handlers puppeteer-core --bin-links=false --fund=false --omit=optional --omit=dev --package-lock=false --save=false
- name: Invoke Lambda on SAM - name: Invoke Lambda on SAM
run: sam local invoke --template _/amazon/template.yml --event _/amazon/events/${{ matrix.event }}.json node${{ matrix.version }} 2>&1 | (grep 'Error' && exit 1 || exit 0) run: sam local invoke --template _/amazon/template.yml --event _/amazon/events/${{ matrix.event }}.json node${{ matrix.version }} 2>&1 | (grep 'Error' && exit 1 || exit 0)

View File

@ -10,71 +10,70 @@ jobs:
name: Build and release name: Build and release
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Install jq so I can edit package.json from the command line # Install jq so I can edit package.json from the command line
- run: sudo apt-get install jq -y - run: sudo apt-get install jq -y
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 18.x node-version: 18.x
registry-url: https://registry.npmjs.org/ registry-url: https://registry.npmjs.org/
- run: npm ci - run: npm ci
- run: npm run build - run: npm run build
- name: Release chromium on npmjs - name: Release chromium on npmjs
run: npm publish run: npm publish
env: env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Create Lambda Layer - name: Create Lambda Layer
run: make chromium-${{ github.ref_name }}-layer.zip run: make chromium-${{ github.ref_name }}-layer.zip
# Change the package name to chromium-min, # Change the package name to chromium-min,
# delete the bin folder from the files array # delete the bin folder from the files array
# so that it doesn't publish the binaries to -min # so that it doesn't publish the binaries to -min
- name: Cleanup and prepare for chromium-min - name: Cleanup and prepare for chromium-min
run: | run: |
jq '.name="@sparticuz/chromium-min"' package.json > .package.json jq '.name="@sparticuz/chromium-min"' package.json > .package.json
jq 'del(.files[] | select(. == "bin"))' .package.json > package.json jq 'del(.files[] | select(. == "bin"))' .package.json > package.json
jq '.homepage="https://github.com/Sparticuz/chromium#-min-package"' package.json > .package.json jq '.homepage="https://github.com/Sparticuz/chromium#-min-package"' package.json > .package.json
mv .package.json package.json mv .package.json package.json
rm package-lock.json rm package-lock.json
npm install npm install
- name: Release chromium-min on npmjs - name: Release chromium-min on npmjs
run: npm publish run: npm publish
env: env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Create Chromium Pack - name: Create Chromium Pack
run: | run: |
cd bin cd bin
tar -cvf chromium-${{ github.ref_name }}-pack.tar * tar -cvf chromium-${{ github.ref_name }}-pack.tar *
mv chromium-${{ github.ref_name }}-pack.tar .. mv chromium-${{ github.ref_name }}-pack.tar ..
cd .. cd ..
- name: Upload items to Github Release - name: Upload items to Github Release
uses: ncipollo/release-action@v1.12.0 uses: ncipollo/release-action@v1.12.0
with: with:
tag: ${{ github.ref_name }} tag: ${{ github.ref_name }}
body: | body: |
# [@sparticuz/chromium ${{ github.ref_name }}](https://www.npmjs.com/package/@sparticuz/chromium), [@sparticuz/chromium-min ${{ github.ref_name }}](https://www.npmjs.com/package/@sparticuz/chromium-min) # [@sparticuz/chromium ${{ github.ref_name }}](https://www.npmjs.com/package/@sparticuz/chromium), [@sparticuz/chromium-min ${{ github.ref_name }}](https://www.npmjs.com/package/@sparticuz/chromium-min)
The `chromium-${{ github.ref_name }}-layer.zip` file may be uploaded directly as a layer in AWS Lambda using the following code The `chromium-${{ github.ref_name }}-layer.zip` file may be uploaded directly as a layer in AWS Lambda using the following code
``` ```
bucketName="chromiumUploadBucket" && \ bucketName="chromiumUploadBucket" && \
aws s3 cp chromium-${{ github.ref_name }}-layer.zip "s3://${bucketName}/chromiumLayers/chromium-${{ github.ref_name }}-layer.zip" && \ aws s3 cp chromium-${{ github.ref_name }}-layer.zip "s3://${bucketName}/chromiumLayers/chromium-${{ github.ref_name }}-layer.zip" && \
aws lambda publish-layer-version --layer-name chromium --description "Chromium ${{ github.ref_name }}" --content "S3Bucket=${bucketName},S3Key=chromiumLayers/chromium-${{ github.ref_name }}-layer.zip" --compatible-runtimes nodejs --compatible-architectures x86_64 aws lambda publish-layer-version --layer-name chromium --description "Chromium ${{ github.ref_name }}" --content "S3Bucket=${bucketName},S3Key=chromiumLayers/chromium-${{ github.ref_name }}-layer.zip" --compatible-runtimes nodejs --compatible-architectures x86_64
``` ```
The `chromium-${{ github.ref_name }}-pack.tar` file may be uploaded to any https endpoint and the remote location may be used as the `input` variable in the `chromium.executablePath(input)` function. The `chromium-${{ github.ref_name }}-pack.tar` file may be uploaded to any https endpoint and the remote location may be used as the `input` variable in the `chromium.executablePath(input)` function.
artifacts: "chromium-${{ github.ref_name }}-layer.zip,chromium-${{ github.ref_name }}-pack.tar" artifacts: "chromium-${{ github.ref_name }}-layer.zip,chromium-${{ github.ref_name }}-pack.tar"
prerelease: false prerelease: false
draft: true draft: true
generateReleaseNotes: true generateReleaseNotes: true
token: ${{ github.token }} token: ${{ github.token }}
owner: Sparticuz owner: Sparticuz
repo: chromium repo: chromium

View File

@ -21,7 +21,7 @@ test:
npm pack npm pack
mkdir -p nodejs/node_modules/@sparticuz/chromium/ mkdir -p nodejs/node_modules/@sparticuz/chromium/
tar --directory nodejs/node_modules/@sparticuz/chromium/ --extract --file sparticuz-chromium-*.tgz --strip-components=1 tar --directory nodejs/node_modules/@sparticuz/chromium/ --extract --file sparticuz-chromium-*.tgz --strip-components=1
npx clean-modules --directory nodejs --include "**/*.d.ts" "**/@types/**" "**/*.@(yaml|yml)" --yes npx clean-modules --directory nodejs "**/*.d.ts" "**/@types/**" "**/*.@(yaml|yml)" --yes
rm sparticuz-chromium-*.tgz rm sparticuz-chromium-*.tgz
mkdir -p $(dir $@) mkdir -p $(dir $@)
zip -9 --filesync --move --recurse-paths $@ nodejs zip -9 --filesync --move --recurse-paths $@ nodejs

View File

@ -1,7 +1,7 @@
const { ok } = require('assert'); const { ok } = require("assert");
const { createHash } = require('crypto'); const { createHash } = require("crypto");
const puppeteer = require("puppeteer-core"); const puppeteer = require("puppeteer-core");
const chromium = require('@sparticuz/chromium'); const chromium = require("@sparticuz/chromium");
exports.handler = async (event, context) => { exports.handler = async (event, context) => {
let browser = null; let browser = null;
@ -15,9 +15,9 @@ exports.handler = async (event, context) => {
ignoreHTTPSErrors: true, ignoreHTTPSErrors: true,
}); });
const contexts = [ console.log("Chromium verion", await browser.version());
browser.defaultBrowserContext(),
]; const contexts = [browser.defaultBrowserContext()];
while (contexts.length < event.length) { while (contexts.length < event.length) {
contexts.push(await browser.createIncognitoBrowserContext()); contexts.push(await browser.createIncognitoBrowserContext());
@ -27,23 +27,31 @@ exports.handler = async (event, context) => {
const job = event.shift(); const job = event.shift();
const page = await context.newPage(); const page = await context.newPage();
if (job.hasOwnProperty('url') === true) { if (job.hasOwnProperty("url") === true) {
await page.goto(job.url, { waitUntil: ['domcontentloaded', 'load'] }); await page.goto(job.url, { waitUntil: ["domcontentloaded", "load"] });
if (job.hasOwnProperty('expected') === true) { if (job.hasOwnProperty("expected") === true) {
if (job.expected.hasOwnProperty('title') === true) { if (job.expected.hasOwnProperty("title") === true) {
ok(await page.title() === job.expected.title, `Title assertion failed.`); ok(
(await page.title()) === job.expected.title,
`Title assertion failed.`
);
} }
if (job.expected.hasOwnProperty('screenshot') === true) { if (job.expected.hasOwnProperty("screenshot") === true) {
if (job.expected.hasOwnProperty('remove') === true) { if (job.expected.hasOwnProperty("remove") === true) {
await page.evaluate((selector) => { await page.evaluate((selector) => {
document.getElementById(selector).remove(); document.getElementById(selector).remove();
}, job.expected.remove); }, job.expected.remove);
} }
const screenshot = await page.screenshot(); const screenshot = await page.screenshot();
// console.log(screenshot.toString('base64'), createHash('sha1').update(screenshot.toString('base64')).digest('hex')); // console.log(screenshot.toString('base64'), createHash('sha1').update(screenshot.toString('base64')).digest('hex'));
ok(createHash('sha1').update(screenshot.toString('base64')).digest('hex') === job.expected.screenshot, `Screenshot assertion failed.`); ok(
createHash("sha1")
.update(screenshot.toString("base64"))
.digest("hex") === job.expected.screenshot,
`Screenshot assertion failed.`
);
} }
} }
} }

View File

@ -9,11 +9,11 @@ Resources:
layer: layer:
Type: AWS::Serverless::LayerVersion Type: AWS::Serverless::LayerVersion
Properties: Properties:
LayerName: sparticuz-chromium LayerName: sparticuz-chromium
ContentUri: code/ ContentUri: code/
CompatibleRuntimes: CompatibleRuntimes:
- nodejs16.x - nodejs16.x
- nodejs18.x - nodejs18.x
node16: node16:
Type: AWS::Serverless::Function Type: AWS::Serverless::Function

View File

@ -14,4 +14,4 @@ instance_size=c6i.12xlarge
ansible_connection=ssh ansible_connection=ssh
ansible_python_interpreter=auto_silent ansible_python_interpreter=auto_silent
ansible_ssh_private_key_file=ansible.pem ansible_ssh_private_key_file=ansible.pem
chromium_revision=1148114 chromium_revision=1160321

BIN
bin/chromium.br Normal file → Executable file

Binary file not shown.

Binary file not shown.

440
package-lock.json generated
View File

@ -10,7 +10,7 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.2", "follow-redirects": "^1.15.2",
"tar-fs": "^2.1.1" "tar-fs": "^3.0.4"
}, },
"devDependencies": { "devDependencies": {
"@tsconfig/node16": "^1.0.4", "@tsconfig/node16": "^1.0.4",
@ -18,8 +18,8 @@
"@types/follow-redirects": "^1.14.1", "@types/follow-redirects": "^1.14.1",
"@types/node": "^18.16.17", "@types/node": "^18.16.17",
"@types/tar-fs": "^2.0.1", "@types/tar-fs": "^2.0.1",
"clean-modules": "^2.0.6", "clean-modules": "^3.0.4",
"typescript": "^5.1.3" "typescript": "^5.1.6"
}, },
"engines": { "engines": {
"node": ">= 16" "node": ">= 16"
@ -71,151 +71,42 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"node_modules/ansi-regex": { "node_modules/b4a": {
"version": "5.0.1", "version": "1.6.4",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw=="
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/arg": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
"integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
"dev": true
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/bl": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
"dependencies": {
"buffer": "^5.5.0",
"inherits": "^2.0.4",
"readable-stream": "^3.4.0"
}
},
"node_modules/buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"node_modules/chownr": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
}, },
"node_modules/clean-modules": { "node_modules/clean-modules": {
"version": "2.0.6", "version": "3.0.4",
"resolved": "https://registry.npmjs.org/clean-modules/-/clean-modules-2.0.6.tgz", "resolved": "https://registry.npmjs.org/clean-modules/-/clean-modules-3.0.4.tgz",
"integrity": "sha512-e3R40CfLfzS3tlBWO5RcIMZYsIecEERklMln5qb4HvvujyvLLTi2lPEhhCGtH5gJL+4t0lVguiynMHXNkNdoDA==", "integrity": "sha512-UtidYdwZScv7TEmPuNBU1IDh2UrLH9FNYnhKYterm3jTtOGtSOa02J5aKHvnauqS/TKqJGPpC4bmuRDAXk61EQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"arg": "^5.0.1", "clipanion": "^3.2.1",
"picomatch": "^2.3.0", "picomatch": "^2.3.0",
"pretty-bytes": "^5.6.0", "pretty-bytes": "^6.1.0",
"pretty-ms": "^7.0.1", "pretty-ms": "^8.0.0",
"supports-color": "^8.1.1", "supports-color": "^9.4.0"
"yargs": "^17.1.1"
}, },
"bin": { "bin": {
"clean-modules": "bin/cli.js" "clean-modules": "bin/cli.js"
}, },
"engines": { "engines": {
"node": ">=12" "node": ">=14"
} }
}, },
"node_modules/cliui": { "node_modules/clipanion": {
"version": "8.0.1", "version": "3.2.1",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "resolved": "https://registry.npmjs.org/clipanion/-/clipanion-3.2.1.tgz",
"integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "integrity": "sha512-dYFdjLb7y1ajfxQopN05mylEpK9ZX0sO1/RfMXdfmwjlIsPkbh4p7A682x++zFPLDCo1x3p82dtljHf5cW2LKA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"string-width": "^4.2.0", "typanion": "^3.8.0"
"strip-ansi": "^6.0.1",
"wrap-ansi": "^7.0.0"
}, },
"engines": { "peerDependencies": {
"node": ">=12" "typanion": "*"
} }
}, },
"node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"dependencies": {
"color-name": "~1.1.4"
},
"engines": {
"node": ">=7.0.0"
}
},
"node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"node_modules/end-of-stream": { "node_modules/end-of-stream": {
"version": "1.4.4", "version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
@ -224,14 +115,10 @@
"once": "^1.4.0" "once": "^1.4.0"
} }
}, },
"node_modules/escalade": { "node_modules/fast-fifo": {
"version": "3.1.1", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.0.tgz",
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "integrity": "sha512-IgfweLvEpwyA4WgiQe9Nx6VV2QkML2NkvZnk1oKnIzXgXdWxuhF7zw4DvLTPZJn6PIUneiAXPF24QmoEqHTjyw=="
"dev": true,
"engines": {
"node": ">=6"
}
}, },
"node_modules/follow-redirects": { "node_modules/follow-redirects": {
"version": "1.15.2", "version": "1.15.2",
@ -252,62 +139,6 @@
} }
} }
}, },
"node_modules/fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
},
"node_modules/get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true,
"engines": {
"node": "6.* || 8.* || >= 10.*"
}
},
"node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/mkdirp-classic": { "node_modules/mkdirp-classic": {
"version": "0.5.3", "version": "0.5.3",
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
@ -322,12 +153,15 @@
} }
}, },
"node_modules/parse-ms": { "node_modules/parse-ms": {
"version": "2.1.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz",
"integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", "integrity": "sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=6" "node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/picomatch": { "node_modules/picomatch": {
@ -343,27 +177,27 @@
} }
}, },
"node_modules/pretty-bytes": { "node_modules/pretty-bytes": {
"version": "5.6.0", "version": "6.1.1",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.1.tgz",
"integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", "integrity": "sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=6" "node": "^14.13.1 || >=16.0.0"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/pretty-ms": { "node_modules/pretty-ms": {
"version": "7.0.1", "version": "8.0.0",
"resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-8.0.0.tgz",
"integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", "integrity": "sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"parse-ms": "^2.1.0" "parse-ms": "^3.0.0"
}, },
"engines": { "engines": {
"node": ">=10" "node": ">=14.16"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
@ -378,126 +212,62 @@
"once": "^1.3.1" "once": "^1.3.1"
} }
}, },
"node_modules/readable-stream": { "node_modules/queue-tick": {
"version": "3.6.0", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag=="
},
"node_modules/streamx": {
"version": "2.15.1",
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.1.tgz",
"integrity": "sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA==",
"dependencies": { "dependencies": {
"inherits": "^2.0.3", "fast-fifo": "^1.1.0",
"string_decoder": "^1.1.1", "queue-tick": "^1.0.1"
"util-deprecate": "^1.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"dependencies": {
"safe-buffer": "~5.2.0"
}
},
"node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
} }
}, },
"node_modules/supports-color": { "node_modules/supports-color": {
"version": "8.1.1", "version": "9.4.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz",
"integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==",
"dev": true, "dev": true,
"dependencies": {
"has-flag": "^4.0.0"
},
"engines": { "engines": {
"node": ">=10" "node": ">=12"
}, },
"funding": { "funding": {
"url": "https://github.com/chalk/supports-color?sponsor=1" "url": "https://github.com/chalk/supports-color?sponsor=1"
} }
}, },
"node_modules/tar-fs": { "node_modules/tar-fs": {
"version": "2.1.1", "version": "3.0.4",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz",
"integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==",
"dependencies": { "dependencies": {
"chownr": "^1.1.1",
"mkdirp-classic": "^0.5.2", "mkdirp-classic": "^0.5.2",
"pump": "^3.0.0", "pump": "^3.0.0",
"tar-stream": "^2.1.4" "tar-stream": "^3.1.5"
} }
}, },
"node_modules/tar-stream": { "node_modules/tar-stream": {
"version": "2.2.0", "version": "3.1.6",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz",
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==",
"dependencies": { "dependencies": {
"bl": "^4.0.3", "b4a": "^1.6.4",
"end-of-stream": "^1.4.1", "fast-fifo": "^1.2.0",
"fs-constants": "^1.0.0", "streamx": "^2.15.0"
"inherits": "^2.0.3",
"readable-stream": "^3.1.1"
},
"engines": {
"node": ">=6"
} }
}, },
"node_modules/typanion": {
"version": "3.14.0",
"resolved": "https://registry.npmjs.org/typanion/-/typanion-3.14.0.tgz",
"integrity": "sha512-ZW/lVMRabETuYCd9O9ZvMhAh8GslSqaUjxmK/JLPCh6l73CvLBiuXswj/+7LdnWOgYsQ130FqLzFz5aGT4I3Ug==",
"dev": true
},
"node_modules/typescript": { "node_modules/typescript": {
"version": "5.1.3", "version": "5.1.6",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
"integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
"dev": true, "dev": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
@ -507,68 +277,10 @@
"node": ">=14.17" "node": ">=14.17"
} }
}, },
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
"node_modules/wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/wrappy": { "node_modules/wrappy": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
"node_modules/y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
"dev": true,
"engines": {
"node": ">=10"
}
},
"node_modules/yargs": {
"version": "17.7.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz",
"integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==",
"dev": true,
"dependencies": {
"cliui": "^8.0.1",
"escalade": "^3.1.1",
"get-caller-file": "^2.0.5",
"require-directory": "^2.1.1",
"string-width": "^4.2.3",
"y18n": "^5.0.5",
"yargs-parser": "^21.1.1"
},
"engines": {
"node": ">=12"
}
},
"node_modules/yargs-parser": {
"version": "21.1.1",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
"integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
"dev": true,
"engines": {
"node": ">=12"
}
} }
} }
} }

View File

@ -37,7 +37,7 @@
}, },
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.2", "follow-redirects": "^1.15.2",
"tar-fs": "^2.1.1" "tar-fs": "^3.0.4"
}, },
"devDependencies": { "devDependencies": {
"@tsconfig/node16": "^1.0.4", "@tsconfig/node16": "^1.0.4",
@ -45,8 +45,8 @@
"@types/follow-redirects": "^1.14.1", "@types/follow-redirects": "^1.14.1",
"@types/node": "^18.16.17", "@types/node": "^18.16.17",
"@types/tar-fs": "^2.0.1", "@types/tar-fs": "^2.0.1",
"clean-modules": "^2.0.6", "clean-modules": "^3.0.4",
"typescript": "^5.1.3" "typescript": "^5.1.6"
}, },
"engines": { "engines": {
"node": ">= 16" "node": ">= 16"

View File

@ -1,17 +1,10 @@
{ {
"extends": [ "extends": ["@tsconfig/node16/tsconfig", "@tsconfig/strictest"],
"@tsconfig/node16/tsconfig",
"@tsconfig/strictest"
],
"compilerOptions": { "compilerOptions": {
"declaration": true, "declaration": true,
"lib": [ "lib": ["dom", "ES2021"],
"dom"
],
"module": "commonjs", "module": "commonjs",
"outDir": "build", "outDir": "build"
}, },
"include": [ "include": ["source"]
"source"
]
} }