├── .prettierignore ├── .gitattributes ├── example-app ├── .gitignore ├── README.md ├── src │ └── index.ts ├── tsconfig.json ├── spin.toml ├── package.json ├── webpack.config.js └── package-lock.json ├── .eslintignore ├── Makefile ├── jest.config.js ├── .prettierrc.json ├── .github ├── dependabot.yml └── workflows │ ├── pr-check-dist.yml │ ├── release-tag.yml │ ├── e2e-spin-deploy.yml │ ├── e2e-spin-preview.yml │ ├── e2e-spin-setup.yml │ └── e2e-spin-push.yml ├── src ├── setup.ts ├── push.ts ├── deploy.ts ├── preview.ts ├── system.ts ├── github.ts ├── cloud.ts ├── spin.ts ├── actions.ts └── downloader.ts ├── spin ├── setup │ └── action.yml ├── push │ └── action.yml ├── deploy │ └── action.yml └── preview │ └── action.yml ├── tsconfig.json ├── package.json ├── .gitignore ├── .eslintrc.json ├── LICENSE └── README.md /.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | lib/ 3 | node_modules/ -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | dist/** -diff linguist-generated=true -------------------------------------------------------------------------------- /example-app/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | target 4 | .spin/ -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | lib/ 3 | node_modules/ 4 | jest.config.js 5 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: build 2 | build: 3 | npm run build 4 | npm run package 5 | -------------------------------------------------------------------------------- /example-app/README.md: -------------------------------------------------------------------------------- 1 | ## HTTP-TS template 2 | 3 | This is a simple template to get started with spin-js-sdk using typescript. -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | clearMocks: true, 3 | moduleFileExtensions: ['js', 'ts'], 4 | testMatch: ['**/*.test.ts'], 5 | transform: { 6 | '^.+\\.ts$': 'ts-jest' 7 | }, 8 | verbose: true 9 | } -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": false, 6 | "singleQuote": true, 7 | "trailingComma": "none", 8 | "bracketSpacing": false, 9 | "arrowParens": "avoid" 10 | } 11 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: / 5 | schedule: 6 | interval: daily 7 | 8 | - package-ecosystem: npm 9 | directory: / 10 | schedule: 11 | interval: daily 12 | -------------------------------------------------------------------------------- /src/setup.ts: -------------------------------------------------------------------------------- 1 | import * as actions from './actions' 2 | import * as core from '@actions/core' 3 | 4 | async function run(): Promise { 5 | try { 6 | await actions.setup() 7 | } catch (error) { 8 | if (error instanceof Error) core.setFailed(error.message) 9 | } 10 | } 11 | 12 | run() 13 | -------------------------------------------------------------------------------- /src/push.ts: -------------------------------------------------------------------------------- 1 | import * as actions from './actions' 2 | import * as core from '@actions/core' 3 | 4 | async function run(): Promise { 5 | try { 6 | await actions.build() 7 | await actions.registryLogin() 8 | await actions.push() 9 | } catch (error) { 10 | if (error instanceof Error) core.setFailed(error.message) 11 | } 12 | } 13 | 14 | run() 15 | -------------------------------------------------------------------------------- /example-app/src/index.ts: -------------------------------------------------------------------------------- 1 | import { HandleRequest, HttpRequest, HttpResponse} from "@fermyon/spin-sdk" 2 | 3 | const encoder = new TextEncoder() 4 | 5 | export const handleRequest: HandleRequest = async function(request: HttpRequest): Promise { 6 | return { 7 | status: 200, 8 | headers: { "foo": "bar" }, 9 | body: encoder.encode("Hello from TS-SDK").buffer 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /example-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "./dist/", 4 | "noImplicitAny": true, 5 | "module": "es6", 6 | "target": "es5", 7 | "jsx": "react", 8 | "skipLibCheck": true, 9 | "lib": ["ES2015"], 10 | "allowJs": true, 11 | "strict": true, 12 | "noImplicitReturns": true, 13 | "moduleResolution": "node" 14 | } 15 | } -------------------------------------------------------------------------------- /example-app/spin.toml: -------------------------------------------------------------------------------- 1 | spin_manifest_version = "1" 2 | authors = ["Rajat Jindal "] 3 | description = "" 4 | name = "example-app" 5 | trigger = { type = "http", base = "/" } 6 | version = "0.1.0" 7 | 8 | [[component]] 9 | id = "example-app" 10 | source = "target/spin-http-js.wasm" 11 | exclude_files = ["**/node_modules"] 12 | key_value_stores = ["default"] 13 | [component.trigger] 14 | route = "/..." 15 | [component.build] 16 | command = "npm install && npm run build" 17 | -------------------------------------------------------------------------------- /example-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-app", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "npx webpack --mode=production && mkdir -p target && spin js2wasm -o target/spin-http-js.wasm dist/spin.js", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "devDependencies": { 14 | "@fermyon/spin-sdk": "^0.4.1", 15 | "ts-loader": "^9.4.1", 16 | "typescript": "^4.8.4", 17 | "webpack": "^5.74.0", 18 | "webpack-cli": "^4.10.0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /example-app/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | entry: './src/index.ts', 5 | module: { 6 | rules: [ 7 | { 8 | test: /\.tsx?$/, 9 | use: 'ts-loader', 10 | exclude: /node_modules/, 11 | }, 12 | ], 13 | }, 14 | resolve: { 15 | extensions: ['.tsx', '.ts', '.js'], 16 | }, 17 | output: { 18 | path: path.resolve(__dirname, 'dist'), 19 | filename: 'spin.js', 20 | library: 'spin' 21 | }, 22 | optimization: { 23 | minimize: false 24 | }, 25 | }; 26 | -------------------------------------------------------------------------------- /.github/workflows/pr-check-dist.yml: -------------------------------------------------------------------------------- 1 | name: Ensure dist package is up to date 2 | on: 3 | pull_request: 4 | branches: [main] 5 | 6 | push: 7 | branches: [main] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | 15 | - uses: actions/setup-node@v3 16 | with: 17 | node-version: 19 18 | 19 | - name: npm install 20 | run: npm install 21 | 22 | - name: npm run build 23 | run: npm run package 24 | env: 25 | NODE_OPTIONS: --openssl-legacy-provider 26 | 27 | - name: ensure dist is up to date 28 | run: git diff --exit-code 29 | -------------------------------------------------------------------------------- /spin/setup/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Setup Fermyon Spin' 2 | description: 'Set up your GitHub Actions workflow with a specific version of spin' 3 | author: 'Fermyon Engineering' 4 | inputs: 5 | version: 6 | required: false 7 | description: 'version of Spin to setup' 8 | default: latest 9 | plugins: 10 | required: false 11 | description: 'comma separated list of plugins to install' 12 | github_token: 13 | required: false 14 | description: 'When downloading Spin, GitHub may rate limit anonymous downloads. Set this to use authenticated downloads, which are are subject to a higher limits.' 15 | runs: 16 | using: 'node20' 17 | main: '../../dist/spin/setup/index.js' 18 | -------------------------------------------------------------------------------- /src/deploy.ts: -------------------------------------------------------------------------------- 1 | import * as actions from './actions' 2 | import * as cloud from './cloud' 3 | import * as core from '@actions/core' 4 | 5 | async function run(): Promise { 6 | try { 7 | const buildEnabled = 8 | core.getBooleanInput('run_build') === false ? false : true 9 | if (buildEnabled) { 10 | await actions.build() 11 | } 12 | 13 | const token = core.getInput('fermyon_token', {required: true}) 14 | await cloud.login(token) 15 | 16 | const appUrl = await actions.deploy() 17 | core.setOutput('app-url', appUrl) 18 | core.info(`your app is deployed and available at ${appUrl}`) 19 | } catch (error) { 20 | if (error instanceof Error) core.setFailed(error.message) 21 | } 22 | } 23 | 24 | run() 25 | -------------------------------------------------------------------------------- /.github/workflows/release-tag.yml: -------------------------------------------------------------------------------- 1 | name: Tag the new release 2 | on: 3 | push: 4 | tags: "v[0-9]+.[0-9]+.[0-9]+" 5 | 6 | jobs: 7 | build: 8 | permissions: 9 | contents: write 10 | 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | 15 | - run: | 16 | echo "GITHUB_REF is $GITHUB_REF" 17 | 18 | MAJOR_TAG=$(echo -n $GITHUB_REF | sed -e "s/^refs\/tags\/\(v[0-9]\+\)\.[0-9]\+.[0-9]\+$/\1/g") 19 | [[ "$MAJOR_TAG" =~ ^v[0-9]+$ ]] || (echo "$MAJOR_TAG does not seem like a valid major tag" && exit 1) 20 | 21 | echo "creating (or moving) major tag $MAJOR_TAG to commit sha $GITHUB_SHA" 22 | git tag -f $MAJOR_TAG && git push -f origin tags/$MAJOR_TAG 23 | -------------------------------------------------------------------------------- /src/preview.ts: -------------------------------------------------------------------------------- 1 | import * as actions from './actions' 2 | import * as cloud from './cloud' 3 | import * as core from '@actions/core' 4 | import * as github from '@actions/github' 5 | 6 | async function run(): Promise { 7 | try { 8 | if (!github.context.payload.pull_request) { 9 | throw new Error(`this action currently support deploying apps on PR only`) 10 | } 11 | 12 | const prNumber = github.context.payload.pull_request.number 13 | if (core.getBooleanInput('undeploy')) { 14 | await actions.undeployPreview(prNumber) 15 | return 16 | } 17 | 18 | const token = core.getInput('fermyon_token', {required: true}) 19 | await cloud.login(token) 20 | await actions.build() 21 | const appUrl = await actions.deployPreview(prNumber) 22 | core.setOutput('app-url', appUrl) 23 | } catch (error) { 24 | if (error instanceof Error) core.setFailed(error.message) 25 | } 26 | } 27 | 28 | run() 29 | -------------------------------------------------------------------------------- /spin/push/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Build and push Fermyon Spin app' 2 | description: 'Build and push your Fermyon Spin app to OCI Registry' 3 | author: 'Fermyon Engineering' 4 | inputs: 5 | manifest_file: 6 | required: false 7 | description: 'path to spin.toml file' 8 | default: 'spin.toml' 9 | registry_reference: 10 | required: true 11 | description: 'OCI Registry reference, e.g. ghcr.io/fermyon/cloud-start:v0.0.1. Learn more at https://developer.fermyon.com/spin/spin-oci' 12 | registry: 13 | required: false 14 | description: 'Server address of OCI registry' 15 | registry_username: 16 | required: false 17 | description: 'OCI Registry Username' 18 | registry_password: 19 | required: false 20 | description: 'OCI Registry password or personal access token' 21 | outputs: 22 | digest: 23 | description: 'The image digest of the pushed app e.g. sha256:...' 24 | runs: 25 | using: 'node20' 26 | main: '../../dist/spin/push/index.js' 27 | -------------------------------------------------------------------------------- /src/system.ts: -------------------------------------------------------------------------------- 1 | /* 2 | this code is taken from endocrimes/setup-nomad 3 | */ 4 | 5 | import os from 'os' 6 | 7 | export function getPlatform(): string { 8 | const platform = os.platform() 9 | switch (platform) { 10 | case 'darwin': 11 | return 'macos' 12 | case 'freebsd': 13 | return 'freebsd' 14 | case 'linux': 15 | return 'linux' 16 | case 'openbsd': 17 | return 'openbsd' 18 | case 'win32': 19 | return 'windows' 20 | default: 21 | throw new Error(`Unsupported operating system platform: ${platform}`) 22 | } 23 | } 24 | 25 | export function getArch(): string { 26 | const arch = os.arch() 27 | switch (arch) { 28 | case 'arm': 29 | return 'arm' 30 | case 'arm64': 31 | return 'aarch64' 32 | case 'x32': 33 | return '386' 34 | case 'x64': 35 | return 'amd64' 36 | default: 37 | throw new Error(`Unsupported operating system architecture: ${arch}`) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ 4 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 5 | "outDir": "./lib", /* Redirect output structure to the directory. */ 6 | "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 7 | "strict": true, /* Enable all strict type-checking options. */ 8 | "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 9 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 10 | }, 11 | "exclude": [ 12 | "node_modules", 13 | "**/*.test.ts", 14 | "example-app" 15 | ] 16 | } -------------------------------------------------------------------------------- /spin/deploy/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Build and deploy Spin app to Fermyon Cloud' 2 | description: 'Build and deploy Spin app to Fermyon Cloud' 3 | author: 'Fermyon Engineering' 4 | inputs: 5 | manifest_file: 6 | required: false 7 | description: 'path to spin.toml file' 8 | default: 'spin.toml' 9 | fermyon_token: 10 | required: false 11 | description: 'personal access token for Fermyon Cloud' 12 | key_values: 13 | required: false 14 | description: 'Pass a key/value (key=value) to all components of the application. You can specify multiple key_values by putting each key/value pair on its own line' 15 | run_build: 16 | required: false 17 | description: 'run `spin build` if enabled (default)' 18 | default: true 19 | variables: 20 | required: false 21 | description: 'Pass a variable (variable=value) to all components of the application. You can specify multiple variables by putting each variable/value pair on its own line' 22 | outputs: 23 | app-url: 24 | description: 'the URL of the deployed app' 25 | runs: 26 | using: 'node20' 27 | main: '../../dist/spin/deploy/index.js' 28 | -------------------------------------------------------------------------------- /spin/preview/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Build and deploy preview of Spin app to Fermyon Cloud' 2 | description: 'Build and deploy preview of Spin app to Fermyon Cloud' 3 | author: 'Fermyon Engineering' 4 | inputs: 5 | manifest_file: 6 | required: false 7 | description: 'path to spin.toml file' 8 | default: 'spin.toml' 9 | fermyon_token: 10 | required: true 11 | description: 'the token that will be used for deploying preview to Fermyon Cloud' 12 | github_token: 13 | required: true 14 | description: 'the token will be used to update preview URL on Github PR' 15 | undeploy: 16 | required: false 17 | description: 'if true, remove the preview deployment from Fermyon Cloud' 18 | key_values: 19 | required: false 20 | description: 'Pass a key/value (key=value) to all components of the application. You can specify multiple key_values by putting each key/value pair on its own line' 21 | variables: 22 | required: false 23 | description: 'Pass a variable (variable=value) to all components of the application. You can specify multiple variables by putting each variable/value pair on its own line' 24 | outputs: 25 | app-url: 26 | description: 'the URL of the deployed preview app' 27 | runs: 28 | using: 'node20' 29 | main: '../../dist/spin/preview/index.js' 30 | -------------------------------------------------------------------------------- /.github/workflows/e2e-spin-deploy.yml: -------------------------------------------------------------------------------- 1 | name: deploy spin app e2e tests 2 | on: 3 | pull_request: 4 | branches: [main] 5 | 6 | push: 7 | branches: [main] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | if: ${{ !github.event.pull_request.head.repo.fork }} 13 | steps: 14 | - uses: actions/checkout@v3 15 | 16 | - uses: actions/setup-node@v3 17 | with: 18 | node-version: 19 19 | 20 | - name: npm install 21 | run: npm install 22 | 23 | - name: npm run build 24 | run: npm run package 25 | env: 26 | NODE_OPTIONS: --openssl-legacy-provider 27 | 28 | - name: upload artifact 29 | uses: actions/upload-artifact@v4 30 | with: 31 | name: spin-actions 32 | path: dist/spin/deploy/index.js 33 | 34 | deploy-fermyon-cloud: 35 | needs: build 36 | runs-on: ubuntu-latest 37 | steps: 38 | - uses: actions/checkout@v3 39 | 40 | - name: Retrieve saved Github action 41 | uses: actions/download-artifact@v4 42 | with: 43 | name: spin-actions 44 | path: dist/spin/deploy/ 45 | 46 | - name: setup spin 47 | uses: ./spin/setup/ 48 | with: 49 | version: canary 50 | plugins: js2wasm 51 | github_token: ${{ github.token }} 52 | 53 | - name: build and deploy 54 | uses: ./spin/deploy/ 55 | with: 56 | fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }} 57 | manifest_file: example-app/spin.toml 58 | key_values: |- 59 | abc=xyz 60 | foo=bar -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "actions", 3 | "version": "1.0.0", 4 | "description": "This provide actions for spin setup, build and push of spin apps, deploy to Fermyon Cloud", 5 | "scripts": { 6 | "build": "tsc", 7 | "format": "prettier --write '**/*.ts'", 8 | "format-check": "prettier --check '**/*.ts'", 9 | "lint": "eslint src/**/*.ts", 10 | "package": "ncc build -o dist/spin/setup src/setup.ts && ncc build -o dist/spin/push src/push.ts && ncc build -o dist/spin/deploy src/deploy.ts && ncc build -o dist/spin/preview src/preview.ts", 11 | "test": "jest", 12 | "all": "npm run build && npm run format && npm run package" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git+https://github.com/fermyon/actions.git" 17 | }, 18 | "keywords": [ 19 | "actions", 20 | "node", 21 | "setup", 22 | "spin" 23 | ], 24 | "author": "Fermyon Engineering", 25 | "license": "Apache-2.0", 26 | "dependencies": { 27 | "@actions/core": "^1.10.0", 28 | "@actions/exec": "^1.1.1", 29 | "@actions/github": "^5.1.1", 30 | "@actions/io": "^1.1.3", 31 | "@actions/tool-cache": "^2.0.1", 32 | "@octokit/rest": "^19.0.7", 33 | "@types/fs-extra": "^11.0.1", 34 | "@types/uuid": "^9.0.1", 35 | "fs-extra": "^11.1.0", 36 | "toml": "^3.0.0", 37 | "uuid": "^9.0.0" 38 | }, 39 | "devDependencies": { 40 | "@types/node": "^20.9.0", 41 | "@typescript-eslint/parser": "^4.33.0", 42 | "@vercel/ncc": "^0.36.1", 43 | "eslint": "^7.32.0", 44 | "eslint-plugin-github": "^4.3.2", 45 | "eslint-plugin-jest": "^25.3.2", 46 | "jest": "^27.2.5", 47 | "prettier": "2.8.4", 48 | "ts-jest": "^27.1.2", 49 | "typescript": "^4.9.5" 50 | } 51 | } -------------------------------------------------------------------------------- /.github/workflows/e2e-spin-preview.yml: -------------------------------------------------------------------------------- 1 | name: deploy spin app preview e2e tests 2 | on: 3 | pull_request: 4 | branches: ["main"] 5 | types: ['opened', 'synchronize', 'reopened', 'closed'] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | if: ${{ !github.event.pull_request.head.repo.fork }} 11 | steps: 12 | - uses: actions/checkout@v3 13 | 14 | - uses: actions/setup-node@v3 15 | with: 16 | node-version: 19 17 | 18 | - name: npm install 19 | run: npm install 20 | 21 | - name: npm run build 22 | run: npm run package 23 | env: 24 | NODE_OPTIONS: --openssl-legacy-provider 25 | 26 | - name: upload artifact 27 | uses: actions/upload-artifact@v4 28 | with: 29 | name: spin-actions 30 | path: dist/spin/preview/index.js 31 | 32 | deploy-preview-fermyon-cloud: 33 | needs: build 34 | runs-on: ubuntu-latest 35 | steps: 36 | - uses: actions/checkout@v3 37 | 38 | - name: Retrieve saved Github action 39 | uses: actions/download-artifact@v4 40 | with: 41 | name: spin-actions 42 | path: dist/spin/preview/ 43 | 44 | - name: setup spin 45 | uses: ./spin/setup/ 46 | with: 47 | version: canary 48 | plugins: js2wasm 49 | github_token: ${{ github.token }} 50 | 51 | - name: build and deploy preview 52 | uses: ./spin/preview/ 53 | with: 54 | fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }} 55 | github_token: ${{ secrets.GITHUB_TOKEN }} 56 | manifest_file: example-app/spin.toml 57 | undeploy: ${{ github.event.pull_request && github.event.action == 'closed' }} 58 | -------------------------------------------------------------------------------- /src/github.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import {Octokit} from '@octokit/rest' 3 | 4 | const token = core.getInput('github_token') 5 | const octokit = (() => { 6 | return token ? new Octokit({auth: token}) : new Octokit() 7 | })() 8 | 9 | export async function getLatestRelease( 10 | owner: string, 11 | repo: string 12 | ): Promise { 13 | const allReleases = await octokit.rest.repos.listReleases({ 14 | owner, 15 | repo 16 | }) 17 | 18 | const releases = allReleases.data.filter(item => !item.prerelease) 19 | if (releases.length === 0) { 20 | throw new Error(`no releases found for fermyon/spin`) 21 | } 22 | 23 | return Promise.resolve(releases[0].tag_name) 24 | } 25 | 26 | export async function updateComment( 27 | owner: string, 28 | repo: string, 29 | prNumber: number, 30 | msg: string 31 | ): Promise { 32 | if (!(await findComment(owner, repo, prNumber, msg))) { 33 | await octokit.rest.issues.createComment({ 34 | owner, 35 | repo, 36 | issue_number: prNumber, 37 | body: msg 38 | }) 39 | core.info(`updated comment on PR #${prNumber}`) 40 | } 41 | } 42 | 43 | export async function findComment( 44 | owner: string, 45 | repo: string, 46 | prNumber: number, 47 | msg: string 48 | ): Promise { 49 | for await (const response of octokit.paginate.iterator( 50 | octokit.rest.issues.listComments, 51 | {owner, repo, issue_number: prNumber, per_page: 100} 52 | )) { 53 | const comments = response.data 54 | const found = comments.find(item => { 55 | return item.body && item.body === msg 56 | }) 57 | 58 | if (found) { 59 | return Promise.resolve(true) 60 | } 61 | } 62 | 63 | return Promise.resolve(false) 64 | } 65 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependency directory 2 | node_modules 3 | 4 | # Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore 5 | # Logs 6 | logs 7 | *.log 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | lerna-debug.log* 12 | 13 | # Diagnostic reports (https://nodejs.org/api/report.html) 14 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 15 | 16 | # Runtime data 17 | pids 18 | *.pid 19 | *.seed 20 | *.pid.lock 21 | 22 | # Directory for instrumented libs generated by jscoverage/JSCover 23 | lib-cov 24 | 25 | # Coverage directory used by tools like istanbul 26 | coverage 27 | *.lcov 28 | 29 | # nyc test coverage 30 | .nyc_output 31 | 32 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 33 | .grunt 34 | 35 | # Bower dependency directory (https://bower.io/) 36 | bower_components 37 | 38 | # node-waf configuration 39 | .lock-wscript 40 | 41 | # Compiled binary addons (https://nodejs.org/api/addons.html) 42 | build/Release 43 | 44 | # Dependency directories 45 | jspm_packages/ 46 | 47 | # TypeScript v1 declaration files 48 | typings/ 49 | 50 | # TypeScript cache 51 | *.tsbuildinfo 52 | 53 | # Optional npm cache directory 54 | .npm 55 | 56 | # Optional eslint cache 57 | .eslintcache 58 | 59 | # Optional REPL history 60 | .node_repl_history 61 | 62 | # Output of 'npm pack' 63 | *.tgz 64 | 65 | # Yarn Integrity file 66 | .yarn-integrity 67 | 68 | # dotenv environment variables file 69 | .env 70 | .env.test 71 | 72 | # parcel-bundler cache (https://parceljs.org/) 73 | .cache 74 | 75 | # next.js build output 76 | .next 77 | 78 | # nuxt.js build output 79 | .nuxt 80 | 81 | # vuepress build output 82 | .vuepress/dist 83 | 84 | # Serverless directories 85 | .serverless/ 86 | 87 | # FuseBox cache 88 | .fusebox/ 89 | 90 | # DynamoDB Local files 91 | .dynamodb/ 92 | 93 | # OS metadata 94 | .DS_Store 95 | Thumbs.db 96 | 97 | # Ignore built ts files 98 | __tests__/runner/* 99 | lib/**/* -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ["jest", "@typescript-eslint"], 3 | "extends": ["plugin:github/recommended"], 4 | "parser": "@typescript-eslint/parser", 5 | "parserOptions": { 6 | "ecmaVersion": 9, 7 | "sourceType": "module", 8 | "project": "./tsconfig.json" 9 | }, 10 | "rules": { 11 | "i18n-text/no-en": "off", 12 | "eslint-comments/no-use": "off", 13 | "import/no-namespace": "off", 14 | "no-unused-vars": "off", 15 | "@typescript-eslint/no-unused-vars": "error", 16 | "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}], 17 | "@typescript-eslint/no-require-imports": "error", 18 | "@typescript-eslint/array-type": "error", 19 | "@typescript-eslint/await-thenable": "error", 20 | "@typescript-eslint/ban-ts-comment": "error", 21 | "camelcase": "off", 22 | "@typescript-eslint/consistent-type-assertions": "error", 23 | "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}], 24 | "@typescript-eslint/func-call-spacing": ["error", "never"], 25 | "@typescript-eslint/no-array-constructor": "error", 26 | "@typescript-eslint/no-empty-interface": "error", 27 | "@typescript-eslint/no-explicit-any": "error", 28 | "@typescript-eslint/no-extraneous-class": "error", 29 | "@typescript-eslint/no-for-in-array": "error", 30 | "@typescript-eslint/no-inferrable-types": "error", 31 | "@typescript-eslint/no-misused-new": "error", 32 | "@typescript-eslint/no-namespace": "error", 33 | "@typescript-eslint/no-non-null-assertion": "warn", 34 | "@typescript-eslint/no-unnecessary-qualifier": "error", 35 | "@typescript-eslint/no-unnecessary-type-assertion": "error", 36 | "@typescript-eslint/no-useless-constructor": "error", 37 | "@typescript-eslint/no-var-requires": "error", 38 | "@typescript-eslint/prefer-for-of": "warn", 39 | "@typescript-eslint/prefer-function-type": "warn", 40 | "@typescript-eslint/prefer-includes": "error", 41 | "@typescript-eslint/prefer-string-starts-ends-with": "error", 42 | "@typescript-eslint/promise-function-async": "error", 43 | "@typescript-eslint/require-array-sort-compare": "error", 44 | "@typescript-eslint/restrict-plus-operands": "error", 45 | "semi": "off", 46 | "@typescript-eslint/semi": ["error", "never"], 47 | "@typescript-eslint/type-annotation-spacing": "error", 48 | "@typescript-eslint/unbound-method": "error" 49 | }, 50 | "env": { 51 | "node": true, 52 | "es6": true, 53 | "jest/globals": true 54 | } 55 | } -------------------------------------------------------------------------------- /.github/workflows/e2e-spin-setup.yml: -------------------------------------------------------------------------------- 1 | name: setup-spin e2e tests 2 | on: 3 | pull_request: 4 | branches: [main] 5 | 6 | push: 7 | branches: [main] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | 15 | - uses: actions/setup-node@v3 16 | with: 17 | node-version: 19 18 | 19 | - name: npm install 20 | run: npm install 21 | 22 | - name: npm run build 23 | run: npm run package 24 | env: 25 | NODE_OPTIONS: --openssl-legacy-provider 26 | 27 | - name: upload artifact 28 | uses: actions/upload-artifact@v4 29 | with: 30 | name: setup-spin 31 | path: dist/spin/setup/index.js 32 | 33 | setup-default-spin: 34 | needs: build 35 | runs-on: ${{ matrix.os }} 36 | strategy: 37 | matrix: 38 | os: [ubuntu-latest, macos-latest, windows-latest] 39 | steps: 40 | - uses: actions/checkout@v3 41 | 42 | - name: Retrieve saved Github action 43 | uses: actions/download-artifact@v4 44 | with: 45 | name: setup-spin 46 | path: dist/spin/setup/ 47 | 48 | - name: setup spin 49 | uses: ./spin/setup/ 50 | with: 51 | github_token: ${{ github.token }} 52 | 53 | - name: verify spin setup 54 | run: spin --version 55 | 56 | setup-specific-spin-version: 57 | needs: build 58 | runs-on: ${{ matrix.os }} 59 | strategy: 60 | matrix: 61 | os: [ubuntu-latest, macos-latest, windows-latest] 62 | steps: 63 | - uses: actions/checkout@v3 64 | 65 | - name: Retrieve saved Github action 66 | uses: actions/download-artifact@v4 67 | with: 68 | name: setup-spin 69 | path: dist/spin/setup/ 70 | 71 | - name: setup spin 72 | uses: ./spin/setup/ 73 | with: 74 | version: v0.9.0 75 | github_token: ${{ github.token }} 76 | 77 | - name: spin setup successful 78 | if: ${{ contains(env.SPIN_VERSION, '0.9.0') }} 79 | run: echo "spin setup successful" 80 | 81 | - name: spin setup failed 82 | if: ${{ !contains(env.SPIN_VERSION, '0.9.0') }} 83 | run: | 84 | echo "expected version: v0.9.0, found: ${SPIN_VERSION}" 85 | exit 1 86 | 87 | setup-spin-and-one-plugin: 88 | needs: build 89 | runs-on: ${{ matrix.os }} 90 | strategy: 91 | matrix: 92 | os: [ubuntu-latest, macos-latest, windows-latest] 93 | steps: 94 | - uses: actions/checkout@v3 95 | 96 | - name: Retrieve saved Github action 97 | uses: actions/download-artifact@v4 98 | with: 99 | name: setup-spin 100 | path: dist/spin/setup/ 101 | 102 | - name: setup spin 103 | uses: ./spin/setup/ 104 | with: 105 | version: v1.5.1 106 | plugins: js2wasm 107 | github_token: ${{ github.token }} 108 | 109 | - name: verify js2wasm is installed 110 | run: spin js2wasm --version 2>ignore 111 | 112 | setup-spin-and-multiple-plugins: 113 | needs: build 114 | runs-on: ${{ matrix.os }} 115 | strategy: 116 | matrix: 117 | os: [ubuntu-latest, macos-latest, windows-latest] 118 | steps: 119 | - uses: actions/checkout@v3 120 | 121 | - name: Retrieve saved Github action 122 | uses: actions/download-artifact@v4 123 | with: 124 | name: setup-spin 125 | path: dist/spin/setup/ 126 | 127 | - name: setup spin 128 | uses: ./spin/setup/ 129 | with: 130 | version: v1.5.1 131 | plugins: js2wasm,py2wasm 132 | github_token: ${{ github.token }} 133 | 134 | - name: verify js2wasm is installed 135 | run: spin js2wasm --version 2>ignore 136 | 137 | - name: verify py2wasm is installed 138 | run: spin py2wasm --version 2>ignore -------------------------------------------------------------------------------- /.github/workflows/e2e-spin-push.yml: -------------------------------------------------------------------------------- 1 | name: build-and-push e2e tests 2 | on: 3 | pull_request: 4 | branches: [main] 5 | 6 | push: 7 | branches: [main] 8 | 9 | env: 10 | REGISTRY: ghcr.io 11 | REPOSITORY: ${{ github.repository }} 12 | SAMPLE_APP_IMAGE_NAME: actions-e2e-test 13 | 14 | jobs: 15 | build: 16 | runs-on: ubuntu-latest 17 | if: ${{ !github.event.pull_request.head.repo.fork }} 18 | steps: 19 | - uses: actions/checkout@v3 20 | 21 | - uses: actions/setup-node@v3 22 | with: 23 | node-version: 19 24 | 25 | - name: npm install 26 | run: npm install 27 | 28 | - name: npm run build 29 | run: npm run package 30 | env: 31 | NODE_OPTIONS: --openssl-legacy-provider 32 | 33 | - name: upload artifact 34 | uses: actions/upload-artifact@v4 35 | with: 36 | name: spin-actions 37 | path: dist/spin/push/index.js 38 | 39 | push-ghcr-io: 40 | needs: build 41 | runs-on: ubuntu-latest 42 | steps: 43 | - uses: actions/checkout@v3 44 | 45 | - name: Retrieve saved Github action 46 | uses: actions/download-artifact@v4 47 | with: 48 | name: spin-actions 49 | path: dist/spin/push/ 50 | 51 | - name: Log in to the Container registry 52 | uses: docker/login-action@v2 53 | with: 54 | registry: ${{ env.REGISTRY }} 55 | username: ${{ github.actor }} 56 | password: ${{ secrets.GITHUB_TOKEN }} 57 | 58 | - name: setup spin 59 | uses: ./spin/setup/ 60 | with: 61 | version: v1.5.1 62 | plugins: js2wasm 63 | github_token: ${{ github.token }} 64 | 65 | - name: build and push 66 | uses: ./spin/push/ 67 | with: 68 | registry_reference: "${{ env.REGISTRY }}/${{ env.REPOSITORY }}/${{ env.SAMPLE_APP_IMAGE_NAME }}:${{ github.run_id }}" 69 | manifest_file: example-app/spin.toml 70 | 71 | - name: verify app was pushed to OCI Registry 72 | run: spin registry pull "${{ env.REGISTRY }}/${{ env.REPOSITORY }}/${{ env.SAMPLE_APP_IMAGE_NAME }}:${{ github.run_id }}" 73 | 74 | - uses: bots-house/ghcr-delete-image-action@v1.1.0 75 | if: always() 76 | with: 77 | owner: fermyon 78 | ## name: 'actions/actions-e2e-tests' 79 | name: "${{ github.event.repository.name }}/${{ env.SAMPLE_APP_IMAGE_NAME }}" 80 | token: ${{ secrets.GITHUB_TOKEN }} 81 | tag: ${{ github.run_id }} 82 | 83 | spin-registry-login: 84 | needs: build 85 | runs-on: ubuntu-latest 86 | steps: 87 | - uses: actions/checkout@v3 88 | 89 | - name: Retrieve saved Github action 90 | uses: actions/download-artifact@v4 91 | with: 92 | name: spin-actions 93 | path: dist/spin/push/ 94 | 95 | - name: setup spin 96 | uses: ./spin/setup/ 97 | with: 98 | version: canary 99 | plugins: js2wasm 100 | github_token: ${{ github.token }} 101 | 102 | - name: build and push 103 | uses: ./spin/push/ 104 | with: 105 | registry: ${{ env.REGISTRY }} 106 | registry_username: ${{ github.actor }} 107 | registry_password: ${{ secrets.GITHUB_TOKEN }} 108 | registry_reference: "${{ env.REGISTRY }}/${{ env.REPOSITORY }}/${{ env.SAMPLE_APP_IMAGE_NAME }}:${{ github.run_id }}-2" 109 | manifest_file: example-app/spin.toml 110 | 111 | - name: verify app was pushed to OCI Registry 112 | run: spin registry pull "${{ env.REGISTRY }}/${{ env.REPOSITORY }}/${{ env.SAMPLE_APP_IMAGE_NAME }}:${{ github.run_id }}-2" 113 | 114 | - uses: bots-house/ghcr-delete-image-action@v1.1.0 115 | if: always() 116 | with: 117 | owner: fermyon 118 | ## name: 'actions/actions-e2e-tests' 119 | name: "${{ github.event.repository.name }}/${{ env.SAMPLE_APP_IMAGE_NAME }}" 120 | token: ${{ secrets.GITHUB_TOKEN }} 121 | tag: "${{ github.run_id }}-2" -------------------------------------------------------------------------------- /src/cloud.ts: -------------------------------------------------------------------------------- 1 | import * as exec from '@actions/exec' 2 | import * as fs from 'fs-extra' 3 | import * as httpm from '@actions/http-client' 4 | import * as io from '@actions/io' 5 | import * as path from 'path' 6 | 7 | import * as spin from './spin' 8 | 9 | export const DEFAULT_CLOUD_URL = 'https://cloud.fermyon.com' 10 | 11 | export function initClient(token: string): Client { 12 | return new Client(token) 13 | } 14 | 15 | export interface GetAppsResp { 16 | items: App[] 17 | } 18 | 19 | export interface App { 20 | id: string 21 | name: string 22 | healthStatus: string 23 | subdomain: string 24 | domain: Domain 25 | } 26 | 27 | export interface Domain { 28 | name: string 29 | validationStatus: string 30 | } 31 | 32 | export interface Route { 33 | name: string 34 | routeUrl: string 35 | wildcard: boolean 36 | } 37 | 38 | export class Client { 39 | base: string 40 | token: string 41 | _httpclient: httpm.HttpClient 42 | 43 | constructor(token: string) { 44 | this.base = DEFAULT_CLOUD_URL 45 | this.token = token 46 | this._httpclient = new httpm.HttpClient('fermyon/actions', [], { 47 | headers: { 48 | Authorization: `Bearer ${this.token}` 49 | } 50 | }) 51 | } 52 | 53 | async getAllApps(): Promise { 54 | const resp = await this._httpclient.get(`${this.base}/api/apps`) 55 | if (resp.message.statusCode !== httpm.HttpCodes.OK) { 56 | throw new Error( 57 | `expexted code ${httpm.HttpCodes.OK}, got ${resp.message.statusCode}` 58 | ) 59 | } 60 | 61 | const appsResp: GetAppsResp = JSON.parse(await resp.readBody()) 62 | return appsResp.items 63 | } 64 | 65 | async getAppByName(name: string): Promise { 66 | const apps = await this.getAllApps() 67 | const app = apps.find(item => item.name === name) 68 | if (!app) { 69 | throw new Error(`no app found with name ${name}`) 70 | } 71 | 72 | return app 73 | } 74 | 75 | async getAppIdByName(name: string): Promise { 76 | const app = await this.getAppByName(name) 77 | return app.id 78 | } 79 | 80 | async deleteAppById(id: string): Promise { 81 | const resp = await this._httpclient.del(`${this.base}/api/apps/${id}`) 82 | if (resp.message.statusCode !== 204) { 83 | throw new Error(`expected code 204, got ${resp.message.statusCode}`) 84 | } 85 | } 86 | 87 | async deleteAppByName(name: string): Promise { 88 | const appId = await this.getAppIdByName(name) 89 | this.deleteAppById(appId) 90 | } 91 | } 92 | 93 | export async function login(token: string): Promise { 94 | await exec.exec('spin', ['cloud', 'login', '--token', token]) 95 | } 96 | 97 | export async function deploy( 98 | manifestFile: string, 99 | kvPairs: string[], 100 | variables: string[] 101 | ): Promise { 102 | const args = ['deploy', '-f', manifestFile] 103 | for (const kvpair of kvPairs) { 104 | args.push('--key-value') 105 | args.push(kvpair) 106 | } 107 | 108 | for (const variable of variables) { 109 | args.push('--variable') 110 | args.push(variable) 111 | } 112 | 113 | const result = await exec.getExecOutput('spin', args) 114 | if (result.exitCode !== 0) { 115 | throw new Error( 116 | `deploy failed with [status_code: ${result.exitCode}] [stdout: ${result.stdout}] [stderr: ${result.stderr}] ` 117 | ) 118 | } 119 | } 120 | 121 | export async function deployAs( 122 | appName: string, 123 | manifestFile: string, 124 | kvPairs: string[], 125 | variables: string[] 126 | ): Promise { 127 | const manifest = spin.getAppManifest(manifestFile) 128 | const previewTomlFile = path.join( 129 | path.dirname(manifestFile), 130 | `${appName}-spin.toml` 131 | ) 132 | await io.cp(manifestFile, previewTomlFile) 133 | 134 | const data = fs.readFileSync(previewTomlFile, 'utf8') 135 | const re = new RegExp(`name = "${manifest.name}"`, 'g') 136 | const result = data.replace(re, `name = "${appName}"`) 137 | fs.writeFileSync(previewTomlFile, result, 'utf8') 138 | 139 | await deploy(previewTomlFile, kvPairs, variables) 140 | } 141 | -------------------------------------------------------------------------------- /src/spin.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import * as downloader from './downloader' 3 | import * as exec from '@actions/exec' 4 | import * as fs from 'fs-extra' 5 | import * as sys from './system' 6 | import * as toml from 'toml' 7 | 8 | export const DEFAULT_APP_CONFIG_FILE = 'spin.toml' 9 | export const CANARY_VERSION = 'canary' 10 | 11 | export async function install(version: string): Promise { 12 | await download(version) 13 | 14 | const result = await exec.getExecOutput('spin', ['--version']) 15 | if (result.exitCode !== 0) { 16 | throw new Error( 17 | `failed while verifying spin version.\n[stdout: ${result.stdout}] [stderr: ${result.stderr}]` 18 | ) 19 | } 20 | 21 | core.info(result.stdout) 22 | core.exportVariable('SPIN_VERSION', result.stdout) 23 | } 24 | 25 | async function download(version: string): Promise { 26 | const osPlatform = sys.getPlatform() 27 | const osArch = sys.getArch() 28 | 29 | const archiveExtension = osPlatform === 'windows' ? '.zip' : '.tar.gz' 30 | const binaryExtension = osPlatform === 'windows' ? '.exe' : '' 31 | 32 | const downloadBaseURL = process.env.SPIN_DOWNLOAD_BASE_URL 33 | ? process.env.SPIN_DOWNLOAD_BASE_URL 34 | : `https://github.com/fermyon/spin/releases/download/${version}` 35 | const downloadUrl = `${downloadBaseURL}/spin-${version}-${osPlatform}-${osArch}${archiveExtension}` 36 | await downloader 37 | .getConfig(`spin${binaryExtension}`, downloadUrl, `spin${binaryExtension}`) 38 | .download() 39 | } 40 | 41 | export async function installPlugins(plugins: string[]): Promise { 42 | await pullPluginManifests() 43 | 44 | plugins.every(async function (plugin) { 45 | await installOnePlugin(plugin) 46 | }) 47 | } 48 | 49 | export async function build_cmd(cmd: string): Promise { 50 | await exec.exec(cmd) 51 | } 52 | 53 | export async function build(manifestFile: string): Promise { 54 | await exec.exec('spin', ['build', '-f', manifestFile]) 55 | } 56 | 57 | async function pullPluginManifests(): Promise { 58 | await exec.exec('spin', ['plugin', 'update']) 59 | } 60 | 61 | //todo: support installing specific version 62 | //todo: support checking compatibility with spin version 63 | async function installOnePlugin(plugin: string): Promise { 64 | core.info(`installing spin plugin '${plugin}'`) 65 | await exec.exec('spin', ['plugin', 'install', plugin, '--yes']) 66 | const result = await exec.getExecOutput('spin', [plugin, '--version']) 67 | if (result.exitCode !== 0) { 68 | throw new Error( 69 | `failed while verifying installation for spin plugin ${plugin}.\n[stdout: ${result.stdout}] [stderr: ${result.stderr}]` 70 | ) 71 | } 72 | } 73 | 74 | export async function registryLogin( 75 | registry: string, 76 | username: string, 77 | password: string 78 | ): Promise { 79 | await exec.exec( 80 | 'spin', 81 | ['registry', 'login', registry, '--username', username, '--password-stdin'], 82 | { 83 | input: Buffer.from(password) 84 | } 85 | ) 86 | } 87 | 88 | export async function registryPush( 89 | registry_reference: string, 90 | manifestFile: string 91 | ): Promise { 92 | const result = await exec.getExecOutput('spin', [ 93 | 'registry', 94 | 'push', 95 | '-f', 96 | manifestFile, 97 | registry_reference 98 | ]) 99 | if (result.exitCode !== 0) { 100 | throw new Error( 101 | `failed while pushing reference ${registry_reference}.\n[stdout: ${result.stdout}] [stderr: ${result.stderr}]` 102 | ) 103 | } 104 | const matches = result.stdout.match(new RegExp('sha256:[A-Fa-f0-9]{64}')) 105 | matches !== null 106 | ? core.setOutput('digest', matches[0]) 107 | : core.notice( 108 | `successfully pushed reference ${registry_reference} but unable to determine digest` 109 | ) 110 | } 111 | 112 | interface SpinAppManifestV1 { 113 | spin_manifest_version: string 114 | name: string 115 | } 116 | 117 | interface SpinAppManifestV2 { 118 | spin_manifest_version: number 119 | application: { 120 | name: string 121 | } 122 | } 123 | 124 | export class SpinAppManifest { 125 | name: string 126 | 127 | constructor(name: string) { 128 | this.name = name 129 | } 130 | } 131 | 132 | export function getAppManifest(manifestFile: string): SpinAppManifest { 133 | const data = fs.readFileSync(manifestFile, 'utf8') 134 | const manifest = toml.parse(data) 135 | 136 | if (manifest.spin_manifest_version === '1') { 137 | return new SpinAppManifest((manifest as SpinAppManifestV1).name) 138 | } else if (manifest.spin_manifest_version === 2) { 139 | return new SpinAppManifest((manifest as SpinAppManifestV2).application.name) 140 | } 141 | 142 | throw new Error( 143 | `unsupported Spin manifest version ${manifest.spin_manifest_version}` 144 | ) 145 | } 146 | -------------------------------------------------------------------------------- /src/actions.ts: -------------------------------------------------------------------------------- 1 | import * as cloud from './cloud' 2 | import * as core from '@actions/core' 3 | import * as github from './github' 4 | import * as spin from './spin' 5 | import {context} from '@actions/github' 6 | 7 | const FERMYON_GITHUB_ORG = 'fermyon' 8 | const SPIN_GITHUB_REPO = 'spin' 9 | 10 | export async function setup(): Promise { 11 | let version = core.getInput('version') 12 | if (!version || version === 'latest') { 13 | version = await github.getLatestRelease( 14 | FERMYON_GITHUB_ORG, 15 | SPIN_GITHUB_REPO 16 | ) 17 | } 18 | 19 | await spin.install(version) 20 | 21 | //todo: check compatibility with spin version 22 | const pluginsList = 23 | core.getInput('plugins') !== '' ? core.getInput('plugins').split(',') : [] 24 | if (pluginsList.length > 0) { 25 | await spin.installPlugins(pluginsList) 26 | } 27 | } 28 | 29 | export async function deploy(): Promise { 30 | const manifestFile = getManifestFile() 31 | const kvPairs = getKeyValuePairs() 32 | const variables = getDeployVariables() 33 | await cloud.deploy(manifestFile, kvPairs, variables) 34 | 35 | const manifest = spin.getAppManifest(manifestFile) 36 | return getDomainForApp(manifest.name) 37 | } 38 | 39 | export async function build(): Promise { 40 | const manifestFile = getManifestFile() 41 | await spin.build(manifestFile) 42 | } 43 | 44 | export async function push(): Promise { 45 | const registry_reference = core.getInput('registry_reference', { 46 | required: true 47 | }) 48 | const manifestFile = getManifestFile() 49 | await spin.registryPush(registry_reference, manifestFile) 50 | } 51 | 52 | export function getManifestFile(): string { 53 | return core.getInput('manifest_file') || spin.DEFAULT_APP_CONFIG_FILE 54 | } 55 | 56 | export async function registryLogin(): Promise { 57 | const required = ['registry', 'registry_username', 'registry_password'] 58 | const provided = required.filter( 59 | x => core.getInput(x) !== null && core.getInput(x) !== '' 60 | ).length 61 | if (provided === 0) { 62 | core.debug('registry login not requested') 63 | return Promise.resolve() 64 | } 65 | 66 | if (provided > 0 && provided !== required.length) { 67 | throw new Error(`all or none of ${required} should be provided`) 68 | } 69 | 70 | return spin.registryLogin( 71 | core.getInput('registry'), 72 | core.getInput('registry_username'), 73 | core.getInput('registry_password') 74 | ) 75 | } 76 | 77 | export async function deployPreview(prNumber: number): Promise { 78 | const manifestFile = getManifestFile() 79 | const spinConfig = spin.getAppManifest(manifestFile) 80 | 81 | const realAppName = spinConfig.name 82 | const previewAppName = `${realAppName}-pr-${prNumber}` 83 | 84 | core.info(`🚀 deploying preview as ${previewAppName} to Fermyon Cloud`) 85 | const kvPairs = getKeyValuePairs() 86 | const variables = getDeployVariables() 87 | await cloud.deployAs(previewAppName, manifestFile, kvPairs, variables) 88 | 89 | const domain = await getDomainForApp(previewAppName) 90 | const comment = `🚀 preview deployed successfully to Fermyon Cloud and available at ${domain}` 91 | core.info(comment) 92 | 93 | await github.updateComment( 94 | context.repo.owner, 95 | context.repo.repo, 96 | prNumber, 97 | comment 98 | ) 99 | 100 | return domain 101 | } 102 | 103 | export async function undeployPreview(prNumber: number): Promise { 104 | const manifestFile = getManifestFile() 105 | const spinConfig = spin.getAppManifest(manifestFile) 106 | 107 | const previewAppName = `${spinConfig.name}-pr-${prNumber}` 108 | 109 | const cloudClient = getCloudClient() 110 | 111 | const apps = await cloudClient.getAllApps() 112 | const thisPreviewExists = apps.find(item => item.name === previewAppName) 113 | 114 | if (!thisPreviewExists) { 115 | core.info(`no preview found for pr ${prNumber}`) 116 | return 117 | } 118 | 119 | core.info(`cleaning up preview for pr ${prNumber}`) 120 | await cloudClient.deleteAppById(thisPreviewExists.id) 121 | core.info(`preview deployment removed successfully`) 122 | } 123 | 124 | export function getKeyValuePairs(): string[] { 125 | const rawKV = core.getInput('key_values') 126 | if (!rawKV) { 127 | return new Array() 128 | } 129 | 130 | return rawKV.split(/\r|\n/) 131 | } 132 | 133 | export function getDeployVariables(): string[] { 134 | const rawVariables = core.getInput('variables') 135 | if (!rawVariables) { 136 | return new Array() 137 | } 138 | 139 | return rawVariables.split(/\r|\n/) 140 | } 141 | 142 | export async function getDomainForApp(appName: string): Promise { 143 | const cloudClient = getCloudClient() 144 | const app = await cloudClient.getAppByName(appName) 145 | 146 | if (app.domain && app.domain.name) { 147 | return `https://${app.domain.name}` 148 | } 149 | 150 | return `https://${app.subdomain}` 151 | } 152 | 153 | export function getCloudClient(): cloud.Client { 154 | const cloudToken = core.getInput('fermyon_token', { 155 | required: true 156 | }) 157 | 158 | return cloud.initClient(cloudToken) 159 | } 160 | -------------------------------------------------------------------------------- /src/downloader.ts: -------------------------------------------------------------------------------- 1 | /* 2 | this code is taken from engineerd/configurator which is MIT licensed 3 | */ 4 | 5 | import * as core from '@actions/core' 6 | import * as exec from '@actions/exec' 7 | import * as fs from 'fs-extra' 8 | import * as io from '@actions/io' 9 | import * as os from 'os' 10 | import * as path from 'path' 11 | import * as tc from '@actions/tool-cache' 12 | import {v4 as uuidv4} from 'uuid' 13 | 14 | export enum ArchiveType { 15 | None = '', 16 | TarGz = '.tar.gz', 17 | TarXz = '.tar.xz', 18 | Tgz = '.tgz', 19 | Zip = '.zip', 20 | SevenZ = '.7z' 21 | } 22 | 23 | export function getConfig( 24 | nameInput: string, 25 | urlInput: string, 26 | pathInArchive: string 27 | ): Downloader { 28 | return new Downloader(nameInput, urlInput, pathInArchive) 29 | } 30 | 31 | export class Downloader { 32 | name: string 33 | url: string 34 | pathInArchive: string 35 | 36 | constructor(name: string, url: string, pathInArchive: string) { 37 | this.name = name 38 | this.url = url 39 | this.pathInArchive = pathInArchive 40 | } 41 | 42 | async download(): Promise { 43 | this.validate() 44 | const downloadURL = this.url 45 | 46 | core.info(`Downloading tool from ${downloadURL}`) 47 | let downloadPath: string | null = null 48 | let archivePath: string | null = null 49 | const randomDir: string = uuidv4() 50 | const tempDir = path.join(os.tmpdir(), 'tmp', 'runner', randomDir) 51 | core.info(`Creating tempdir ${tempDir}`) 52 | await io.mkdirP(tempDir) 53 | downloadPath = await tc.downloadTool(downloadURL) 54 | 55 | switch (getArchiveType(downloadURL)) { 56 | case ArchiveType.None: 57 | await this.moveToPath(downloadPath) 58 | break 59 | 60 | case ArchiveType.TarGz: 61 | archivePath = await tc.extractTar(downloadPath, tempDir) 62 | await this.moveToPath(path.join(archivePath, this.pathInArchive)) 63 | break 64 | 65 | case ArchiveType.TarXz: 66 | archivePath = await tc.extractTar(downloadPath, tempDir, 'x') 67 | await this.moveToPath(path.join(archivePath, this.pathInArchive)) 68 | break 69 | 70 | case ArchiveType.Tgz: 71 | archivePath = await tc.extractTar(downloadPath, tempDir) 72 | await this.moveToPath(path.join(archivePath, this.pathInArchive)) 73 | break 74 | 75 | case ArchiveType.Zip: 76 | archivePath = await tc.extractZip(downloadPath, tempDir) 77 | await this.moveToPath(path.join(archivePath, this.pathInArchive)) 78 | break 79 | 80 | case ArchiveType.SevenZ: 81 | archivePath = await tc.extract7z(downloadPath, tempDir) 82 | await this.moveToPath(path.join(archivePath, this.pathInArchive)) 83 | break 84 | } 85 | 86 | // Clean up the tempdir when done (this step is important for self-hosted runners) 87 | return io.rmRF(tempDir) 88 | } 89 | 90 | async downloadAsDir(): Promise { 91 | this.validate() 92 | const downloadURL = this.url 93 | 94 | core.info(`Downloading tool from ${downloadURL}`) 95 | let downloadPath: string | null = null 96 | let archivePath: string | null = null 97 | const randomDir: string = uuidv4() 98 | const tempDir = path.join(os.tmpdir(), 'tmp', 'runner', randomDir) 99 | core.info(`Creating tempdir ${tempDir}`) 100 | await io.mkdirP(tempDir) 101 | downloadPath = await tc.downloadTool(downloadURL) 102 | 103 | switch (getArchiveType(downloadURL)) { 104 | case ArchiveType.None: 105 | await this.moveDirToPath(downloadPath) 106 | break 107 | 108 | case ArchiveType.TarGz: 109 | archivePath = await tc.extractTar(downloadPath, tempDir) 110 | await this.moveDirToPath(path.join(archivePath, this.pathInArchive)) 111 | break 112 | 113 | case ArchiveType.TarXz: 114 | archivePath = await tc.extractTar(downloadPath, tempDir, 'x') 115 | await this.moveDirToPath(path.join(archivePath, this.pathInArchive)) 116 | break 117 | 118 | case ArchiveType.Tgz: 119 | archivePath = await tc.extractTar(downloadPath, tempDir) 120 | await this.moveDirToPath(path.join(archivePath, this.pathInArchive)) 121 | break 122 | 123 | case ArchiveType.Zip: 124 | archivePath = await tc.extractZip(downloadPath, tempDir) 125 | await this.moveDirToPath(path.join(archivePath, this.pathInArchive)) 126 | break 127 | 128 | case ArchiveType.SevenZ: 129 | archivePath = await tc.extract7z(downloadPath, tempDir) 130 | await this.moveDirToPath(path.join(archivePath, this.pathInArchive)) 131 | break 132 | } 133 | 134 | // Clean up the tempdir when done (this step is important for self-hosted runners) 135 | return io.rmRF(tempDir) 136 | } 137 | 138 | async moveToPath(downloadPath: string): Promise { 139 | const toolPath = binPath() 140 | await io.mkdirP(toolPath) 141 | const dest = path.join(toolPath, this.name) 142 | await fs.exists(downloadPath) 143 | core.info(`copying ${downloadPath} to ${dest}`) 144 | 145 | if (!fs.existsSync(dest)) { 146 | fs.moveSync(downloadPath, dest) 147 | } 148 | 149 | if (process.platform !== 'win32') { 150 | await exec.exec('chmod', ['+x', path.join(toolPath, this.name)]) 151 | } 152 | 153 | core.addPath(toolPath) 154 | } 155 | 156 | async moveDirToPath(downloadPath: string): Promise { 157 | const toolPath = binFolderPath() 158 | await io.mkdirP(toolPath) 159 | const dest = path.join(toolPath, this.name) 160 | core.info(`copying to ${dest}`) 161 | 162 | if (!fs.existsSync(dest)) { 163 | fs.moveSync(downloadPath, dest) 164 | } 165 | 166 | core.addPath(dest) 167 | core.addPath(path.join(dest, 'bin')) 168 | } 169 | 170 | validate(): void { 171 | if (!this.name) { 172 | throw new Error( 173 | `"name" is required. This is used to set the executable name of the tool.` 174 | ) 175 | } 176 | 177 | if (getArchiveType(this.url) !== ArchiveType.None && !this.pathInArchive) { 178 | throw new Error( 179 | `"pathInArchive" is required when "url" points to an archive file` 180 | ) 181 | } 182 | } 183 | } 184 | 185 | export function getArchiveType(downloadURL: string): ArchiveType { 186 | if (downloadURL.endsWith(ArchiveType.TarGz)) return ArchiveType.TarGz 187 | if (downloadURL.endsWith(ArchiveType.TarXz)) return ArchiveType.TarXz 188 | if (downloadURL.endsWith(ArchiveType.Tgz)) return ArchiveType.Tgz 189 | if (downloadURL.endsWith(ArchiveType.Zip)) return ArchiveType.Zip 190 | if (downloadURL.endsWith(ArchiveType.SevenZ)) return ArchiveType.SevenZ 191 | 192 | return ArchiveType.None 193 | } 194 | 195 | export function binFolderPath(): string { 196 | let baseLocation: string 197 | if (process.platform === 'win32') { 198 | // On windows use the USERPROFILE env variable 199 | baseLocation = process.env['USERPROFILE'] || 'C:\\' 200 | } else { 201 | if (process.platform === 'darwin') { 202 | baseLocation = '/Users' 203 | } else { 204 | baseLocation = '/home' 205 | } 206 | } 207 | 208 | return path.join(baseLocation, os.userInfo().username, 'downloader') 209 | } 210 | 211 | export function binPath(): string { 212 | return path.join(binFolderPath(), 'bin') 213 | } 214 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright (c) Fermyon Technologies. All Rights Reserved. 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | --- LLVM Exceptions to the Apache 2.0 License ---- 204 | 205 | As an exception, if, as a result of your compiling your source code, portions 206 | of this Software are embedded into an Object form of such source code, you 207 | may redistribute such embedded portions in such Object form without complying 208 | with the conditions of Sections 4(a), 4(b) and 4(d) of the License. 209 | 210 | In addition, if you combine or link compiled forms of this Software with 211 | software that is licensed under the GPLv2 ("Combined Software") and if a 212 | court of competent jurisdiction determines that the patent provision (Section 213 | 3), the indemnity provision (Section 9) or other Section of the License 214 | conflicts with the conditions of the GPLv2, you may retroactively and 215 | prospectively choose to deem waived or otherwise exclude such Section(s) of 216 | the License, but only in their entirety and only with respect to the Combined 217 | Software. 218 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # `fermyon/actions` - GitHub Action collection for Spin and Fermyon Cloud 2 | 3 | 4 | With the `fermyon/actions` collection, you can incorporate [Spin](https://developer.fermyon.com/spin/index) and [Fermyon Cloud](https://developer.fermyon.com/cloud/index) in your [GitHub Action](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow). 5 | 6 | This collection of Actions enables the following use cases: 7 | 8 | - [x] set up Spin CLI and plugins using [`fermyon/actions/spin/setup@v1`](#install-spin-cli-and-plugins---fermyonactionsspinsetupv1) 9 | - [x] build and push your Spin app to an OCI registry using [`fermyon/actions/spin/push@v1`](#push-spin-app-to-a-registry---fermyonactionsspinpushv1) 10 | - [x] deploy your Spin app to Fermyon Cloud using [`fermyon/actions/spin/deploy@v1`](#deploy-spin-app-to-fermyon-cloud---fermyonactionsspindeployv1) 11 | - [x] deploy PR preview to Fermyon Cloud [`fermyon/actions/spin/preview@v1`](#deploy-preview-of-spin-app-to-fermyon-cloud---fermyonactionsspinpreviewv1) 12 | 13 | 14 | Let's take a look at each one to learn about the required inputs and walk through an example. 15 | 16 | ## Install Spin CLI and Plugins - `fermyon/actions/spin/setup@v1` 17 | 18 | setup `spin` with optional plugins 19 | 20 | ### Inputs 21 | 22 | | Name | Required | Default | Description | 23 | | ------------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------- | 24 | | version | False | latest | The version of `spin` to install. | 25 | | plugins | False | - | The comma-separated list of Spin plugins to install. [Learn more about Spin plugins.](https://developer.fermyon.com/spin/managing-plugins) | 26 | | github_token | False | - | The GitHub token for querying/downloading `spin` releases. If provided, it avoids GitHub API rate limiting during GitHub actions executions | 27 | 28 | ### Examples 29 | 30 | #### Setting up latest version of `spin` 31 | 32 | ```yaml 33 | name: spin 34 | 35 | on: 36 | - push 37 | 38 | jobs: 39 | spin: 40 | runs-on: ubuntu-latest 41 | name: Setup spin 42 | steps: 43 | - name: Setup `spin` 44 | uses: fermyon/actions/spin/setup@v1 45 | 46 | - name: Run `spin version` 47 | run: "spin --version" 48 | ``` 49 | 50 | #### Setting up a specific version of `spin` 51 | 52 | ```yaml 53 | name: spin 54 | 55 | on: 56 | - push 57 | 58 | jobs: 59 | spin: 60 | runs-on: ubuntu-latest 61 | name: Setup spin 62 | steps: 63 | - name: Setup `spin` 64 | uses: fermyon/actions/spin/setup@v1 65 | with: 66 | version: "v0.10.1" 67 | 68 | - name: Run `spin version` 69 | run: "spin --version" 70 | ``` 71 | 72 | #### Setting up `spin` along with additional plugins 73 | 74 | ```yaml 75 | name: spin 76 | 77 | on: 78 | - push 79 | 80 | jobs: 81 | spin: 82 | runs-on: ubuntu-latest 83 | name: Setup spin 84 | steps: 85 | - name: Setup `spin` 86 | uses: fermyon/actions/spin/setup@v1 87 | with: 88 | version: "v0.10.1" 89 | plugins: js2wasm 90 | 91 | - name: Run `spin version` 92 | run: "spin --version" 93 | ``` 94 | 95 | ## Push Spin app to a Registry - `fermyon/actions/spin/push@v1` 96 | 97 | Build and push the Spin app to your desired OCI Registry (note that this registry must have a publicly accessible endpoint). Also note this action has a prerequisite on Spin already being installed. 98 | 99 | ### Inputs 100 | 101 | | Name | Required | Default | Description | 102 | | ------------------ | -------- | --------- | ---------------------------------------------------------------------------------------- | 103 | | registry_reference | True | - | The registry and reference to publish the app to e.g. ghcr.io/fermyon/cloud-start:v0.0.1 | 104 | | manifest_file | False | spin.toml | Path to `spin.toml` | 105 | | registry | False | - | if provided, used to login to OCI Registry | 106 | | registry_username | False | - | if provided, used to login to OCI Registry | 107 | | registry_password | False | - | if provided, used to login to OCI Registry | 108 | 109 | ### Outputs 110 | 111 | | Name | Description | 112 | | ------ | --------------------------------------------------- | 113 | | digest | The image digest of the pushed app e.g. sha256:... | 114 | 115 | ### Example 116 | 117 | ```yaml 118 | name: spin 119 | 120 | on: 121 | - push 122 | 123 | jobs: 124 | spin: 125 | runs-on: ubuntu-latest 126 | name: Build and push 127 | steps: 128 | - uses: actions/checkout@v3 129 | 130 | - name: Setup `spin` 131 | uses: fermyon/actions/spin/setup@v1 132 | with: 133 | version: "v0.10.1" 134 | plugins: js2wasm 135 | 136 | - name: build and push 137 | id: push 138 | uses: fermyon/actions/spin/push@v1 139 | with: 140 | registry: ghcr.io 141 | registry_username: ${{ github.actor }} 142 | registry_password: ${{ secrets.GITHUB_TOKEN }} 143 | registry_reference: "ghcr.io/${{ env.REPOSITORY }}/${{ env.SAMPLE_APP_IMAGE_NAME }}:${{ github.run_id }}-2" 144 | manifest_file: example-app/spin.toml 145 | 146 | - name: echo digest 147 | run: echo ${{ steps.push.outputs.digest }} 148 | 149 | ``` 150 | 151 | ## Deploy Spin app to Fermyon Cloud - `fermyon/actions/spin/deploy@v1` 152 | 153 | Build and deploy the Spin app to Fermyon Cloud. 154 | 155 | ### Inputs 156 | 157 | | Name | Required | Default | Description | 158 | | ------------- | -------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 159 | | fermyon_token | True | - | [Fermyon Cloud Personal Access Token](https://developer.fermyon.com/cloud/user-settings.md#create-and-manage-a-personal-access-token) for deploying the Spin app to Fermyon Cloud | 160 | | manifest_file | False | spin.toml | Path to `spin.toml`. | 161 | | key_values | False | - | Pass a key/value (key=value) to all components of the application. You can specify multiple key_values by putting each key/value pair on its own line. Refer to example below. | 162 | | run_build | False | True | If enabled, run `spin build` | 163 | | variables | False | - | Pass a variable (variable=value) to all components of the application. You can specify multiple variables by putting each variable/value pair on its own line. Refer to example below. | 164 | 165 | 166 | ### Outputs 167 | 168 | | Name | Description | 169 | | ------- | -------------------------------- | 170 | | app-url | The URL of the deployed Spin app | 171 | 172 | ### Example 173 | 174 | 175 | ```yaml 176 | name: spin 177 | 178 | on: 179 | - push 180 | 181 | jobs: 182 | spin: 183 | runs-on: ubuntu-latest 184 | name: Build and deploy 185 | steps: 186 | - uses: actions/checkout@v3 187 | 188 | - name: Setup `spin` 189 | uses: fermyon/actions/spin/setup@v1 190 | with: 191 | version: canary 192 | plugins: js2wasm 193 | 194 | - name: build and deploy 195 | uses: fermyon/actions/spin/deploy@v1 196 | with: 197 | manifest_file: example-app/spin.toml 198 | fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }} 199 | key_values: |- 200 | abc=xyz 201 | foo=bar 202 | variables: |- 203 | password=${{ secrets.SECURE_PASSWORD }} 204 | apikey=${{ secrets.API_KEY }} 205 | ``` 206 | 207 | ## Deploy preview of Spin app to Fermyon Cloud - `fermyon/actions/spin/preview@v1` 208 | 209 | Build and deploy the Spin app preview to Fermyon Cloud. 210 | 211 | The preview lifecycle is typically to deploy a preview when a pull request is created or updated, and to remove it when the PR is closed. To do this, create a workflow whose trigger is `pull_request` with activity types `['opened', 'synchronize', 'reopened', 'closed']`, and set the preview action's `undeploy` flag to `${{ github.event.pull_request && github.event.action == 'closed' }}`. The undeploy flag will thus resolve to false (deploy a preview, or update the existing preview) on PR creation or update, and to true (remove the preview) on PR closure. See below for an example. 212 | 213 | If you have multiple PRs in flight, the action 'knows' which preview is associated with which PR, and will update or remove only that preview. 214 | 215 | If you don't run the preview action with undeploy on the closed event, your preview will remain deployed, and will count against any Fermyon Cloud account limits. 216 | 217 | > [!NOTE] 218 | > This action requires `pull-requests: write` permissions on the GitHub token to allow adding a comment (with the preview URL) on the pull request. Refer to the GitHub [documentation](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token) to check if your workflow configuration provides that permission. 219 | 220 | ### Inputs 221 | 222 | | Name | Required | Default | Description | 223 | | ------------- | -------- | --------- | ------------------------------------------------------------------------------- | 224 | | fermyon_token | True | - | Fermyon Cloud Personal Access Token for deploying the Spin app to Fermyon Cloud | 225 | | manifest_file | False | spin.toml | Path to `spin.toml`. | 226 | | github_token | True | - | The GitHub token for adding a comment on PR with preview URL. | 227 | | undeploy | False | - | If true, removes the preview deployment from Fermyon Cloud | 228 | | key_values | False | - | Pass one or more key/value pairs to the default store for all components" | 229 | | variables | False | - | Pass a variable (variable=value) to all components of the application. You can specify multiple variables by putting each variable/value pair on its own line. Refer to example below. | 230 | 231 | ### Outputs 232 | 233 | | Name | Description | 234 | | ------- | ---------------------------------------- | 235 | | app-url | The URL of the deployed Spin app preview | 236 | 237 | ### Example 238 | 239 | ```yaml 240 | name: spin 241 | 242 | on: 243 | pull_request: 244 | branches: ["main", "v*"] 245 | types: ['opened', 'synchronize', 'reopened', 'closed'] 246 | 247 | jobs: 248 | spin: 249 | runs-on: ubuntu-latest 250 | name: Build and deploy 251 | steps: 252 | - uses: actions/checkout@v3 253 | 254 | - name: Setup `spin` 255 | uses: fermyon/actions/spin/setup@v1 256 | with: 257 | version: canary 258 | plugins: js2wasm 259 | 260 | - name: build and deploy 261 | uses: fermyon/actions/spin/preview@v1 262 | with: 263 | manifest_file: example-app/spin.toml 264 | fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }} 265 | github_token: ${{ secrets.GITHUB_TOKEN }} 266 | undeploy: ${{ github.event.pull_request && github.event.action == 'closed' }} 267 | key_values: |- 268 | abc=xyz 269 | foo=bar 270 | variables: |- 271 | password=${{ secrets.SECURE_PASSWORD }} 272 | apikey=${{ secrets.API_KEY }} 273 | ``` 274 | -------------------------------------------------------------------------------- /example-app/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-app", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "example-app", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "@fermyon/spin-sdk": "^0.4.1", 13 | "ts-loader": "^9.4.1", 14 | "typescript": "^4.8.4", 15 | "webpack": "^5.74.0", 16 | "webpack-cli": "^4.10.0" 17 | } 18 | }, 19 | "node_modules/@discoveryjs/json-ext": { 20 | "version": "0.5.7", 21 | "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", 22 | "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", 23 | "dev": true, 24 | "engines": { 25 | "node": ">=10.0.0" 26 | } 27 | }, 28 | "node_modules/@fermyon/spin-sdk": { 29 | "version": "0.4.1", 30 | "resolved": "https://registry.npmjs.org/@fermyon/spin-sdk/-/spin-sdk-0.4.1.tgz", 31 | "integrity": "sha512-EeiHN9p++1y0U2JwBYdU0k0h5qTv6wHxL0F8mTia/DbBsYwUziCHr7VWAGP5+DVmmvLuzC+mEhs9AM+ajVsQJQ==", 32 | "dev": true 33 | }, 34 | "node_modules/@jridgewell/gen-mapping": { 35 | "version": "0.3.2", 36 | "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", 37 | "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", 38 | "dev": true, 39 | "dependencies": { 40 | "@jridgewell/set-array": "^1.0.1", 41 | "@jridgewell/sourcemap-codec": "^1.4.10", 42 | "@jridgewell/trace-mapping": "^0.3.9" 43 | }, 44 | "engines": { 45 | "node": ">=6.0.0" 46 | } 47 | }, 48 | "node_modules/@jridgewell/resolve-uri": { 49 | "version": "3.1.0", 50 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", 51 | "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", 52 | "dev": true, 53 | "engines": { 54 | "node": ">=6.0.0" 55 | } 56 | }, 57 | "node_modules/@jridgewell/set-array": { 58 | "version": "1.1.2", 59 | "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", 60 | "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", 61 | "dev": true, 62 | "engines": { 63 | "node": ">=6.0.0" 64 | } 65 | }, 66 | "node_modules/@jridgewell/source-map": { 67 | "version": "0.3.2", 68 | "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", 69 | "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", 70 | "dev": true, 71 | "dependencies": { 72 | "@jridgewell/gen-mapping": "^0.3.0", 73 | "@jridgewell/trace-mapping": "^0.3.9" 74 | } 75 | }, 76 | "node_modules/@jridgewell/sourcemap-codec": { 77 | "version": "1.4.14", 78 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", 79 | "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", 80 | "dev": true 81 | }, 82 | "node_modules/@jridgewell/trace-mapping": { 83 | "version": "0.3.17", 84 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", 85 | "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", 86 | "dev": true, 87 | "dependencies": { 88 | "@jridgewell/resolve-uri": "3.1.0", 89 | "@jridgewell/sourcemap-codec": "1.4.14" 90 | } 91 | }, 92 | "node_modules/@types/eslint": { 93 | "version": "8.21.2", 94 | "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.2.tgz", 95 | "integrity": "sha512-EMpxUyystd3uZVByZap1DACsMXvb82ypQnGn89e1Y0a+LYu3JJscUd/gqhRsVFDkaD2MIiWo0MT8EfXr3DGRKw==", 96 | "dev": true, 97 | "dependencies": { 98 | "@types/estree": "*", 99 | "@types/json-schema": "*" 100 | } 101 | }, 102 | "node_modules/@types/eslint-scope": { 103 | "version": "3.7.4", 104 | "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", 105 | "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", 106 | "dev": true, 107 | "dependencies": { 108 | "@types/eslint": "*", 109 | "@types/estree": "*" 110 | } 111 | }, 112 | "node_modules/@types/estree": { 113 | "version": "0.0.51", 114 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", 115 | "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", 116 | "dev": true 117 | }, 118 | "node_modules/@types/json-schema": { 119 | "version": "7.0.11", 120 | "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", 121 | "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", 122 | "dev": true 123 | }, 124 | "node_modules/@types/node": { 125 | "version": "18.15.3", 126 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz", 127 | "integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw==", 128 | "dev": true 129 | }, 130 | "node_modules/@webassemblyjs/ast": { 131 | "version": "1.11.1", 132 | "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", 133 | "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", 134 | "dev": true, 135 | "dependencies": { 136 | "@webassemblyjs/helper-numbers": "1.11.1", 137 | "@webassemblyjs/helper-wasm-bytecode": "1.11.1" 138 | } 139 | }, 140 | "node_modules/@webassemblyjs/floating-point-hex-parser": { 141 | "version": "1.11.1", 142 | "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", 143 | "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", 144 | "dev": true 145 | }, 146 | "node_modules/@webassemblyjs/helper-api-error": { 147 | "version": "1.11.1", 148 | "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", 149 | "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", 150 | "dev": true 151 | }, 152 | "node_modules/@webassemblyjs/helper-buffer": { 153 | "version": "1.11.1", 154 | "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", 155 | "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", 156 | "dev": true 157 | }, 158 | "node_modules/@webassemblyjs/helper-numbers": { 159 | "version": "1.11.1", 160 | "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", 161 | "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", 162 | "dev": true, 163 | "dependencies": { 164 | "@webassemblyjs/floating-point-hex-parser": "1.11.1", 165 | "@webassemblyjs/helper-api-error": "1.11.1", 166 | "@xtuc/long": "4.2.2" 167 | } 168 | }, 169 | "node_modules/@webassemblyjs/helper-wasm-bytecode": { 170 | "version": "1.11.1", 171 | "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", 172 | "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", 173 | "dev": true 174 | }, 175 | "node_modules/@webassemblyjs/helper-wasm-section": { 176 | "version": "1.11.1", 177 | "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", 178 | "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", 179 | "dev": true, 180 | "dependencies": { 181 | "@webassemblyjs/ast": "1.11.1", 182 | "@webassemblyjs/helper-buffer": "1.11.1", 183 | "@webassemblyjs/helper-wasm-bytecode": "1.11.1", 184 | "@webassemblyjs/wasm-gen": "1.11.1" 185 | } 186 | }, 187 | "node_modules/@webassemblyjs/ieee754": { 188 | "version": "1.11.1", 189 | "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", 190 | "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", 191 | "dev": true, 192 | "dependencies": { 193 | "@xtuc/ieee754": "^1.2.0" 194 | } 195 | }, 196 | "node_modules/@webassemblyjs/leb128": { 197 | "version": "1.11.1", 198 | "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", 199 | "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", 200 | "dev": true, 201 | "dependencies": { 202 | "@xtuc/long": "4.2.2" 203 | } 204 | }, 205 | "node_modules/@webassemblyjs/utf8": { 206 | "version": "1.11.1", 207 | "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", 208 | "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", 209 | "dev": true 210 | }, 211 | "node_modules/@webassemblyjs/wasm-edit": { 212 | "version": "1.11.1", 213 | "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", 214 | "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", 215 | "dev": true, 216 | "dependencies": { 217 | "@webassemblyjs/ast": "1.11.1", 218 | "@webassemblyjs/helper-buffer": "1.11.1", 219 | "@webassemblyjs/helper-wasm-bytecode": "1.11.1", 220 | "@webassemblyjs/helper-wasm-section": "1.11.1", 221 | "@webassemblyjs/wasm-gen": "1.11.1", 222 | "@webassemblyjs/wasm-opt": "1.11.1", 223 | "@webassemblyjs/wasm-parser": "1.11.1", 224 | "@webassemblyjs/wast-printer": "1.11.1" 225 | } 226 | }, 227 | "node_modules/@webassemblyjs/wasm-gen": { 228 | "version": "1.11.1", 229 | "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", 230 | "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", 231 | "dev": true, 232 | "dependencies": { 233 | "@webassemblyjs/ast": "1.11.1", 234 | "@webassemblyjs/helper-wasm-bytecode": "1.11.1", 235 | "@webassemblyjs/ieee754": "1.11.1", 236 | "@webassemblyjs/leb128": "1.11.1", 237 | "@webassemblyjs/utf8": "1.11.1" 238 | } 239 | }, 240 | "node_modules/@webassemblyjs/wasm-opt": { 241 | "version": "1.11.1", 242 | "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", 243 | "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", 244 | "dev": true, 245 | "dependencies": { 246 | "@webassemblyjs/ast": "1.11.1", 247 | "@webassemblyjs/helper-buffer": "1.11.1", 248 | "@webassemblyjs/wasm-gen": "1.11.1", 249 | "@webassemblyjs/wasm-parser": "1.11.1" 250 | } 251 | }, 252 | "node_modules/@webassemblyjs/wasm-parser": { 253 | "version": "1.11.1", 254 | "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", 255 | "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", 256 | "dev": true, 257 | "dependencies": { 258 | "@webassemblyjs/ast": "1.11.1", 259 | "@webassemblyjs/helper-api-error": "1.11.1", 260 | "@webassemblyjs/helper-wasm-bytecode": "1.11.1", 261 | "@webassemblyjs/ieee754": "1.11.1", 262 | "@webassemblyjs/leb128": "1.11.1", 263 | "@webassemblyjs/utf8": "1.11.1" 264 | } 265 | }, 266 | "node_modules/@webassemblyjs/wast-printer": { 267 | "version": "1.11.1", 268 | "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", 269 | "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", 270 | "dev": true, 271 | "dependencies": { 272 | "@webassemblyjs/ast": "1.11.1", 273 | "@xtuc/long": "4.2.2" 274 | } 275 | }, 276 | "node_modules/@webpack-cli/configtest": { 277 | "version": "1.2.0", 278 | "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", 279 | "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", 280 | "dev": true, 281 | "peerDependencies": { 282 | "webpack": "4.x.x || 5.x.x", 283 | "webpack-cli": "4.x.x" 284 | } 285 | }, 286 | "node_modules/@webpack-cli/info": { 287 | "version": "1.5.0", 288 | "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", 289 | "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", 290 | "dev": true, 291 | "dependencies": { 292 | "envinfo": "^7.7.3" 293 | }, 294 | "peerDependencies": { 295 | "webpack-cli": "4.x.x" 296 | } 297 | }, 298 | "node_modules/@webpack-cli/serve": { 299 | "version": "1.7.0", 300 | "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", 301 | "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", 302 | "dev": true, 303 | "peerDependencies": { 304 | "webpack-cli": "4.x.x" 305 | }, 306 | "peerDependenciesMeta": { 307 | "webpack-dev-server": { 308 | "optional": true 309 | } 310 | } 311 | }, 312 | "node_modules/@xtuc/ieee754": { 313 | "version": "1.2.0", 314 | "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", 315 | "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", 316 | "dev": true 317 | }, 318 | "node_modules/@xtuc/long": { 319 | "version": "4.2.2", 320 | "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", 321 | "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", 322 | "dev": true 323 | }, 324 | "node_modules/acorn": { 325 | "version": "8.8.2", 326 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", 327 | "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", 328 | "dev": true, 329 | "bin": { 330 | "acorn": "bin/acorn" 331 | }, 332 | "engines": { 333 | "node": ">=0.4.0" 334 | } 335 | }, 336 | "node_modules/acorn-import-assertions": { 337 | "version": "1.8.0", 338 | "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", 339 | "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", 340 | "dev": true, 341 | "peerDependencies": { 342 | "acorn": "^8" 343 | } 344 | }, 345 | "node_modules/ajv": { 346 | "version": "6.12.6", 347 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 348 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 349 | "dev": true, 350 | "dependencies": { 351 | "fast-deep-equal": "^3.1.1", 352 | "fast-json-stable-stringify": "^2.0.0", 353 | "json-schema-traverse": "^0.4.1", 354 | "uri-js": "^4.2.2" 355 | }, 356 | "funding": { 357 | "type": "github", 358 | "url": "https://github.com/sponsors/epoberezkin" 359 | } 360 | }, 361 | "node_modules/ajv-keywords": { 362 | "version": "3.5.2", 363 | "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", 364 | "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", 365 | "dev": true, 366 | "peerDependencies": { 367 | "ajv": "^6.9.1" 368 | } 369 | }, 370 | "node_modules/ansi-styles": { 371 | "version": "4.3.0", 372 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 373 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 374 | "dev": true, 375 | "dependencies": { 376 | "color-convert": "^2.0.1" 377 | }, 378 | "engines": { 379 | "node": ">=8" 380 | }, 381 | "funding": { 382 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 383 | } 384 | }, 385 | "node_modules/braces": { 386 | "version": "3.0.2", 387 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 388 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 389 | "dev": true, 390 | "dependencies": { 391 | "fill-range": "^7.0.1" 392 | }, 393 | "engines": { 394 | "node": ">=8" 395 | } 396 | }, 397 | "node_modules/browserslist": { 398 | "version": "4.21.5", 399 | "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", 400 | "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", 401 | "dev": true, 402 | "funding": [ 403 | { 404 | "type": "opencollective", 405 | "url": "https://opencollective.com/browserslist" 406 | }, 407 | { 408 | "type": "tidelift", 409 | "url": "https://tidelift.com/funding/github/npm/browserslist" 410 | } 411 | ], 412 | "dependencies": { 413 | "caniuse-lite": "^1.0.30001449", 414 | "electron-to-chromium": "^1.4.284", 415 | "node-releases": "^2.0.8", 416 | "update-browserslist-db": "^1.0.10" 417 | }, 418 | "bin": { 419 | "browserslist": "cli.js" 420 | }, 421 | "engines": { 422 | "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" 423 | } 424 | }, 425 | "node_modules/buffer-from": { 426 | "version": "1.1.2", 427 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", 428 | "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", 429 | "dev": true 430 | }, 431 | "node_modules/caniuse-lite": { 432 | "version": "1.0.30001466", 433 | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001466.tgz", 434 | "integrity": "sha512-ewtFBSfWjEmxUgNBSZItFSmVtvk9zkwkl1OfRZlKA8slltRN+/C/tuGVrF9styXkN36Yu3+SeJ1qkXxDEyNZ5w==", 435 | "dev": true, 436 | "funding": [ 437 | { 438 | "type": "opencollective", 439 | "url": "https://opencollective.com/browserslist" 440 | }, 441 | { 442 | "type": "tidelift", 443 | "url": "https://tidelift.com/funding/github/npm/caniuse-lite" 444 | } 445 | ] 446 | }, 447 | "node_modules/chalk": { 448 | "version": "4.1.2", 449 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 450 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 451 | "dev": true, 452 | "dependencies": { 453 | "ansi-styles": "^4.1.0", 454 | "supports-color": "^7.1.0" 455 | }, 456 | "engines": { 457 | "node": ">=10" 458 | }, 459 | "funding": { 460 | "url": "https://github.com/chalk/chalk?sponsor=1" 461 | } 462 | }, 463 | "node_modules/chrome-trace-event": { 464 | "version": "1.0.3", 465 | "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", 466 | "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", 467 | "dev": true, 468 | "engines": { 469 | "node": ">=6.0" 470 | } 471 | }, 472 | "node_modules/clone-deep": { 473 | "version": "4.0.1", 474 | "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", 475 | "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", 476 | "dev": true, 477 | "dependencies": { 478 | "is-plain-object": "^2.0.4", 479 | "kind-of": "^6.0.2", 480 | "shallow-clone": "^3.0.0" 481 | }, 482 | "engines": { 483 | "node": ">=6" 484 | } 485 | }, 486 | "node_modules/color-convert": { 487 | "version": "2.0.1", 488 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 489 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 490 | "dev": true, 491 | "dependencies": { 492 | "color-name": "~1.1.4" 493 | }, 494 | "engines": { 495 | "node": ">=7.0.0" 496 | } 497 | }, 498 | "node_modules/color-name": { 499 | "version": "1.1.4", 500 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 501 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 502 | "dev": true 503 | }, 504 | "node_modules/colorette": { 505 | "version": "2.0.19", 506 | "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", 507 | "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", 508 | "dev": true 509 | }, 510 | "node_modules/commander": { 511 | "version": "2.20.3", 512 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 513 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", 514 | "dev": true 515 | }, 516 | "node_modules/cross-spawn": { 517 | "version": "7.0.3", 518 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", 519 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", 520 | "dev": true, 521 | "dependencies": { 522 | "path-key": "^3.1.0", 523 | "shebang-command": "^2.0.0", 524 | "which": "^2.0.1" 525 | }, 526 | "engines": { 527 | "node": ">= 8" 528 | } 529 | }, 530 | "node_modules/electron-to-chromium": { 531 | "version": "1.4.330", 532 | "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.330.tgz", 533 | "integrity": "sha512-PqyefhybrVdjAJ45HaPLtuVaehiSw7C3ya0aad+rvmV53IVyXmYRk3pwIOb2TxTDTnmgQdn46NjMMaysx79/6Q==", 534 | "dev": true 535 | }, 536 | "node_modules/enhanced-resolve": { 537 | "version": "5.12.0", 538 | "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", 539 | "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", 540 | "dev": true, 541 | "dependencies": { 542 | "graceful-fs": "^4.2.4", 543 | "tapable": "^2.2.0" 544 | }, 545 | "engines": { 546 | "node": ">=10.13.0" 547 | } 548 | }, 549 | "node_modules/envinfo": { 550 | "version": "7.8.1", 551 | "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", 552 | "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", 553 | "dev": true, 554 | "bin": { 555 | "envinfo": "dist/cli.js" 556 | }, 557 | "engines": { 558 | "node": ">=4" 559 | } 560 | }, 561 | "node_modules/es-module-lexer": { 562 | "version": "0.9.3", 563 | "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", 564 | "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", 565 | "dev": true 566 | }, 567 | "node_modules/escalade": { 568 | "version": "3.1.1", 569 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 570 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 571 | "dev": true, 572 | "engines": { 573 | "node": ">=6" 574 | } 575 | }, 576 | "node_modules/eslint-scope": { 577 | "version": "5.1.1", 578 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", 579 | "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", 580 | "dev": true, 581 | "dependencies": { 582 | "esrecurse": "^4.3.0", 583 | "estraverse": "^4.1.1" 584 | }, 585 | "engines": { 586 | "node": ">=8.0.0" 587 | } 588 | }, 589 | "node_modules/esrecurse": { 590 | "version": "4.3.0", 591 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", 592 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", 593 | "dev": true, 594 | "dependencies": { 595 | "estraverse": "^5.2.0" 596 | }, 597 | "engines": { 598 | "node": ">=4.0" 599 | } 600 | }, 601 | "node_modules/esrecurse/node_modules/estraverse": { 602 | "version": "5.3.0", 603 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", 604 | "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", 605 | "dev": true, 606 | "engines": { 607 | "node": ">=4.0" 608 | } 609 | }, 610 | "node_modules/estraverse": { 611 | "version": "4.3.0", 612 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", 613 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", 614 | "dev": true, 615 | "engines": { 616 | "node": ">=4.0" 617 | } 618 | }, 619 | "node_modules/events": { 620 | "version": "3.3.0", 621 | "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", 622 | "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", 623 | "dev": true, 624 | "engines": { 625 | "node": ">=0.8.x" 626 | } 627 | }, 628 | "node_modules/fast-deep-equal": { 629 | "version": "3.1.3", 630 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 631 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", 632 | "dev": true 633 | }, 634 | "node_modules/fast-json-stable-stringify": { 635 | "version": "2.1.0", 636 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 637 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 638 | "dev": true 639 | }, 640 | "node_modules/fastest-levenshtein": { 641 | "version": "1.0.16", 642 | "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", 643 | "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", 644 | "dev": true, 645 | "engines": { 646 | "node": ">= 4.9.1" 647 | } 648 | }, 649 | "node_modules/fill-range": { 650 | "version": "7.0.1", 651 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 652 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 653 | "dev": true, 654 | "dependencies": { 655 | "to-regex-range": "^5.0.1" 656 | }, 657 | "engines": { 658 | "node": ">=8" 659 | } 660 | }, 661 | "node_modules/find-up": { 662 | "version": "4.1.0", 663 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", 664 | "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", 665 | "dev": true, 666 | "dependencies": { 667 | "locate-path": "^5.0.0", 668 | "path-exists": "^4.0.0" 669 | }, 670 | "engines": { 671 | "node": ">=8" 672 | } 673 | }, 674 | "node_modules/function-bind": { 675 | "version": "1.1.1", 676 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 677 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 678 | "dev": true 679 | }, 680 | "node_modules/glob-to-regexp": { 681 | "version": "0.4.1", 682 | "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", 683 | "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", 684 | "dev": true 685 | }, 686 | "node_modules/graceful-fs": { 687 | "version": "4.2.10", 688 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", 689 | "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", 690 | "dev": true 691 | }, 692 | "node_modules/has": { 693 | "version": "1.0.3", 694 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 695 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 696 | "dev": true, 697 | "dependencies": { 698 | "function-bind": "^1.1.1" 699 | }, 700 | "engines": { 701 | "node": ">= 0.4.0" 702 | } 703 | }, 704 | "node_modules/has-flag": { 705 | "version": "4.0.0", 706 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 707 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 708 | "dev": true, 709 | "engines": { 710 | "node": ">=8" 711 | } 712 | }, 713 | "node_modules/import-local": { 714 | "version": "3.1.0", 715 | "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", 716 | "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", 717 | "dev": true, 718 | "dependencies": { 719 | "pkg-dir": "^4.2.0", 720 | "resolve-cwd": "^3.0.0" 721 | }, 722 | "bin": { 723 | "import-local-fixture": "fixtures/cli.js" 724 | }, 725 | "engines": { 726 | "node": ">=8" 727 | }, 728 | "funding": { 729 | "url": "https://github.com/sponsors/sindresorhus" 730 | } 731 | }, 732 | "node_modules/interpret": { 733 | "version": "2.2.0", 734 | "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", 735 | "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", 736 | "dev": true, 737 | "engines": { 738 | "node": ">= 0.10" 739 | } 740 | }, 741 | "node_modules/is-core-module": { 742 | "version": "2.11.0", 743 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", 744 | "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", 745 | "dev": true, 746 | "dependencies": { 747 | "has": "^1.0.3" 748 | }, 749 | "funding": { 750 | "url": "https://github.com/sponsors/ljharb" 751 | } 752 | }, 753 | "node_modules/is-number": { 754 | "version": "7.0.0", 755 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 756 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 757 | "dev": true, 758 | "engines": { 759 | "node": ">=0.12.0" 760 | } 761 | }, 762 | "node_modules/is-plain-object": { 763 | "version": "2.0.4", 764 | "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", 765 | "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", 766 | "dev": true, 767 | "dependencies": { 768 | "isobject": "^3.0.1" 769 | }, 770 | "engines": { 771 | "node": ">=0.10.0" 772 | } 773 | }, 774 | "node_modules/isexe": { 775 | "version": "2.0.0", 776 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 777 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", 778 | "dev": true 779 | }, 780 | "node_modules/isobject": { 781 | "version": "3.0.1", 782 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", 783 | "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", 784 | "dev": true, 785 | "engines": { 786 | "node": ">=0.10.0" 787 | } 788 | }, 789 | "node_modules/jest-worker": { 790 | "version": "27.5.1", 791 | "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", 792 | "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", 793 | "dev": true, 794 | "dependencies": { 795 | "@types/node": "*", 796 | "merge-stream": "^2.0.0", 797 | "supports-color": "^8.0.0" 798 | }, 799 | "engines": { 800 | "node": ">= 10.13.0" 801 | } 802 | }, 803 | "node_modules/jest-worker/node_modules/supports-color": { 804 | "version": "8.1.1", 805 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 806 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 807 | "dev": true, 808 | "dependencies": { 809 | "has-flag": "^4.0.0" 810 | }, 811 | "engines": { 812 | "node": ">=10" 813 | }, 814 | "funding": { 815 | "url": "https://github.com/chalk/supports-color?sponsor=1" 816 | } 817 | }, 818 | "node_modules/json-parse-even-better-errors": { 819 | "version": "2.3.1", 820 | "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", 821 | "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", 822 | "dev": true 823 | }, 824 | "node_modules/json-schema-traverse": { 825 | "version": "0.4.1", 826 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 827 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 828 | "dev": true 829 | }, 830 | "node_modules/kind-of": { 831 | "version": "6.0.3", 832 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", 833 | "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", 834 | "dev": true, 835 | "engines": { 836 | "node": ">=0.10.0" 837 | } 838 | }, 839 | "node_modules/loader-runner": { 840 | "version": "4.3.0", 841 | "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", 842 | "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", 843 | "dev": true, 844 | "engines": { 845 | "node": ">=6.11.5" 846 | } 847 | }, 848 | "node_modules/locate-path": { 849 | "version": "5.0.0", 850 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", 851 | "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", 852 | "dev": true, 853 | "dependencies": { 854 | "p-locate": "^4.1.0" 855 | }, 856 | "engines": { 857 | "node": ">=8" 858 | } 859 | }, 860 | "node_modules/lru-cache": { 861 | "version": "6.0.0", 862 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 863 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 864 | "dev": true, 865 | "dependencies": { 866 | "yallist": "^4.0.0" 867 | }, 868 | "engines": { 869 | "node": ">=10" 870 | } 871 | }, 872 | "node_modules/merge-stream": { 873 | "version": "2.0.0", 874 | "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", 875 | "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", 876 | "dev": true 877 | }, 878 | "node_modules/micromatch": { 879 | "version": "4.0.5", 880 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", 881 | "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", 882 | "dev": true, 883 | "dependencies": { 884 | "braces": "^3.0.2", 885 | "picomatch": "^2.3.1" 886 | }, 887 | "engines": { 888 | "node": ">=8.6" 889 | } 890 | }, 891 | "node_modules/mime-db": { 892 | "version": "1.52.0", 893 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 894 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 895 | "dev": true, 896 | "engines": { 897 | "node": ">= 0.6" 898 | } 899 | }, 900 | "node_modules/mime-types": { 901 | "version": "2.1.35", 902 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 903 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 904 | "dev": true, 905 | "dependencies": { 906 | "mime-db": "1.52.0" 907 | }, 908 | "engines": { 909 | "node": ">= 0.6" 910 | } 911 | }, 912 | "node_modules/neo-async": { 913 | "version": "2.6.2", 914 | "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", 915 | "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", 916 | "dev": true 917 | }, 918 | "node_modules/node-releases": { 919 | "version": "2.0.10", 920 | "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", 921 | "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", 922 | "dev": true 923 | }, 924 | "node_modules/p-limit": { 925 | "version": "2.3.0", 926 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", 927 | "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", 928 | "dev": true, 929 | "dependencies": { 930 | "p-try": "^2.0.0" 931 | }, 932 | "engines": { 933 | "node": ">=6" 934 | }, 935 | "funding": { 936 | "url": "https://github.com/sponsors/sindresorhus" 937 | } 938 | }, 939 | "node_modules/p-locate": { 940 | "version": "4.1.0", 941 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", 942 | "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", 943 | "dev": true, 944 | "dependencies": { 945 | "p-limit": "^2.2.0" 946 | }, 947 | "engines": { 948 | "node": ">=8" 949 | } 950 | }, 951 | "node_modules/p-try": { 952 | "version": "2.2.0", 953 | "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", 954 | "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", 955 | "dev": true, 956 | "engines": { 957 | "node": ">=6" 958 | } 959 | }, 960 | "node_modules/path-exists": { 961 | "version": "4.0.0", 962 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 963 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 964 | "dev": true, 965 | "engines": { 966 | "node": ">=8" 967 | } 968 | }, 969 | "node_modules/path-key": { 970 | "version": "3.1.1", 971 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 972 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 973 | "dev": true, 974 | "engines": { 975 | "node": ">=8" 976 | } 977 | }, 978 | "node_modules/path-parse": { 979 | "version": "1.0.7", 980 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 981 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 982 | "dev": true 983 | }, 984 | "node_modules/picocolors": { 985 | "version": "1.0.0", 986 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", 987 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", 988 | "dev": true 989 | }, 990 | "node_modules/picomatch": { 991 | "version": "2.3.1", 992 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 993 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 994 | "dev": true, 995 | "engines": { 996 | "node": ">=8.6" 997 | }, 998 | "funding": { 999 | "url": "https://github.com/sponsors/jonschlinkert" 1000 | } 1001 | }, 1002 | "node_modules/pkg-dir": { 1003 | "version": "4.2.0", 1004 | "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", 1005 | "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", 1006 | "dev": true, 1007 | "dependencies": { 1008 | "find-up": "^4.0.0" 1009 | }, 1010 | "engines": { 1011 | "node": ">=8" 1012 | } 1013 | }, 1014 | "node_modules/punycode": { 1015 | "version": "2.3.0", 1016 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", 1017 | "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", 1018 | "dev": true, 1019 | "engines": { 1020 | "node": ">=6" 1021 | } 1022 | }, 1023 | "node_modules/randombytes": { 1024 | "version": "2.1.0", 1025 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 1026 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 1027 | "dev": true, 1028 | "dependencies": { 1029 | "safe-buffer": "^5.1.0" 1030 | } 1031 | }, 1032 | "node_modules/rechoir": { 1033 | "version": "0.7.1", 1034 | "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", 1035 | "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", 1036 | "dev": true, 1037 | "dependencies": { 1038 | "resolve": "^1.9.0" 1039 | }, 1040 | "engines": { 1041 | "node": ">= 0.10" 1042 | } 1043 | }, 1044 | "node_modules/resolve": { 1045 | "version": "1.22.1", 1046 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", 1047 | "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", 1048 | "dev": true, 1049 | "dependencies": { 1050 | "is-core-module": "^2.9.0", 1051 | "path-parse": "^1.0.7", 1052 | "supports-preserve-symlinks-flag": "^1.0.0" 1053 | }, 1054 | "bin": { 1055 | "resolve": "bin/resolve" 1056 | }, 1057 | "funding": { 1058 | "url": "https://github.com/sponsors/ljharb" 1059 | } 1060 | }, 1061 | "node_modules/resolve-cwd": { 1062 | "version": "3.0.0", 1063 | "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", 1064 | "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", 1065 | "dev": true, 1066 | "dependencies": { 1067 | "resolve-from": "^5.0.0" 1068 | }, 1069 | "engines": { 1070 | "node": ">=8" 1071 | } 1072 | }, 1073 | "node_modules/resolve-from": { 1074 | "version": "5.0.0", 1075 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", 1076 | "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", 1077 | "dev": true, 1078 | "engines": { 1079 | "node": ">=8" 1080 | } 1081 | }, 1082 | "node_modules/safe-buffer": { 1083 | "version": "5.2.1", 1084 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1085 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1086 | "dev": true, 1087 | "funding": [ 1088 | { 1089 | "type": "github", 1090 | "url": "https://github.com/sponsors/feross" 1091 | }, 1092 | { 1093 | "type": "patreon", 1094 | "url": "https://www.patreon.com/feross" 1095 | }, 1096 | { 1097 | "type": "consulting", 1098 | "url": "https://feross.org/support" 1099 | } 1100 | ] 1101 | }, 1102 | "node_modules/schema-utils": { 1103 | "version": "3.1.1", 1104 | "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", 1105 | "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", 1106 | "dev": true, 1107 | "dependencies": { 1108 | "@types/json-schema": "^7.0.8", 1109 | "ajv": "^6.12.5", 1110 | "ajv-keywords": "^3.5.2" 1111 | }, 1112 | "engines": { 1113 | "node": ">= 10.13.0" 1114 | }, 1115 | "funding": { 1116 | "type": "opencollective", 1117 | "url": "https://opencollective.com/webpack" 1118 | } 1119 | }, 1120 | "node_modules/semver": { 1121 | "version": "7.3.8", 1122 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", 1123 | "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", 1124 | "dev": true, 1125 | "dependencies": { 1126 | "lru-cache": "^6.0.0" 1127 | }, 1128 | "bin": { 1129 | "semver": "bin/semver.js" 1130 | }, 1131 | "engines": { 1132 | "node": ">=10" 1133 | } 1134 | }, 1135 | "node_modules/serialize-javascript": { 1136 | "version": "6.0.1", 1137 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", 1138 | "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", 1139 | "dev": true, 1140 | "dependencies": { 1141 | "randombytes": "^2.1.0" 1142 | } 1143 | }, 1144 | "node_modules/shallow-clone": { 1145 | "version": "3.0.1", 1146 | "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", 1147 | "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", 1148 | "dev": true, 1149 | "dependencies": { 1150 | "kind-of": "^6.0.2" 1151 | }, 1152 | "engines": { 1153 | "node": ">=8" 1154 | } 1155 | }, 1156 | "node_modules/shebang-command": { 1157 | "version": "2.0.0", 1158 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 1159 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 1160 | "dev": true, 1161 | "dependencies": { 1162 | "shebang-regex": "^3.0.0" 1163 | }, 1164 | "engines": { 1165 | "node": ">=8" 1166 | } 1167 | }, 1168 | "node_modules/shebang-regex": { 1169 | "version": "3.0.0", 1170 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 1171 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 1172 | "dev": true, 1173 | "engines": { 1174 | "node": ">=8" 1175 | } 1176 | }, 1177 | "node_modules/source-map": { 1178 | "version": "0.6.1", 1179 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 1180 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 1181 | "dev": true, 1182 | "engines": { 1183 | "node": ">=0.10.0" 1184 | } 1185 | }, 1186 | "node_modules/source-map-support": { 1187 | "version": "0.5.21", 1188 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", 1189 | "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", 1190 | "dev": true, 1191 | "dependencies": { 1192 | "buffer-from": "^1.0.0", 1193 | "source-map": "^0.6.0" 1194 | } 1195 | }, 1196 | "node_modules/supports-color": { 1197 | "version": "7.2.0", 1198 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1199 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1200 | "dev": true, 1201 | "dependencies": { 1202 | "has-flag": "^4.0.0" 1203 | }, 1204 | "engines": { 1205 | "node": ">=8" 1206 | } 1207 | }, 1208 | "node_modules/supports-preserve-symlinks-flag": { 1209 | "version": "1.0.0", 1210 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", 1211 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", 1212 | "dev": true, 1213 | "engines": { 1214 | "node": ">= 0.4" 1215 | }, 1216 | "funding": { 1217 | "url": "https://github.com/sponsors/ljharb" 1218 | } 1219 | }, 1220 | "node_modules/tapable": { 1221 | "version": "2.2.1", 1222 | "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", 1223 | "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", 1224 | "dev": true, 1225 | "engines": { 1226 | "node": ">=6" 1227 | } 1228 | }, 1229 | "node_modules/terser": { 1230 | "version": "5.16.6", 1231 | "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.6.tgz", 1232 | "integrity": "sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg==", 1233 | "dev": true, 1234 | "dependencies": { 1235 | "@jridgewell/source-map": "^0.3.2", 1236 | "acorn": "^8.5.0", 1237 | "commander": "^2.20.0", 1238 | "source-map-support": "~0.5.20" 1239 | }, 1240 | "bin": { 1241 | "terser": "bin/terser" 1242 | }, 1243 | "engines": { 1244 | "node": ">=10" 1245 | } 1246 | }, 1247 | "node_modules/terser-webpack-plugin": { 1248 | "version": "5.3.7", 1249 | "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz", 1250 | "integrity": "sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==", 1251 | "dev": true, 1252 | "dependencies": { 1253 | "@jridgewell/trace-mapping": "^0.3.17", 1254 | "jest-worker": "^27.4.5", 1255 | "schema-utils": "^3.1.1", 1256 | "serialize-javascript": "^6.0.1", 1257 | "terser": "^5.16.5" 1258 | }, 1259 | "engines": { 1260 | "node": ">= 10.13.0" 1261 | }, 1262 | "funding": { 1263 | "type": "opencollective", 1264 | "url": "https://opencollective.com/webpack" 1265 | }, 1266 | "peerDependencies": { 1267 | "webpack": "^5.1.0" 1268 | }, 1269 | "peerDependenciesMeta": { 1270 | "@swc/core": { 1271 | "optional": true 1272 | }, 1273 | "esbuild": { 1274 | "optional": true 1275 | }, 1276 | "uglify-js": { 1277 | "optional": true 1278 | } 1279 | } 1280 | }, 1281 | "node_modules/to-regex-range": { 1282 | "version": "5.0.1", 1283 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1284 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1285 | "dev": true, 1286 | "dependencies": { 1287 | "is-number": "^7.0.0" 1288 | }, 1289 | "engines": { 1290 | "node": ">=8.0" 1291 | } 1292 | }, 1293 | "node_modules/ts-loader": { 1294 | "version": "9.4.2", 1295 | "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.2.tgz", 1296 | "integrity": "sha512-OmlC4WVmFv5I0PpaxYb+qGeGOdm5giHU7HwDDUjw59emP2UYMHy9fFSDcYgSNoH8sXcj4hGCSEhlDZ9ULeDraA==", 1297 | "dev": true, 1298 | "dependencies": { 1299 | "chalk": "^4.1.0", 1300 | "enhanced-resolve": "^5.0.0", 1301 | "micromatch": "^4.0.0", 1302 | "semver": "^7.3.4" 1303 | }, 1304 | "engines": { 1305 | "node": ">=12.0.0" 1306 | }, 1307 | "peerDependencies": { 1308 | "typescript": "*", 1309 | "webpack": "^5.0.0" 1310 | } 1311 | }, 1312 | "node_modules/typescript": { 1313 | "version": "4.9.5", 1314 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", 1315 | "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", 1316 | "dev": true, 1317 | "bin": { 1318 | "tsc": "bin/tsc", 1319 | "tsserver": "bin/tsserver" 1320 | }, 1321 | "engines": { 1322 | "node": ">=4.2.0" 1323 | } 1324 | }, 1325 | "node_modules/update-browserslist-db": { 1326 | "version": "1.0.10", 1327 | "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", 1328 | "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", 1329 | "dev": true, 1330 | "funding": [ 1331 | { 1332 | "type": "opencollective", 1333 | "url": "https://opencollective.com/browserslist" 1334 | }, 1335 | { 1336 | "type": "tidelift", 1337 | "url": "https://tidelift.com/funding/github/npm/browserslist" 1338 | } 1339 | ], 1340 | "dependencies": { 1341 | "escalade": "^3.1.1", 1342 | "picocolors": "^1.0.0" 1343 | }, 1344 | "bin": { 1345 | "browserslist-lint": "cli.js" 1346 | }, 1347 | "peerDependencies": { 1348 | "browserslist": ">= 4.21.0" 1349 | } 1350 | }, 1351 | "node_modules/uri-js": { 1352 | "version": "4.4.1", 1353 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", 1354 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 1355 | "dev": true, 1356 | "dependencies": { 1357 | "punycode": "^2.1.0" 1358 | } 1359 | }, 1360 | "node_modules/watchpack": { 1361 | "version": "2.4.0", 1362 | "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", 1363 | "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", 1364 | "dev": true, 1365 | "dependencies": { 1366 | "glob-to-regexp": "^0.4.1", 1367 | "graceful-fs": "^4.1.2" 1368 | }, 1369 | "engines": { 1370 | "node": ">=10.13.0" 1371 | } 1372 | }, 1373 | "node_modules/webpack": { 1374 | "version": "5.76.1", 1375 | "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.1.tgz", 1376 | "integrity": "sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ==", 1377 | "dev": true, 1378 | "dependencies": { 1379 | "@types/eslint-scope": "^3.7.3", 1380 | "@types/estree": "^0.0.51", 1381 | "@webassemblyjs/ast": "1.11.1", 1382 | "@webassemblyjs/wasm-edit": "1.11.1", 1383 | "@webassemblyjs/wasm-parser": "1.11.1", 1384 | "acorn": "^8.7.1", 1385 | "acorn-import-assertions": "^1.7.6", 1386 | "browserslist": "^4.14.5", 1387 | "chrome-trace-event": "^1.0.2", 1388 | "enhanced-resolve": "^5.10.0", 1389 | "es-module-lexer": "^0.9.0", 1390 | "eslint-scope": "5.1.1", 1391 | "events": "^3.2.0", 1392 | "glob-to-regexp": "^0.4.1", 1393 | "graceful-fs": "^4.2.9", 1394 | "json-parse-even-better-errors": "^2.3.1", 1395 | "loader-runner": "^4.2.0", 1396 | "mime-types": "^2.1.27", 1397 | "neo-async": "^2.6.2", 1398 | "schema-utils": "^3.1.0", 1399 | "tapable": "^2.1.1", 1400 | "terser-webpack-plugin": "^5.1.3", 1401 | "watchpack": "^2.4.0", 1402 | "webpack-sources": "^3.2.3" 1403 | }, 1404 | "bin": { 1405 | "webpack": "bin/webpack.js" 1406 | }, 1407 | "engines": { 1408 | "node": ">=10.13.0" 1409 | }, 1410 | "funding": { 1411 | "type": "opencollective", 1412 | "url": "https://opencollective.com/webpack" 1413 | }, 1414 | "peerDependenciesMeta": { 1415 | "webpack-cli": { 1416 | "optional": true 1417 | } 1418 | } 1419 | }, 1420 | "node_modules/webpack-cli": { 1421 | "version": "4.10.0", 1422 | "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", 1423 | "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", 1424 | "dev": true, 1425 | "dependencies": { 1426 | "@discoveryjs/json-ext": "^0.5.0", 1427 | "@webpack-cli/configtest": "^1.2.0", 1428 | "@webpack-cli/info": "^1.5.0", 1429 | "@webpack-cli/serve": "^1.7.0", 1430 | "colorette": "^2.0.14", 1431 | "commander": "^7.0.0", 1432 | "cross-spawn": "^7.0.3", 1433 | "fastest-levenshtein": "^1.0.12", 1434 | "import-local": "^3.0.2", 1435 | "interpret": "^2.2.0", 1436 | "rechoir": "^0.7.0", 1437 | "webpack-merge": "^5.7.3" 1438 | }, 1439 | "bin": { 1440 | "webpack-cli": "bin/cli.js" 1441 | }, 1442 | "engines": { 1443 | "node": ">=10.13.0" 1444 | }, 1445 | "funding": { 1446 | "type": "opencollective", 1447 | "url": "https://opencollective.com/webpack" 1448 | }, 1449 | "peerDependencies": { 1450 | "webpack": "4.x.x || 5.x.x" 1451 | }, 1452 | "peerDependenciesMeta": { 1453 | "@webpack-cli/generators": { 1454 | "optional": true 1455 | }, 1456 | "@webpack-cli/migrate": { 1457 | "optional": true 1458 | }, 1459 | "webpack-bundle-analyzer": { 1460 | "optional": true 1461 | }, 1462 | "webpack-dev-server": { 1463 | "optional": true 1464 | } 1465 | } 1466 | }, 1467 | "node_modules/webpack-cli/node_modules/commander": { 1468 | "version": "7.2.0", 1469 | "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", 1470 | "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", 1471 | "dev": true, 1472 | "engines": { 1473 | "node": ">= 10" 1474 | } 1475 | }, 1476 | "node_modules/webpack-merge": { 1477 | "version": "5.8.0", 1478 | "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", 1479 | "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", 1480 | "dev": true, 1481 | "dependencies": { 1482 | "clone-deep": "^4.0.1", 1483 | "wildcard": "^2.0.0" 1484 | }, 1485 | "engines": { 1486 | "node": ">=10.0.0" 1487 | } 1488 | }, 1489 | "node_modules/webpack-sources": { 1490 | "version": "3.2.3", 1491 | "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", 1492 | "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", 1493 | "dev": true, 1494 | "engines": { 1495 | "node": ">=10.13.0" 1496 | } 1497 | }, 1498 | "node_modules/which": { 1499 | "version": "2.0.2", 1500 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 1501 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 1502 | "dev": true, 1503 | "dependencies": { 1504 | "isexe": "^2.0.0" 1505 | }, 1506 | "bin": { 1507 | "node-which": "bin/node-which" 1508 | }, 1509 | "engines": { 1510 | "node": ">= 8" 1511 | } 1512 | }, 1513 | "node_modules/wildcard": { 1514 | "version": "2.0.0", 1515 | "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", 1516 | "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", 1517 | "dev": true 1518 | }, 1519 | "node_modules/yallist": { 1520 | "version": "4.0.0", 1521 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 1522 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", 1523 | "dev": true 1524 | } 1525 | } 1526 | } 1527 | --------------------------------------------------------------------------------