From 60da6e2a2b04362de652eee04deb6e9ee44c3c4d Mon Sep 17 00:00:00 2001 From: Ben Stickley <35735118+bestickley@users.noreply.github.com> Date: Mon, 2 Oct 2023 11:56:02 -0400 Subject: [PATCH] feat: faster asset deployment (#137) * refactor: make open-next a peer dependency and use local installed version to build * feat: faster deployment * build: fix non existent exports * fix: static assets temp dir; sqs policy; lambda function paths; invalidation physical resource id * chore: self mutation Signed-off-by: github-actions * fix: cloudfront invalidation * chore: self mutation Signed-off-by: github-actions * fix: nextjs-bucket-deployment custom resource lambda * fix: nextjs-bucket-deployment to write correct paths to destination asset; don't use destination key prefix is not defined * chore: self mutation Signed-off-by: github-actions * refactor: remove unneeded tempBuildDir in NextjsDistribution * fix: pnpm symlink issue by pre-archiving and using jszip int bucket deployment * chore: self mutation Signed-off-by: github-actions * refactor: simplify props * chore: self mutation Signed-off-by: github-actions * feat: add Revalidation Custom Resource * fix: unzip buffer instead of string for binary file formats in bucket deployment * fix: add revalidation url to server fn; add non bundled open-next output to server and revalidation fn * fix: environment variable substitutions * test: create e2e tests * fix: update examples/README * fix: undici types issue * chore: self mutation Signed-off-by: github-actions * fix: host header issue * docs: add missing step to build packages * docs: add more thorough quick start example * fix: remove 'Building...', 'Finished...' logs which are confusing when destroying * fix: Lambda Function URL IAM Auth host header issue * docs: improve README on playwright e2e testing * docs: add high-security example with fn url IAM_AUTH and cdk-nag * chore: self mutation Signed-off-by: github-actions * docs: clarify pnpm monorepo symlinks doesn't apply to everyone * docs: add to examples readme prerequisites for building cdk-nextjs-standalone * docs: fix nextjsPath in example Co-authored-by: Mischa Spiegelmock * chore: self mutation Signed-off-by: github-actions --------- Signed-off-by: github-actions Co-authored-by: github-actions Co-authored-by: Mischa Spiegelmock --- .eslintrc.json | 18 +- .gitattributes | 2 +- .github/workflows/build.yml | 6 +- .github/workflows/pull-request-lint.yml | 2 +- .github/workflows/release.yml | 8 +- .github/workflows/upgrade-main.yml | 6 +- .gitignore | 3 +- .gitmodules | 3 + .mergify.yml | 2 +- .npmignore | 3 +- .projen/deps.json | 146 +- .projen/files.json | 2 +- .projen/tasks.json | 75 +- .projenrc.js | 58 - .projenrc.ts | 121 + API.md | 2432 ++++----------- README.md | 44 +- assets/PlaceholderSite/index.html | 46 - assets/lambda/S3EnvRewriter.ts | 219 -- docs/code-deployment-flow.md | 22 + docs/major-changes.md | 25 + examples/README.md | 29 + examples/app-pages-router/.gitignore | 8 + examples/app-pages-router/cdk.json | 60 + examples/app-pages-router/package.json | 21 + examples/app-pages-router/pnpm-lock.yaml | 623 ++++ examples/app-pages-router/src/app.ts | 6 + examples/app-pages-router/src/stack.ts | 18 + examples/app-pages-router/tsconfig.json | 31 + examples/app-router/.gitignore | 8 + examples/app-router/README.md | 0 examples/app-router/cdk.json | 60 + examples/app-router/package.json | 21 + examples/app-router/pnpm-lock.yaml | 832 +++++ examples/app-router/src/app.ts | 6 + examples/app-router/src/stack.ts | 18 + examples/app-router/tsconfig.json | 31 + examples/high-security/.gitignore | 8 + examples/high-security/README.md | 3 + examples/high-security/cdk.json | 60 + examples/high-security/package.json | 22 + examples/high-security/pnpm-lock.yaml | 806 +++++ examples/high-security/src/app.ts | 8 + examples/high-security/src/stack.ts | 66 + examples/high-security/tsconfig.json | 31 + examples/install.sh | 13 + examples/pages-router/.gitignore | 8 + examples/pages-router/cdk.json | 60 + examples/pages-router/package.json | 21 + examples/pages-router/pnpm-lock.yaml | 623 ++++ examples/pages-router/src/app.ts | 6 + examples/pages-router/src/stack.ts | 18 + examples/pages-router/tsconfig.json | 31 + open-next | 1 + package.json | 82 +- src/BundleFunction.ts | 47 - src/Nextjs.ts | 123 +- src/NextjsAssetsDeployment.ts | 217 -- src/NextjsBase.ts | 76 +- src/NextjsBucketDeployment.ts | 141 + src/NextjsBuild.ts | 286 +- src/NextjsDistribution.ts | 146 +- src/NextjsImage.ts | 82 +- src/NextjsInvalidation.ts | 65 + src/NextjsLayer.ts | 86 - src/NextjsRevalidation.ts | 84 +- src/NextjsS3EnvRewriter.ts | 146 - src/NextjsServer.ts | 216 +- src/NextjsStaticAssets.ts | 104 + src/constants.ts | 11 +- src/index.ts | 26 +- src/lambdas/nextjs-bucket-deployment.ts | 359 +++ .../lambdas/sign-fn-url.test.ts | 160 +- .../lambdas/sign-fn-url.ts | 4 +- src/types.d.ts | 22 + src/utils/common-build-options.ts | 12 + src/utils/common-lambda-props.ts | 34 + src/utils/convert-path.ts | 6 + src/utils/create-archive.ts | 49 + src/utils/list-directories.ts | 20 + tsconfig.dev.json | 10 +- yarn.lock | 2695 +++++++---------- 82 files changed, 6962 insertions(+), 5147 deletions(-) create mode 100644 .gitmodules delete mode 100644 .projenrc.js create mode 100644 .projenrc.ts delete mode 100644 assets/PlaceholderSite/index.html delete mode 100644 assets/lambda/S3EnvRewriter.ts create mode 100644 docs/code-deployment-flow.md create mode 100644 docs/major-changes.md create mode 100644 examples/README.md create mode 100644 examples/app-pages-router/.gitignore create mode 100644 examples/app-pages-router/cdk.json create mode 100644 examples/app-pages-router/package.json create mode 100644 examples/app-pages-router/pnpm-lock.yaml create mode 100644 examples/app-pages-router/src/app.ts create mode 100644 examples/app-pages-router/src/stack.ts create mode 100644 examples/app-pages-router/tsconfig.json create mode 100644 examples/app-router/.gitignore create mode 100644 examples/app-router/README.md create mode 100644 examples/app-router/cdk.json create mode 100644 examples/app-router/package.json create mode 100644 examples/app-router/pnpm-lock.yaml create mode 100644 examples/app-router/src/app.ts create mode 100644 examples/app-router/src/stack.ts create mode 100644 examples/app-router/tsconfig.json create mode 100644 examples/high-security/.gitignore create mode 100644 examples/high-security/README.md create mode 100644 examples/high-security/cdk.json create mode 100644 examples/high-security/package.json create mode 100644 examples/high-security/pnpm-lock.yaml create mode 100644 examples/high-security/src/app.ts create mode 100644 examples/high-security/src/stack.ts create mode 100644 examples/high-security/tsconfig.json create mode 100644 examples/install.sh create mode 100644 examples/pages-router/.gitignore create mode 100644 examples/pages-router/cdk.json create mode 100644 examples/pages-router/package.json create mode 100644 examples/pages-router/pnpm-lock.yaml create mode 100644 examples/pages-router/src/app.ts create mode 100644 examples/pages-router/src/stack.ts create mode 100644 examples/pages-router/tsconfig.json create mode 160000 open-next delete mode 100644 src/BundleFunction.ts delete mode 100644 src/NextjsAssetsDeployment.ts create mode 100644 src/NextjsBucketDeployment.ts create mode 100644 src/NextjsInvalidation.ts delete mode 100644 src/NextjsLayer.ts delete mode 100644 src/NextjsS3EnvRewriter.ts create mode 100644 src/NextjsStaticAssets.ts create mode 100644 src/lambdas/nextjs-bucket-deployment.ts rename assets/lambda@edge/LambdaOriginRequestIamAuth.test.ts => src/lambdas/sign-fn-url.test.ts (63%) rename assets/lambda@edge/LambdaOriginRequestIamAuth.ts => src/lambdas/sign-fn-url.ts (97%) create mode 100644 src/types.d.ts create mode 100644 src/utils/common-build-options.ts create mode 100644 src/utils/common-lambda-props.ts create mode 100644 src/utils/convert-path.ts create mode 100644 src/utils/create-archive.ts create mode 100644 src/utils/list-directories.ts diff --git a/.eslintrc.json b/.eslintrc.json index f511d819..20d05c34 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,4 +1,4 @@ -// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +// ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". { "env": { "jest": true, @@ -37,12 +37,10 @@ } }, "ignorePatterns": [ - "*.js", - "*.d.ts", - "node_modules/", - "*.generated.ts", - "coverage", - "!.projenrc.js" + "examples/", + "e2e-tests/", + "!.projenrc.ts", + "!projenrc/**/*.ts" ], "rules": { "prettier/prettier": [ @@ -56,7 +54,9 @@ { "devDependencies": [ "**/test/**", - "**/build-tools/**" + "**/build-tools/**", + ".projenrc.ts", + "projenrc/**/*.ts" ], "optionalDependencies": false, "peerDependencies": true @@ -131,7 +131,7 @@ "overrides": [ { "files": [ - ".projenrc.js" + ".projenrc.ts" ], "rules": { "@typescript-eslint/no-require-imports": "off", diff --git a/.gitattributes b/.gitattributes index acac7707..bda1e5e0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". *.snap linguist-generated /.eslintrc.json linguist-generated diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa6db1a1..3d5d30c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". name: build on: @@ -22,7 +22,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.0.0 - name: Install dependencies run: yarn install --check-files - name: build @@ -91,7 +91,7 @@ jobs: steps: - uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.0.0 - name: Download build artifacts uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/pull-request-lint.yml b/.github/workflows/pull-request-lint.yml index 6758951b..3c16c6de 100644 --- a/.github/workflows/pull-request-lint.yml +++ b/.github/workflows/pull-request-lint.yml @@ -1,4 +1,4 @@ -# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". name: pull-request-lint on: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3095cf9c..d81cf3bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". name: release on: @@ -27,7 +27,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.0.0 - name: Install dependencies run: yarn install --check-files --frozen-lockfile - name: release @@ -55,7 +55,7 @@ jobs: steps: - uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.0.0 - name: Download build artifacts uses: actions/download-artifact@v3 with: @@ -84,7 +84,7 @@ jobs: steps: - uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.0.0 - name: Download build artifacts uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/upgrade-main.yml b/.github/workflows/upgrade-main.yml index 496d938b..ba4f495b 100644 --- a/.github/workflows/upgrade-main.yml +++ b/.github/workflows/upgrade-main.yml @@ -1,10 +1,10 @@ -# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". name: upgrade-main on: workflow_dispatch: {} schedule: - - cron: 0 0 * * * + - cron: 0 0 1 * * jobs: upgrade: name: Upgrade @@ -21,7 +21,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.0.0 - name: Install dependencies run: yarn install --check-files --frozen-lockfile - name: Upgrade dependencies diff --git a/.gitignore b/.gitignore index 2372a806..092ff775 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". !/.gitattributes !/.projen/tasks.json !/.projen/deps.json @@ -51,3 +51,4 @@ junit.xml .jsii tsconfig.json !/API.md +/assets/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..c1155c95 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "open-next"] + path = open-next + url = https://github.com/sst/open-next.git diff --git a/.mergify.yml b/.mergify.yml index c4fdf7d5..154b39fa 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,4 +1,4 @@ -# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". queue_rules: - name: default diff --git a/.npmignore b/.npmignore index 2b909372..bc635523 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,4 @@ -# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". /.projen/ /test-reports/ junit.xml @@ -22,3 +22,4 @@ dist tsconfig.tsbuildinfo /.eslintrc.json !.jsii +!/assets/ diff --git a/.projen/deps.json b/.projen/deps.json index 4b2b8ea5..db054760 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -1,13 +1,40 @@ { "dependencies": [ + { + "name": "@aws-crypto/sha256-js", + "type": "build" + }, + { + "name": "@aws-sdk/client-s3", + "type": "build" + }, + { + "name": "@smithy/signature-v4", + "type": "build" + }, + { + "name": "@types/adm-zip", + "type": "build" + }, + { + "name": "@types/aws-lambda", + "type": "build" + }, { "name": "@types/jest", - "version": "^27", + "type": "build" + }, + { + "name": "@types/micromatch", + "type": "build" + }, + { + "name": "@types/mime-types", "type": "build" }, { "name": "@types/node", - "version": "^16", + "version": "^18", "type": "build" }, { @@ -22,11 +49,11 @@ }, { "name": "aws-cdk-lib", - "version": "2.73.0", + "version": "2.93.0", "type": "build" }, { - "name": "aws-sdk", + "name": "aws-lambda", "type": "build" }, { @@ -34,6 +61,10 @@ "version": "10.0.5", "type": "build" }, + { + "name": "esbuild", + "type": "build" + }, { "name": "eslint-config-prettier", "type": "build" @@ -60,13 +91,12 @@ "type": "build" }, { - "name": "jest-junit", - "version": "^15", + "name": "jest", "type": "build" }, { - "name": "jest", - "version": "^27", + "name": "jest-junit", + "version": "^15", "type": "build" }, { @@ -83,21 +113,29 @@ }, { "name": "jsii-rosetta", - "version": "1.x", + "version": "~5.0.0", "type": "build" }, { "name": "jsii", - "version": "1.x", + "version": "~5.0.0", "type": "build" }, { - "name": "npm-check-updates", - "version": "^16", + "name": "jszip", "type": "build" }, { - "name": "open-next", + "name": "micromatch", + "type": "build" + }, + { + "name": "mime-types", + "type": "build" + }, + { + "name": "npm-check-updates", + "version": "^16", "type": "build" }, { @@ -115,95 +153,27 @@ }, { "name": "ts-jest", - "version": "^27", "type": "build" }, { - "name": "typescript", + "name": "ts-node", "type": "build" }, { - "name": "@aws-crypto/sha256-js", - "type": "bundled" - }, - { - "name": "@aws-sdk/client-s3", - "type": "bundled" - }, - { - "name": "@aws-sdk/signature-v4", - "type": "bundled" - }, - { - "name": "@types/aws-lambda", - "type": "bundled" - }, - { - "name": "@types/cross-spawn", - "type": "bundled" - }, - { - "name": "@types/fs-extra", - "type": "bundled" - }, - { - "name": "@types/micromatch", - "type": "bundled" - }, - { - "name": "aws-lambda", - "type": "bundled" + "name": "typescript", + "type": "build" }, { - "name": "cross-spawn", - "type": "bundled" + "name": "undici", + "type": "build" }, { "name": "esbuild", - "version": "0.17.16", "type": "bundled" }, - { - "name": "fs-extra", - "type": "bundled" - }, - { - "name": "glob", - "type": "bundled" - }, - { - "name": "indent-string", - "type": "bundled" - }, - { - "name": "jszip", - "type": "bundled" - }, - { - "name": "micromatch", - "type": "bundled" - }, - { - "name": "node-fetch", - "type": "bundled" - }, - { - "name": "serverless-http", - "type": "bundled" - }, - { - "name": "@types/babel__traverse", - "version": "7.18.2", - "type": "override" - }, - { - "name": "@types/prettier", - "version": "2.6.0", - "type": "override" - }, { "name": "aws-cdk-lib", - "version": "^2.73.0", + "version": "^2.93.0", "type": "peer" }, { @@ -212,5 +182,5 @@ "type": "peer" } ], - "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." + "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." } diff --git a/.projen/files.json b/.projen/files.json index bfa245ff..c6df2fb4 100644 --- a/.projen/files.json +++ b/.projen/files.json @@ -16,5 +16,5 @@ "LICENSE", "tsconfig.dev.json" ], - "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." + "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." } diff --git a/.projen/tasks.json b/.projen/tasks.json index c04051d7..7dd27f12 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -41,6 +41,54 @@ ], "condition": "! git log --oneline -1 | grep -q \"chore(release):\"" }, + "bundle": { + "name": "bundle", + "description": "Prepare assets", + "steps": [ + { + "spawn": "bundle:lambdas/nextjs-bucket-deployment" + }, + { + "spawn": "bundle:lambdas/sign-fn-url" + } + ] + }, + "bundle:lambdas/nextjs-bucket-deployment": { + "name": "bundle:lambdas/nextjs-bucket-deployment", + "description": "Create a JavaScript bundle from ./src/lambdas/nextjs-bucket-deployment.ts", + "steps": [ + { + "exec": "esbuild --bundle ./src/lambdas/nextjs-bucket-deployment.ts --target=\"node18\" --platform=\"node\" --outfile=\"assets/lambdas/nextjs-bucket-deployment/index.js\" --sourcemap" + } + ] + }, + "bundle:lambdas/nextjs-bucket-deployment:watch": { + "name": "bundle:lambdas/nextjs-bucket-deployment:watch", + "description": "Continuously update the JavaScript bundle from ./src/lambdas/nextjs-bucket-deployment.ts", + "steps": [ + { + "exec": "esbuild --bundle ./src/lambdas/nextjs-bucket-deployment.ts --target=\"node18\" --platform=\"node\" --outfile=\"assets/lambdas/nextjs-bucket-deployment/index.js\" --sourcemap --watch" + } + ] + }, + "bundle:lambdas/sign-fn-url": { + "name": "bundle:lambdas/sign-fn-url", + "description": "Create a JavaScript bundle from ./src/lambdas/sign-fn-url.ts", + "steps": [ + { + "exec": "esbuild --bundle ./src/lambdas/sign-fn-url.ts --target=\"node18\" --platform=\"node\" --outfile=\"assets/lambdas/sign-fn-url/index.js\" --sourcemap" + } + ] + }, + "bundle:lambdas/sign-fn-url:watch": { + "name": "bundle:lambdas/sign-fn-url:watch", + "description": "Continuously update the JavaScript bundle from ./src/lambdas/sign-fn-url.ts", + "steps": [ + { + "exec": "esbuild --bundle ./src/lambdas/sign-fn-url.ts --target=\"node18\" --platform=\"node\" --outfile=\"assets/lambdas/sign-fn-url/index.js\" --sourcemap --watch" + } + ] + }, "clobber": { "name": "clobber", "description": "hard resets to HEAD of origin and cleans the local repo", @@ -96,7 +144,7 @@ "description": "Synthesize project files", "steps": [ { - "exec": "node .projenrc.js" + "exec": "ts-node --project tsconfig.dev.json .projenrc.ts" } ] }, @@ -126,7 +174,7 @@ "description": "Runs eslint against the codebase", "steps": [ { - "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test build-tools .projenrc.js" + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test build-tools projenrc .projenrc.ts" } ] }, @@ -190,7 +238,12 @@ }, "pre-compile": { "name": "pre-compile", - "description": "Prepare the project for compilation" + "description": "Prepare the project for compilation", + "steps": [ + { + "spawn": "bundle" + } + ] }, "release": { "name": "release", @@ -223,7 +276,7 @@ "description": "Run tests", "steps": [ { - "exec": "jest --passWithNoTests --updateSnapshot", + "exec": "jest --passWithNoTests --coverageProvider=v8 --updateSnapshot", "receiveArgs": true }, { @@ -267,25 +320,25 @@ "exec": "yarn upgrade npm-check-updates" }, { - "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='aws-cdk-lib,constructs,jsii-rosetta,jsii,esbuild'" + "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='aws-cdk-lib,constructs,jsii-rosetta,jsii'" }, { - "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='aws-cdk-lib,constructs,jsii-rosetta,jsii,esbuild'" + "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='aws-cdk-lib,constructs,jsii-rosetta,jsii'" }, { - "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='aws-cdk-lib,constructs,jsii-rosetta,jsii,esbuild'" + "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='aws-cdk-lib,constructs,jsii-rosetta,jsii'" }, { - "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='aws-cdk-lib,constructs,jsii-rosetta,jsii,esbuild'" + "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='aws-cdk-lib,constructs,jsii-rosetta,jsii'" }, { - "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='aws-cdk-lib,constructs,jsii-rosetta,jsii,esbuild'" + "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='aws-cdk-lib,constructs,jsii-rosetta,jsii'" }, { "exec": "yarn install --check-files" }, { - "exec": "yarn upgrade" + "exec": "yarn upgrade @aws-crypto/sha256-js @aws-sdk/client-s3 @smithy/signature-v4 @types/adm-zip @types/aws-lambda @types/jest @types/micromatch @types/mime-types @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser aws-cdk-lib aws-lambda constructs esbuild eslint-config-prettier eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-prettier eslint jest jest-junit jsii-diff jsii-docgen jsii-pacmak jsii-rosetta jsii jszip micromatch mime-types npm-check-updates prettier projen standard-version ts-jest ts-node typescript undici esbuild aws-cdk-lib constructs" }, { "exec": "npx projen" @@ -308,5 +361,5 @@ "env": { "PATH": "$(npx -c \"node --print process.env.PATH\")" }, - "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." + "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." } diff --git a/.projenrc.js b/.projenrc.js deleted file mode 100644 index 79dea021..00000000 --- a/.projenrc.js +++ /dev/null @@ -1,58 +0,0 @@ -const { awscdk, JsonPatch } = require('projen'); -const project = new awscdk.AwsCdkConstructLibrary({ - author: 'JetBridge', - authorAddress: 'mischa@jetbridge.com', - cdkVersion: '2.73.0', - defaultReleaseBranch: 'main', - name: 'cdk-nextjs-standalone', - repositoryUrl: 'https://github.com/jetbridge/cdk-nextjs.git', - authorOrganization: true, - packageName: 'cdk-nextjs-standalone', - description: 'Deploy a NextJS app to AWS using CDK. Uses standalone build and output tracing.', - keywords: ['nextjs', 'next', 'aws-cdk', 'aws', 'cdk', 'standalone', 'iac', 'infrastructure', 'cloud', 'serverless'], - eslintOptions: { - prettier: true, - // ignorePatterns: ['assets/**/*'] - }, - majorVersion: 4, - prerelease: 'beta', - - tsconfig: { compilerOptions: { noUnusedLocals: false }, include: ['assets/**/*.ts'] }, - tsconfigDev: { compilerOptions: { noUnusedLocals: false } }, - - bundledDeps: [ - 'cross-spawn', - 'fs-extra', - 'indent-string', - 'micromatch', - '@aws-sdk/client-s3', - '@types/cross-spawn', - '@types/fs-extra', - '@types/micromatch', - '@types/aws-lambda', - 'esbuild@0.17.16', - 'aws-lambda', - 'serverless-http', - 'jszip', - 'glob', - 'node-fetch', - '@aws-sdk/signature-v4', - '@aws-crypto/sha256-js', - ] /* Runtime dependencies of this module. */, - devDeps: ['open-next', 'aws-sdk', 'constructs'] /* Build dependencies for this module. */, - - // do not generate sample test files - sampleCode: false, -}); - -const packageJson = project.tryFindObjectFile('package.json'); -if (packageJson) { - packageJson.patch( - JsonPatch.replace('/jest/testMatch', [ - '/src/**/__tests__/**/*.ts?(x)', - '/(test|src|assets)/**/*(*.)@(spec|test).ts?(x)', - ]) - ); -} - -project.synth(); diff --git a/.projenrc.ts b/.projenrc.ts new file mode 100644 index 00000000..2eb80301 --- /dev/null +++ b/.projenrc.ts @@ -0,0 +1,121 @@ +import { awscdk } from 'projen'; +import { TypeScriptCompilerOptions, UpgradeDependenciesSchedule } from 'projen/lib/javascript'; +import { commonBundlingOptions } from './src/utils/common-build-options'; + +const commonTscOptions: TypeScriptCompilerOptions = { + // isolatedModules: true, // why doesn't this work? + skipLibCheck: true, + // esModuleInterop: true, // why doesn't this work? +}; + +const project = new awscdk.AwsCdkConstructLibrary({ + // repository config + author: 'JetBridge', + authorAddress: 'mischa@jetbridge.com', + authorOrganization: true, + defaultReleaseBranch: 'main', + repositoryUrl: 'https://github.com/jetbridge/cdk-nextjs.git', + depsUpgradeOptions: { + workflowOptions: { + schedule: UpgradeDependenciesSchedule.MONTHLY, + }, + }, + // package config + name: 'cdk-nextjs-standalone', + packageName: 'cdk-nextjs-standalone', + majorVersion: 4, + prerelease: 'beta', + minNodeVersion: '18.0.0', + description: 'Deploy a NextJS app to AWS using CDK. Uses standalone build and output tracing.', + keywords: ['nextjs', 'next', 'aws-cdk', 'aws', 'cdk', 'standalone', 'iac', 'infrastructure', 'cloud', 'serverless'], + // tooling config + eslintOptions: { + prettier: true, + dirs: ['src'], + ignorePatterns: ['examples/', 'e2e-tests/'], + }, + projenrcTs: true, + tsconfig: { compilerOptions: { ...commonTscOptions } }, + tsconfigDev: { compilerOptions: { ...commonTscOptions } }, + // dependency config + jsiiVersion: '~5.0.0', + cdkVersion: '2.93.0', + bundledDeps: ['esbuild'] /* Runtime dependencies of this module. */, + devDeps: [ + '@aws-crypto/sha256-js', + '@aws-sdk/client-s3', + '@smithy/signature-v4', + '@types/adm-zip', + '@types/aws-lambda', + '@types/micromatch', + '@types/mime-types', + '@types/node@^18', + 'aws-lambda', + 'constructs', + 'jszip', + 'micromatch', + 'mime-types', + 'undici', + ] /* Build dependencies for this module. */, + // misc config + sampleCode: false, // do not generate sample test files +}); + +project.bundler.addBundle('./src/lambdas/nextjs-bucket-deployment.ts', commonBundlingOptions); +project.bundler.addBundle('./src/lambdas/sign-fn-url.ts', commonBundlingOptions); + +// const e2eTestsWorkflow = project.github?.addWorkflow('e2e-tests'); +// e2eTestsWorkflow?.on({ pullRequest: { branches: ['main'] } }); +// e2eTestsWorkflow?.addJob('run-e2e-tests', { +// runsOn: ['ubuntu-latest'], +// permissions: {}, +// steps: [ +// { uses: 'actions/checkout@v3' }, +// { +// name: 'Setup Node.js', +// uses: 'actions/setup-node@v3', +// with: { +// 'node-version': '18', +// }, +// }, +// { uses: 'pnpm/action-setup@v2', with: { run_install: false } }, +// { name: 'Setup open-next git submodule', run: 'git submodule init && git submodule update' }, +// { name: 'Install dependencies', run: 'examples/install.sh' }, +// { name: 'Install Playwright Browsers', run: 'pnpx playwright install --with-deps' }, +// // TODO: cache browsers? +// { name: 'Install CDK', run: 'pnpm add -g aws-cdk' }, +// { name: 'Deploy App Router', run: 'cdk deploy', workingDirectory: 'examples/app-router' }, +// { name: 'Deploy Pages Router', run: 'cdk deploy', workingDirectory: 'examples/app-pages-router' }, +// { name: 'Deploy App-Pages Router', run: 'cdk deploy', workingDirectory: 'examples/pages-router' }, +// { +// uses: 'actions/upload-artifact@v3', +// if: 'always()', +// with: { +// name: 'app-router-playwright-report', +// path: 'examples/app-router/playwright-report', +// 'retention-days': 30, +// }, +// }, +// { +// uses: 'actions/upload-artifact@v3', +// if: 'always()', +// with: { +// name: 'pages-router-playwright-report', +// path: 'examples/pages-router/playwright-report', +// 'retention-days': 30, +// }, +// }, +// { +// uses: 'actions/upload-artifact@v3', +// if: 'always()', +// with: { +// name: 'app-pages-router-playwright-report', +// path: 'examples/app-pages-router/playwright-report', +// 'retention-days': 30, +// }, +// }, +// ], +// timeoutMinutes: 60, +// }); + +project.synth(); diff --git a/API.md b/API.md index b9251509..e3b65b64 100644 --- a/API.md +++ b/API.md @@ -10,20 +10,25 @@ Supported NextJs versions: >=12.3.0+ (includes 13.0.0+) Uses the [standalone output](https://nextjs.org/docs/advanced-features/output-file-tracing) build mode. ## Quickstart - -Add the dependency `esbuild@0.17.16` to your project along with `cdk-nextjs-standalone`. - -```shell -npm install -D esbuild@0.17.16 cdk-nextjs-standalone -``` - ```ts -import path from 'path'; +import { App, Stack, StackProps } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; import { Nextjs } from 'cdk-nextjs-standalone'; -new Nextjs(this, 'Web', { - nextjsPath: './web', // relative path to nextjs project root -}); +class WebStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + const nextjs = new Nextjs(this, 'Nextjs', { + nextjsPath: './web', // relative path from your project root to NextJS + }); + new CfnOutput(this, "CloudFrontDistributionDomain", { + value: nextjs.distribution.distributionDomain, + }); + } +} + +const app = new App(); +new WebStack(app, 'web'); ``` ## Important Notes @@ -127,22 +132,7 @@ Don't manually update package.json or use npm CLI. Update dependencies in .proje ## Breaking changes -- v4.0.0 - - Renamed `NextjsLambda` to `NextjsServer` - - Renamed `ImageOptimizationLambda` to `NextjsImage` - - Renamed `NextjsCachePolicyProps.lambdaCachePolicy` to `NextjsCachePolicyProps.serverCachePolicy` - - Removed `NextjsOriginRequestPolicyProps.fallbackOriginRequestPolicy` - - Renamed `NextjsOriginRequestPolicyProps.lambdaOriginRequestPolicy` to `NextjsOriginRequestPolicyProps.serverOriginRequestPolicy` - - Removed `NextjsDistribution.staticCachePolicyProps` - - Renamed `NextjsDistribution.lambdaCachePolicyProps` to `NextjsDistribution.serverCachePolicyProps` - - Renamed `NextjsDistribution.lambdaOriginRequestPolicyProps` to `NextjsDistribution.serverOriginRequestPolicyProps` - - Removed `NextjsDistribution.fallbackOriginRequestPolicyProps` - - Removed `NextjsDistribution.imageOptimizationOriginRequestPolicyProps` - - NOTE: when upgrading to v4 from v3, the Lambda@Edge function will be renamed or removed. CloudFormation will fail to delete the function b/c they're replicated a take ~15 min to delete (more [here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-edge-delete-replicas.html)). You can either deploy CloudFormation with it's "no rollback" feature for a clean deployment or mark the Lambda@Edge function as "retain on delete". - -- v3.0.0: Using open-next for building, ARM64 architecture for image handling, new build options. - -- v2.0.0: SST wrapper changed, lambda/assets/distribution defaults now are in the `defaults` prop, refactored distribution settings into the new NextjsDistribution construct. If you are upgrading, you must temporarily remove the `customDomain` on your existing 1.x.x app before upgrading to >=2.x.x because the CloudFront distribution will get recreated due to refactoring, and the custom domain must be globally unique across all CloudFront distributions. Prepare for downtime. +See [here](./docs/major-changes.md). # API Reference @@ -248,9 +238,9 @@ Any object. | **Name** | **Type** | **Description** | | --- | --- | --- | | node | constructs.Node | The tree node. | -| bucket | aws-cdk-lib.aws_s3.IBucket | *No description.* | -| url | string | *No description.* | -| assetsDeployment | NextJsAssetsDeployment | Asset deployment to S3. | +| bucket | aws-cdk-lib.aws_s3.IBucket | Convenience method to access `Nextjs.staticAssets.bucket`. | +| tempBuildDir | string | Where build-time assets for deployment are stored. | +| url | string | URL of Next.js App. | | distribution | NextjsDistribution | CloudFront distribution. | | imageOptimizationFunction | NextjsImage | The image optimization handler lambda function. | | imageOptimizationLambdaFunctionUrl | aws-cdk-lib.aws_lambda.FunctionUrl | *No description.* | @@ -258,8 +248,7 @@ Any object. | nextBuild | NextjsBuild | Built NextJS project output. | | revalidation | NextjsRevalidation | Revalidation handler and queue. | | serverFunction | NextjsServer | The main NextJS server handler lambda function. | -| tempBuildDir | string | Where build-time assets for deployment are stored. | -| configBucket | aws-cdk-lib.aws_s3.Bucket | *No description.* | +| staticAssets | NextjsStaticAssets | Asset deployment to S3. | --- @@ -283,27 +272,31 @@ public readonly bucket: IBucket; - *Type:* aws-cdk-lib.aws_s3.IBucket +Convenience method to access `Nextjs.staticAssets.bucket`. + --- -##### `url`Required +##### `tempBuildDir`Required ```typescript -public readonly url: string; +public readonly tempBuildDir: string; ``` - *Type:* string +Where build-time assets for deployment are stored. + --- -##### `assetsDeployment`Required +##### `url`Required ```typescript -public readonly assetsDeployment: NextJsAssetsDeployment; +public readonly url: string; ``` -- *Type:* NextJsAssetsDeployment +- *Type:* string -Asset deployment to S3. +URL of Next.js App. --- @@ -387,66 +380,54 @@ The main NextJS server handler lambda function. --- -##### `tempBuildDir`Required +##### `staticAssets`Required ```typescript -public readonly tempBuildDir: string; +public readonly staticAssets: NextjsStaticAssets; ``` -- *Type:* string - -Where build-time assets for deployment are stored. - ---- - -##### `configBucket`Optional - -```typescript -public readonly configBucket: Bucket; -``` +- *Type:* NextjsStaticAssets -- *Type:* aws-cdk-lib.aws_s3.Bucket +Asset deployment to S3. --- -### NextJsAssetsDeployment - -Uploads NextJS-built static and public files to S3. +### NextjsBucketDeployment -Will rewrite CloudFormation references with their resolved values after uploading. +Similar to CDK's `BucketDeployment` construct, but with a focus on replacing template placeholders (i.e. environment variables) and configuring PUT options like cache control. -#### Initializers +#### Initializers ```typescript -import { NextJsAssetsDeployment } from 'cdk-nextjs-standalone' +import { NextjsBucketDeployment } from 'cdk-nextjs-standalone' -new NextJsAssetsDeployment(scope: Construct, id: string, props: NextjsAssetsDeploymentProps) +new NextjsBucketDeployment(scope: Construct, id: string, props: NextjsBucketDeploymentProps) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | -| props | NextjsAssetsDeploymentProps | *No description.* | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | NextjsBucketDeploymentProps | *No description.* | --- -##### `scope`Required +##### `scope`Required - *Type:* constructs.Construct --- -##### `id`Required +##### `id`Required - *Type:* string --- -##### `props`Required +##### `props`Required -- *Type:* NextjsAssetsDeploymentProps +- *Type:* NextjsBucketDeploymentProps --- @@ -454,11 +435,11 @@ new NextJsAssetsDeployment(scope: Construct, id: string, props: NextjsAssetsDepl | **Name** | **Description** | | --- | --- | -| toString | Returns a string representation of this construct. | +| toString | Returns a string representation of this construct. | --- -##### `toString` +##### `toString` ```typescript public toString(): string @@ -470,21 +451,23 @@ Returns a string representation of this construct. | **Name** | **Description** | | --- | --- | -| isConstruct | Checks if `x` is a construct. | +| isConstruct | Checks if `x` is a construct. | +| getSubstitutionConfig | Creates `substitutionConfig` an object by extracting unresolved tokens. | +| getSubstitutionValue | Formats a string as a template value so custom resource knows to replace. | --- -##### ~~`isConstruct`~~ +##### ~~`isConstruct`~~ ```typescript -import { NextJsAssetsDeployment } from 'cdk-nextjs-standalone' +import { NextjsBucketDeployment } from 'cdk-nextjs-standalone' -NextJsAssetsDeployment.isConstruct(x: any) +NextjsBucketDeployment.isConstruct(x: any) ``` Checks if `x` is a construct. -###### `x`Required +###### `x`Required - *Type:* any @@ -492,81 +475,75 @@ Any object. --- -#### Properties - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| node | constructs.Node | The tree node. | -| bucket | aws-cdk-lib.aws_s3.IBucket | Bucket containing assets. | -| deployments | aws-cdk-lib.aws_s3_deployment.BucketDeployment[] | Asset deployments to S3. | -| staticTempDir | string | *No description.* | -| rewriter | NextjsS3EnvRewriter | *No description.* | - ---- - -##### `node`Required +##### `getSubstitutionConfig` ```typescript -public readonly node: Node; +import { NextjsBucketDeployment } from 'cdk-nextjs-standalone' + +NextjsBucketDeployment.getSubstitutionConfig(env: {[ key: string ]: string}) ``` -- *Type:* constructs.Node +Creates `substitutionConfig` an object by extracting unresolved tokens. -The tree node. +###### `env`Required + +- *Type:* {[ key: string ]: string} --- -##### `bucket`Required +##### `getSubstitutionValue` ```typescript -public readonly bucket: IBucket; -``` +import { NextjsBucketDeployment } from 'cdk-nextjs-standalone' -- *Type:* aws-cdk-lib.aws_s3.IBucket +NextjsBucketDeployment.getSubstitutionValue(v: string) +``` -Bucket containing assets. +Formats a string as a template value so custom resource knows to replace. ---- +###### `v`Required -##### `deployments`Required +- *Type:* string -```typescript -public readonly deployments: BucketDeployment[]; -``` +--- -- *Type:* aws-cdk-lib.aws_s3_deployment.BucketDeployment[] +#### Properties -Asset deployments to S3. +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| node | constructs.Node | The tree node. | +| function | aws-cdk-lib.aws_lambda.Function | Lambda Function Provider for Custom Resource. | --- -##### `staticTempDir`Required +##### `node`Required ```typescript -public readonly staticTempDir: string; +public readonly node: Node; ``` -- *Type:* string +- *Type:* constructs.Node + +The tree node. --- -##### `rewriter`Optional +##### `function`Required ```typescript -public readonly rewriter: NextjsS3EnvRewriter; +public readonly function: Function; ``` -- *Type:* NextjsS3EnvRewriter +- *Type:* aws-cdk-lib.aws_lambda.Function + +Lambda Function Provider for Custom Resource. --- ### NextjsBuild -Represents a built NextJS application. - -This construct runs `npm build` in standalone output mode inside your `nextjsPath`. -This construct can be used by higher level constructs or used directly. +Build Next.js app. #### Initializers @@ -661,9 +638,7 @@ Any object. | nextRevalidateFnDir | string | Contains function for processing items from revalidation queue. | | nextServerFnDir | string | Contains server code and dependencies. | | nextStaticDir | string | Static files containing client-side code. | -| projectRoot | string | *No description.* | | props | NextjsBuildProps | *No description.* | -| nextMiddlewareFnDir | string | Contains code for middleware. | --- @@ -741,16 +716,6 @@ Static files containing client-side code. --- -##### `projectRoot`Required - -```typescript -public readonly projectRoot: string; -``` - -- *Type:* string - ---- - ##### `props`Required ```typescript @@ -761,20 +726,6 @@ public readonly props: NextjsBuildProps; --- -##### `nextMiddlewareFnDir`Optional - -```typescript -public readonly nextMiddlewareFnDir: string; -``` - -- *Type:* string - -Contains code for middleware. - -Not currently used. - ---- - ### NextjsDistribution @@ -869,7 +820,6 @@ Any object. | customDomainName | string | *No description.* | | customDomainUrl | string | If the custom domain is enabled, this is the URL of the website with the custom domain. | | distribution | aws-cdk-lib.aws_cloudfront.Distribution | The internally created CloudFront `Distribution` instance. | -| tempBuildDir | string | *No description.* | | certificate | aws-cdk-lib.aws_certificatemanager.ICertificate | The AWS Certificate Manager certificate for the custom domain. | | hostedZone | aws-cdk-lib.aws_route53.IHostedZone | The Route 53 hosted zone for the custom domain. | @@ -981,16 +931,6 @@ The internally created CloudFront `Distribution` instance. --- -##### `tempBuildDir`Required - -```typescript -public readonly tempBuildDir: string; -``` - -- *Type:* string - ---- - ##### `certificate`Optional ```typescript @@ -1119,11 +1059,11 @@ public addEventSource(source: IEventSource): void Adds an event source to this function. -Event sources are implemented in the @aws-cdk/aws-lambda-event-sources module. +Event sources are implemented in the aws-cdk-lib/aws-lambda-event-sources module. The following example adds an SQS Queue as an event source: ``` -import { SqsEventSource } from '@aws-cdk/aws-lambda-event-sources'; +import { SqsEventSource } from 'aws-cdk-lib/aws-lambda-event-sources'; myFunction.addEventSource(new SqsEventSource(myQueue)); ``` @@ -1807,7 +1747,6 @@ Metric for the number of unreserved concurrent executions across all Lambdas. | deadLetterQueue | aws-cdk-lib.aws_sqs.IQueue | The DLQ (as queue) associated with this Lambda Function (this is an optional attribute). | | deadLetterTopic | aws-cdk-lib.aws_sns.ITopic | The DLQ (as topic) associated with this Lambda Function (this is an optional attribute). | | timeout | aws-cdk-lib.Duration | The timeout configured for this lambda. | -| bucket | aws-cdk-lib.aws_s3.IBucket | *No description.* | --- @@ -2067,52 +2006,40 @@ The timeout configured for this lambda. --- -##### `bucket`Required - -```typescript -public readonly bucket: IBucket; -``` - -- *Type:* aws-cdk-lib.aws_s3.IBucket - ---- - - -### NextjsLayer -Lambda layer for Next.js. Contains Sharp 0.30.0. +### NextjsInvalidation -#### Initializers +#### Initializers ```typescript -import { NextjsLayer } from 'cdk-nextjs-standalone' +import { NextjsInvalidation } from 'cdk-nextjs-standalone' -new NextjsLayer(scope: Construct, id: string, props: NextjsLayerProps) +new NextjsInvalidation(scope: Construct, id: string, props: NextjsInvalidationProps) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | -| props | NextjsLayerProps | *No description.* | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | NextjsInvalidationProps | *No description.* | --- -##### `scope`Required +##### `scope`Required - *Type:* constructs.Construct --- -##### `id`Required +##### `id`Required - *Type:* string --- -##### `props`Required +##### `props`Required -- *Type:* NextjsLayerProps +- *Type:* NextjsInvalidationProps --- @@ -2120,13 +2047,11 @@ new NextjsLayer(scope: Construct, id: string, props: NextjsLayerProps) | **Name** | **Description** | | --- | --- | -| toString | Returns a string representation of this construct. | -| applyRemovalPolicy | Apply the given removal policy to this resource. | -| addPermission | Add permission for this layer version to specific entities. | +| toString | Returns a string representation of this construct. | --- -##### `toString` +##### `toString` ```typescript public toString(): string @@ -2134,78 +2059,25 @@ public toString(): string Returns a string representation of this construct. -##### `applyRemovalPolicy` - -```typescript -public applyRemovalPolicy(policy: RemovalPolicy): void -``` - -Apply the given removal policy to this resource. - -The Removal Policy controls what happens to this resource when it stops -being managed by CloudFormation, either because you've removed it from the -CDK application or because you've made a change that requires the resource -to be replaced. - -The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS -account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). - -###### `policy`Required - -- *Type:* aws-cdk-lib.RemovalPolicy - ---- - -##### `addPermission` - -```typescript -public addPermission(id: string, permission: LayerVersionPermission): void -``` - -Add permission for this layer version to specific entities. - -Usage within -the same account where the layer is defined is always allowed and does not -require calling this method. Note that the principal that creates the -Lambda function using the layer (for example, a CloudFormation changeset -execution role) also needs to have the ``lambda:GetLayerVersion`` -permission on the layer version. - -###### `id`Required - -- *Type:* string - ---- - -###### `permission`Required - -- *Type:* aws-cdk-lib.aws_lambda.LayerVersionPermission - ---- - #### Static Functions | **Name** | **Description** | | --- | --- | -| isConstruct | Checks if `x` is a construct. | -| isOwnedResource | Returns true if the construct was created by CDK, and false otherwise. | -| isResource | Check whether the given construct is a Resource. | -| fromLayerVersionArn | Imports a layer version by ARN. | -| fromLayerVersionAttributes | Imports a Layer that has been defined externally. | +| isConstruct | Checks if `x` is a construct. | --- -##### ~~`isConstruct`~~ +##### ~~`isConstruct`~~ ```typescript -import { NextjsLayer } from 'cdk-nextjs-standalone' +import { NextjsInvalidation } from 'cdk-nextjs-standalone' -NextjsLayer.isConstruct(x: any) +NextjsInvalidation.isConstruct(x: any) ``` Checks if `x` is a construct. -###### `x`Required +###### `x`Required - *Type:* any @@ -2213,99 +2085,106 @@ Any object. --- -##### `isOwnedResource` - -```typescript -import { NextjsLayer } from 'cdk-nextjs-standalone' - -NextjsLayer.isOwnedResource(construct: IConstruct) -``` - -Returns true if the construct was created by CDK, and false otherwise. - -###### `construct`Required +#### Properties -- *Type:* constructs.IConstruct +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| node | constructs.Node | The tree node. | --- -##### `isResource` +##### `node`Required ```typescript -import { NextjsLayer } from 'cdk-nextjs-standalone' - -NextjsLayer.isResource(construct: IConstruct) +public readonly node: Node; ``` -Check whether the given construct is a Resource. - -###### `construct`Required +- *Type:* constructs.Node -- *Type:* constructs.IConstruct +The tree node. --- -##### `fromLayerVersionArn` + +### NextjsRevalidation + +Builds the system for revalidating Next.js resources. This includes a Lambda function handler and queue system. + +> [{@link https://github.com/serverless-stack/open-next/blob/main/README.md?plain=1#L65}]({@link https://github.com/serverless-stack/open-next/blob/main/README.md?plain=1#L65}) + +#### Initializers ```typescript -import { NextjsLayer } from 'cdk-nextjs-standalone' +import { NextjsRevalidation } from 'cdk-nextjs-standalone' -NextjsLayer.fromLayerVersionArn(scope: Construct, id: string, layerVersionArn: string) +new NextjsRevalidation(scope: Construct, id: string, props: NextjsRevalidationProps) ``` -Imports a layer version by ARN. +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | NextjsRevalidationProps | *No description.* | -Assumes it is compatible with all Lambda runtimes. +--- -###### `scope`Required +##### `scope`Required - *Type:* constructs.Construct --- -###### `id`Required +##### `id`Required - *Type:* string --- -###### `layerVersionArn`Required +##### `props`Required -- *Type:* string +- *Type:* NextjsRevalidationProps --- -##### `fromLayerVersionAttributes` +#### Methods + +| **Name** | **Description** | +| --- | --- | +| toString | Returns a string representation of this construct. | -```typescript -import { NextjsLayer } from 'cdk-nextjs-standalone' +--- -NextjsLayer.fromLayerVersionAttributes(scope: Construct, id: string, attrs: LayerVersionAttributes) -``` +##### `toString` -Imports a Layer that has been defined externally. +```typescript +public toString(): string +``` -###### `scope`Required +Returns a string representation of this construct. -- *Type:* constructs.Construct +#### Static Functions -the parent Construct that will use the imported layer. +| **Name** | **Description** | +| --- | --- | +| isConstruct | Checks if `x` is a construct. | --- -###### `id`Required +##### ~~`isConstruct`~~ -- *Type:* string +```typescript +import { NextjsRevalidation } from 'cdk-nextjs-standalone' -the id of the imported layer in the construct tree. +NextjsRevalidation.isConstruct(x: any) +``` ---- +Checks if `x` is a construct. -###### `attrs`Required +###### `x`Required -- *Type:* aws-cdk-lib.aws_lambda.LayerVersionAttributes +- *Type:* any -the properties of the imported layer. +Any object. --- @@ -2313,15 +2192,13 @@ the properties of the imported layer. | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | constructs.Node | The tree node. | -| env | aws-cdk-lib.ResourceEnvironment | The environment this resource belongs to. | -| stack | aws-cdk-lib.Stack | The stack in which this resource is defined. | -| layerVersionArn | string | The ARN of the Lambda Layer version that this Layer defines. | -| compatibleRuntimes | aws-cdk-lib.aws_lambda.Runtime[] | The runtimes compatible with this Layer. | +| node | constructs.Node | The tree node. | +| function | aws-cdk-lib.aws_lambda_nodejs.NodejsFunction | *No description.* | +| queue | aws-cdk-lib.aws_sqs.Queue | *No description.* | --- -##### `node`Required +##### `node`Required ```typescript public readonly node: Node; @@ -2333,99 +2210,62 @@ The tree node. --- -##### `env`Required +##### `function`Required ```typescript -public readonly env: ResourceEnvironment; +public readonly function: NodejsFunction; ``` -- *Type:* aws-cdk-lib.ResourceEnvironment - -The environment this resource belongs to. - -For resources that are created and managed by the CDK -(generally, those created by creating new class instances like Role, Bucket, etc.), -this is always the same as the environment of the stack they belong to; -however, for imported resources -(those obtained from static methods like fromRoleArn, fromBucketName, etc.), -that might be different than the stack they were imported into. +- *Type:* aws-cdk-lib.aws_lambda_nodejs.NodejsFunction --- -##### `stack`Required +##### `queue`Required ```typescript -public readonly stack: Stack; +public readonly queue: Queue; ``` -- *Type:* aws-cdk-lib.Stack - -The stack in which this resource is defined. +- *Type:* aws-cdk-lib.aws_sqs.Queue --- -##### `layerVersionArn`Required - -```typescript -public readonly layerVersionArn: string; -``` - -- *Type:* string -The ARN of the Lambda Layer version that this Layer defines. +### NextjsServer ---- +Build a lambda function from a NextJS application to handle server-side rendering, API routes, and image optimization. -##### `compatibleRuntimes`Optional +#### Initializers ```typescript -public readonly compatibleRuntimes: Runtime[]; -``` +import { NextjsServer } from 'cdk-nextjs-standalone' -- *Type:* aws-cdk-lib.aws_lambda.Runtime[] +new NextjsServer(scope: Construct, id: string, props: NextjsServerProps) +``` -The runtimes compatible with this Layer. +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | NextjsServerProps | *No description.* | --- +##### `scope`Required -### NextjsRevalidation +- *Type:* constructs.Construct -Builds the system for revalidating Next.js resources. This includes a Lambda function handler and queue system. +--- -> [{@link https://github.com/serverless-stack/open-next/blob/main/README.md?plain=1#L65}]({@link https://github.com/serverless-stack/open-next/blob/main/README.md?plain=1#L65}) +##### `id`Required -#### Initializers - -```typescript -import { NextjsRevalidation } from 'cdk-nextjs-standalone' - -new NextjsRevalidation(scope: Construct, id: string, props: RevalidationProps) -``` - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | -| props | RevalidationProps | *No description.* | - ---- - -##### `scope`Required - -- *Type:* constructs.Construct +- *Type:* string --- -##### `id`Required - -- *Type:* string - ---- - -##### `props`Required +##### `props`Required -- *Type:* RevalidationProps +- *Type:* NextjsServerProps --- @@ -2433,11 +2273,11 @@ new NextjsRevalidation(scope: Construct, id: string, props: RevalidationProps) | **Name** | **Description** | | --- | --- | -| toString | Returns a string representation of this construct. | +| toString | Returns a string representation of this construct. | --- -##### `toString` +##### `toString` ```typescript public toString(): string @@ -2449,21 +2289,21 @@ Returns a string representation of this construct. | **Name** | **Description** | | --- | --- | -| isConstruct | Checks if `x` is a construct. | +| isConstruct | Checks if `x` is a construct. | --- -##### ~~`isConstruct`~~ +##### ~~`isConstruct`~~ ```typescript -import { NextjsRevalidation } from 'cdk-nextjs-standalone' +import { NextjsServer } from 'cdk-nextjs-standalone' -NextjsRevalidation.isConstruct(x: any) +NextjsServer.isConstruct(x: any) ``` Checks if `x` is a construct. -###### `x`Required +###### `x`Required - *Type:* any @@ -2475,11 +2315,13 @@ Any object. | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | constructs.Node | The tree node. | +| node | constructs.Node | The tree node. | +| lambdaFunction | aws-cdk-lib.aws_lambda.Function | *No description.* | +| configBucket | aws-cdk-lib.aws_s3.Bucket | *No description.* | --- -##### `node`Required +##### `node`Required ```typescript public readonly node: Node; @@ -2491,157 +2333,65 @@ The tree node. --- - -### NextjsS3EnvRewriter - -Rewrites variables in S3 objects after a deployment happens to replace CloudFormation tokens with their values. - -These values are not resolved at build time because they are -only known at deploy time. - -#### Initializers - -```typescript -import { NextjsS3EnvRewriter } from 'cdk-nextjs-standalone' - -new NextjsS3EnvRewriter(scope: Construct, id: string, props: NextjsS3EnvRewriterProps) -``` - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | -| props | NextjsS3EnvRewriterProps | *No description.* | - ---- - -##### `scope`Required - -- *Type:* constructs.Construct - ---- - -##### `id`Required - -- *Type:* string - ---- - -##### `props`Required - -- *Type:* NextjsS3EnvRewriterProps - ---- - -#### Methods - -| **Name** | **Description** | -| --- | --- | -| toString | Returns a string representation of this construct. | - ---- - -##### `toString` - -```typescript -public toString(): string -``` - -Returns a string representation of this construct. - -#### Static Functions - -| **Name** | **Description** | -| --- | --- | -| isConstruct | Checks if `x` is a construct. | - ---- - -##### ~~`isConstruct`~~ +##### `lambdaFunction`Required ```typescript -import { NextjsS3EnvRewriter } from 'cdk-nextjs-standalone' - -NextjsS3EnvRewriter.isConstruct(x: any) +public readonly lambdaFunction: Function; ``` -Checks if `x` is a construct. - -###### `x`Required - -- *Type:* any - -Any object. - ---- - -#### Properties - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| node | constructs.Node | The tree node. | -| rewriteNode | constructs.Construct | *No description.* | +- *Type:* aws-cdk-lib.aws_lambda.Function --- -##### `node`Required +##### `configBucket`Optional ```typescript -public readonly node: Node; +public readonly configBucket: Bucket; ``` -- *Type:* constructs.Node - -The tree node. +- *Type:* aws-cdk-lib.aws_s3.Bucket --- -##### `rewriteNode`Optional - -```typescript -public readonly rewriteNode: Construct; -``` - -- *Type:* constructs.Construct - ---- +### NextjsStaticAssets -### NextjsServer +Uploads Nextjs built static and public files to S3. -Build a lambda function from a NextJS application to handle server-side rendering, API routes, and image optimization. +Will inject resolved environment variables that are unresolved at synthesis +in CloudFormation Custom Resource. -#### Initializers +#### Initializers ```typescript -import { NextjsServer } from 'cdk-nextjs-standalone' +import { NextjsStaticAssets } from 'cdk-nextjs-standalone' -new NextjsServer(scope: Construct, id: string, props: NextjsServerProps) +new NextjsStaticAssets(scope: Construct, id: string, props: NextjsStaticAssetsProps) ``` | **Name** | **Type** | **Description** | | --- | --- | --- | -| scope | constructs.Construct | *No description.* | -| id | string | *No description.* | -| props | NextjsServerProps | *No description.* | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | +| props | NextjsStaticAssetsProps | *No description.* | --- -##### `scope`Required +##### `scope`Required - *Type:* constructs.Construct --- -##### `id`Required +##### `id`Required - *Type:* string --- -##### `props`Required +##### `props`Required -- *Type:* NextjsServerProps +- *Type:* NextjsStaticAssetsProps --- @@ -2649,11 +2399,11 @@ new NextjsServer(scope: Construct, id: string, props: NextjsServerProps) | **Name** | **Description** | | --- | --- | -| toString | Returns a string representation of this construct. | +| toString | Returns a string representation of this construct. | --- -##### `toString` +##### `toString` ```typescript public toString(): string @@ -2665,21 +2415,21 @@ Returns a string representation of this construct. | **Name** | **Description** | | --- | --- | -| isConstruct | Checks if `x` is a construct. | +| isConstruct | Checks if `x` is a construct. | --- -##### ~~`isConstruct`~~ +##### ~~`isConstruct`~~ ```typescript -import { NextjsServer } from 'cdk-nextjs-standalone' +import { NextjsStaticAssets } from 'cdk-nextjs-standalone' -NextjsServer.isConstruct(x: any) +NextjsStaticAssets.isConstruct(x: any) ``` Checks if `x` is a construct. -###### `x`Required +###### `x`Required - *Type:* any @@ -2691,13 +2441,12 @@ Any object. | **Name** | **Type** | **Description** | | --- | --- | --- | -| node | constructs.Node | The tree node. | -| lambdaFunction | aws-cdk-lib.aws_lambda.Function | *No description.* | -| configBucket | aws-cdk-lib.aws_s3.Bucket | *No description.* | +| node | constructs.Node | The tree node. | +| bucket | aws-cdk-lib.aws_s3.IBucket | Bucket containing assets. | --- -##### `node`Required +##### `node`Required ```typescript public readonly node: Node; @@ -2709,675 +2458,125 @@ The tree node. --- -##### `lambdaFunction`Required +##### `bucket`Required ```typescript -public readonly lambdaFunction: Function; +public readonly bucket: IBucket; ``` -- *Type:* aws-cdk-lib.aws_lambda.Function - ---- - -##### `configBucket`Optional - -```typescript -public readonly configBucket: Bucket; -``` +- *Type:* aws-cdk-lib.aws_s3.IBucket -- *Type:* aws-cdk-lib.aws_s3.Bucket +Bucket containing assets. --- ## Structs -### BaseSiteDomainProps - -#### Initializer - -```typescript -import { BaseSiteDomainProps } from 'cdk-nextjs-standalone' - -const baseSiteDomainProps: BaseSiteDomainProps = { ... } -``` - -#### Properties - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| domainName | string | The domain to be assigned to the website URL (ie. domain.com). | -| alternateNames | string[] | Specify additional names that should route to the Cloudfront Distribution. | -| certificate | aws-cdk-lib.aws_certificatemanager.ICertificate | Import the certificate for the domain. | -| domainAlias | string | An alternative domain to be assigned to the website URL. | -| hostedZone | aws-cdk-lib.aws_route53.IHostedZone | Import the underlying Route 53 hosted zone. | -| isExternalDomain | boolean | Set this option if the domain is not hosted on Amazon Route 53. | - ---- - -##### `domainName`Required - -```typescript -public readonly domainName: string; -``` - -- *Type:* string - -The domain to be assigned to the website URL (ie. domain.com). - -Supports domains that are hosted either on [Route 53](https://aws.amazon.com/route53/) or externally. - ---- - -##### `alternateNames`Optional - -```typescript -public readonly alternateNames: string[]; -``` - -- *Type:* string[] - -Specify additional names that should route to the Cloudfront Distribution. - -Note, certificates for these names will not be automatically generated so the `certificate` option must be specified. - ---- - -##### `certificate`Optional - -```typescript -public readonly certificate: ICertificate; -``` - -- *Type:* aws-cdk-lib.aws_certificatemanager.ICertificate - -Import the certificate for the domain. - -By default, SST will create a certificate with the domain name. The certificate will be created in the `us-east-1`(N. Virginia) region as required by AWS CloudFront. - -Set this option if you have an existing certificate in the `us-east-1` region in AWS Certificate Manager you want to use. - ---- - -##### `domainAlias`Optional - -```typescript -public readonly domainAlias: string; -``` - -- *Type:* string - -An alternative domain to be assigned to the website URL. - -Visitors to the alias will be redirected to the main domain. (ie. `www.domain.com`). - -Use this to create a `www.` version of your domain and redirect visitors to the root domain. - ---- - -##### `hostedZone`Optional - -```typescript -public readonly hostedZone: IHostedZone; -``` - -- *Type:* aws-cdk-lib.aws_route53.IHostedZone - -Import the underlying Route 53 hosted zone. - ---- - -##### `isExternalDomain`Optional - -```typescript -public readonly isExternalDomain: boolean; -``` - -- *Type:* boolean - -Set this option if the domain is not hosted on Amazon Route 53. - ---- - -### BaseSiteEnvironmentOutputsInfo - -#### Initializer - -```typescript -import { BaseSiteEnvironmentOutputsInfo } from 'cdk-nextjs-standalone' - -const baseSiteEnvironmentOutputsInfo: BaseSiteEnvironmentOutputsInfo = { ... } -``` - -#### Properties - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| environmentOutputs | {[ key: string ]: string} | *No description.* | -| path | string | *No description.* | -| stack | string | *No description.* | - ---- - -##### `environmentOutputs`Required - -```typescript -public readonly environmentOutputs: {[ key: string ]: string}; -``` - -- *Type:* {[ key: string ]: string} - ---- - -##### `path`Required - -```typescript -public readonly path: string; -``` - -- *Type:* string - ---- - -##### `stack`Required - -```typescript -public readonly stack: string; -``` - -- *Type:* string - ---- - -### BaseSiteReplaceProps - -#### Initializer - -```typescript -import { BaseSiteReplaceProps } from 'cdk-nextjs-standalone' - -const baseSiteReplaceProps: BaseSiteReplaceProps = { ... } -``` - -#### Properties - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| files | string | *No description.* | -| replace | string | *No description.* | -| search | string | *No description.* | - ---- - -##### `files`Required - -```typescript -public readonly files: string; -``` - -- *Type:* string - ---- - -##### `replace`Required - -```typescript -public readonly replace: string; -``` - -- *Type:* string - ---- - -##### `search`Required - -```typescript -public readonly search: string; -``` - -- *Type:* string - ---- - -### CreateArchiveArgs - -#### Initializer - -```typescript -import { CreateArchiveArgs } from 'cdk-nextjs-standalone' - -const createArchiveArgs: CreateArchiveArgs = { ... } -``` - -#### Properties - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| directory | string | *No description.* | -| zipFileName | string | *No description.* | -| zipOutDir | string | *No description.* | -| compressionLevel | number | *No description.* | -| fileGlob | string | *No description.* | -| quiet | boolean | *No description.* | - ---- - -##### `directory`Required - -```typescript -public readonly directory: string; -``` - -- *Type:* string - ---- - -##### `zipFileName`Required - -```typescript -public readonly zipFileName: string; -``` - -- *Type:* string - ---- - -##### `zipOutDir`Required - -```typescript -public readonly zipOutDir: string; -``` - -- *Type:* string - ---- - -##### `compressionLevel`Optional - -```typescript -public readonly compressionLevel: number; -``` - -- *Type:* number - ---- - -##### `fileGlob`Optional - -```typescript -public readonly fileGlob: string; -``` - -- *Type:* string - ---- - -##### `quiet`Optional - -```typescript -public readonly quiet: boolean; -``` - -- *Type:* boolean - ---- - -### NextjsAssetsCachePolicyProps - -#### Initializer - -```typescript -import { NextjsAssetsCachePolicyProps } from 'cdk-nextjs-standalone' - -const nextjsAssetsCachePolicyProps: NextjsAssetsCachePolicyProps = { ... } -``` - -#### Properties - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| staticMaxAgeDefault | aws-cdk-lib.Duration | Cache-control max-age default for S3 static assets. | -| staticStaleWhileRevalidateDefault | aws-cdk-lib.Duration | Cache-control stale-while-revalidate default for S3 static assets. | - ---- - -##### `staticMaxAgeDefault`Optional - -```typescript -public readonly staticMaxAgeDefault: Duration; -``` - -- *Type:* aws-cdk-lib.Duration - -Cache-control max-age default for S3 static assets. - -Default: 30 days. - ---- - -##### `staticStaleWhileRevalidateDefault`Optional - -```typescript -public readonly staticStaleWhileRevalidateDefault: Duration; -``` - -- *Type:* aws-cdk-lib.Duration - -Cache-control stale-while-revalidate default for S3 static assets. - -Default: 1 day. - ---- - -### NextjsAssetsDeploymentProps - -#### Initializer - -```typescript -import { NextjsAssetsDeploymentProps } from 'cdk-nextjs-standalone' - -const nextjsAssetsDeploymentProps: NextjsAssetsDeploymentProps = { ... } -``` - -#### Properties - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| nextjsPath | string | Relative path to the directory where the NextJS project is located. | -| buildCommand | string | Optional value used to install NextJS node dependencies. | -| buildPath | string | The directory to execute `npm run build` from. | -| compressionLevel | number | 0 - no compression, fastest 9 - maximum compression, slowest. | -| environment | {[ key: string ]: string} | Custom environment variables to pass to the NextJS build and runtime. | -| isPlaceholder | boolean | Skip building app and deploy a placeholder. | -| nodeEnv | string | Optional value for NODE_ENV during build and runtime. | -| projectRoot | string | Root of your project, if different from `nextjsPath`. | -| quiet | boolean | Less build output. | -| sharpLayerArn | string | Optional arn for the sharp lambda layer. | -| skipFullInvalidation | boolean | By default all CloudFront cache will be invalidated on deployment. | -| tempBuildDir | string | Directory to store temporary build files in. | -| bucket | aws-cdk-lib.aws_s3.IBucket | Properties for the S3 bucket containing the NextJS assets. | -| nextBuild | NextjsBuild | The `NextjsBuild` instance representing the built Nextjs application. | -| cachePolicies | NextjsAssetsCachePolicyProps | Override the default S3 cache policies created internally. | -| distribution | aws-cdk-lib.aws_cloudfront.IDistribution | Distribution to invalidate when assets change. | -| ephemeralStorageSize | aws-cdk-lib.Size | ephemeralStorageSize for lambda function which been run by BucketDeployment. | -| memoryLimit | number | memoryLimit for lambda function which been run by BucketDeployment. | -| prune | boolean | Set to true to delete old assets (defaults to false). | -| useEfs | boolean | In case of useEfs, vpc is required. | -| vpc | aws-cdk-lib.aws_ec2.IVpc | In case of useEfs, vpc is required. | - ---- - -##### `nextjsPath`Required - -```typescript -public readonly nextjsPath: string; -``` - -- *Type:* string - -Relative path to the directory where the NextJS project is located. - -Can be the root of your project (`.`) or a subdirectory (`packages/web`). - ---- - -##### `buildCommand`Optional - -```typescript -public readonly buildCommand: string; -``` - -- *Type:* string - -Optional value used to install NextJS node dependencies. - -It defaults to 'npx --yes open-next@2 build' - ---- - -##### `buildPath`Optional - -```typescript -public readonly buildPath: string; -``` - -- *Type:* string - -The directory to execute `npm run build` from. - -By default, it is `nextjsPath`. -Can be overridden, particularly useful for monorepos where `build` is expected to run -at the root of the project. - ---- - -##### `compressionLevel`Optional - -```typescript -public readonly compressionLevel: number; -``` - -- *Type:* number -- *Default:* 1 - -0 - no compression, fastest 9 - maximum compression, slowest. - ---- - -##### `environment`Optional - -```typescript -public readonly environment: {[ key: string ]: string}; -``` - -- *Type:* {[ key: string ]: string} - -Custom environment variables to pass to the NextJS build and runtime. - ---- - -##### `isPlaceholder`Optional - -```typescript -public readonly isPlaceholder: boolean; -``` - -- *Type:* boolean - -Skip building app and deploy a placeholder. - -Useful when using `next dev` for local development. - ---- - -##### `nodeEnv`Optional - -```typescript -public readonly nodeEnv: string; -``` - -- *Type:* string - -Optional value for NODE_ENV during build and runtime. - ---- - -##### `projectRoot`Optional - -```typescript -public readonly projectRoot: string; -``` - -- *Type:* string - -Root of your project, if different from `nextjsPath`. - -Defaults to current working directory. - ---- - -##### `quiet`Optional - -```typescript -public readonly quiet: boolean; -``` - -- *Type:* boolean - -Less build output. - ---- - -##### `sharpLayerArn`Optional - -```typescript -public readonly sharpLayerArn: string; -``` - -- *Type:* string - -Optional arn for the sharp lambda layer. - -If omitted, the layer will be created. - ---- - -##### `skipFullInvalidation`Optional - -```typescript -public readonly skipFullInvalidation: boolean; -``` - -- *Type:* boolean - -By default all CloudFront cache will be invalidated on deployment. - -This can be set to true to skip the full cache invalidation, which -could be important for some users. - ---- - -##### `tempBuildDir`Optional - -```typescript -public readonly tempBuildDir: string; -``` - -- *Type:* string - -Directory to store temporary build files in. - -Defaults to os.tmpdir(). - ---- - -##### `bucket`Required - -```typescript -public readonly bucket: IBucket; -``` - -- *Type:* aws-cdk-lib.aws_s3.IBucket - -Properties for the S3 bucket containing the NextJS assets. - ---- - -##### `nextBuild`Required - -```typescript -public readonly nextBuild: NextjsBuild; -``` - -- *Type:* NextjsBuild - -The `NextjsBuild` instance representing the built Nextjs application. - ---- +### BaseSiteDomainProps -##### `cachePolicies`Optional +#### Initializer ```typescript -public readonly cachePolicies: NextjsAssetsCachePolicyProps; +import { BaseSiteDomainProps } from 'cdk-nextjs-standalone' + +const baseSiteDomainProps: BaseSiteDomainProps = { ... } ``` -- *Type:* NextjsAssetsCachePolicyProps +#### Properties -Override the default S3 cache policies created internally. +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| domainName | string | The domain to be assigned to the website URL (ie. domain.com). | +| alternateNames | string[] | Specify additional names that should route to the Cloudfront Distribution. | +| certificate | aws-cdk-lib.aws_certificatemanager.ICertificate | Import the certificate for the domain. | +| domainAlias | string | An alternative domain to be assigned to the website URL. | +| hostedZone | aws-cdk-lib.aws_route53.IHostedZone | Import the underlying Route 53 hosted zone. | +| isExternalDomain | boolean | Set this option if the domain is not hosted on Amazon Route 53. | --- -##### `distribution`Optional +##### `domainName`Required ```typescript -public readonly distribution: IDistribution; +public readonly domainName: string; ``` -- *Type:* aws-cdk-lib.aws_cloudfront.IDistribution +- *Type:* string -Distribution to invalidate when assets change. +The domain to be assigned to the website URL (ie. domain.com). + +Supports domains that are hosted either on [Route 53](https://aws.amazon.com/route53/) or externally. --- -##### `ephemeralStorageSize`Optional +##### `alternateNames`Optional ```typescript -public readonly ephemeralStorageSize: Size; +public readonly alternateNames: string[]; ``` -- *Type:* aws-cdk-lib.Size +- *Type:* string[] + +Specify additional names that should route to the Cloudfront Distribution. -ephemeralStorageSize for lambda function which been run by BucketDeployment. +Note, certificates for these names will not be automatically generated so the `certificate` option must be specified. --- -##### `memoryLimit`Optional +##### `certificate`Optional ```typescript -public readonly memoryLimit: number; +public readonly certificate: ICertificate; ``` -- *Type:* number +- *Type:* aws-cdk-lib.aws_certificatemanager.ICertificate + +Import the certificate for the domain. + +By default, SST will create a certificate with the domain name. The certificate will be created in the `us-east-1`(N. Virginia) region as required by AWS CloudFront. -memoryLimit for lambda function which been run by BucketDeployment. +Set this option if you have an existing certificate in the `us-east-1` region in AWS Certificate Manager you want to use. --- -##### `prune`Optional +##### `domainAlias`Optional ```typescript -public readonly prune: boolean; +public readonly domainAlias: string; ``` -- *Type:* boolean +- *Type:* string + +An alternative domain to be assigned to the website URL. -Set to true to delete old assets (defaults to false). +Visitors to the alias will be redirected to the main domain. (ie. `www.domain.com`). -Recommended to only set to true if you don't need the ability to roll back deployments. +Use this to create a `www.` version of your domain and redirect visitors to the root domain. --- -##### `useEfs`Optional +##### `hostedZone`Optional ```typescript -public readonly useEfs: boolean; +public readonly hostedZone: IHostedZone; ``` -- *Type:* boolean +- *Type:* aws-cdk-lib.aws_route53.IHostedZone -In case of useEfs, vpc is required. +Import the underlying Route 53 hosted zone. --- -##### `vpc`Optional +##### `isExternalDomain`Optional ```typescript -public readonly vpc: IVpc; +public readonly isExternalDomain: boolean; ``` -- *Type:* aws-cdk-lib.aws_ec2.IVpc +- *Type:* boolean -In case of useEfs, vpc is required. +Set this option if the domain is not hosted on Amazon Route 53. --- @@ -3400,10 +2599,7 @@ const nextjsBaseProps: NextjsBaseProps = { ... } | nextjsPath | string | Relative path to the directory where the NextJS project is located. | | buildCommand | string | Optional value used to install NextJS node dependencies. | | buildPath | string | The directory to execute `npm run build` from. | -| compressionLevel | number | 0 - no compression, fastest 9 - maximum compression, slowest. | | environment | {[ key: string ]: string} | Custom environment variables to pass to the NextJS build and runtime. | -| isPlaceholder | boolean | Skip building app and deploy a placeholder. | -| nodeEnv | string | Optional value for NODE_ENV during build and runtime. | | projectRoot | string | Root of your project, if different from `nextjsPath`. | | quiet | boolean | Less build output. | | sharpLayerArn | string | Optional arn for the sharp lambda layer. | @@ -3433,11 +2629,10 @@ public readonly buildCommand: string; ``` - *Type:* string +- *Default:* 'npx --yes open-next@2 build' Optional value used to install NextJS node dependencies. -It defaults to 'npx --yes open-next@2 build' - --- ##### `buildPath`Optional @@ -3456,19 +2651,6 @@ at the root of the project. --- -##### `compressionLevel`Optional - -```typescript -public readonly compressionLevel: number; -``` - -- *Type:* number -- *Default:* 1 - -0 - no compression, fastest 9 - maximum compression, slowest. - ---- - ##### `environment`Optional ```typescript @@ -3481,32 +2663,6 @@ Custom environment variables to pass to the NextJS build and runtime. --- -##### `isPlaceholder`Optional - -```typescript -public readonly isPlaceholder: boolean; -``` - -- *Type:* boolean - -Skip building app and deploy a placeholder. - -Useful when using `next dev` for local development. - ---- - -##### `nodeEnv`Optional - -```typescript -public readonly nodeEnv: string; -``` - -- *Type:* string - -Optional value for NODE_ENV during build and runtime. - ---- - ##### `projectRoot`Optional ```typescript @@ -3576,6 +2732,144 @@ Defaults to os.tmpdir(). --- +### NextjsBucketDeploymentProps + +#### Initializer + +```typescript +import { NextjsBucketDeploymentProps } from 'cdk-nextjs-standalone' + +const nextjsBucketDeploymentProps: NextjsBucketDeploymentProps = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| asset | aws-cdk-lib.aws_s3_assets.Asset | Source `Asset`. | +| destinationBucket | aws-cdk-lib.aws_s3.IBucket | Destination S3 Bucket. | +| debug | boolean | Enable verbose output of Custom Resource Lambda. | +| destinationKeyPrefix | string | Destination S3 Bucket Key Prefix. | +| prune | boolean | If `true`, then delete files in `destinationBucket`/`destinationKeyPrefix` before uploading new objects. | +| putConfig | {[ key: string ]: {[ key: string ]: string}} | Mapping of files to PUT options for `PutObjectCommand`. | +| substitutionConfig | {[ key: string ]: string} | Replace placeholders in all files in `asset`. | +| zip | boolean | If `true` then files will be zipped before writing to destination bucket. | + +--- + +##### `asset`Required + +```typescript +public readonly asset: Asset; +``` + +- *Type:* aws-cdk-lib.aws_s3_assets.Asset + +Source `Asset`. + +--- + +##### `destinationBucket`Required + +```typescript +public readonly destinationBucket: IBucket; +``` + +- *Type:* aws-cdk-lib.aws_s3.IBucket + +Destination S3 Bucket. + +--- + +##### `debug`Optional + +```typescript +public readonly debug: boolean; +``` + +- *Type:* boolean +- *Default:* false + +Enable verbose output of Custom Resource Lambda. + +--- + +##### `destinationKeyPrefix`Optional + +```typescript +public readonly destinationKeyPrefix: string; +``` + +- *Type:* string + +Destination S3 Bucket Key Prefix. + +--- + +##### `prune`Optional + +```typescript +public readonly prune: boolean; +``` + +- *Type:* boolean +- *Default:* true + +If `true`, then delete files in `destinationBucket`/`destinationKeyPrefix` before uploading new objects. + +--- + +##### `putConfig`Optional + +```typescript +public readonly putConfig: {[ key: string ]: {[ key: string ]: string}}; +``` + +- *Type:* {[ key: string ]: {[ key: string ]: string}} + +Mapping of files to PUT options for `PutObjectCommand`. + +Keys of +record must be a glob pattern (uses micromatch). Values of record are options +for PUT command for AWS SDK JS V3. See [here](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectRequest/) +for options. If a file matches multiple globs, configuration will be +merged. Later entries override earlier entries. + +`Bucket`, `Key`, and `Body` PUT options cannot be set. + +--- + +##### `substitutionConfig`Optional + +```typescript +public readonly substitutionConfig: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: string} + +Replace placeholders in all files in `asset`. + +Placeholder targets are +defined by keys of record. Values to replace placeholders with are defined +by values of record. + +--- + +##### `zip`Optional + +```typescript +public readonly zip: boolean; +``` + +- *Type:* boolean +- *Default:* false + +If `true` then files will be zipped before writing to destination bucket. + +Useful for Lambda functions. + +--- + ### NextjsBuildProps #### Initializer @@ -3593,15 +2887,13 @@ const nextjsBuildProps: NextjsBuildProps = { ... } | nextjsPath | string | Relative path to the directory where the NextJS project is located. | | buildCommand | string | Optional value used to install NextJS node dependencies. | | buildPath | string | The directory to execute `npm run build` from. | -| compressionLevel | number | 0 - no compression, fastest 9 - maximum compression, slowest. | | environment | {[ key: string ]: string} | Custom environment variables to pass to the NextJS build and runtime. | -| isPlaceholder | boolean | Skip building app and deploy a placeholder. | -| nodeEnv | string | Optional value for NODE_ENV during build and runtime. | | projectRoot | string | Root of your project, if different from `nextjsPath`. | | quiet | boolean | Less build output. | | sharpLayerArn | string | Optional arn for the sharp lambda layer. | | skipFullInvalidation | boolean | By default all CloudFront cache will be invalidated on deployment. | | tempBuildDir | string | Directory to store temporary build files in. | +| skipBuild | boolean | *No description.* | --- @@ -3626,11 +2918,10 @@ public readonly buildCommand: string; ``` - *Type:* string +- *Default:* 'npx --yes open-next@2 build' Optional value used to install NextJS node dependencies. -It defaults to 'npx --yes open-next@2 build' - --- ##### `buildPath`Optional @@ -3649,19 +2940,6 @@ at the root of the project. --- -##### `compressionLevel`Optional - -```typescript -public readonly compressionLevel: number; -``` - -- *Type:* number -- *Default:* 1 - -0 - no compression, fastest 9 - maximum compression, slowest. - ---- - ##### `environment`Optional ```typescript @@ -3674,32 +2952,6 @@ Custom environment variables to pass to the NextJS build and runtime. --- -##### `isPlaceholder`Optional - -```typescript -public readonly isPlaceholder: boolean; -``` - -- *Type:* boolean - -Skip building app and deploy a placeholder. - -Useful when using `next dev` for local development. - ---- - -##### `nodeEnv`Optional - -```typescript -public readonly nodeEnv: string; -``` - -- *Type:* string - -Optional value for NODE_ENV during build and runtime. - ---- - ##### `projectRoot`Optional ```typescript @@ -3769,6 +3021,18 @@ Defaults to os.tmpdir(). --- +##### `skipBuild`Optional + +```typescript +public readonly skipBuild: boolean; +``` + +- *Type:* boolean + +> [ `NextjsProps.skipBuild`]( `NextjsProps.skipBuild`) + +--- + ### NextjsCachePolicyProps #### Initializer @@ -3853,7 +3117,6 @@ const nextjsDefaultsProps: NextjsDefaultsProps = { ... } | **Name** | **Type** | **Description** | | --- | --- | --- | | assetDeployment | any | Override static file deployment settings. | -| cacheBucket | any | Override cache bucket. | | distribution | any | Override CloudFront distribution settings. | | lambda | aws-cdk-lib.aws_lambda.FunctionOptions | Override server lambda function settings. | @@ -3871,18 +3134,6 @@ Override static file deployment settings. --- -##### `cacheBucket`Optional - -```typescript -public readonly cacheBucket: any; -``` - -- *Type:* any - -Override cache bucket. - ---- - ##### `distribution`Optional ```typescript @@ -3956,10 +3207,7 @@ const nextjsDistributionProps: NextjsDistributionProps = { ... } | nextjsPath | string | Relative path to the directory where the NextJS project is located. | | buildCommand | string | Optional value used to install NextJS node dependencies. | | buildPath | string | The directory to execute `npm run build` from. | -| compressionLevel | number | 0 - no compression, fastest 9 - maximum compression, slowest. | | environment | {[ key: string ]: string} | Custom environment variables to pass to the NextJS build and runtime. | -| isPlaceholder | boolean | Skip building app and deploy a placeholder. | -| nodeEnv | string | Optional value for NODE_ENV during build and runtime. | | projectRoot | string | Root of your project, if different from `nextjsPath`. | | quiet | boolean | Less build output. | | sharpLayerArn | string | Optional arn for the sharp lambda layer. | @@ -4000,77 +3248,37 @@ public readonly buildCommand: string; ``` - *Type:* string +- *Default:* 'npx --yes open-next@2 build' -Optional value used to install NextJS node dependencies. - -It defaults to 'npx --yes open-next@2 build' - ---- - -##### `buildPath`Optional - -```typescript -public readonly buildPath: string; -``` - -- *Type:* string - -The directory to execute `npm run build` from. - -By default, it is `nextjsPath`. -Can be overridden, particularly useful for monorepos where `build` is expected to run -at the root of the project. - ---- - -##### `compressionLevel`Optional - -```typescript -public readonly compressionLevel: number; -``` - -- *Type:* number -- *Default:* 1 - -0 - no compression, fastest 9 - maximum compression, slowest. - ---- - -##### `environment`Optional - -```typescript -public readonly environment: {[ key: string ]: string}; -``` - -- *Type:* {[ key: string ]: string} - -Custom environment variables to pass to the NextJS build and runtime. +Optional value used to install NextJS node dependencies. --- -##### `isPlaceholder`Optional +##### `buildPath`Optional ```typescript -public readonly isPlaceholder: boolean; +public readonly buildPath: string; ``` -- *Type:* boolean +- *Type:* string -Skip building app and deploy a placeholder. +The directory to execute `npm run build` from. -Useful when using `next dev` for local development. +By default, it is `nextjsPath`. +Can be overridden, particularly useful for monorepos where `build` is expected to run +at the root of the project. --- -##### `nodeEnv`Optional +##### `environment`Optional ```typescript -public readonly nodeEnv: string; +public readonly environment: {[ key: string ]: string}; ``` -- *Type:* string +- *Type:* {[ key: string ]: string} -Optional value for NODE_ENV during build and runtime. +Custom environment variables to pass to the NextJS build and runtime. --- @@ -4429,10 +3637,7 @@ const nextjsImageProps: NextjsImageProps = { ... } | nextjsPath | string | Relative path to the directory where the NextJS project is located. | | buildCommand | string | Optional value used to install NextJS node dependencies. | | buildPath | string | The directory to execute `npm run build` from. | -| compressionLevel | number | 0 - no compression, fastest 9 - maximum compression, slowest. | | environment | {[ key: string ]: string} | Custom environment variables to pass to the NextJS build and runtime. | -| isPlaceholder | boolean | Skip building app and deploy a placeholder. | -| nodeEnv | string | Optional value for NODE_ENV during build and runtime. | | projectRoot | string | Root of your project, if different from `nextjsPath`. | | quiet | boolean | Less build output. | | sharpLayerArn | string | Optional arn for the sharp lambda layer. | @@ -4440,7 +3645,7 @@ const nextjsImageProps: NextjsImageProps = { ... } | tempBuildDir | string | Directory to store temporary build files in. | | bucket | aws-cdk-lib.aws_s3.IBucket | The S3 bucket holding application images. | | nextBuild | NextjsBuild | The `NextjsBuild` instance representing the built Nextjs application. | -| lambdaOptions | aws-cdk-lib.aws_lambda.FunctionOptions | Override function properties. | +| lambdaOptions | aws-cdk-lib.aws_lambda_nodejs.NodejsFunctionProps | Override function properties. | --- @@ -4465,11 +3670,10 @@ public readonly buildCommand: string; ``` - *Type:* string +- *Default:* 'npx --yes open-next@2 build' Optional value used to install NextJS node dependencies. -It defaults to 'npx --yes open-next@2 build' - --- ##### `buildPath`Optional @@ -4488,19 +3692,6 @@ at the root of the project. --- -##### `compressionLevel`Optional - -```typescript -public readonly compressionLevel: number; -``` - -- *Type:* number -- *Default:* 1 - -0 - no compression, fastest 9 - maximum compression, slowest. - ---- - ##### `environment`Optional ```typescript @@ -4513,32 +3704,6 @@ Custom environment variables to pass to the NextJS build and runtime. --- -##### `isPlaceholder`Optional - -```typescript -public readonly isPlaceholder: boolean; -``` - -- *Type:* boolean - -Skip building app and deploy a placeholder. - -Useful when using `next dev` for local development. - ---- - -##### `nodeEnv`Optional - -```typescript -public readonly nodeEnv: string; -``` - -- *Type:* string - -Optional value for NODE_ENV during build and runtime. - ---- - ##### `projectRoot`Optional ```typescript @@ -4635,25 +3800,59 @@ The `NextjsBuild` instance representing the built Nextjs application. ##### `lambdaOptions`Optional ```typescript -public readonly lambdaOptions: FunctionOptions; +public readonly lambdaOptions: NodejsFunctionProps; ``` -- *Type:* aws-cdk-lib.aws_lambda.FunctionOptions +- *Type:* aws-cdk-lib.aws_lambda_nodejs.NodejsFunctionProps Override function properties. --- -### NextjsLayerProps +### NextjsInvalidationProps + +#### Initializer + +```typescript +import { NextjsInvalidationProps } from 'cdk-nextjs-standalone' + +const nextjsInvalidationProps: NextjsInvalidationProps = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| dependencies | constructs.Construct[] | Constructs that should complete before invalidating CloudFront Distribution. | +| distribution | aws-cdk-lib.aws_cloudfront.IDistribution | CloudFront Distribution to invalidate. | + +--- -#### Initializer +##### `dependencies`Required ```typescript -import { NextjsLayerProps } from 'cdk-nextjs-standalone' +public readonly dependencies: Construct[]; +``` + +- *Type:* constructs.Construct[] + +Constructs that should complete before invalidating CloudFront Distribution. + +Useful for assets that must be deployed/updated before invalidating. -const nextjsLayerProps: NextjsLayerProps = { ... } +--- + +##### `distribution`Required + +```typescript +public readonly distribution: IDistribution; ``` +- *Type:* aws-cdk-lib.aws_cloudfront.IDistribution + +CloudFront Distribution to invalidate. + +--- ### NextjsOriginRequestPolicyProps @@ -4711,10 +3910,7 @@ const nextjsProps: NextjsProps = { ... } | nextjsPath | string | Relative path to the directory where the NextJS project is located. | | buildCommand | string | Optional value used to install NextJS node dependencies. | | buildPath | string | The directory to execute `npm run build` from. | -| compressionLevel | number | 0 - no compression, fastest 9 - maximum compression, slowest. | | environment | {[ key: string ]: string} | Custom environment variables to pass to the NextJS build and runtime. | -| isPlaceholder | boolean | Skip building app and deploy a placeholder. | -| nodeEnv | string | Optional value for NODE_ENV during build and runtime. | | projectRoot | string | Root of your project, if different from `nextjsPath`. | | quiet | boolean | Less build output. | | sharpLayerArn | string | Optional arn for the sharp lambda layer. | @@ -4722,6 +3918,7 @@ const nextjsProps: NextjsProps = { ... } | tempBuildDir | string | Directory to store temporary build files in. | | defaults | NextjsDefaultsProps | Allows you to override defaults for the resources created by this construct. | | imageOptimizationBucket | aws-cdk-lib.aws_s3.IBucket | Optional S3 Bucket to use, defaults to assets bucket. | +| skipBuild | boolean | Skips running Next.js build. Useful if you want to deploy `Nextjs` but haven't made any changes to Next.js app code. | --- @@ -4739,243 +3936,20 @@ Can be the root of your project (`.`) or a subdirectory (`packages/web`). --- -##### `buildCommand`Optional - -```typescript -public readonly buildCommand: string; -``` - -- *Type:* string - -Optional value used to install NextJS node dependencies. - -It defaults to 'npx --yes open-next@2 build' - ---- - -##### `buildPath`Optional - -```typescript -public readonly buildPath: string; -``` - -- *Type:* string - -The directory to execute `npm run build` from. - -By default, it is `nextjsPath`. -Can be overridden, particularly useful for monorepos where `build` is expected to run -at the root of the project. - ---- - -##### `compressionLevel`Optional - -```typescript -public readonly compressionLevel: number; -``` - -- *Type:* number -- *Default:* 1 - -0 - no compression, fastest 9 - maximum compression, slowest. - ---- - -##### `environment`Optional - -```typescript -public readonly environment: {[ key: string ]: string}; -``` - -- *Type:* {[ key: string ]: string} - -Custom environment variables to pass to the NextJS build and runtime. - ---- - -##### `isPlaceholder`Optional - -```typescript -public readonly isPlaceholder: boolean; -``` - -- *Type:* boolean - -Skip building app and deploy a placeholder. - -Useful when using `next dev` for local development. - ---- - -##### `nodeEnv`Optional - -```typescript -public readonly nodeEnv: string; -``` - -- *Type:* string - -Optional value for NODE_ENV during build and runtime. - ---- - -##### `projectRoot`Optional - -```typescript -public readonly projectRoot: string; -``` - -- *Type:* string - -Root of your project, if different from `nextjsPath`. - -Defaults to current working directory. - ---- - -##### `quiet`Optional - -```typescript -public readonly quiet: boolean; -``` - -- *Type:* boolean - -Less build output. - ---- - -##### `sharpLayerArn`Optional - -```typescript -public readonly sharpLayerArn: string; -``` - -- *Type:* string - -Optional arn for the sharp lambda layer. - -If omitted, the layer will be created. - ---- - -##### `skipFullInvalidation`Optional - -```typescript -public readonly skipFullInvalidation: boolean; -``` - -- *Type:* boolean - -By default all CloudFront cache will be invalidated on deployment. - -This can be set to true to skip the full cache invalidation, which -could be important for some users. - ---- - -##### `tempBuildDir`Optional - -```typescript -public readonly tempBuildDir: string; -``` - -- *Type:* string - -Directory to store temporary build files in. - -Defaults to os.tmpdir(). - ---- - -##### `defaults`Optional - -```typescript -public readonly defaults: NextjsDefaultsProps; -``` - -- *Type:* NextjsDefaultsProps - -Allows you to override defaults for the resources created by this construct. - ---- - -##### `imageOptimizationBucket`Optional - -```typescript -public readonly imageOptimizationBucket: IBucket; -``` - -- *Type:* aws-cdk-lib.aws_s3.IBucket - -Optional S3 Bucket to use, defaults to assets bucket. - ---- - -### NextjsS3EnvRewriterProps - -#### Initializer - -```typescript -import { NextjsS3EnvRewriterProps } from 'cdk-nextjs-standalone' - -const nextjsS3EnvRewriterProps: NextjsS3EnvRewriterProps = { ... } -``` - -#### Properties - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| nextjsPath | string | Relative path to the directory where the NextJS project is located. | -| buildCommand | string | Optional value used to install NextJS node dependencies. | -| buildPath | string | The directory to execute `npm run build` from. | -| compressionLevel | number | 0 - no compression, fastest 9 - maximum compression, slowest. | -| environment | {[ key: string ]: string} | Custom environment variables to pass to the NextJS build and runtime. | -| isPlaceholder | boolean | Skip building app and deploy a placeholder. | -| nodeEnv | string | Optional value for NODE_ENV during build and runtime. | -| projectRoot | string | Root of your project, if different from `nextjsPath`. | -| quiet | boolean | Less build output. | -| sharpLayerArn | string | Optional arn for the sharp lambda layer. | -| skipFullInvalidation | boolean | By default all CloudFront cache will be invalidated on deployment. | -| tempBuildDir | string | Directory to store temporary build files in. | -| replacementConfig | RewriteReplacementsConfig | *No description.* | -| s3Bucket | aws-cdk-lib.aws_s3.IBucket | *No description.* | -| s3keys | string[] | *No description.* | -| cloudfrontDistributionId | string | *No description.* | -| debug | boolean | *No description.* | - ---- - -##### `nextjsPath`Required - -```typescript -public readonly nextjsPath: string; -``` - -- *Type:* string - -Relative path to the directory where the NextJS project is located. - -Can be the root of your project (`.`) or a subdirectory (`packages/web`). - ---- - -##### `buildCommand`Optional +##### `buildCommand`Optional ```typescript public readonly buildCommand: string; ``` - *Type:* string +- *Default:* 'npx --yes open-next@2 build' Optional value used to install NextJS node dependencies. -It defaults to 'npx --yes open-next@2 build' - --- -##### `buildPath`Optional +##### `buildPath`Optional ```typescript public readonly buildPath: string; @@ -4991,20 +3965,7 @@ at the root of the project. --- -##### `compressionLevel`Optional - -```typescript -public readonly compressionLevel: number; -``` - -- *Type:* number -- *Default:* 1 - -0 - no compression, fastest 9 - maximum compression, slowest. - ---- - -##### `environment`Optional +##### `environment`Optional ```typescript public readonly environment: {[ key: string ]: string}; @@ -5016,33 +3977,7 @@ Custom environment variables to pass to the NextJS build and runtime. --- -##### `isPlaceholder`Optional - -```typescript -public readonly isPlaceholder: boolean; -``` - -- *Type:* boolean - -Skip building app and deploy a placeholder. - -Useful when using `next dev` for local development. - ---- - -##### `nodeEnv`Optional - -```typescript -public readonly nodeEnv: string; -``` - -- *Type:* string - -Optional value for NODE_ENV during build and runtime. - ---- - -##### `projectRoot`Optional +##### `projectRoot`Optional ```typescript public readonly projectRoot: string; @@ -5056,7 +3991,7 @@ Defaults to current working directory. --- -##### `quiet`Optional +##### `quiet`Optional ```typescript public readonly quiet: boolean; @@ -5068,7 +4003,7 @@ Less build output. --- -##### `sharpLayerArn`Optional +##### `sharpLayerArn`Optional ```typescript public readonly sharpLayerArn: string; @@ -5082,7 +4017,7 @@ If omitted, the layer will be created. --- -##### `skipFullInvalidation`Optional +##### `skipFullInvalidation`Optional ```typescript public readonly skipFullInvalidation: boolean; @@ -5097,7 +4032,7 @@ could be important for some users. --- -##### `tempBuildDir`Optional +##### `tempBuildDir`Optional ```typescript public readonly tempBuildDir: string; @@ -5111,89 +4046,73 @@ Defaults to os.tmpdir(). --- -##### `replacementConfig`Required +##### `defaults`Optional ```typescript -public readonly replacementConfig: RewriteReplacementsConfig; +public readonly defaults: NextjsDefaultsProps; ``` -- *Type:* RewriteReplacementsConfig - ---- - -##### `s3Bucket`Required - -```typescript -public readonly s3Bucket: IBucket; -``` +- *Type:* NextjsDefaultsProps -- *Type:* aws-cdk-lib.aws_s3.IBucket +Allows you to override defaults for the resources created by this construct. --- -##### `s3keys`Required +##### `imageOptimizationBucket`Optional ```typescript -public readonly s3keys: string[]; +public readonly imageOptimizationBucket: IBucket; ``` -- *Type:* string[] - ---- - -##### `cloudfrontDistributionId`Optional - -```typescript -public readonly cloudfrontDistributionId: string; -``` +- *Type:* aws-cdk-lib.aws_s3.IBucket -- *Type:* string +Optional S3 Bucket to use, defaults to assets bucket. --- -##### `debug`Optional +##### `skipBuild`Optional ```typescript -public readonly debug: boolean; +public readonly skipBuild: boolean; ``` - *Type:* boolean +- *Default:* false + +Skips running Next.js build. Useful if you want to deploy `Nextjs` but haven't made any changes to Next.js app code. --- -### NextjsServerProps +### NextjsRevalidationProps -#### Initializer +#### Initializer ```typescript -import { NextjsServerProps } from 'cdk-nextjs-standalone' +import { NextjsRevalidationProps } from 'cdk-nextjs-standalone' -const nextjsServerProps: NextjsServerProps = { ... } +const nextjsRevalidationProps: NextjsRevalidationProps = { ... } ``` #### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| nextjsPath | string | Relative path to the directory where the NextJS project is located. | -| buildCommand | string | Optional value used to install NextJS node dependencies. | -| buildPath | string | The directory to execute `npm run build` from. | -| compressionLevel | number | 0 - no compression, fastest 9 - maximum compression, slowest. | -| environment | {[ key: string ]: string} | Custom environment variables to pass to the NextJS build and runtime. | -| isPlaceholder | boolean | Skip building app and deploy a placeholder. | -| nodeEnv | string | Optional value for NODE_ENV during build and runtime. | -| projectRoot | string | Root of your project, if different from `nextjsPath`. | -| quiet | boolean | Less build output. | -| sharpLayerArn | string | Optional arn for the sharp lambda layer. | -| skipFullInvalidation | boolean | By default all CloudFront cache will be invalidated on deployment. | -| tempBuildDir | string | Directory to store temporary build files in. | -| nextBuild | NextjsBuild | Built nextJS application. | -| staticAssetBucket | aws-cdk-lib.aws_s3.IBucket | Static asset bucket. | -| lambda | aws-cdk-lib.aws_lambda.FunctionOptions | Override function properties. | +| nextjsPath | string | Relative path to the directory where the NextJS project is located. | +| buildCommand | string | Optional value used to install NextJS node dependencies. | +| buildPath | string | The directory to execute `npm run build` from. | +| environment | {[ key: string ]: string} | Custom environment variables to pass to the NextJS build and runtime. | +| projectRoot | string | Root of your project, if different from `nextjsPath`. | +| quiet | boolean | Less build output. | +| sharpLayerArn | string | Optional arn for the sharp lambda layer. | +| skipFullInvalidation | boolean | By default all CloudFront cache will be invalidated on deployment. | +| tempBuildDir | string | Directory to store temporary build files in. | +| nextBuild | NextjsBuild | The `NextjsBuild` instance representing the built Nextjs application. | +| serverFunction | NextjsServer | The main NextJS server handler lambda function. | +| lambdaOptions | aws-cdk-lib.aws_lambda.FunctionOptions | Override function properties. | --- -##### `nextjsPath`Required +##### `nextjsPath`Required ```typescript public readonly nextjsPath: string; @@ -5207,21 +4126,20 @@ Can be the root of your project (`.`) or a subdirectory (`packages/web`). --- -##### `buildCommand`Optional +##### `buildCommand`Optional ```typescript public readonly buildCommand: string; ``` - *Type:* string +- *Default:* 'npx --yes open-next@2 build' Optional value used to install NextJS node dependencies. -It defaults to 'npx --yes open-next@2 build' - --- -##### `buildPath`Optional +##### `buildPath`Optional ```typescript public readonly buildPath: string; @@ -5237,20 +4155,7 @@ at the root of the project. --- -##### `compressionLevel`Optional - -```typescript -public readonly compressionLevel: number; -``` - -- *Type:* number -- *Default:* 1 - -0 - no compression, fastest 9 - maximum compression, slowest. - ---- - -##### `environment`Optional +##### `environment`Optional ```typescript public readonly environment: {[ key: string ]: string}; @@ -5262,33 +4167,7 @@ Custom environment variables to pass to the NextJS build and runtime. --- -##### `isPlaceholder`Optional - -```typescript -public readonly isPlaceholder: boolean; -``` - -- *Type:* boolean - -Skip building app and deploy a placeholder. - -Useful when using `next dev` for local development. - ---- - -##### `nodeEnv`Optional - -```typescript -public readonly nodeEnv: string; -``` - -- *Type:* string - -Optional value for NODE_ENV during build and runtime. - ---- - -##### `projectRoot`Optional +##### `projectRoot`Optional ```typescript public readonly projectRoot: string; @@ -5302,7 +4181,7 @@ Defaults to current working directory. --- -##### `quiet`Optional +##### `quiet`Optional ```typescript public readonly quiet: boolean; @@ -5314,7 +4193,7 @@ Less build output. --- -##### `sharpLayerArn`Optional +##### `sharpLayerArn`Optional ```typescript public readonly sharpLayerArn: string; @@ -5328,7 +4207,7 @@ If omitted, the layer will be created. --- -##### `skipFullInvalidation`Optional +##### `skipFullInvalidation`Optional ```typescript public readonly skipFullInvalidation: boolean; @@ -5343,7 +4222,7 @@ could be important for some users. --- -##### `tempBuildDir`Optional +##### `tempBuildDir`Optional ```typescript public readonly tempBuildDir: string; @@ -5357,7 +4236,7 @@ Defaults to os.tmpdir(). --- -##### `nextBuild`Required +##### `nextBuild`Required ```typescript public readonly nextBuild: NextjsBuild; @@ -5365,28 +4244,26 @@ public readonly nextBuild: NextjsBuild; - *Type:* NextjsBuild -Built nextJS application. +The `NextjsBuild` instance representing the built Nextjs application. --- -##### `staticAssetBucket`Required +##### `serverFunction`Required ```typescript -public readonly staticAssetBucket: IBucket; +public readonly serverFunction: NextjsServer; ``` -- *Type:* aws-cdk-lib.aws_s3.IBucket - -Static asset bucket. +- *Type:* NextjsServer -Function needs bucket to read from cache. +The main NextJS server handler lambda function. --- -##### `lambda`Optional +##### `lambdaOptions`Optional ```typescript -public readonly lambda: FunctionOptions; +public readonly lambdaOptions: FunctionOptions; ``` - *Type:* aws-cdk-lib.aws_lambda.FunctionOptions @@ -5395,39 +4272,36 @@ Override function properties. --- -### RevalidationProps +### NextjsServerProps -#### Initializer +#### Initializer ```typescript -import { RevalidationProps } from 'cdk-nextjs-standalone' +import { NextjsServerProps } from 'cdk-nextjs-standalone' -const revalidationProps: RevalidationProps = { ... } +const nextjsServerProps: NextjsServerProps = { ... } ``` #### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| nextjsPath | string | Relative path to the directory where the NextJS project is located. | -| buildCommand | string | Optional value used to install NextJS node dependencies. | -| buildPath | string | The directory to execute `npm run build` from. | -| compressionLevel | number | 0 - no compression, fastest 9 - maximum compression, slowest. | -| environment | {[ key: string ]: string} | Custom environment variables to pass to the NextJS build and runtime. | -| isPlaceholder | boolean | Skip building app and deploy a placeholder. | -| nodeEnv | string | Optional value for NODE_ENV during build and runtime. | -| projectRoot | string | Root of your project, if different from `nextjsPath`. | -| quiet | boolean | Less build output. | -| sharpLayerArn | string | Optional arn for the sharp lambda layer. | -| skipFullInvalidation | boolean | By default all CloudFront cache will be invalidated on deployment. | -| tempBuildDir | string | Directory to store temporary build files in. | -| nextBuild | NextjsBuild | The `NextjsBuild` instance representing the built Nextjs application. | -| serverFunction | NextjsServer | The main NextJS server handler lambda function. | -| lambdaOptions | aws-cdk-lib.aws_lambda.FunctionOptions | Override function properties. | +| nextjsPath | string | Relative path to the directory where the NextJS project is located. | +| buildCommand | string | Optional value used to install NextJS node dependencies. | +| buildPath | string | The directory to execute `npm run build` from. | +| environment | {[ key: string ]: string} | Custom environment variables to pass to the NextJS build and runtime. | +| projectRoot | string | Root of your project, if different from `nextjsPath`. | +| quiet | boolean | Less build output. | +| sharpLayerArn | string | Optional arn for the sharp lambda layer. | +| skipFullInvalidation | boolean | By default all CloudFront cache will be invalidated on deployment. | +| tempBuildDir | string | Directory to store temporary build files in. | +| nextBuild | NextjsBuild | Built nextJS application. | +| staticAssetBucket | aws-cdk-lib.aws_s3.IBucket | Static asset bucket. | +| lambda | aws-cdk-lib.aws_lambda.FunctionOptions | Override function properties. | --- -##### `nextjsPath`Required +##### `nextjsPath`Required ```typescript public readonly nextjsPath: string; @@ -5441,21 +4315,20 @@ Can be the root of your project (`.`) or a subdirectory (`packages/web`). --- -##### `buildCommand`Optional +##### `buildCommand`Optional ```typescript public readonly buildCommand: string; ``` - *Type:* string +- *Default:* 'npx --yes open-next@2 build' Optional value used to install NextJS node dependencies. -It defaults to 'npx --yes open-next@2 build' - --- -##### `buildPath`Optional +##### `buildPath`Optional ```typescript public readonly buildPath: string; @@ -5471,20 +4344,7 @@ at the root of the project. --- -##### `compressionLevel`Optional - -```typescript -public readonly compressionLevel: number; -``` - -- *Type:* number -- *Default:* 1 - -0 - no compression, fastest 9 - maximum compression, slowest. - ---- - -##### `environment`Optional +##### `environment`Optional ```typescript public readonly environment: {[ key: string ]: string}; @@ -5496,33 +4356,7 @@ Custom environment variables to pass to the NextJS build and runtime. --- -##### `isPlaceholder`Optional - -```typescript -public readonly isPlaceholder: boolean; -``` - -- *Type:* boolean - -Skip building app and deploy a placeholder. - -Useful when using `next dev` for local development. - ---- - -##### `nodeEnv`Optional - -```typescript -public readonly nodeEnv: string; -``` - -- *Type:* string - -Optional value for NODE_ENV during build and runtime. - ---- - -##### `projectRoot`Optional +##### `projectRoot`Optional ```typescript public readonly projectRoot: string; @@ -5536,7 +4370,7 @@ Defaults to current working directory. --- -##### `quiet`Optional +##### `quiet`Optional ```typescript public readonly quiet: boolean; @@ -5548,7 +4382,7 @@ Less build output. --- -##### `sharpLayerArn`Optional +##### `sharpLayerArn`Optional ```typescript public readonly sharpLayerArn: string; @@ -5562,7 +4396,7 @@ If omitted, the layer will be created. --- -##### `skipFullInvalidation`Optional +##### `skipFullInvalidation`Optional ```typescript public readonly skipFullInvalidation: boolean; @@ -5577,7 +4411,7 @@ could be important for some users. --- -##### `tempBuildDir`Optional +##### `tempBuildDir`Optional ```typescript public readonly tempBuildDir: string; @@ -5591,7 +4425,7 @@ Defaults to os.tmpdir(). --- -##### `nextBuild`Required +##### `nextBuild`Required ```typescript public readonly nextBuild: NextjsBuild; @@ -5599,26 +4433,28 @@ public readonly nextBuild: NextjsBuild; - *Type:* NextjsBuild -The `NextjsBuild` instance representing the built Nextjs application. +Built nextJS application. --- -##### `serverFunction`Required +##### `staticAssetBucket`Required ```typescript -public readonly serverFunction: NextjsServer; +public readonly staticAssetBucket: IBucket; ``` -- *Type:* NextjsServer +- *Type:* aws-cdk-lib.aws_s3.IBucket -The main NextJS server handler lambda function. +Static asset bucket. + +Function needs bucket to read from cache. --- -##### `lambdaOptions`Optional +##### `lambda`Optional ```typescript -public readonly lambdaOptions: FunctionOptions; +public readonly lambda: FunctionOptions; ``` - *Type:* aws-cdk-lib.aws_lambda.FunctionOptions @@ -5627,125 +4463,59 @@ Override function properties. --- -### RewriteReplacementsConfig +### NextjsStaticAssetsProps -#### Initializer +#### Initializer ```typescript -import { RewriteReplacementsConfig } from 'cdk-nextjs-standalone' +import { NextjsStaticAssetsProps } from 'cdk-nextjs-standalone' -const rewriteReplacementsConfig: RewriteReplacementsConfig = { ... } +const nextjsStaticAssetsProps: NextjsStaticAssetsProps = { ... } ``` #### Properties | **Name** | **Type** | **Description** | | --- | --- | --- | -| env | {[ key: string ]: string} | *No description.* | -| jsonS3Bucket | aws-cdk-lib.aws_s3.IBucket | *No description.* | -| jsonS3Key | string | *No description.* | - ---- - -##### `env`Optional - -```typescript -public readonly env: {[ key: string ]: string}; -``` - -- *Type:* {[ key: string ]: string} - ---- - -##### `jsonS3Bucket`Optional - -```typescript -public readonly jsonS3Bucket: IBucket; -``` - -- *Type:* aws-cdk-lib.aws_s3.IBucket - ---- - -##### `jsonS3Key`Optional - -```typescript -public readonly jsonS3Key: string; -``` - -- *Type:* string +| nextBuild | NextjsBuild | The `NextjsBuild` instance representing the built Nextjs application. | +| bucket | aws-cdk-lib.aws_s3.IBucket | Define your own bucket to store static assets. | +| environment | {[ key: string ]: string} | Custom environment variables to pass to the NextJS build and runtime. | --- -### RewriterParams - -#### Initializer +##### `nextBuild`Required ```typescript -import { RewriterParams } from 'cdk-nextjs-standalone' - -const rewriterParams: RewriterParams = { ... } +public readonly nextBuild: NextjsBuild; ``` -#### Properties - -| **Name** | **Type** | **Description** | -| --- | --- | --- | -| replacementConfig | RewriteReplacementsConfig | *No description.* | -| s3Bucket | aws-cdk-lib.aws_s3.IBucket | *No description.* | -| s3keys | string[] | *No description.* | -| cloudfrontDistributionId | string | *No description.* | -| debug | boolean | *No description.* | - ---- - -##### `replacementConfig`Required - -```typescript -public readonly replacementConfig: RewriteReplacementsConfig; -``` +- *Type:* NextjsBuild -- *Type:* RewriteReplacementsConfig +The `NextjsBuild` instance representing the built Nextjs application. --- -##### `s3Bucket`Required +##### `bucket`Optional ```typescript -public readonly s3Bucket: IBucket; +public readonly bucket: IBucket; ``` - *Type:* aws-cdk-lib.aws_s3.IBucket ---- - -##### `s3keys`Required - -```typescript -public readonly s3keys: string[]; -``` - -- *Type:* string[] +Define your own bucket to store static assets. --- -##### `cloudfrontDistributionId`Optional +##### `environment`Optional ```typescript -public readonly cloudfrontDistributionId: string; +public readonly environment: {[ key: string ]: string}; ``` -- *Type:* string - ---- - -##### `debug`Optional - -```typescript -public readonly debug: boolean; -``` +- *Type:* {[ key: string ]: string} -- *Type:* boolean +Custom environment variables to pass to the NextJS build and runtime. --- diff --git a/README.md b/README.md index 9f19dc0b..22e7b015 100644 --- a/README.md +++ b/README.md @@ -10,20 +10,25 @@ Supported NextJs versions: >=12.3.0+ (includes 13.0.0+) Uses the [standalone output](https://nextjs.org/docs/advanced-features/output-file-tracing) build mode. ## Quickstart - -Add the dependency `esbuild@0.17.16` to your project along with `cdk-nextjs-standalone`. - -```shell -npm install -D esbuild@0.17.16 cdk-nextjs-standalone -``` - ```ts -import path from 'path'; +import { App, Stack, StackProps } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; import { Nextjs } from 'cdk-nextjs-standalone'; -new Nextjs(this, 'Web', { - nextjsPath: './web', // relative path to nextjs project root -}); +class WebStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + const nextjs = new Nextjs(this, 'Nextjs', { + nextjsPath: './web', // relative path from your project root to NextJS + }); + new CfnOutput(this, "CloudFrontDistributionDomain", { + value: nextjs.distribution.distributionDomain, + }); + } +} + +const app = new App(); +new WebStack(app, 'web'); ``` ## Important Notes @@ -127,19 +132,4 @@ Don't manually update package.json or use npm CLI. Update dependencies in .proje ## Breaking changes -- v4.0.0 - - Renamed `NextjsLambda` to `NextjsServer` - - Renamed `ImageOptimizationLambda` to `NextjsImage` - - Renamed `NextjsCachePolicyProps.lambdaCachePolicy` to `NextjsCachePolicyProps.serverCachePolicy` - - Removed `NextjsOriginRequestPolicyProps.fallbackOriginRequestPolicy` - - Renamed `NextjsOriginRequestPolicyProps.lambdaOriginRequestPolicy` to `NextjsOriginRequestPolicyProps.serverOriginRequestPolicy` - - Removed `NextjsDistribution.staticCachePolicyProps` - - Renamed `NextjsDistribution.lambdaCachePolicyProps` to `NextjsDistribution.serverCachePolicyProps` - - Renamed `NextjsDistribution.lambdaOriginRequestPolicyProps` to `NextjsDistribution.serverOriginRequestPolicyProps` - - Removed `NextjsDistribution.fallbackOriginRequestPolicyProps` - - Removed `NextjsDistribution.imageOptimizationOriginRequestPolicyProps` - - NOTE: when upgrading to v4 from v3, the Lambda@Edge function will be renamed or removed. CloudFormation will fail to delete the function b/c they're replicated a take ~15 min to delete (more [here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-edge-delete-replicas.html)). You can either deploy CloudFormation with it's "no rollback" feature for a clean deployment or mark the Lambda@Edge function as "retain on delete". - -- v3.0.0: Using open-next for building, ARM64 architecture for image handling, new build options. - -- v2.0.0: SST wrapper changed, lambda/assets/distribution defaults now are in the `defaults` prop, refactored distribution settings into the new NextjsDistribution construct. If you are upgrading, you must temporarily remove the `customDomain` on your existing 1.x.x app before upgrading to >=2.x.x because the CloudFront distribution will get recreated due to refactoring, and the custom domain must be globally unique across all CloudFront distributions. Prepare for downtime. +See [here](./docs/major-changes.md). diff --git a/assets/PlaceholderSite/index.html b/assets/PlaceholderSite/index.html deleted file mode 100644 index 02eba213..00000000 --- a/assets/PlaceholderSite/index.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - NextJS CDK Placeholder - - - - - -
-

NextJS CDK

-

This is a placeholder.

-

Probably you want to connect to your local NextJS dev server.

-

- Please feel free to peruse - the documentation for this NextJS construct. -

-
- - diff --git a/assets/lambda/S3EnvRewriter.ts b/assets/lambda/S3EnvRewriter.ts deleted file mode 100644 index 9db98ef2..00000000 --- a/assets/lambda/S3EnvRewriter.ts +++ /dev/null @@ -1,219 +0,0 @@ -import type { CdkCustomResourceEvent, CdkCustomResourceHandler } from 'aws-lambda'; -import * as AWS from 'aws-sdk'; -import * as JSZip from 'jszip'; -import * as micromatch from 'micromatch'; - -type Replacements = Record; - -interface RewriteReplacementsConfig { - env?: Record; // replace keys with values in files - jsonS3Bucket?: string; - jsonS3Key?: string; -} - -interface RewriterParams { - bucket: string; - s3keys: string[]; - replacementConfig: RewriteReplacementsConfig; - debug?: boolean; - cloudfrontDistributionId?: string; -} - -const replaceTokenGlobs = ['**/*.html', '**/*.js', '**/*.cjs', '**/*.mjs', '**/*.json']; - -// script entry point -// search and replace tokenized values of designated objects in s3 -export const handler: CdkCustomResourceHandler = async (event) => { - const requestType = event.RequestType; - if (requestType === 'Create' || requestType === 'Update') { - await doRewrites(event); - } - - return event; -}; - -async function tryGetObject(bucket: string, key: string, tries = 0) { - const s3 = new AWS.S3(); - try { - return await s3.getObject({ Bucket: bucket, Key: key }).promise(); - } catch (err) { - console.warn('Failed to retrieve object', key, err); - // if access denied - wait a few seconds and try again - if (err.code === 'AccessDenied' && tries < 2) { - // console.info('Retrying for object', key); - await new Promise((res) => setTimeout(res, 5000)); - return tryGetObject(bucket, key, ++tries); - } else { - // for now.. skip it. might be a rollback and the file is no longer available. - // there might be a bug here with calling this script before all files are uploaded - // this should be investigated more - // for some reason _ssgManifest.js and _buildManifest.js always fail i don't know why. it's ok i guess. - console.error('Failed to retrieve object', key, err); - // throw err; - } - } -} - -const doRewrites = async (event: CdkCustomResourceEvent) => { - const scriptParams = event.ResourceProperties as unknown as RewriterParams; - - // get values we're replacing - const replacementValues = await getReplacementValues(scriptParams); - if (!Object.keys(replacementValues).length) { - console.info('No replacements found, bailing'); - return; - } - - // rewrite static files - const s3 = new AWS.S3(); - const { s3keys, bucket, debug, cloudfrontDistributionId } = scriptParams; - if (!s3keys || !bucket) { - console.error('Missing required properties'); - return; - } - - // iterate over s3keys and rewrite files - const rewrittenPaths: string[] = []; - const promises = s3keys.map(async (key) => { - // get file - const keyParams = { Bucket: bucket, Key: key }; - if (debug) console.info(`Retrieving s3://${bucket}/${key}`); - const res = await tryGetObject(bucket, key); - if (!res) return; - - // do rewrites - let newBody; - if (key.endsWith('.zip')) { - newBody = await doRewritesForZipFile(res, scriptParams, replacementValues); - } else { - newBody = await doRewritesForTextFile(res, scriptParams, replacementValues); - } - if (!newBody) return; - - // upload - if (debug) console.info('Rewrote', key); - const putParams = { - ...keyParams, - Body: newBody, - ContentType: res.ContentType, - ContentEncoding: res.ContentEncoding, - CacheControl: res.CacheControl, - }; - const putRes = await s3.putObject(putParams).promise(); - if (debug) console.info(`Uploaded s3://${bucket}/${key}`, putRes); - rewrittenPaths.push('/' + key); - }); - await Promise.all(promises); - - // invalidate items that were just rewritten in cloudfront - if (cloudfrontDistributionId && rewrittenPaths.length) { - console.info('Invalidating rewritten files in cache', rewrittenPaths); - const cloudfront = new AWS.CloudFront(); - const invalidationRes = await cloudfront - .createInvalidation({ - DistributionId: cloudfrontDistributionId, - InvalidationBatch: { - CallerReference: Date.now().toString(), - Paths: { - Quantity: rewrittenPaths.length, - Items: rewrittenPaths, - }, - }, - }) - .promise(); - } -}; - -const doRewritesForTextFile = async ( - object: AWS.S3.GetObjectOutput, - _params: RewriterParams, - replacements: Replacements -) => { - // get body - const bodyPre = object.Body?.toString('utf-8'); - if (!bodyPre) return; - let bodyPost = bodyPre; - - // do replacements of tokens - Object.entries(replacements as Record).forEach(([token, value]) => { - bodyPost = bodyPost.replace(token, value); - }); - - // didn't change? - if (bodyPost === bodyPre) return; - - return bodyPost; -}; - -const doRewritesForZipFile = async ( - object: AWS.S3.GetObjectOutput, - params: RewriterParams, - replacements: Replacements -) => { - const archive = await JSZip.loadAsync(object.Body as Buffer); - - // iterate through zip - const promises = Object.keys(archive.files).map(async (key) => { - const file = archive.files[key]; - // if (params.debug) console.info('Looking at file', file.name, 'in zip...'); - if (file.dir) return; - if (file.name.includes('node_modules/')) return; - - // file type we care about? - if (!micromatch.isMatch(file.name, replaceTokenGlobs, { dot: true })) return; - if (params.debug) console.info('Maybe rewriting', file.name, 'in zip...'); - - // unzip to buffer - const bodyPre = await file.async('string'); - let bodyPost = bodyPre; - - // do replacements of tokens - Object.entries(replacements).forEach(([token, value]) => { - bodyPost = bodyPost.replace(token, value); - }); - - // didn't change? - if (bodyPost === bodyPre) return; - - console.info('Rewrote', key, 'in zip file, filename=', file.name); - - // update - archive.file(file.name, bodyPost); - return true; // rewrote - }); - const rewriteResults = await Promise.all(promises); - // didn't rewrite anything? we're done - if (!rewriteResults.some(Boolean)) return; - - // save - const zipOutput = await archive.generateAsync({ - type: 'nodebuffer', - platform: 'UNIX', - compression: 'STORE', // skip compressing - }); - console.info('Rewrote zip file', Math.round(zipOutput.byteLength / 1024), 'kb'); - - return zipOutput; -}; - -const getReplacementValues = async (scriptParams: RewriterParams): Promise => { - const { env: envMap, jsonS3Bucket, jsonS3Key } = scriptParams.replacementConfig; - - // get values we're replacing - // can be a map or a JSON file in S3 - let env: Record = { ...envMap }; - - // values may be stored in S3 as a JSON file - if (jsonS3Bucket && jsonS3Key) { - if (scriptParams.debug) console.info(`Getting replacement values from s3://${jsonS3Bucket}/${jsonS3Key}`); - const data = await tryGetObject(jsonS3Bucket, jsonS3Key); - if (data?.Body) { - const json = data.Body.toString('utf-8'); - env = { ...env, ...JSON.parse(json) }; - } else { - // throw new Error('Failed to get replacement values from S3 - empty file'); - } - } - - return env; -}; diff --git a/docs/code-deployment-flow.md b/docs/code-deployment-flow.md new file mode 100644 index 00000000..5805124a --- /dev/null +++ b/docs/code-deployment-flow.md @@ -0,0 +1,22 @@ +# Nextjs Code Deployment Flow + +Deep dive into `Nextjs` constructs code deployment flow - how your Next.js code gets deployed into AWS. + +1. `cdk deploy "**"` +1. `Nextjs` is instantiated +1. `NextjsBuild` is instantiated which runs `npx open-next build` within user's Next.js repository. This command runs `next build` which creates a .next folder with build output. Then `open-next` copies the static assets and generates a cached files (ISR), server, image optimization, revalidation, and warmer lambda function handler code. When open-next's build is run, the process's environment variables, `NextjsProps.environment`, and `Nextjs.nodeEnv` are injected into the build process. However, any unresolved tokens in `NextjsProps.environment` are replaced with placeholders that look like `{{ BUCKET_NAME }}` as they're unresolved tokens so they're value looks like `${TOKEN[Bucket.Name.1234]}`. Learn more about AWS CDK Tokens [here](https://docs.aws.amazon.com/cdk/v2/guide/tokens.html). The placeholders will be replaced later in a [CloudFormation Custom Resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html). +1. `NextjsStaticAssets` is instantiated which creates an S3 bucket, an `Asset` for your Next.js static assets, and a `NextjsBucketDeployment`. [Asset](https://docs.aws.amazon.com/cdk/v2/guide/assets.html) is uploaded to the S3 Bucket created during CDK Bootstrap in your AWS account (not bucket created in `NextjsStaticAssets`). `NextjsBucketDeployment` is a CloudFormation Custom Resource that downloads files from the CDK Assets Bucket, updates placeholder values, and then deploys the files to the target bucket. Placeholder values were unresolved tokens at synthesis time (because they reference values where names/ids aren't known yet) but at the time the code runs in the Custom Resource Lambda Function, those values have been resolved and are passed into custom resource through `ResourceProperties`. Only the public environment variable (NEXT_PUBLIC) placeholders are passed to `NextjsBucketDeployment.substitutionConfig` because server variables shouldn't live in static assets. Learn more about Next.js environment variables [here](https://nextjs.org/docs/app/building-your-application/configuring/environment-variables). It's important to note the deployment order so that we don't write the static assets to the bucket until they're placeholders are replaced, otherwise we risk a user downloading a file with placeholders which would result in an error. +1. `NextjsServer` is instantiated which creates an `Asset`, `NextjsBucketDeployment`, and lambda function to run Next.js server code. `NextjsBucketDeployment` will replace all (public and private) unresolved tokens within open-next generated server function code. Additional environment variables to support cache ISR feature are added: CACHE_BUCKET_NAME, CACHE_BUCKET_KEY, CACHE_BUCKET_REGION. `NextjsServer` also bundles lambda code with `esbuild`. The same note above about the important of deployment order applies here. +1. `NextjsImage` and `NextjsRevalidation` are instantiated with each create a `NodejsFunction` which automatically does bundling and uploading of asset for us. We don't need to replace environment variable placeholders because they don't any (TODO: confirm this). +1. `NextjsInvalidation` is instantiated to invalidate CloudFront Distribution. This construct explicitly depends upon `NextjsStaticAssets`, `NextjsServer`, `NextjsImage` so that we ensure any resources that could impact cached resources (static assets, dynamic html, images) are up to date before invalidating CloudFront Distribution's cache. + +## PNPM Monorepo Symlinks +_Only applicable for PNPM Monorepos_ +PNPM Monorepos use symlinks between workspace node_modules and the top level node_modules. CDK Assets do not support symlinks despite the configuration options available. Therefore, we must zip up the assets ourselves. Also, `nextjs-bucket-deployment.ts` handles symlinks to unzip and zip symlinks within Lambda Custom Resources (for ServerFnBucketDeployment). + +Relevant GitHub Issues: +- https://github.com/aws/aws-cdk/issues/9251 +- https://github.com/Stuk/jszip/issues/386#issuecomment-634773343 + +## Reason Why We Cannot use NodejsFunction for all Lambdas +Originally I wanted to use NodejsFunction which manages bundling for us. However, we cannot couple bundling and deploying the function together when we don't know deploy time values because this would deploy the function without inject environment variables. The period of the function being in this state would be small, but isn't acceptable IMO. Therefore, we must deploy assets to S3, inject environment variables, then deploy the function - similar to how it works currently. There are still improvements to make, though. Server and Image functions must be inject with env vars where as Revalidation and in the future, Warmer can be bundled with NodejsLambda. \ No newline at end of file diff --git a/docs/major-changes.md b/docs/major-changes.md new file mode 100644 index 00000000..97726622 --- /dev/null +++ b/docs/major-changes.md @@ -0,0 +1,25 @@ +# Nextjs Breaking Changes + +## v4 +- Renamed `NextjsLambda` to `NextjsServer` +- Renamed `ImageOptimizationLambda` to `NextjsImage` +- Renamed `NextjsCachePolicyProps.lambdaCachePolicy` to `NextjsCachePolicyProps.serverCachePolicy` +- Removed `NextjsOriginRequestPolicyProps.fallbackOriginRequestPolicy` +- Renamed `NextjsOriginRequestPolicyProps.lambdaOriginRequestPolicy` to `NextjsOriginRequestPolicyProps.serverOriginRequestPolicy` +- Removed `NextjsDistribution.staticCachePolicyProps` +- Renamed `NextjsDistribution.lambdaCachePolicyProps` to `NextjsDistribution.serverCachePolicyProps` +- Renamed `NextjsDistribution.lambdaOriginRequestPolicyProps` to `NextjsDistribution.serverOriginRequestPolicyProps` +- Removed `NextjsDistribution.fallbackOriginRequestPolicyProps` +- Removed `NextjsDistribution.imageOptimizationOriginRequestPolicyProps` +- NOTE: when upgrading to v4 from v3, the Lambda@Edge function will be renamed or removed. CloudFormation will fail to delete the function b/c they're replicated a take ~15 min to delete (more [here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-edge-delete-replicas.html)). You can either deploy CloudFormation with it's "no rollback" feature for a clean deployment or mark the Lambda@Edge function as "retain on delete". +- Remove `NextjsBuild.nextMiddlewareFnDir` +- Remove `BaseSiteEnvironmentOutputsInfo, BaseSiteReplaceProps` exports as not used anymore +- Remove `compressionLevel` to simplify configuration. We use optimal for windows or max compression for unix +- Remove `nodeEnv` because it can be configured through `environment` prop. + + +## v3 +Using open-next for building, ARM64 architecture for image handling, new build options. + +## v2 +SST wrapper changed, lambda/assets/distribution defaults now are in the `defaults` prop, refactored distribution settings into the new NextjsDistribution construct. If you are upgrading, you must temporarily remove the `customDomain` on your existing 1.x.x app before upgrading to >=2.x.x because the CloudFront distribution will get recreated due to refactoring, and the custom domain must be globally unique across all CloudFront distributions. Prepare for downtime. \ No newline at end of file diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 00000000..68dad067 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,29 @@ +# cdk-nextjs-standalone Examples +Each example app utilizes [open-next](https://github.com/sst/open-next)'s example Next.js apps. open-next's example apps are built to test core Next.js functionality so they're helpful for testing `cdk-nextjs-standalone`. We also don't want to reinvent the wheel. In order to use open-next's code within this repository we use git submodules. Read [this guide](https://www.atlassian.com/git/tutorials/git-submodule) for more info. + +## Prerequisites +1. `git clone https://github.com/jetbridge/cdk-nextjs.git` +1. `yarn install` +1. `yarn build` (or faster option: `yarn compile`) + +## Setup Example Next.js Apps +After cloning this repository in order to run the example apps or e2e tests, run: +1. Initialize git submodule: `git submodule init && git submodule update` +1. Install dependencies: `cd open-next && pnpm i` +1. Build packages `pnpm build` + +## Deploy Manually +To deploy an app manually to test them out for yourself, run: +1. `cd app-router # or any other example` +1. `pnpm install` +1. Inject AWS Credentials into your terminal +1. `cdk deploy` + +## Locally Run E2E Tests with Playwright +1. Change directory into package with tests: `cd open-next/packages/tests-e2e`. +1. Set URL environment variable for the [project](https://playwright.dev/docs/test-projects) you want to test: `APP_ROUTER_URL` for `appRouter` project, `PAGES_ROUTER_URL` for `pagesRouter` project, and/or `APP_PAGE_ROUTER_URL` for `appPagesRouter` project. These urls will be the CloudFront domains from deployed `examples/` CDK apps. You can find these in AWS Console or they'll be printed in your terminal after running `cdk deploy`. +1. Run e2e tests with ui: `pnpm playwright test --ui`. +1. Hit play (green play button) and watch tests run! + +## E2E Testing in CI +See .projenrc.ts `run-e2e-tests` workflow towards bottom. This functionality is commented out until an AWS account can be used to deploy the example apps and run the tests. \ No newline at end of file diff --git a/examples/app-pages-router/.gitignore b/examples/app-pages-router/.gitignore new file mode 100644 index 00000000..ff4194ab --- /dev/null +++ b/examples/app-pages-router/.gitignore @@ -0,0 +1,8 @@ +*.d.ts +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out + +!tsconfig.json \ No newline at end of file diff --git a/examples/app-pages-router/cdk.json b/examples/app-pages-router/cdk.json new file mode 100644 index 00000000..1b4b4ebe --- /dev/null +++ b/examples/app-pages-router/cdk.json @@ -0,0 +1,60 @@ +{ + "app": "pnpm tsx src/app.ts", + "watch": { + "include": [ + "**" + ], + "exclude": [ + "README.md", + "cdk*.json", + "**/*.d.ts", + "**/*.js", + "tsconfig.json", + "package*.json", + "yarn.lock", + "node_modules", + "test" + ] + }, + "context": { + "@aws-cdk/aws-lambda:recognizeLayerVersion": true, + "@aws-cdk/core:checkSecretUsage": true, + "@aws-cdk/core:target-partitions": [ + "aws", + "aws-cn" + ], + "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true, + "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true, + "@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true, + "@aws-cdk/aws-iam:minimizePolicies": true, + "@aws-cdk/core:validateSnapshotRemovalPolicy": true, + "@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true, + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true, + "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true, + "@aws-cdk/aws-apigateway:disableCloudWatchRole": true, + "@aws-cdk/core:enablePartitionLiterals": true, + "@aws-cdk/aws-events:eventsTargetQueueSameAccount": true, + "@aws-cdk/aws-iam:standardizedServicePrincipals": true, + "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true, + "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true, + "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true, + "@aws-cdk/aws-route53-patters:useCertificate": true, + "@aws-cdk/customresources:installLatestAwsSdkDefault": false, + "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true, + "@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true, + "@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true, + "@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true, + "@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true, + "@aws-cdk/aws-redshift:columnId": true, + "@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true, + "@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true, + "@aws-cdk/aws-apigateway:requestValidatorUniqueId": true, + "@aws-cdk/aws-kms:aliasNameRef": true, + "@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true, + "@aws-cdk/core:includePrefixInUniqueNameGeneration": true, + "@aws-cdk/aws-efs:denyAnonymousAccess": true, + "@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true, + "@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": true, + "@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": true + } +} diff --git a/examples/app-pages-router/package.json b/examples/app-pages-router/package.json new file mode 100644 index 00000000..38e02f28 --- /dev/null +++ b/examples/app-pages-router/package.json @@ -0,0 +1,21 @@ +{ + "name": "cdk-nextjs-standalone-example-app-router", + "version": "0.1.0", + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "cdk": "cdk" + }, + "devDependencies": { + "@types/node": "20.5.7", + "aws-cdk": "2.94.0", + "esbuild": "^0.19.3", + "tsx": "^3.12.10", + "typescript": "~5.2.2" + }, + "dependencies": { + "aws-cdk-lib": "2.94.0", + "cdk-nextjs-standalone": "link:../..", + "constructs": "^10.0.0" + } +} diff --git a/examples/app-pages-router/pnpm-lock.yaml b/examples/app-pages-router/pnpm-lock.yaml new file mode 100644 index 00000000..87a3094f --- /dev/null +++ b/examples/app-pages-router/pnpm-lock.yaml @@ -0,0 +1,623 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + aws-cdk-lib: + specifier: 2.94.0 + version: 2.94.0(constructs@10.2.70) + cdk-nextjs-standalone: + specifier: link:../.. + version: link:../.. + constructs: + specifier: ^10.0.0 + version: 10.2.70 + +devDependencies: + '@types/node': + specifier: 20.5.7 + version: 20.5.7 + aws-cdk: + specifier: 2.94.0 + version: 2.94.0 + esbuild: + specifier: ^0.19.3 + version: 0.19.3 + tsx: + specifier: ^3.12.10 + version: 3.12.10 + typescript: + specifier: ~5.2.2 + version: 5.2.2 + +packages: + + /@aws-cdk/asset-awscli-v1@2.2.200: + resolution: {integrity: sha512-Kf5J8DfJK4wZFWT2Myca0lhwke7LwHcHBo+4TvWOGJrFVVKVuuiLCkzPPRBQQVDj0Vtn2NBokZAz8pfMpAqAKg==} + dev: false + + /@aws-cdk/asset-kubectl-v20@2.1.2: + resolution: {integrity: sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg==} + dev: false + + /@aws-cdk/asset-node-proxy-agent-v6@2.0.1: + resolution: {integrity: sha512-DDt4SLdLOwWCjGtltH4VCST7hpOI5DzieuhGZsBpZ+AgJdSI2GCjklCXm0GCTwJG/SolkL5dtQXyUKgg9luBDg==} + dev: false + + /@esbuild-kit/cjs-loader@2.4.4: + resolution: {integrity: sha512-NfsJX4PdzhwSkfJukczyUiZGc7zNNWZcEAyqeISpDnn0PTfzMJR1aR8xAIPskBejIxBJbIgCCMzbaYa9SXepIg==} + dependencies: + '@esbuild-kit/core-utils': 3.3.1 + get-tsconfig: 4.7.0 + dev: true + + /@esbuild-kit/core-utils@3.3.1: + resolution: {integrity: sha512-zg2aeGLgbZ/U8AnHRD6y085BkRqlw7jOsqpI/AFaQg6FhcCRycAe+aFLibs9okVVYTMqWANDC76UVSzd3qBoOw==} + dependencies: + esbuild: 0.18.20 + source-map-support: 0.5.21 + dev: true + + /@esbuild-kit/esm-loader@2.6.4: + resolution: {integrity: sha512-xcbyhN97xFFFEdDw6IC4EuzX9Ali3aV3cj2FIYragOQpbPM4X6QA2R5qaP3h7Tr0tuyI6dmJJdMw7oBHxBSXQA==} + dependencies: + '@esbuild-kit/core-utils': 3.3.1 + get-tsconfig: 4.7.0 + dev: true + + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64@0.19.3: + resolution: {integrity: sha512-w+Akc0vv5leog550kjJV9Ru+MXMR2VuMrui3C61mnysim0gkFCPOUTAfzTP0qX+HpN9Syu3YA3p1hf3EPqObRw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.19.3: + resolution: {integrity: sha512-Lemgw4io4VZl9GHJmjiBGzQ7ONXRfRPHcUEerndjwiSkbxzrpq0Uggku5MxxrXdwJ+pTj1qyw4jwTu7hkPsgIA==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.19.3: + resolution: {integrity: sha512-FKQJKkK5MXcBHoNZMDNUAg1+WcZlV/cuXrWCoGF/TvdRiYS4znA0m5Il5idUwfxrE20bG/vU1Cr5e1AD6IEIjQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.19.3: + resolution: {integrity: sha512-kw7e3FXU+VsJSSSl2nMKvACYlwtvZB8RUIeVShIEY6PVnuZ3c9+L9lWB2nWeeKWNNYDdtL19foCQ0ZyUL7nqGw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.19.3: + resolution: {integrity: sha512-tPfZiwF9rO0jW6Jh9ipi58N5ZLoSjdxXeSrAYypy4psA2Yl1dAMhM71KxVfmjZhJmxRjSnb29YlRXXhh3GqzYw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.19.3: + resolution: {integrity: sha512-ERDyjOgYeKe0Vrlr1iLrqTByB026YLPzTytDTz1DRCYM+JI92Dw2dbpRHYmdqn6VBnQ9Bor6J8ZlNwdZdxjlSg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.19.3: + resolution: {integrity: sha512-nXesBZ2Ad1qL+Rm3crN7NmEVJ5uvfLFPLJev3x1j3feCQXfAhoYrojC681RhpdOph8NsvKBBwpYZHR7W0ifTTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.19.3: + resolution: {integrity: sha512-qXvYKmXj8GcJgWq3aGvxL/JG1ZM3UR272SdPU4QSTzD0eymrM7leiZH77pvY3UetCy0k1xuXZ+VPvoJNdtrsWQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.19.3: + resolution: {integrity: sha512-zr48Cg/8zkzZCzDHNxXO/89bf9e+r4HtzNUPoz4GmgAkF1gFAFmfgOdCbR8zMbzFDGb1FqBBhdXUpcTQRYS1cQ==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.19.3: + resolution: {integrity: sha512-7XlCKCA0nWcbvYpusARWkFjRQNWNGlt45S+Q18UeS///K6Aw8bB2FKYe9mhVWy/XLShvCweOLZPrnMswIaDXQA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.19.3: + resolution: {integrity: sha512-qGTgjweER5xqweiWtUIDl9OKz338EQqCwbS9c2Bh5jgEH19xQ1yhgGPNesugmDFq+UUSDtWgZ264st26b3de8A==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.19.3: + resolution: {integrity: sha512-gy1bFskwEyxVMFRNYSvBauDIWNggD6pyxUksc0MV9UOBD138dKTzr8XnM2R4mBsHwVzeuIH8X5JhmNs2Pzrx+A==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.19.3: + resolution: {integrity: sha512-UrYLFu62x1MmmIe85rpR3qou92wB9lEXluwMB/STDzPF9k8mi/9UvNsG07Tt9AqwPQXluMQ6bZbTzYt01+Ue5g==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.19.3: + resolution: {integrity: sha512-9E73TfyMCbE+1AwFOg3glnzZ5fBAFK4aawssvuMgCRqCYzE0ylVxxzjEfut8xjmKkR320BEoMui4o/t9KA96gA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.19.3: + resolution: {integrity: sha512-LlmsbuBdm1/D66TJ3HW6URY8wO6IlYHf+ChOUz8SUAjVTuaisfuwCOAgcxo3Zsu3BZGxmI7yt//yGOxV+lHcEA==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.19.3: + resolution: {integrity: sha512-ogV0+GwEmvwg/8ZbsyfkYGaLACBQWDvO0Kkh8LKBGKj9Ru8VM39zssrnu9Sxn1wbapA2qNS6BiLdwJZGouyCwQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.19.3: + resolution: {integrity: sha512-o1jLNe4uzQv2DKXMlmEzf66Wd8MoIhLNO2nlQBHLtWyh2MitDG7sMpfCO3NTcoTMuqHjfufgUQDFRI5C+xsXQw==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.19.3: + resolution: {integrity: sha512-AZJCnr5CZgZOdhouLcfRdnk9Zv6HbaBxjcyhq0StNcvAdVZJSKIdOiPB9az2zc06ywl0ePYJz60CjdKsQacp5Q==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.19.3: + resolution: {integrity: sha512-Acsujgeqg9InR4glTRvLKGZ+1HMtDm94ehTIHKhJjFpgVzZG9/pIcWW/HA/DoMfEyXmANLDuDZ2sNrWcjq1lxw==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.19.3: + resolution: {integrity: sha512-FSrAfjVVy7TifFgYgliiJOyYynhQmqgPj15pzLyJk8BUsnlWNwP/IAy6GAiB1LqtoivowRgidZsfpoYLZH586A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.19.3: + resolution: {integrity: sha512-xTScXYi12xLOWZ/sc5RBmMN99BcXp/eEf7scUC0oeiRoiT5Vvo9AycuqCp+xdpDyAU+LkrCqEpUS9fCSZF8J3Q==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.19.3: + resolution: {integrity: sha512-FbUN+0ZRXsypPyWE2IwIkVjDkDnJoMJARWOcFZn4KPPli+QnKqF0z1anvfaYe3ev5HFCpRDLLBDHyOALLppWHw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@types/node@20.5.7: + resolution: {integrity: sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==} + dev: true + + /aws-cdk-lib@2.94.0(constructs@10.2.70): + resolution: {integrity: sha512-pB/UzKeM+p/wY9WuFYkEewOFUh2r8qwaML63is4vUChXY2G2Bj3pGyfJ97Xir2Q5KIhgJPJz5igdouI4+F9A+g==} + engines: {node: '>= 14.15.0'} + peerDependencies: + constructs: ^10.0.0 + dependencies: + '@aws-cdk/asset-awscli-v1': 2.2.200 + '@aws-cdk/asset-kubectl-v20': 2.1.2 + '@aws-cdk/asset-node-proxy-agent-v6': 2.0.1 + constructs: 10.2.70 + dev: false + bundledDependencies: + - '@balena/dockerignore' + - case + - fs-extra + - ignore + - jsonschema + - minimatch + - punycode + - semver + - table + - yaml + + /aws-cdk@2.94.0: + resolution: {integrity: sha512-9bJkzxFDYZDwPDfZi/DSUODn4HFRzuXWPhpFgIIgRykfT18P+iAIJ1AEhaaCmlqrrog5yQgN+2iYd9BwDsiBeg==} + engines: {node: '>= 14.15.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + + /constructs@10.2.70: + resolution: {integrity: sha512-z6zr1E8K/9tzJbCQzY0UGX0/oVKPFKu9C/mzEnghCG6TAJINnvlq0CMKm63XqqeMleadZYm5T3sZGJKcxJS/Pg==} + engines: {node: '>= 16.14.0'} + dev: false + + /esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /esbuild@0.19.3: + resolution: {integrity: sha512-UlJ1qUUA2jL2nNib1JTSkifQTcYTroFqRjwCFW4QYEKEsixXD5Tik9xML7zh2gTxkYTBKGHNH9y7txMwVyPbjw==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.19.3 + '@esbuild/android-arm64': 0.19.3 + '@esbuild/android-x64': 0.19.3 + '@esbuild/darwin-arm64': 0.19.3 + '@esbuild/darwin-x64': 0.19.3 + '@esbuild/freebsd-arm64': 0.19.3 + '@esbuild/freebsd-x64': 0.19.3 + '@esbuild/linux-arm': 0.19.3 + '@esbuild/linux-arm64': 0.19.3 + '@esbuild/linux-ia32': 0.19.3 + '@esbuild/linux-loong64': 0.19.3 + '@esbuild/linux-mips64el': 0.19.3 + '@esbuild/linux-ppc64': 0.19.3 + '@esbuild/linux-riscv64': 0.19.3 + '@esbuild/linux-s390x': 0.19.3 + '@esbuild/linux-x64': 0.19.3 + '@esbuild/netbsd-x64': 0.19.3 + '@esbuild/openbsd-x64': 0.19.3 + '@esbuild/sunos-x64': 0.19.3 + '@esbuild/win32-arm64': 0.19.3 + '@esbuild/win32-ia32': 0.19.3 + '@esbuild/win32-x64': 0.19.3 + dev: true + + /fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /get-tsconfig@4.7.0: + resolution: {integrity: sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: true + + /resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + dev: true + + /source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + + /tsx@3.12.10: + resolution: {integrity: sha512-2+46h4xvUt1aLDNvk5YBT8Uzw+b7BolGbn7iSMucYqCXZiDc+1IMghLVdw8kKjING32JFOeO+Am9posvjkeclA==} + hasBin: true + dependencies: + '@esbuild-kit/cjs-loader': 2.4.4 + '@esbuild-kit/core-utils': 3.3.1 + '@esbuild-kit/esm-loader': 2.6.4 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + engines: {node: '>=14.17'} + hasBin: true + dev: true diff --git a/examples/app-pages-router/src/app.ts b/examples/app-pages-router/src/app.ts new file mode 100644 index 00000000..8abbde9b --- /dev/null +++ b/examples/app-pages-router/src/app.ts @@ -0,0 +1,6 @@ +#!/usr/bin/env node +import * as cdk from 'aws-cdk-lib'; +import { AppPagesRouterStack } from './stack'; + +const app = new cdk.App(); +new AppPagesRouterStack(app, 'apr'); // apr = app pages router diff --git a/examples/app-pages-router/src/stack.ts b/examples/app-pages-router/src/stack.ts new file mode 100644 index 00000000..daf848be --- /dev/null +++ b/examples/app-pages-router/src/stack.ts @@ -0,0 +1,18 @@ +import { CfnOutput, Stack, StackProps, Token } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import { Nextjs } from 'cdk-nextjs-standalone'; + +export class AppPagesRouterStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + const nextjs = new Nextjs(this, 'nextjs', { + nextjsPath: '../../open-next/examples/app-pages-router', + // skipBuild: true, + }); + + new CfnOutput(this, "CloudFrontDistributionDomain", { + value: nextjs.distribution.distributionDomain, + }); + } +} diff --git a/examples/app-pages-router/tsconfig.json b/examples/app-pages-router/tsconfig.json new file mode 100644 index 00000000..aaa7dc51 --- /dev/null +++ b/examples/app-pages-router/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "lib": [ + "es2020", + "dom" + ], + "declaration": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": false, + "inlineSourceMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictPropertyInitialization": false, + "typeRoots": [ + "./node_modules/@types" + ] + }, + "exclude": [ + "node_modules", + "cdk.out" + ] +} diff --git a/examples/app-router/.gitignore b/examples/app-router/.gitignore new file mode 100644 index 00000000..ff4194ab --- /dev/null +++ b/examples/app-router/.gitignore @@ -0,0 +1,8 @@ +*.d.ts +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out + +!tsconfig.json \ No newline at end of file diff --git a/examples/app-router/README.md b/examples/app-router/README.md new file mode 100644 index 00000000..e69de29b diff --git a/examples/app-router/cdk.json b/examples/app-router/cdk.json new file mode 100644 index 00000000..1b4b4ebe --- /dev/null +++ b/examples/app-router/cdk.json @@ -0,0 +1,60 @@ +{ + "app": "pnpm tsx src/app.ts", + "watch": { + "include": [ + "**" + ], + "exclude": [ + "README.md", + "cdk*.json", + "**/*.d.ts", + "**/*.js", + "tsconfig.json", + "package*.json", + "yarn.lock", + "node_modules", + "test" + ] + }, + "context": { + "@aws-cdk/aws-lambda:recognizeLayerVersion": true, + "@aws-cdk/core:checkSecretUsage": true, + "@aws-cdk/core:target-partitions": [ + "aws", + "aws-cn" + ], + "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true, + "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true, + "@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true, + "@aws-cdk/aws-iam:minimizePolicies": true, + "@aws-cdk/core:validateSnapshotRemovalPolicy": true, + "@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true, + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true, + "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true, + "@aws-cdk/aws-apigateway:disableCloudWatchRole": true, + "@aws-cdk/core:enablePartitionLiterals": true, + "@aws-cdk/aws-events:eventsTargetQueueSameAccount": true, + "@aws-cdk/aws-iam:standardizedServicePrincipals": true, + "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true, + "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true, + "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true, + "@aws-cdk/aws-route53-patters:useCertificate": true, + "@aws-cdk/customresources:installLatestAwsSdkDefault": false, + "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true, + "@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true, + "@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true, + "@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true, + "@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true, + "@aws-cdk/aws-redshift:columnId": true, + "@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true, + "@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true, + "@aws-cdk/aws-apigateway:requestValidatorUniqueId": true, + "@aws-cdk/aws-kms:aliasNameRef": true, + "@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true, + "@aws-cdk/core:includePrefixInUniqueNameGeneration": true, + "@aws-cdk/aws-efs:denyAnonymousAccess": true, + "@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true, + "@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": true, + "@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": true + } +} diff --git a/examples/app-router/package.json b/examples/app-router/package.json new file mode 100644 index 00000000..38e02f28 --- /dev/null +++ b/examples/app-router/package.json @@ -0,0 +1,21 @@ +{ + "name": "cdk-nextjs-standalone-example-app-router", + "version": "0.1.0", + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "cdk": "cdk" + }, + "devDependencies": { + "@types/node": "20.5.7", + "aws-cdk": "2.94.0", + "esbuild": "^0.19.3", + "tsx": "^3.12.10", + "typescript": "~5.2.2" + }, + "dependencies": { + "aws-cdk-lib": "2.94.0", + "cdk-nextjs-standalone": "link:../..", + "constructs": "^10.0.0" + } +} diff --git a/examples/app-router/pnpm-lock.yaml b/examples/app-router/pnpm-lock.yaml new file mode 100644 index 00000000..c54107fa --- /dev/null +++ b/examples/app-router/pnpm-lock.yaml @@ -0,0 +1,832 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + aws-cdk-lib: + specifier: 2.94.0 + version: 2.94.0(constructs@10.2.70) + cdk-nextjs-standalone: + specifier: link:../.. + version: link:../.. + constructs: + specifier: ^10.0.0 + version: 10.2.70 + +devDependencies: + '@types/node': + specifier: 20.5.7 + version: 20.5.7 + aws-cdk: + specifier: 2.94.0 + version: 2.94.0 + esbuild: + specifier: ^0.19.3 + version: 0.19.3 + tsx: + specifier: ^3.12.10 + version: 3.12.10 + typescript: + specifier: ~5.2.2 + version: 5.2.2 + +packages: + + /@aws-cdk/asset-awscli-v1@2.2.200: + resolution: {integrity: sha512-Kf5J8DfJK4wZFWT2Myca0lhwke7LwHcHBo+4TvWOGJrFVVKVuuiLCkzPPRBQQVDj0Vtn2NBokZAz8pfMpAqAKg==} + dev: false + + /@aws-cdk/asset-kubectl-v20@2.1.2: + resolution: {integrity: sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg==} + dev: false + + /@aws-cdk/asset-node-proxy-agent-v6@2.0.1: + resolution: {integrity: sha512-DDt4SLdLOwWCjGtltH4VCST7hpOI5DzieuhGZsBpZ+AgJdSI2GCjklCXm0GCTwJG/SolkL5dtQXyUKgg9luBDg==} + dev: false + + /@balena/dockerignore@1.0.2: + resolution: {integrity: sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==} + dev: false + + /@esbuild-kit/cjs-loader@2.4.4: + resolution: {integrity: sha512-NfsJX4PdzhwSkfJukczyUiZGc7zNNWZcEAyqeISpDnn0PTfzMJR1aR8xAIPskBejIxBJbIgCCMzbaYa9SXepIg==} + dependencies: + '@esbuild-kit/core-utils': 3.3.1 + get-tsconfig: 4.7.0 + dev: true + + /@esbuild-kit/core-utils@3.3.1: + resolution: {integrity: sha512-zg2aeGLgbZ/U8AnHRD6y085BkRqlw7jOsqpI/AFaQg6FhcCRycAe+aFLibs9okVVYTMqWANDC76UVSzd3qBoOw==} + dependencies: + esbuild: 0.18.20 + source-map-support: 0.5.21 + dev: true + + /@esbuild-kit/esm-loader@2.6.4: + resolution: {integrity: sha512-xcbyhN97xFFFEdDw6IC4EuzX9Ali3aV3cj2FIYragOQpbPM4X6QA2R5qaP3h7Tr0tuyI6dmJJdMw7oBHxBSXQA==} + dependencies: + '@esbuild-kit/core-utils': 3.3.1 + get-tsconfig: 4.7.0 + dev: true + + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64@0.19.3: + resolution: {integrity: sha512-w+Akc0vv5leog550kjJV9Ru+MXMR2VuMrui3C61mnysim0gkFCPOUTAfzTP0qX+HpN9Syu3YA3p1hf3EPqObRw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.19.3: + resolution: {integrity: sha512-Lemgw4io4VZl9GHJmjiBGzQ7ONXRfRPHcUEerndjwiSkbxzrpq0Uggku5MxxrXdwJ+pTj1qyw4jwTu7hkPsgIA==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.19.3: + resolution: {integrity: sha512-FKQJKkK5MXcBHoNZMDNUAg1+WcZlV/cuXrWCoGF/TvdRiYS4znA0m5Il5idUwfxrE20bG/vU1Cr5e1AD6IEIjQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.19.3: + resolution: {integrity: sha512-kw7e3FXU+VsJSSSl2nMKvACYlwtvZB8RUIeVShIEY6PVnuZ3c9+L9lWB2nWeeKWNNYDdtL19foCQ0ZyUL7nqGw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.19.3: + resolution: {integrity: sha512-tPfZiwF9rO0jW6Jh9ipi58N5ZLoSjdxXeSrAYypy4psA2Yl1dAMhM71KxVfmjZhJmxRjSnb29YlRXXhh3GqzYw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.19.3: + resolution: {integrity: sha512-ERDyjOgYeKe0Vrlr1iLrqTByB026YLPzTytDTz1DRCYM+JI92Dw2dbpRHYmdqn6VBnQ9Bor6J8ZlNwdZdxjlSg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.19.3: + resolution: {integrity: sha512-nXesBZ2Ad1qL+Rm3crN7NmEVJ5uvfLFPLJev3x1j3feCQXfAhoYrojC681RhpdOph8NsvKBBwpYZHR7W0ifTTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.19.3: + resolution: {integrity: sha512-qXvYKmXj8GcJgWq3aGvxL/JG1ZM3UR272SdPU4QSTzD0eymrM7leiZH77pvY3UetCy0k1xuXZ+VPvoJNdtrsWQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.19.3: + resolution: {integrity: sha512-zr48Cg/8zkzZCzDHNxXO/89bf9e+r4HtzNUPoz4GmgAkF1gFAFmfgOdCbR8zMbzFDGb1FqBBhdXUpcTQRYS1cQ==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.19.3: + resolution: {integrity: sha512-7XlCKCA0nWcbvYpusARWkFjRQNWNGlt45S+Q18UeS///K6Aw8bB2FKYe9mhVWy/XLShvCweOLZPrnMswIaDXQA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.19.3: + resolution: {integrity: sha512-qGTgjweER5xqweiWtUIDl9OKz338EQqCwbS9c2Bh5jgEH19xQ1yhgGPNesugmDFq+UUSDtWgZ264st26b3de8A==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.19.3: + resolution: {integrity: sha512-gy1bFskwEyxVMFRNYSvBauDIWNggD6pyxUksc0MV9UOBD138dKTzr8XnM2R4mBsHwVzeuIH8X5JhmNs2Pzrx+A==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.19.3: + resolution: {integrity: sha512-UrYLFu62x1MmmIe85rpR3qou92wB9lEXluwMB/STDzPF9k8mi/9UvNsG07Tt9AqwPQXluMQ6bZbTzYt01+Ue5g==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.19.3: + resolution: {integrity: sha512-9E73TfyMCbE+1AwFOg3glnzZ5fBAFK4aawssvuMgCRqCYzE0ylVxxzjEfut8xjmKkR320BEoMui4o/t9KA96gA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.19.3: + resolution: {integrity: sha512-LlmsbuBdm1/D66TJ3HW6URY8wO6IlYHf+ChOUz8SUAjVTuaisfuwCOAgcxo3Zsu3BZGxmI7yt//yGOxV+lHcEA==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.19.3: + resolution: {integrity: sha512-ogV0+GwEmvwg/8ZbsyfkYGaLACBQWDvO0Kkh8LKBGKj9Ru8VM39zssrnu9Sxn1wbapA2qNS6BiLdwJZGouyCwQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.19.3: + resolution: {integrity: sha512-o1jLNe4uzQv2DKXMlmEzf66Wd8MoIhLNO2nlQBHLtWyh2MitDG7sMpfCO3NTcoTMuqHjfufgUQDFRI5C+xsXQw==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.19.3: + resolution: {integrity: sha512-AZJCnr5CZgZOdhouLcfRdnk9Zv6HbaBxjcyhq0StNcvAdVZJSKIdOiPB9az2zc06ywl0ePYJz60CjdKsQacp5Q==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.19.3: + resolution: {integrity: sha512-Acsujgeqg9InR4glTRvLKGZ+1HMtDm94ehTIHKhJjFpgVzZG9/pIcWW/HA/DoMfEyXmANLDuDZ2sNrWcjq1lxw==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.19.3: + resolution: {integrity: sha512-FSrAfjVVy7TifFgYgliiJOyYynhQmqgPj15pzLyJk8BUsnlWNwP/IAy6GAiB1LqtoivowRgidZsfpoYLZH586A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.19.3: + resolution: {integrity: sha512-xTScXYi12xLOWZ/sc5RBmMN99BcXp/eEf7scUC0oeiRoiT5Vvo9AycuqCp+xdpDyAU+LkrCqEpUS9fCSZF8J3Q==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.19.3: + resolution: {integrity: sha512-FbUN+0ZRXsypPyWE2IwIkVjDkDnJoMJARWOcFZn4KPPli+QnKqF0z1anvfaYe3ev5HFCpRDLLBDHyOALLppWHw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@types/node@20.5.7: + resolution: {integrity: sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==} + dev: true + + /ajv@8.12.0: + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + dev: false + + /ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: false + + /ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: false + + /astral-regex@2.0.0: + resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} + engines: {node: '>=8'} + dev: false + + /aws-cdk-lib@2.94.0(constructs@10.2.70): + resolution: {integrity: sha512-pB/UzKeM+p/wY9WuFYkEewOFUh2r8qwaML63is4vUChXY2G2Bj3pGyfJ97Xir2Q5KIhgJPJz5igdouI4+F9A+g==} + engines: {node: '>= 14.15.0'} + peerDependencies: + constructs: ^10.0.0 + dependencies: + '@aws-cdk/asset-awscli-v1': 2.2.200 + '@aws-cdk/asset-kubectl-v20': 2.1.2 + '@aws-cdk/asset-node-proxy-agent-v6': 2.0.1 + '@balena/dockerignore': 1.0.2 + case: 1.6.3 + constructs: 10.2.70 + fs-extra: 11.1.1 + ignore: 5.2.4 + jsonschema: 1.4.1 + minimatch: 3.1.2 + punycode: 2.3.0 + semver: 7.5.4 + table: 6.8.1 + yaml: 1.10.2 + dev: false + bundledDependencies: + - '@balena/dockerignore' + - case + - fs-extra + - ignore + - jsonschema + - minimatch + - punycode + - semver + - table + - yaml + + /aws-cdk@2.94.0: + resolution: {integrity: sha512-9bJkzxFDYZDwPDfZi/DSUODn4HFRzuXWPhpFgIIgRykfT18P+iAIJ1AEhaaCmlqrrog5yQgN+2iYd9BwDsiBeg==} + engines: {node: '>= 14.15.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: false + + /brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: false + + /buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + + /case@1.6.3: + resolution: {integrity: sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==} + engines: {node: '>= 0.8.0'} + dev: false + + /color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: false + + /color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: false + + /concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: false + + /constructs@10.2.70: + resolution: {integrity: sha512-z6zr1E8K/9tzJbCQzY0UGX0/oVKPFKu9C/mzEnghCG6TAJINnvlq0CMKm63XqqeMleadZYm5T3sZGJKcxJS/Pg==} + engines: {node: '>= 16.14.0'} + dev: false + + /emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + dev: false + + /esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /esbuild@0.19.3: + resolution: {integrity: sha512-UlJ1qUUA2jL2nNib1JTSkifQTcYTroFqRjwCFW4QYEKEsixXD5Tik9xML7zh2gTxkYTBKGHNH9y7txMwVyPbjw==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.19.3 + '@esbuild/android-arm64': 0.19.3 + '@esbuild/android-x64': 0.19.3 + '@esbuild/darwin-arm64': 0.19.3 + '@esbuild/darwin-x64': 0.19.3 + '@esbuild/freebsd-arm64': 0.19.3 + '@esbuild/freebsd-x64': 0.19.3 + '@esbuild/linux-arm': 0.19.3 + '@esbuild/linux-arm64': 0.19.3 + '@esbuild/linux-ia32': 0.19.3 + '@esbuild/linux-loong64': 0.19.3 + '@esbuild/linux-mips64el': 0.19.3 + '@esbuild/linux-ppc64': 0.19.3 + '@esbuild/linux-riscv64': 0.19.3 + '@esbuild/linux-s390x': 0.19.3 + '@esbuild/linux-x64': 0.19.3 + '@esbuild/netbsd-x64': 0.19.3 + '@esbuild/openbsd-x64': 0.19.3 + '@esbuild/sunos-x64': 0.19.3 + '@esbuild/win32-arm64': 0.19.3 + '@esbuild/win32-ia32': 0.19.3 + '@esbuild/win32-x64': 0.19.3 + dev: true + + /fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + dev: false + + /fs-extra@11.1.1: + resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.0 + dev: false + + /fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /get-tsconfig@4.7.0: + resolution: {integrity: sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: true + + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: false + + /ignore@5.2.4: + resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} + engines: {node: '>= 4'} + dev: false + + /is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + dev: false + + /json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + dev: false + + /jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.0 + optionalDependencies: + graceful-fs: 4.2.11 + dev: false + + /jsonschema@1.4.1: + resolution: {integrity: sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==} + dev: false + + /lodash.truncate@4.4.2: + resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} + dev: false + + /lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: false + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: false + + /punycode@2.3.0: + resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} + engines: {node: '>=6'} + dev: false + + /require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + dev: false + + /resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + dev: true + + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: false + + /slice-ansi@4.0.0: + resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + astral-regex: 2.0.0 + is-fullwidth-code-point: 3.0.0 + dev: false + + /source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + + /string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + dev: false + + /strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: false + + /table@6.8.1: + resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==} + engines: {node: '>=10.0.0'} + dependencies: + ajv: 8.12.0 + lodash.truncate: 4.4.2 + slice-ansi: 4.0.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: false + + /tsx@3.12.10: + resolution: {integrity: sha512-2+46h4xvUt1aLDNvk5YBT8Uzw+b7BolGbn7iSMucYqCXZiDc+1IMghLVdw8kKjING32JFOeO+Am9posvjkeclA==} + hasBin: true + dependencies: + '@esbuild-kit/cjs-loader': 2.4.4 + '@esbuild-kit/core-utils': 3.3.1 + '@esbuild-kit/esm-loader': 2.6.4 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /universalify@2.0.0: + resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + engines: {node: '>= 10.0.0'} + dev: false + + /uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + dependencies: + punycode: 2.3.0 + dev: false + + /yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: false + + /yaml@1.10.2: + resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} + engines: {node: '>= 6'} + dev: false diff --git a/examples/app-router/src/app.ts b/examples/app-router/src/app.ts new file mode 100644 index 00000000..0f422c86 --- /dev/null +++ b/examples/app-router/src/app.ts @@ -0,0 +1,6 @@ +#!/usr/bin/env node +import * as cdk from 'aws-cdk-lib'; +import { AppRouterStack } from './stack'; + +const app = new cdk.App(); +new AppRouterStack(app, 'ar'); // ar = app router diff --git a/examples/app-router/src/stack.ts b/examples/app-router/src/stack.ts new file mode 100644 index 00000000..4cff0a33 --- /dev/null +++ b/examples/app-router/src/stack.ts @@ -0,0 +1,18 @@ +import { CfnOutput, Stack, StackProps, Token } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import { Nextjs } from 'cdk-nextjs-standalone'; + +export class AppRouterStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + const nextjs = new Nextjs(this, 'nextjs', { + nextjsPath: '../../open-next/examples/app-router', + // skipBuild: true, + }); + + new CfnOutput(this, "CloudFrontDistributionDomain", { + value: nextjs.distribution.distributionDomain, + }); + } +} diff --git a/examples/app-router/tsconfig.json b/examples/app-router/tsconfig.json new file mode 100644 index 00000000..aaa7dc51 --- /dev/null +++ b/examples/app-router/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "lib": [ + "es2020", + "dom" + ], + "declaration": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": false, + "inlineSourceMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictPropertyInitialization": false, + "typeRoots": [ + "./node_modules/@types" + ] + }, + "exclude": [ + "node_modules", + "cdk.out" + ] +} diff --git a/examples/high-security/.gitignore b/examples/high-security/.gitignore new file mode 100644 index 00000000..ff4194ab --- /dev/null +++ b/examples/high-security/.gitignore @@ -0,0 +1,8 @@ +*.d.ts +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out + +!tsconfig.json \ No newline at end of file diff --git a/examples/high-security/README.md b/examples/high-security/README.md new file mode 100644 index 00000000..7c4cd0d8 --- /dev/null +++ b/examples/high-security/README.md @@ -0,0 +1,3 @@ +# High Security Example + +- Must be deployed in us-east-1 because of WAF and CloudFront. It's possible to use other regions not without more complex configuration. \ No newline at end of file diff --git a/examples/high-security/cdk.json b/examples/high-security/cdk.json new file mode 100644 index 00000000..1b4b4ebe --- /dev/null +++ b/examples/high-security/cdk.json @@ -0,0 +1,60 @@ +{ + "app": "pnpm tsx src/app.ts", + "watch": { + "include": [ + "**" + ], + "exclude": [ + "README.md", + "cdk*.json", + "**/*.d.ts", + "**/*.js", + "tsconfig.json", + "package*.json", + "yarn.lock", + "node_modules", + "test" + ] + }, + "context": { + "@aws-cdk/aws-lambda:recognizeLayerVersion": true, + "@aws-cdk/core:checkSecretUsage": true, + "@aws-cdk/core:target-partitions": [ + "aws", + "aws-cn" + ], + "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true, + "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true, + "@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true, + "@aws-cdk/aws-iam:minimizePolicies": true, + "@aws-cdk/core:validateSnapshotRemovalPolicy": true, + "@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true, + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true, + "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true, + "@aws-cdk/aws-apigateway:disableCloudWatchRole": true, + "@aws-cdk/core:enablePartitionLiterals": true, + "@aws-cdk/aws-events:eventsTargetQueueSameAccount": true, + "@aws-cdk/aws-iam:standardizedServicePrincipals": true, + "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true, + "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true, + "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true, + "@aws-cdk/aws-route53-patters:useCertificate": true, + "@aws-cdk/customresources:installLatestAwsSdkDefault": false, + "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true, + "@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true, + "@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true, + "@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true, + "@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true, + "@aws-cdk/aws-redshift:columnId": true, + "@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true, + "@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true, + "@aws-cdk/aws-apigateway:requestValidatorUniqueId": true, + "@aws-cdk/aws-kms:aliasNameRef": true, + "@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true, + "@aws-cdk/core:includePrefixInUniqueNameGeneration": true, + "@aws-cdk/aws-efs:denyAnonymousAccess": true, + "@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true, + "@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": true, + "@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": true + } +} diff --git a/examples/high-security/package.json b/examples/high-security/package.json new file mode 100644 index 00000000..01709324 --- /dev/null +++ b/examples/high-security/package.json @@ -0,0 +1,22 @@ +{ + "name": "cdk-nextjs-standalone-example-high-security", + "version": "0.1.0", + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "cdk": "cdk" + }, + "devDependencies": { + "@types/node": "20.5.7", + "aws-cdk": "2.94.0", + "cdk-nag": "^2.27.135", + "esbuild": "^0.19.3", + "tsx": "^3.12.10", + "typescript": "~5.2.2" + }, + "dependencies": { + "aws-cdk-lib": "2.94.0", + "cdk-nextjs-standalone": "link:../..", + "constructs": "^10.0.0" + } +} diff --git a/examples/high-security/pnpm-lock.yaml b/examples/high-security/pnpm-lock.yaml new file mode 100644 index 00000000..52d49e21 --- /dev/null +++ b/examples/high-security/pnpm-lock.yaml @@ -0,0 +1,806 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + aws-cdk-lib: + specifier: 2.94.0 + version: 2.94.0(constructs@10.2.70) + cdk-nextjs-standalone: + specifier: link:../.. + version: link:../.. + constructs: + specifier: ^10.0.0 + version: 10.2.70 + +devDependencies: + '@types/node': + specifier: 20.5.7 + version: 20.5.7 + aws-cdk: + specifier: 2.94.0 + version: 2.94.0 + cdk-nag: + specifier: ^2.27.135 + version: 2.27.135(aws-cdk-lib@2.94.0)(constructs@10.2.70) + esbuild: + specifier: ^0.19.3 + version: 0.19.3 + tsx: + specifier: ^3.12.10 + version: 3.12.10 + typescript: + specifier: ~5.2.2 + version: 5.2.2 + +packages: + + /@aws-cdk/asset-awscli-v1@2.2.200: + resolution: {integrity: sha512-Kf5J8DfJK4wZFWT2Myca0lhwke7LwHcHBo+4TvWOGJrFVVKVuuiLCkzPPRBQQVDj0Vtn2NBokZAz8pfMpAqAKg==} + + /@aws-cdk/asset-kubectl-v20@2.1.2: + resolution: {integrity: sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg==} + + /@aws-cdk/asset-node-proxy-agent-v6@2.0.1: + resolution: {integrity: sha512-DDt4SLdLOwWCjGtltH4VCST7hpOI5DzieuhGZsBpZ+AgJdSI2GCjklCXm0GCTwJG/SolkL5dtQXyUKgg9luBDg==} + + /@balena/dockerignore@1.0.2: + resolution: {integrity: sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==} + + /@esbuild-kit/cjs-loader@2.4.4: + resolution: {integrity: sha512-NfsJX4PdzhwSkfJukczyUiZGc7zNNWZcEAyqeISpDnn0PTfzMJR1aR8xAIPskBejIxBJbIgCCMzbaYa9SXepIg==} + dependencies: + '@esbuild-kit/core-utils': 3.3.2 + get-tsconfig: 4.7.0 + dev: true + + /@esbuild-kit/core-utils@3.3.2: + resolution: {integrity: sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==} + dependencies: + esbuild: 0.18.20 + source-map-support: 0.5.21 + dev: true + + /@esbuild-kit/esm-loader@2.6.5: + resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==} + dependencies: + '@esbuild-kit/core-utils': 3.3.2 + get-tsconfig: 4.7.0 + dev: true + + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64@0.19.3: + resolution: {integrity: sha512-w+Akc0vv5leog550kjJV9Ru+MXMR2VuMrui3C61mnysim0gkFCPOUTAfzTP0qX+HpN9Syu3YA3p1hf3EPqObRw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.19.3: + resolution: {integrity: sha512-Lemgw4io4VZl9GHJmjiBGzQ7ONXRfRPHcUEerndjwiSkbxzrpq0Uggku5MxxrXdwJ+pTj1qyw4jwTu7hkPsgIA==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.19.3: + resolution: {integrity: sha512-FKQJKkK5MXcBHoNZMDNUAg1+WcZlV/cuXrWCoGF/TvdRiYS4znA0m5Il5idUwfxrE20bG/vU1Cr5e1AD6IEIjQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.19.3: + resolution: {integrity: sha512-kw7e3FXU+VsJSSSl2nMKvACYlwtvZB8RUIeVShIEY6PVnuZ3c9+L9lWB2nWeeKWNNYDdtL19foCQ0ZyUL7nqGw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.19.3: + resolution: {integrity: sha512-tPfZiwF9rO0jW6Jh9ipi58N5ZLoSjdxXeSrAYypy4psA2Yl1dAMhM71KxVfmjZhJmxRjSnb29YlRXXhh3GqzYw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.19.3: + resolution: {integrity: sha512-ERDyjOgYeKe0Vrlr1iLrqTByB026YLPzTytDTz1DRCYM+JI92Dw2dbpRHYmdqn6VBnQ9Bor6J8ZlNwdZdxjlSg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.19.3: + resolution: {integrity: sha512-nXesBZ2Ad1qL+Rm3crN7NmEVJ5uvfLFPLJev3x1j3feCQXfAhoYrojC681RhpdOph8NsvKBBwpYZHR7W0ifTTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.19.3: + resolution: {integrity: sha512-qXvYKmXj8GcJgWq3aGvxL/JG1ZM3UR272SdPU4QSTzD0eymrM7leiZH77pvY3UetCy0k1xuXZ+VPvoJNdtrsWQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.19.3: + resolution: {integrity: sha512-zr48Cg/8zkzZCzDHNxXO/89bf9e+r4HtzNUPoz4GmgAkF1gFAFmfgOdCbR8zMbzFDGb1FqBBhdXUpcTQRYS1cQ==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.19.3: + resolution: {integrity: sha512-7XlCKCA0nWcbvYpusARWkFjRQNWNGlt45S+Q18UeS///K6Aw8bB2FKYe9mhVWy/XLShvCweOLZPrnMswIaDXQA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.19.3: + resolution: {integrity: sha512-qGTgjweER5xqweiWtUIDl9OKz338EQqCwbS9c2Bh5jgEH19xQ1yhgGPNesugmDFq+UUSDtWgZ264st26b3de8A==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.19.3: + resolution: {integrity: sha512-gy1bFskwEyxVMFRNYSvBauDIWNggD6pyxUksc0MV9UOBD138dKTzr8XnM2R4mBsHwVzeuIH8X5JhmNs2Pzrx+A==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.19.3: + resolution: {integrity: sha512-UrYLFu62x1MmmIe85rpR3qou92wB9lEXluwMB/STDzPF9k8mi/9UvNsG07Tt9AqwPQXluMQ6bZbTzYt01+Ue5g==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.19.3: + resolution: {integrity: sha512-9E73TfyMCbE+1AwFOg3glnzZ5fBAFK4aawssvuMgCRqCYzE0ylVxxzjEfut8xjmKkR320BEoMui4o/t9KA96gA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.19.3: + resolution: {integrity: sha512-LlmsbuBdm1/D66TJ3HW6URY8wO6IlYHf+ChOUz8SUAjVTuaisfuwCOAgcxo3Zsu3BZGxmI7yt//yGOxV+lHcEA==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.19.3: + resolution: {integrity: sha512-ogV0+GwEmvwg/8ZbsyfkYGaLACBQWDvO0Kkh8LKBGKj9Ru8VM39zssrnu9Sxn1wbapA2qNS6BiLdwJZGouyCwQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.19.3: + resolution: {integrity: sha512-o1jLNe4uzQv2DKXMlmEzf66Wd8MoIhLNO2nlQBHLtWyh2MitDG7sMpfCO3NTcoTMuqHjfufgUQDFRI5C+xsXQw==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.19.3: + resolution: {integrity: sha512-AZJCnr5CZgZOdhouLcfRdnk9Zv6HbaBxjcyhq0StNcvAdVZJSKIdOiPB9az2zc06ywl0ePYJz60CjdKsQacp5Q==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.19.3: + resolution: {integrity: sha512-Acsujgeqg9InR4glTRvLKGZ+1HMtDm94ehTIHKhJjFpgVzZG9/pIcWW/HA/DoMfEyXmANLDuDZ2sNrWcjq1lxw==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.19.3: + resolution: {integrity: sha512-FSrAfjVVy7TifFgYgliiJOyYynhQmqgPj15pzLyJk8BUsnlWNwP/IAy6GAiB1LqtoivowRgidZsfpoYLZH586A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.19.3: + resolution: {integrity: sha512-xTScXYi12xLOWZ/sc5RBmMN99BcXp/eEf7scUC0oeiRoiT5Vvo9AycuqCp+xdpDyAU+LkrCqEpUS9fCSZF8J3Q==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.19.3: + resolution: {integrity: sha512-FbUN+0ZRXsypPyWE2IwIkVjDkDnJoMJARWOcFZn4KPPli+QnKqF0z1anvfaYe3ev5HFCpRDLLBDHyOALLppWHw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@types/node@20.5.7: + resolution: {integrity: sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==} + dev: true + + /ajv@8.12.0: + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + + /ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + /ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + + /astral-regex@2.0.0: + resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} + engines: {node: '>=8'} + + /aws-cdk-lib@2.94.0(constructs@10.2.70): + resolution: {integrity: sha512-pB/UzKeM+p/wY9WuFYkEewOFUh2r8qwaML63is4vUChXY2G2Bj3pGyfJ97Xir2Q5KIhgJPJz5igdouI4+F9A+g==} + engines: {node: '>= 14.15.0'} + peerDependencies: + constructs: ^10.0.0 + dependencies: + '@aws-cdk/asset-awscli-v1': 2.2.200 + '@aws-cdk/asset-kubectl-v20': 2.1.2 + '@aws-cdk/asset-node-proxy-agent-v6': 2.0.1 + '@balena/dockerignore': 1.0.2 + case: 1.6.3 + constructs: 10.2.70 + fs-extra: 11.1.1 + ignore: 5.2.4 + jsonschema: 1.4.1 + minimatch: 3.1.2 + punycode: 2.3.0 + semver: 7.5.4 + table: 6.8.1 + yaml: 1.10.2 + bundledDependencies: + - '@balena/dockerignore' + - case + - fs-extra + - ignore + - jsonschema + - minimatch + - punycode + - semver + - table + - yaml + + /aws-cdk@2.94.0: + resolution: {integrity: sha512-9bJkzxFDYZDwPDfZi/DSUODn4HFRzuXWPhpFgIIgRykfT18P+iAIJ1AEhaaCmlqrrog5yQgN+2iYd9BwDsiBeg==} + engines: {node: '>= 14.15.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + /brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + /buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + + /case@1.6.3: + resolution: {integrity: sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==} + engines: {node: '>= 0.8.0'} + + /cdk-nag@2.27.135(aws-cdk-lib@2.94.0)(constructs@10.2.70): + resolution: {integrity: sha512-goL5aHhZ1/kNA7zswamm3GW78wc9VXxSXM17YuL307KNcM1F3C+j7e8ohbo1BfhRc8kveh5k6bFxZs+cIIQycw==} + peerDependencies: + aws-cdk-lib: ^2.78.0 + constructs: ^10.0.5 + dependencies: + aws-cdk-lib: 2.94.0(constructs@10.2.70) + constructs: 10.2.70 + dev: true + + /color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + + /color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + /concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + /constructs@10.2.70: + resolution: {integrity: sha512-z6zr1E8K/9tzJbCQzY0UGX0/oVKPFKu9C/mzEnghCG6TAJINnvlq0CMKm63XqqeMleadZYm5T3sZGJKcxJS/Pg==} + engines: {node: '>= 16.14.0'} + + /emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + /esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /esbuild@0.19.3: + resolution: {integrity: sha512-UlJ1qUUA2jL2nNib1JTSkifQTcYTroFqRjwCFW4QYEKEsixXD5Tik9xML7zh2gTxkYTBKGHNH9y7txMwVyPbjw==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.19.3 + '@esbuild/android-arm64': 0.19.3 + '@esbuild/android-x64': 0.19.3 + '@esbuild/darwin-arm64': 0.19.3 + '@esbuild/darwin-x64': 0.19.3 + '@esbuild/freebsd-arm64': 0.19.3 + '@esbuild/freebsd-x64': 0.19.3 + '@esbuild/linux-arm': 0.19.3 + '@esbuild/linux-arm64': 0.19.3 + '@esbuild/linux-ia32': 0.19.3 + '@esbuild/linux-loong64': 0.19.3 + '@esbuild/linux-mips64el': 0.19.3 + '@esbuild/linux-ppc64': 0.19.3 + '@esbuild/linux-riscv64': 0.19.3 + '@esbuild/linux-s390x': 0.19.3 + '@esbuild/linux-x64': 0.19.3 + '@esbuild/netbsd-x64': 0.19.3 + '@esbuild/openbsd-x64': 0.19.3 + '@esbuild/sunos-x64': 0.19.3 + '@esbuild/win32-arm64': 0.19.3 + '@esbuild/win32-ia32': 0.19.3 + '@esbuild/win32-x64': 0.19.3 + dev: true + + /fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + /fs-extra@11.1.1: + resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.0 + + /fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /get-tsconfig@4.7.0: + resolution: {integrity: sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: true + + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + /ignore@5.2.4: + resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} + engines: {node: '>= 4'} + + /is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + /json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + /jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.0 + optionalDependencies: + graceful-fs: 4.2.11 + + /jsonschema@1.4.1: + resolution: {integrity: sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==} + + /lodash.truncate@4.4.2: + resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} + + /lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + + /punycode@2.3.0: + resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} + engines: {node: '>=6'} + + /require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + /resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + dev: true + + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + + /slice-ansi@4.0.0: + resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + astral-regex: 2.0.0 + is-fullwidth-code-point: 3.0.0 + + /source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + + /string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + /strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + + /table@6.8.1: + resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==} + engines: {node: '>=10.0.0'} + dependencies: + ajv: 8.12.0 + lodash.truncate: 4.4.2 + slice-ansi: 4.0.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + /tsx@3.12.10: + resolution: {integrity: sha512-2+46h4xvUt1aLDNvk5YBT8Uzw+b7BolGbn7iSMucYqCXZiDc+1IMghLVdw8kKjING32JFOeO+Am9posvjkeclA==} + hasBin: true + dependencies: + '@esbuild-kit/cjs-loader': 2.4.4 + '@esbuild-kit/core-utils': 3.3.2 + '@esbuild-kit/esm-loader': 2.6.5 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /universalify@2.0.0: + resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + engines: {node: '>= 10.0.0'} + + /uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + dependencies: + punycode: 2.3.0 + + /yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + + /yaml@1.10.2: + resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} + engines: {node: '>= 6'} diff --git a/examples/high-security/src/app.ts b/examples/high-security/src/app.ts new file mode 100644 index 00000000..fffc9793 --- /dev/null +++ b/examples/high-security/src/app.ts @@ -0,0 +1,8 @@ +#!/usr/bin/env node +import { App, Aspects } from 'aws-cdk-lib'; +import { HighSecurityStack } from './stack'; +import { AwsSolutionsChecks } from "cdk-nag" + +const app = new App(); +new HighSecurityStack(app, 'hs', { env: { region: "us-east-1" } }); +Aspects.of(app).add(new AwsSolutionsChecks({ verbose: true })); diff --git a/examples/high-security/src/stack.ts b/examples/high-security/src/stack.ts new file mode 100644 index 00000000..87caaab3 --- /dev/null +++ b/examples/high-security/src/stack.ts @@ -0,0 +1,66 @@ +import { CfnOutput, Stack, StackProps } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import { Nextjs, NextjsDistributionProps } from 'cdk-nextjs-standalone'; +import { CfnWebACL } from 'aws-cdk-lib/aws-wafv2'; +import { FunctionUrlAuthType } from 'aws-cdk-lib/aws-lambda'; +import { DistributionProps, SecurityPolicyProtocol } from 'aws-cdk-lib/aws-cloudfront'; + +export class HighSecurityStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + const webAcl = this.createWebAcl(); + + const nextjs = new Nextjs(this, 'nextjs', { + nextjsPath: '../../open-next/examples/app-router', + skipBuild: true, + defaults: { + distribution: { + functionUrlAuthType: FunctionUrlAuthType.AWS_IAM, + cdk: { + distribution: { + webAclId: webAcl.attrArn, + } as unknown as DistributionProps, + }, + } satisfies Partial, + } + }); + + new CfnOutput(this, "CloudFrontDistributionDomain", { + value: nextjs.distribution.distributionDomain, + }); + } + + private createWebAcl() { + return new CfnWebACL(this, "WebAcl", { + defaultAction: { + allow: {}, // allow if no managed rule matches + }, + scope: "CLOUDFRONT", + rules: [ + { + // Set the override action to none to leave the rule group rule actions in effect + overrideAction: { none: {} }, + name: "AWSManagedRulesCommonRuleSet", + statement: { + managedRuleGroupStatement: { + vendorName: "AWS", + name: "AWSManagedRulesCommonRuleSet", + }, + }, + priority: 10, + visibilityConfig: { + cloudWatchMetricsEnabled: false, + metricName: "AWSManagedRulesCommonRuleSetMetric", + sampledRequestsEnabled: false, + }, + } + ], + visibilityConfig: { + cloudWatchMetricsEnabled: false, + metricName: "WebACLMetrics", + sampledRequestsEnabled: false, + } + }); + } +} diff --git a/examples/high-security/tsconfig.json b/examples/high-security/tsconfig.json new file mode 100644 index 00000000..aaa7dc51 --- /dev/null +++ b/examples/high-security/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "lib": [ + "es2020", + "dom" + ], + "declaration": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": false, + "inlineSourceMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictPropertyInitialization": false, + "typeRoots": [ + "./node_modules/@types" + ] + }, + "exclude": [ + "node_modules", + "cdk.out" + ] +} diff --git a/examples/install.sh b/examples/install.sh new file mode 100644 index 00000000..ebc2f1ac --- /dev/null +++ b/examples/install.sh @@ -0,0 +1,13 @@ +git submodule init +git submodule update +cd open-next +pnpm i +pnpm --filter open-next --filter @open-next/utils build +# install twice b/c first time open-next bin fails b/c it hasn't been built yet +# but we cannot build without installing. 2nd time installing creates successful bin +cd ../../../examples/app-pages-router +pnpm i +cd ../app-router +pnpm i +cd ../pages-router +pnpm i \ No newline at end of file diff --git a/examples/pages-router/.gitignore b/examples/pages-router/.gitignore new file mode 100644 index 00000000..ff4194ab --- /dev/null +++ b/examples/pages-router/.gitignore @@ -0,0 +1,8 @@ +*.d.ts +node_modules + +# CDK asset staging directory +.cdk.staging +cdk.out + +!tsconfig.json \ No newline at end of file diff --git a/examples/pages-router/cdk.json b/examples/pages-router/cdk.json new file mode 100644 index 00000000..1b4b4ebe --- /dev/null +++ b/examples/pages-router/cdk.json @@ -0,0 +1,60 @@ +{ + "app": "pnpm tsx src/app.ts", + "watch": { + "include": [ + "**" + ], + "exclude": [ + "README.md", + "cdk*.json", + "**/*.d.ts", + "**/*.js", + "tsconfig.json", + "package*.json", + "yarn.lock", + "node_modules", + "test" + ] + }, + "context": { + "@aws-cdk/aws-lambda:recognizeLayerVersion": true, + "@aws-cdk/core:checkSecretUsage": true, + "@aws-cdk/core:target-partitions": [ + "aws", + "aws-cn" + ], + "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true, + "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true, + "@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true, + "@aws-cdk/aws-iam:minimizePolicies": true, + "@aws-cdk/core:validateSnapshotRemovalPolicy": true, + "@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true, + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true, + "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true, + "@aws-cdk/aws-apigateway:disableCloudWatchRole": true, + "@aws-cdk/core:enablePartitionLiterals": true, + "@aws-cdk/aws-events:eventsTargetQueueSameAccount": true, + "@aws-cdk/aws-iam:standardizedServicePrincipals": true, + "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true, + "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true, + "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true, + "@aws-cdk/aws-route53-patters:useCertificate": true, + "@aws-cdk/customresources:installLatestAwsSdkDefault": false, + "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true, + "@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true, + "@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true, + "@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true, + "@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true, + "@aws-cdk/aws-redshift:columnId": true, + "@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true, + "@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true, + "@aws-cdk/aws-apigateway:requestValidatorUniqueId": true, + "@aws-cdk/aws-kms:aliasNameRef": true, + "@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true, + "@aws-cdk/core:includePrefixInUniqueNameGeneration": true, + "@aws-cdk/aws-efs:denyAnonymousAccess": true, + "@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true, + "@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": true, + "@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": true + } +} diff --git a/examples/pages-router/package.json b/examples/pages-router/package.json new file mode 100644 index 00000000..38e02f28 --- /dev/null +++ b/examples/pages-router/package.json @@ -0,0 +1,21 @@ +{ + "name": "cdk-nextjs-standalone-example-app-router", + "version": "0.1.0", + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "cdk": "cdk" + }, + "devDependencies": { + "@types/node": "20.5.7", + "aws-cdk": "2.94.0", + "esbuild": "^0.19.3", + "tsx": "^3.12.10", + "typescript": "~5.2.2" + }, + "dependencies": { + "aws-cdk-lib": "2.94.0", + "cdk-nextjs-standalone": "link:../..", + "constructs": "^10.0.0" + } +} diff --git a/examples/pages-router/pnpm-lock.yaml b/examples/pages-router/pnpm-lock.yaml new file mode 100644 index 00000000..87a3094f --- /dev/null +++ b/examples/pages-router/pnpm-lock.yaml @@ -0,0 +1,623 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + aws-cdk-lib: + specifier: 2.94.0 + version: 2.94.0(constructs@10.2.70) + cdk-nextjs-standalone: + specifier: link:../.. + version: link:../.. + constructs: + specifier: ^10.0.0 + version: 10.2.70 + +devDependencies: + '@types/node': + specifier: 20.5.7 + version: 20.5.7 + aws-cdk: + specifier: 2.94.0 + version: 2.94.0 + esbuild: + specifier: ^0.19.3 + version: 0.19.3 + tsx: + specifier: ^3.12.10 + version: 3.12.10 + typescript: + specifier: ~5.2.2 + version: 5.2.2 + +packages: + + /@aws-cdk/asset-awscli-v1@2.2.200: + resolution: {integrity: sha512-Kf5J8DfJK4wZFWT2Myca0lhwke7LwHcHBo+4TvWOGJrFVVKVuuiLCkzPPRBQQVDj0Vtn2NBokZAz8pfMpAqAKg==} + dev: false + + /@aws-cdk/asset-kubectl-v20@2.1.2: + resolution: {integrity: sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg==} + dev: false + + /@aws-cdk/asset-node-proxy-agent-v6@2.0.1: + resolution: {integrity: sha512-DDt4SLdLOwWCjGtltH4VCST7hpOI5DzieuhGZsBpZ+AgJdSI2GCjklCXm0GCTwJG/SolkL5dtQXyUKgg9luBDg==} + dev: false + + /@esbuild-kit/cjs-loader@2.4.4: + resolution: {integrity: sha512-NfsJX4PdzhwSkfJukczyUiZGc7zNNWZcEAyqeISpDnn0PTfzMJR1aR8xAIPskBejIxBJbIgCCMzbaYa9SXepIg==} + dependencies: + '@esbuild-kit/core-utils': 3.3.1 + get-tsconfig: 4.7.0 + dev: true + + /@esbuild-kit/core-utils@3.3.1: + resolution: {integrity: sha512-zg2aeGLgbZ/U8AnHRD6y085BkRqlw7jOsqpI/AFaQg6FhcCRycAe+aFLibs9okVVYTMqWANDC76UVSzd3qBoOw==} + dependencies: + esbuild: 0.18.20 + source-map-support: 0.5.21 + dev: true + + /@esbuild-kit/esm-loader@2.6.4: + resolution: {integrity: sha512-xcbyhN97xFFFEdDw6IC4EuzX9Ali3aV3cj2FIYragOQpbPM4X6QA2R5qaP3h7Tr0tuyI6dmJJdMw7oBHxBSXQA==} + dependencies: + '@esbuild-kit/core-utils': 3.3.1 + get-tsconfig: 4.7.0 + dev: true + + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64@0.19.3: + resolution: {integrity: sha512-w+Akc0vv5leog550kjJV9Ru+MXMR2VuMrui3C61mnysim0gkFCPOUTAfzTP0qX+HpN9Syu3YA3p1hf3EPqObRw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.19.3: + resolution: {integrity: sha512-Lemgw4io4VZl9GHJmjiBGzQ7ONXRfRPHcUEerndjwiSkbxzrpq0Uggku5MxxrXdwJ+pTj1qyw4jwTu7hkPsgIA==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.19.3: + resolution: {integrity: sha512-FKQJKkK5MXcBHoNZMDNUAg1+WcZlV/cuXrWCoGF/TvdRiYS4znA0m5Il5idUwfxrE20bG/vU1Cr5e1AD6IEIjQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.19.3: + resolution: {integrity: sha512-kw7e3FXU+VsJSSSl2nMKvACYlwtvZB8RUIeVShIEY6PVnuZ3c9+L9lWB2nWeeKWNNYDdtL19foCQ0ZyUL7nqGw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.19.3: + resolution: {integrity: sha512-tPfZiwF9rO0jW6Jh9ipi58N5ZLoSjdxXeSrAYypy4psA2Yl1dAMhM71KxVfmjZhJmxRjSnb29YlRXXhh3GqzYw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.19.3: + resolution: {integrity: sha512-ERDyjOgYeKe0Vrlr1iLrqTByB026YLPzTytDTz1DRCYM+JI92Dw2dbpRHYmdqn6VBnQ9Bor6J8ZlNwdZdxjlSg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.19.3: + resolution: {integrity: sha512-nXesBZ2Ad1qL+Rm3crN7NmEVJ5uvfLFPLJev3x1j3feCQXfAhoYrojC681RhpdOph8NsvKBBwpYZHR7W0ifTTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.19.3: + resolution: {integrity: sha512-qXvYKmXj8GcJgWq3aGvxL/JG1ZM3UR272SdPU4QSTzD0eymrM7leiZH77pvY3UetCy0k1xuXZ+VPvoJNdtrsWQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.19.3: + resolution: {integrity: sha512-zr48Cg/8zkzZCzDHNxXO/89bf9e+r4HtzNUPoz4GmgAkF1gFAFmfgOdCbR8zMbzFDGb1FqBBhdXUpcTQRYS1cQ==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.19.3: + resolution: {integrity: sha512-7XlCKCA0nWcbvYpusARWkFjRQNWNGlt45S+Q18UeS///K6Aw8bB2FKYe9mhVWy/XLShvCweOLZPrnMswIaDXQA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.19.3: + resolution: {integrity: sha512-qGTgjweER5xqweiWtUIDl9OKz338EQqCwbS9c2Bh5jgEH19xQ1yhgGPNesugmDFq+UUSDtWgZ264st26b3de8A==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.19.3: + resolution: {integrity: sha512-gy1bFskwEyxVMFRNYSvBauDIWNggD6pyxUksc0MV9UOBD138dKTzr8XnM2R4mBsHwVzeuIH8X5JhmNs2Pzrx+A==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.19.3: + resolution: {integrity: sha512-UrYLFu62x1MmmIe85rpR3qou92wB9lEXluwMB/STDzPF9k8mi/9UvNsG07Tt9AqwPQXluMQ6bZbTzYt01+Ue5g==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.19.3: + resolution: {integrity: sha512-9E73TfyMCbE+1AwFOg3glnzZ5fBAFK4aawssvuMgCRqCYzE0ylVxxzjEfut8xjmKkR320BEoMui4o/t9KA96gA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.19.3: + resolution: {integrity: sha512-LlmsbuBdm1/D66TJ3HW6URY8wO6IlYHf+ChOUz8SUAjVTuaisfuwCOAgcxo3Zsu3BZGxmI7yt//yGOxV+lHcEA==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.19.3: + resolution: {integrity: sha512-ogV0+GwEmvwg/8ZbsyfkYGaLACBQWDvO0Kkh8LKBGKj9Ru8VM39zssrnu9Sxn1wbapA2qNS6BiLdwJZGouyCwQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.19.3: + resolution: {integrity: sha512-o1jLNe4uzQv2DKXMlmEzf66Wd8MoIhLNO2nlQBHLtWyh2MitDG7sMpfCO3NTcoTMuqHjfufgUQDFRI5C+xsXQw==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.19.3: + resolution: {integrity: sha512-AZJCnr5CZgZOdhouLcfRdnk9Zv6HbaBxjcyhq0StNcvAdVZJSKIdOiPB9az2zc06ywl0ePYJz60CjdKsQacp5Q==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.19.3: + resolution: {integrity: sha512-Acsujgeqg9InR4glTRvLKGZ+1HMtDm94ehTIHKhJjFpgVzZG9/pIcWW/HA/DoMfEyXmANLDuDZ2sNrWcjq1lxw==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.19.3: + resolution: {integrity: sha512-FSrAfjVVy7TifFgYgliiJOyYynhQmqgPj15pzLyJk8BUsnlWNwP/IAy6GAiB1LqtoivowRgidZsfpoYLZH586A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.19.3: + resolution: {integrity: sha512-xTScXYi12xLOWZ/sc5RBmMN99BcXp/eEf7scUC0oeiRoiT5Vvo9AycuqCp+xdpDyAU+LkrCqEpUS9fCSZF8J3Q==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.19.3: + resolution: {integrity: sha512-FbUN+0ZRXsypPyWE2IwIkVjDkDnJoMJARWOcFZn4KPPli+QnKqF0z1anvfaYe3ev5HFCpRDLLBDHyOALLppWHw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@types/node@20.5.7: + resolution: {integrity: sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==} + dev: true + + /aws-cdk-lib@2.94.0(constructs@10.2.70): + resolution: {integrity: sha512-pB/UzKeM+p/wY9WuFYkEewOFUh2r8qwaML63is4vUChXY2G2Bj3pGyfJ97Xir2Q5KIhgJPJz5igdouI4+F9A+g==} + engines: {node: '>= 14.15.0'} + peerDependencies: + constructs: ^10.0.0 + dependencies: + '@aws-cdk/asset-awscli-v1': 2.2.200 + '@aws-cdk/asset-kubectl-v20': 2.1.2 + '@aws-cdk/asset-node-proxy-agent-v6': 2.0.1 + constructs: 10.2.70 + dev: false + bundledDependencies: + - '@balena/dockerignore' + - case + - fs-extra + - ignore + - jsonschema + - minimatch + - punycode + - semver + - table + - yaml + + /aws-cdk@2.94.0: + resolution: {integrity: sha512-9bJkzxFDYZDwPDfZi/DSUODn4HFRzuXWPhpFgIIgRykfT18P+iAIJ1AEhaaCmlqrrog5yQgN+2iYd9BwDsiBeg==} + engines: {node: '>= 14.15.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + + /constructs@10.2.70: + resolution: {integrity: sha512-z6zr1E8K/9tzJbCQzY0UGX0/oVKPFKu9C/mzEnghCG6TAJINnvlq0CMKm63XqqeMleadZYm5T3sZGJKcxJS/Pg==} + engines: {node: '>= 16.14.0'} + dev: false + + /esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + + /esbuild@0.19.3: + resolution: {integrity: sha512-UlJ1qUUA2jL2nNib1JTSkifQTcYTroFqRjwCFW4QYEKEsixXD5Tik9xML7zh2gTxkYTBKGHNH9y7txMwVyPbjw==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.19.3 + '@esbuild/android-arm64': 0.19.3 + '@esbuild/android-x64': 0.19.3 + '@esbuild/darwin-arm64': 0.19.3 + '@esbuild/darwin-x64': 0.19.3 + '@esbuild/freebsd-arm64': 0.19.3 + '@esbuild/freebsd-x64': 0.19.3 + '@esbuild/linux-arm': 0.19.3 + '@esbuild/linux-arm64': 0.19.3 + '@esbuild/linux-ia32': 0.19.3 + '@esbuild/linux-loong64': 0.19.3 + '@esbuild/linux-mips64el': 0.19.3 + '@esbuild/linux-ppc64': 0.19.3 + '@esbuild/linux-riscv64': 0.19.3 + '@esbuild/linux-s390x': 0.19.3 + '@esbuild/linux-x64': 0.19.3 + '@esbuild/netbsd-x64': 0.19.3 + '@esbuild/openbsd-x64': 0.19.3 + '@esbuild/sunos-x64': 0.19.3 + '@esbuild/win32-arm64': 0.19.3 + '@esbuild/win32-ia32': 0.19.3 + '@esbuild/win32-x64': 0.19.3 + dev: true + + /fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /get-tsconfig@4.7.0: + resolution: {integrity: sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: true + + /resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + dev: true + + /source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + + /tsx@3.12.10: + resolution: {integrity: sha512-2+46h4xvUt1aLDNvk5YBT8Uzw+b7BolGbn7iSMucYqCXZiDc+1IMghLVdw8kKjING32JFOeO+Am9posvjkeclA==} + hasBin: true + dependencies: + '@esbuild-kit/cjs-loader': 2.4.4 + '@esbuild-kit/core-utils': 3.3.1 + '@esbuild-kit/esm-loader': 2.6.4 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + engines: {node: '>=14.17'} + hasBin: true + dev: true diff --git a/examples/pages-router/src/app.ts b/examples/pages-router/src/app.ts new file mode 100644 index 00000000..4c4a4acd --- /dev/null +++ b/examples/pages-router/src/app.ts @@ -0,0 +1,6 @@ +#!/usr/bin/env node +import * as cdk from 'aws-cdk-lib'; +import { PagesRouterStack } from './stack'; + +const app = new cdk.App(); +new PagesRouterStack(app, 'pr'); // pr = pages router diff --git a/examples/pages-router/src/stack.ts b/examples/pages-router/src/stack.ts new file mode 100644 index 00000000..72131e5b --- /dev/null +++ b/examples/pages-router/src/stack.ts @@ -0,0 +1,18 @@ +import { CfnOutput, Stack, StackProps, Token } from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import { Nextjs } from 'cdk-nextjs-standalone'; + +export class PagesRouterStack extends Stack { + constructor(scope: Construct, id: string, props?: StackProps) { + super(scope, id, props); + + const nextjs = new Nextjs(this, 'nextjs', { + nextjsPath: '../../open-next/examples/pages-router', + // skipBuild: true, + }); + + new CfnOutput(this, "CloudFrontDistributionDomain", { + value: nextjs.distribution.distributionDomain, + }); + } +} diff --git a/examples/pages-router/tsconfig.json b/examples/pages-router/tsconfig.json new file mode 100644 index 00000000..aaa7dc51 --- /dev/null +++ b/examples/pages-router/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "commonjs", + "lib": [ + "es2020", + "dom" + ], + "declaration": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": false, + "inlineSourceMap": true, + "inlineSources": true, + "experimentalDecorators": true, + "strictPropertyInitialization": false, + "typeRoots": [ + "./node_modules/@types" + ] + }, + "exclude": [ + "node_modules", + "cdk.out" + ] +} diff --git a/open-next b/open-next new file mode 160000 index 00000000..ac0a6c6b --- /dev/null +++ b/open-next @@ -0,0 +1 @@ +Subproject commit ac0a6c6b7d3686de8fad5da23f97eedc9721caf7 diff --git a/package.json b/package.json index e7c9d3fe..b8645da7 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,11 @@ "scripts": { "build": "npx projen build", "bump": "npx projen bump", + "bundle": "npx projen bundle", + "bundle:lambdas/nextjs-bucket-deployment": "npx projen bundle:lambdas/nextjs-bucket-deployment", + "bundle:lambdas/nextjs-bucket-deployment:watch": "npx projen bundle:lambdas/nextjs-bucket-deployment:watch", + "bundle:lambdas/sign-fn-url": "npx projen bundle:lambdas/sign-fn-url", + "bundle:lambdas/sign-fn-url:watch": "npx projen bundle:lambdas/sign-fn-url:watch", "clobber": "npx projen clobber", "compat": "npx projen compat", "compile": "npx projen compile", @@ -35,13 +40,21 @@ "organization": true }, "devDependencies": { + "@aws-crypto/sha256-js": "^5.0.0", + "@aws-sdk/client-s3": "^3.387.0", + "@smithy/signature-v4": "^2.0.2", + "@types/adm-zip": "^0.5.0", + "@types/aws-lambda": "^8.10.119", "@types/jest": "^27", - "@types/node": "^16", + "@types/micromatch": "^4.0.2", + "@types/mime-types": "^2.1.1", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^5", "@typescript-eslint/parser": "^5", - "aws-cdk-lib": "2.73.0", - "aws-sdk": "^2.1425.0", + "aws-cdk-lib": "2.93.0", + "aws-lambda": "^1.0.7", "constructs": "10.0.5", + "esbuild": "^0.19.2", "eslint": "^8", "eslint-config-prettier": "^8.9.0", "eslint-import-resolver-node": "^0.3.7", @@ -50,65 +63,33 @@ "eslint-plugin-prettier": "^4.2.1", "jest": "^27", "jest-junit": "^15", - "jsii": "1.x", + "jsii": "~5.0.0", "jsii-diff": "^1.85.0", - "jsii-docgen": "^7.2.9", + "jsii-docgen": "^9.1.2", "jsii-pacmak": "^1.85.0", - "jsii-rosetta": "1.x", + "jsii-rosetta": "~5.0.0", + "jszip": "^3.10.1", + "micromatch": "^4.0.5", + "mime-types": "^2.1.35", "npm-check-updates": "^16", - "open-next": "^0.9.3", "prettier": "^2.8.8", "projen": "^0.71.156", "standard-version": "^9", "ts-jest": "^27", - "typescript": "4.9.5" + "ts-node": "^10.9.1", + "typescript": "4.9.5", + "undici": "^5.23.0" }, "peerDependencies": { - "aws-cdk-lib": "^2.73.0", + "aws-cdk-lib": "^2.93.0", "constructs": "^10.0.5" }, "dependencies": { - "@aws-crypto/sha256-js": "^4.0.0", - "@aws-sdk/client-s3": "^3.379.1", - "@aws-sdk/signature-v4": "^3.370.0", - "@types/aws-lambda": "^8.10.119", - "@types/cross-spawn": "^6.0.2", - "@types/fs-extra": "^9.0.13", - "@types/micromatch": "^4.0.2", - "aws-lambda": "^1.0.7", - "cross-spawn": "^7.0.3", - "esbuild": "0.17.16", - "fs-extra": "^10.1.0", - "glob": "^8.1.0", - "indent-string": "^5.0.0", - "jszip": "^3.10.1", - "micromatch": "^4.0.5", - "node-fetch": "^3.3.2", - "serverless-http": "^3.2.0" + "esbuild": "^0.19.2" }, "bundledDependencies": [ - "@aws-crypto/sha256-js", - "@aws-sdk/client-s3", - "@aws-sdk/signature-v4", - "@types/aws-lambda", - "@types/cross-spawn", - "@types/fs-extra", - "@types/micromatch", - "aws-lambda", - "cross-spawn", - "esbuild", - "fs-extra", - "glob", - "indent-string", - "jszip", - "micromatch", - "node-fetch", - "serverless-http" + "esbuild" ], - "resolutions": { - "@types/babel__traverse": "7.18.2", - "@types/prettier": "2.6.0" - }, "keywords": [ "aws", "aws-cdk", @@ -121,13 +102,16 @@ "serverless", "standalone" ], + "engines": { + "node": ">= 18.0.0" + }, "main": "lib/index.js", "license": "Apache-2.0", "version": "0.0.0", "jest": { "testMatch": [ "/src/**/__tests__/**/*.ts?(x)", - "/(test|src|assets)/**/*(*.)@(spec|test).ts?(x)" + "/(test|src)/**/*(*.)@(spec|test).ts?(x)" ], "clearMocks": true, "collectCoverage": true, @@ -174,5 +158,5 @@ "rootDir": "src" } }, - "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." + "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." } diff --git a/src/BundleFunction.ts b/src/BundleFunction.ts deleted file mode 100644 index fa9267d3..00000000 --- a/src/BundleFunction.ts +++ /dev/null @@ -1,47 +0,0 @@ -import * as fs from 'fs'; -import * as os from 'os'; -import * as path from 'path'; -import { dirname } from 'path'; -import * as esbuild from 'esbuild'; - -interface BundleFunctionArgs { - inputPath: string; - outputFilename?: string; - outputPath?: string; - bundleOptions: esbuild.BuildOptions; -} - -export const ESM_BUNDLE_DEFAULTS: Partial = { - format: 'esm', - mainFields: ['module', 'main'], - banner: { - // https://github.com/evanw/esbuild/issues/1921 - js: `import { createRequire } from 'module'; const require = createRequire(import.meta.url);`, - }, -}; - -/** - * Compile a function handler with esbuild. - * @returns bundle directory path - */ -export function bundleFunction({ inputPath, outputPath, outputFilename, bundleOptions }: BundleFunctionArgs) { - if (!outputPath) { - if (!outputFilename) outputFilename = bundleOptions.format === 'esm' ? 'index.mjs' : 'index.js'; - const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'nextjs-bundling-')); - outputPath = path.join(tempDir, outputFilename); - } - - const esbuildResult = esbuild.buildSync({ - ...bundleOptions, - entryPoints: [inputPath], - outfile: outputPath, - }); - if (esbuildResult.errors.length > 0) { - esbuildResult.errors.forEach((error) => console.error(error)); - throw new Error('There was a problem bundling the function.'); - } - - // console.debug('Bundled ', inputPath, 'to', outputPath); - - return dirname(outputPath); -} diff --git a/src/Nextjs.ts b/src/Nextjs.ts index cc447fe7..498475de 100644 --- a/src/Nextjs.ts +++ b/src/Nextjs.ts @@ -1,24 +1,18 @@ -/* eslint-disable prettier/prettier */ +import * as fs from 'node:fs'; import * as os from 'os'; import * as path from 'path'; -import { RemovalPolicy } from 'aws-cdk-lib'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { FunctionOptions } from 'aws-cdk-lib/aws-lambda'; import * as s3 from 'aws-cdk-lib/aws-s3'; -import { BucketDeployment, Source } from 'aws-cdk-lib/aws-s3-deployment'; import { Construct } from 'constructs'; -import * as fs from 'fs-extra'; -import { CACHE_BUCKET_KEY_PREFIX } from './constants'; -import { NextJsAssetsDeployment, NextjsAssetsDeploymentProps } from './NextjsAssetsDeployment'; import { BaseSiteDomainProps, NextjsBaseProps } from './NextjsBase'; import { NextjsBuild } from './NextjsBuild'; import { NextjsDistribution, NextjsDistributionProps } from './NextjsDistribution'; import { NextjsImage } from './NextjsImage'; +import { NextjsInvalidation } from './NextjsInvalidation'; import { NextjsRevalidation } from './NextjsRevalidation'; import { NextjsServer } from './NextjsServer'; - -// contains server-side resolved environment vars in config bucket -export const CONFIG_ENV_JSON_PATH = 'next-env.json'; +import { NextjsStaticAssets, NextjsStaticAssetsProps } from './NextjsStaticAssets'; export interface NextjsDomainProps extends BaseSiteDomainProps {} @@ -30,12 +24,7 @@ export interface NextjsDefaultsProps { /** * Override static file deployment settings. */ - readonly assetDeployment?: NextjsAssetsDeploymentProps | any; - - /** - * Override cache bucket. - */ - readonly cacheBucket?: s3.IBucket | any; + readonly assetDeployment?: NextjsStaticAssetsProps | any; /** * Override server lambda function settings. @@ -60,6 +49,12 @@ export interface NextjsProps extends NextjsBaseProps { * construct. */ readonly defaults?: NextjsDefaultsProps; + /** + * Skips running Next.js build. Useful if you want to deploy `Nextjs` but + * haven't made any changes to Next.js app code. + * @default false + */ + readonly skipBuild?: boolean; } /** @@ -95,7 +90,7 @@ export class Nextjs extends Construct { /** * Asset deployment to S3. */ - public assetsDeployment: NextJsAssetsDeployment; + public staticAssets: NextjsStaticAssets; /** * CloudFront distribution. @@ -105,49 +100,41 @@ export class Nextjs extends Construct { /** * Where build-time assets for deployment are stored. */ - public tempBuildDir: string; + public get tempBuildDir(): string { + return this.props.tempBuildDir + ? path.resolve( + path.join(this.props.tempBuildDir, `nextjs-cdk-build-${this.node.id}-${this.node.addr.substring(0, 4)}`) + ) + : fs.mkdtempSync(path.join(os.tmpdir(), 'nextjs-cdk-build-')); + } /** * Revalidation handler and queue. */ public revalidation: NextjsRevalidation; - public configBucket?: s3.Bucket; public lambdaFunctionUrl!: lambda.FunctionUrl; public imageOptimizationLambdaFunctionUrl!: lambda.FunctionUrl; - protected staticAssetBucket: s3.IBucket; - constructor(scope: Construct, id: string, protected props: NextjsProps) { super(scope, id); - if (!props.quiet) console.debug('┌ Building Next.js app ▼ ...'); - - // get dir to store temp build files in - const tempBuildDir = props.tempBuildDir - ? path.resolve( - path.join(props.tempBuildDir, `nextjs-cdk-build-${this.node.id}-${this.node.addr.substring(0, 4)}`) - ) - : fs.mkdtempSync(path.join(os.tmpdir(), 'nextjs-cdk-build-')); - - this.tempBuildDir = tempBuildDir; + // build nextjs app + this.nextBuild = new NextjsBuild(this, id, { ...props, tempBuildDir: this.tempBuildDir }); - // create static asset bucket - this.staticAssetBucket = - props.defaults?.assetDeployment?.bucket ?? - new s3.Bucket(this, 'Assets', { - removalPolicy: RemovalPolicy.DESTROY, - autoDeleteObjects: true, - }); + // deploy nextjs static assets to s3 + this.staticAssets = new NextjsStaticAssets(this, 'StaticAssets', { + bucket: props.defaults?.assetDeployment?.bucket, + environment: props.environment, + nextBuild: this.nextBuild, + }); - // build nextjs app - this.nextBuild = new NextjsBuild(this, id, { ...props, tempBuildDir }); - this.serverFunction = new NextjsServer(this, 'ServerFn', { + this.serverFunction = new NextjsServer(this, 'Server', { ...props, - tempBuildDir, + tempBuildDir: this.tempBuildDir, nextBuild: this.nextBuild, lambda: props.defaults?.lambda, - staticAssetBucket: this.staticAssetBucket, + staticAssetBucket: this.staticAssets.bucket, }); // build image optimization this.imageOptimizationFunction = new NextjsImage(this, 'ImgOptFn', { @@ -164,58 +151,36 @@ export class Nextjs extends Construct { serverFunction: this.serverFunction, }); - // deploy nextjs static assets to s3 - this.assetsDeployment = new NextJsAssetsDeployment(this, 'AssetDeployment', { - ...props, - ...props.defaults?.assetDeployment, - tempBuildDir, - nextBuild: this.nextBuild, - bucket: this.staticAssetBucket, - }); - // finish static deployment BEFORE deploying new function code - // as there is some time after the new static files are uploaded but before they are rewritten - const rewriter = this.assetsDeployment.rewriter?.rewriteNode; - if (rewriter) { - this.serverFunction.lambdaFunction.node.addDependency(rewriter); - } else { - this.serverFunction.lambdaFunction.node.addDependency(...this.assetsDeployment.deployments); - } - this.distribution = new NextjsDistribution(this, 'Distribution', { ...props, ...props.defaults?.distribution, - staticAssetsBucket: this.assetsDeployment.bucket, - tempBuildDir, + staticAssetsBucket: this.staticAssets.bucket, + tempBuildDir: this.tempBuildDir, nextBuild: this.nextBuild, serverFunction: this.serverFunction.lambdaFunction, imageOptFunction: this.imageOptimizationFunction, }); - // We only want to provide the distribution options below if - // we are keep to invalidate the cache - const invalidationOptions = this.props.skipFullInvalidation - ? {} - : { - distribution: this.distribution.distribution, - distributionPaths: ['/*'], - }; - - new BucketDeployment(this, 'DeployCacheFiles', { - sources: [Source.asset(this.nextBuild.nextCacheDir)], - destinationBucket: this.staticAssetBucket, - destinationKeyPrefix: CACHE_BUCKET_KEY_PREFIX, - ...invalidationOptions, - }); - - if (!props.quiet) console.debug('└ Finished preparing NextJS app for deployment'); + if (!this.props.skipFullInvalidation) { + new NextjsInvalidation(this, 'Invalidation', { + distribution: this.distribution.distribution, + dependencies: [], // [this.staticAssets, this.serverFunction, this.imageOptimizationFunction] + }); + } } + /** + * URL of Next.js App. + */ public get url(): string { const customDomain = this.distribution.customDomainName; return customDomain ? `https://${customDomain}` : this.distribution.url; } + /** + * Convenience method to access `Nextjs.staticAssets.bucket`. + */ public get bucket(): s3.IBucket { - return this.staticAssetBucket; + return this.staticAssets.bucket; } } diff --git a/src/NextjsAssetsDeployment.ts b/src/NextjsAssetsDeployment.ts deleted file mode 100644 index 0d28ddae..00000000 --- a/src/NextjsAssetsDeployment.ts +++ /dev/null @@ -1,217 +0,0 @@ -import * as os from 'os'; -import * as path from 'path'; -import { Duration, Size } from 'aws-cdk-lib'; -import * as cloudfront from 'aws-cdk-lib/aws-cloudfront'; -import { IVpc } from 'aws-cdk-lib/aws-ec2'; -import * as s3 from 'aws-cdk-lib/aws-s3'; -import { BucketDeployment, CacheControl, Source } from 'aws-cdk-lib/aws-s3-deployment'; -import { Construct } from 'constructs'; -import * as fs from 'fs-extra'; -import * as micromatch from 'micromatch'; -import { DEFAULT_STATIC_MAX_AGE, DEFAULT_STATIC_STALE_WHILE_REVALIDATE } from './constants'; -import { NextjsBaseProps } from './NextjsBase'; -import { createArchive, NextjsBuild } from './NextjsBuild'; -import { getS3ReplaceValues, NextjsS3EnvRewriter, replaceTokenGlobs } from './NextjsS3EnvRewriter'; - -export interface NextjsAssetsCachePolicyProps { - /** - * Cache-control max-age default for S3 static assets. - * Default: 30 days. - */ - readonly staticMaxAgeDefault?: Duration; - /** - * Cache-control stale-while-revalidate default for S3 static assets. - * Default: 1 day. - */ - readonly staticStaleWhileRevalidateDefault?: Duration; -} - -export interface NextjsAssetsDeploymentProps extends NextjsBaseProps { - /** - * The `NextjsBuild` instance representing the built Nextjs application. - */ - readonly nextBuild: NextjsBuild; - - /** - * Properties for the S3 bucket containing the NextJS assets. - */ - readonly bucket: s3.IBucket; - - /** - * Distribution to invalidate when assets change. - */ - readonly distribution?: cloudfront.IDistribution; - - /** - * Override the default S3 cache policies created internally. - */ - readonly cachePolicies?: NextjsAssetsCachePolicyProps; - - /** - * Set to true to delete old assets (defaults to false). - * Recommended to only set to true if you don't need the ability to roll back deployments. - */ - readonly prune?: boolean; - - /** - * In case of useEfs, vpc is required - */ - readonly vpc?: IVpc; - - /** - * In case of useEfs, vpc is required - */ - readonly useEfs?: boolean; - - /** - * memoryLimit for lambda function which been run by BucketDeployment - */ - readonly memoryLimit?: number; - - /** - * ephemeralStorageSize for lambda function which been run by BucketDeployment - */ - readonly ephemeralStorageSize?: Size; -} - -/** - * Uploads NextJS-built static and public files to S3. - * - * Will rewrite CloudFormation references with their resolved values after uploading. - */ -export class NextJsAssetsDeployment extends Construct { - /** - * Bucket containing assets. - */ - bucket: s3.IBucket; - - /** - * Asset deployments to S3. - */ - public deployments: BucketDeployment[]; - public rewriter?: NextjsS3EnvRewriter; - - public staticTempDir: string; - - protected props: NextjsAssetsDeploymentProps; - - constructor(scope: Construct, id: string, props: NextjsAssetsDeploymentProps) { - super(scope, id); - - this.props = props; - - this.bucket = props.bucket; - this.staticTempDir = this.prepareArchiveDirectory(); - this.deployments = this.uploadS3Assets(this.staticTempDir); - - // do rewrites of unresolved CDK tokens in static files - if (this.props.environment && !this.props.isPlaceholder) { - this.rewriter = new NextjsS3EnvRewriter(this, 'NextjsS3EnvRewriter', { - ...props, - s3Bucket: this.bucket, - s3keys: this._getStaticFilesForRewrite(), - replacementConfig: { - env: getS3ReplaceValues(this.props.environment, true), - }, - debug: false, - cloudfrontDistributionId: this.props.distribution?.distributionId, - }); - // wait for s3 assets to be uploaded first before running - this.rewriter.node.addDependency(...this.deployments); - } - } - - // arrange directory structure for S3 asset deployments - // should contain _next/static and ./ for public files - protected prepareArchiveDirectory(): string { - const archiveDir = this.props.tempBuildDir - ? path.resolve(path.join(this.props.tempBuildDir, 'static')) - : fs.mkdtempSync(path.join(os.tmpdir(), 'static-')); - fs.mkdirpSync(archiveDir); - - // theoretically we could move the files instead of copy for speed... - - // path to public folder; root static assets - const staticDir = this.props.nextBuild.nextStaticDir; - - if (!this.props.isPlaceholder && fs.existsSync(staticDir)) { - // copy public+static files to root - fs.copySync(this.props.nextBuild.nextStaticDir, archiveDir, { - recursive: true, - dereference: true, - preserveTimestamps: true, - }); - } - - return archiveDir; - } - - private uploadS3Assets(archiveDir: string) { - // zip up bucket contents and upload to bucket - const archiveZipFilePath = createArchive({ - directory: archiveDir, - zipFileName: 'assets.zip', - zipOutDir: path.join(this.staticTempDir, 'assets'), - compressionLevel: this.props.compressionLevel, - quiet: this.props.quiet, - }); - if (!archiveZipFilePath) return []; - - const maxAge = this.props.cachePolicies?.staticMaxAgeDefault?.toSeconds() ?? DEFAULT_STATIC_MAX_AGE; - const staleWhileRevalidate = - this.props.cachePolicies?.staticStaleWhileRevalidateDefault?.toSeconds() ?? DEFAULT_STATIC_STALE_WHILE_REVALIDATE; - const cacheControl = CacheControl.fromString( - `public,max-age=${maxAge},stale-while-revalidate=${staleWhileRevalidate},immutable` - ); - const deployment = new BucketDeployment(this, 'NextStaticAssetsS3Deployment', { - destinationBucket: this.bucket, - cacheControl: [cacheControl], - sources: [Source.asset(archiveZipFilePath)], - distribution: this.props.distribution, - prune: this.props.prune, - useEfs: this.props.useEfs, - vpc: this.props.vpc, - memoryLimit: this.props.memoryLimit, - ephemeralStorageSize: this.props.ephemeralStorageSize, - }); - - return [deployment]; - } - - private _getStaticFilesForRewrite() { - const staticDir = this.staticTempDir; - const s3keys: string[] = []; - if (!fs.existsSync(staticDir)) { - return []; - } - listDirectory(staticDir).forEach((file) => { - const relativePath = path.relative(staticDir, file); - - // skip bogus system files - if (relativePath.endsWith('.DS_Store')) return; - - // is this file a glob match? - if (!micromatch.isMatch(relativePath, replaceTokenGlobs, { dot: true })) { - return; - } - s3keys.push(relativePath); - }); - return s3keys; - } -} - -export function listDirectory(dir: string) { - const fileList: string[] = []; - const publicFiles = fs.readdirSync(dir); - for (const filename of publicFiles) { - const filepath = path.join(dir, filename); - const stat = fs.statSync(filepath); - if (stat.isDirectory()) { - fileList.push(...listDirectory(filepath)); - } else { - fileList.push(filepath); - } - } - - return fileList; -} diff --git a/src/NextjsBase.ts b/src/NextjsBase.ts index 83def26e..d8bdaff9 100644 --- a/src/NextjsBase.ts +++ b/src/NextjsBase.ts @@ -1,9 +1,6 @@ import { ICertificate } from 'aws-cdk-lib/aws-certificatemanager'; -import { ErrorResponse } from 'aws-cdk-lib/aws-cloudfront'; import { IHostedZone } from 'aws-cdk-lib/aws-route53'; -export type CompressionLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - /** * Common props shared across NextJS-related CDK constructs. */ @@ -32,36 +29,18 @@ export interface NextjsBaseProps { */ readonly environment?: Record; - /** - * Skip building app and deploy a placeholder. - * Useful when using `next dev` for local development. - */ - readonly isPlaceholder?: boolean; - /** * Directory to store temporary build files in. * Defaults to os.tmpdir(). */ readonly tempBuildDir?: string; // move to NextjsBuildProps? - /** - * Optional value for NODE_ENV during build and runtime. - */ - readonly nodeEnv?: string; - /** * Optional value used to install NextJS node dependencies. - * It defaults to 'npx --yes open-next@2 build' + * @default 'npx --yes open-next@2 build' */ readonly buildCommand?: string; - /** - * 0 - no compression, fastest - * 9 - maximum compression, slowest - * @default 1 - */ - readonly compressionLevel?: CompressionLevel; - /** * Less build output. */ @@ -116,56 +95,3 @@ export interface BaseSiteDomainProps { */ readonly certificate?: ICertificate; } - -export interface BaseSiteReplaceProps { - readonly files: string; - readonly search: string; - readonly replace: string; -} - -export interface BaseSiteEnvironmentOutputsInfo { - readonly path: string; - readonly stack: string; - readonly environmentOutputs: { [key: string]: string }; -} - -///////////////////// -// Helper Functions -///////////////////// - -export function buildErrorResponsesForRedirectToIndex(indexPage: string): ErrorResponse[] { - return [ - { - httpStatus: 403, - responsePagePath: `/${indexPage}`, - responseHttpStatus: 200, - }, - { - httpStatus: 404, - responsePagePath: `/${indexPage}`, - responseHttpStatus: 200, - }, - { - httpStatus: 503, - responsePagePath: `/${indexPage}`, - responseHttpStatus: 200, - }, - ]; -} - -export function buildErrorResponsesFor404ErrorPage(errorPage: string): ErrorResponse[] { - return [ - { - httpStatus: 403, - responsePagePath: `/${errorPage}`, - }, - { - httpStatus: 404, - responsePagePath: `/${errorPage}`, - }, - { - httpStatus: 503, - responsePagePath: `/${errorPage}`, - }, - ]; -} diff --git a/src/NextjsBucketDeployment.ts b/src/NextjsBucketDeployment.ts new file mode 100644 index 00000000..cf57b69b --- /dev/null +++ b/src/NextjsBucketDeployment.ts @@ -0,0 +1,141 @@ +import * as path from 'node:path'; +import { CustomResource, Duration, Token } from 'aws-cdk-lib'; +import { Code, Function } from 'aws-cdk-lib/aws-lambda'; +import { IBucket } from 'aws-cdk-lib/aws-s3'; +import { Asset } from 'aws-cdk-lib/aws-s3-assets'; +import { Construct } from 'constructs'; +import { getCommonFunctionProps } from './utils/common-lambda-props'; + +export interface NextjsBucketDeploymentProps { + /** + * Source `Asset` + */ + readonly asset: Asset; + /** + * Enable verbose output of Custom Resource Lambda + * @default false + */ + readonly debug?: boolean | undefined; + /** + * If `true`, then delete files in `destinationBucket`/`destinationKeyPrefix` + * before uploading new objects + * @default true + */ + readonly prune?: boolean | undefined; + /** + * Mapping of files to PUT options for `PutObjectCommand`. Keys of + * record must be a glob pattern (uses micromatch). Values of record are options + * for PUT command for AWS SDK JS V3. See [here](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectRequest/) + * for options. If a file matches multiple globs, configuration will be + * merged. Later entries override earlier entries. + * + * `Bucket`, `Key`, and `Body` PUT options cannot be set. + */ + readonly putConfig?: Record>; + /** + * Destination S3 Bucket + */ + readonly destinationBucket: IBucket; + /** + * Destination S3 Bucket Key Prefix + */ + readonly destinationKeyPrefix?: string | undefined; + /** + * Replace placeholders in all files in `asset`. Placeholder targets are + * defined by keys of record. Values to replace placeholders with are defined + * by values of record. + */ + readonly substitutionConfig?: Record; + /** + * If `true` then files will be zipped before writing to destination bucket. + * + * Useful for Lambda functions. + * @default false + */ + readonly zip?: boolean | undefined; +} + +/** + * @internal + */ +export interface CustomResourceProperties { + destinationBucketName: string; + destinationKeyPrefix?: string; + prune?: boolean | undefined; + putConfig?: NextjsBucketDeploymentProps['putConfig']; + substitutionConfig?: NextjsBucketDeploymentProps['substitutionConfig']; + sourceBucketName: string; + sourceKeyPrefix?: string | undefined; + zip?: boolean | undefined; +} + +/** + * Similar to CDK's `BucketDeployment` construct, but with a focus on replacing + * template placeholders (i.e. environment variables) and configuring PUT + * options like cache control. + */ +export class NextjsBucketDeployment extends Construct { + /** + * Formats a string as a template value so custom resource knows to replace. + */ + static getSubstitutionValue(v: string): string { + return `{{ ${v} }}`; + } + /** + * Creates `substitutionConfig` an object by extracting unresolved tokens. + */ + static getSubstitutionConfig(env: Record): Record { + const substitutionConfig: Record = {}; + for (const [k, v] of Object.entries(env)) { + if (Token.isUnresolved(v)) { + substitutionConfig[NextjsBucketDeployment.getSubstitutionValue(k)] = v; + } + } + return substitutionConfig; + } + /** + * Lambda Function Provider for Custom Resource + */ + function: Function; + private props: NextjsBucketDeploymentProps; + + constructor(scope: Construct, id: string, props: NextjsBucketDeploymentProps) { + super(scope, id); + this.props = props; + this.function = this.createFunction(); + this.createCustomResource(this.function.functionArn); + } + + private createFunction() { + const fn = new Function(this, 'Fn', { + ...getCommonFunctionProps(this), + code: Code.fromAsset(path.resolve(__dirname, '..', 'assets', 'lambdas', 'nextjs-bucket-deployment')), + handler: 'index.handler', + timeout: Duration.minutes(5), + }); + if (this.props.debug) { + fn.addEnvironment('DEBUG', '1'); + } + this.props.asset.grantRead(fn); + this.props.destinationBucket.grantReadWrite(fn); + return fn; + } + + private createCustomResource(serviceToken: string) { + const properties: CustomResourceProperties = { + sourceBucketName: this.props.asset.s3BucketName, + sourceKeyPrefix: this.props.asset.s3ObjectKey, + destinationBucketName: this.props.destinationBucket.bucketName, + destinationKeyPrefix: this.props.destinationKeyPrefix, + putConfig: this.props.putConfig, + prune: this.props.prune, + substitutionConfig: this.props.substitutionConfig, + zip: this.props.zip, + }; + return new CustomResource(this, 'CustomResource', { + properties, + resourceType: 'Custom::NextjsBucketDeployment', + serviceToken, + }); + } +} diff --git a/src/NextjsBuild.ts b/src/NextjsBuild.ts index 55361826..fc3ec25c 100644 --- a/src/NextjsBuild.ts +++ b/src/NextjsBuild.ts @@ -1,97 +1,90 @@ +import { execSync } from 'child_process'; +import * as fs from 'fs'; import * as path from 'path'; -import { Token } from 'aws-cdk-lib'; +import { Stack, Token } from 'aws-cdk-lib'; import { Construct } from 'constructs'; -import * as spawn from 'cross-spawn'; -import * as fs from 'fs-extra'; import { NEXTJS_BUILD_DIR, NEXTJS_BUILD_IMAGE_FN_DIR, - NEXTJS_BUILD_MIDDLEWARE_FN_DIR, NEXTJS_BUILD_REVALIDATE_FN_DIR, NEXTJS_BUILD_SERVER_FN_DIR, NEXTJS_CACHE_DIR, NEXTJS_STATIC_DIR, } from './constants'; -import { listDirectory } from './NextjsAssetsDeployment'; -import { CompressionLevel, NextjsBaseProps } from './NextjsBase'; +import { NextjsBaseProps } from './NextjsBase'; +import { NextjsBucketDeployment } from './NextjsBucketDeployment'; +import { listDirectory } from './utils/list-directories'; -export interface NextjsBuildProps extends NextjsBaseProps {} +export interface NextjsBuildProps extends NextjsBaseProps { + /** + * @see `NextjsProps.skipBuild` + */ + readonly skipBuild?: boolean; +} /** - * Represents a built NextJS application. - * This construct runs `npm build` in standalone output mode inside your `nextjsPath`. - * This construct can be used by higher level constructs or used directly. + * Build Next.js app. */ export class NextjsBuild extends Construct { - // build output directories - /** - * Contains code for middleware. Not currently used. - */ - public nextMiddlewareFnDir?: string; /** * Contains server code and dependencies. */ - public nextServerFnDir: string; + public get nextServerFnDir(): string { + const dir = path.join(this.getNextBuildDir(), NEXTJS_BUILD_SERVER_FN_DIR); + this.warnIfMissing(dir); + return dir; + } /** * Contains function for processessing image requests. * Should be arm64. */ - public nextImageFnDir: string; + public get nextImageFnDir(): string { + const fnPath = path.join(this.getNextBuildDir(), NEXTJS_BUILD_IMAGE_FN_DIR); + this.warnIfMissing(fnPath); + return fnPath; + } /** * Contains function for processing items from revalidation queue. */ - public nextRevalidateFnDir: string; + public get nextRevalidateFnDir(): string { + const fnPath = path.join(this.getNextBuildDir(), NEXTJS_BUILD_REVALIDATE_FN_DIR); + this.warnIfMissing(fnPath); + return fnPath; + } /** * Static files containing client-side code. */ - public nextStaticDir: string; + public get nextStaticDir(): string { + const dir = path.join(this.getNextBuildDir(), NEXTJS_STATIC_DIR); + this.warnIfMissing(dir); + return dir; + } /** * Cache directory for generated data. */ - public nextCacheDir: string; + public get nextCacheDir(): string { + const dir = path.join(this.getNextBuildDir(), NEXTJS_CACHE_DIR); + this.warnIfMissing(dir); + return dir; + } public props: NextjsBuildProps; - // public nextDir: string; - public projectRoot: string; - constructor(scope: Construct, id: string, props: NextjsBuildProps) { super(scope, id); this.props = props; - - // validate paths - const baseOutputDir = path.resolve(this.props.nextjsPath); - if (!fs.existsSync(baseOutputDir)) throw new Error(`NextJS application not found at "${baseOutputDir}"`); - - // root of project - this.projectRoot = props.projectRoot ? path.resolve(props.projectRoot) : path.resolve(); - - // build app - this.runNpmBuild(); - - // check for output - const serverBuildDir = path.join(baseOutputDir, NEXTJS_BUILD_DIR); - if (!props.isPlaceholder && !fs.existsSync(serverBuildDir)) - throw new Error(`No server build output found at "${serverBuildDir}"`); - - // our outputs - this.nextStaticDir = this._getNextStaticDir(); - this.nextCacheDir = this._getNextCacheDir(); - this.nextImageFnDir = this._getOutputDir(NEXTJS_BUILD_IMAGE_FN_DIR); - this.nextRevalidateFnDir = this._getOutputDir(NEXTJS_BUILD_REVALIDATE_FN_DIR); - this.nextServerFnDir = this._getOutputDir(NEXTJS_BUILD_SERVER_FN_DIR); - this.nextMiddlewareFnDir = this._getOutputDir(NEXTJS_BUILD_MIDDLEWARE_FN_DIR, true); - // this.nextDir = this._getNextDir(); - } - - private runNpmBuild() { - const { nextjsPath, isPlaceholder, quiet } = this.props; - - if (isPlaceholder) { - if (!quiet) console.debug(`Skipping build for placeholder NextjsBuild at ${nextjsPath}`); - return; + this.validatePaths(); + // when `cdk deploy "NonNextjsStack" --exclusively` is run, don't run build + if (Stack.of(this).bundlingRequired && !this.props.skipBuild) { + this.build(); } + } + /** + * Validate required paths/files for NextjsBuild + */ + private validatePaths() { + const nextjsPath = this.props.nextjsPath; // validate site path exists if (!fs.existsSync(nextjsPath)) { throw new Error(`Invalid nextjsPath ${nextjsPath} - directory does not exist at "${path.resolve(nextjsPath)}"`); @@ -100,165 +93,64 @@ export class NextjsBuild extends Construct { if (!fs.existsSync(path.join(nextjsPath, 'package.json'))) { throw new Error(`No package.json found at "${nextjsPath}".`); } - const packageJson = fs.readJsonSync(path.join(nextjsPath, 'package.json')); + const packageJson = JSON.parse(fs.readFileSync(path.join(nextjsPath, 'package.json'), 'utf8')); if (!packageJson.scripts || !packageJson.scripts.build) { throw new Error(`No "build" script found within package.json in "${nextjsPath}".`); } + } - // build environment vars - const buildEnv = { - ...process.env, - ...getBuildCmdEnvironment(this.props.environment), - ...(this.props.nodeEnv ? { NODE_ENV: this.props.nodeEnv } : {}), - }; - - const buildPath = this.props.buildPath ?? nextjsPath; - const buildCommand = this.props.buildCommand ?? 'npx --yes open-next@2 build'; + private build() { + const buildPath = this.props.buildPath ?? this.props.nextjsPath; + const buildCommand = this.props.buildCommand ?? 'npx open-next@2 build'; // run build - console.debug(`├ Running "${buildCommand}" in`, buildPath); - const cmdParts = buildCommand.split(/\s+/); - const buildResult = spawn.sync(cmdParts[0], cmdParts.slice(1), { + if (!this.props.quiet) { + console.debug(`├ Running "${buildCommand}" in`, buildPath); + } + // will throw if build fails - which is desired + execSync(buildCommand, { cwd: buildPath, stdio: this.props.quiet ? 'ignore' : 'inherit', - env: buildEnv, - shell: true, + env: this.getBuildEnvVars(), }); - if (buildResult.status !== 0) { - throw new Error('The app "build" script failed.'); - } } - // getNextBuildId() { - // return fs.readFileSync(path.join(this._getNextStandaloneBuildDir(), 'BUILD_ID'), 'utf-8'); - // } - - readPublicFileList() { - const publicDir = this._getNextStaticDir(); - if (!fs.existsSync(publicDir)) return []; - return listDirectory(publicDir).map((file) => path.join('/', path.relative(publicDir, file))); - } - - // get the absolute path to the directory containing the nextjs project - // it may be the project root or a subdirectory in a monorepo setup - private _getNextDir() { - const { nextjsPath } = this.props; // path to nextjs dir inside project - const absolutePath = path.resolve(nextjsPath); // e.g. /home/me/myapp/web - if (!fs.existsSync(absolutePath)) { - throw new Error(`Could not find ${absolutePath} directory.`); + /** + * Gets environment variables for build time (when `open-next build` is called). + * Unresolved tokens are replace with placeholders like {{ TOKEN_NAME }} and + * will be resolved later in `NextjsBucketDeployment` custom resource. + */ + private getBuildEnvVars() { + const env: Record = {}; + for (const [k, v] of Object.entries(process.env)) { + if (v) { + env[k] = v; + } } - return absolutePath; - } - - // .next - private _getNextBuildDir() { - return path.join(this._getNextDir(), NEXTJS_BUILD_DIR); - } - - private _getOutputDir(subdir: string, silent = false) { - const nextDir = this._getNextBuildDir(); - const standaloneDir = path.join(nextDir, subdir); - - if (!fs.existsSync(standaloneDir) && !this.props.isPlaceholder) { - if (!silent) throw new Error(`Could not find ${standaloneDir} directory.`); + for (const [k, v] of Object.entries(this.props.environment || {})) { + // don't replace server only env vars for static assets + if (Token.isUnresolved(v) && k.startsWith('NEXT_PUBLIC_')) { + env[k] = NextjsBucketDeployment.getSubstitutionValue(k); + } else { + env[k] = v; + } } - return standaloneDir; + return env; } - // contains static files - private _getNextStaticDir() { - return path.join(this._getNextBuildDir(), NEXTJS_STATIC_DIR); - } - - // contains cache files - private _getNextCacheDir() { - return path.join(this._getNextBuildDir(), NEXTJS_CACHE_DIR); + readPublicFileList() { + if (!fs.existsSync(this.nextStaticDir)) return []; + return listDirectory(this.nextStaticDir).map((file) => path.join('/', path.relative(this.nextStaticDir, file))); } -} - -export interface CreateArchiveArgs { - readonly compressionLevel?: CompressionLevel; - readonly directory: string; - readonly zipFileName: string; - readonly zipOutDir: string; - readonly fileGlob?: string; - readonly quiet?: boolean; -} - -// zip up a directory and return path to zip file -export function createArchive({ - directory, - zipFileName, - zipOutDir, - fileGlob = '.', - compressionLevel = 1, - quiet, -}: CreateArchiveArgs): string | null { - // if directory is empty, can skip - if (!fs.existsSync(directory) || fs.readdirSync(directory).length === 0) return null; - zipOutDir = path.resolve(zipOutDir); - fs.mkdirpSync(zipOutDir); - // get output path - const zipFilePath = path.join(zipOutDir, zipFileName); - - // delete existing zip file - if (fs.existsSync(zipFilePath)) { - fs.unlinkSync(zipFilePath); + private getNextBuildDir(): string { + const dir = path.resolve(this.props.nextjsPath, NEXTJS_BUILD_DIR); + this.warnIfMissing(dir); + return dir; } - // run script to create zipfile, preserving symlinks for node_modules (e.g. pnpm structure) - let result; - const isWindows = process.platform === 'win32'; - if (isWindows) { - const psCompressionLevel = compressionLevel === 0 ? 'NoCompression' : 'Fastest'; - result = spawn.sync( - 'powershell.exe', - [ - '-NoLogo', - '-NoProfile', - '-NonInteractive', - '-Command', - `Compress-Archive -Path '${directory}\\*' -DestinationPath '${zipFilePath}' -CompressionLevel ${psCompressionLevel}`, - ], - { stdio: 'inherit' } - ); - } else { - result = spawn.sync( - 'bash', // getting ENOENT when specifying 'node' here for some reason - [ - quiet ? '-c' : '-xc', - [`cd '${directory}'`, `zip -ryq${compressionLevel} '${zipFilePath}' ${fileGlob}`].join('&&'), - ], - { stdio: 'inherit' } - ); - } - if (result.status !== 0) { - throw new Error(`There was a problem generating the package for ${zipFileName} with ${directory}: ${result.error}`); - } - // check output - if (!fs.existsSync(zipFilePath)) { - throw new Error( - `There was a problem generating the archive for ${directory}; the archive is missing in ${zipFilePath}.` - ); + private warnIfMissing(dir: string) { + if (!fs.existsSync(dir)) { + console.warn(`Warning: ${dir} does not exist.`); + } } - - return zipFilePath; -} - -export function getBuildCmdEnvironment(siteEnvironment?: { [key: string]: string }): Record { - // Generate environment placeholders to be replaced - // ie. environment => { API_URL: api.url } - // environment => API_URL="{NEXT{! API_URL !}}" - // - const buildCmdEnvironment: Record = {}; - Object.entries(siteEnvironment || {}).forEach(([key, value]) => { - buildCmdEnvironment[key] = Token.isUnresolved(value) ? makeTokenPlaceholder(key) : value; - }); - - return buildCmdEnvironment; } - -export const TOKEN_PLACEHOLDER_BEGIN = '{NEXT{! '; -export const TOKEN_PLACEHOLDER_END = ' !}}'; -export const makeTokenPlaceholder = (value: string): string => - TOKEN_PLACEHOLDER_BEGIN + value.toString() + TOKEN_PLACEHOLDER_END; diff --git a/src/NextjsDistribution.ts b/src/NextjsDistribution.ts index 1e17a7e1..cae3ee2e 100644 --- a/src/NextjsDistribution.ts +++ b/src/NextjsDistribution.ts @@ -1,7 +1,6 @@ -import * as os from 'os'; +import * as fs from 'node:fs'; import * as path from 'path'; -import { dirname } from 'path'; -import { App, Duration, Fn, RemovalPolicy } from 'aws-cdk-lib'; +import { Duration, Fn, RemovalPolicy } from 'aws-cdk-lib'; import * as acm from 'aws-cdk-lib/aws-certificatemanager'; import * as cloudfront from 'aws-cdk-lib/aws-cloudfront'; import { Distribution, ResponseHeadersPolicy } from 'aws-cdk-lib/aws-cloudfront'; @@ -14,15 +13,10 @@ import * as route53Patterns from 'aws-cdk-lib/aws-route53-patterns'; import * as route53Targets from 'aws-cdk-lib/aws-route53-targets'; import * as s3 from 'aws-cdk-lib/aws-s3'; import { Construct } from 'constructs'; -import * as fs from 'fs-extra'; -import { bundleFunction } from './BundleFunction'; import { DEFAULT_STATIC_MAX_AGE, NEXTJS_BUILD_DIR, NEXTJS_STATIC_DIR } from './constants'; -import { BaseSiteDomainProps, buildErrorResponsesForRedirectToIndex, NextjsBaseProps } from './NextjsBase'; +import { BaseSiteDomainProps, NextjsBaseProps } from './NextjsBase'; import { NextjsBuild } from './NextjsBuild'; -// contains server-side resolved environment vars in config bucket -export const CONFIG_ENV_JSON_PATH = 'next-env.json'; - export interface NextjsDomainProps extends BaseSiteDomainProps {} export type NextjsDistributionCdkOverrideProps = cloudfront.DistributionProps; @@ -191,8 +185,6 @@ export class NextjsDistribution extends Construct { */ certificate?: acm.ICertificate; - public tempBuildDir: string; - private commonBehaviorOptions: Pick = { viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS, compress: true, @@ -211,15 +203,7 @@ export class NextjsDistribution extends Construct { constructor(scope: Construct, id: string, props: NextjsDistributionProps) { super(scope, id); - // get dir to store temp build files in - this.tempBuildDir = props.tempBuildDir - ? path.resolve( - path.join(props.tempBuildDir, `nextjs-cdk-build-${this.node.id}-${this.node.addr.substring(0, 4)}`) - ) - : fs.mkdtempSync(path.join(os.tmpdir(), 'nextjs-cdk-build-')); - - // save props - this.props = { ...props, tempBuildDir: this.tempBuildDir }; + this.props = props; // Create Custom Domain this.validateCustomDomainSettings(); @@ -229,19 +213,15 @@ export class NextjsDistribution extends Construct { // Create Behaviors this.s3Origin = new origins.S3Origin(this.props.staticAssetsBucket); this.staticBehaviorOptions = this.createStaticBehaviorOptions(); - if (this.props.functionUrlAuthType === lambda.FunctionUrlAuthType.AWS_IAM) { + if (this.isFnUrlIamAuth) { this.edgeLambdas.push(this.createEdgeLambda()); } this.serverBehaviorOptions = this.createServerBehaviorOptions(); this.imageBehaviorOptions = this.createImageBehaviorOptions(); - // Create CloudFront - if (this.props.isPlaceholder) { - this.distribution = this.createCloudFrontDistributionForStub(); - } else { - this.distribution = this.createCloudFrontDistribution(); - this.addStaticBehaviorsToDistribution(); - } + // Create CloudFront Distribution + this.distribution = this.createCloudFrontDistribution(); + this.addStaticBehaviorsToDistribution(); // Connect Custom Domain to CloudFront Distribution this.createRoute53Records(); @@ -327,16 +307,28 @@ export class NextjsDistribution extends Construct { return this.props.functionUrlAuthType || lambda.FunctionUrlAuthType.NONE; } + /** + * Once CloudFront OAC is released, remove this to reduce latency. + */ private createEdgeLambda(): cloudfront.EdgeLambda { - const originRequestEdgeFn = this.buildLambdaOriginRequestEdgeFunction(); - if (this.isFnUrlIamAuth) { - originRequestEdgeFn.addToRolePolicy( - new PolicyStatement({ - actions: ['lambda:InvokeFunctionUrl'], - resources: [this.props.serverFunction.functionArn, this.props.imageOptFunction.functionArn], - }) - ); - } + const signFnUrlDir = path.resolve(__dirname, '..', 'assets', 'lambdas', 'sign-fn-url'); + const originRequestEdgeFn = new cloudfront.experimental.EdgeFunction(this, 'EdgeFn', { + runtime: Runtime.NODEJS_18_X, + handler: 'index.handler', + code: lambda.Code.fromAsset(signFnUrlDir), + currentVersionOptions: { + removalPolicy: RemovalPolicy.DESTROY, // destroy old versions + retryAttempts: 1, // async retry attempts + }, + }); + originRequestEdgeFn.currentVersion.grantInvoke(new ServicePrincipal('edgelambda.amazonaws.com')); + originRequestEdgeFn.currentVersion.grantInvoke(new ServicePrincipal('lambda.amazonaws.com')); + originRequestEdgeFn.addToRolePolicy( + new PolicyStatement({ + actions: ['lambda:InvokeFunctionUrl'], + resources: [this.props.serverFunction.functionArn, this.props.imageOptFunction.functionArn], + }) + ); const originRequestEdgeFnVersion = lambda.Version.fromVersionArn( this, 'Version', @@ -345,7 +337,7 @@ export class NextjsDistribution extends Construct { return { eventType: cloudfront.LambdaEdgeEventType.ORIGIN_REQUEST, functionVersion: originRequestEdgeFnVersion, - includeBody: this.isFnUrlIamAuth, + includeBody: true, }; } @@ -364,10 +356,28 @@ export class NextjsDistribution extends Construct { allowedMethods: cloudfront.AllowedMethods.ALLOW_ALL, originRequestPolicy, cachePolicy, - edgeLambdas: this.edgeLambdas, + edgeLambdas: this.edgeLambdas.length ? this.edgeLambdas : undefined, + functionAssociations: this.createCloudFrontFnAssociations(), }; } + /** + * If this doesn't run, then Next.js Server's `request.url` will be Lambda Function + * URL instead of domain + */ + private createCloudFrontFnAssociations() { + const cloudFrontFn = new cloudfront.Function(this, 'CloudFrontFn', { + code: cloudfront.FunctionCode.fromInline(` + function handler(event) { + var request = event.request; + request.headers["x-forwarded-host"] = request.headers.host; + return request; + } + `), + }); + return [{ eventType: cloudfront.FunctionEventType.VIEWER_REQUEST, function: cloudFrontFn }]; + } + private createImageBehaviorOptions(): cloudfront.BehaviorOptions { const imageOptFnUrl = this.props.imageOptFunction.addFunctionUrl({ authType: this.fnUrlAuthType }); const origin = new origins.HttpOrigin(Fn.parseDomainName(imageOptFnUrl.url)); @@ -406,6 +416,7 @@ export class NextjsDistribution extends Construct { const distribution = new cloudfront.Distribution(this, 'Distribution', { // defaultRootObject: "index.html", defaultRootObject: '', + minimumProtocolVersion: cloudfront.SecurityPolicyProtocol.TLS_V1_2_2021, // Override props. ...cfDistributionProps, @@ -450,20 +461,6 @@ export class NextjsDistribution extends Construct { } } - private createCloudFrontDistributionForStub(): cloudfront.Distribution { - return new cloudfront.Distribution(this, 'Distribution', { - defaultRootObject: 'index.html', - errorResponses: buildErrorResponsesForRedirectToIndex('index.html'), - domainNames: this.buildDistributionDomainNames(), - certificate: this.certificate, - defaultBehavior: { - origin: this.s3Origin, - viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS, - }, - ...this.props.cdk?.distribution, // not sure if needed - }); - } - private buildDistributionDomainNames(): string[] { const customDomain = typeof this.props.customDomain === 'string' ? this.props.customDomain : this.props.customDomain?.domainName; @@ -474,49 +471,6 @@ export class NextjsDistribution extends Construct { return customDomain ? [customDomain, ...alternateNames] : []; } - /** - * Create an edge function to handle requests to the lambda server handler origin. - * It overrides the host header in the request to be the lambda URL's host. - * It's needed because we forward all headers to the origin, but the origin is itself an - * HTTP server so it needs the host header to be the address of the lambda and not - * the distribution. - */ - private buildLambdaOriginRequestEdgeFunction() { - const app = App.of(this) as App; - - // bundle the edge function - const inputPath = path.join(__dirname, '..', 'assets', 'lambda@edge', 'LambdaOriginRequestIamAuth'); - const outputPath = path.join(this.tempBuildDir, 'lambda@edge', 'LambdaOriginRequest.js'); - bundleFunction({ - inputPath, - outputPath, - bundleOptions: { - bundle: true, - external: ['aws-sdk', 'url'], - minify: true, - target: 'node18', - platform: 'node', - }, - }); - - const fn = new cloudfront.experimental.EdgeFunction(this, 'EdgeFn', { - runtime: Runtime.NODEJS_18_X, - handler: 'LambdaOriginRequest.handler', - code: lambda.Code.fromAsset(dirname(outputPath)), - currentVersionOptions: { - removalPolicy: RemovalPolicy.DESTROY, // destroy old versions - retryAttempts: 1, // async retry attempts - }, - stackId: - `${this.props.stackPrefix ?? 'Nextjs'}-${this.props.stageName || app.stageName || 'default'}-EdgeFn-` + - this.node.addr.substring(0, 5), - }); - fn.currentVersion.grantInvoke(new ServicePrincipal('edgelambda.amazonaws.com')); - fn.currentVersion.grantInvoke(new ServicePrincipal('lambda.amazonaws.com')); - - return fn; - } - ///////////////////// // Custom Domain ///////////////////// diff --git a/src/NextjsImage.ts b/src/NextjsImage.ts index 2ed37d64..3c1de7d7 100644 --- a/src/NextjsImage.ts +++ b/src/NextjsImage.ts @@ -1,31 +1,22 @@ -/* eslint-disable prettier/prettier */ -import { Duration, PhysicalName, Stack } from 'aws-cdk-lib'; -import { Policy, PolicyStatement } from 'aws-cdk-lib/aws-iam'; -import { Architecture, Code, Function, FunctionOptions } from 'aws-cdk-lib/aws-lambda'; +import { join } from 'path'; +import { LogLevel, NodejsFunction, NodejsFunctionProps } from 'aws-cdk-lib/aws-lambda-nodejs'; import { IBucket } from 'aws-cdk-lib/aws-s3'; import { Construct } from 'constructs'; -import { LAMBDA_RUNTIME, DEFAULT_LAMBA_MEMORY } from './constants'; +import { NEXTJS_BUILD_INDEX_FILE } from './constants'; import { NextjsBaseProps } from './NextjsBase'; import type { NextjsBuild } from './NextjsBuild'; - -export type RemotePattern = { - protocol: string; - hostname: string; - port?: string; - pathname?: string; -}; +import { getCommonNodejsFunctionProps } from './utils/common-lambda-props'; +import { fixPath } from './utils/convert-path'; export interface NextjsImageProps extends NextjsBaseProps { /** * The S3 bucket holding application images. */ readonly bucket: IBucket; - /** * Override function properties. */ - readonly lambdaOptions?: FunctionOptions; - + readonly lambdaOptions?: NodejsFunctionProps; /** * The `NextjsBuild` instance representing the built Nextjs application. */ @@ -35,56 +26,37 @@ export interface NextjsImageProps extends NextjsBaseProps { /** * This lambda handles image optimization. */ -export class NextjsImage extends Function { - bucket: IBucket; - +export class NextjsImage extends NodejsFunction { constructor(scope: Construct, id: string, props: NextjsImageProps) { - const { lambdaOptions, bucket, isPlaceholder } = props; - - const code = isPlaceholder - ? Code.fromInline( - "module.exports.handler = async () => { return { statusCode: 200, body: 'cdk-nextjs placeholder site' } }" - ) - : Code.fromAsset(props.nextBuild.nextImageFnDir); + const { lambdaOptions, bucket } = props; + const nodejsFnProps = getCommonNodejsFunctionProps(scope); super(scope, id, { - // open-next image-optimization-function - // see: https://github.com/serverless-stack/open-next/blob/274d446ed7e940cfbe7ce05a21108f4c854ee37a/README.md?plain=1#L66 - code, + ...nodejsFnProps, + bundling: { + ...nodejsFnProps.bundling, + logLevel: LogLevel.SILENT, // silence error on use of `eval` in node_module + commandHooks: { + afterBundling: () => [], + beforeBundling: (_inputDir, outputDir) => [ + // copy non-bundled assets into zip. use node -e so cross-os compatible + `node -e "fs.cpSync('${fixPath(props.nextBuild.nextImageFnDir)}', '${fixPath( + outputDir + )}', { recursive: true, filter: (src) => !src.includes('/node_modules') && !src.endsWith('index.mjs') })"`, + ], + beforeInstall: () => [], + }, + }, + entry: join(props.nextBuild.nextImageFnDir, NEXTJS_BUILD_INDEX_FILE), handler: 'index.handler', - runtime: LAMBDA_RUNTIME, - architecture: Architecture.ARM_64, description: 'Next.js Image Optimization Function', - // prevents "Resolution error: Cannot use resource in a cross-environment - // fashion, the resource's physical name must be explicit set or use - // PhysicalName.GENERATE_IF_NEEDED." - functionName: Stack.of(scope).region !== 'us-east-1' ? PhysicalName.GENERATE_IF_NEEDED : undefined, ...lambdaOptions, - // defaults - memorySize: lambdaOptions?.memorySize || DEFAULT_LAMBA_MEMORY, - timeout: lambdaOptions?.timeout ?? Duration.seconds(10), environment: { BUCKET_NAME: bucket.bucketName, + ...lambdaOptions?.environment, }, }); - this.bucket = bucket; - this.addPolicy(); - } - - /** - * Adds policy statement to give GetObject permission Image Optimization lambda. - */ - private addPolicy(): void { - const policyStatement = new PolicyStatement({ - actions: ['s3:GetObject'], - resources: [this.bucket.arnForObjects('*')], - }); - - this.role?.attachInlinePolicy( - new Policy(this, 'get-image-policy', { - statements: [policyStatement], - }) - ); + bucket.grantRead(this); } } diff --git a/src/NextjsInvalidation.ts b/src/NextjsInvalidation.ts new file mode 100644 index 00000000..06edab59 --- /dev/null +++ b/src/NextjsInvalidation.ts @@ -0,0 +1,65 @@ +import { Stack } from 'aws-cdk-lib'; +import { IDistribution } from 'aws-cdk-lib/aws-cloudfront'; +import { PolicyStatement } from 'aws-cdk-lib/aws-iam'; +import { + AwsCustomResource, + AwsSdkCall, + AwsCustomResourcePolicy, + PhysicalResourceId, +} from 'aws-cdk-lib/custom-resources'; +import { Construct } from 'constructs'; + +export interface NextjsInvalidationProps { + /** + * CloudFront Distribution to invalidate + */ + readonly distribution: IDistribution; + /** + * Constructs that should complete before invalidating CloudFront Distribution. + * + * Useful for assets that must be deployed/updated before invalidating. + */ + readonly dependencies: Construct[]; +} + +export class NextjsInvalidation extends Construct { + constructor(scope: Construct, id: string, props: NextjsInvalidationProps) { + super(scope, id); + const awsSdkCall: AwsSdkCall = { + // make `physicalResourceId` change each time to invalidate CloudFront + // distribution on each change + physicalResourceId: PhysicalResourceId.of(`${props.distribution.distributionId}-${Date.now()}`), + action: 'CreateInvalidationCommand', + service: '@aws-sdk/client-cloudfront', + parameters: { + DistributionId: props.distribution.distributionId, + InvalidationBatch: { + CallerReference: new Date().toISOString(), + Paths: { + Quantity: 1, + Items: ['/*'], + }, + }, + }, + }; + const awsCustomResource = new AwsCustomResource(this, 'AwsCR', { + onCreate: awsSdkCall, + onUpdate: awsSdkCall, + policy: AwsCustomResourcePolicy.fromStatements([ + new PolicyStatement({ + actions: ['cloudfront:CreateInvalidation'], + resources: [ + Stack.of(this).formatArn({ + resource: `distribution/${props.distribution.distributionId}`, + service: 'cloudfront', + region: '', + }), + ], + }), + ]), + }); + for (const dependency of props.dependencies) { + dependency.node.addDependency(awsCustomResource); + } + } +} diff --git a/src/NextjsLayer.ts b/src/NextjsLayer.ts deleted file mode 100644 index 7d106137..00000000 --- a/src/NextjsLayer.ts +++ /dev/null @@ -1,86 +0,0 @@ -import * as path from 'path'; -import * as lambda from 'aws-cdk-lib/aws-lambda'; -import { LayerVersion } from 'aws-cdk-lib/aws-lambda'; -import { Construct } from 'constructs'; - -// jsii forbids this: -// export interface NextjsLayerProps extends Partial {} -export interface NextjsLayerProps {} - -/** - * Lambda layer for Next.js. - * Contains Sharp 0.30.0. - */ -export class NextjsLayer extends LayerVersion { - constructor(scope: Construct, id: string, props: NextjsLayerProps) { - const layerDir = path.resolve(__dirname, '../assets'); - super(scope, id, { - code: new lambda.AssetCode(path.join(layerDir, 'sharp-0.30.0.zip')), - description: 'Sharp for Lambdas', - ...props, - }); - - /////// other ways to build this layer: - // const buildDir = path.resolve( - // path.join(this.sstBuildDir, `NextjsLayer-${this.node.id}-${this.node.addr}`) - // ); - // fs.removeSync(buildDir); - // fs.mkdirSync(buildDir, { recursive: true }); - // const zipFile ="nextjs-layer.zip" - // const zipFilePath = path.join(buildDir, zipFile); - // const LAMBDA_FOLDER = 'nodejs' - // const createBundleCmdArgs = [ - // '-xc', - // [ - // `mkdir -p ${LAMBDA_FOLDER}`, - // `cd ${LAMBDA_FOLDER}`, - // `npm install \ - // --arch=x64 \ - // --platform=linux \ - // --target=16.15 \ - // --libc=glibc \ - // next sharp`, - // 'cd ..', - // `zip -qr ${zipFile} ${LAMBDA_FOLDER}` - // ].join(' && '), - // ]; - - // const buildResult = spawn.sync('bash', createBundleCmdArgs, { - // cwd: buildDir, - // stdio: "inherit", - // }); - // if (buildResult.status !== 0 || !fs.existsSync(zipFilePath)) { - // throw new Error(`Failed to create nextjs layer in ${buildDir}`); - // } - - // // hash our parameters so we know when we need t rebuild - // const bundleCommandHash = crypto.createHash('sha256'); - // bundleCommandHash.update(JSON.stringify(createBundleCmdArgs)); - - // // bundle - // const code = Code.fromAsset(zipFilePath); - - // // const code = Code.fromAsset(__dirname, { - // // // don't send all our files to docker (slow) - // // ignoreMode: IgnoreMode.GLOB, - // // exclude: ['*'], - - // // // if our bundle commands (basically our "dockerfile") changes then rebuild the image - // // assetHashType: AssetHashType.CUSTOM, - // // assetHash: bundleCommandHash.digest('hex'), - - // // bundling: { - // // image: lambda.Runtime.NODEJS_16_X.bundlingImage, - // // command: createBundleCommand, - // // }, - // // }); - - // // Build Next.js layer - // const nextjsLayer = new lambda.LayerVersion(this, "NextjsLayer", { - // code, - // compatibleRuntimes: [lambda.Runtime.NODEJS_16_X], - // description: "Next.js", - // }); - // return nextjsLayer; - } -} diff --git a/src/NextjsRevalidation.ts b/src/NextjsRevalidation.ts index b9525faa..bb7c98ed 100644 --- a/src/NextjsRevalidation.ts +++ b/src/NextjsRevalidation.ts @@ -1,13 +1,19 @@ +import { join } from 'path'; import { Duration, Stack } from 'aws-cdk-lib'; -import { Code, Function, FunctionOptions, Runtime } from 'aws-cdk-lib/aws-lambda'; +import { AnyPrincipal, Effect, PolicyStatement } from 'aws-cdk-lib/aws-iam'; +import { FunctionOptions } from 'aws-cdk-lib/aws-lambda'; import { SqsEventSource } from 'aws-cdk-lib/aws-lambda-event-sources'; +import { NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs'; import { Queue } from 'aws-cdk-lib/aws-sqs'; import { Construct } from 'constructs'; +import { NEXTJS_BUILD_INDEX_FILE } from './constants'; import { NextjsBaseProps } from './NextjsBase'; import { NextjsBuild } from './NextjsBuild'; import { NextjsServer } from './NextjsServer'; +import { getCommonNodejsFunctionProps } from './utils/common-lambda-props'; +import { fixPath } from './utils/convert-path'; -export interface RevalidationProps extends NextjsBaseProps { +export interface NextjsRevalidationProps extends NextjsBaseProps { /** * Override function properties. */ @@ -31,34 +37,70 @@ export interface RevalidationProps extends NextjsBaseProps { * */ export class NextjsRevalidation extends Construct { - constructor(scope: Construct, id: string, props: RevalidationProps) { + queue: Queue; + function: NodejsFunction; + private props: NextjsRevalidationProps; + + constructor(scope: Construct, id: string, props: NextjsRevalidationProps) { super(scope, id); + this.props = props; + + this.queue = this.createQueue(); + this.function = this.createFunction(); - const code = props.isPlaceholder - ? Code.fromInline( - "module.exports.handler = async () => { return { statusCode: 200, body: 'cdk-nextjs placeholder site' } }" - ) - : Code.fromAsset(props.nextBuild.nextRevalidateFnDir); + // allow server fn to send messages to queue + props.serverFunction.lambdaFunction?.addEnvironment('REVALIDATION_QUEUE_URL', this.queue.queueUrl); + props.serverFunction.lambdaFunction?.addEnvironment('REVALIDATION_QUEUE_REGION', Stack.of(this).region); + } - const queue = new Queue(this, 'RevalidationQueue', { + private createQueue(): Queue { + const queue = new Queue(this, 'Queue', { fifo: true, receiveMessageWaitTime: Duration.seconds(20), }); - const consumer = new Function(this, 'RevalidationFunction', { - description: 'Next.js revalidation function', - handler: 'index.handler', + // https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-least-privilege-policy.html + queue.addToResourcePolicy( + new PolicyStatement({ + sid: 'DenyUnsecureTransport', + actions: ['sqs:SendMessage', 'sqs:ReceiveMessage'], + effect: Effect.DENY, + principals: [new AnyPrincipal()], + resources: [queue.queueArn], + conditions: { + Bool: { 'aws:SecureTransport': 'false' }, + }, + }) + ); + // Allow server to send messages to the queue + queue.grantSendMessages(this.props.serverFunction.lambdaFunction); + return queue; + } + + private createFunction(): NodejsFunction { + const nodejsFnProps = getCommonNodejsFunctionProps(this); + const fn = new NodejsFunction(this, 'Fn', { + ...nodejsFnProps, + bundling: { + ...nodejsFnProps.bundling, + commandHooks: { + afterBundling: () => [], + beforeBundling: (_inputDir, outputDir) => [ + // copy non-bundled assets into zip. use node -e so cross-os compatible + `node -e "fs.cpSync('${fixPath(this.props.nextBuild.nextRevalidateFnDir)}', '${fixPath( + outputDir + )}', { recursive: true, filter: (src) => !src.endsWith('index.mjs') })"`, + ], + beforeInstall: () => [], + }, + }, // open-next revalidation-function // see: https://github.com/serverless-stack/open-next/blob/274d446ed7e940cfbe7ce05a21108f4c854ee37a/README.md?plain=1#L65 - code, - runtime: Runtime.NODEJS_18_X, + entry: join(this.props.nextBuild.nextRevalidateFnDir, NEXTJS_BUILD_INDEX_FILE), + handler: 'index.handler', + description: 'Next.js revalidation function', timeout: Duration.seconds(30), }); - consumer.addEventSource(new SqsEventSource(queue, { batchSize: 5 })); - - // Allow server to send messages to the queue - const server = props.serverFunction.lambdaFunction; - server?.addEnvironment('REVALIDATION_QUEUE_URL', queue.queueUrl); - server?.addEnvironment('REVALIDATION_QUEUE_REGION', Stack.of(this).region); - queue.grantSendMessages(server); + fn.addEventSource(new SqsEventSource(this.queue, { batchSize: 5 })); + return fn; } } diff --git a/src/NextjsS3EnvRewriter.ts b/src/NextjsS3EnvRewriter.ts deleted file mode 100644 index 488e367a..00000000 --- a/src/NextjsS3EnvRewriter.ts +++ /dev/null @@ -1,146 +0,0 @@ -import * as fs from 'fs'; -import * as os from 'os'; -import * as path from 'path'; -import { App, CustomResource, Duration, Token } from 'aws-cdk-lib'; -import * as iam from 'aws-cdk-lib/aws-iam'; -import * as lambda from 'aws-cdk-lib/aws-lambda'; -import { Runtime } from 'aws-cdk-lib/aws-lambda'; -import { Bucket, IBucket } from 'aws-cdk-lib/aws-s3'; -import * as cr from 'aws-cdk-lib/custom-resources'; -import { Construct } from 'constructs'; -import { bundleFunction } from './BundleFunction'; -import { DEFAULT_LAMBA_MEMORY } from './constants'; -import { NextjsBaseProps } from './NextjsBase'; -import { makeTokenPlaceholder } from './NextjsBuild'; - -// files to rewrite CloudFormation tokens in environment variables -export const replaceTokenGlobs = ['**/*.html', '**/*.js', '**/*.cjs', '**/*.mjs', '**/*.json']; - -export interface RewriteReplacementsConfig { - readonly env?: Record; // replace keys with values in files - readonly jsonS3Bucket?: IBucket; - readonly jsonS3Key?: string; -} -export interface RewriterParams { - readonly s3Bucket: IBucket; - readonly s3keys: string[]; // files to rewrite - readonly replacementConfig: RewriteReplacementsConfig; - readonly debug?: boolean; - readonly cloudfrontDistributionId?: string; -} - -export interface NextjsS3EnvRewriterProps extends NextjsBaseProps, RewriterParams {} - -/** - * Rewrites variables in S3 objects after a deployment happens to - * replace CloudFormation tokens with their values. - * These values are not resolved at build time because they are - * only known at deploy time. - */ -export class NextjsS3EnvRewriter extends Construct { - public rewriteNode?: Construct; - - constructor(scope: Construct, id: string, props: NextjsS3EnvRewriterProps) { - super(scope, id); - - const { s3Bucket, s3keys, replacementConfig, debug, cloudfrontDistributionId } = props; - - if (s3keys.length === 0) return; - - const app = App.of(this) as App; - - const tmpDir = props.tempBuildDir - ? path.resolve(path.join(props.tempBuildDir, 'static')) - : fs.mkdtempSync(path.join(os.tmpdir(), 'static-')); - - // create a custom resource to find and replace tokenized strings in static files - // must happen after deployment when tokens can be resolved - // compile function - const inputPath = path.resolve(__dirname, '../assets/lambda/S3EnvRewriter.ts'); - const outputPath = path.join(tmpDir, 'deployment-scripts', 'S3EnvRewriter.cjs'); - const handlerDir = bundleFunction({ - inputPath, - outputPath, - bundleOptions: { - bundle: true, - sourcemap: true, - external: ['aws-sdk'], - target: 'node16', - platform: 'node', - format: 'cjs', - }, - }); - - // rewriter lambda function - const rewriteFn = new lambda.Function(this, 'RewriteOnEventHandler', { - runtime: Runtime.NODEJS_16_X, - memorySize: DEFAULT_LAMBA_MEMORY, - timeout: Duration.minutes(5), - handler: 'S3EnvRewriter.handler', - code: lambda.Code.fromAsset(handlerDir), - initialPolicy: [ - new iam.PolicyStatement({ - actions: ['s3:GetObject', 's3:PutObject'], - resources: [s3Bucket.arnForObjects('*')], - }), - ...(cloudfrontDistributionId - ? [ - new iam.PolicyStatement({ - actions: ['cloudfront:CreateInvalidation'], - resources: [`arn:aws:cloudfront::${app.account}:distribution/${cloudfrontDistributionId}`], - }), - ] - : []), - ], - }); - // grant permission to read env var config if provided - if (replacementConfig.jsonS3Bucket && replacementConfig.jsonS3Key) { - const bucket: IBucket = - typeof replacementConfig.jsonS3Bucket === 'string' - ? Bucket.fromBucketName(this, 'EnvConfigBucket', replacementConfig.jsonS3Bucket) - : replacementConfig.jsonS3Bucket; - rewriteFn.addToRolePolicy( - new iam.PolicyStatement({ - actions: ['s3:GetObject'], - resources: [bucket.arnForObjects(replacementConfig.jsonS3Key)], - }) - ); - } - - // custom resource to run the rewriter after files are copied and we can resolve token values - const provider = new cr.Provider(this, 'RewriteStaticProvider', { - onEventHandler: rewriteFn, - }); - // params for the rewriter function - const properties = { - bucket: s3Bucket.bucketName, - s3keys, - replacementConfig: { - ...replacementConfig, - jsonS3Bucket: replacementConfig.jsonS3Bucket?.bucketName, - }, - debug, - cloudfrontDistributionId, - }; - this.rewriteNode = new CustomResource(this, 'RewriteStatic', { - serviceToken: provider.serviceToken, - properties, - }); - } -} - -// inline env vars for client and server code -// these are values to replace in built code after it's deployed to S3/lambda -export function getS3ReplaceValues(environment: Record, publicOnly: boolean): Record { - const replacements: Record = {}; - - Object.entries(environment || {}) - .filter(([, value]) => Token.isUnresolved(value)) - .filter(([key]) => !publicOnly || key.startsWith('NEXT_PUBLIC_')) // don't replace server-only env vars - .forEach(([key, value]) => { - const token = makeTokenPlaceholder(key); - replacements[token] = value.toString(); - }); - - return replacements; -} diff --git a/src/NextjsServer.ts b/src/NextjsServer.ts index 7d123505..b7915bb0 100644 --- a/src/NextjsServer.ts +++ b/src/NextjsServer.ts @@ -1,37 +1,21 @@ -import * as os from 'os'; -import * as path from 'path'; -import { Duration, PhysicalName, RemovalPolicy, Stack, Token } from 'aws-cdk-lib'; -import * as lambda from 'aws-cdk-lib/aws-lambda'; -import { Function, FunctionOptions } from 'aws-cdk-lib/aws-lambda'; +import { randomUUID } from 'node:crypto'; +import { mkdtempSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { resolve } from 'node:path'; +import { Stack } from 'aws-cdk-lib'; +import { Code, Function, FunctionOptions } from 'aws-cdk-lib/aws-lambda'; import { Bucket, IBucket } from 'aws-cdk-lib/aws-s3'; -import * as s3Assets from 'aws-cdk-lib/aws-s3-assets'; -import { BucketDeployment, Source } from 'aws-cdk-lib/aws-s3-deployment'; -import { StringParameter } from 'aws-cdk-lib/aws-ssm'; +import { Asset } from 'aws-cdk-lib/aws-s3-assets'; import { Construct } from 'constructs'; -import * as fs from 'fs-extra'; -import { LAMBDA_RUNTIME, DEFAULT_LAMBA_MEMORY, CACHE_BUCKET_KEY_PREFIX } from './constants'; -import { CONFIG_ENV_JSON_PATH } from './Nextjs'; +import { CACHE_BUCKET_KEY_PREFIX } from './constants'; import { NextjsBaseProps } from './NextjsBase'; -import { createArchive, NextjsBuild } from './NextjsBuild'; -import { getS3ReplaceValues, NextjsS3EnvRewriter } from './NextjsS3EnvRewriter'; +import { NextjsBucketDeployment } from './NextjsBucketDeployment'; +import { NextjsBuild } from './NextjsBuild'; +import { getCommonFunctionProps } from './utils/common-lambda-props'; +import { createArchive } from './utils/create-archive'; export type EnvironmentVars = Record; -function getEnvironment(props: NextjsServerProps): { [name: string]: string } { - const environmentVariables: { [name: string]: string } = { - ...props.environment, - ...props.lambda?.environment, - ...(props.nodeEnv ? { NODE_ENV: props.nodeEnv } : {}), - ...{ - CACHE_BUCKET_NAME: props.staticAssetBucket?.bucketName || '', - CACHE_BUCKET_REGION: Stack.of(props.staticAssetBucket).region, - CACHE_BUCKET_KEY_PREFIX, - }, - }; - - return environmentVariables; -} - export interface NextjsServerProps extends NextjsBaseProps { /** * Built nextJS application. @@ -56,121 +40,91 @@ export class NextjsServer extends Construct { configBucket?: Bucket; lambdaFunction: Function; + private props: NextjsServerProps; + private get environment(): Record { + return { + ...this.props.environment, + ...this.props.lambda?.environment, + CACHE_BUCKET_NAME: this.props.staticAssetBucket.bucketName, + CACHE_BUCKET_REGION: Stack.of(this.props.staticAssetBucket).region, + CACHE_BUCKET_KEY_PREFIX, + }; + } + constructor(scope: Construct, id: string, props: NextjsServerProps) { super(scope, id); - const { nextBuild, lambda: functionOptions, isPlaceholder } = props; - - // zip up build.nextServerFnDir - const zipOutDir = path.resolve( - props.tempBuildDir - ? path.resolve(path.join(props.tempBuildDir, `standalone`)) - : fs.mkdtempSync(path.join(os.tmpdir(), 'standalone-')) - ); + this.props = props; + + // must create code asset separately (typically it is implicitly created in + //`Function` construct) b/c we need to substitute unresolve env vars + const sourceAsset = this.createSourceCodeAsset(); + // source and destination assets are defined separately so that source + // assets are immutable (easier debugging). Technically we could overwrite + // source asset + const destinationAsset = this.createDestinationCodeAsset(); + const bucketDeployment = this.createBucketDeployment(sourceAsset, destinationAsset); + this.lambdaFunction = this.createFunction(destinationAsset); + // don't update lambda function until bucket deployment is complete + this.lambdaFunction.node.addDependency(bucketDeployment); + } - const zipFilePath = createArchive({ - directory: nextBuild.nextServerFnDir, - zipFileName: 'serverFn.zip', - zipOutDir, - quiet: props.quiet, + private createSourceCodeAsset() { + const archivePath = createArchive({ + directory: this.props.nextBuild.nextServerFnDir, + quiet: this.props.quiet, + zipFileName: 'server-fn.zip', }); - if (!zipFilePath) throw new Error('Failed to create archive for lambda function code'); - - // upload the lambda package to S3 - const s3asset = new s3Assets.Asset(scope, 'MainFnAsset', { path: zipFilePath }); - const code = isPlaceholder - ? lambda.Code.fromInline( - "module.exports.handler = async () => { return { statusCode: 200, body: 'SST placeholder site' } }" - ) - : lambda.Code.fromBucket(s3asset.bucket, s3asset.s3ObjectKey); - - // build the lambda function - const environment = getEnvironment(props); - const fn = new Function(scope, 'ServerHandler', { - memorySize: functionOptions?.memorySize || DEFAULT_LAMBA_MEMORY, - timeout: functionOptions?.timeout ?? Duration.seconds(10), - runtime: LAMBDA_RUNTIME, - handler: path.join('index.handler'), - code, - // prevents "Resolution error: Cannot use resource in a cross-environment - // fashion, the resource's physical name must be explicit set or use - // PhysicalName.GENERATE_IF_NEEDED." - functionName: Stack.of(this).region !== 'us-east-1' ? PhysicalName.GENERATE_IF_NEEDED : undefined, - ...functionOptions, - // `environment` needs to go after `functionOptions` b/c if - // `functionOptions.environment` is defined, it will override - // CACHE_* environment variables which are required - environment, + const asset = new Asset(this, 'SourceCodeAsset', { + path: archivePath, }); - this.lambdaFunction = fn; - - props.staticAssetBucket.grantReadWrite(fn); - - // rewrite env var placeholders in server code - const replacementParams = this._getReplacementParams(environment); - if (!isPlaceholder && Object.keys(replacementParams).length) { - // put JSON file with env var replacements in S3 - const [configBucket, configDeployment] = this.createConfigBucket(replacementParams); - this.configBucket = configBucket; - - // replace env var placeholders in the lambda package with resolved values - const rewriter = new NextjsS3EnvRewriter(this, 'LambdaCodeRewriter', { - ...props, - s3Bucket: s3asset.bucket, - s3keys: [s3asset.s3ObjectKey], - replacementConfig: { - // use json file in S3 for replacement values - // this can contain backend secrets so better to not have them in custom resource logs - jsonS3Bucket: configDeployment.deployedBucket, - jsonS3Key: CONFIG_ENV_JSON_PATH, - }, - debug: true, // enable for more verbose output from the rewriter function - }); - rewriter.node.addDependency(s3asset); - - // in order to create this dependency, the lambda function needs to be a child of the current construct - // meaning we can't inherit from Function - fn.node.addDependency(rewriter); // don't deploy lambda until rewriter is done - we are sort of 'intercepting' the deployment package - } + // new Asset() creates copy of zip into cdk.out/. This cleans up tmp folder + rmSync(archivePath, { recursive: true }); + return asset; } - private _getReplacementParams(env: Record) { - const replacements = getS3ReplaceValues(env, false); // get placeholder => replacement values - const replacementParams: EnvironmentVars = {}; // JSON file with replacements to be uploaded to S3 - Object.entries(replacements).forEach(([key, value]) => { - // is it a token? - if (typeof value === 'undefined') return; - if (!value || !Token.isUnresolved(value)) { - replacementParams[key] = value; - return; - } - - // create param - const param = new StringParameter(this, `Config('${key}')`, { - stringValue: value, - }); - - // add to env JSON - replacementParams[key] = param.stringValue; + private createDestinationCodeAsset() { + // create dummy directory to upload with random values so it's uploaded each time + // TODO: look into caching? + const assetsTmpDir = mkdtempSync(resolve(tmpdir(), 'bucket-deployment-dest-asset-')); + // this code will never run b/c we explicitly declare dependency between + // lambda function and bucket deployment. + writeFileSync(resolve(assetsTmpDir, 'index.mjs'), `export function handler() { return '${randomUUID()}' }`); + const destinationAsset = new Asset(this, 'DestinationCodeAsset', { + path: assetsTmpDir, }); - return replacementParams; + rmSync(assetsTmpDir, { recursive: true }); + return destinationAsset; } - // this can hold our resolved environment vars for the server - protected createConfigBucket(replacementParams: Record) { - // won't work until this is fixed: https://github.com/aws/aws-cdk/issues/19257 - const bucket = new Bucket(this, 'NextjsConfigBucket', { - removalPolicy: RemovalPolicy.DESTROY, - autoDeleteObjects: true, + private createBucketDeployment(sourceAsset: Asset, destinationAsset: Asset) { + const bucketDeployment = new NextjsBucketDeployment(this, 'BucketDeployment', { + asset: sourceAsset, + debug: true, + destinationBucket: destinationAsset.bucket, + destinationKeyPrefix: destinationAsset.s3ObjectKey, + prune: true, + // this.props.environment is for build time, not this.environment which is for runtime + substitutionConfig: NextjsBucketDeployment.getSubstitutionConfig(this.props.environment || {}), + zip: true, }); + return bucketDeployment; + } - // upload environment config to s3 - const deployment = new BucketDeployment(this, 'EnvJsonDeployment', { - sources: [ - // serialize as JSON to S3 object - Source.jsonData(CONFIG_ENV_JSON_PATH, replacementParams), - ], - destinationBucket: bucket, + private createFunction(asset: Asset) { + // cannot use NodejsFunction because we must wait to deploy the function + // until after the build time env vars in code zip asset are substituted + const fn = new Function(this, 'Fn', { + ...getCommonFunctionProps(this), + code: Code.fromBucket(asset.bucket, asset.s3ObjectKey), + handler: 'index.handler', + ...this.props.lambda, + // `environment` needs to go after `this.props.lambda` b/c if + // `this.props.lambda.environment` is defined, it will override + // CACHE_* environment variables which are required + environment: { ...this.environment, ...this.props.lambda?.environment }, }); - return [bucket, deployment] as const; + this.props.staticAssetBucket.grantReadWrite(fn); + + return fn; } } diff --git a/src/NextjsStaticAssets.ts b/src/NextjsStaticAssets.ts new file mode 100644 index 00000000..0e83c86f --- /dev/null +++ b/src/NextjsStaticAssets.ts @@ -0,0 +1,104 @@ +import * as fs from 'node:fs'; +import { tmpdir } from 'node:os'; +import { resolve } from 'node:path'; +import { RemovalPolicy } from 'aws-cdk-lib'; +import * as s3 from 'aws-cdk-lib/aws-s3'; +import { Asset } from 'aws-cdk-lib/aws-s3-assets'; +import { Construct } from 'constructs'; +import { NEXTJS_CACHE_DIR } from './constants'; +import { NextjsBucketDeployment } from './NextjsBucketDeployment'; +import { NextjsBuild } from './NextjsBuild'; + +export interface NextjsStaticAssetsProps { + /** + * Define your own bucket to store static assets. + */ + readonly bucket?: s3.IBucket | undefined; + /** + * The `NextjsBuild` instance representing the built Nextjs application. + */ + readonly nextBuild: NextjsBuild; + /** + * Custom environment variables to pass to the NextJS build and runtime. + */ + readonly environment?: Record; +} + +/** + * Uploads Nextjs built static and public files to S3. + * + * Will inject resolved environment variables that are unresolved at synthesis + * in CloudFormation Custom Resource. + */ +export class NextjsStaticAssets extends Construct { + /** + * Bucket containing assets. + */ + bucket: s3.IBucket; + + protected props: NextjsStaticAssetsProps; + + private get buildEnvVars() { + const buildEnvVars: Record = {}; + for (const [k, v] of Object.entries(this.props.environment || {})) { + if (k.startsWith('NEXT_PUBLIC')) { + buildEnvVars[k] = v; + } + } + return buildEnvVars; + } + + constructor(scope: Construct, id: string, props: NextjsStaticAssetsProps) { + super(scope, id); + this.props = props; + + this.bucket = this.createBucket(); + const asset = this.createAsset(); + this.createBucketDeployment(asset); + } + + private createBucket(): s3.IBucket { + return ( + this.props.bucket ?? + new s3.Bucket(this, 'Bucket', { + removalPolicy: RemovalPolicy.DESTROY, + autoDeleteObjects: true, + enforceSSL: true, + blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL, + encryption: s3.BucketEncryption.S3_MANAGED, + }) + ); + } + + private createAsset(): Asset { + // create temporary directory to join open-next's static output with cache output + const tmpAssetsDir = fs.mkdtempSync(resolve(tmpdir(), 'cdk-nextjs-assets-')); + fs.cpSync(this.props.nextBuild.nextStaticDir, tmpAssetsDir, { recursive: true }); + fs.cpSync(this.props.nextBuild.nextCacheDir, resolve(tmpAssetsDir, NEXTJS_CACHE_DIR), { recursive: true }); + const asset = new Asset(this, 'Asset', { + path: tmpAssetsDir, + }); + fs.rmSync(tmpAssetsDir, { recursive: true }); + return asset; + } + + private createBucketDeployment(asset: Asset) { + return new NextjsBucketDeployment(this, 'BucketDeployment', { + asset, + destinationBucket: this.bucket, + debug: true, + // only put env vars that are placeholders in custom resource properties + // to be replaced. other env vars were injected at build time. + substitutionConfig: NextjsBucketDeployment.getSubstitutionConfig(this.buildEnvVars), + prune: true, + putConfig: { + '**/*': { + CacheControl: 'public, max-age=0, must-revalidate', + }, + '_next/static/**/*': { + CacheControl: 'public, max-age=31536000, immutable', + }, + }, + }); + } +} diff --git a/src/constants.ts b/src/constants.ts index c7a47499..c5c0153d 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,23 +1,14 @@ import { Duration } from 'aws-cdk-lib'; -import { Runtime } from 'aws-cdk-lib/aws-lambda'; export const DEFAULT_STATIC_MAX_AGE = Duration.days(30).toSeconds(); export const DEFAULT_STATIC_STALE_WHILE_REVALIDATE = Duration.days(1).toSeconds(); -export const LAMBDA_RUNTIME = Runtime.NODEJS_18_X; - -/** - * 1536mb costs 1.5x but runs twice as fast for most scenarios. - * @see {@link https://dev.to/dashbird/4-tips-for-aws-lambda-optimization-for-production-3if1} - */ -export const DEFAULT_LAMBA_MEMORY = 1536; - export const CACHE_BUCKET_KEY_PREFIX = '_cache'; export const NEXTJS_STATIC_DIR = 'assets'; export const NEXTJS_BUILD_DIR = '.open-next'; export const NEXTJS_CACHE_DIR = 'cache'; -export const NEXTJS_BUILD_MIDDLEWARE_FN_DIR = 'middleware-function'; export const NEXTJS_BUILD_REVALIDATE_FN_DIR = 'revalidation-function'; export const NEXTJS_BUILD_IMAGE_FN_DIR = 'image-optimization-function'; export const NEXTJS_BUILD_SERVER_FN_DIR = 'server-function'; +export const NEXTJS_BUILD_INDEX_FILE = 'index.mjs'; diff --git a/src/index.ts b/src/index.ts index 16b39886..477746c1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,27 +1,12 @@ -export { - BaseSiteEnvironmentOutputsInfo, - BaseSiteReplaceProps, - BaseSiteDomainProps, - NextjsBaseProps, -} from './NextjsBase'; +export { BaseSiteDomainProps, NextjsBaseProps } from './NextjsBase'; // L2 constructs -export { - NextJsAssetsDeployment, - NextjsAssetsDeploymentProps, - NextjsAssetsCachePolicyProps, -} from './NextjsAssetsDeployment'; -export { NextjsRevalidation, RevalidationProps } from './NextjsRevalidation'; -export { NextjsBuild, NextjsBuildProps, CreateArchiveArgs } from './NextjsBuild'; +export { NextjsStaticAssets, NextjsStaticAssetsProps } from './NextjsStaticAssets'; +export { NextjsRevalidation, NextjsRevalidationProps } from './NextjsRevalidation'; +export { NextjsBuild, NextjsBuildProps } from './NextjsBuild'; export { EnvironmentVars, NextjsServer, NextjsServerProps } from './NextjsServer'; export { NextjsImage, NextjsImageProps } from './NextjsImage'; -export { - NextjsS3EnvRewriter, - NextjsS3EnvRewriterProps, - RewriterParams, - RewriteReplacementsConfig, -} from './NextjsS3EnvRewriter'; -export { NextjsLayer, NextjsLayerProps } from './NextjsLayer'; +export { NextjsBucketDeployment, NextjsBucketDeploymentProps } from './NextjsBucketDeployment'; export { NextjsDistribution, NextjsDistributionCdkProps, @@ -31,6 +16,7 @@ export { NextjsCachePolicyProps, NextjsOriginRequestPolicyProps, } from './NextjsDistribution'; +export { NextjsInvalidation, NextjsInvalidationProps } from './NextjsInvalidation'; // L3 constructs export { Nextjs, NextjsProps, NextjsDefaultsProps } from './Nextjs'; diff --git a/src/lambdas/nextjs-bucket-deployment.ts b/src/lambdas/nextjs-bucket-deployment.ts new file mode 100644 index 00000000..5e60947b --- /dev/null +++ b/src/lambdas/nextjs-bucket-deployment.ts @@ -0,0 +1,359 @@ +/* eslint-disable import/no-extraneous-dependencies */ +import { + createReadStream, + createWriteStream, + existsSync, + lstatSync, + mkdirSync, + mkdtempSync, + readdirSync, + readFileSync, + readlinkSync, + rmSync, + symlinkSync, + writeFileSync, +} from 'node:fs'; +import { tmpdir } from 'node:os'; +import { dirname, join, relative, resolve as resolvePath } from 'node:path'; +import { Readable } from 'node:stream'; +import { + DeleteObjectsCommand, + GetObjectCommand, + ListObjectsV2Command, + type ListObjectsV2CommandInput, + PutObjectCommand, + type PutObjectCommandInput, + S3Client, +} from '@aws-sdk/client-s3'; +import type { CloudFormationCustomResourceHandler } from 'aws-lambda'; +import type * as JSZipType from 'jszip'; +// @ts-ignore jsii doesn't support esModuleInterop +// eslint-disable-next-line no-duplicate-imports +import _JSZip from 'jszip'; +import * as micromatch from 'micromatch'; +import * as mime from 'mime-types'; +import type { CustomResourceProperties, NextjsBucketDeploymentProps } from '../NextjsBucketDeployment'; +const JSZip = _JSZip as JSZipType; + +const s3 = new S3Client({}); + +export const handler: CloudFormationCustomResourceHandler = async (event, context) => { + debug({ event }); + let responseStatus: 'SUCCESS' | 'FAILED' = 'SUCCESS'; + try { + if (event.RequestType === 'Create' || event.RequestType === 'Update') { + const props = getProperties(event); + let tmpDir = ''; + const { assetsTmpDir, sourceDirPath, sourceZipFilePath } = initDirectories(); + tmpDir = assetsTmpDir; + debug('Downloading zip'); + await downloadFile({ + bucket: props.sourceBucketName, + key: props.sourceKeyPrefix, + localDestinationPath: sourceZipFilePath, + }); + debug('Extracting zip'); + await extractZip({ sourceZipFilePath, destinationDirPath: sourceDirPath }); + const filePaths = listFilePaths(sourceDirPath); + if (props.substitutionConfig && Object.keys(props.substitutionConfig).length) { + console.log('Replacing environment variables: ' + JSON.stringify(props.substitutionConfig)); + substitute({ config: props.substitutionConfig, filePaths }); + } + if (props.prune) { + debug('Emptying/pruning bucket: ' + props.destinationBucketName); + await pruneBucket({ bucketName: props.destinationBucketName, keyPrefix: props.destinationKeyPrefix }); + } + if (!props.zip) { + debug('Uploading objects to: ' + props.destinationBucketName); + await uploadObjects({ + bucket: props.destinationBucketName, + keyPrefix: props.destinationKeyPrefix, + filePaths, + tmpDir: sourceDirPath, + putConfig: props.putConfig, + }); + } else { + debug('Uploading zip to: ' + props.destinationBucketName); + const zipBuffer = await zipObjects({ tmpDir: sourceDirPath }); + await uploadZip({ + zipBuffer, + bucket: props.destinationBucketName, + keyPrefix: props.destinationKeyPrefix, + }); + } + if (tmpDir.length) { + debug('Removing temp directory'); + rmSync(tmpDir, { force: true, recursive: true }); + } + responseStatus = 'SUCCESS'; + } + } catch (err) { + console.error(err); + responseStatus = 'FAILED'; + } + await cfnResponse({ event, context, responseStatus }); +}; + +function debug(value: unknown) { + if (process.env.DEBUG) console.log(JSON.stringify(value, null, 2)); +} + +function getProperties(event: Parameters[0]) { + const props = event.ResourceProperties; + return { + ...props, + prune: props.prune === 'true', + zip: props.zip === 'true', + } as CustomResourceProperties & { ServiceToken: string }; +} + +function initDirectories() { + const assetsTmpDir = mkdtempSync(resolvePath(tmpdir(), 'assets-')); + const sourceZipDirPath = resolvePath(assetsTmpDir, 'source-zip'); + mkdirSync(sourceZipDirPath); + const sourceZipFilePath = resolvePath(sourceZipDirPath, 'temp.zip'); + // trailing slash expected by adm-zip's `extractAllTo` method + const sourceDirPath = resolvePath(assetsTmpDir, 'source') + '/'; + mkdirSync(sourceDirPath); + return { assetsTmpDir, sourceZipFilePath, sourceDirPath }; +} + +async function downloadFile({ + bucket, + key, + localDestinationPath, +}: { + bucket: string; + key?: string | undefined; + localDestinationPath: string; +}) { + const data = await s3.send(new GetObjectCommand({ Bucket: bucket, Key: key })); + return new Promise(async (resolve, reject) => { + const body = data.Body; + if (body instanceof Readable) { + const writeStream = createWriteStream(localDestinationPath); + body + .pipe(writeStream) + .on('error', (err) => reject(err)) + .on('close', () => resolve(null)); + } + }); +} + +async function extractZip({ + sourceZipFilePath, + destinationDirPath, +}: { + sourceZipFilePath: string; + destinationDirPath: string; +}) { + const zipBuffer = readFileSync(sourceZipFilePath); + const archive = await JSZip.loadAsync(zipBuffer); + for (const [zipRelativePath, zipObject] of Object.entries(archive.files)) { + if (!zipObject.dir) { + const absPath = resolvePath(destinationDirPath, zipRelativePath); + const pathDirname = dirname(absPath); + if (!existsSync(pathDirname)) { + mkdirSync(pathDirname, { recursive: true }); + } + const fileContents = await zipObject.async('nodebuffer'); + let isSymLink = false; + const unixPermissions = zipObject?.unixPermissions; + if (typeof unixPermissions === 'number') { + // https://github.com/twolfson/grunt-zip/pull/52/files + // eslint-disable-next-line no-bitwise + isSymLink = (unixPermissions & 0xf000) === 0xa000; + } + if (isSymLink) { + symlinkSync(fileContents, absPath); + } else { + writeFileSync(absPath, fileContents); + } + } + } +} + +/** + * Given path of directory, returns array of all file paths within directory + */ +function listFilePaths(dirPath: string): string[] { + const filePaths: string[] = []; + const directory = readdirSync(dirPath, { withFileTypes: true }); + for (const d of directory) { + const filePath = resolvePath(dirPath, d.name); + if (d.isDirectory()) { + filePaths.push(...listFilePaths(filePath)); + } else { + filePaths.push(filePath); + } + } + return filePaths; +} + +function substitute({ filePaths, config }: { filePaths: string[]; config: Record }) { + const findRegExp = new RegExp(Object.keys(config).join('|'), 'g'); + for (const filePath of filePaths) { + if (filePath.includes('node_modules')) continue; + const fileContents = readFileSync(filePath, { encoding: 'utf8' }); + const newFileContents = fileContents.replace(findRegExp, (matched) => { + const matchedEnvVar = config[matched]; + if (matchedEnvVar) { + return matchedEnvVar; + } else { + console.warn(`Could not find matched value: ${matched} in environment object. Substituting ''`); + return ''; + } + }); + if (fileContents !== newFileContents) { + writeFileSync(filePath, newFileContents); + } + } +} + +async function pruneBucket({ bucketName, keyPrefix }: { bucketName: string; keyPrefix?: string }) { + const deleteObjectPromises: Promise[] = []; + let numObjectsDeleted = 0; + let nextToken: string | undefined = undefined; + do { + const cmd: ListObjectsV2CommandInput = { Bucket: bucketName, Prefix: keyPrefix }; + if (nextToken) { + cmd.ContinuationToken = nextToken; + } + const res = await s3.send(new ListObjectsV2Command(cmd)); + const contents = res.Contents; + nextToken = res.NextContinuationToken; + if (contents?.length) { + const objects = contents?.map((o) => ({ Key: o.Key })); + numObjectsDeleted += objects?.length; + deleteObjectPromises.push( + s3.send( + new DeleteObjectsCommand({ + Bucket: bucketName, + Delete: { Objects: objects }, + }) + ) + ); + } + } while (nextToken); + await Promise.all(deleteObjectPromises); + console.log(`Number of objects deleted for bucket ${bucketName}: ${numObjectsDeleted}`); +} + +function uploadObjects({ + bucket, + keyPrefix, + filePaths, + tmpDir, + putConfig = {}, +}: { + bucket: CustomResourceProperties['destinationBucketName']; + keyPrefix?: CustomResourceProperties['destinationKeyPrefix']; + filePaths: string[]; + tmpDir: string; + putConfig: CustomResourceProperties['putConfig']; +}) { + const putObjectInputs: PutObjectCommandInput[] = filePaths.map((path) => { + const contentType = mime.lookup(path) || undefined; + const putObjectOptions = getPutObjectOptions({ path, putConfig }); + const keyPaths: string[] = []; + if (keyPrefix) keyPaths.push(keyPrefix); + keyPaths.push(relative(tmpDir, path)); + return { + ContentType: contentType, + ...putObjectOptions, + Bucket: bucket, + // .slice(1) to remove leading slash b/c s3 will create top level / folder + Key: join(...keyPaths), + Body: createReadStream(path), + }; + }); + return Promise.all(putObjectInputs.map((input) => s3.send(new PutObjectCommand(input)))); +} + +/** + * Zips objects taking into account symlinks + * @see https://github.com/Stuk/jszip/issues/386#issuecomment-634773343 + */ +function zipObjects({ tmpDir }: { tmpDir: string }): Promise { + const zip = new JSZip(); + const filePaths = listFilePaths(tmpDir); + for (const filePath of filePaths) { + const relativePath = relative(tmpDir, filePath); + const stat = lstatSync(filePath); + if (stat.isSymbolicLink()) { + zip.file(relativePath, readlinkSync(filePath), { + dir: stat.isDirectory(), + unixPermissions: parseInt('120755', 8), + }); + } else { + zip.file(relativePath, readFileSync(filePath), { dir: stat.isDirectory(), unixPermissions: stat.mode }); + } + } + return zip.generateAsync({ + type: 'nodebuffer', + platform: 'UNIX', + compression: 'STORE', + }); +} + +async function uploadZip({ + bucket, + keyPrefix, + zipBuffer, +}: { + bucket: CustomResourceProperties['destinationBucketName']; + keyPrefix?: CustomResourceProperties['destinationKeyPrefix']; + zipBuffer: Buffer; +}) { + return s3.send( + new PutObjectCommand({ + Bucket: bucket, + Key: keyPrefix, + Body: zipBuffer, + ContentType: 'application/zip', + }) + ); +} + +function getPutObjectOptions({ + path, + putConfig = {}, +}: { + path: string; + putConfig: NextjsBucketDeploymentProps['putConfig']; +}): Partial { + let putObjectOptions: Partial = {}; + for (const [key, value] of Object.entries(putConfig)) { + if (micromatch.isMatch(path, key)) { + putObjectOptions = { ...putObjectOptions, ...value }; + } + } + return putObjectOptions; +} + +interface CfnResponseProps { + event: Parameters[0]; + context: Parameters[1]; + responseStatus: 'SUCCESS' | 'FAILED'; + responseData?: Record; + physicalResourceId?: string; +} +/** + * Inspired by: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-lambda-function-code-cfnresponsemodule.html + */ +function cfnResponse(props: CfnResponseProps) { + const body = JSON.stringify({ + Status: props.responseStatus, + Reason: 'See the details in CloudWatch Log Stream: ' + props.context.logStreamName, + PhysicalResourceId: props.physicalResourceId || props.context.logStreamName, + StackId: props.event.StackId, + RequestId: props.event.RequestId, + LogicalResourceId: props.event.LogicalResourceId, + Data: props.responseData, + }); + return fetch(props.event.ResponseURL, { + method: 'PUT', + body, + headers: { 'content-type': '', 'content-length': body.length.toString() }, + }); +} diff --git a/assets/lambda@edge/LambdaOriginRequestIamAuth.test.ts b/src/lambdas/sign-fn-url.test.ts similarity index 63% rename from assets/lambda@edge/LambdaOriginRequestIamAuth.test.ts rename to src/lambdas/sign-fn-url.test.ts index d5c96af1..9e91e03d 100644 --- a/assets/lambda@edge/LambdaOriginRequestIamAuth.test.ts +++ b/src/lambdas/sign-fn-url.test.ts @@ -1,5 +1,5 @@ import type { CloudFrontRequestEvent } from 'aws-lambda'; -import { getRegionFromLambdaUrl, signRequest } from './LambdaOriginRequestIamAuth'; +import { getRegionFromLambdaUrl, signRequest } from './sign-fn-url'; describe('LambdaOriginRequestIamAuth', () => { test('signRequest should add x-amz headers', async () => { @@ -123,82 +123,82 @@ function getFakeAwsCreds() { }; } -function getFakeImageEvent(): CloudFrontRequestEvent { - return { - Records: [ - { - cf: { - config: { - distributionDomainName: 'd6b8brjqfujeb.cloudfront.net', - distributionId: 'EHX2SDUU61T7U', - eventType: 'origin-request', - requestId: '', - }, - request: { - body: { - action: 'read-only', - data: '', - encoding: 'base64', - inputTruncated: false, - }, - clientIp: '35.148.139.0', - headers: { - accept: [ - { - key: 'Accept', - value: - 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7', - }, - ], - 'x-forwarded-for': [ - { - key: 'X-Forwarded-For', - value: '35.148.139.0', - }, - ], - 'user-agent': [ - { - key: 'User-Agent', - value: 'Amazon CloudFront', - }, - ], - via: [ - { - key: 'Via', - value: '2.0 56233ac1c78ee7b920e664cc0c7f287e.cloudfront.net (CloudFront)', - }, - ], - 'accept-encoding': [ - { - key: 'Accept-Encoding', - value: 'br,gzip', - }, - ], - host: [ - { - key: 'Host', - value: 'lqlihcxizzcsefhpfcx2rnkgnu0pzrar.lambda-url.us-east-1.on.aws', - }, - ], - }, - method: 'GET', - origin: { - custom: { - customHeaders: {}, - domainName: 'lqlihcxizzcsefhpfcx2rnkgnu0pzrar.lambda-url.us-east-1.on.aws', - keepaliveTimeout: 5, - path: '', - port: 443, - protocol: 'https', - readTimeout: 30, - sslProtocols: ['TLSv1.2'], - }, - }, - querystring: 'url=%2Fprince-akachi-LWkFHEGpleE-unsplash.jpg&w=96&q=75&badParam=bad', - uri: '/_next/image', - }, - }, - }, - ], - }; -} +// function getFakeImageEvent(): CloudFrontRequestEvent { +// return { +// Records: [ +// { +// cf: { +// config: { +// distributionDomainName: 'd6b8brjqfujeb.cloudfront.net', +// distributionId: 'EHX2SDUU61T7U', +// eventType: 'origin-request', +// requestId: '', +// }, +// request: { +// body: { +// action: 'read-only', +// data: '', +// encoding: 'base64', +// inputTruncated: false, +// }, +// clientIp: '35.148.139.0', +// headers: { +// accept: [ +// { +// key: 'Accept', +// value: +// 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7', +// }, +// ], +// 'x-forwarded-for': [ +// { +// key: 'X-Forwarded-For', +// value: '35.148.139.0', +// }, +// ], +// 'user-agent': [ +// { +// key: 'User-Agent', +// value: 'Amazon CloudFront', +// }, +// ], +// via: [ +// { +// key: 'Via', +// value: '2.0 56233ac1c78ee7b920e664cc0c7f287e.cloudfront.net (CloudFront)', +// }, +// ], +// 'accept-encoding': [ +// { +// key: 'Accept-Encoding', +// value: 'br,gzip', +// }, +// ], +// host: [ +// { +// key: 'Host', +// value: 'lqlihcxizzcsefhpfcx2rnkgnu0pzrar.lambda-url.us-east-1.on.aws', +// }, +// ], +// }, +// method: 'GET', +// origin: { +// custom: { +// customHeaders: {}, +// domainName: 'lqlihcxizzcsefhpfcx2rnkgnu0pzrar.lambda-url.us-east-1.on.aws', +// keepaliveTimeout: 5, +// path: '', +// port: 443, +// protocol: 'https', +// readTimeout: 30, +// sslProtocols: ['TLSv1.2'], +// }, +// }, +// querystring: 'url=%2Fprince-akachi-LWkFHEGpleE-unsplash.jpg&w=96&q=75&badParam=bad', +// uri: '/_next/image', +// }, +// }, +// }, +// ], +// }; +// } diff --git a/assets/lambda@edge/LambdaOriginRequestIamAuth.ts b/src/lambdas/sign-fn-url.ts similarity index 97% rename from assets/lambda@edge/LambdaOriginRequestIamAuth.ts rename to src/lambdas/sign-fn-url.ts index 0d825dcb..f3999a51 100644 --- a/assets/lambda@edge/LambdaOriginRequestIamAuth.ts +++ b/src/lambdas/sign-fn-url.ts @@ -1,6 +1,6 @@ -import qs, { escape } from 'node:querystring'; +/* eslint-disable import/no-extraneous-dependencies */ import { Sha256 } from '@aws-crypto/sha256-js'; -import { SignatureV4 } from '@aws-sdk/signature-v4'; +import { SignatureV4 } from '@smithy/signature-v4'; import type { CloudFrontHeaders, CloudFrontRequest, CloudFrontRequestHandler } from 'aws-lambda'; const debug = false; diff --git a/src/types.d.ts b/src/types.d.ts new file mode 100644 index 00000000..c77383ef --- /dev/null +++ b/src/types.d.ts @@ -0,0 +1,22 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import type * as undici_types from 'undici'; + +declare global { + export const { fetch, FormData, Headers, Request, Response }: typeof import('undici'); + + type FormData = undici_types.FormData; + type Headers = undici_types.Headers; + type HeadersInit = undici_types.HeadersInit; + type BodyInit = undici_types.BodyInit; + type Request = undici_types.Request; + type RequestInit = undici_types.RequestInit; + type RequestInfo = undici_types.RequestInfo; + type RequestMode = undici_types.RequestMode; + type RequestRedirect = undici_types.RequestRedirect; + type RequestCredentials = undici_types.RequestCredentials; + type RequestDestination = undici_types.RequestDestination; + type ReferrerPolicy = undici_types.ReferrerPolicy; + type Response = undici_types.Response; + type ResponseInit = undici_types.ResponseInit; + type ResponseType = undici_types.ResponseType; +} diff --git a/src/utils/common-build-options.ts b/src/utils/common-build-options.ts new file mode 100644 index 00000000..45516bb1 --- /dev/null +++ b/src/utils/common-build-options.ts @@ -0,0 +1,12 @@ +/* eslint-disable import/no-extraneous-dependencies */ +import { BuildOptions } from 'esbuild'; + +export const commonBundlingOptions = { + bundle: true, + external: ['@aws-sdk/*'], + // format: 'esm', + minify: true, + platform: 'node', + sourcemap: true, + target: 'node18', +} satisfies BuildOptions; diff --git a/src/utils/common-lambda-props.ts b/src/utils/common-lambda-props.ts new file mode 100644 index 00000000..f24d3d9b --- /dev/null +++ b/src/utils/common-lambda-props.ts @@ -0,0 +1,34 @@ +import { Duration, PhysicalName, Stack } from 'aws-cdk-lib'; +import { Architecture, FunctionProps, Runtime } from 'aws-cdk-lib/aws-lambda'; +import { NodejsFunctionProps, OutputFormat } from 'aws-cdk-lib/aws-lambda-nodejs'; +import { Construct } from 'constructs'; +import { commonBundlingOptions } from './common-build-options'; + +export function getCommonFunctionProps(scope: Construct): Omit { + return { + architecture: Architecture.ARM_64, + /** + * 1536mb costs 1.5x but runs twice as fast for most scenarios. + * @see {@link https://dev.to/dashbird/4-tips-for-aws-lambda-optimization-for-production-3if1} + */ + memorySize: 1536, + runtime: Runtime.NODEJS_18_X, + timeout: Duration.seconds(10), + // prevents "Resolution error: Cannot use resource in a cross-environment + // fashion, the resource's physical name must be explicit set or use + // PhysicalName.GENERATE_IF_NEEDED." + functionName: Stack.of(scope).region !== 'us-east-1' ? PhysicalName.GENERATE_IF_NEEDED : undefined, + }; +} + +export function getCommonNodejsFunctionProps(scope: Construct): NodejsFunctionProps { + return { + ...getCommonFunctionProps(scope), + bundling: { + ...commonBundlingOptions, + // https://github.com/evanw/esbuild/issues/1921 + banner: `import { createRequire } from 'module'; const require = createRequire(import.meta.url);`, + format: OutputFormat.ESM, + }, + }; +} diff --git a/src/utils/convert-path.ts b/src/utils/convert-path.ts new file mode 100644 index 00000000..a4162ab3 --- /dev/null +++ b/src/utils/convert-path.ts @@ -0,0 +1,6 @@ +/** + * Fixes windows paths. Does not alter unix paths. + */ +export function fixPath(path: string) { + return path.replace(/\/\//g, '/'); +} diff --git a/src/utils/create-archive.ts b/src/utils/create-archive.ts new file mode 100644 index 00000000..4f6ae378 --- /dev/null +++ b/src/utils/create-archive.ts @@ -0,0 +1,49 @@ +import { execSync } from 'node:child_process'; +import * as fs from 'node:fs'; +import * as os from 'node:os'; +import * as path from 'node:path'; + +export interface CreateArchiveArgs { + readonly directory: string; + readonly zipFileName: string; + readonly fileGlob?: string; + readonly quiet?: boolean; +} + +/** + * Zip up a directory and return path to zip file + * + * Cannot rely on native CDK zipping b/c it disregards symlinks which is necessary + * for PNPM monorepos. See more here: https://github.com/aws/aws-cdk/issues/9251 + */ +export function createArchive({ directory, zipFileName, fileGlob = '.', quiet }: CreateArchiveArgs): string { + const zipOutDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cdk-nextjs-archive-')); + const zipFilePath = path.join(zipOutDir, zipFileName); + + // delete existing zip file + if (fs.existsSync(zipFilePath)) { + fs.unlinkSync(zipFilePath); + } + + // run script to create zipfile, preserving symlinks for node_modules (e.g. pnpm structure) + const isWindows = process.platform === 'win32'; + if (isWindows) { + // TODO: test on windows + execSync(`Compress-Archive -Path '${directory}\\*' -DestinationPath '${zipFilePath}' -CompressionLevel Optimal`, { + stdio: 'inherit', + }); + } else { + execSync(`zip -ryq9 '${zipFilePath}' ${fileGlob}`, { + stdio: quiet ? 'ignore' : 'inherit', + cwd: directory, + }); + } + // check output + if (!fs.existsSync(zipFilePath)) { + throw new Error( + `There was a problem generating the archive for ${directory}; the archive is missing in ${zipFilePath}.` + ); + } + + return zipFilePath; +} diff --git a/src/utils/list-directories.ts b/src/utils/list-directories.ts new file mode 100644 index 00000000..793dcbc2 --- /dev/null +++ b/src/utils/list-directories.ts @@ -0,0 +1,20 @@ +import { readdirSync, statSync } from 'node:fs'; +import { join } from 'node:path'; + +/** + * List files in directory, recursively. + */ +export function listDirectory(dir: string) { + const fileList: string[] = []; + const publicFiles = readdirSync(dir); + for (const filename of publicFiles) { + const filepath = join(dir, filename); + const stat = statSync(filepath); + if (stat.isDirectory()) { + fileList.push(...listDirectory(filepath)); + } else { + fileList.push(filepath); + } + } + return fileList; +} diff --git a/tsconfig.dev.json b/tsconfig.dev.json index 3363a79e..47ddbde7 100644 --- a/tsconfig.dev.json +++ b/tsconfig.dev.json @@ -1,4 +1,4 @@ -// ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". +// ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". { "compilerOptions": { "alwaysStrict": true, @@ -16,20 +16,22 @@ "noImplicitAny": true, "noImplicitReturns": true, "noImplicitThis": true, - "noUnusedLocals": false, + "noUnusedLocals": true, "noUnusedParameters": true, "resolveJsonModule": true, "strict": true, "strictNullChecks": true, "strictPropertyInitialization": true, "stripInternal": true, - "target": "ES2019" + "target": "ES2019", + "skipLibCheck": true }, "include": [ ".projenrc.js", "src/**/*.ts", "test/**/*.ts", - "assets/**/*.ts" + ".projenrc.ts", + "projenrc/**/*.ts" ], "exclude": [ "node_modules" diff --git a/yarn.lock b/yarn.lock index 94d651bb..4d3684d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,20 +15,20 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@aws-cdk/asset-awscli-v1@^2.2.97": +"@aws-cdk/asset-awscli-v1@^2.2.200": version "2.2.200" resolved "https://registry.yarnpkg.com/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.200.tgz#6ead533f73f705ad7350eb46955e2538e50cd013" integrity sha512-Kf5J8DfJK4wZFWT2Myca0lhwke7LwHcHBo+4TvWOGJrFVVKVuuiLCkzPPRBQQVDj0Vtn2NBokZAz8pfMpAqAKg== -"@aws-cdk/asset-kubectl-v20@^2.1.1": +"@aws-cdk/asset-kubectl-v20@^2.1.2": version "2.1.2" resolved "https://registry.yarnpkg.com/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.2.tgz#d8e20b5f5dc20128ea2000dc479ca3c7ddc27248" integrity sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg== -"@aws-cdk/asset-node-proxy-agent-v5@^2.0.77": - version "2.0.166" - resolved "https://registry.yarnpkg.com/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.166.tgz#467507db141cd829ff8aa9d6ea5519310a4276b8" - integrity sha512-j0xnccpUQHXJKPgCwQcGGNu4lRiC1PptYfdxBIH1L4dRK91iBxtSQHESRQX+yB47oGLaF/WfNN/aF3WXwlhikg== +"@aws-cdk/asset-node-proxy-agent-v6@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.0.1.tgz#6dc9b7cdb22ff622a7176141197962360c33e9ac" + integrity sha512-DDt4SLdLOwWCjGtltH4VCST7hpOI5DzieuhGZsBpZ+AgJdSI2GCjklCXm0GCTwJG/SolkL5dtQXyUKgg9luBDg== "@aws-crypto/crc32@3.0.0": version "3.0.0" @@ -91,12 +91,12 @@ "@aws-sdk/types" "^3.222.0" tslib "^1.11.1" -"@aws-crypto/sha256-js@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-4.0.0.tgz#7feaad4d62cfaf6636a108763d0df0b01574ef0e" - integrity sha512-MHGJyjE7TX9aaqXj7zk2ppnFUOhaDs5sP+HtNS0evOxn72c+5njUmyJmpGd7TfyoDznZlHMmdo/xGUdu2NIjNQ== +"@aws-crypto/sha256-js@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-5.0.0.tgz#fec6d5a9a097e812207eacaaa707bfa9191b3ad8" + integrity sha512-g+u9iKkaQVp9Mjoxq1IJSHj9NHGZF441+R/GIH0dn7u4mix5QQ4VqgpppHrNm1LzjUzb0BpcFGsBXP6cOVf+ZQ== dependencies: - "@aws-crypto/util" "^4.0.0" + "@aws-crypto/util" "^5.0.0" "@aws-sdk/types" "^3.222.0" tslib "^1.11.1" @@ -116,438 +116,420 @@ "@aws-sdk/util-utf8-browser" "^3.0.0" tslib "^1.11.1" -"@aws-crypto/util@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/util/-/util-4.0.0.tgz#958d244eea457af65755e242673872f9d04a7a6f" - integrity sha512-2EnmPy2gsFZ6m8bwUQN4jq+IyXV3quHAcwPOS6ZA3k+geujiqI8aRokO2kFJe+idJ/P3v4qWI186rVMo0+zLDQ== +"@aws-crypto/util@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/util/-/util-5.0.0.tgz#afa286af897ea2bd9fab194b4a6be9cc562db23a" + integrity sha512-1GYqLdYRe96idcCltlqxdJ68OWE6ADT8qGLmVi7PVHKl8AxD2EWSbJSSevPq2eTx6vaPZpkr1RoZ3lcw/uGoEA== dependencies: "@aws-sdk/types" "^3.222.0" "@aws-sdk/util-utf8-browser" "^3.0.0" tslib "^1.11.1" -"@aws-sdk/client-s3@^3.234.0", "@aws-sdk/client-s3@^3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-s3/-/client-s3-3.379.1.tgz#a2a40d60d17df238cfdf11e25bd245ed609afa01" - integrity sha512-H4ECLySyEkLHRCBv7q5RS5AhesAsDlC7b3wK4YfbTjdqLVhQZIGqy4IJX98VStKZOea43txhndlDlGvKt8p7kA== +"@aws-sdk/client-s3@^3.387.0": + version "3.400.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-s3/-/client-s3-3.400.0.tgz#579dfa12c93bf12f0d8654fcbfe36f7989209a4d" + integrity sha512-lnv0pb79Czl8fCMs/z7yM56LvoKTri1I4jX/V33trHMFKPQDoy8i24wxG8+TZl3MUmnUyoQS7tlukh7IFkii1Q== dependencies: "@aws-crypto/sha1-browser" "3.0.0" "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/client-sts" "3.379.1" - "@aws-sdk/credential-provider-node" "3.379.1" - "@aws-sdk/middleware-bucket-endpoint" "3.378.0" - "@aws-sdk/middleware-expect-continue" "3.378.0" - "@aws-sdk/middleware-flexible-checksums" "3.378.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-location-constraint" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-sdk-s3" "3.379.1" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-ssec" "3.378.0" - "@aws-sdk/middleware-user-agent" "3.379.1" - "@aws-sdk/signature-v4-multi-region" "3.378.0" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.378.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" + "@aws-sdk/client-sts" "3.398.0" + "@aws-sdk/credential-provider-node" "3.398.0" + "@aws-sdk/middleware-bucket-endpoint" "3.398.0" + "@aws-sdk/middleware-expect-continue" "3.398.0" + "@aws-sdk/middleware-flexible-checksums" "3.400.0" + "@aws-sdk/middleware-host-header" "3.398.0" + "@aws-sdk/middleware-location-constraint" "3.398.0" + "@aws-sdk/middleware-logger" "3.398.0" + "@aws-sdk/middleware-recursion-detection" "3.398.0" + "@aws-sdk/middleware-sdk-s3" "3.398.0" + "@aws-sdk/middleware-signing" "3.398.0" + "@aws-sdk/middleware-ssec" "3.398.0" + "@aws-sdk/middleware-user-agent" "3.398.0" + "@aws-sdk/signature-v4-multi-region" "3.398.0" + "@aws-sdk/types" "3.398.0" + "@aws-sdk/util-endpoints" "3.398.0" + "@aws-sdk/util-user-agent-browser" "3.398.0" + "@aws-sdk/util-user-agent-node" "3.398.0" "@aws-sdk/xml-builder" "3.310.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/eventstream-serde-browser" "^2.0.1" - "@smithy/eventstream-serde-config-resolver" "^2.0.1" - "@smithy/eventstream-serde-node" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-blob-browser" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/hash-stream-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/md5-js" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@smithy/config-resolver" "^2.0.5" + "@smithy/eventstream-serde-browser" "^2.0.5" + "@smithy/eventstream-serde-config-resolver" "^2.0.5" + "@smithy/eventstream-serde-node" "^2.0.5" + "@smithy/fetch-http-handler" "^2.0.5" + "@smithy/hash-blob-browser" "^2.0.5" + "@smithy/hash-node" "^2.0.5" + "@smithy/hash-stream-node" "^2.0.5" + "@smithy/invalid-dependency" "^2.0.5" + "@smithy/md5-js" "^2.0.5" + "@smithy/middleware-content-length" "^2.0.5" + "@smithy/middleware-endpoint" "^2.0.5" + "@smithy/middleware-retry" "^2.0.5" + "@smithy/middleware-serde" "^2.0.5" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.5" + "@smithy/node-http-handler" "^2.0.5" + "@smithy/protocol-http" "^2.0.5" + "@smithy/smithy-client" "^2.0.5" + "@smithy/types" "^2.2.2" + "@smithy/url-parser" "^2.0.5" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-body-length-node" "^2.1.0" + "@smithy/util-defaults-mode-browser" "^2.0.5" + "@smithy/util-defaults-mode-node" "^2.0.5" "@smithy/util-retry" "^2.0.0" - "@smithy/util-stream" "^2.0.1" + "@smithy/util-stream" "^2.0.5" "@smithy/util-utf8" "^2.0.0" - "@smithy/util-waiter" "^2.0.1" + "@smithy/util-waiter" "^2.0.5" fast-xml-parser "4.2.5" tslib "^2.5.0" -"@aws-sdk/client-sso-oidc@3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.379.1.tgz#065dbf089c26dd25f9657f46fc07e6c4f7640aa4" - integrity sha512-B6hZ2ysPyvafCMf6gls1jHI/IUviVZ4+TURpNfUBqThg/hZ1IMxc4BLkXca6VlgzYR+bWU8GKiClS9fFH6mu0g== - dependencies: - "@aws-crypto/sha256-browser" "3.0.0" - "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-user-agent" "3.379.1" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.378.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" - "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" - "@smithy/util-base64" "^2.0.0" - "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" - "@smithy/util-retry" "^2.0.0" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.5.0" - -"@aws-sdk/client-sso@3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.379.1.tgz#8e177ce38773c7c97243a5532eb80cc02c20dc02" - integrity sha512-2N16TPnRcq+seNP8VY/Zq7kfnrUOrJMbVNpyDZWGe5Qglua3n8v/FzxmXFNI87MiSODq8IHtiXhggWhefCd+TA== +"@aws-sdk/client-sso@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.398.0.tgz#68ce0a4d359794b629e5a7efe43a24ed9b52211e" + integrity sha512-CygL0jhfibw4kmWXG/3sfZMFNjcXo66XUuPC4BqZBk8Rj5vFoxp1vZeMkDLzTIk97Nvo5J5Bh+QnXKhub6AckQ== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-user-agent" "3.379.1" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.378.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/middleware-host-header" "3.398.0" + "@aws-sdk/middleware-logger" "3.398.0" + "@aws-sdk/middleware-recursion-detection" "3.398.0" + "@aws-sdk/middleware-user-agent" "3.398.0" + "@aws-sdk/types" "3.398.0" + "@aws-sdk/util-endpoints" "3.398.0" + "@aws-sdk/util-user-agent-browser" "3.398.0" + "@aws-sdk/util-user-agent-node" "3.398.0" + "@smithy/config-resolver" "^2.0.5" + "@smithy/fetch-http-handler" "^2.0.5" + "@smithy/hash-node" "^2.0.5" + "@smithy/invalid-dependency" "^2.0.5" + "@smithy/middleware-content-length" "^2.0.5" + "@smithy/middleware-endpoint" "^2.0.5" + "@smithy/middleware-retry" "^2.0.5" + "@smithy/middleware-serde" "^2.0.5" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.5" + "@smithy/node-http-handler" "^2.0.5" + "@smithy/protocol-http" "^2.0.5" + "@smithy/smithy-client" "^2.0.5" + "@smithy/types" "^2.2.2" + "@smithy/url-parser" "^2.0.5" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-body-length-node" "^2.1.0" + "@smithy/util-defaults-mode-browser" "^2.0.5" + "@smithy/util-defaults-mode-node" "^2.0.5" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/client-sts@3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.379.1.tgz#f18550006be741a41341cfa2e984c188145eb45f" - integrity sha512-gEnKuk9bYjThvmxCgOgCn1qa+rRX8IgIRE2+xhbWhlpDanozhkDq9aMB5moX4tBNYQEmi1LtGD+JOvOoZRnToQ== +"@aws-sdk/client-sts@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.398.0.tgz#8c569760d05b9fe663f82fc092d39b093096f7cc" + integrity sha512-/3Pa9wLMvBZipKraq3AtbmTfXW6q9kyvhwOno64f1Fz7kFb8ijQFMGoATS70B2pGEZTlxkUqJFWDiisT6Q6dFg== dependencies: "@aws-crypto/sha256-browser" "3.0.0" "@aws-crypto/sha256-js" "3.0.0" - "@aws-sdk/credential-provider-node" "3.379.1" - "@aws-sdk/middleware-host-header" "3.379.1" - "@aws-sdk/middleware-logger" "3.378.0" - "@aws-sdk/middleware-recursion-detection" "3.378.0" - "@aws-sdk/middleware-sdk-sts" "3.379.1" - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/middleware-user-agent" "3.379.1" - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.378.0" - "@aws-sdk/util-user-agent-browser" "3.378.0" - "@aws-sdk/util-user-agent-node" "3.378.0" - "@smithy/config-resolver" "^2.0.1" - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/hash-node" "^2.0.1" - "@smithy/invalid-dependency" "^2.0.1" - "@smithy/middleware-content-length" "^2.0.1" - "@smithy/middleware-endpoint" "^2.0.1" - "@smithy/middleware-retry" "^2.0.1" - "@smithy/middleware-serde" "^2.0.1" + "@aws-sdk/credential-provider-node" "3.398.0" + "@aws-sdk/middleware-host-header" "3.398.0" + "@aws-sdk/middleware-logger" "3.398.0" + "@aws-sdk/middleware-recursion-detection" "3.398.0" + "@aws-sdk/middleware-sdk-sts" "3.398.0" + "@aws-sdk/middleware-signing" "3.398.0" + "@aws-sdk/middleware-user-agent" "3.398.0" + "@aws-sdk/types" "3.398.0" + "@aws-sdk/util-endpoints" "3.398.0" + "@aws-sdk/util-user-agent-browser" "3.398.0" + "@aws-sdk/util-user-agent-node" "3.398.0" + "@smithy/config-resolver" "^2.0.5" + "@smithy/fetch-http-handler" "^2.0.5" + "@smithy/hash-node" "^2.0.5" + "@smithy/invalid-dependency" "^2.0.5" + "@smithy/middleware-content-length" "^2.0.5" + "@smithy/middleware-endpoint" "^2.0.5" + "@smithy/middleware-retry" "^2.0.5" + "@smithy/middleware-serde" "^2.0.5" "@smithy/middleware-stack" "^2.0.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/smithy-client" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/node-config-provider" "^2.0.5" + "@smithy/node-http-handler" "^2.0.5" + "@smithy/protocol-http" "^2.0.5" + "@smithy/smithy-client" "^2.0.5" + "@smithy/types" "^2.2.2" + "@smithy/url-parser" "^2.0.5" "@smithy/util-base64" "^2.0.0" "@smithy/util-body-length-browser" "^2.0.0" - "@smithy/util-body-length-node" "^2.0.0" - "@smithy/util-defaults-mode-browser" "^2.0.1" - "@smithy/util-defaults-mode-node" "^2.0.1" + "@smithy/util-body-length-node" "^2.1.0" + "@smithy/util-defaults-mode-browser" "^2.0.5" + "@smithy/util-defaults-mode-node" "^2.0.5" "@smithy/util-retry" "^2.0.0" "@smithy/util-utf8" "^2.0.0" fast-xml-parser "4.2.5" tslib "^2.5.0" -"@aws-sdk/credential-provider-env@3.378.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.378.0.tgz#a0f6291eff4e002c140599acede2433f58e4f4cb" - integrity sha512-B2OVdO9kBClDwGgWTBLAQwFV8qYTYGyVujg++1FZFSFMt8ORFdZ5fNpErvJtiSjYiOOQMzyBeSNhKyYNXCiJjQ== +"@aws-sdk/credential-provider-env@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.398.0.tgz#28d0d4d2de85dd35fdf83298191ea495da8f8646" + integrity sha512-Z8Yj5z7FroAsR6UVML+XUdlpoqEe9Dnle8c2h8/xWwIC2feTfIBhjLhRVxfbpbM1pLgBSNEcZ7U8fwq5l7ESVQ== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.398.0" "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/credential-provider-ini@3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.379.1.tgz#912a0922be00deb2d77772f68bb41fad40269d61" - integrity sha512-YhEsJIskzCFwIIKiMN9GSHQkgWwj/b7rq0ofhsXsCRimFtdVkmMlB9veE6vtFAuXpX/WOGWdlWek1az0V22uuw== +"@aws-sdk/credential-provider-ini@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.398.0.tgz#723264d8d8adb01963fdfe9fe9005aa20def3a56" + integrity sha512-AsK1lStK3nB9Cn6S6ODb1ktGh7SRejsNVQVKX3t5d3tgOaX+aX1Iwy8FzM/ZEN8uCloeRifUGIY9uQFygg5mSw== dependencies: - "@aws-sdk/credential-provider-env" "3.378.0" - "@aws-sdk/credential-provider-process" "3.378.0" - "@aws-sdk/credential-provider-sso" "3.379.1" - "@aws-sdk/credential-provider-web-identity" "3.378.0" - "@aws-sdk/types" "3.378.0" + "@aws-sdk/credential-provider-env" "3.398.0" + "@aws-sdk/credential-provider-process" "3.398.0" + "@aws-sdk/credential-provider-sso" "3.398.0" + "@aws-sdk/credential-provider-web-identity" "3.398.0" + "@aws-sdk/types" "3.398.0" "@smithy/credential-provider-imds" "^2.0.0" "@smithy/property-provider" "^2.0.0" "@smithy/shared-ini-file-loader" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/credential-provider-node@3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.379.1.tgz#687eecb7c2e378229e675c9df511cfada63b4d60" - integrity sha512-39Y4OHKn6a8lY8YJhSLLw08aZytWxfvSjM4ObIEnE6hjLl8gsL9vROKKITsh3q6iGQ1EDSWMWZL50aOh3LJUIg== - dependencies: - "@aws-sdk/credential-provider-env" "3.378.0" - "@aws-sdk/credential-provider-ini" "3.379.1" - "@aws-sdk/credential-provider-process" "3.378.0" - "@aws-sdk/credential-provider-sso" "3.379.1" - "@aws-sdk/credential-provider-web-identity" "3.378.0" - "@aws-sdk/types" "3.378.0" +"@aws-sdk/credential-provider-node@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.398.0.tgz#afc6e6417b071a5a5b242329fd9c80aacba40f7d" + integrity sha512-odmI/DSKfuWUYeDnGTCEHBbC8/MwnF6yEq874zl6+owoVv0ZsYP8qBHfiJkYqrwg7wQ7Pi40sSAPC1rhesGwzg== + dependencies: + "@aws-sdk/credential-provider-env" "3.398.0" + "@aws-sdk/credential-provider-ini" "3.398.0" + "@aws-sdk/credential-provider-process" "3.398.0" + "@aws-sdk/credential-provider-sso" "3.398.0" + "@aws-sdk/credential-provider-web-identity" "3.398.0" + "@aws-sdk/types" "3.398.0" "@smithy/credential-provider-imds" "^2.0.0" "@smithy/property-provider" "^2.0.0" "@smithy/shared-ini-file-loader" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/credential-provider-process@3.378.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.378.0.tgz#8fd594c9600f9e4b7121f3cf2cea13b4d37f09e5" - integrity sha512-KFTIy7u+wXj3eDua4rgS0tODzMnXtXhAm1RxzCW9FL5JLBBrd82ymCj1Dp72217Sw5Do6NjCnDTTNkCHZMA77w== +"@aws-sdk/credential-provider-process@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.398.0.tgz#bae46e14bcb664371d33926118bad61866184317" + integrity sha512-WrkBL1W7TXN508PA9wRXPFtzmGpVSW98gDaHEaa8GolAPHMPa5t2QcC/z/cFpglzrcVv8SA277zu9Z8tELdZhg== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.398.0" "@smithy/property-provider" "^2.0.0" "@smithy/shared-ini-file-loader" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/credential-provider-sso@3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.379.1.tgz#522dfb8b7cca455d5b226072d2ee1ac9fb317cdc" - integrity sha512-PhGtu1+JbUntYP/5CSfazQhWsjUBiksEuhg9fLhYl5OAgZVjVygbgoNVUz/gM7gZJSEMsasTazkn7yZVzO/k7w== +"@aws-sdk/credential-provider-sso@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.398.0.tgz#b8a094e5e62cea233d77e27c8b7e2ce65e9f7559" + integrity sha512-2Dl35587xbnzR/GGZqA2MnFs8+kS4wbHQO9BioU0okA+8NRueohNMdrdQmQDdSNK4BfIpFspiZmFkXFNyEAfgw== dependencies: - "@aws-sdk/client-sso" "3.379.1" - "@aws-sdk/token-providers" "3.379.1" - "@aws-sdk/types" "3.378.0" + "@aws-sdk/client-sso" "3.398.0" + "@aws-sdk/token-providers" "3.398.0" + "@aws-sdk/types" "3.398.0" "@smithy/property-provider" "^2.0.0" "@smithy/shared-ini-file-loader" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/credential-provider-web-identity@3.378.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.378.0.tgz#019db9f17bd9fb2fd9a4171fe3b443c9e049a70a" - integrity sha512-GWjydOszhc4xDF8xuPtBvboglXQr0gwCW1oHAvmLcOT38+Hd6qnKywnMSeoXYRPgoKfF9TkWQgW1jxplzCG0UA== +"@aws-sdk/credential-provider-web-identity@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.398.0.tgz#0396a34bf9d2e4b48530c2f899cbb4101b592db8" + integrity sha512-iG3905Alv9pINbQ8/MIsshgqYMbWx+NDQWpxbIW3W0MkSH3iAqdVpSCteYidYX9G/jv2Um1nW3y360ib20bvNg== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.398.0" "@smithy/property-provider" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/middleware-bucket-endpoint@3.378.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.378.0.tgz#4d0253b263d908ddb51c8eb36acd5d4b746a94db" - integrity sha512-3o+AYU6JWUsPM49bWglCUOgNvySiHkbIma0J6F9a68e30vEDD0FUQtKzyHPZkF7iYDyesEl166gYjwVNAmASzw== +"@aws-sdk/middleware-bucket-endpoint@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.398.0.tgz#1cff84e1f71043346277f3c1a6268763c631a984" + integrity sha512-+iDHiRofK/vIY94RWAXkSnR4rBPzc2dPHmLp+FDKywq1y708H9W7TOT37dpn+KSFeO4k2FfddFjzWBHsaeakCA== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.398.0" "@aws-sdk/util-arn-parser" "3.310.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/protocol-http" "^2.0.5" + "@smithy/types" "^2.2.2" "@smithy/util-config-provider" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/middleware-expect-continue@3.378.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.378.0.tgz#66baa420255c56528bacf53a82524ab6155763a9" - integrity sha512-8maaNQvza3/IGDbIyVQkUbGlo+Oc6SY1gVG50UMcTUX8nwZrD1/ko+ft+pd2EDb2n+0JritoDj4bjr6pdesNBg== +"@aws-sdk/middleware-expect-continue@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.398.0.tgz#a43cbe0a5b339238f5f307c69798da8f69e5c111" + integrity sha512-d6he+Qqwh1yqml9duXSv5iKJ2lS0PVrF2UEsVew2GFxfUif0E/davTZJjvWtnelbuIGcTP+wDKVVjLwBN2sN/g== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.398.0" + "@smithy/protocol-http" "^2.0.5" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/middleware-flexible-checksums@3.378.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.378.0.tgz#41ab38b78ce2a8c10b52ea617c4187747ecf3c8d" - integrity sha512-pHkcVTu2T+x/1fpPHMpRDpXY5zxDsjijv3C6Nz/nm3gQrZvQ3fYDrQdV3Oj6Xeg40B3kkcp/bzgDo7MDzG088A== +"@aws-sdk/middleware-flexible-checksums@3.400.0": + version "3.400.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.400.0.tgz#f3cb1e9f42968d2177b583a83e5027b4d3f70e67" + integrity sha512-lpsumd5/G+eAMTr61h/cJQZ8+i+xzC6OG3bvUcbRHqcjN49XgeNLcPfYcr6Rzf0QHxmuCN4te/4XGU3Fif2YVA== dependencies: "@aws-crypto/crc32" "3.0.0" "@aws-crypto/crc32c" "3.0.0" - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.398.0" "@smithy/is-array-buffer" "^2.0.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/protocol-http" "^2.0.5" + "@smithy/types" "^2.2.2" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/middleware-host-header@3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.379.1.tgz#26d8af6100de4e03d201553360dfe16e10ae1aa5" - integrity sha512-LI4KpAFWNWVr2aH2vRVblr0Y8tvDz23lj8LOmbDmCrzd5M21nxuocI/8nEAQj55LiTIf9Zs+dHCdsyegnFXdrA== +"@aws-sdk/middleware-host-header@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.398.0.tgz#4e5eeaa8ead96237e70cb6930dfb813a9c21ae8c" + integrity sha512-m+5laWdBaxIZK2ko0OwcCHJZJ5V1MgEIt8QVQ3k4/kOkN9ICjevOYmba751pHoTnbOYB7zQd6D2OT3EYEEsUcA== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.398.0" + "@smithy/protocol-http" "^2.0.5" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/middleware-location-constraint@3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.379.1.tgz#754541385bdf128f446b071f91fedd11806ba300" - integrity sha512-+bmy8DjX9jtqJk8WiDaHoP9M5ZcqjHSJf4mkv8IUZ/FNTUl9j6Dll//bG/JxuAw5e5shtCDjmZ027W5d9ITp0g== +"@aws-sdk/middleware-location-constraint@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.398.0.tgz#ec7d046401d1f547d8dd55bf1c94ed067b10224b" + integrity sha512-it+olJf1Lf2bmH8OL/N1jMOFB0zEVYs4rIzgFrluTRCuPatRuDi4LsXS8zqYxkBa05JE8JmqwW5gCzAmWyLLqw== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.398.0" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/middleware-logger@3.378.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.378.0.tgz#f27fe3a979f3ef49034a860aa2c38c8a16faa879" - integrity sha512-l1DyaDLm3KeBMNMuANI3scWh8Xvu248x+vw6Z7ExWOhGXFmQ1MW7YvASg/SdxWkhlF9HmkkTif1LdMB22x6QDA== +"@aws-sdk/middleware-logger@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.398.0.tgz#1f336c329861c2aa7cc267d84ef41e74e98b1502" + integrity sha512-CiJjW+FL12elS6Pn7/UVjVK8HWHhXMfvHZvOwx/Qkpy340sIhkuzOO6fZEruECDTZhl2Wqn81XdJ1ZQ4pRKpCg== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.398.0" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/middleware-recursion-detection@3.378.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.378.0.tgz#706f505f608a766d617fbdad20ca30a7abccb311" - integrity sha512-mUMfHAz0oGNIWiTZHTVJb+I515Hqs2zx1j36Le4MMiiaMkPW1SRUF1FIwGuc1wh6E8jB5q+XfEMriDjRi4TZRA== +"@aws-sdk/middleware-recursion-detection@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.398.0.tgz#e456d67fc88afac73004a8feae497d3ab24231e4" + integrity sha512-7QpOqPQAZNXDXv6vsRex4R8dLniL0E/80OPK4PPFsrCh9btEyhN9Begh4i1T+5lL28hmYkztLOkTQ2N5J3hgRQ== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.398.0" + "@smithy/protocol-http" "^2.0.5" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/middleware-sdk-s3@3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.379.1.tgz#e9c9911601261d74921b18f5ba9aeb14bc9d1a2a" - integrity sha512-NVHRpNLfkHCqr3CE1Bmlf8Fhys8lL78kDX7UONnTZXvSiSXmCS7EbNtGDghZ8IKi+V9S/ifB4sLsX3tfzY0i6Q== +"@aws-sdk/middleware-sdk-s3@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.398.0.tgz#3277c50438a34faedc0f1b6380e62196aeffe331" + integrity sha512-yweSMc/TyiFtqc52hFMKQJvTm3i1KCoW5mB3o/Sla6zsHBh+nS6TTaBmo+2kcDIR7AKODwW+FLCTHWiazb7J3Q== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.398.0" "@aws-sdk/util-arn-parser" "3.310.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/protocol-http" "^2.0.5" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/middleware-sdk-sts@3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.379.1.tgz#4238aa2fa4ad4b0f7e0f6bb08d7c131b7d6a2baa" - integrity sha512-SK3gSyT0XbLiY12+AjLFYL9YngxOXHnZF3Z33Cdd4a+AUYrVBV7JBEEGD1Nlwrcmko+3XgaKlmgUaR5s91MYvg== +"@aws-sdk/middleware-sdk-sts@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.398.0.tgz#f7383c86eedba80666b1a009256a1127d1c4edc6" + integrity sha512-+JH76XHEgfVihkY+GurohOQ5Z83zVN1nYcQzwCFnCDTh4dG4KwhnZKG+WPw6XJECocY0R+H0ivofeALHvVWJtQ== dependencies: - "@aws-sdk/middleware-signing" "3.379.1" - "@aws-sdk/types" "3.378.0" - "@smithy/types" "^2.0.2" + "@aws-sdk/middleware-signing" "3.398.0" + "@aws-sdk/types" "3.398.0" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/middleware-signing@3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-signing/-/middleware-signing-3.379.1.tgz#ebb7912868076babec851f9f703862dae6583a89" - integrity sha512-kBk2ZUvR84EM4fICjr8K+Ykpf8SI1UzzPp2/UVYZ0X+4H/ZCjfSqohGRwHykMqeplne9qHSL7/rGJs1H3l3gPg== +"@aws-sdk/middleware-signing@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-signing/-/middleware-signing-3.398.0.tgz#ad8f73c2e7ab564eea95568e2e109f41af6128ec" + integrity sha512-O0KqXAix1TcvZBFt1qoFkHMUNJOSgjJTYS7lFTRKSwgsD27bdW2TM2r9R8DAccWFt5Amjkdt+eOwQMIXPGTm8w== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.398.0" "@smithy/property-provider" "^2.0.0" - "@smithy/protocol-http" "^2.0.1" + "@smithy/protocol-http" "^2.0.5" "@smithy/signature-v4" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" "@smithy/util-middleware" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/middleware-ssec@3.378.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-ssec/-/middleware-ssec-3.378.0.tgz#7746d75ae4614a348c3f9d1a7693009ee60026a2" - integrity sha512-WDT2LOd6OxlY1zkrRG9ZtW2vFms/dsqMg9VyE88RKG2oATxSXEhkr5zLbNVh3TyuUKnV9jydate56d/ECwHOHg== +"@aws-sdk/middleware-ssec@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-ssec/-/middleware-ssec-3.398.0.tgz#0c4f291e009833858935eb589a94d386cfc45a49" + integrity sha512-QtKr/hPcRugKSIZAH4+7hbUfdW7Lg+OQvD25nJn7ic1JHRZ+eDctEFxdsmnt68lE6aZxOcHCWHAW6/umcA93Dw== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.398.0" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/middleware-user-agent@3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.379.1.tgz#61ca273aa1f505f4d0b389fb72c3b0dbd1078aae" - integrity sha512-4zIGeAIuutcRieAvovs82uBNhJBHuxfxaAUqrKiw49xUBG7xeNVUl+DYPSpbALbEIy4ujfwWCBOOWVCt6dyUZg== +"@aws-sdk/middleware-user-agent@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.398.0.tgz#42542b3697ee6812cb8f81fd19757dc1592af0e0" + integrity sha512-nF1jg0L+18b5HvTcYzwyFgfZQQMELJINFqI0mi4yRKaX7T5a3aGp5RVLGGju/6tAGTuFbfBoEhkhU3kkxexPYQ== dependencies: - "@aws-sdk/types" "3.378.0" - "@aws-sdk/util-endpoints" "3.378.0" - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.398.0" + "@aws-sdk/util-endpoints" "3.398.0" + "@smithy/protocol-http" "^2.0.5" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/signature-v4-multi-region@3.378.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.378.0.tgz#bb6e46eab9009e36c22155b33dbaa2322f8ce4cc" - integrity sha512-gtuABS7EeYZQeNzTrabY3Ruv4wWmoz4u8OMSGl47gYPDWA70WYEZ0aoi4zSGuKhXiqtVvTsO9wGEMIInwV5phQ== +"@aws-sdk/signature-v4-multi-region@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.398.0.tgz#3afc781f59a657962e9fd69c0c82a2b083e349d4" + integrity sha512-8fTqTxRDWE03T7ClaWlCfbwuSae//01XMNVy2a9g5QgaelQh7ZZyU3ZIJiV8gIj8v6ZM0NGn9Bz1liI/vmNmcw== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/protocol-http" "^2.0.1" + "@aws-sdk/types" "3.398.0" + "@smithy/protocol-http" "^2.0.5" "@smithy/signature-v4" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@aws-sdk/signature-v4@^3.370.0": - version "3.374.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/signature-v4/-/signature-v4-3.374.0.tgz#bd727f4c392acb81bc667aa4cfceeba608250771" - integrity sha512-2xLJvSdzcZZAg0lsDLUAuSQuihzK0dcxIK7WmfuJeF7DGKJFmp9czQmz5f3qiDz6IDQzvgK1M9vtJSVCslJbyQ== +"@aws-sdk/token-providers@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.398.0.tgz#62fc8f5379df0e94486d71b96df975fb7e7d04cc" + integrity sha512-nrYgjzavGCKJL/48Vt0EL+OlIc5UZLfNGpgyUW9cv3XZwl+kXV0QB+HH0rHZZLfpbBgZ2RBIJR9uD5ieu/6hpQ== dependencies: - "@smithy/signature-v4" "^1.0.1" - tslib "^2.5.0" - -"@aws-sdk/token-providers@3.379.1": - version "3.379.1" - resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.379.1.tgz#d85692017b357743eb729e05728fef000f3685ea" - integrity sha512-NlYPkArJ7A/txCrjqqkje+4hsv7pSOqm+Qdx3BUIOc7PRYrBVs/XwThxUkGceSntVXoNlO8g9DFL0NY53/wb8Q== - dependencies: - "@aws-sdk/client-sso-oidc" "3.379.1" - "@aws-sdk/types" "3.378.0" + "@aws-crypto/sha256-browser" "3.0.0" + "@aws-crypto/sha256-js" "3.0.0" + "@aws-sdk/middleware-host-header" "3.398.0" + "@aws-sdk/middleware-logger" "3.398.0" + "@aws-sdk/middleware-recursion-detection" "3.398.0" + "@aws-sdk/middleware-user-agent" "3.398.0" + "@aws-sdk/types" "3.398.0" + "@aws-sdk/util-endpoints" "3.398.0" + "@aws-sdk/util-user-agent-browser" "3.398.0" + "@aws-sdk/util-user-agent-node" "3.398.0" + "@smithy/config-resolver" "^2.0.5" + "@smithy/fetch-http-handler" "^2.0.5" + "@smithy/hash-node" "^2.0.5" + "@smithy/invalid-dependency" "^2.0.5" + "@smithy/middleware-content-length" "^2.0.5" + "@smithy/middleware-endpoint" "^2.0.5" + "@smithy/middleware-retry" "^2.0.5" + "@smithy/middleware-serde" "^2.0.5" + "@smithy/middleware-stack" "^2.0.0" + "@smithy/node-config-provider" "^2.0.5" + "@smithy/node-http-handler" "^2.0.5" "@smithy/property-provider" "^2.0.0" + "@smithy/protocol-http" "^2.0.5" "@smithy/shared-ini-file-loader" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/smithy-client" "^2.0.5" + "@smithy/types" "^2.2.2" + "@smithy/url-parser" "^2.0.5" + "@smithy/util-base64" "^2.0.0" + "@smithy/util-body-length-browser" "^2.0.0" + "@smithy/util-body-length-node" "^2.1.0" + "@smithy/util-defaults-mode-browser" "^2.0.5" + "@smithy/util-defaults-mode-node" "^2.0.5" + "@smithy/util-retry" "^2.0.0" + "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@aws-sdk/types@3.378.0", "@aws-sdk/types@^3.222.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.378.0.tgz#93a811ccdf15c81b1947f1cd67922c4690792189" - integrity sha512-qP0CvR/ItgktmN8YXpGQglzzR/6s0nrsQ4zIfx3HMwpsBTwuouYahcCtF1Vr82P4NFcoDA412EJahJ2pIqEd+w== +"@aws-sdk/types@3.398.0", "@aws-sdk/types@^3.222.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.398.0.tgz#8ce02559536670f9188cddfce32e9dd12b4fe965" + integrity sha512-r44fkS+vsEgKCuEuTV+TIk0t0m5ZlXHNjSDYEUvzLStbbfUFiNus/YG4UCa0wOk9R7VuQI67badsvvPeVPCGDQ== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" "@aws-sdk/util-arn-parser@3.310.0": @@ -557,12 +539,12 @@ dependencies: tslib "^2.5.0" -"@aws-sdk/util-endpoints@3.378.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.378.0.tgz#93eeac35656ee949ab42cbc1181dfcbdb1e3e95c" - integrity sha512-NU5C2l2xAXxpyB5nT0fIhahLPlJoJdzHWw4uC53KH9b4PrjHtgvgCN8beIsD3QxyfgeoM4A5J9Auo6WurfRnLw== +"@aws-sdk/util-endpoints@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.398.0.tgz#cb1cc5fe3e4b3839e4e1cc6a66f834cf0dde20ee" + integrity sha512-Fy0gLYAei/Rd6BrXG4baspCnWTUSd0NdokU1pZh4KlfEAEN1i8SPPgfiO5hLk7+2inqtCmqxVJlfqbMVe9k4bw== dependencies: - "@aws-sdk/types" "3.378.0" + "@aws-sdk/types" "3.398.0" tslib "^2.5.0" "@aws-sdk/util-locate-window@^3.0.0": @@ -572,24 +554,24 @@ dependencies: tslib "^2.5.0" -"@aws-sdk/util-user-agent-browser@3.378.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.378.0.tgz#e756215da5bd1654a308b4e5383ebdcfc938fb0a" - integrity sha512-FSCpagzftK1W+m7Ar6lpX7/Gr9y5P56nhFYz8U4EYQ4PkufS6czWX9YW+/FA5OYV0vlQ/SvPqMnzoHIPUNhZrQ== +"@aws-sdk/util-user-agent-browser@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.398.0.tgz#5c3e430032eb867b7cbe48dda51a6d8c4ea000a8" + integrity sha512-A3Tzx1tkDHlBT+IgxmsMCHbV8LM7SwwCozq2ZjJRx0nqw3MCrrcxQFXldHeX/gdUMO+0Oocb7HGSnVODTq+0EA== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.398.0" + "@smithy/types" "^2.2.2" bowser "^2.11.0" tslib "^2.5.0" -"@aws-sdk/util-user-agent-node@3.378.0": - version "3.378.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.378.0.tgz#7af728f1823e860853998166a2bda0f0044251ef" - integrity sha512-IdwVJV0E96MkJeFte4dlWqvB+oiqCiZ5lOlheY3W9NynTuuX0GGYNC8Y9yIsV8Oava1+ujpJq0ww6qXdYxmO4A== +"@aws-sdk/util-user-agent-node@3.398.0": + version "3.398.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.398.0.tgz#1707737ee67c864d74a03137003b6d2b28172ee6" + integrity sha512-RTVQofdj961ej4//fEkppFf4KXqKGMTCqJYghx3G0C/MYXbg7MGl7LjfNGtJcboRE8pfHHQ/TUWBDA7RIAPPlQ== dependencies: - "@aws-sdk/types" "3.378.0" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/types" "^2.0.2" + "@aws-sdk/types" "3.398.0" + "@smithy/node-config-provider" "^2.0.5" + "@smithy/types" "^2.2.2" tslib "^2.5.0" "@aws-sdk/util-utf8-browser@^3.0.0": @@ -606,12 +588,13 @@ dependencies: tslib "^2.5.0" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.5.tgz#234d98e1551960604f1246e6475891a570ad5658" - integrity sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.10", "@babel/code-frame@^7.22.5": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.10.tgz#1c20e612b768fefa75f6e90d6ecb86329247f0a3" + integrity sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA== dependencies: - "@babel/highlight" "^7.22.5" + "@babel/highlight" "^7.22.10" + chalk "^2.4.2" "@babel/compat-data@^7.22.9": version "7.22.9" @@ -619,40 +602,40 @@ integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.9.tgz#bd96492c68822198f33e8a256061da3cf391f58f" - integrity sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w== + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.10.tgz#aad442c7bcd1582252cb4576747ace35bc122f35" + integrity sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.9" - "@babel/helper-compilation-targets" "^7.22.9" + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" + "@babel/helper-compilation-targets" "^7.22.10" "@babel/helper-module-transforms" "^7.22.9" - "@babel/helpers" "^7.22.6" - "@babel/parser" "^7.22.7" + "@babel/helpers" "^7.22.10" + "@babel/parser" "^7.22.10" "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.8" - "@babel/types" "^7.22.5" + "@babel/traverse" "^7.22.10" + "@babel/types" "^7.22.10" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.2" semver "^6.3.1" -"@babel/generator@^7.22.7", "@babel/generator@^7.22.9", "@babel/generator@^7.7.2": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d" - integrity sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw== +"@babel/generator@^7.22.10", "@babel/generator@^7.7.2": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.10.tgz#c92254361f398e160645ac58831069707382b722" + integrity sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.22.10" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" -"@babel/helper-compilation-targets@^7.22.9": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz#f9d0a7aaaa7cd32a3f31c9316a69f5a9bcacb892" - integrity sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw== +"@babel/helper-compilation-targets@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz#01d648bbc25dd88f513d862ee0df27b7d4e67024" + integrity sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q== dependencies: "@babel/compat-data" "^7.22.9" "@babel/helper-validator-option" "^7.22.5" @@ -732,28 +715,28 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== -"@babel/helpers@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.6.tgz#8e61d3395a4f0c5a8060f309fb008200969b5ecd" - integrity sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA== +"@babel/helpers@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.10.tgz#ae6005c539dfbcb5cd71fb51bfc8a52ba63bc37a" + integrity sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw== dependencies: "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.6" - "@babel/types" "^7.22.5" + "@babel/traverse" "^7.22.10" + "@babel/types" "^7.22.10" -"@babel/highlight@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031" - integrity sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw== +"@babel/highlight@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.10.tgz#02a3f6d8c1cb4521b2fd0ab0da8f4739936137d7" + integrity sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ== dependencies: "@babel/helper-validator-identifier" "^7.22.5" - chalk "^2.0.0" + chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.5", "@babel/parser@^7.22.7": - version "7.22.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.7.tgz#df8cf085ce92ddbdbf668a7f186ce848c9036cae" - integrity sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.10", "@babel/parser@^7.22.5": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.10.tgz#e37634f9a12a1716136c44624ef54283cabd3f55" + integrity sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -855,26 +838,26 @@ "@babel/parser" "^7.22.5" "@babel/types" "^7.22.5" -"@babel/traverse@^7.22.6", "@babel/traverse@^7.22.8", "@babel/traverse@^7.7.2": - version "7.22.8" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.8.tgz#4d4451d31bc34efeae01eac222b514a77aa4000e" - integrity sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw== +"@babel/traverse@^7.22.10", "@babel/traverse@^7.7.2": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.10.tgz#20252acb240e746d27c2e82b4484f199cf8141aa" + integrity sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig== dependencies: - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.7" + "@babel/code-frame" "^7.22.10" + "@babel/generator" "^7.22.10" "@babel/helper-environment-visitor" "^7.22.5" "@babel/helper-function-name" "^7.22.5" "@babel/helper-hoist-variables" "^7.22.5" "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.22.7" - "@babel/types" "^7.22.5" + "@babel/parser" "^7.22.10" + "@babel/types" "^7.22.10" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe" - integrity sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.10", "@babel/types@^7.22.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.10.tgz#4a9e76446048f2c66982d1a989dd12b8a2d2dc03" + integrity sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg== dependencies: "@babel/helper-string-parser" "^7.22.5" "@babel/helper-validator-identifier" "^7.22.5" @@ -895,125 +878,122 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== -"@esbuild/android-arm64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.16.tgz#7b18cab5f4d93e878306196eed26b6d960c12576" - integrity sha512-QX48qmsEZW+gcHgTmAj+x21mwTz8MlYQBnzF6861cNdQGvj2jzzFjqH0EBabrIa/WVZ2CHolwMoqxVryqKt8+Q== - -"@esbuild/android-arm@0.15.18": - version "0.15.18" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.18.tgz#266d40b8fdcf87962df8af05b76219bc786b4f80" - integrity sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw== - -"@esbuild/android-arm@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.16.tgz#5c47f6a7c2cada6ed4b4d4e72d8c66e76d812812" - integrity sha512-baLqRpLe4JnKrUXLJChoTN0iXZH7El/mu58GE3WIA6/H834k0XWvLRmGLG8y8arTRS9hJJibPnF0tiGhmWeZgw== - -"@esbuild/android-x64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.16.tgz#8686a6e98359071ffd5312046551943e7244c51a" - integrity sha512-G4wfHhrrz99XJgHnzFvB4UwwPxAWZaZBOFXh+JH1Duf1I4vIVfuYY9uVLpx4eiV2D/Jix8LJY+TAdZ3i40tDow== - -"@esbuild/darwin-arm64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.16.tgz#aa79fbf447630ca0696a596beba962a775bbf394" - integrity sha512-/Ofw8UXZxuzTLsNFmz1+lmarQI6ztMZ9XktvXedTbt3SNWDn0+ODTwxExLYQ/Hod91EZB4vZPQJLoqLF0jvEzA== - -"@esbuild/darwin-x64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.16.tgz#d5d68ee510507104da7e7503224c647c957e163e" - integrity sha512-SzBQtCV3Pdc9kyizh36Ol+dNVhkDyIrGb/JXZqFq8WL37LIyrXU0gUpADcNV311sCOhvY+f2ivMhb5Tuv8nMOQ== - -"@esbuild/freebsd-arm64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.16.tgz#b00b4cc8c2e424907cfe3a607384ab24794edd52" - integrity sha512-ZqftdfS1UlLiH1DnS2u3It7l4Bc3AskKeu+paJSfk7RNOMrOxmeFDhLTMQqMxycP1C3oj8vgkAT6xfAuq7ZPRA== - -"@esbuild/freebsd-x64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.16.tgz#84af4430a07730b50bbc945a90cf7036c1853b76" - integrity sha512-rHV6zNWW1tjgsu0dKQTX9L0ByiJHHLvQKrWtnz8r0YYJI27FU3Xu48gpK2IBj1uCSYhJ+pEk6Y0Um7U3rIvV8g== - -"@esbuild/linux-arm64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.16.tgz#35571d15de6272c862d9ce6341372fb3cef0f266" - integrity sha512-8yoZhGkU6aHu38WpaM4HrRLTFc7/VVD9Q2SvPcmIQIipQt2I/GMTZNdEHXoypbbGao5kggLcxg0iBKjo0SQYKA== - -"@esbuild/linux-arm@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.16.tgz#b65c7cd5b0eadd08f91aab66b9dda81b6a4b2a70" - integrity sha512-n4O8oVxbn7nl4+m+ISb0a68/lcJClIbaGAoXwqeubj/D1/oMMuaAXmJVfFlRjJLu/ZvHkxoiFJnmbfp4n8cdSw== - -"@esbuild/linux-ia32@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.16.tgz#673a68cb251ce44a00a6422ada29064c5a1cd2c0" - integrity sha512-9ZBjlkdaVYxPNO8a7OmzDbOH9FMQ1a58j7Xb21UfRU29KcEEU3VTHk+Cvrft/BNv0gpWJMiiZ/f4w0TqSP0gLA== - -"@esbuild/linux-loong64@0.15.18": - version "0.15.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.18.tgz#128b76ecb9be48b60cf5cfc1c63a4f00691a3239" - integrity sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ== - -"@esbuild/linux-loong64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.16.tgz#477e2da34ab46ffdbf4740fa6441e80045249385" - integrity sha512-TIZTRojVBBzdgChY3UOG7BlPhqJz08AL7jdgeeu+kiObWMFzGnQD7BgBBkWRwOtKR1i2TNlO7YK6m4zxVjjPRQ== - -"@esbuild/linux-mips64el@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.16.tgz#e1e9687bbdaa831d7c34edc9278200982c1a4bf4" - integrity sha512-UPeRuFKCCJYpBbIdczKyHLAIU31GEm0dZl1eMrdYeXDH+SJZh/i+2cAmD3A1Wip9pIc5Sc6Kc5cFUrPXtR0XHA== - -"@esbuild/linux-ppc64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.16.tgz#2f19075d63622987e86e83a4b7866cd57b796c60" - integrity sha512-io6yShgIEgVUhExJejJ21xvO5QtrbiSeI7vYUnr7l+v/O9t6IowyhdiYnyivX2X5ysOVHAuyHW+Wyi7DNhdw6Q== - -"@esbuild/linux-riscv64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.16.tgz#bbf40a38f03ba2434fe69b5ceeec5d13c742b329" - integrity sha512-WhlGeAHNbSdG/I2gqX2RK2gfgSNwyJuCiFHMc8s3GNEMMHUI109+VMBfhVqRb0ZGzEeRiibi8dItR3ws3Lk+cA== - -"@esbuild/linux-s390x@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.16.tgz#d2b8c0779ccd2b7917cdf0fab8831a468e0f9c01" - integrity sha512-gHRReYsJtViir63bXKoFaQ4pgTyah4ruiMRQ6im9YZuv+gp3UFJkNTY4sFA73YDynmXZA6hi45en4BGhNOJUsw== - -"@esbuild/linux-x64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.16.tgz#da48b39cfdc1b12a74976625f583f031eac43590" - integrity sha512-mfiiBkxEbUHvi+v0P+TS7UnA9TeGXR48aK4XHkTj0ZwOijxexgMF01UDFaBX7Q6CQsB0d+MFNv9IiXbIHTNd4g== - -"@esbuild/netbsd-x64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.16.tgz#ddef985aed37cc81908d2573b66c0299dbc49037" - integrity sha512-n8zK1YRDGLRZfVcswcDMDM0j2xKYLNXqei217a4GyBxHIuPMGrrVuJ+Ijfpr0Kufcm7C1k/qaIrGy6eG7wvgmA== - -"@esbuild/openbsd-x64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.16.tgz#85035bf89efd66e9068bc72aa6bb85a2c317d090" - integrity sha512-lEEfkfsUbo0xC47eSTBqsItXDSzwzwhKUSsVaVjVji07t8+6KA5INp2rN890dHZeueXJAI8q0tEIfbwVRYf6Ew== - -"@esbuild/sunos-x64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.16.tgz#16338ecab854cb2d831cc9ee9cc21ef69566e1f3" - integrity sha512-jlRjsuvG1fgGwnE8Afs7xYDnGz0dBgTNZfgCK6TlvPH3Z13/P5pi6I57vyLE8qZYLrGVtwcm9UbUx1/mZ8Ukag== - -"@esbuild/win32-arm64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.16.tgz#423f46bb744aff897a5f74435469e1ef4952e343" - integrity sha512-TzoU2qwVe2boOHl/3KNBUv2PNUc38U0TNnzqOAcgPiD/EZxT2s736xfC2dYQbszAwo4MKzzwBV0iHjhfjxMimg== - -"@esbuild/win32-ia32@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.16.tgz#1978be5b192c7063bd2c8d5960eb213e1964740e" - integrity sha512-B8b7W+oo2yb/3xmwk9Vc99hC9bNolvqjaTZYEfMQhzdpBsjTvZBlXQ/teUE55Ww6sg//wlcDjOaqldOKyigWdA== - -"@esbuild/win32-x64@0.17.16": - version "0.17.16" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.16.tgz#260f19b0a3300d22c3a3f52722c671dc561edaa3" - integrity sha512-xJ7OH/nanouJO9pf03YsL9NAFQBHd8AqfrQd7Pf5laGyyTt/gToul6QYOA/i5i/q8y9iaM5DQFNTgpi995VkOg== +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@esbuild/android-arm64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.19.2.tgz#bc35990f412a749e948b792825eef7df0ce0e073" + integrity sha512-lsB65vAbe90I/Qe10OjkmrdxSX4UJDjosDgb8sZUKcg3oefEuW2OT2Vozz8ef7wrJbMcmhvCC+hciF8jY/uAkw== + +"@esbuild/android-arm@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.19.2.tgz#edd1c8f23ba353c197f5b0337123c58ff2a56999" + integrity sha512-tM8yLeYVe7pRyAu9VMi/Q7aunpLwD139EY1S99xbQkT4/q2qa6eA4ige/WJQYdJ8GBL1K33pPFhPfPdJ/WzT8Q== + +"@esbuild/android-x64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.19.2.tgz#2dcdd6e6f1f2d82ea1b746abd8da5b284960f35a" + integrity sha512-qK/TpmHt2M/Hg82WXHRc/W/2SGo/l1thtDHZWqFq7oi24AjZ4O/CpPSu6ZuYKFkEgmZlFoa7CooAyYmuvnaG8w== + +"@esbuild/darwin-arm64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.2.tgz#55b36bc06d76f5c243987c1f93a11a80d8fc3b26" + integrity sha512-Ora8JokrvrzEPEpZO18ZYXkH4asCdc1DLdcVy8TGf5eWtPO1Ie4WroEJzwI52ZGtpODy3+m0a2yEX9l+KUn0tA== + +"@esbuild/darwin-x64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.19.2.tgz#982524af33a6424a3b5cb44bbd52559623ad719c" + integrity sha512-tP+B5UuIbbFMj2hQaUr6EALlHOIOmlLM2FK7jeFBobPy2ERdohI4Ka6ZFjZ1ZYsrHE/hZimGuU90jusRE0pwDw== + +"@esbuild/freebsd-arm64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.2.tgz#8e478a0856645265fe79eac4b31b52193011ee06" + integrity sha512-YbPY2kc0acfzL1VPVK6EnAlig4f+l8xmq36OZkU0jzBVHcOTyQDhnKQaLzZudNJQyymd9OqQezeaBgkTGdTGeQ== + +"@esbuild/freebsd-x64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.2.tgz#01b96604f2540db023c73809bb8ae6cd1692d6f3" + integrity sha512-nSO5uZT2clM6hosjWHAsS15hLrwCvIWx+b2e3lZ3MwbYSaXwvfO528OF+dLjas1g3bZonciivI8qKR/Hm7IWGw== + +"@esbuild/linux-arm64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.19.2.tgz#7e5d2c7864c5c83ec789b59c77cd9c20d2594916" + integrity sha512-ig2P7GeG//zWlU0AggA3pV1h5gdix0MA3wgB+NsnBXViwiGgY77fuN9Wr5uoCrs2YzaYfogXgsWZbm+HGr09xg== + +"@esbuild/linux-arm@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.19.2.tgz#c32ae97bc0246664a1cfbdb4a98e7b006d7db8ae" + integrity sha512-Odalh8hICg7SOD7XCj0YLpYCEc+6mkoq63UnExDCiRA2wXEmGlK5JVrW50vZR9Qz4qkvqnHcpH+OFEggO3PgTg== + +"@esbuild/linux-ia32@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.19.2.tgz#3fc4f0fa026057fe885e4a180b3956e704f1ceaa" + integrity sha512-mLfp0ziRPOLSTek0Gd9T5B8AtzKAkoZE70fneiiyPlSnUKKI4lp+mGEnQXcQEHLJAcIYDPSyBvsUbKUG2ri/XQ== + +"@esbuild/linux-loong64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.19.2.tgz#633bcaea443f3505fb0ed109ab840c99ad3451a4" + integrity sha512-hn28+JNDTxxCpnYjdDYVMNTR3SKavyLlCHHkufHV91fkewpIyQchS1d8wSbmXhs1fiYDpNww8KTFlJ1dHsxeSw== + +"@esbuild/linux-mips64el@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.2.tgz#e0bff2898c46f52be7d4dbbcca8b887890805823" + integrity sha512-KbXaC0Sejt7vD2fEgPoIKb6nxkfYW9OmFUK9XQE4//PvGIxNIfPk1NmlHmMg6f25x57rpmEFrn1OotASYIAaTg== + +"@esbuild/linux-ppc64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.2.tgz#d75798da391f54a9674f8c143b9a52d1dbfbfdde" + integrity sha512-dJ0kE8KTqbiHtA3Fc/zn7lCd7pqVr4JcT0JqOnbj4LLzYnp+7h8Qi4yjfq42ZlHfhOCM42rBh0EwHYLL6LEzcw== + +"@esbuild/linux-riscv64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.2.tgz#012409bd489ed1bb9b775541d4a46c5ded8e6dd8" + integrity sha512-7Z/jKNFufZ/bbu4INqqCN6DDlrmOTmdw6D0gH+6Y7auok2r02Ur661qPuXidPOJ+FSgbEeQnnAGgsVynfLuOEw== + +"@esbuild/linux-s390x@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.19.2.tgz#ece3ed75c5a150de8a5c110f02e97d315761626b" + integrity sha512-U+RinR6aXXABFCcAY4gSlv4CL1oOVvSSCdseQmGO66H+XyuQGZIUdhG56SZaDJQcLmrSfRmx5XZOWyCJPRqS7g== + +"@esbuild/linux-x64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.19.2.tgz#dea187019741602d57aaf189a80abba261fbd2aa" + integrity sha512-oxzHTEv6VPm3XXNaHPyUTTte+3wGv7qVQtqaZCrgstI16gCuhNOtBXLEBkBREP57YTd68P0VgDgG73jSD8bwXQ== + +"@esbuild/netbsd-x64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.2.tgz#bbfd7cf9ab236a23ee3a41b26f0628c57623d92a" + integrity sha512-WNa5zZk1XpTTwMDompZmvQLHszDDDN7lYjEHCUmAGB83Bgs20EMs7ICD+oKeT6xt4phV4NDdSi/8OfjPbSbZfQ== + +"@esbuild/openbsd-x64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.2.tgz#fa5c4c6ee52a360618f00053652e2902e1d7b4a7" + integrity sha512-S6kI1aT3S++Dedb7vxIuUOb3oAxqxk2Rh5rOXOTYnzN8JzW1VzBd+IqPiSpgitu45042SYD3HCoEyhLKQcDFDw== + +"@esbuild/sunos-x64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.19.2.tgz#52a2ac8ac6284c02d25df22bb4cfde26fbddd68d" + integrity sha512-VXSSMsmb+Z8LbsQGcBMiM+fYObDNRm8p7tkUDMPG/g4fhFX5DEFmjxIEa3N8Zr96SjsJ1woAhF0DUnS3MF3ARw== + +"@esbuild/win32-arm64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.19.2.tgz#719ed5870855de8537aef8149694a97d03486804" + integrity sha512-5NayUlSAyb5PQYFAU9x3bHdsqB88RC3aM9lKDAz4X1mo/EchMIT1Q+pSeBXNgkfNmRecLXA0O8xP+x8V+g/LKg== + +"@esbuild/win32-ia32@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.19.2.tgz#24832223880b0f581962c8660f8fb8797a1e046a" + integrity sha512-47gL/ek1v36iN0wL9L4Q2MFdujR0poLZMJwhO2/N3gA89jgHp4MR8DKCmwYtGNksbfJb9JoTtbkoe6sDhg2QTA== + +"@esbuild/win32-x64@0.19.2": + version "0.19.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.2.tgz#1205014625790c7ff0e471644a878a65d1e34ab0" + integrity sha512-tcuhV7ncXBqbt/Ybf0IyrMcwVOAPDckMK9rXNHtF17UTK18OKLpg08glminN06pt2WCoALhXdLfSPbVvK/6fxw== "@eslint-community/eslint-utils@^4.2.0": version "4.4.0" @@ -1022,15 +1002,20 @@ dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.4.0": version "4.6.2" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.6.2.tgz#1816b5f6948029c5eaacb0703b850ee0cb37d8f8" integrity sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw== -"@eslint/eslintrc@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.1.tgz#18d635e24ad35f7276e8a49d135c7d3ca6a46f93" - integrity sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA== +"@eslint-community/regexpp@^4.6.1": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.8.0.tgz#11195513186f68d42fbf449f9a7136b2c0c92005" + integrity sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg== + +"@eslint/eslintrc@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" + integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -1042,15 +1027,15 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@^8.46.0": - version "8.46.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.46.0.tgz#3f7802972e8b6fe3f88ed1aabc74ec596c456db6" - integrity sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA== +"@eslint/js@8.48.0": + version "8.48.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.48.0.tgz#642633964e217905436033a2bd08bf322849b7fb" + integrity sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw== "@humanwhocodes/config-array@^0.11.10": - version "0.11.10" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.10.tgz#5a3ffe32cc9306365fb3fd572596cd602d5e12d2" - integrity sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ== + version "0.11.11" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" + integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" @@ -1282,41 +1267,36 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== +"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== "@jridgewell/set-array@^1.0.1": version "1.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== -"@jridgewell/sourcemap-codec@1.4.14": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/sourcemap-codec@^1.4.10": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": version "1.4.15" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.18" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" - integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" -"@jsii/check-node@1.85.0": - version "1.85.0" - resolved "https://registry.yarnpkg.com/@jsii/check-node/-/check-node-1.85.0.tgz#548d03f3f98d8b0edd9f4aeac7e128940dfd290d" - integrity sha512-dOrye7NuafkHADt3jk0TxMu/2sOHXxOYTwAuKj9L1/Te1xFfw2fzni80J12rTBQeVQxLVFNgDynsl2J7cuFFtQ== +"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.19" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== dependencies: - chalk "^4.1.2" - semver "^7.5.1" + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" "@jsii/check-node@1.86.1": version "1.86.1" @@ -1326,17 +1306,18 @@ chalk "^4.1.2" semver "^7.5.4" -"@jsii/spec@1.85.0", "@jsii/spec@^1.80.0", "@jsii/spec@^1.85.0": - version "1.85.0" - resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.85.0.tgz#b4e1c54d7da64bead609f7bf3f5ae1a3bcc3225b" - integrity sha512-RIBLbuKf7JOC54v1JnRuykwlL+qmOgivQM8LHJxiAsUKiuY5ypSzG0JyeoJ1+lMQ9zZ50Ho0HY1ZO+XH18ZgNg== +"@jsii/check-node@1.88.0": + version "1.88.0" + resolved "https://registry.yarnpkg.com/@jsii/check-node/-/check-node-1.88.0.tgz#fa20e012230c692ad36976cde29301be1ed28c67" + integrity sha512-AveFyqkJIb8qZvGk5nZal/8mEJB6lWhwqvAQLodHmqE3WzpmZD5+h+aspBVt0El5cEFRJ1k1mrQqhAnJCVpvxg== dependencies: - ajv "^8.12.0" + chalk "^4.1.2" + semver "^7.5.4" -"@jsii/spec@1.86.1", "@jsii/spec@^1.86.1": - version "1.86.1" - resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.86.1.tgz#0f8911f5d5cfb2606628f143ac7d195b7870c890" - integrity sha512-wD0Y0pVg/1jjbZImk2FIuj+YdpwLFEsKCpoC3XKLJyNyUZPSoJzrt3phLV8HRLmH0m52kw6rh044OIowedcc9A== +"@jsii/spec@1.88.0", "@jsii/spec@^1.85.0", "@jsii/spec@^1.86.1", "@jsii/spec@^1.88.0": + version "1.88.0" + resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.88.0.tgz#46216d3ca93872b4d878bb81f0cc7b28dc621c28" + integrity sha512-Q6xirxPM06TRW0GcsHa+tzPZLwe9I+mFYx5BaNMimcv21u6bQnxfynZMgNhHqvLYCmP37HWg0SboUYTa5JROzw== dependencies: ajv "^8.12.0" @@ -1447,18 +1428,6 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@pkgr/utils@^2.3.1": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.4.2.tgz#9e638bbe9a6a6f165580dc943f138fd3309a2cbc" - integrity sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw== - dependencies: - cross-spawn "^7.0.3" - fast-glob "^3.3.0" - is-glob "^4.0.3" - open "^9.1.0" - picocolors "^1.0.0" - tslib "^2.6.0" - "@pnpm/config.env-replace@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz#ab29da53df41e8948a00f2433f085f54de8b3a4c" @@ -1480,17 +1449,26 @@ "@pnpm/network.ca-file" "^1.0.1" config-chain "^1.1.11" -"@sigstore/bundle@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-1.0.0.tgz#2f2f4867f434760f4bc6f4b4bbccbaecd4143bc3" - integrity sha512-yLvrWDOh6uMOUlFCTJIZEnwOT9Xte7NPXUqVexEKGSF5XtBAuSg5du0kn3dRR0p47a4ah10Y0mNt8+uyeQXrBQ== +"@sigstore/bundle@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-1.1.0.tgz#17f8d813b09348b16eeed66a8cf1c3d6bd3d04f1" + integrity sha512-PFutXEy0SmQxYI4texPw3dd2KewuNqv7OuK1ZFtY2fM754yhvG2KdgwIhRnoEE2uHdtdGNQ8s0lb94dW9sELog== dependencies: "@sigstore/protobuf-specs" "^0.2.0" "@sigstore/protobuf-specs@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.2.0.tgz#5801b2a4d10afe1577be6133be6b132b5677c18c" - integrity sha512-8ZhZKAVfXjIspDWwm3D3Kvj0ddbJ0HqDZ/pOs5cx88HpT8mVsotFrg7H1UMnXOuDHz6Zykwxn4mxG3QLuN+RUg== + version "0.2.1" + resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz#be9ef4f3c38052c43bd399d3f792c97ff9e2277b" + integrity sha512-XTWVxnWJu+c1oCshMLwnKvz8ZQJJDVOlciMfgpJBQbThVjKTCG8dwyhgLngBD2KN0ap9F/gOV8rFDEx8uh7R2A== + +"@sigstore/sign@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@sigstore/sign/-/sign-1.0.0.tgz#6b08ebc2f6c92aa5acb07a49784cb6738796f7b4" + integrity sha512-INxFVNQteLtcfGmcoldzV6Je0sbbfh9I16DM4yJPw3j5+TFP8X6uIiA18mvpEa9yyeycAKgPmOA3X9hVdVTPUA== + dependencies: + "@sigstore/bundle" "^1.1.0" + "@sigstore/protobuf-specs" "^0.2.0" + make-fetch-happen "^11.0.1" "@sigstore/tuf@^1.0.3": version "1.0.3" @@ -1519,12 +1497,12 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@smithy/abort-controller@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-2.0.1.tgz#ddb5dd8c37016e8fcf772bd9c80e900860d74ae6" - integrity sha512-0s7XjIbsTwZyUW9OwXQ8J6x1UiA1TNCh60Vaw56nHahL7kUZsLhmTlWiaxfLkFtO2Utkj8YewcpHTYpxaTzO+w== +"@smithy/abort-controller@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-2.0.5.tgz#9602a9b362e84c0d043d820c4aba5d9b78028a84" + integrity sha512-byVZ2KWLMPYAZGKjRpniAzLcygJO4ruClZKdJTuB0eCB76ONFTdptBHlviHpAZXknRz7skYWPfcgO9v30A1SyA== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" "@smithy/chunked-blob-reader-native@^2.0.0": @@ -1542,135 +1520,118 @@ dependencies: tslib "^2.5.0" -"@smithy/config-resolver@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-2.0.1.tgz#ea7981f4716961889d1c7d16aaa956cf7dae2b79" - integrity sha512-l83Pm7hV+8CBQOCmBRopWDtF+CURUJol7NsuPYvimiDhkC2F8Ba9T1imSFE+pD1UIJ9jlsDPAnZfPJT5cjnuEw== +"@smithy/config-resolver@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-2.0.5.tgz#d64c1c83a773ca5a038146d4b537c202b6c6bfaf" + integrity sha512-n0c2AXz+kjALY2FQr7Zy9zhYigXzboIh1AuUUVCqFBKFtdEvTwnwPXrTDoEehLiRTUHNL+4yzZ3s+D0kKYSLSg== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" "@smithy/util-config-provider" "^2.0.0" "@smithy/util-middleware" "^2.0.0" tslib "^2.5.0" -"@smithy/credential-provider-imds@^2.0.0", "@smithy/credential-provider-imds@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.1.tgz#e034f3d8ee6ad178becb267886056233870661d0" - integrity sha512-8VxriuRINNEfVZjEFKBY75y9ZWAx73DZ5K/u+3LmB6r8WR2h3NaFxFKMlwlq0uzNdGhD1ouKBn9XWEGYHKiPLw== - dependencies: - "@smithy/node-config-provider" "^2.0.1" - "@smithy/property-provider" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" - tslib "^2.5.0" - -"@smithy/eventstream-codec@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-codec/-/eventstream-codec-1.1.0.tgz#bfe1308ba84ff3db3e79dc1ced8231c52ac0fc36" - integrity sha512-3tEbUb8t8an226jKB6V/Q2XU/J53lCwCzULuBPEaF4JjSh+FlCMp7TmogE/Aij5J9DwlsZ4VAD/IRDuQ/0ZtMw== +"@smithy/credential-provider-imds@^2.0.0", "@smithy/credential-provider-imds@^2.0.7": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.7.tgz#1e0bc01f348cd559b28fd4673f51e3d4c6c44cbb" + integrity sha512-XivkZj/pipzpQPxgleE1odwJQ6oDsVViB4VUO/HRDI4EdEfZjud44USupOUOa/xOjS39/75DYB4zgTbyV+totw== dependencies: - "@aws-crypto/crc32" "3.0.0" - "@smithy/types" "^1.2.0" - "@smithy/util-hex-encoding" "^1.1.0" + "@smithy/node-config-provider" "^2.0.7" + "@smithy/property-provider" "^2.0.6" + "@smithy/types" "^2.2.2" + "@smithy/url-parser" "^2.0.5" tslib "^2.5.0" -"@smithy/eventstream-codec@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-codec/-/eventstream-codec-2.0.1.tgz#b84e224db346066e817ca9ca23260798a1aa071e" - integrity sha512-/IiNB7gQM2y2ZC/GAWOWDa8+iXfhr1g9Xe5979cQEOdCWDISvrAiv18cn3OtIQUhbYOR3gm7QtCpkq1to2takQ== +"@smithy/eventstream-codec@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-codec/-/eventstream-codec-2.0.5.tgz#771f50657f1958db3e19b9f2726d62e2e0672546" + integrity sha512-iqR6OuOV3zbQK8uVs9o+9AxhVk8kW9NAxA71nugwUB+kTY9C35pUd0A5/m4PRT0Y0oIW7W4kgnSR3fdYXQjECw== dependencies: "@aws-crypto/crc32" "3.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" "@smithy/util-hex-encoding" "^2.0.0" tslib "^2.5.0" -"@smithy/eventstream-serde-browser@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.1.tgz#7d19409327b6015b19ac926833185be2d5eee357" - integrity sha512-9E1/6ZGF7nB/Td3G1kcatU7VjjP8eZ/p/Q+0KsZc1AUPyv4lR15pmWnWj3iGBEGYI9qZBJ/7a/wPEPayabmA3Q== +"@smithy/eventstream-serde-browser@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.5.tgz#5f4d3d78a9fcb0a5a6f5b20f69141c8cc6b0ef6b" + integrity sha512-8NU51y94qFJbxL6SmvgWDfITHO/svvbAigkLYk2pckX17TGCSf4EXuGpGLliJp5Ljh5+vASC7mUH2jYX7MWBxA== dependencies: - "@smithy/eventstream-serde-universal" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/eventstream-serde-universal" "^2.0.5" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@smithy/eventstream-serde-config-resolver@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.1.tgz#fa3562f771a0d3dc4bc83ad7b7f437deda53b3ff" - integrity sha512-J8a+8HH8oDPIgq8Px/nPLfu9vpIjQ7XUPtP3orbs8KUh0GznNthSTy1xZP5RXjRqGQEkxPvsHf1po2+QOsgNFw== +"@smithy/eventstream-serde-config-resolver@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.5.tgz#1e551a308dc2e91b8c732815077dbf99beb1300f" + integrity sha512-u3gvukRaTH4X6tsryuZ4T1WGIEP34fPaTTzphFDJe8GJz/k11oBW1MPnkcaucBMxLnObK9swCF85j5cp1Kj1oA== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@smithy/eventstream-serde-node@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.1.tgz#d456591097f94e4fd29448fd7b33e2e1f79bfe61" - integrity sha512-wklowUz0zXJuqC7FMpriz66J8OAko3z6INTg+iMJWYB1bWv4pc5V7q36PxlZ0RKRbj0u+EThlozWgzE7Stz2Sw== +"@smithy/eventstream-serde-node@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.5.tgz#ceea04afcef95caf0e4148c606721c1882a1d9b5" + integrity sha512-/C8jb+k/vKUBIe80D30vzjvRXlJf76kG2AJY7/NwiqWuD2usRuuDFCDaswXdVsSh9P1+FeaxZ48chsK10yDryQ== dependencies: - "@smithy/eventstream-serde-universal" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/eventstream-serde-universal" "^2.0.5" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@smithy/eventstream-serde-universal@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.1.tgz#206e1cd437b0da09a2a45af3ddc3b7e3b9789734" - integrity sha512-WPPylIgVZ6wOYVgpF0Rs1LlocYyj248MRtKEEehnDvC+0tV7wmGt7H/SchCh10W4y4YUxuzPlW+mUvVMGmLSVg== +"@smithy/eventstream-serde-universal@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.5.tgz#5a656557575ee4ad69515434e45f19f7816f09f8" + integrity sha512-+vHvbQtlSVYTQ/20tNpVaKi0EpTR7E8GoEUHJypRZIRgiT03b3h2MAWk+SNaqMrCJrYG9vKLkJFzDylRlUvDWg== dependencies: - "@smithy/eventstream-codec" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/eventstream-codec" "^2.0.5" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@smithy/fetch-http-handler@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-2.0.1.tgz#5c8903897d3fd7ae3758ed7760d559d72d27e902" - integrity sha512-/SoU/ClazgcdOxgE4zA7RX8euiELwpsrKCSvulVQvu9zpmqJRyEJn8ZTWYFV17/eHOBdHTs9kqodhNhsNT+cUw== +"@smithy/fetch-http-handler@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-2.0.5.tgz#822510720598b4306e7c71e839eea34b6928c66b" + integrity sha512-EzFoMowdBNy1VqtvkiXgPFEdosIAt4/4bgZ8uiDiUyfhmNXq/3bV+CagPFFBsgFOR/X2XK4zFZHRsoa7PNHVVg== dependencies: - "@smithy/protocol-http" "^2.0.1" - "@smithy/querystring-builder" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/protocol-http" "^2.0.5" + "@smithy/querystring-builder" "^2.0.5" + "@smithy/types" "^2.2.2" "@smithy/util-base64" "^2.0.0" tslib "^2.5.0" -"@smithy/hash-blob-browser@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.1.tgz#3755965d74e2438ed337f5e11cd4d332d8945a9e" - integrity sha512-i/o2+sHb4jDRz5nf2ilTTbC0nVmm4LO//FbODCAB7pbzMdywxbZ6z+q56FmEa8R+aFbtApxQ1SJ3umEiNz6IPg== +"@smithy/hash-blob-browser@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.5.tgz#5cc622f6d448f3e87134eb6d4c4b608b5a4e2002" + integrity sha512-ZVAUBtJXGf9bEko4/RwWcTK6d3b/ZmQMxJMrxOOcQhVDiqny9zI0mzgstO4Oxz3135R7S3V/bbGw3w3woCYpQg== dependencies: "@smithy/chunked-blob-reader" "^2.0.0" "@smithy/chunked-blob-reader-native" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@smithy/hash-node@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-2.0.1.tgz#458b74378cbfecf6dcd1ffc6b7ec7d29a4247efd" - integrity sha512-oTKYimQdF4psX54ZonpcIE+MXjMUWFxLCNosjPkJPFQ9whRX0K/PFX/+JZGRQh3zO9RlEOEUIbhy9NO+Wha6hw== +"@smithy/hash-node@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-2.0.5.tgz#f3558c1553f846148c3e5d10a815429e1b357668" + integrity sha512-mk551hIywBITT+kXruRNXk7f8Fy7DTzBjZJSr/V6nolYKmUHIG3w5QU6nO9qPYEQGKc/yEPtkpdS28ndeG93lA== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" "@smithy/util-buffer-from" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@smithy/hash-stream-node@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/hash-stream-node/-/hash-stream-node-2.0.1.tgz#6a5307b12ff11bc72d28b211aca086d8d0f992a0" - integrity sha512-AequnQdPRuXf4AuvvFlSjnkWI460xxhAd6y362gFtOE4jjJLLXblbMAXVFrkV8/pDMGNjpVegVSpRmHXZsbKhg== +"@smithy/hash-stream-node@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/hash-stream-node/-/hash-stream-node-2.0.5.tgz#98175965ee7057312b464fcd63e8e1bd4142e38e" + integrity sha512-XiR4Aoux5kXy8OWPLQisKy3GPmm0l6deHepvPvr4MUzIwa5XWazG3JdbZXy+mk93CvEZrOwKPHU5Kul6QybJiQ== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@smithy/invalid-dependency@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-2.0.1.tgz#bb49b297e2141ec2ba6e131e0946af0ba59509e2" - integrity sha512-2q/Eb0AE662zwyMV+z+TL7deBwcHCgaZZGc0RItamBE8kak3MzCi/EZCNoFWoBfxgQ4jfR12wm8KKsSXhJzJtQ== - dependencies: - "@smithy/types" "^2.0.2" - tslib "^2.5.0" - -"@smithy/is-array-buffer@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@smithy/is-array-buffer/-/is-array-buffer-1.1.0.tgz#29948072da2b57575aa9898cda863932e842ab11" - integrity sha512-twpQ/n+3OWZJ7Z+xu43MJErmhB/WO/mMTnqR6PwWQShvSJ/emx5d1N59LQZk6ZpTAeuRWrc+eHhkzTp9NFjNRQ== +"@smithy/invalid-dependency@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-2.0.5.tgz#b07bdbc43403977b8bcae6de19a96e184f2eb655" + integrity sha512-0wEi+JT0hM+UUwrJVYbqjuGFhy5agY/zXyiN7BNAJ1XoCDjU5uaNSj8ekPWsXd/d4yM6NSe8UbPd8cOc1+3oBQ== dependencies: + "@smithy/types" "^2.2.2" tslib "^2.5.0" "@smithy/is-array-buffer@^2.0.0": @@ -1680,54 +1641,54 @@ dependencies: tslib "^2.5.0" -"@smithy/md5-js@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/md5-js/-/md5-js-2.0.1.tgz#e13ea73934101d89c726a4332c6a90f6188e3278" - integrity sha512-8WWOtwWMmIDgTkRv1o3opy3ABsRXs4/XunETK53ckxQRAiOML1PlnqLBK9Uwk9bvOD6cpmsC6dioIfmKGpJ25w== +"@smithy/md5-js@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/md5-js/-/md5-js-2.0.5.tgz#02173e4e21105819efa8ebaa17eab23d5663f896" + integrity sha512-k5EOte/Ye2r7XBVaXv2rhiehk6l3T4uRiPF+pnxKEc+G9Fwd1xAXBDZrtOq1syFPBKBmVfNszG4nevngST7NKg== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@smithy/middleware-content-length@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-2.0.1.tgz#86005cd4cb45eff5420730abe88e08d22c582d79" - integrity sha512-IZhRSk5GkVBcrKaqPXddBS2uKhaqwBgaSgbBb1OJyGsKe7SxRFbclWS0LqOR9fKUkDl+3lL8E2ffpo6EQg0igw== +"@smithy/middleware-content-length@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-2.0.5.tgz#b2008c6b664c4c67fb255ef5a9fd5f4bd2c914f6" + integrity sha512-E7VwV5H02fgZIUGRli4GevBCAPvkyEI/fgl9SU47nPPi3DAAX3nEtUb8xfGbXjOcJ5BdSUoWWZn42tEd/blOqA== dependencies: - "@smithy/protocol-http" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/protocol-http" "^2.0.5" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@smithy/middleware-endpoint@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-2.0.1.tgz#4e992dd2c9dedbff776150045904c5455df4eaf7" - integrity sha512-uz/KI1MBd9WHrrkVFZO4L4Wyv24raf0oR4EsOYEeG5jPJO5U+C7MZGLcMxX8gWERDn1sycBDqmGv8fjUMLxT6w== +"@smithy/middleware-endpoint@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-2.0.5.tgz#6a16361dc527262958194e48343733ac6285776b" + integrity sha512-tyzDuoNTbsMQCq5Xkc4QOt6e2GACUllQIV8SQ5fc59FtOIV9/vbf58/GxVjZm2o8+MMbdDBANjTDZe/ijZKfyA== dependencies: - "@smithy/middleware-serde" "^2.0.1" - "@smithy/types" "^2.0.2" - "@smithy/url-parser" "^2.0.1" + "@smithy/middleware-serde" "^2.0.5" + "@smithy/types" "^2.2.2" + "@smithy/url-parser" "^2.0.5" "@smithy/util-middleware" "^2.0.0" tslib "^2.5.0" -"@smithy/middleware-retry@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-2.0.1.tgz#d6c0aa9d117140a429951c8a1a92e05d9d0c218c" - integrity sha512-NKHF4i0gjSyjO6C0ZyjEpNqzGgIu7s8HOK6oT/1Jqws2Q1GynR1xV8XTUs1gKXeaNRzbzKQRewHHmfPwZjOtHA== +"@smithy/middleware-retry@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-2.0.5.tgz#bbf8858aeccdfe11837f89635cb6ce8a8e304518" + integrity sha512-ulIfbFyzQTVnJbLjUl1CTSi0etg6tej/ekwaLp0Gn8ybUkDkKYa+uB6CF/m2J5B6meRwyJlsryR+DjaOVyiicg== dependencies: - "@smithy/protocol-http" "^2.0.1" + "@smithy/protocol-http" "^2.0.5" "@smithy/service-error-classification" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" "@smithy/util-middleware" "^2.0.0" "@smithy/util-retry" "^2.0.0" tslib "^2.5.0" uuid "^8.3.2" -"@smithy/middleware-serde@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-2.0.1.tgz#daa38ebc5873f1f7d0430e7a75b7255b69c70016" - integrity sha512-uKxPaC6ItH9ZXdpdqNtf8sda7GcU4SPMp0tomq/5lUg9oiMa/Q7+kD35MUrpKaX3IVXVrwEtkjCU9dogZ/RAUA== +"@smithy/middleware-serde@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-2.0.5.tgz#3f3635cb437a3fba46cd1407d3adf53d41328574" + integrity sha512-in0AA5sous74dOfTGU9rMJBXJ0bDVNxwdXtEt5lh3FVd2sEyjhI+rqpLLRF1E4ixbw3RSEf80hfRpcPdjg4vvQ== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" "@smithy/middleware-stack@^2.0.0": @@ -1737,58 +1698,58 @@ dependencies: tslib "^2.5.0" -"@smithy/node-config-provider@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-2.0.1.tgz#5a17c2564dc9689d523408c9a6dea9ca1330c47f" - integrity sha512-Zoel4CPkKRTQ2XxmozZUfqBYqjPKL53/SvTDhJHj+VBSiJy6MXRav1iDCyFPS92t40Uh+Yi+Km5Ch3hQ+c/zSA== +"@smithy/node-config-provider@^2.0.5", "@smithy/node-config-provider@^2.0.7": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-2.0.7.tgz#2333df040d55f9d8dea850d31deda8e39b923b4b" + integrity sha512-GuLxhnf0aVQsfQp4ZWaM1TRCIndpQjAswyFcmDFRNf4yFqpxpLPDeV540+O0Z21Hmu3deoQm/dCPXbVn90PYzg== dependencies: - "@smithy/property-provider" "^2.0.1" - "@smithy/shared-ini-file-loader" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/property-provider" "^2.0.6" + "@smithy/shared-ini-file-loader" "^2.0.6" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@smithy/node-http-handler@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-2.0.1.tgz#7a1b23e30c5125ec31062a8b5edbc9fdd96ac651" - integrity sha512-Zv3fxk3p9tsmPT2CKMsbuwbbxnq2gzLDIulxv+yI6aE+02WPYorObbbe9gh7SW3weadMODL1vTfOoJ9yFypDzg== +"@smithy/node-http-handler@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-2.0.5.tgz#19c1bdd4d61502bc9c793dddb8ce995626ca6585" + integrity sha512-lZm5DZf4b3V0saUw9WTC4/du887P6cy2fUyQgQQKRRV6OseButyD5yTzeMmXE53CaXJBMBsUvvIQ0hRVxIq56w== dependencies: - "@smithy/abort-controller" "^2.0.1" - "@smithy/protocol-http" "^2.0.1" - "@smithy/querystring-builder" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/abort-controller" "^2.0.5" + "@smithy/protocol-http" "^2.0.5" + "@smithy/querystring-builder" "^2.0.5" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@smithy/property-provider@^2.0.0", "@smithy/property-provider@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-2.0.1.tgz#4c359f5063a9c664599f88be00e3f9b3e1021d4d" - integrity sha512-pmJRyY9SF6sutWIktIhe+bUdSQDxv/qZ4mYr3/u+u45riTPN7nmRxPo+e4sjWVoM0caKFjRSlj3tf5teRFy0Vg== +"@smithy/property-provider@^2.0.0", "@smithy/property-provider@^2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-2.0.6.tgz#2dbf4b4064b6936f97052a29e75144c5c538a5b5" + integrity sha512-CVem6ZkkWxbTnhjDLyLESY0oLA6IUZYtdqrCpGQKUXaFBOuc/izjm7fIFGBxEbjZ1EGcH9hHxrjqX36RWULNRg== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@smithy/protocol-http@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-2.0.1.tgz#4257b9b8803f1e7638022a9cc6be8ea0abacac26" - integrity sha512-mrkMAp0wtaDEIkgRObWYxI1Kun1tm6Iu6rK+X4utb6Ah7Uc3Kk4VIWwK/rBHdYGReiLIrxFCB1rq4a2gyZnSgg== +"@smithy/protocol-http@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-2.0.5.tgz#ff7779fc8fcd3fe52e71fd07565b518f0937e8ba" + integrity sha512-d2hhHj34mA2V86doiDfrsy2fNTnUOowGaf9hKb0hIPHqvcnShU4/OSc4Uf1FwHkAdYF3cFXTrj5VGUYbEuvMdw== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@smithy/querystring-builder@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-2.0.1.tgz#c8326d27e3796cac8b46f580bb067e83f50b4375" - integrity sha512-bp+93WFzx1FojVEIeFPtG0A1pKsFdCUcZvVdZdRlmNooOUrz9Mm9bneRd8hDwAQ37pxiZkCOxopSXXRQN10mYw== +"@smithy/querystring-builder@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-2.0.5.tgz#c5a873769de56ef57ae3b4d2c58fc7f68184a89c" + integrity sha512-4DCX9krxLzATj+HdFPC3i8pb7XTAWzzKqSw8aTZMjXjtQY+vhe4azMAqIvbb6g7JKwIkmkRAjK6EXO3YWSnJVQ== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" "@smithy/util-uri-escape" "^2.0.0" tslib "^2.5.0" -"@smithy/querystring-parser@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-2.0.1.tgz#915872aa7983218da3e87144a5b729dd6ae6f50f" - integrity sha512-h+e7k1z+IvI2sSbUBG9Aq46JsgLl4UqIUl6aigAlRBj+P6ocNXpM6Yn1vMBw5ijtXeZbYpd1YvCxwDgdw3jhmg== +"@smithy/querystring-parser@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-2.0.5.tgz#aec6733ed4497402634978e7026d0d00661594d6" + integrity sha512-C2stCULH0r54KBksv3AWcN8CLS3u9+WsEW8nBrvctrJ5rQTNa1waHkffpVaiKvcW2nP0aIMBPCobD/kYf/q9mA== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" "@smithy/service-error-classification@^2.0.0": @@ -1796,73 +1757,52 @@ resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-2.0.0.tgz#bbce07c9c529d9333d40db881fd4a1795dd84892" integrity sha512-2z5Nafy1O0cTf69wKyNjGW/sNVMiqDnb4jgwfMG8ye8KnFJ5qmJpDccwIbJNhXIfbsxTg9SEec2oe1cexhMJvw== -"@smithy/shared-ini-file-loader@^2.0.0", "@smithy/shared-ini-file-loader@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.0.1.tgz#47278552cf9462e731077da2f66a32d21b775e15" - integrity sha512-a463YiZrPGvM+F336rIF8pLfQsHAdCRAn/BiI/EWzg5xLoxbC7GSxIgliDDXrOu0z8gT3nhVsif85eU6jyct3A== +"@smithy/shared-ini-file-loader@^2.0.0", "@smithy/shared-ini-file-loader@^2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.0.6.tgz#95dbc455e56a261ffe0b32bb3e640292b2f31798" + integrity sha512-NO6dHqho6APbVR0DxPtYoL4KXBqUeSM3Slsd103MOgL50YbzzsQmMLtDMZ87W8MlvvCN0tuiq+OrAO/rM7hTQg== dependencies: - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" tslib "^2.5.0" -"@smithy/signature-v4@^1.0.1": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-1.1.0.tgz#e85309995c2475d39598a4f56e68b7ed856bdfa6" - integrity sha512-fDo3m7YqXBs7neciOePPd/X9LPm5QLlDMdIC4m1H6dgNLnXfLMFNIxEfPyohGA8VW9Wn4X8lygnPSGxDZSmp0Q== - dependencies: - "@smithy/eventstream-codec" "^1.1.0" - "@smithy/is-array-buffer" "^1.1.0" - "@smithy/types" "^1.2.0" - "@smithy/util-hex-encoding" "^1.1.0" - "@smithy/util-middleware" "^1.1.0" - "@smithy/util-uri-escape" "^1.1.0" - "@smithy/util-utf8" "^1.1.0" - tslib "^2.5.0" - -"@smithy/signature-v4@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-2.0.1.tgz#1f9e72930def3c25a3918ee7b562044fecbdaef4" - integrity sha512-jztv5Mirca42ilxmMDjzLdXcoAmRhZskGafGL49sRo5u7swEZcToEFrq6vtX5YMbSyTVrE9Teog5EFexY5Ff2Q== +"@smithy/signature-v4@^2.0.0", "@smithy/signature-v4@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-2.0.5.tgz#48fbc1a25f2f44bbd9217927518c8fe439419f4d" + integrity sha512-ABIzXmUDXK4n2c9cXjQLELgH2RdtABpYKT+U131e2I6RbCypFZmxIHmIBufJzU2kdMCQ3+thBGDWorAITFW04A== dependencies: - "@smithy/eventstream-codec" "^2.0.1" + "@smithy/eventstream-codec" "^2.0.5" "@smithy/is-array-buffer" "^2.0.0" - "@smithy/types" "^2.0.2" + "@smithy/types" "^2.2.2" "@smithy/util-hex-encoding" "^2.0.0" "@smithy/util-middleware" "^2.0.0" "@smithy/util-uri-escape" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@smithy/smithy-client@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-2.0.1.tgz#34572ada6eccb62e6f0b38b6a9dc261e2cdf4d24" - integrity sha512-LHC5m6tYpEu1iNbONfvMbwtErboyTZJfEIPoD78Ei5MVr36vZQCaCla5mvo36+q/a2NAk2//fA5Rx3I1Kf7+lQ== +"@smithy/smithy-client@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-2.0.5.tgz#7941449f146d2c61d34670779d77d4a085141bc1" + integrity sha512-kCTFr8wfOAWKDzGvfBElc6shHigWtHNhMQ1IbosjC4jOlayFyZMSs2PysKB+Ox/dhQ41KqOzgVjgiQ+PyWqHMQ== dependencies: "@smithy/middleware-stack" "^2.0.0" - "@smithy/types" "^2.0.2" - "@smithy/util-stream" "^2.0.1" + "@smithy/types" "^2.2.2" + "@smithy/util-stream" "^2.0.5" tslib "^2.5.0" -"@smithy/types@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@smithy/types/-/types-1.2.0.tgz#9dc65767b0ee3d6681704fcc67665d6fc9b6a34e" - integrity sha512-z1r00TvBqF3dh4aHhya7nz1HhvCg4TRmw51fjMrh5do3h+ngSstt/yKlNbHeb9QxJmFbmN8KEVSWgb1bRvfEoA== - dependencies: - tslib "^2.5.0" - -"@smithy/types@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@smithy/types/-/types-2.0.2.tgz#49d42724c909e845bfd80a2e195740614ce497f3" - integrity sha512-wcymEjIXQ9+NEfE5Yt5TInAqe1o4n+Nh+rh00AwoazppmUt8tdo6URhc5gkDcOYrcvlDVAZE7uG69nDpEGUKxw== +"@smithy/types@^2.2.2": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@smithy/types/-/types-2.2.2.tgz#bd8691eb92dd07ac33b83e0e1c45f283502b1bf7" + integrity sha512-4PS0y1VxDnELGHGgBWlDksB2LJK8TG8lcvlWxIsgR+8vROI7Ms8h1P4FQUx+ftAX2QZv5g1CJCdhdRmQKyonyw== dependencies: tslib "^2.5.0" -"@smithy/url-parser@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-2.0.1.tgz#c0712fd7bde198644ffd57b202aa5d54bd437520" - integrity sha512-NpHVOAwddo+OyyIoujDL9zGL96piHWrTNXqltWmBvlUoWgt1HPyBuKs6oHjioyFnNZXUqveTOkEEq0U5w6Uv8A== +"@smithy/url-parser@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-2.0.5.tgz#09fa623076bb5861892930628bf368d5c79fd7d9" + integrity sha512-OdMBvZhpckQSkugCXNJQCvqJ71wE7Ftxce92UOQLQ9pwF6hoS5PLL7wEfpnuEXtStzBqJYkzu1C1ZfjuFGOXAA== dependencies: - "@smithy/querystring-parser" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/querystring-parser" "^2.0.5" + "@smithy/types" "^2.2.2" tslib "^2.5.0" "@smithy/util-base64@^2.0.0": @@ -1880,19 +1820,11 @@ dependencies: tslib "^2.5.0" -"@smithy/util-body-length-node@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@smithy/util-body-length-node/-/util-body-length-node-2.0.0.tgz#4870b71cb9ded0123d984898ce952ce56896bc53" - integrity sha512-ZV7Z/WHTMxHJe/xL/56qZwSUcl63/5aaPAGjkfynJm4poILjdD4GmFI+V+YWabh2WJIjwTKZ5PNsuvPQKt93Mg== - dependencies: - tslib "^2.5.0" - -"@smithy/util-buffer-from@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@smithy/util-buffer-from/-/util-buffer-from-1.1.0.tgz#a000bd9f95c0e8d5b0edb0112f2a586daa5bed49" - integrity sha512-9m6NXE0ww+ra5HKHCHig20T+FAwxBAm7DIdwc/767uGWbRcY720ybgPacQNB96JMOI7xVr/CDa3oMzKmW4a+kw== +"@smithy/util-body-length-node@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@smithy/util-body-length-node/-/util-body-length-node-2.1.0.tgz#313a5f7c5017947baf5fa018bfc22628904bbcfa" + integrity sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw== dependencies: - "@smithy/is-array-buffer" "^1.1.0" tslib "^2.5.0" "@smithy/util-buffer-from@^2.0.0": @@ -1910,33 +1842,26 @@ dependencies: tslib "^2.5.0" -"@smithy/util-defaults-mode-browser@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.1.tgz#650805fc2f308dee8efcf812392a6578ebcc652d" - integrity sha512-w72Qwsb+IaEYEFtYICn0Do42eFju78hTaBzzJfT107lFOPdbjWjKnFutV+6GL/nZd5HWXY7ccAKka++C3NrjHw== +"@smithy/util-defaults-mode-browser@^2.0.5": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.6.tgz#486279f7adff65db6d09c294b2e8a9641076c3a6" + integrity sha512-h8xyKTZIIom62DN4xbPUmL+RL1deZcK1qJGmCr4c2yXjOrs5/iZ1VtQQcl+xP78620ga/565AikZE1sktdg2yA== dependencies: - "@smithy/property-provider" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/property-provider" "^2.0.6" + "@smithy/types" "^2.2.2" bowser "^2.11.0" tslib "^2.5.0" -"@smithy/util-defaults-mode-node@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.1.tgz#3a8fc607735481878c7c4c739da358bd0bb9bcae" - integrity sha512-dNF45caelEBambo0SgkzQ0v76m4YM+aFKZNTtSafy7P5dVF8TbjZuR2UX1A5gJABD9XK6lzN+v/9Yfzj/EDgGg== - dependencies: - "@smithy/config-resolver" "^2.0.1" - "@smithy/credential-provider-imds" "^2.0.1" - "@smithy/node-config-provider" "^2.0.1" - "@smithy/property-provider" "^2.0.1" - "@smithy/types" "^2.0.2" - tslib "^2.5.0" - -"@smithy/util-hex-encoding@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@smithy/util-hex-encoding/-/util-hex-encoding-1.1.0.tgz#b5ba919aa076a3fd5e93e368e34ae2b732fa2090" - integrity sha512-7UtIE9eH0u41zpB60Jzr0oNCQ3hMJUabMcKRUVjmyHTXiWDE4vjSqN6qlih7rCNeKGbioS7f/y2Jgym4QZcKFg== - dependencies: +"@smithy/util-defaults-mode-node@^2.0.5": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.7.tgz#ec47bf7d717e954f25c4d462b614fdb00990826e" + integrity sha512-2C1YfmYJj9bpM/cRAgQppYNzPd8gDEXZ5XIVDuEQg3TmmIiinZaFf/HsHYo9NK/PMy5oawJVdIuR7SVriIo1AQ== + dependencies: + "@smithy/config-resolver" "^2.0.5" + "@smithy/credential-provider-imds" "^2.0.7" + "@smithy/node-config-provider" "^2.0.7" + "@smithy/property-provider" "^2.0.6" + "@smithy/types" "^2.2.2" tslib "^2.5.0" "@smithy/util-hex-encoding@^2.0.0": @@ -1946,13 +1871,6 @@ dependencies: tslib "^2.5.0" -"@smithy/util-middleware@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-1.1.0.tgz#9f186489437ca2ef753c5e1de2930f76fd1edc14" - integrity sha512-6hhckcBqVgjWAqLy2vqlPZ3rfxLDhFWEmM7oLh2POGvsi7j0tHkbN7w4DFhuBExVJAbJ/qqxqZdRY6Fu7/OezQ== - dependencies: - tslib "^2.5.0" - "@smithy/util-middleware@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-2.0.0.tgz#706681d4a1686544a2275f68266304233f372c99" @@ -1968,27 +1886,20 @@ "@smithy/service-error-classification" "^2.0.0" tslib "^2.5.0" -"@smithy/util-stream@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-2.0.1.tgz#cbe2af5704a6050b9075835a8e7251185901864b" - integrity sha512-2a0IOtwIKC46EEo7E7cxDN8u2jwOiYYJqcFKA6rd5rdXqKakHT2Gc+AqHWngr0IEHUfW92zX12wRQKwyoqZf2Q== +"@smithy/util-stream@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-2.0.5.tgz#a59f6e5327dfa23c3302f578ea023674fc7fa42f" + integrity sha512-ylx27GwI05xLpYQ4hDIfS15vm+wYjNN0Sc2P0FxuzgRe8v0BOLHppGIQ+Bezcynk8C9nUzsUue3TmtRhjut43g== dependencies: - "@smithy/fetch-http-handler" "^2.0.1" - "@smithy/node-http-handler" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/fetch-http-handler" "^2.0.5" + "@smithy/node-http-handler" "^2.0.5" + "@smithy/types" "^2.2.2" "@smithy/util-base64" "^2.0.0" "@smithy/util-buffer-from" "^2.0.0" "@smithy/util-hex-encoding" "^2.0.0" "@smithy/util-utf8" "^2.0.0" tslib "^2.5.0" -"@smithy/util-uri-escape@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@smithy/util-uri-escape/-/util-uri-escape-1.1.0.tgz#a8c5edaf19c0efdb9b51661e840549cf600a1808" - integrity sha512-/jL/V1xdVRt5XppwiaEU8Etp5WHZj609n0xMTuehmCqdoOFbId1M+aEeDWZsQ+8JbEB/BJ6ynY2SlYmOaKtt8w== - dependencies: - tslib "^2.5.0" - "@smithy/util-uri-escape@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@smithy/util-uri-escape/-/util-uri-escape-2.0.0.tgz#19955b1a0f517a87ae77ac729e0e411963dfda95" @@ -1996,14 +1907,6 @@ dependencies: tslib "^2.5.0" -"@smithy/util-utf8@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@smithy/util-utf8/-/util-utf8-1.1.0.tgz#b791ab1e3f694374edfe22811e39dd8424a1be69" - integrity sha512-p/MYV+JmqmPyjdgyN2UxAeYDj9cBqCjp0C/NsTWnnjoZUVqoeZ6IrW915L9CAKWVECgv9lVQGc4u/yz26/bI1A== - dependencies: - "@smithy/util-buffer-from" "^1.1.0" - tslib "^2.5.0" - "@smithy/util-utf8@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@smithy/util-utf8/-/util-utf8-2.0.0.tgz#b4da87566ea7757435e153799df9da717262ad42" @@ -2012,13 +1915,13 @@ "@smithy/util-buffer-from" "^2.0.0" tslib "^2.5.0" -"@smithy/util-waiter@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@smithy/util-waiter/-/util-waiter-2.0.1.tgz#1ffb4ce57e0ebbc2564e702b51fc44996ae90765" - integrity sha512-bSyGFicPRYuGFFWAr72UvYI7tE7KmEeFJJ5iaLuTTdo8RGaNBZ2kE25coGtzrejYh9AhwSfckBvbxgEDxIxhlA== +"@smithy/util-waiter@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@smithy/util-waiter/-/util-waiter-2.0.5.tgz#e42161e03c53cf6726dca049ad9a105ea0967435" + integrity sha512-1lkkUmI/bhaDX+LIT3RiUNAn+NzPmsWjE7beMq0oQ3H1/CffaILIN67riDA0aE1YBj6xll7uWMIy4tJqc+peXw== dependencies: - "@smithy/abort-controller" "^2.0.1" - "@smithy/types" "^2.0.2" + "@smithy/abort-controller" "^2.0.5" + "@smithy/types" "^2.2.2" tslib "^2.5.0" "@szmarczak/http-timer@^5.0.1": @@ -2038,10 +1941,25 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== -"@tsconfig/node18@^1.0.1": +"@tsconfig/node10@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node18/-/node18-1.0.3.tgz#b14aed11bda116950a57fb5d223dd050e47f4fe1" - integrity sha512-RbwvSJQsuN9TB04AQbGULYfOGE/RnSFk/FLQ5b0NmDf5Kx2q/lABZbHQPKCO1vZ6Fiwkplu+yb9pGdLy1iGseQ== + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== "@tufjs/canonical-json@1.0.0": version "1.0.0" @@ -2056,6 +1974,13 @@ "@tufjs/canonical-json" "1.0.0" minimatch "^9.0.0" +"@types/adm-zip@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@types/adm-zip/-/adm-zip-0.5.0.tgz#94c90a837ce02e256c7c665a6a1eb295906333c1" + integrity sha512-FCJBJq9ODsQZUNURo5ILAQueuA8WJhRvuihS3ke2iI25mJlfV2LK8jG2Qj2z2AWg8U0FtWWqBHVRetceLskSaw== + dependencies: + "@types/node" "*" + "@types/aws-lambda@^8.10.119": version "8.10.119" resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.119.tgz#aaf010a9c892b3e29a290e5c49bfe8bcec82c455" @@ -2087,7 +2012,7 @@ "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" -"@types/babel__traverse@*", "@types/babel__traverse@7.18.2", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": version "7.18.2" resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.18.2.tgz#235bf339d17185bdec25e024ca19cce257cc7309" integrity sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg== @@ -2099,21 +2024,7 @@ resolved "https://registry.yarnpkg.com/@types/braces/-/braces-3.0.2.tgz#70009e5d385bc0d804f40f0a3f92285022536730" integrity sha512-U5tlMYa0U/2eFTmJgKcPWQOEICP173sJDa6OjHbj5Tv+NVaYcrq2xmdWpNXOwWYGwJu+jER/pfTLdoQ31q8PzA== -"@types/cross-spawn@^6.0.2": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@types/cross-spawn/-/cross-spawn-6.0.2.tgz#168309de311cd30a2b8ae720de6475c2fbf33ac7" - integrity sha512-KuwNhp3eza+Rhu8IFI5HUXRP0LIhqH5cAjubUvGXXthh4YYBuP2ntwEX+Cz8GJoZUHlKo247wPWOfA9LYEq4cw== - dependencies: - "@types/node" "*" - -"@types/fs-extra@^9.0.13": - version "9.0.13" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.13.tgz#7594fbae04fe7f1918ce8b3d213f74ff44ac1f45" - integrity sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA== - dependencies: - "@types/node" "*" - -"@types/glob@*": +"@types/glob@^8.0.0": version "8.1.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-8.1.0.tgz#b63e70155391b0584dce44e7ea25190bbc38f2fc" integrity sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w== @@ -2177,6 +2088,11 @@ dependencies: "@types/braces" "*" +"@types/mime-types@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@types/mime-types/-/mime-types-2.1.1.tgz#d9ba43490fa3a3df958759adf69396c3532cf2c1" + integrity sha512-vXOTGVSLR2jMw440moWTC7H19iUyLtP3Z1YTj7cSsubOICinjMxFeb/V57v9QdyyPGbbWolUFSSmSiRSn94tFw== + "@types/minimatch@^5.1.2": version "5.1.2" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" @@ -2188,21 +2104,21 @@ integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== "@types/node@*": - version "20.4.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.5.tgz#9dc0a5cb1ccce4f7a731660935ab70b9c00a5d69" - integrity sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg== + version "20.4.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.9.tgz#c7164e0f8d3f12dfae336af0b1f7fdec8c6b204f" + integrity sha512-8e2HYcg7ohnTUbHk8focoklEQYvemQmu9M/f43DZVx43kHn0tE3BY/6gSDxS7k0SprtS0NHvj+L80cGLnoOUcQ== -"@types/node@^16": - version "16.18.39" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.39.tgz#aa39a1a87a40ef6098ee69689a1acb0c1b034832" - integrity sha512-8q9ZexmdYYyc5/cfujaXb4YOucpQxAV4RMG0himLyDUOEr8Mr79VrqsFI+cQ2M2h89YIuy95lbxuYjxT4Hk4kQ== +"@types/node@^18": + version "18.17.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.12.tgz#c6bd7413a13e6ad9cfb7e97dd5c4e904c1821e50" + integrity sha512-d6xjC9fJ/nSnfDeU0AMDsaJyb1iHsqCSOdi84w4u+SlN/UgQdY5tRhpMzaFYsI4mnpvgTivEaQd0yOUhAtOnEQ== "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" integrity sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw== -"@types/prettier@2.6.0", "@types/prettier@^2.1.5": +"@types/prettier@^2.1.5": version "2.6.0" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.0.tgz#efcbd41937f9ae7434c714ab698604822d890759" integrity sha512-G/AdOadiZhnJp0jXCaBQU449W2h716OW/EoXeYkCytxKL06X1WCXB4DZpp8TpZ8eyIJVS1cw4lrlkkSYU21cDw== @@ -2313,7 +2229,7 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@xmldom/xmldom@^0.8.10", "@xmldom/xmldom@^0.8.8": +"@xmldom/xmldom@^0.8.10": version "0.8.10" resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz#a1337ca426aa61cef9fe15b5b28e340a72f6fa99" integrity sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw== @@ -2354,12 +2270,17 @@ acorn-walk@^7.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + acorn@^7.1.1: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.2.4, acorn@^8.9.0: +acorn@^8.2.4, acorn@^8.4.1, acorn@^8.9.0: version "8.10.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== @@ -2377,12 +2298,10 @@ agent-base@6, agent-base@^6.0.2: debug "4" agentkeepalive@^4.2.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.3.0.tgz#bb999ff07412653c1803b3ced35e50729830a255" - integrity sha512-7Epl1Blf4Sy37j4v9f9FjICCh4+KAQOyXgHEwlyBiAQLbhKdq/i2QQU3amQalS/wPhdPzDXPL5DMR5bkn+YeWg== + version "4.5.0" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" + integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== dependencies: - debug "^4.1.0" - depd "^2.0.0" humanize-ms "^1.2.1" aggregate-error@^3.0.0: @@ -2482,6 +2401,11 @@ are-we-there-yet@^3.0.0: delegates "^1.0.0" readable-stream "^3.6.0" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -2529,15 +2453,15 @@ array-union@^2.1.0: integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== array.prototype.findlastindex@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.2.tgz#bc229aef98f6bd0533a2bc61ff95209875526c9b" - integrity sha512-tb5thFFlUcp7NdNF6/MpDk/1r/4awWG1FIz3YqDf+/zJSTezBb+/5WViH41obXULHVpDzoiCLpJ/ZO9YbJMsdw== + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz#b37598438f97b579166940814e2c0493a4f50207" + integrity sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" - get-intrinsic "^1.1.3" + get-intrinsic "^1.2.1" array.prototype.flat@^1.3.1: version "1.3.1" @@ -2586,32 +2510,27 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== -aws-cdk-lib@2.73.0: - version "2.73.0" - resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.73.0.tgz#1cba582bc36a98d613b1f89680df1b17d71f43f9" - integrity sha512-r9CUe3R7EThr9U0Eb7kQCK4Ee34TDeMH+bonvGD9rNRRTYDauvAgNCsx4DZYYksPrXLRzWjzVbuXAHaDDzWt+A== +aws-cdk-lib@2.93.0: + version "2.93.0" + resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.93.0.tgz#545bc0072bc0f2e27cb0fecb0c9e54de29b10731" + integrity sha512-kKbcKkts272Ju5xjGKI3pXTOpiJxW4OQbDF8Vmw/NIkkuJLo8GlRCFfeOfoN/hilvlYQgENA67GCgSWccbvu7w== dependencies: - "@aws-cdk/asset-awscli-v1" "^2.2.97" - "@aws-cdk/asset-kubectl-v20" "^2.1.1" - "@aws-cdk/asset-node-proxy-agent-v5" "^2.0.77" + "@aws-cdk/asset-awscli-v1" "^2.2.200" + "@aws-cdk/asset-kubectl-v20" "^2.1.2" + "@aws-cdk/asset-node-proxy-agent-v6" "^2.0.1" "@balena/dockerignore" "^1.0.2" case "1.6.3" - fs-extra "^9.1.0" + fs-extra "^11.1.1" ignore "^5.2.4" jsonschema "^1.4.1" minimatch "^3.1.2" punycode "^2.3.0" - semver "^7.3.8" + semver "^7.5.4" table "^6.8.1" yaml "1.10.2" @@ -2625,10 +2544,10 @@ aws-lambda@^1.0.7: js-yaml "^3.14.1" watchpack "^2.0.0-beta.10" -aws-sdk@^2.1425.0, aws-sdk@^2.814.0: - version "2.1425.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1425.0.tgz#2c6d9f295720e16fae9de6131b4d495219944ba5" - integrity sha512-DbY5z7E8RsrX8/0pMBKMuh/rWFic3AghtU2AWkUdzxDi0cUSK7rOSPS/OIURU9Rh0jaNXoA0ujBDdx/CC5CvRA== +aws-sdk@^2.814.0: + version "2.1433.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1433.0.tgz#f0697ba1de836f99d5a4aa0772c931d86973b884" + integrity sha512-QLZLC8eAk4+l8x9kUbrWPjuyWchE3Ho18llm0Qx5aNcoOq/el4+NxzYeqKjwjGjNJuJ/AeX3J+BzazazrNv9BQ== dependencies: buffer "4.9.2" events "1.1.1" @@ -2712,11 +2631,6 @@ base64-js@^1.0.2: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -big-integer@^1.6.44: - version "1.6.51" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" - integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== - bowser@^2.11.0: version "2.11.0" resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f" @@ -2736,13 +2650,6 @@ boxen@^7.0.0: widest-line "^4.0.1" wrap-ansi "^8.1.0" -bplist-parser@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e" - integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw== - dependencies: - big-integer "^1.6.44" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -2815,23 +2722,23 @@ builtins@^5.0.0: dependencies: semver "^7.0.0" -bundle-name@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a" - integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw== +busboy@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== dependencies: - run-applescript "^5.0.0" + streamsearch "^1.1.0" cacache@^17.0.0: - version "17.1.3" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-17.1.3.tgz#c6ac23bec56516a7c0c52020fd48b4909d7c7044" - integrity sha512-jAdjGxmPxZh0IipMdR7fK/4sDSrHMLUV0+GvVUsjwyGNKHsh79kW/otg+GkbXwl6Uzvy9wsvHOX4nUoWldeZMg== + version "17.1.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-17.1.4.tgz#b3ff381580b47e85c6e64f801101508e26604b35" + integrity sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A== dependencies: "@npmcli/fs" "^3.1.0" fs-minipass "^3.0.0" glob "^10.2.2" lru-cache "^7.7.1" - minipass "^5.0.0" + minipass "^7.0.3" minipass-collect "^1.0.2" minipass-flush "^1.0.5" minipass-pipeline "^1.2.4" @@ -2896,16 +2803,16 @@ camelcase@^7.0.1: integrity sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw== caniuse-lite@^1.0.30001517: - version "1.0.30001517" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001517.tgz#90fabae294215c3495807eb24fc809e11dc2f0a8" - integrity sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA== + version "1.0.30001519" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz#3e7b8b8a7077e78b0eb054d69e6edf5c7df35601" + integrity sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg== case@1.6.3, case@^1.6.3: version "1.6.3" resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== -chalk@^2.0.0, chalk@^2.4.2: +chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2994,10 +2901,10 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== -codemaker@^1.85.0: - version "1.85.0" - resolved "https://registry.yarnpkg.com/codemaker/-/codemaker-1.85.0.tgz#eb523e4625efa6ee5e2f6b4bef4b46c2770feecf" - integrity sha512-58SuiaUdM2tTrfjW0HZ8Udiv9nCWUyKLe6tg11QtinTrzPgO0txqBYwo3AX/H6fg/e9NwtlZAqi58cfxSxG9/g== +codemaker@^1.88.0: + version "1.88.0" + resolved "https://registry.yarnpkg.com/codemaker/-/codemaker-1.88.0.tgz#ef8f1a6b428ba36339147bfe7f3f4a65b1c7a562" + integrity sha512-/7+1mPQCEFmBm9zhf5blMiqirCcXNwulb8dozu2LVsDLgnafPt1h2eg/OwvyrqSMWUnsIFetAssKVP2gE66MPQ== dependencies: camelcase "^6.3.0" decamelize "^5.0.1" @@ -3300,6 +3207,11 @@ core-util-is@^1.0.3, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -3338,11 +3250,6 @@ dargs@^7.0.0: resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== -data-uri-to-buffer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" - integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== - data-urls@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -3426,34 +3333,11 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== -default-browser-id@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c" - integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA== - dependencies: - bplist-parser "^0.2.0" - untildify "^4.0.0" - -default-browser@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da" - integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA== - dependencies: - bundle-name "^3.0.0" - default-browser-id "^3.0.0" - execa "^7.1.1" - titleize "^3.0.0" - defer-to-connect@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== -define-lazy-prop@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" - integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== - define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" @@ -3472,11 +3356,6 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== -depd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - detect-indent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" @@ -3502,6 +3381,11 @@ diff-sequences@^27.5.1: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -3552,15 +3436,24 @@ dotgitignore@^2.1.0: find-up "^3.0.0" minimatch "^3.0.4" +downlevel-dts@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/downlevel-dts/-/downlevel-dts-0.11.0.tgz#514a2d723009c5845730c1db6c994484c596ed9c" + integrity sha512-vo835pntK7kzYStk7xUHDifiYJvXxVhUapt85uk2AI94gUUAQX9HNRtrcMHNSc3YHJUEHGbYIGsM99uIbgAtxw== + dependencies: + semver "^7.3.2" + shelljs "^0.8.3" + typescript next + eastasianwidth@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== electron-to-chromium@^1.4.477: - version "1.4.477" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.477.tgz#05669aa6f161ee9076a6805457e9bd9fe6d0dfd1" - integrity sha512-shUVy6Eawp33dFBFIoYbIwLHrX0IZ857AlH9ug2o4rvbWmpaCUdBpQ5Zw39HRrfzAFm4APJE9V+E2A/WB0YqJw== + version "1.4.490" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.490.tgz#d99286f6e915667fa18ea4554def1aa60eb4d5f1" + integrity sha512-6s7NVJz+sATdYnIwhdshx/N/9O6rvMxmhVoDSDFdj6iA45gHR8EQje70+RYsF4GeB+k0IeNSBnP7yG9ZXJFr7A== emittery@^0.8.1: version "0.8.1" @@ -3614,7 +3507,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.21.2: +es-abstract@^1.20.4, es-abstract@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.1.tgz#8b4e5fc5cefd7f1660f0f8e1a52900dfbc9d9ccc" integrity sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw== @@ -3684,161 +3577,33 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild-android-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.18.tgz#20a7ae1416c8eaade917fb2453c1259302c637a5" - integrity sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA== - -esbuild-android-arm64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.18.tgz#9cc0ec60581d6ad267568f29cf4895ffdd9f2f04" - integrity sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ== - -esbuild-darwin-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.18.tgz#428e1730ea819d500808f220fbc5207aea6d4410" - integrity sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg== - -esbuild-darwin-arm64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.18.tgz#b6dfc7799115a2917f35970bfbc93ae50256b337" - integrity sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA== - -esbuild-freebsd-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.18.tgz#4e190d9c2d1e67164619ae30a438be87d5eedaf2" - integrity sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA== - -esbuild-freebsd-arm64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.18.tgz#18a4c0344ee23bd5a6d06d18c76e2fd6d3f91635" - integrity sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA== - -esbuild-linux-32@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.18.tgz#9a329731ee079b12262b793fb84eea762e82e0ce" - integrity sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg== - -esbuild-linux-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz#532738075397b994467b514e524aeb520c191b6c" - integrity sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw== - -esbuild-linux-arm64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.18.tgz#5372e7993ac2da8f06b2ba313710d722b7a86e5d" - integrity sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug== - -esbuild-linux-arm@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.18.tgz#e734aaf259a2e3d109d4886c9e81ec0f2fd9a9cc" - integrity sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA== - -esbuild-linux-mips64le@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.18.tgz#c0487c14a9371a84eb08fab0e1d7b045a77105eb" - integrity sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ== - -esbuild-linux-ppc64le@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.18.tgz#af048ad94eed0ce32f6d5a873f7abe9115012507" - integrity sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w== - -esbuild-linux-riscv64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.18.tgz#423ed4e5927bd77f842bd566972178f424d455e6" - integrity sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg== - -esbuild-linux-s390x@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.18.tgz#21d21eaa962a183bfb76312e5a01cc5ae48ce8eb" - integrity sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ== - -esbuild-netbsd-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.18.tgz#ae75682f60d08560b1fe9482bfe0173e5110b998" - integrity sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg== - -esbuild-openbsd-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.18.tgz#79591a90aa3b03e4863f93beec0d2bab2853d0a8" - integrity sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ== - -esbuild-sunos-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.18.tgz#fd528aa5da5374b7e1e93d36ef9b07c3dfed2971" - integrity sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw== - -esbuild-windows-32@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.18.tgz#0e92b66ecdf5435a76813c4bc5ccda0696f4efc3" - integrity sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ== - -esbuild-windows-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.18.tgz#0fc761d785414284fc408e7914226d33f82420d0" - integrity sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw== - -esbuild-windows-arm64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.18.tgz#5b5bdc56d341d0922ee94965c89ee120a6a86eb7" - integrity sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ== - -esbuild@0.17.16: - version "0.17.16" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.17.16.tgz#5efec24a8ff29e0c157359f27e1b5532a728b720" - integrity sha512-aeSuUKr9aFVY9Dc8ETVELGgkj4urg5isYx8pLf4wlGgB0vTFjxJQdHnNH6Shmx4vYYrOTLCHtRI5i1XZ9l2Zcg== +esbuild@^0.19.2: + version "0.19.2" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.19.2.tgz#b1541828a89dfb6f840d38538767c6130dca2aac" + integrity sha512-G6hPax8UbFakEj3hWO0Vs52LQ8k3lnBhxZWomUJDxfz3rZTLqF5k/FCzuNdLx2RbpBiQQF9H9onlDDH1lZsnjg== optionalDependencies: - "@esbuild/android-arm" "0.17.16" - "@esbuild/android-arm64" "0.17.16" - "@esbuild/android-x64" "0.17.16" - "@esbuild/darwin-arm64" "0.17.16" - "@esbuild/darwin-x64" "0.17.16" - "@esbuild/freebsd-arm64" "0.17.16" - "@esbuild/freebsd-x64" "0.17.16" - "@esbuild/linux-arm" "0.17.16" - "@esbuild/linux-arm64" "0.17.16" - "@esbuild/linux-ia32" "0.17.16" - "@esbuild/linux-loong64" "0.17.16" - "@esbuild/linux-mips64el" "0.17.16" - "@esbuild/linux-ppc64" "0.17.16" - "@esbuild/linux-riscv64" "0.17.16" - "@esbuild/linux-s390x" "0.17.16" - "@esbuild/linux-x64" "0.17.16" - "@esbuild/netbsd-x64" "0.17.16" - "@esbuild/openbsd-x64" "0.17.16" - "@esbuild/sunos-x64" "0.17.16" - "@esbuild/win32-arm64" "0.17.16" - "@esbuild/win32-ia32" "0.17.16" - "@esbuild/win32-x64" "0.17.16" - -esbuild@^0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.18.tgz#ea894adaf3fbc036d32320a00d4d6e4978a2f36d" - integrity sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q== - optionalDependencies: - "@esbuild/android-arm" "0.15.18" - "@esbuild/linux-loong64" "0.15.18" - esbuild-android-64 "0.15.18" - esbuild-android-arm64 "0.15.18" - esbuild-darwin-64 "0.15.18" - esbuild-darwin-arm64 "0.15.18" - esbuild-freebsd-64 "0.15.18" - esbuild-freebsd-arm64 "0.15.18" - esbuild-linux-32 "0.15.18" - esbuild-linux-64 "0.15.18" - esbuild-linux-arm "0.15.18" - esbuild-linux-arm64 "0.15.18" - esbuild-linux-mips64le "0.15.18" - esbuild-linux-ppc64le "0.15.18" - esbuild-linux-riscv64 "0.15.18" - esbuild-linux-s390x "0.15.18" - esbuild-netbsd-64 "0.15.18" - esbuild-openbsd-64 "0.15.18" - esbuild-sunos-64 "0.15.18" - esbuild-windows-32 "0.15.18" - esbuild-windows-64 "0.15.18" - esbuild-windows-arm64 "0.15.18" + "@esbuild/android-arm" "0.19.2" + "@esbuild/android-arm64" "0.19.2" + "@esbuild/android-x64" "0.19.2" + "@esbuild/darwin-arm64" "0.19.2" + "@esbuild/darwin-x64" "0.19.2" + "@esbuild/freebsd-arm64" "0.19.2" + "@esbuild/freebsd-x64" "0.19.2" + "@esbuild/linux-arm" "0.19.2" + "@esbuild/linux-arm64" "0.19.2" + "@esbuild/linux-ia32" "0.19.2" + "@esbuild/linux-loong64" "0.19.2" + "@esbuild/linux-mips64el" "0.19.2" + "@esbuild/linux-ppc64" "0.19.2" + "@esbuild/linux-riscv64" "0.19.2" + "@esbuild/linux-s390x" "0.19.2" + "@esbuild/linux-x64" "0.19.2" + "@esbuild/netbsd-x64" "0.19.2" + "@esbuild/openbsd-x64" "0.19.2" + "@esbuild/sunos-x64" "0.19.2" + "@esbuild/win32-arm64" "0.19.2" + "@esbuild/win32-ia32" "0.19.2" + "@esbuild/win32-x64" "0.19.2" escalade@^3.1.1: version "3.1.1" @@ -3877,32 +3642,31 @@ escodegen@^2.0.0: source-map "~0.6.1" eslint-config-prettier@^8.9.0: - version "8.9.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.9.0.tgz#094b6254b2804b0544f7cee535f802b6d29ee10b" - integrity sha512-+sbni7NfVXnOpnRadUA8S28AUlsZt9GjgFvABIRL9Hkn8KqNzOp+7Lw4QWtrwn20KzU3wqu1QoOj2m+7rKRqkA== + version "8.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== eslint-import-resolver-node@^0.3.7: - version "0.3.7" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" - integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== + version "0.3.9" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== dependencies: debug "^3.2.7" - is-core-module "^2.11.0" - resolve "^1.22.1" + is-core-module "^2.13.0" + resolve "^1.22.4" eslint-import-resolver-typescript@^3.5.5: - version "3.5.5" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.5.tgz#0a9034ae7ed94b254a360fbea89187b60ea7456d" - integrity sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw== + version "3.6.0" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz#36f93e1eb65a635e688e16cae4bead54552e3bbd" + integrity sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg== dependencies: debug "^4.3.4" enhanced-resolve "^5.12.0" eslint-module-utils "^2.7.4" + fast-glob "^3.3.1" get-tsconfig "^4.5.0" - globby "^13.1.3" is-core-module "^2.11.0" is-glob "^4.0.3" - synckit "^0.8.5" eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: version "2.8.0" @@ -3912,9 +3676,9 @@ eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: debug "^3.2.7" eslint-plugin-import@^2.28.0: - version "2.28.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.28.0.tgz#8d66d6925117b06c4018d491ae84469eb3cb1005" - integrity sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q== + version "2.28.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz#63b8b5b3c409bfc75ebaf8fb206b07ab435482c4" + integrity sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A== dependencies: array-includes "^3.1.6" array.prototype.findlastindex "^1.2.2" @@ -3925,13 +3689,12 @@ eslint-plugin-import@^2.28.0: eslint-import-resolver-node "^0.3.7" eslint-module-utils "^2.8.0" has "^1.0.3" - is-core-module "^2.12.1" + is-core-module "^2.13.0" is-glob "^4.0.3" minimatch "^3.1.2" object.fromentries "^2.0.6" object.groupby "^1.0.0" object.values "^1.1.6" - resolve "^1.22.3" semver "^6.3.1" tsconfig-paths "^3.14.2" @@ -3958,20 +3721,20 @@ eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz#8c2095440eca8c933bedcadf16fefa44dbe9ba5f" - integrity sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw== +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^8: - version "8.46.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.46.0.tgz#a06a0ff6974e53e643acc42d1dcf2e7f797b3552" - integrity sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg== + version "8.48.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.48.0.tgz#bf9998ba520063907ba7bfe4c480dc8be03c2155" + integrity sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.1" - "@eslint/js" "^8.46.0" + "@eslint/eslintrc" "^2.1.2" + "@eslint/js" "8.48.0" "@humanwhocodes/config-array" "^0.11.10" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" @@ -3982,7 +3745,7 @@ eslint@^8: doctrine "^3.0.0" escape-string-regexp "^4.0.0" eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.2" + eslint-visitor-keys "^3.4.3" espree "^9.6.1" esquery "^1.4.2" esutils "^2.0.2" @@ -4069,21 +3832,6 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -execa@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9" - integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.1" - human-signals "^4.3.0" - is-stream "^3.0.0" - merge-stream "^2.0.0" - npm-run-path "^5.1.0" - onetime "^6.0.0" - signal-exit "^3.0.7" - strip-final-newline "^3.0.0" - exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -4114,7 +3862,7 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== -fast-glob@^3.2.12, fast-glob@^3.2.9, fast-glob@^3.3.0, fast-glob@^3.3.1: +fast-glob@^3.2.9, fast-glob@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== @@ -4166,14 +3914,6 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -fetch-blob@^3.1.2, fetch-blob@^3.1.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" - integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== - dependencies: - node-domexception "^1.0.0" - web-streams-polyfill "^3.0.3" - figures@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -4226,14 +3966,15 @@ find-up@^4.0.0, find-up@^4.1.0: path-exists "^4.0.0" flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + version "3.1.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.1.0.tgz#0e54ab4a1a60fe87e2946b6b00657f1c99e1af3f" + integrity sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew== dependencies: - flatted "^3.1.0" + flatted "^3.2.7" + keyv "^4.5.3" rimraf "^3.0.2" -flatted@^3.1.0, flatted@^3.2.7: +flatted@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== @@ -4267,13 +4008,6 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" -formdata-polyfill@^4.0.10: - version "4.0.10" - resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" - integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== - dependencies: - fetch-blob "^3.1.2" - fp-and-or@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/fp-and-or/-/fp-and-or-0.1.3.tgz#e6fba83872a5853a56b3ebdf8d3167f5dfca1882" @@ -4288,6 +4022,15 @@ fs-extra@^10.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^11.1.1: + version "11.1.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" + integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -4297,16 +4040,6 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs-minipass@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" @@ -4315,11 +4048,11 @@ fs-minipass@^2.0.0: minipass "^3.0.0" fs-minipass@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-3.0.2.tgz#5b383858efa8c1eb8c33b39e994f7e8555b8b3a3" - integrity sha512-2GAfyfoaCDRrM6jaOS3UsBts8yJ55VioXdWcOL7dK9zdAuKT71+WBA4ifnNYqVjYv+4SsPxjK0JT4yIIn4cA/g== + version "3.0.3" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-3.0.3.tgz#79a85981c4dc120065e96f62086bf6f9dc26cc54" + integrity sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw== dependencies: - minipass "^5.0.0" + minipass "^7.0.3" fs.realpath@^1.0.0: version "1.0.0" @@ -4337,16 +4070,16 @@ function-bind@^1.1.1: integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" -functions-have-names@^1.2.2, functions-have-names@^1.2.3: +functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -4419,9 +4152,9 @@ get-symbol-description@^1.0.0: get-intrinsic "^1.1.1" get-tsconfig@^4.5.0: - version "4.6.2" - resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.6.2.tgz#831879a5e6c2aa24fe79b60340e2233a1e0f472e" - integrity sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg== + version "4.7.0" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.0.tgz#06ce112a1463e93196aa90320c35df5039147e34" + integrity sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw== dependencies: resolve-pkg-maps "^1.0.0" @@ -4473,12 +4206,12 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob-promise@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/glob-promise/-/glob-promise-3.4.0.tgz#b6b8f084504216f702dc2ce8c9bc9ac8866fdb20" - integrity sha512-q08RJ6O+eJn+dVanerAndJwIcumgbDdYiUT7zFQl3Wm1xD6fBKtah7H8ZJChj4wP+8C+QfeVy8xautR7rdmKEw== +glob-promise@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/glob-promise/-/glob-promise-6.0.3.tgz#e6b3ab02d350b3f4b3e15b57e4485986e41ba2fe" + integrity sha512-m+kxywR5j/2Z2V9zvHKfwwL5Gp7gIFEBX+deTB9w2lJB+wSuw9kcS43VfvTAMk8TXL5JCl/cCjsR+tgNVspGyA== dependencies: - "@types/glob" "*" + "@types/glob" "^8.0.0" glob-to-regexp@^0.4.1: version "0.4.1" @@ -4486,9 +4219,9 @@ glob-to-regexp@^0.4.1: integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== glob@^10.2.2, glob@^10.2.5: - version "10.3.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.3.tgz#8360a4ffdd6ed90df84aa8d52f21f452e86a123b" - integrity sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw== + version "10.3.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.4.tgz#c85c9c7ab98669102b6defda76d35c5b1ef9766f" + integrity sha512-6LFElP3A+i/Q8XQKEvZjkEWEOTgAIALR9AO2rwT8bgPhDd1anmqDJDZ6lLddI4ehxxxR1S5RIqKe1uapMQfYaQ== dependencies: foreground-child "^3.1.0" jackspeak "^2.0.3" @@ -4496,7 +4229,7 @@ glob@^10.2.2, glob@^10.2.5: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" -glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.2.3: +glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -4532,9 +4265,9 @@ globals@^11.1.0: integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^13.19.0: - version "13.20.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== + version "13.21.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.21.0.tgz#163aae12f34ef502f5153cfbdd3600f36c63c571" + integrity sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg== dependencies: type-fest "^0.20.2" @@ -4557,17 +4290,6 @@ globby@^11.0.4, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -globby@^13.1.3: - version "13.2.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592" - integrity sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w== - dependencies: - dir-glob "^3.0.1" - fast-glob "^3.3.0" - ignore "^5.2.4" - merge2 "^1.4.1" - slash "^4.0.0" - gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -4608,12 +4330,12 @@ graphemer@^1.4.0: integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== handlebars@^4.7.7: - version "4.7.7" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" - integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== + version "4.7.8" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" + integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== dependencies: minimist "^1.2.5" - neo-async "^2.6.0" + neo-async "^2.6.2" source-map "^0.6.1" wordwrap "^1.0.0" optionalDependencies: @@ -4767,11 +4489,6 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -human-signals@^4.3.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" - integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== - humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -4851,11 +4568,6 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -indent-string@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-5.0.0.tgz#4fd2980fccaf8622d14c64d694f4cf33c81951a5" - integrity sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg== - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -4952,10 +4664,10 @@ is-ci@^3.0.1: dependencies: ci-info "^3.2.0" -is-core-module@^2.11.0, is-core-module@^2.12.0, is-core-module@^2.12.1, is-core-module@^2.5.0, is-core-module@^2.8.1: - version "2.12.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" - integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== +is-core-module@^2.11.0, is-core-module@^2.13.0, is-core-module@^2.5.0, is-core-module@^2.8.1: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== dependencies: has "^1.0.3" @@ -4966,16 +4678,6 @@ is-date-object@^1.0.1: dependencies: has-tostringtag "^1.0.0" -is-docker@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -is-docker@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" - integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -5005,13 +4707,6 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" -is-inside-container@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" - integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== - dependencies: - is-docker "^3.0.0" - is-installed-globally@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" @@ -5087,11 +4782,6 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== -is-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" - integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== - is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -5132,13 +4822,6 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" -is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - is-yarn-global@^0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.4.1.tgz#b312d902b313f81e4eaf98b6361ba2b45cd694bb" @@ -5202,9 +4885,9 @@ istanbul-reports@^3.1.3: istanbul-lib-report "^3.0.0" jackspeak@^2.0.3: - version "2.2.2" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.2.2.tgz#707c62733924b8dc2a0a629dc6248577788b5385" - integrity sha512-mgNtVv4vUuaKA97yxUHoA3+FkuhtxkjdXEWOyB/N76fjy0FjezEt34oy3epBtvCvS+7DyKwqCFWx/oJLV5+kCg== + version "2.3.1" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.1.tgz#ce2effa4c458e053640e61938865a5b5fae98456" + integrity sha512-4iSY3Bh1Htv+kLhiiZunUhQ+OYXIn0ze3ulq8JeWrFKmhPAJSySV2+kdtRh2pGcCeF0s6oR8Oc+pYZynJj4t8A== dependencies: "@isaacs/cliui" "^8.0.2" optionalDependencies: @@ -5694,136 +5377,148 @@ jsesc@^2.5.1: integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== jsii-diff@^1.85.0: - version "1.85.0" - resolved "https://registry.yarnpkg.com/jsii-diff/-/jsii-diff-1.85.0.tgz#1c44e4c8fd47d70536898adad3fffbe798ea570e" - integrity sha512-T1F9/ejiwGebayTp24/60m/Wpl9tcsDd21AWi9hNJ9PfU21pjQUMDEjX6bWq8CcWm9FicH1zZifzt6TRBs6kDQ== + version "1.88.0" + resolved "https://registry.yarnpkg.com/jsii-diff/-/jsii-diff-1.88.0.tgz#965668341405134c37e7e6fba232614123cae2b5" + integrity sha512-5Wjig/1GvZckAS1G8f+kztNDZVP4TFqUu/NsSiIb4hHHM+MvUy7O9ihVuWDVE+QodSTxPXy3RMKp+ILsiRcuqg== dependencies: - "@jsii/check-node" "1.85.0" - "@jsii/spec" "^1.85.0" + "@jsii/check-node" "1.88.0" + "@jsii/spec" "^1.88.0" fs-extra "^10.1.0" - jsii-reflect "^1.85.0" + jsii-reflect "^1.88.0" log4js "^6.9.1" yargs "^16.2.0" -jsii-docgen@^7.2.9: - version "7.2.9" - resolved "https://registry.yarnpkg.com/jsii-docgen/-/jsii-docgen-7.2.9.tgz#869c8064c5df62cad0c665f6f237ccdc48165fbf" - integrity sha512-cPDQJ/NgHxVcekZh79jy1VwvFpS9Vlo2U9bnP/FMOIWBUSd6bTbi0VAMC5VBvec6/TUslw+JEBBErdEqop+EZA== +jsii-docgen@^9.1.2: + version "9.1.2" + resolved "https://registry.yarnpkg.com/jsii-docgen/-/jsii-docgen-9.1.2.tgz#40c18908827b233eba29b2c3413665dc47ecea80" + integrity sha512-AmHDbyXQTSuhVr2N9HqR4iql3U3Q9jSLmGN5cxfkmQXrd3xqTAlj6EMgE6XIxdVln0R1jMml5aeoa7nUhNp4gw== dependencies: - "@jsii/spec" "^1.80.0" + "@jsii/spec" "^1.85.0" case "^1.6.3" fs-extra "^10.1.0" - glob "^7.2.3" - glob-promise "^3.4.0" - jsii-reflect "^1.80.0" - jsii-rosetta "^1.80.0" - semver "^7.5.0" + glob "^8.1.0" + glob-promise "^6.0.3" + jsii-reflect "^1.85.0" + semver "^7.5.4" yargs "^16.2.0" jsii-pacmak@^1.85.0: - version "1.85.0" - resolved "https://registry.yarnpkg.com/jsii-pacmak/-/jsii-pacmak-1.85.0.tgz#56d2475e04b8bd9f5c5501a52a44feb07ff8c22c" - integrity sha512-1pFHp7MtiNgt9lXvtv8Qs2PEwDWZ2eUSylxS+z4jH4Wo6SGq/5M0h8182dagxsJuoId50+5zTjdD1yACFZ3QTw== + version "1.88.0" + resolved "https://registry.yarnpkg.com/jsii-pacmak/-/jsii-pacmak-1.88.0.tgz#ca6f604769db4e902177653cda103e60b4837f91" + integrity sha512-nanfSaYpe2lgOzvosup4iObQ76tCs47+rERUUGFyrCq7sruQ7VMYgRdAuGWh8PqF9fGNwq6Do1eR+EMC+d4WUg== dependencies: - "@jsii/check-node" "1.85.0" - "@jsii/spec" "^1.85.0" + "@jsii/check-node" "1.88.0" + "@jsii/spec" "^1.88.0" clone "^2.1.2" - codemaker "^1.85.0" + codemaker "^1.88.0" commonmark "^0.30.0" escape-string-regexp "^4.0.0" fs-extra "^10.1.0" - jsii-reflect "^1.85.0" - jsii-rosetta "^1.85.0" - semver "^7.5.1" + jsii-reflect "^1.88.0" + jsii-rosetta "^1.88.0" + semver "^7.5.4" spdx-license-list "^6.6.0" xmlbuilder "^15.1.1" yargs "^16.2.0" -jsii-reflect@^1.80.0, jsii-reflect@^1.85.0: - version "1.85.0" - resolved "https://registry.yarnpkg.com/jsii-reflect/-/jsii-reflect-1.85.0.tgz#2dcfd2642dadab9d676bf78395bec690a283a475" - integrity sha512-4/2JTt7xVDp717JgxnWbroXPBkXBWd25WEgKkIBxqN5DxGpzd+EPNpNkgJmSOCK5DKl9g1FjCuTkcRw5qMIoEg== +jsii-reflect@^1.85.0: + version "1.86.1" + resolved "https://registry.yarnpkg.com/jsii-reflect/-/jsii-reflect-1.86.1.tgz#5c8dcc79d705885a47e9c57f0d97d71382bda2b1" + integrity sha512-Z9Avq431sdwuku+fpC3pM9DngpmbCA2U8QI4Bctg/M4b5PMDuKuMxBWcdAcU/LhtL14lxNZ66Src0hYmNVk4eQ== dependencies: - "@jsii/check-node" "1.85.0" - "@jsii/spec" "^1.85.0" + "@jsii/check-node" "1.86.1" + "@jsii/spec" "^1.86.1" chalk "^4" fs-extra "^10.1.0" - oo-ascii-tree "^1.85.0" + oo-ascii-tree "^1.86.1" yargs "^16.2.0" -jsii-rosetta@1.x: - version "1.86.1" - resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-1.86.1.tgz#7653f3593a5626e9d5e21e5bf330b6038ec92355" - integrity sha512-QmuFIFKYXsks6SpWsrztlFnXZptiwl7m0kpvqfiP8NGeGU5r5hTBglAorNh4FO58W5dYVUKmebEN076brhGRIQ== +jsii-reflect@^1.88.0: + version "1.88.0" + resolved "https://registry.yarnpkg.com/jsii-reflect/-/jsii-reflect-1.88.0.tgz#d7f020db2621e8b672c082eea752c47153da5a63" + integrity sha512-YYZTEQpayvwMDtRMCjgNraTFUqsj4/KEOE8ChvDCkpxv6aH89vpZSsAJM5ymhNLDHj4XZ2OW3XE0sNOz31NbvA== dependencies: - "@jsii/check-node" "1.86.1" - "@jsii/spec" "1.86.1" + "@jsii/check-node" "1.88.0" + "@jsii/spec" "^1.88.0" + chalk "^4" + fs-extra "^10.1.0" + oo-ascii-tree "^1.88.0" + yargs "^16.2.0" + +jsii-rosetta@^1.88.0: + version "1.88.0" + resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-1.88.0.tgz#1189fb2aa538082d3099b104e2d51daf2cf485e7" + integrity sha512-6xRRkwWUKFqDTnjgCXkB6v9dxA51KUD4Cd7InLB4qirMBDuMtyYhYVNc1yJbHPYs9gkN5/ao0dFk+1CQxt7T7g== + dependencies: + "@jsii/check-node" "1.88.0" + "@jsii/spec" "1.88.0" "@xmldom/xmldom" "^0.8.10" commonmark "^0.30.0" fast-glob "^3.3.1" - jsii "1.86.1" + jsii "1.88.0" semver "^7.5.4" semver-intersect "^1.4.0" stream-json "^1.8.0" typescript "~3.9.10" - workerpool "^6.4.0" + workerpool "^6.4.2" yargs "^16.2.0" -jsii-rosetta@^1.80.0, jsii-rosetta@^1.85.0: - version "1.85.0" - resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-1.85.0.tgz#c4ba8d5c426a4743c4dafbaaa960b6c2e6cf1b59" - integrity sha512-3kGi7xZjA7fpVYmbn2VXvDA6iuva47ffdqyb28DhYxVWnlEJgff8XWuvQJSqrtxEcJF60dVD58N79pPghyvOgg== +jsii-rosetta@~5.0.0: + version "5.0.21" + resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-5.0.21.tgz#22a3ef2163ef9b2b3946a9c164d2a6d6bfaddb44" + integrity sha512-R3WSE49/9/ReybESyqn9hAQPfZN+uPY4iNO5Kuk1b6z9El8R558MXlT3xvxu3huwJs+lUmQcNWVFXNqEcXL+vQ== dependencies: - "@jsii/check-node" "1.85.0" - "@jsii/spec" "1.85.0" - "@xmldom/xmldom" "^0.8.8" + "@jsii/check-node" "1.88.0" + "@jsii/spec" "^1.88.0" + "@xmldom/xmldom" "^0.8.10" + chalk "^4" commonmark "^0.30.0" - fast-glob "^3.2.12" - jsii "1.85.0" - semver "^7.5.1" + fast-glob "^3.3.1" + jsii "~5.0.5" + semver "^7.5.4" semver-intersect "^1.4.0" stream-json "^1.8.0" - typescript "~3.9.10" - workerpool "^6.4.0" - yargs "^16.2.0" + typescript "~5.0.4" + workerpool "^6.4.2" + yargs "^17.7.2" -jsii@1.85.0, jsii@1.x: - version "1.85.0" - resolved "https://registry.yarnpkg.com/jsii/-/jsii-1.85.0.tgz#a70d5b2b5842fb8f029de3d0848fea356a2bd6b5" - integrity sha512-RKB3qZwIXafNUiILD+rKI1EQDtHtfpHN78VVVnfLcp1uAkPLA5zVVqy6cKu2cpAmlz8R5hzIFsw4uEnWA+XE4w== +jsii@1.88.0: + version "1.88.0" + resolved "https://registry.yarnpkg.com/jsii/-/jsii-1.88.0.tgz#f8b56420d47c6230dafb5d78a601bd5696e4f69c" + integrity sha512-WKfwHbcEI/j5OYDPexvkH8KKDcTZR7tIBFNTxu8h1Nh3G8xFT4hh3pObUUSMRCa6rsSF9EHGjS+AKC+TfpFGrQ== dependencies: - "@jsii/check-node" "1.85.0" - "@jsii/spec" "^1.85.0" + "@jsii/check-node" "1.88.0" + "@jsii/spec" "^1.88.0" case "^1.6.3" chalk "^4" fast-deep-equal "^3.1.3" fs-extra "^10.1.0" log4js "^6.9.1" - semver "^7.5.1" + semver "^7.5.4" semver-intersect "^1.4.0" sort-json "^2.0.1" spdx-license-list "^6.6.0" typescript "~3.9.10" yargs "^16.2.0" -jsii@1.86.1: - version "1.86.1" - resolved "https://registry.yarnpkg.com/jsii/-/jsii-1.86.1.tgz#ba5f7d2d948b02c4efa2543260e1eb9e108bf436" - integrity sha512-gAi/mGRdIpCYY7Na61VPE717Z6+/1HTYqgxjMC+VdLXxITbWpaQqO+DqsOnhtsIh+JyjIQM7VOSZ+5Ymf1A74A== +jsii@~5.0.0, jsii@~5.0.5: + version "5.0.21" + resolved "https://registry.yarnpkg.com/jsii/-/jsii-5.0.21.tgz#442ba19cc72be9c7285802decca6f5fa1b3d8219" + integrity sha512-m5WEKKnER9veGrJNxr5OULu43D6DSe69RmKgQjTSHLEKSCS+taCf32sFmBT/b3nBcSh1gfch7QfjoHKoKpUz2w== dependencies: - "@jsii/check-node" "1.86.1" - "@jsii/spec" "^1.86.1" + "@jsii/check-node" "1.88.0" + "@jsii/spec" "^1.88.0" case "^1.6.3" chalk "^4" + downlevel-dts "^0.11.0" fast-deep-equal "^3.1.3" - fs-extra "^10.1.0" log4js "^6.9.1" semver "^7.5.4" semver-intersect "^1.4.0" sort-json "^2.0.1" spdx-license-list "^6.6.0" - typescript "~3.9.10" - yargs "^16.2.0" + typescript "~5.0.4" + yargs "^17.7.2" json-buffer@3.0.1: version "3.0.1" @@ -6080,9 +5775,9 @@ lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== "lru-cache@^9.1.1 || ^10.0.0": - version "10.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.0.tgz#b9e2a6a72a129d81ab317202d93c7691df727e61" - integrity sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw== + version "10.0.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.1.tgz#0a3be479df549cca0e5d693ac402ff19537a6b7a" + integrity sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g== make-dir@^4.0.0: version "4.0.0" @@ -6091,7 +5786,7 @@ make-dir@^4.0.0: dependencies: semver "^7.5.3" -make-error@1.x: +make-error@1.x, make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -6179,7 +5874,7 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12: +mime-types@^2.1.12, mime-types@^2.1.35: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -6191,11 +5886,6 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-fn@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" - integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== - mimic-response@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" @@ -6254,11 +5944,11 @@ minipass-collect@^1.0.2: minipass "^3.0.0" minipass-fetch@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.3.tgz#d9df70085609864331b533c960fd4ffaa78d15ce" - integrity sha512-n5ITsTkDqYkYJZjcRWzZt9qnZKCT7nKCosJhHoj7S7zD+BP4jVbWs+odsniw5TA3E0sLomhTKOKjF86wf11PuQ== + version "3.0.4" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.4.tgz#4d4d9b9f34053af6c6e597a64be8e66e42bf45b7" + integrity sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg== dependencies: - minipass "^5.0.0" + minipass "^7.0.3" minipass-sized "^1.0.3" minizlib "^2.1.2" optionalDependencies: @@ -6305,10 +5995,10 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0": - version "7.0.2" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.2.tgz#58a82b7d81c7010da5bd4b2c0c85ac4b4ec5131e" - integrity sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA== +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.3.tgz#05ea638da44e475037ed94d1c7efcc76a25e1974" + integrity sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg== minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" @@ -6353,25 +6043,11 @@ negotiator@^0.6.3: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -neo-async@^2.6.0: +neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -node-domexception@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" - integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - -node-fetch@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" - integrity sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== - dependencies: - data-uri-to-buffer "^4.0.0" - fetch-blob "^3.1.4" - formdata-polyfill "^4.0.10" - node-gyp@^9.0.0: version "9.4.0" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-9.4.0.tgz#2a7a91c7cba4eccfd95e949369f27c9ba704f369" @@ -6454,9 +6130,9 @@ npm-bundled@^3.0.0: npm-normalize-package-bin "^3.0.0" npm-check-updates@^16: - version "16.10.17" - resolved "https://registry.yarnpkg.com/npm-check-updates/-/npm-check-updates-16.10.17.tgz#1f28b024235c2ecc34ce7361c0376d61953b556c" - integrity sha512-ZoIbWYJhlgMDoByq1WC6Ys3E76IvNCxgS54tPUFbK5J/nqf/BCJt6xiMPAEa7G1HuyAruG+orUF9uTsTGUZl8g== + version "16.13.2" + resolved "https://registry.yarnpkg.com/npm-check-updates/-/npm-check-updates-16.13.2.tgz#552e8223d83ae5ae2d48a11ac254cf0b231277b9" + integrity sha512-0pQI+k1y0JVwenB2gBc69tXFYfkckSVrNrlcn7TIrZfis4LnfdzakY/LYzZKt/lx37edN2isk3d2Zw4csptu/w== dependencies: chalk "^5.3.0" cli-table3 "^0.6.3" @@ -6472,6 +6148,7 @@ npm-check-updates@^16: json-parse-helpfulerror "^1.0.3" jsonlines "^0.1.1" lodash "^4.17.21" + make-fetch-happen "^11.1.1" minimatch "^9.0.3" p-map "^4.0.0" pacote "15.2.0" @@ -6490,9 +6167,9 @@ npm-check-updates@^16: update-notifier "^6.0.2" npm-install-checks@^6.0.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-6.1.1.tgz#b459b621634d06546664207fde16810815808db1" - integrity sha512-dH3GmQL4vsPtld59cOn8uY0iOqRmqKvV+DLGwNXV/Q7MDgD2QfOADWd/mFXcIE5LVhYYGjA3baz6W9JneqnuCw== + version "6.2.0" + resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-6.2.0.tgz#fae55b9967b03ac309695ec96629492d5cedf371" + integrity sha512-744wat5wAAHsxa4590mWO0tJ8PKxR8ORZsH9wGpQc3nWTzozMAgBN/XyqYw7mg3yqLM8dLwEnwSfKMmXAjF69g== dependencies: semver "^7.1.1" @@ -6548,13 +6225,6 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -npm-run-path@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" - integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== - dependencies: - path-key "^4.0.0" - npmlog@^6.0.0: version "6.0.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" @@ -6591,32 +6261,32 @@ object.assign@^4.1.4: object-keys "^1.1.1" object.fromentries@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.6.tgz#cdb04da08c539cffa912dcd368b886e0904bfa73" - integrity sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg== + version "2.0.7" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616" + integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" object.groupby@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.0.tgz#cb29259cf90f37e7bac6437686c1ea8c916d12a9" - integrity sha512-70MWG6NfRH9GnbZOikuhPPYzpUpof9iW2J9E4dW7FXTqPNb6rllE6u39SKwwiNh8lCwX3DDb5OgcKGiEBrTTyw== + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" + integrity sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ== dependencies: call-bind "^1.0.2" define-properties "^1.2.0" - es-abstract "^1.21.2" + es-abstract "^1.22.1" get-intrinsic "^1.2.1" object.values@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" - integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== + version "1.1.7" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" + integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng== dependencies: call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" + define-properties "^1.2.0" + es-abstract "^1.22.1" once@^1.3.0: version "1.4.0" @@ -6632,37 +6302,10 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -onetime@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" - integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== - dependencies: - mimic-fn "^4.0.0" - -oo-ascii-tree@^1.85.0: - version "1.85.0" - resolved "https://registry.yarnpkg.com/oo-ascii-tree/-/oo-ascii-tree-1.85.0.tgz#69f391e16a6893b99eeeaaac97ed5812ecc05ba9" - integrity sha512-5QKNfCtTeW5rcdKbd0owoZFzMxJ7oJl9I+FycBJ0/i8UVJYcZOKctN9TA82unIRgf/BrSaa0X3Nw0RJuiAnMfQ== - -open-next@^0.9.3: - version "0.9.3" - resolved "https://registry.yarnpkg.com/open-next/-/open-next-0.9.3.tgz#c764a7fb1669724a5cd5d9c6bd966b762b7eafa1" - integrity sha512-CWoOh+TScjHeCxammkyHSKXRC7vlAgMYK2Ws3xobhohPleJfS34uv4UmEy49YpfrudMf66WmJPdTMxQWkheVXg== - dependencies: - "@aws-sdk/client-s3" "^3.234.0" - "@tsconfig/node18" "^1.0.1" - esbuild "^0.15.18" - yargs "^17.6.2" - -open@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6" - integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg== - dependencies: - default-browser "^4.0.0" - define-lazy-prop "^3.0.0" - is-inside-container "^1.0.0" - is-wsl "^2.2.0" +oo-ascii-tree@^1.86.1, oo-ascii-tree@^1.88.0: + version "1.88.0" + resolved "https://registry.yarnpkg.com/oo-ascii-tree/-/oo-ascii-tree-1.88.0.tgz#3ed84cdcaab9e5b7970fcfc2d086c2c069db65b7" + integrity sha512-A7m3z7XlUD3DnXSYxWmAdKQTIY6+1JzWS0lhaqgPGhj6g7a/odCsV1ctaRnjJljCB3zQBrbp2QHdYTUsD9AXcQ== optionator@^0.9.3: version "0.9.3" @@ -6841,11 +6484,6 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-key@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" - integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== - path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -6945,9 +6583,9 @@ progress@^2.0.3: integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== projen@^0.71.156: - version "0.71.156" - resolved "https://registry.yarnpkg.com/projen/-/projen-0.71.156.tgz#ccabe219df4be76176dd8228d3b741883007e207" - integrity sha512-tMZrT65pfX4YSUWBWM+N4To+TxfJ2Pd62m2Q/HqSY7lAJnXNoGD9xnPUEwLc/oZRU2DN6C2F1JFgKzDRhs5MqA== + version "0.71.163" + resolved "https://registry.yarnpkg.com/projen/-/projen-0.71.163.tgz#8522901b1b6f791567050fa43bc7248a86f0699d" + integrity sha512-Sj0UthyhhvHYAhgvuQtQk6R4ia/AkHGT/JG3PFbEjIIYcPSImonW+1OIrZ+S+ofWZJPWZj07RBYLiZ+qAVm8NQ== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3" @@ -7245,21 +6883,12 @@ resolve.exports@^1.1.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.1.tgz#05cfd5b3edf641571fd46fa608b610dda9ead999" integrity sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ== -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.1: - version "1.22.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" - integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== - dependencies: - is-core-module "^2.11.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -resolve@^1.22.3: - version "1.22.3" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.3.tgz#4b4055349ffb962600972da1fdc33c46a4eb3283" - integrity sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw== +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0, resolve@^1.22.4: + version "1.22.4" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" + integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== dependencies: - is-core-module "^2.12.0" + is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -7299,13 +6928,6 @@ rimraf@^5.0.1: dependencies: glob "^10.2.5" -run-applescript@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c" - integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg== - dependencies: - execa "^5.0.0" - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -7388,7 +7010,7 @@ semver-utils@^1.1.4: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.0, semver@^7.5.1, semver@^7.5.3, semver@^7.5.4: +semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -7400,11 +7022,6 @@ semver@^6.0.0, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -serverless-http@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/serverless-http/-/serverless-http-3.2.0.tgz#68acc7735f7c876733c04f038ee20f31f5ebfc9b" - integrity sha512-QvSyZXljRLIGqwcJ4xsKJXwkZnAVkse1OajepxfjkBXV0BMvRS5R546Z4kCBI8IygDzkQY0foNPC/rnipaE9pQ== - set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -7427,7 +7044,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shelljs@^0.8.5: +shelljs@^0.8.3, shelljs@^0.8.5: version "0.8.5" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== @@ -7464,12 +7081,13 @@ signal-exit@^4.0.1: integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== sigstore@^1.3.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-1.8.0.tgz#f790120697fa7c89f4418598ce59e638ff680aa5" - integrity sha512-ogU8qtQ3VFBawRJ8wjsBEX/vIFeHuGs1fm4jZtjWQwjo8pfAt7T/rh+udlAN4+QUe0IzA8qRSc/YZ7dHP6kh+w== + version "1.9.0" + resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-1.9.0.tgz#1e7ad8933aa99b75c6898ddd0eeebc3eb0d59875" + integrity sha512-0Zjz0oe37d08VeOtBIuB6cRriqXse2e8w+7yIy2XSXjshRKxbc2KkhXjL229jXSxEm7UbcjS76wcJDGQddVI9A== dependencies: - "@sigstore/bundle" "^1.0.0" + "@sigstore/bundle" "^1.1.0" "@sigstore/protobuf-specs" "^0.2.0" + "@sigstore/sign" "^1.0.0" "@sigstore/tuf" "^1.0.3" make-fetch-happen "^11.0.1" @@ -7483,11 +7101,6 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slash@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" - integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== - slice-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" @@ -7547,9 +7160,9 @@ source-map@^0.7.3: integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== spawn-please@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/spawn-please/-/spawn-please-2.0.1.tgz#13d76566ca5e9ac0537a90853ca4f53f27489ae0" - integrity sha512-W+cFbZR2q2mMTfjz5ZGvhBAiX+e/zczFCNlbS9mxiSdYswBXwUuBUT+a0urH+xZZa8f/bs0mXHyZsZHR9hKogA== + version "2.0.2" + resolved "https://registry.yarnpkg.com/spawn-please/-/spawn-please-2.0.2.tgz#41912d82fe9504dd5a5424d2b4834e9a6cea56e0" + integrity sha512-KM8coezO6ISQ89c1BzyWNtcn2V2kAVtwIXd3cN/V5a0xPYc1F/vydrRc01wsKFEQ/p+V1a4sw4z2yMITIXrgGw== dependencies: cross-spawn "^7.0.3" @@ -7580,9 +7193,9 @@ spdx-license-ids@^3.0.0: integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== spdx-license-list@^6.6.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/spdx-license-list/-/spdx-license-list-6.6.0.tgz#403e1807fd87ef2b4781677bc91896d23eaed4ea" - integrity sha512-vLwdf9AWgdJQmG8cai2HKfkInFsliKaCCOwXmdVonClIhdURTX61KdDOoXC1qcQ7gDaZj+CUTcrMJeAdnCtrKA== + version "6.7.0" + resolved "https://registry.yarnpkg.com/spdx-license-list/-/spdx-license-list-6.7.0.tgz#dd8c6aba00e7a3f9549e473d0be2b83c4cae081f" + integrity sha512-NFqavuJxNsHdwSy/0PjmUpcc76XwlmHQRPjVVtE62qmSLhKJUnzSvJCkU9nrY6TsChfGU1xqGePriBkNtNRMiA== split2@^3.0.0: version "3.2.2" @@ -7604,11 +7217,11 @@ sprintf-js@~1.0.2: integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== ssri@^10.0.0: - version "10.0.4" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.4.tgz#5a20af378be586df139ddb2dfb3bf992cf0daba6" - integrity sha512-12+IR2CB2C28MMAw0Ncqwj5QbTcs0nGIhgJzYWzDkb21vWmfNI83KS4f3Ci6GI98WreIfG7o9UXp3C0qbpA8nQ== + version "10.0.5" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.5.tgz#e49efcd6e36385196cb515d3a2ad6c3f0265ef8c" + integrity sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A== dependencies: - minipass "^5.0.0" + minipass "^7.0.3" stack-utils@^2.0.3: version "2.0.6" @@ -7658,6 +7271,11 @@ streamroller@^3.1.5: debug "^4.3.4" fs-extra "^8.1.0" +streamsearch@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== + string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -7764,11 +7382,6 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-final-newline@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" - integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== - strip-indent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" @@ -7835,14 +7448,6 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -synckit@^0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.5.tgz#b7f4358f9bb559437f9f167eb6bc46b3c9818fa3" - integrity sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q== - dependencies: - "@pkgr/utils" "^2.3.1" - tslib "^2.5.0" - table@^6.8.1: version "6.8.1" resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" @@ -7923,11 +7528,6 @@ through@2, "through@>=2.2.7 <3": resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -titleize@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" - integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ== - tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -7981,6 +7581,25 @@ ts-jest@^27: semver "7.x" yargs-parser "20.x" +ts-node@^10.9.1: + version "10.9.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + tsconfig-paths@^3.14.2: version "3.14.2" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" @@ -7996,10 +7615,10 @@ tslib@^1.11.1, tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.3.1, tslib@^2.5.0, tslib@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410" - integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig== +tslib@^2.3.1, tslib@^2.5.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== tsutils@^3.21.0: version "3.21.0" @@ -8120,11 +7739,21 @@ typescript@4.9.5: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript@next: + version "5.3.0-dev.20230901" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.0-dev.20230901.tgz#968556d52d22e1a37f8fcaf99b7f2699870ebee1" + integrity sha512-WF0nADzGdbBjQf948j5pSOko6uf7ax2KO1FqrPiX3RsQ99901TdBERuL5ivUu08KKOWV/+JyzUclUWIke5IwCw== + typescript@~3.9.10: version "3.9.10" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== +typescript@~5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== + uglify-js@^3.1.4: version "3.17.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" @@ -8140,6 +7769,13 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +undici@^5.23.0: + version "5.23.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.23.0.tgz#e7bdb0ed42cebe7b7aca87ced53e6eaafb8f8ca0" + integrity sha512-1D7w+fvRsqlQ9GscLBwcAJinqcZGHUKjbOmXdlE/v8BvEGXjeWAax+341q44EuTcHXXnfyKNbKRq4Lg7OzhMmg== + dependencies: + busboy "^1.6.0" + unique-filename@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea" @@ -8258,6 +7894,11 @@ uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + v8-to-istanbul@^8.1.0: version "8.1.1" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz#77b752fd3975e31bbcef938f85e9bd1c7a8d60ed" @@ -8311,11 +7952,6 @@ watchpack@^2.0.0-beta.10: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" -web-streams-polyfill@^3.0.3: - version "3.2.1" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" - integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== - webidl-conversions@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" @@ -8402,10 +8038,10 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -workerpool@^6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.4.0.tgz#f8d5cfb45fde32fa3b7af72ad617c3369567a462" - integrity sha512-i3KR1mQMNwY2wx20ozq2EjISGtQWDIfV56We+yGJ5yDs8jTwQiLLaqHlkBHITlCuJnYlVRmXegxFxZg7gqI++A== +workerpool@^6.4.2: + version "6.4.2" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.4.2.tgz#5d086f6fef89adbc4300ca24fcafb7082330e960" + integrity sha512-MrDWwemtC4xNV22kbbZDQQQmxNX+yLm790sgYl2wVD3CWnK7LJY1youI/11wHorAjHjK+GEjUxUh74XoPU71uQ== "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" @@ -8546,7 +8182,7 @@ yargs@^16.0.0, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.6.2, yargs@^17.7.2: +yargs@^17.7.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== @@ -8559,6 +8195,11 @@ yargs@^17.6.2, yargs@^17.7.2: y18n "^5.0.5" yargs-parser "^21.1.1" +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"