Repository: dealmore/terraform-aws-next-js Branch: main Commit: f6fc50702f6a Files: 842 Total size: 2.6 MB Directory structure: gitextract_ad_x_yca/ ├── .editorconfig ├── .github/ │ └── workflows/ │ ├── CI.yml │ ├── lint.yml │ ├── release.yml │ └── tf-docs.yml ├── .gitignore ├── .prettierrc.js ├── .terraform-docs.yml ├── .vscode/ │ ├── extensions.json │ ├── launch.json │ └── settings.json ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── docker-compose.yml ├── docs/ │ └── development.md ├── examples/ │ ├── .gitignore │ ├── atomic-deployments/ │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── main.tf │ │ ├── package.json │ │ └── pages/ │ │ └── index.js │ ├── complete/ │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── components/ │ │ │ └── header.js │ │ ├── main.tf │ │ ├── next.config.js │ │ ├── package.json │ │ └── pages/ │ │ ├── about.js │ │ ├── api/ │ │ │ └── robots.js │ │ ├── index.js │ │ └── test/ │ │ └── [...slug].js │ ├── next-image/ │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── app.css │ │ ├── components/ │ │ │ ├── view-source.js │ │ │ └── view-source.module.css │ │ ├── main.tf │ │ ├── next.config.js │ │ ├── package.json │ │ ├── pages/ │ │ │ ├── _app.js │ │ │ ├── background.js │ │ │ ├── index.js │ │ │ ├── layout-fill.js │ │ │ ├── layout-fixed.js │ │ │ ├── layout-intrinsic.js │ │ │ └── layout-responsive.js │ │ └── styles.module.css │ ├── static/ │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── main.tf │ │ ├── package.json │ │ └── pages/ │ │ ├── about.js │ │ ├── blog/ │ │ │ └── index.js │ │ └── index.js │ ├── with-custom-domain/ │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── main.tf │ │ ├── package.json │ │ └── pages/ │ │ └── index.js │ └── with-existing-cloudfront/ │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── main.tf │ ├── package.json │ └── pages/ │ └── index.js ├── jest.config.js ├── main.tf ├── modules/ │ ├── api/ │ │ ├── main.tf │ │ ├── outputs.tf │ │ └── variables.tf │ ├── cloudfront-main/ │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── variables.tf │ │ └── versions.tf │ ├── cloudfront-proxy-config/ │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── variables.tf │ │ └── versions.tf │ ├── deploy-controller/ │ │ ├── README.md │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── variables.tf │ │ └── versions.tf │ ├── lambda-worker/ │ │ ├── LICENSE │ │ ├── iam.tf │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── variables.tf │ │ └── versions.tf │ ├── proxy/ │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── variables.tf │ │ └── versions.tf │ └── statics-deploy/ │ ├── main.tf │ ├── outputs.tf │ ├── variables.tf │ └── versions.tf ├── outputs.tf ├── package.json ├── packages/ │ ├── api/ │ │ ├── .gitignore │ │ ├── jest.config.js │ │ ├── ncc.config.json │ │ ├── package.json │ │ ├── schema.ts │ │ ├── schema.yaml │ │ ├── src/ │ │ │ ├── actions/ │ │ │ │ ├── alias/ │ │ │ │ │ ├── alias-utils.ts │ │ │ │ │ ├── create-or-update-alias.ts │ │ │ │ │ ├── delete-alias-by-id.ts │ │ │ │ │ └── list-aliases.ts │ │ │ │ └── deployment/ │ │ │ │ ├── create-deployment.ts │ │ │ │ ├── delete-deployment-by-id.ts │ │ │ │ ├── get-deployment-by-id.ts │ │ │ │ └── list-deployments.ts │ │ │ ├── api.ts │ │ │ ├── declarations.d.ts │ │ │ ├── handler.ts │ │ │ ├── serializers/ │ │ │ │ └── deployment.ts │ │ │ └── services/ │ │ │ ├── cloudformation.ts │ │ │ ├── dynamodb.ts │ │ │ └── s3.ts │ │ ├── test/ │ │ │ ├── actions/ │ │ │ │ ├── alias/ │ │ │ │ │ ├── create-or-update-alias.test.ts │ │ │ │ │ ├── delete-alias-by-id.test.ts │ │ │ │ │ └── list-aliases.test.ts │ │ │ │ └── deployment/ │ │ │ │ ├── create-deployment.test.ts │ │ │ │ ├── delete-deployment-by-id.test.ts │ │ │ │ ├── get-deployment-by-id.test.ts │ │ │ │ └── list-deployments.test.ts │ │ │ └── test-utils.ts │ │ └── tsconfig.json │ ├── deploy-controller/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── controller.ts │ │ │ ├── declarations.d.ts │ │ │ ├── handler.ts │ │ │ └── utils/ │ │ │ ├── ensure-env.ts │ │ │ ├── parse-cloudformation-event.ts │ │ │ └── parse-lambda-routes.ts │ │ ├── test/ │ │ │ ├── controller.test.ts │ │ │ ├── test-utils.ts │ │ │ └── utils/ │ │ │ ├── parse-cloudformation-event.test.ts │ │ │ └── parse-lambda-routes.test.ts │ │ └── tsconfig.json │ ├── deploy-trigger/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── ncc.config.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── cdk/ │ │ │ │ ├── aws-construct-function-urls.ts │ │ │ │ ├── aws-construct.ts │ │ │ │ ├── cdk-utils.ts │ │ │ │ ├── create-cloudformation-stack.ts │ │ │ │ └── to-cloudformation.ts │ │ │ ├── constants.ts │ │ │ ├── create-invalidation.ts │ │ │ ├── declarations.d.ts │ │ │ ├── deploy-trigger.ts │ │ │ ├── get-or-create-manifest.ts │ │ │ ├── handler.ts │ │ │ ├── types.ts │ │ │ ├── update-manifest.ts │ │ │ └── utils/ │ │ │ ├── ensure-env.ts │ │ │ └── random-id.ts │ │ ├── test/ │ │ │ ├── create-invalidation.test.ts │ │ │ ├── deploy-trigger.test.ts │ │ │ ├── get-or-create-manifest.test.ts │ │ │ ├── test-utils.ts │ │ │ └── update-manifest.test.ts │ │ └── tsconfig.json │ ├── dynamodb-actions/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── alias/ │ │ │ │ ├── create-alias.ts │ │ │ │ ├── delete-alias-by-id.ts │ │ │ │ ├── get-alias-by-hostname.ts │ │ │ │ ├── get-alias-by-id.ts │ │ │ │ └── list-aliases-for-deployment.ts │ │ │ ├── deployment/ │ │ │ │ ├── create-deployment.ts │ │ │ │ ├── delete-deployment-by-id.ts │ │ │ │ ├── get-deployment-by-id.ts │ │ │ │ ├── list-deployments.ts │ │ │ │ ├── update-deployment-status-create-failed.ts │ │ │ │ ├── update-deployment-status-create-in-progress.ts │ │ │ │ ├── update-deployment-status-destroy-failed.ts │ │ │ │ ├── update-deployment-status-destroy-in-progress.ts │ │ │ │ ├── update-deployment-status-destroy-requested.ts │ │ │ │ ├── update-deployment-status-finished.ts │ │ │ │ ├── update-deployment-status.ts │ │ │ │ └── update-deployment.ts │ │ │ ├── index.ts │ │ │ ├── types.ts │ │ │ └── utils/ │ │ │ ├── dynamodb/ │ │ │ │ ├── index.ts │ │ │ │ └── update-item.ts │ │ │ └── reverse-hostname.ts │ │ ├── test/ │ │ │ ├── alias/ │ │ │ │ ├── create-alias.test.ts │ │ │ │ ├── delete-alias-by-id.test.ts │ │ │ │ ├── get-alias-by-id.test.ts │ │ │ │ └── list-aliases-for-deployment.test.ts │ │ │ ├── deployment/ │ │ │ │ ├── create-deployment.test.ts │ │ │ │ ├── delete-deployment.test.ts │ │ │ │ ├── get-deployment-by-id.test.ts │ │ │ │ ├── list-deployments.test.ts │ │ │ │ └── update-deployment.test.ts │ │ │ ├── test-utils.ts │ │ │ └── utils/ │ │ │ └── reverse-hostname.test.ts │ │ └── tsconfig.json │ ├── node-bridge/ │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ └── bridge.ts │ │ ├── test/ │ │ │ └── bridge.test.js │ │ └── tsconfig.json │ ├── proxy/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── error.html │ │ ├── jest.config.js │ │ ├── ncc.config.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── actions/ │ │ │ │ ├── fetch-cached.ts │ │ │ │ ├── fetch-file-system.ts │ │ │ │ └── fetch-proxy-config.ts │ │ │ ├── error/ │ │ │ │ ├── alias-not-configured.ts │ │ │ │ ├── missing-config.ts │ │ │ │ └── render-error.ts │ │ │ ├── handler.ts │ │ │ ├── index.ts │ │ │ ├── proxy.ts │ │ │ ├── types.ts │ │ │ └── util/ │ │ │ ├── append-querystring.ts │ │ │ ├── custom-origin.ts │ │ │ ├── etag-cache.ts │ │ │ ├── fetch-timeout.ts │ │ │ ├── generate-cloudfront-headers.ts │ │ │ ├── get-env.ts │ │ │ ├── is-url.ts │ │ │ ├── resolve-route-parameters.ts │ │ │ └── ttl-cache.ts │ │ ├── test/ │ │ │ ├── actions/ │ │ │ │ └── fetch-cached.test.ts │ │ │ ├── handler.test.ts │ │ │ ├── proxy.test.ts │ │ │ ├── proxy.unit.test.ts │ │ │ ├── res/ │ │ │ │ ├── config-001.json │ │ │ │ ├── config-002.json │ │ │ │ ├── config-003.json │ │ │ │ └── config-004.json │ │ │ ├── resolve-route-parameters.test.ts │ │ │ ├── test-utils.ts │ │ │ └── util/ │ │ │ ├── append-querystring.test.ts │ │ │ └── ttl-cache.test.ts │ │ └── tsconfig.json │ ├── proxy-config/ │ │ ├── .gitignore │ │ ├── jest.config.js │ │ ├── ncc.config.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── actions/ │ │ │ │ ├── deployment-file-exists.ts │ │ │ │ └── get-alias.ts │ │ │ ├── errors/ │ │ │ │ └── not-found-error.ts │ │ │ ├── handler.ts │ │ │ └── utils/ │ │ │ ├── get-env.ts │ │ │ └── split-at-character.ts │ │ ├── test/ │ │ │ └── utils/ │ │ │ └── split-at-character.test.ts │ │ └── tsconfig.json │ ├── runtime/ │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── build.sh │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── create-serverless-config.ts │ │ │ ├── dev-server.ts │ │ │ ├── index.ts │ │ │ ├── legacy-launcher.ts │ │ │ ├── legacy-versions.ts │ │ │ ├── templated-launcher-shared.ts │ │ │ ├── templated-launcher.ts │ │ │ └── utils.ts │ │ ├── test/ │ │ │ ├── fixtures/ │ │ │ │ ├── 00-i18n-support/ │ │ │ │ │ ├── additional.js │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ ├── another.js │ │ │ │ │ │ ├── auto-export/ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── dynamic/ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ ├── gsp/ │ │ │ │ │ │ │ ├── blocking/ │ │ │ │ │ │ │ │ └── [[...slug]].js │ │ │ │ │ │ │ ├── fallback/ │ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── no-fallback/ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ ├── gssp/ │ │ │ │ │ │ │ ├── [slug].js │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── links.js │ │ │ │ │ │ └── not-found/ │ │ │ │ │ │ ├── fallback/ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ └── index.js │ │ │ │ │ └── public/ │ │ │ │ │ └── hello.txt │ │ │ │ ├── 00-i18n-support-no-locale-detection/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ ├── another.js │ │ │ │ │ │ ├── auto-export/ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── dynamic/ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ ├── gsp/ │ │ │ │ │ │ │ ├── blocking/ │ │ │ │ │ │ │ │ └── [[...slug]].js │ │ │ │ │ │ │ ├── fallback/ │ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── no-fallback/ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ ├── gssp/ │ │ │ │ │ │ │ ├── [slug].js │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── links.js │ │ │ │ │ │ └── not-found/ │ │ │ │ │ │ ├── fallback/ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ └── index.js │ │ │ │ │ └── public/ │ │ │ │ │ └── hello.txt │ │ │ │ ├── 00-i18n-support-no-shared-lambdas/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ ├── another.js │ │ │ │ │ │ ├── auto-export/ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── dynamic/ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ ├── gsp/ │ │ │ │ │ │ │ ├── fallback/ │ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── no-fallback/ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ ├── gssp/ │ │ │ │ │ │ │ ├── [slug].js │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── links.js │ │ │ │ │ │ └── not-found/ │ │ │ │ │ │ ├── fallback/ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ └── index.js │ │ │ │ │ └── public/ │ │ │ │ │ └── hello.txt │ │ │ │ ├── 00-i18n-support-root-catchall/ │ │ │ │ │ ├── additional.js │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ └── [[...slug]].js │ │ │ │ │ └── public/ │ │ │ │ │ └── hello.txt │ │ │ │ ├── 00-optional-fallback-revalidate/ │ │ │ │ │ ├── additional.js │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ ├── [[...slug]].js │ │ │ │ │ │ └── posts/ │ │ │ │ │ │ └── [[...slug]].js │ │ │ │ │ └── vercel.json │ │ │ │ ├── 00-public-dir-output-dir/ │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── web/ │ │ │ │ │ ├── pages/ │ │ │ │ │ │ ├── dynamic/ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ ├── dynamic-ssr/ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ └── index.js │ │ │ │ │ └── public/ │ │ │ │ │ ├── hello.txt │ │ │ │ │ └── public/ │ │ │ │ │ └── data.txt │ │ │ │ ├── 00-root-optional-revalidate/ │ │ │ │ │ ├── additional.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ └── [[...slug]].js │ │ │ │ ├── 00-shared-lambdas/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── [teamSlug]/ │ │ │ │ │ │ └── [project]/ │ │ │ │ │ │ └── [id].js │ │ │ │ │ ├── groups/ │ │ │ │ │ │ └── [id].js │ │ │ │ │ └── teams/ │ │ │ │ │ └── invite/ │ │ │ │ │ └── [inviteCode].js │ │ │ │ ├── 00-trailing-slash-add-export/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── 404.js │ │ │ │ │ └── foo.js │ │ │ │ ├── 00-trailing-slash-remove/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ ├── abc/ │ │ │ │ │ │ │ └── def.js │ │ │ │ │ │ └── foo.js │ │ │ │ │ └── public/ │ │ │ │ │ └── test.txt │ │ │ │ ├── 01-cache-headers/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── [team]/ │ │ │ │ │ │ ├── [project]/ │ │ │ │ │ │ │ ├── [deployment]/ │ │ │ │ │ │ │ │ ├── [another]/ │ │ │ │ │ │ │ │ │ ├── [final]/ │ │ │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ └── index.js │ │ │ │ │ └── index.js │ │ │ │ ├── 03-next-8/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── hello1.js │ │ │ │ │ └── nested/ │ │ │ │ │ └── hello2.js │ │ │ │ ├── 04-firebase-node-10/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ └── nested/ │ │ │ │ │ ├── fb.js │ │ │ │ │ └── moar/ │ │ │ │ │ └── [dynamic_fb].js │ │ │ │ ├── 05-spr-support/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── another.js │ │ │ │ │ ├── another2.js │ │ │ │ │ ├── api/ │ │ │ │ │ │ └── noop.js │ │ │ │ │ ├── blog/ │ │ │ │ │ │ └── [post]/ │ │ │ │ │ │ ├── [comment].js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── forever.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── lambda.js │ │ │ │ ├── 06-lambda-with-memory/ │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── src/ │ │ │ │ │ └── pages/ │ │ │ │ │ └── api/ │ │ │ │ │ ├── index.js │ │ │ │ │ ├── memory.js │ │ │ │ │ └── sub/ │ │ │ │ │ ├── another.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── 07-custom-routes/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── hello.js │ │ │ │ │ └── params.js │ │ │ │ ├── 08-custom-routes-catchall/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── hello.js │ │ │ │ │ └── params.js │ │ │ │ ├── 09-yarn-workspaces/ │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── lerna.json │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── packages/ │ │ │ │ │ ├── common/ │ │ │ │ │ │ ├── dist/ │ │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── src/ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ └── tsconfig.json │ │ │ │ │ └── web/ │ │ │ │ │ ├── next-env.d.ts │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ ├── _app.tsx │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── tsconfig.json │ │ │ │ ├── 10-export-cache-headers/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ └── index.js │ │ │ │ ├── 11-export-clean-urls/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── about.js │ │ │ │ │ └── index.js │ │ │ │ ├── 12-no-export-auto/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── about.js │ │ │ │ │ └── index.js │ │ │ │ ├── 13-export-custom-routes/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── about.js │ │ │ │ │ └── index.js │ │ │ │ ├── 14-next-offline/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── about.js │ │ │ │ │ └── index.js │ │ │ │ ├── 16-base-path/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── another.js │ │ │ │ │ ├── api/ │ │ │ │ │ │ ├── [slug]/ │ │ │ │ │ │ │ ├── another.js │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ └── hello.js │ │ │ │ │ ├── blog/ │ │ │ │ │ │ └── [post]/ │ │ │ │ │ │ ├── comments.js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── blog-ssg/ │ │ │ │ │ │ └── [post]/ │ │ │ │ │ │ ├── comments.js │ │ │ │ │ │ └── index.js │ │ │ │ │ └── index.js │ │ │ │ ├── 17-static-404/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ └── index.js │ │ │ │ ├── 18-ssg-fallback-support/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── another.js │ │ │ │ │ ├── another2.js │ │ │ │ │ ├── api/ │ │ │ │ │ │ └── noop.js │ │ │ │ │ ├── blog/ │ │ │ │ │ │ └── [post]/ │ │ │ │ │ │ ├── [comment].js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── forever.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── lambda.js │ │ │ │ ├── 19-pages-404/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── 404.js │ │ │ │ │ └── index.js │ │ │ │ ├── 20-pages-404-lambda/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── 404.js │ │ │ │ │ ├── _app.js │ │ │ │ │ └── index.js │ │ │ │ ├── 21-server-props/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── another.js │ │ │ │ │ ├── another2.js │ │ │ │ │ ├── blog/ │ │ │ │ │ │ └── [post]/ │ │ │ │ │ │ ├── [comment].js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── forever.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── lambda.js │ │ │ │ ├── 22-ssg-v2/ │ │ │ │ │ ├── additional.js │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── another.js │ │ │ │ │ ├── another2.js │ │ │ │ │ ├── api/ │ │ │ │ │ │ └── noop.js │ │ │ │ │ ├── api-docs/ │ │ │ │ │ │ └── [...slug].js │ │ │ │ │ ├── blog/ │ │ │ │ │ │ └── [post]/ │ │ │ │ │ │ ├── [comment].js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── forever.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── lambda.js │ │ │ │ │ └── nofallback/ │ │ │ │ │ └── [slug].js │ │ │ │ ├── 22-ssg-v2-catchall/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── [...path].js │ │ │ │ │ └── index.js │ │ │ │ ├── 23-custom-routes-verbose/ │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ ├── a/ │ │ │ │ │ │ │ └── catch-all.js │ │ │ │ │ │ ├── another/ │ │ │ │ │ │ │ └── [id].js │ │ │ │ │ │ ├── api/ │ │ │ │ │ │ │ ├── dynamic/ │ │ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ │ │ └── hello.js │ │ │ │ │ │ ├── b/ │ │ │ │ │ │ │ └── [123].js │ │ │ │ │ │ ├── blog/ │ │ │ │ │ │ │ └── [post]/ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── c/ │ │ │ │ │ │ │ └── [alongparamnameshouldbeallowedeventhoughweird].js │ │ │ │ │ │ ├── catchall-dash/ │ │ │ │ │ │ │ └── [...hello-world].js │ │ │ │ │ │ ├── dash/ │ │ │ │ │ │ │ └── [hello-world].js │ │ │ │ │ │ ├── docs/ │ │ │ │ │ │ │ └── v2/ │ │ │ │ │ │ │ └── more/ │ │ │ │ │ │ │ └── now-for-github.js │ │ │ │ │ │ ├── hello-again.js │ │ │ │ │ │ ├── hello.js │ │ │ │ │ │ ├── multi-rewrites.js │ │ │ │ │ │ ├── nav.js │ │ │ │ │ │ ├── params.js │ │ │ │ │ │ ├── redirect-override.js │ │ │ │ │ │ └── with-params.js │ │ │ │ │ └── public/ │ │ │ │ │ ├── blog/ │ │ │ │ │ │ └── data.json │ │ │ │ │ └── static/ │ │ │ │ │ └── hello.txt │ │ │ │ ├── 24-custom-output-dir/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── index.js │ │ │ │ │ └── ssg/ │ │ │ │ │ └── [slug].js │ │ │ │ ├── 25-index-routes/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── api/ │ │ │ │ │ │ └── sub/ │ │ │ │ │ │ ├── [id].js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── nested-index/ │ │ │ │ │ │ └── index/ │ │ │ │ │ │ └── index.js │ │ │ │ │ └── sub/ │ │ │ │ │ ├── [id].js │ │ │ │ │ └── index.js │ │ │ │ ├── 25-mono-repo-404/ │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── package.json │ │ │ │ │ ├── packages/ │ │ │ │ │ │ └── webapp/ │ │ │ │ │ │ ├── next.config.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── pages/ │ │ │ │ │ │ ├── 404.js │ │ │ │ │ │ └── index.js │ │ │ │ │ └── vercel.json │ │ │ │ ├── 26-mono-repo-404-lambda/ │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── packages/ │ │ │ │ │ └── webapp/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── 404.js │ │ │ │ │ ├── _app.js │ │ │ │ │ └── index.js │ │ │ │ ├── 27-non-word-param/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── [...path-segments].js │ │ │ │ │ └── index.js │ │ │ │ ├── 27-preview-mode/ │ │ │ │ │ ├── additional.js │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── api/ │ │ │ │ │ │ ├── disable.js │ │ │ │ │ │ └── enable.js │ │ │ │ │ └── docs/ │ │ │ │ │ ├── [...rest].js │ │ │ │ │ └── index.js │ │ │ │ ├── 28-nested-public/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ └── index.js │ │ │ │ │ └── public/ │ │ │ │ │ └── republic/ │ │ │ │ │ └── test.txt │ │ │ │ ├── 29-ssg-all-static/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── another-index/ │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── another.js │ │ │ │ │ ├── another2.js │ │ │ │ │ ├── blog/ │ │ │ │ │ │ └── [post]/ │ │ │ │ │ │ ├── [comment].js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── forever.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── nofallback/ │ │ │ │ │ └── [slug].js │ │ │ │ ├── 29-ssg-all-static-custom-404/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── 404.js │ │ │ │ │ ├── another.js │ │ │ │ │ ├── another2.js │ │ │ │ │ ├── blog/ │ │ │ │ │ │ └── [post]/ │ │ │ │ │ │ ├── [comment].js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── forever.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── nofallback/ │ │ │ │ │ └── [slug].js │ │ │ │ ├── 30-monorepo-no-script/ │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── babel.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── packages/ │ │ │ │ │ └── www/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ └── index.jsx │ │ │ │ ├── 31-blocking-fallback/ │ │ │ │ │ ├── additional.js │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── fixed/ │ │ │ │ │ │ └── [slug].js │ │ │ │ │ └── regenerated/ │ │ │ │ │ └── [slug].js │ │ │ │ └── 32-custom-install-command/ │ │ │ │ ├── .gitignore │ │ │ │ ├── .yarn/ │ │ │ │ │ └── releases/ │ │ │ │ │ └── yarn-berry.cjs │ │ │ │ ├── .yarnrc.yml │ │ │ │ ├── install.js │ │ │ │ ├── next.config.js │ │ │ │ ├── package.json │ │ │ │ ├── pages/ │ │ │ │ │ └── index.js │ │ │ │ └── vercel.json │ │ │ ├── integration/ │ │ │ │ ├── gip-gsp-404/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── 404.js │ │ │ │ │ ├── _app.js │ │ │ │ │ ├── api/ │ │ │ │ │ │ └── hello.js │ │ │ │ │ └── index.js │ │ │ │ ├── index.test.js │ │ │ │ ├── legacy-custom-dependency/ │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ └── index.js │ │ │ │ ├── legacy-standard/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ └── index.js │ │ │ │ ├── legacy-static-files/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ └── index.js │ │ │ │ │ └── static/ │ │ │ │ │ └── test.txt │ │ │ │ ├── monorepo/ │ │ │ │ │ ├── now.json │ │ │ │ │ ├── shared/ │ │ │ │ │ │ └── hello.js │ │ │ │ │ └── www/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── public/ │ │ │ │ │ │ └── data.txt │ │ │ │ │ └── static/ │ │ │ │ │ └── test.txt │ │ │ │ ├── no-package-json-and-next-config/ │ │ │ │ │ ├── now.json │ │ │ │ │ └── pages/ │ │ │ │ │ └── index.js │ │ │ │ ├── postinstall/ │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ ├── goodbye.js │ │ │ │ │ │ └── index.js │ │ │ │ │ ├── postinstall.js │ │ │ │ │ └── public/ │ │ │ │ │ └── .gitkeep │ │ │ │ ├── public-files/ │ │ │ │ │ ├── create-public-file.js │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ └── index.js │ │ │ │ │ └── public/ │ │ │ │ │ └── robots.txt │ │ │ │ ├── serverless-config/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── goodbye.js │ │ │ │ │ └── index.js │ │ │ │ ├── serverless-config-async/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── goodbye.js │ │ │ │ │ └── index.js │ │ │ │ ├── serverless-config-monorepo-missing/ │ │ │ │ │ ├── nested/ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── pages/ │ │ │ │ │ │ ├── goodbye.js │ │ │ │ │ │ └── index.js │ │ │ │ │ └── now.json │ │ │ │ ├── serverless-config-monorepo-present/ │ │ │ │ │ ├── nested/ │ │ │ │ │ │ ├── next.config.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── pages/ │ │ │ │ │ │ ├── goodbye.js │ │ │ │ │ │ └── index.js │ │ │ │ │ └── now.json │ │ │ │ ├── serverless-config-object/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── goodbye.js │ │ │ │ │ └── index.js │ │ │ │ ├── serverless-config-promise/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── goodbye.js │ │ │ │ │ └── index.js │ │ │ │ ├── serverless-no-config/ │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── goodbye.js │ │ │ │ │ └── index.js │ │ │ │ ├── serverless-no-config-build/ │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ └── index.js │ │ │ │ ├── standard/ │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── pages/ │ │ │ │ │ ├── goodbye.js │ │ │ │ │ └── index.js │ │ │ │ ├── static-files/ │ │ │ │ │ ├── next.config.js │ │ │ │ │ ├── now.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── pages/ │ │ │ │ │ │ └── index.js │ │ │ │ │ └── static/ │ │ │ │ │ └── test.txt │ │ │ │ └── static-site/ │ │ │ │ ├── package.json │ │ │ │ ├── pages/ │ │ │ │ │ ├── another.js │ │ │ │ │ ├── dynamic.js │ │ │ │ │ └── index.js │ │ │ │ └── vercel.json │ │ │ ├── lib/ │ │ │ │ └── run-build-lambda.js │ │ │ ├── unit/ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ └── utils.test.js.snap │ │ │ │ ├── build.test.js │ │ │ │ ├── export.test.js │ │ │ │ ├── fixtures/ │ │ │ │ │ ├── entry/ │ │ │ │ │ │ └── next.config.js │ │ │ │ │ └── next.config.js │ │ │ │ └── utils.test.js │ │ │ └── utils.js │ │ └── tsconfig.json │ └── tf-next/ │ ├── .gitignore │ ├── README.md │ ├── index.js │ ├── package.json │ ├── src/ │ │ ├── client/ │ │ │ ├── aws-profile.ts │ │ │ ├── client.ts │ │ │ ├── index.ts │ │ │ └── services/ │ │ │ ├── api/ │ │ │ │ ├── api.ts │ │ │ │ ├── index.ts │ │ │ │ └── middleware.ts │ │ │ └── output/ │ │ │ ├── create-spinner.ts │ │ │ ├── index.ts │ │ │ └── output.ts │ │ ├── commands/ │ │ │ ├── alias/ │ │ │ │ ├── alias-list.ts │ │ │ │ ├── alias-remove.ts │ │ │ │ ├── alias-set.ts │ │ │ │ ├── alias.ts │ │ │ │ └── index.ts │ │ │ ├── build/ │ │ │ │ ├── build.ts │ │ │ │ └── index.ts │ │ │ ├── deploy/ │ │ │ │ ├── deploy.ts │ │ │ │ └── index.ts │ │ │ ├── deployment/ │ │ │ │ ├── deployment-list.ts │ │ │ │ ├── deployment-remove.ts │ │ │ │ ├── deployment.ts │ │ │ │ └── index.ts │ │ │ └── main.ts │ │ ├── index.ts │ │ ├── middleware/ │ │ │ └── global.ts │ │ ├── types.ts │ │ └── utils/ │ │ ├── errors/ │ │ │ ├── cli-error.ts │ │ │ ├── errors.ts │ │ │ ├── index.ts │ │ │ └── response-error.ts │ │ ├── index.ts │ │ ├── project-config.ts │ │ ├── routes.ts │ │ ├── strlen.ts │ │ └── trim-protocol.ts │ └── tsconfig.json ├── patches/ │ └── aws-cdk-lib+2.25.0.patch ├── scripts/ │ └── publish-release.sh ├── test/ │ ├── README.md │ ├── build-fixtures.js │ ├── fixtures/ │ │ ├── 00-shared-lambdas/ │ │ │ ├── next.config.js │ │ │ ├── package.json │ │ │ ├── pages/ │ │ │ │ ├── [teamSlug]/ │ │ │ │ │ └── [project]/ │ │ │ │ │ └── [id].js │ │ │ │ ├── groups/ │ │ │ │ │ └── [id].js │ │ │ │ ├── products/ │ │ │ │ │ └── [pid]/ │ │ │ │ │ └── index.js │ │ │ │ └── teams/ │ │ │ │ └── invite/ │ │ │ │ └── [inviteCode].js │ │ │ └── probes.json │ │ ├── 00-trailing-slash-add/ │ │ │ ├── next.config.js │ │ │ ├── package.json │ │ │ ├── pages/ │ │ │ │ ├── abc/ │ │ │ │ │ └── def.js │ │ │ │ ├── api/ │ │ │ │ │ └── hello.js │ │ │ │ ├── blog/ │ │ │ │ │ └── [post].js │ │ │ │ └── foo.js │ │ │ ├── probes.json │ │ │ └── public/ │ │ │ └── test.txt │ │ ├── 01-custom-routing/ │ │ │ ├── next.config.js │ │ │ ├── package.json │ │ │ ├── pages/ │ │ │ │ ├── hello.js │ │ │ │ ├── index.js │ │ │ │ └── param.js │ │ │ └── probes.json │ │ ├── 02-api/ │ │ │ ├── next.config.js │ │ │ ├── package.json │ │ │ ├── pages/ │ │ │ │ ├── api/ │ │ │ │ │ ├── actions/ │ │ │ │ │ │ └── [actionId]/ │ │ │ │ │ │ └── info.js │ │ │ │ │ ├── host.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── viewer-header.js │ │ │ │ └── test.js │ │ │ └── probes.json │ │ └── 03-yarn-workspaces/ │ │ ├── lerna.json │ │ ├── package.json │ │ ├── packages/ │ │ │ ├── common/ │ │ │ │ ├── dist/ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ └── index.js │ │ │ │ ├── package.json │ │ │ │ ├── src/ │ │ │ │ │ └── index.ts │ │ │ │ └── tsconfig.json │ │ │ └── web/ │ │ │ ├── next-env.d.ts │ │ │ ├── next.config.js │ │ │ ├── package.json │ │ │ ├── pages/ │ │ │ │ ├── _app.tsx │ │ │ │ └── index.tsx │ │ │ └── tsconfig.json │ │ └── probes.json │ ├── jest.setup.ts │ ├── routes.test.ts │ ├── tsconfig.json │ └── utils/ │ ├── attach-logger.ts │ ├── host-ip-address.ts │ ├── index.ts │ └── s3-create-bucket.ts ├── test.env ├── tsconfig.json ├── turbo.json ├── variables.tf └── versions.tf ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ # EditorConfig is awesome: https://EditorConfig.org # top-most EditorConfig file root = true # Unix-style newlines with a newline ending every file [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true ================================================ FILE: .github/workflows/CI.yml ================================================ name: CI on: push: branches: - main - v[0-9]+.[0-9x]+.x pull_request: env: NEXT_TELEMETRY_DISABLED: 1 jobs: build: runs-on: ubuntu-latest container: public.ecr.aws/sam/build-nodejs14.x:latest steps: - name: Install yarn run: npm install --global yarn@1.22.17 - uses: actions/checkout@v2 - name: Cache uses: actions/cache@v2 with: path: | .yarn **/node_modules key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Install dependencies run: yarn --frozen-lockfile --cache-folder .yarn - name: Build run: yarn build - name: Upload build artifacts uses: actions/upload-artifact@v2 with: name: dist path: | packages/api/dist/ packages/api/dist.zip packages/deploy-controller/dist/ packages/deploy-controller/dist.zip packages/deploy-trigger/dist/ packages/deploy-trigger/dist.zip packages/proxy/dist/ packages/proxy/dist.zip packages/proxy-config/dist/ packages/proxy-config/dist.zip packages/runtime/dist/ packages/tf-next/dist/ if-no-files-found: error test-integration: needs: build runs-on: ubuntu-latest container: public.ecr.aws/sam/build-nodejs14.x:latest services: s3: image: registry.gitlab.com/dealmore/dealmore-build-images:s3-emulator env: MINIO_ACCESS_KEY: test MINIO_SECRET_KEY: testtest dynamodb: image: amazon/dynamodb-local:latest # @note Github overwrites WORKDIR to repository path, so overwrite that again options: >- --workdir /home/dynamodblocal env: # Increase heap size for running the tests NODE_OPTIONS: '--max_old_space_size=4096' MINIO_ACCESS_KEY: test MINIO_SECRET_KEY: testtest S3_ENDPOINT: s3:9000 TEST_DYNAMO_ENDPOINT: http://dynamodb:8000 steps: - name: Install yarn run: npm install --global yarn@1.22.17 - uses: actions/checkout@v2 - name: Cache uses: actions/cache@v2 with: path: | .yarn **/node_modules key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Install dependencies run: yarn --frozen-lockfile --cache-folder .yarn - name: Download build artifacts uses: actions/download-artifact@v2 with: name: dist path: packages - name: Jest run: yarn test:not:runtime # We run the runtime tests in a dedicated task since running it with the # other integration tests would cause a memory overflow. test-integration-runtime: needs: build runs-on: ubuntu-latest container: public.ecr.aws/sam/build-nodejs14.x:latest steps: - name: Install yarn run: npm install --global yarn@1.22.17 - uses: actions/checkout@v2 - name: Cache uses: actions/cache@v2 with: path: | .yarn **/node_modules key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Install dependencies run: yarn --frozen-lockfile --cache-folder .yarn - name: Download build artifacts uses: actions/download-artifact@v2 with: name: dist path: packages - name: Jest run: yarn test:runtime test-e2e-prepare: needs: build runs-on: ubuntu-latest container: public.ecr.aws/sam/build-nodejs14.x:latest steps: - name: Install yarn run: npm install --global yarn@1.22.17 - uses: actions/checkout@v2 - name: Cache uses: actions/cache@v2 with: path: | .yarn **/node_modules key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }} - name: Yarn install run: yarn --frozen-lockfile --cache-folder .yarn - name: Download build artifacts uses: actions/download-artifact@v2 with: name: dist path: packages - name: Build e2e fixtures run: yarn test:e2e:prepare - name: Upload e2e fixtures uses: actions/upload-artifact@v2 with: name: e2e-fixtures path: test/fixtures/**/.next-tf/**/* if-no-files-found: error publishRelease: name: Potentially publish release runs-on: ubuntu-latest needs: [build, test-integration, test-integration-runtime] if: github.ref == 'refs/heads/main' env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} steps: - uses: actions/checkout@v2 with: fetch-depth: 25 - name: Fetch git tags run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Setup node uses: actions/setup-node@v2 with: node-version: '14' cache: 'yarn' - name: Install dependencies run: yarn --frozen-lockfile - name: Download build artifacts uses: actions/download-artifact@v2 with: name: dist path: packages # git user is required (bot not used) by release-it - name: Set git user to GitHub Actions uses: fregante/setup-git-user@v1.0.1 - name: Set registry for publish run: yarn config set registry https://registry.npmjs.org - name: Publish packages run: ./scripts/publish-release.sh ================================================ FILE: .github/workflows/lint.yml ================================================ name: Lint on: push: branches: - main - v[0-9]+.[0-9x]+.x pull_request: jobs: lint-tf: name: Lint Terraform runs-on: ubuntu-latest container: hashicorp/terraform steps: - name: Checkout uses: actions/checkout@v2 - name: Lint Terraform run: terraform fmt -check -recursive -diff ================================================ FILE: .github/workflows/release.yml ================================================ name: Release on: workflow_dispatch: inputs: tag: description: 'Tag' required: true releaseBranch: description: 'Release branch' required: true default: 'release' jobs: release: runs-on: ubuntu-latest steps: # Do a full checkout (all branches) - uses: actions/checkout@v2 with: fetch-depth: 0 - uses: milliHQ/gh-action-release-branch@v2.0.0 with: release-branch: ${{ github.event.inputs.releaseBranch }} release-tag: ${{ github.event.inputs.tag }} exclude: | .vscode/**/* packages/**/* test/**/* docker-compose.yml jest.config.js package.json tsconfig.json yarn.lock ================================================ FILE: .github/workflows/tf-docs.yml ================================================ # GitHub action to make sure that the terraform docs in the README are # up-to-date on every push to the main branch name: Terraform docs on: push: branches: - main - v[0-9]+.[0-9x]+.x jobs: update-docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Update Terraform docs in README uses: terraform-docs/gh-actions@v0.10.0 with: config-file: '.terraform-docs.yml' output-file: README.md git-push: 'true' git-commit-message: 'docs: Update Terraform docs' ================================================ FILE: .gitignore ================================================ node_modules .DS_STORE # Terraform **/.terraform/* *.tfstate *.tfstate.* # Build output .next .next-tf # Temp files *.swp* # Log files *.log # direnv .direnv .envrc # Turbo .turbo ================================================ FILE: .prettierrc.js ================================================ module.exports = { trailingComma: 'es5', singleQuote: true, }; ================================================ FILE: .terraform-docs.yml ================================================ formatter: 'markdown table' sections: hide: - 'data-sources' - 'modules' - 'resources' settings: anchor: false ================================================ FILE: .vscode/extensions.json ================================================ { "recommendations": ["Orta.vscode-jest", "esbenp.prettier-vscode"] } ================================================ FILE: .vscode/launch.json ================================================ { "version": "0.2.0", "configurations": [ { "name": "Debug Jest Tests", "type": "node", "request": "launch", "runtimeArgs": [ "--inspect-brk", "${workspaceRoot}/node_modules/.bin/jest", "--runInBand" ], "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", "port": 9229 }, { "name": "Debug Current Jest File", "type": "node", "request": "launch", "runtimeArgs": [ "--inspect-brk", "${workspaceRoot}/node_modules/.bin/jest", "--runInBand", "${file}" ], "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", "port": 9229 }, // Default launch configuration for VSCode Jest extension { "name": "vscode-jest-tests", "type": "node", "request": "launch", "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", "disableOptimisticBPs": true, "program": "${workspaceRoot}/node_modules/.bin/jest", "cwd": "${workspaceFolder}", "args": ["--runInBand", "--watchAll=false"] } ] } ================================================ FILE: .vscode/settings.json ================================================ { "files.associations": { "**/test/**/probes.json": "jsonc" } } ================================================ FILE: CHANGELOG.md ================================================ # Changelog ## [Unreleased] ## [1.0.0-canary.5] - 2022-07-12 - Adds alias for profile, improves error message ([#344](https://github.com/milliHQ/terraform-aws-next-js/pull/344)) ## [1.0.0-canary.4] - 2022-06-07 - Correctly increase version number of new packages ## [1.0.0-canary.3] - 2022-06-07 - Fixes deployments without Lambdas ([#325](https://github.com/milliHQ/terraform-aws-next-js/pull/325)) - Use CloudFormation role ([#324](https://github.com/milliHQ/terraform-aws-next-js/pull/324)) - Improve CLI ([#323](https://github.com/milliHQ/terraform-aws-next-js/pull/323)) - Fix runtime bundle ([#322](https://github.com/milliHQ/terraform-aws-next-js/pull/322)) ## [1.0.0-canary.2] - 2022-05-31 - Adds static prefix to files served from S3 ([#321](https://github.com/milliHQ/terraform-aws-next-js/pull/321)) - Add CLI commands ([#317](https://github.com/milliHQ/terraform-aws-next-js/pull/317)) - No longer require reserved concurrency ([#319](https://github.com/milliHQ/terraform-aws-next-js/pull/319), [#251](https://github.com/milliHQ/terraform-aws-next-js/issues/251)) - Use CLI and CDK for deployments ([#300](https://github.com/milliHQ/terraform-aws-next-js/pull/300)) ## [0.12.2] - 2022-04-16 - Append querystring to redirects ([#296](https://github.com/milliHQ/terraform-aws-next-js/issues/296), [#304](https://github.com/milliHQ/terraform-aws-next-js/pull/304)) ## [0.12.1] - 2022-04-11 - Pass image settings to the optimization module ([#297](https://github.com/milliHQ/terraform-aws-next-js/issues/297), [#299](https://github.com/milliHQ/terraform-aws-next-js/pull/299)) ## [0.12.0] - 2022-04-07 - Ensure compatibility with AWS Provider Version 4 ([#286](https://github.com/milliHQ/terraform-aws-next-js/issues/286), [#291](https://github.com/milliHQ/terraform-aws-next-js/pull/291)) - Add switch for attaching additional policy documents ([#276](https://github.com/milliHQ/terraform-aws-next-js/pull/276)) ## [0.11.5] - 2022-04-02 - Adds support for route-manifest v4 ([#292](https://github.com/milliHQ/terraform-aws-next-js/pull/292)) This ensures the builder works with Next.js versions `>= v12.1.3`. - Restrict [image optimizer](https://github.com/milliHQ/terraform-aws-next-js-image-optimization) submodule version to `<= v12.0.10` ([#293](https://github.com/milliHQ/terraform-aws-next-js/pull/293)) Since the `v12.0.10` release is the last version with support for [Terraform AWS Provider](https://registry.terraform.io/providers/hashicorp/aws/) `v3.x` this update ensures existing setups will not break in the future. - Bump @vercel/build-utils from `2.10.1` to `2.12.1` ([#287](https://github.com/milliHQ/terraform-aws-next-js/pull/287)) ## [0.11.4] - 2022-02-01 ### Fixed - Determine content-type correctly for localized pre-rendered HTML pages ([#278](https://github.com/milliHQ/terraform-aws-next-js/pull/278), [#277](https://github.com/milliHQ/terraform-aws-next-js/issues/277)) ## [0.11.3] - 2022-01-30 ### Added - Adds new output for Lambda role ARNs `lambda_execution_role_arns` ([#270](https://github.com/milliHQ/terraform-aws-next-js/pull/270)) ## [0.11.2] - 2022-01-23 ### Added - Support for response headers policy (`cloudfront_response_headers_policy`) for the internal CloudFront distribution ([#265](https://github.com/milliHQ/terraform-aws-next-js/pull/265), [#268](https://github.com/milliHQ/terraform-aws-next-js/pull/268)) This also increases the minimum required [Terraform AWS provider](https://github.com/hashicorp/terraform-provider-aws) version from `3.43.0` to `3.64.0`. ### Fixed - Bash script for uploading assets to S3 now uses the standard endpoint and is now compatible with newer AWS regions ([#263](https://github.com/milliHQ/terraform-aws-next-js/pull/263)) - Components fetched from npm registry now use relative paths that are stored in the Terraform state, which prevents unnecessary deployments ([#261](https://github.com/milliHQ/terraform-aws-next-js/pull/261)) ## [0.11.1] - 2022-01-15 ### Fixed - Fix for cloudfront invalidation dynamic routing paths ([#258](https://github.com/milliHQ/terraform-aws-next-js/pull/258)) ## [0.11.0] - 2022-01-13 ### Added - Option for attaching a waf policy to the internal CloudFront distribution ([#250](https://github.com/milliHQ/terraform-aws-next-js/pull/250)) ### Changed - TTL for `Cache-Control` header is set to `0` (no cache) when the header is not sent from origin ([#241](https://github.com/milliHQ/terraform-aws-next-js/pull/241), [#236](https://github.com/milliHQ/terraform-aws-next-js/issues/236)) ### Fixed - Static routes were falsely generated when running on Windows ([#246](https://github.com/milliHQ/terraform-aws-next-js/issues/246), [#254](https://github.com/milliHQ/terraform-aws-next-js/pull/254)) ## [0.10.2] (November 29, 2021) Bugfix release that ensures compatibility with the `v12.0.0` version of the [Terraform Next.js Image Optimization module for AWS](https://github.com/milliHQ/terraform-aws-next-js-image-optimization). - `create_image_optimization` breaks because of breaking change in the newest 12.0.0 release ([#243](https://github.com/milliHQ/terraform-aws-next-js/issues/243), [#244](https://github.com/milliHQ/terraform-aws-next-js/pull/244)) ## 0.10.1 (October 23, 2021) This release ensures that static generated routes with dynamic parts (e.g. `/test/[...slug]`) are invalidated correctly when running terraform apply. We also added a new option to define tags exclusively on S3 buckets created by this module. - Ensure correct invalidation for slug paths ([#140](https://github.com/milliHQ/terraform-aws-next-js/issues/140), [#229](https://github.com/milliHQ/terraform-aws-next-js/pull/229), [#228](https://github.com/milliHQ/terraform-aws-next-js/issues/228)) - Adds new input variable `tags_s3_bucket` ([#216](https://github.com/milliHQ/terraform-aws-next-js/issues/216), [#230](https://github.com/milliHQ/terraform-aws-next-js/pull/230)) ## 0.10.0 (October 16, 2021) Beginning with this release we streamline the versioning of the Terraform module with its npm-packages. So when you use the Terraform module in version [`0.10.0`](https://registry.terraform.io/modules/milliHQ/next-js/aws/) you should also use the [`tf-next@0.10.0`](https://www.npmjs.com/package/tf-next) npm-package for building the Next.js project. This release also increases the minimum required Terraform version from `0.13` to `0.15`. - Forward correct `host` header to server-side rendered pages ([#156](https://github.com/milliHQ/terraform-aws-next-js/issues/156), [#161](https://github.com/milliHQ/terraform-aws-next-js/pull/161)) - Adds charset to `Content-Type` header for static routes and files served by S3 ([#214](https://github.com/milliHQ/terraform-aws-next-js/issues/214), [#226](https://github.com/milliHQ/terraform-aws-next-js/pull/226)) - Removes empty provider warning when running Terraform commands ([#155](https://github.com/milliHQ/terraform-aws-next-js/issues/155), [#219](https://github.com/milliHQ/terraform-aws-next-js/pull/219)) - Removes random ids from resource names ([#212](https://github.com/milliHQ/terraform-aws-next-js/issues/212), [#227](https://github.com/milliHQ/terraform-aws-next-js/pull/227)) ## 0.9.3 (October 09, 2021) This release fixes the routing behavior for dynamic routes that are statically generated (served from S3). ### Proxy - Fixes dynamic routing for statically generated routes ([#218](https://github.com/milliHQ/terraform-aws-next-js/issues/218), [#221](https://github.com/milliHQ/terraform-aws-next-js/pull/221)) ## 0.9.2 (September 19, 2021) ⚠️ Namespace changed ⚠️ We [recently changed](https://github.com/milliHQ/terraform-aws-next-js/issues/194) the namespace of this module from `dealmore` to `milliHQ`. Make sure to upgrade the source of the module accordingly: ```diff module "tf_next" { - source = "dealmore/next-js/aws" + source = "milliHQ/next-js/aws" ... } ``` --- Besides from the namespace change, this release has now an improved experience when using it with [custom domains](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-custom-domain) and some bugfixes to the proxy component when using the [`trailingSlash` option](https://nextjs.org/docs/api-reference/next.config.js/trailing-slash) from Next.js. ### Terraform module - It's now possible to use domain aliases without creating an external CloudFront distribution ([#192](https://github.com/milliHQ/terraform-aws-next-js/pull/192)) - Ensure `x-nextjs-page` header gets forwarded ([#190](https://github.com/milliHQ/terraform-aws-next-js/pull/190)) - Bump `milliHQ/download/npm` from 1.1.0 to 2.0.0 ([#193](https://github.com/milliHQ/terraform-aws-next-js/pull/193)) ### Proxy (0.8.0) - Improve filesystem routes for trailing slashes ([#162](https://github.com/milliHQ/terraform-aws-next-js/pull/162), [#180](https://github.com/milliHQ/terraform-aws-next-js/issues/180), [#182](https://github.com/milliHQ/terraform-aws-next-js/pull/182), [#191](https://github.com/milliHQ/terraform-aws-next-js/pull/191)) ## 0.9.1 (June 20, 2021) This is a maintenance release which upgrades the image optimizer module to the latest version. We also changed the behavior of the proxy module so that the default root object in CloudFront is no longer necessary. No configuration changes should be necessary when upgrading from the `0.9.0` release. ### Terraform module - Upgrades Proxy component to 0.7.0 ([#139](https://github.com/milliHQ/terraform-aws-next-js/issues/139), [#141](https://github.com/milliHQ/terraform-aws-next-js/pull/141)) - Upgrades [Terraform Next.js Image Optimization module for AWS](https://github.com/milliHQ/terraform-aws-next-js-image-optimization) to `11.x.x` release ([#142](https://github.com/milliHQ/terraform-aws-next-js/issues/142), [#144](https://github.com/milliHQ/terraform-aws-next-js/pull/144)) The image optimizer Lambda now uses `2048mb` RAM by default (from `1024mb`) to improve resizing speed. You can change that amount with the newly introduced variable `image_optimization_lambda_memory_size`. This has no effect on the Lambda functions that serve the Next.js pages or api routes (they remain at `1024mb` by default). - Bump AWS Lambda Terraform module from 1.47.0 to 2.4.0 ([#145](https://github.com/milliHQ/terraform-aws-next-js/pull/145)) - Bump AWS API Gateway Terraform module from 0.11.0 to 1.1.0 ([#146](https://github.com/milliHQ/terraform-aws-next-js/pull/146)) ### Proxy (0.7.0) - Fix root route rewrites ([#139](https://github.com/milliHQ/terraform-aws-next-js/issues/139), [#141](https://github.com/milliHQ/terraform-aws-next-js/pull/141)) ## 0.9.0 - (June 15, 2021) **⚠️ Breaking Changes ⚠️** Since the main CloudFront distribution is a central resource that may need advanced customization, we decided to introduce a new way to fully customize the distribution for to your needs. As part of this change a few input variables are no longer supported and should be removed from the module. If you are not using one of these variables you can safely upgrade to this release without further changes. If you use one of the following input variables read below for more information how to upgrade: - `cloudfront_custom_behaviors` - `cloudfront_geo_restriction` - `cloudfront_origins` - `cloudfront_viewer_certificate_arn` - `cloudfront_minimum_protocol_version` - `create_domain_name_records` - `domain_names` - `domain_zone_names` If you are already using one of these input variables you should now create a new CloudFront resource in your `main.tf` file and link it with the Next.js module. For more information please see the ["with existing CloudFront"](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-existing-cloudfront) and ["with custom domain"](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-custom-domain) examples. ### Terraform module - Enable usage of external CloudFront resource ([#55](https://github.com/milliHQ/terraform-aws-next-js/issues/55), [#134](https://github.com/milliHQ/terraform-aws-next-js/pull/134), [#137](https://github.com/milliHQ/terraform-aws-next-js/pull/137)) - Queue CloudFront invalidations ([#48](https://github.com/milliHQ/terraform-aws-next-js/issues/48), [#125](https://github.com/milliHQ/terraform-aws-next-js/pull/125)) - Attaching Lambda to VPC ([#110](https://github.com/milliHQ/terraform-aws-next-js/issues/110), [#111](https://github.com/milliHQ/terraform-aws-next-js/pull/111)) Thanks to [@chamilad](https://github.com/chamilad) for contributing! - Remove provider proxy from proxy-config module ([#102](https://github.com/milliHQ/terraform-aws-next-js/issues/102), [#124](https://github.com/milliHQ/terraform-aws-next-js/pull/124)) ## Proxy (0.6.0) - Support rewriting to an external URL ([#65](https://github.com/milliHQ/terraform-aws-next-js/issues/65), [#120](https://github.com/milliHQ/terraform-aws-next-js/pull/120)) - Bump runtime from `nodejs12.x` to `nodejs14.x` ([#136](https://github.com/milliHQ/terraform-aws-next-js/pull/136)) ### Deploy trigger (0.4.0) - Queue CloudFront invalidations ([#48](https://github.com/milliHQ/terraform-aws-next-js/issues/48), [#125](https://github.com/milliHQ/terraform-aws-next-js/pull/125)) ## tf-next (0.7.0) - Adds support for yarn workspaces ([#93](https://github.com/milliHQ/terraform-aws-next-js/issues/93), [#107](https://github.com/milliHQ/terraform-aws-next-js/pull/107)) ### Runtime (1.1.0) - Bump @vercel/nft from 0.9.5 to 0.10.0 ([#112](https://github.com/milliHQ/terraform-aws-next-js/pull/112)) ## 0.8.1 - (April 27, 2021) ### Terraform module - Fixes compatibility with Terraform 0.15 ([#115](https://github.com/milliHQ/terraform-aws-next-js/issues/115), [#118](https://github.com/milliHQ/terraform-aws-next-js/pull/118)) - Bump AWS Lambda Terraform module from 1.34.0 to 1.47.0 ([#117](https://github.com/milliHQ/terraform-aws-next-js/pull/117)) - Bump Next.js Image Optimization module from 10.0.5 to 10.0.8 ([#116](https://github.com/milliHQ/terraform-aws-next-js/pull/116)) ## 0.8.0 - (April 05, 2021) This release enables Brotli in addition to gzip as default compression method. **⚠️ Breaking Changes ⚠️** Before upgrading make sure that you define a new alias `global_region` for the AWS Provider in the `us-east-1` region. This provider alias is used to create the Lambda@Edge function that must be created in `us-east-1`. ```diff # main.tf provider "aws" { region = "us-west-2" } + provider "aws" { + alias = "global_region" + region = "us-east-1" + } module "tf_next" { source = "dealmore/next-js/aws" + providers = { + aws.global_region = aws.global_region + } } ``` ### Terraform module - Removes internal AWS provider for `us-east-1` region ([#50](https://github.com/milliHQ/terraform-aws-next-js/issues/50), [#101](https://github.com/milliHQ/terraform-aws-next-js/pull/101)) - Enable Brotli compression for CloudFront ([#8](https://github.com/milliHQ/terraform-aws-next-js/issues/8), [#82](https://github.com/milliHQ/terraform-aws-next-js/pull/82)) - Adds `cloudfront_geo_restriction` variable ([#97](https://github.com/milliHQ/terraform-aws-next-js/pull/97)) - Use `nodejs14.x` as default runtime for Lambda ([#67](https://github.com/milliHQ/terraform-aws-next-js/pull/67), [#80](https://github.com/milliHQ/terraform-aws-next-js/issues/80), [#81](https://github.com/milliHQ/terraform-aws-next-js/pull/81)) ### Deploy trigger (0.3.0) - CloudFront invalidations for static files (e.g. static prerendered HTML or files from `public/`) are only issues if the eTag of the file changes ([#48](https://github.com/milliHQ/terraform-aws-next-js/issues/48), [#91](https://github.com/milliHQ/terraform-aws-next-js/pull/91)) ### tf-next (0.6.1) - Ensure that `INIT_CWD` environment variable is set to the correct working directory ([#87](https://github.com/milliHQ/terraform-aws-next-js/pull/87)) ### tf-next (0.6.0) - Allows dependencies (e.g. Prisma & Blitz.js) to correctly detect the build environment ([#70](https://github.com/milliHQ/terraform-aws-next-js/issues/70), [#73](https://github.com/milliHQ/terraform-aws-next-js/issues/73), [#85](https://github.com/milliHQ/terraform-aws-next-js/pull/85)) ## 0.7.4 (April 03, 2021) ### Terraform module - Use `concat` instead of `merge` for custom CloudFront origins and cache behaviors ([#66](https://github.com/milliHQ/terraform-aws-next-js/issues/66), [#105](https://github.com/milliHQ/terraform-aws-next-js/pull/105)) ## 0.7.3 (March 08, 2021) ### Terraform module - Bump internal module `terraform-aws-modules/apigateway-v2/aws` from `0.5.0` to `0.11.0` ([#68](https://github.com/milliHQ/terraform-aws-next-js/pull/68)) - Bump internal module `dealmore/next-js-image-optimization/aws` from `2.0.0` to `2.0.1` ([#68](https://github.com/milliHQ/terraform-aws-next-js/pull/68)) ## 0.7.2 (March 04, 2021) ### Terraform module - Fix for invalid function argument error introduced by `0.7.1` release ([#59](https://github.com/milliHQ/terraform-aws-next-js/issues/59)) ## 0.7.1 (March 04, 2021) ### Terraform module - Add option to set the image optimizer version ([#58](https://github.com/milliHQ/terraform-aws-next-js/issues/58)) ## 0.7.0 (February 13, 2021) This release brings support for [Next.js image optimization](https://nextjs.org/docs/basic-features/image-optimization) 📸. No extra config is needed, simply update the Terraform module and the `tf-next` package to the latest version! Check out our example for more information: [Next image component example](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/next-image) You can always opt-out from creating resources for image optimization by setting `create_image_optimization = false`. ### Terraform module - Adds support for `next/image` component ([#28](https://github.com/milliHQ/terraform-aws-next-js/issues/28), [#51](https://github.com/milliHQ/terraform-aws-next-js/pull/51)) - Refactoring: Outsources a previously private Terraform module, that is now used across multiple projects. Is now avaiable here: [NPM Download Terraform module ](https://registry.terraform.io/modules/milliHQ/download/npm) ([#41](https://github.com/milliHQ/terraform-aws-next-js/issues/41)) ### tf-next (0.5.0) - Adds support for `next/image` component ([#28](https://github.com/milliHQ/terraform-aws-next-js/issues/28), [#51](https://github.com/milliHQ/terraform-aws-next-js/pull/51)) ### Proxy (0.5.0) - Internal refactoring which changes the way the module is bundled. No feature changes ([#43](https://github.com/milliHQ/terraform-aws-next-js/issues/43)) ### Deploy trigger (0.2.0) - Internal refactoring which changes the way the module is bundled. No feature changes ([#43](https://github.com/milliHQ/terraform-aws-next-js/issues/43)) ## 0.6.2 (January 19, 2021) ### Terraform module - Bump internal module version of `terraform-aws-modules/lambda/aws`: 1.31.0 -> 1.34.0 This should fix an issue when performing a direct upgrade from `v0.3.0` to `v0.6.x` ## 0.6.1 (January 18, 2021) ### Terraform module - Fix: Correctly propagate the permissions boundary (`lambda_role_permissions_boundary`) to all Lambda & Lambda@Edge functions ([#38](https://github.com/milliHQ/terraform-aws-next-js/pull/38)) ### tf-next (0.4.1) - Fix: Request cookie header should be semi-colon delimitated ([#39](https://github.com/milliHQ/terraform-aws-next-js/pull/39)) ## 0.6.0 (January 16, 2021) **⚠️ Breaking Changes ⚠️** You need to update the `tf-next` package to the latest version in order to use it with the `v0.6.0` release. ```sh npm upgrade tf-next@latest # npm yarn upgrade tf-next@latest # yarn ``` ### Terraform module - Upgrade to API Gateway Payload V2.0 ([#29](https://github.com/milliHQ/terraform-aws-next-js/issues/29), [#31](https://github.com/milliHQ/terraform-aws-next-js/pull/31)) This is only an upgrade of the internally API used by Lambda and API Gateway (Not the resource itself, since we already use API Gateway V2). See this [guide](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html) for a detailed look at the differences between the V1.0 and V2.0 format. It fixes a bug where no multi-value headers could be sent by a SSR or API page. - Sends an error message when you try to use the Terraform module together with an old version of `tf-next` ([#5](https://github.com/milliHQ/terraform-aws-next-js/issues/5), [#37](https://github.com/milliHQ/terraform-aws-next-js/pull/37)) - Upgrades proxy component to `v0.4.0` ### tf-next (0.4.0) - Adds a version number to the config file, so that the Terraform module is able to warn about a possible version mismatch ([#5](https://github.com/milliHQ/terraform-aws-next-js/issues/5), [#37](https://github.com/milliHQ/terraform-aws-next-js/pull/37)) ### Proxy (0.4.0) - Fix to handle `resource` handle type properly ## 0.5.3 (January 15, 2021) ### Terraform module - Fix: Pass permissions boundary to edge proxy lambda ([#35](https://github.com/milliHQ/terraform-aws-next-js/pull/35)) ## 0.5.2 (January 14, 2021) ### Terraform module - Adds `tags` variable to set tags on supported AWS resources ([#34](https://github.com/milliHQ/terraform-aws-next-js/pull/34)) - Adds `lambda_role_permissions_boundary` variable for setting a permission boundary for the Lambda role ([#33](https://github.com/milliHQ/terraform-aws-next-js/pull/33)) ## 0.5.1 (January 13, 2021) ### Terraform module - Adds `cloudfront_hosted_zone_id` output ([#30](https://github.com/milliHQ/terraform-aws-next-js/pull/30)). ## 0.5.0 (January 03, 2021) Happy New Year! 🍾 With this release we bring native support for [redirects](https://nextjs.org/docs/api-reference/next.config.js/redirects) in Next.js. ### Proxy (0.3.0) - Adds ability to handle redirects ([#10](https://github.com/milliHQ/terraform-aws-next-js/issues/10), [#24](https://github.com/milliHQ/terraform-aws-next-js/pull/24)). ### tf-next (0.3.0) - The build tool got a new name, now it is simply `tf-next` instead of `@dealmore/terraform-next-build`. For backwards compatibility we plan to release new versions to both the old and the new package name until v1.0. - When running `tf-next build` we now filter out routes with the prefix `_next/static/*` since they are handled directly by CloudFront and will never hit the Proxy. ## 0.4.0 (December 30, 2020) - Adds [new example](https://github.com/milliHQ/terraform-aws-next-js/blob/main/examples/custom-domain) how to use custom domains. ### Terraform module - Adds ability to change the price class of the associated CloudFront distributions (`cloudfront_price_class`). - Adds new option after how many days the static assets of previous deployments should be deleted from S3(`expire_static_assets`). - Updates deploy trigger Lambda function to `v0.1.0`. ### Deploy trigger - Static routes are now cached much longer by CloudFront. - Static routes from CloudFront now get invalidated when a new deployment is pushed. - Updates deploy trigger Lambda function to support expiration of previous deployments. ## 0.3.0 (December 23, 2020) ### Terraform module - Adds support for Terraform `v0.14` - Drops support for Terraform `v0.12` ## 0.2.0 (December 22, 2020) > **Note:** This will be the last release with support for Terraform `v12.x`, see [#18](https://github.com/milliHQ/terraform-aws-next-js/issues/18) for more information. ### Terraform module - Destroy non-empty S3 buckets on stack deletion - Experimental support for pre-Rendered routes ([#16](https://github.com/milliHQ/terraform-aws-next-js/issues/16)) ### Terraform Next Build - Experimental support for pre-Rendered routes ([#16](https://github.com/milliHQ/terraform-aws-next-js/issues/16)) ### Proxy - Experimental support for pre-Rendered routes ([#16](https://github.com/milliHQ/terraform-aws-next-js/issues/16)) ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing Contributions are welcome! As a general advice it is always a good idea to raise an [issue](https://github.com/milliHQ/terraform-aws-next-js/issues) before creating a new pull request. This ensures that we don't have to reject pull requests that are not aligning with our roadmap and not wasting your valuable time. ## Contribution Prerequisites The project is a monorepo which contains both the Terraform module and the CLI (`tf-next`) that is used to prepare the Next.js to be served by AWS Lambda written in Node.js. It also contains components (`proxy` and `deploy-trigger`) that are directly published to AWS Lambda. They are also written in Node.js. For the Terraform part you should have installed: - [Terraform CLI](https://www.terraform.io/downloads.html) at 0.13+ For the CLI and the components you should have installed: - [Node.js](https://nodejs.org/) at v14.0.0+ - [Yarn 1](https://classic.yarnpkg.com/) at v1.2.0+ ## Development Workflow ### Terraform module > **Note:** You should not make changes to the documentation of the **Requirements**, **Providers**, **Inputs** and **Outputs** sections in the `README.md` when contributing. > The values there are auto generated by a GitHub action task once a PR is merged. #### Codestyle We use a [GitHub Action](https://github.com/milliHQ/terraform-aws-next-js/actions/workflows/lint.yml) to make sure that the committed code is properly formatted. Before submitting a PR, you should make sure that the code is properly formatted. You can do this by running the Terraform [`fmt` command](https://www.terraform.io/docs/cli/commands/fmt.html) in the root of the repository: ```sh terraform fmt -recursive ``` ### CLI and components After cloning the repository, run `yarn` to fetch and install its dependencies. ## Testing Automatic testing is only done for the worker component written in Node.js. The Terraform module is **not** covered by automatic tests. ### Testing Terraform module Since the Terraform module itself is not covered by automatic tests, testing has to be done manually. The repository contains some examples in the [`examples/*`](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples) folder, that can be used to run a quick acceptance test against your own AWS account. You may need to change a few settings in the `main.tf` file in the root of the example: #### Use local development version of the module To use the local development version instead of downloading it from the Terraform registry you have to change the source to the local path of the module. When working with one of the examples zou can simply use the relative path to the root of the cloned repository: ```diff module "tf_next" { - source = "milliHQ/next-js/aws" + source = "../.." ... } ``` #### Use local build of the components Instead of downloading the components from npm you can also specify the `debug_use_local_packages` to use the local version. To do so, make sure that the components are built by running the following commands: ```sh yarn --cwd packages/proxy build yarn --cwd packages/deploy-trigger build ``` After that you should have a `dist.zip` file in the root of each package. To deploy the local built components, you also need to set `debug_use_local_packages = true`: ```diff module "tf_next" { source = "../.." ... + debug_use_local_packages = true } ``` ### End-to-end (e2e) testing (CLI + components) The end-to-end testing is only used for testing the the CLI (`tf-next`) and components (`proxy` and `deploy-trigger`). A local environment of AWS Lambda is created for this to simulate a execution under the same conditions as it would run in a AWS data center. #### 0. Prerequisites - [Docker Desktop + Docker Compose](https://www.docker.com/products/docker-desktop) (Docker Compose comes bundled with Docker Desktop on MacOS and Windows) - [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) You should check after install if they are available from your command-line: ```sh docker --version # > Docker version 20.10.2, build 2291f61 docker-compose --version # > docker-compose version 1.27.4, build 40524192 sam --version # > SAM CLI, version 1.17.0 ``` #### 1. Build the CLI & components Before running a e2e-test make sure that the CLI and the components are built: ```sh # CLI (Order is important here!) yarn --cwd packages/runtime build yarn --cwd packages/tf-next build # Components yarn --cwd packages/proxy build yarn --cwd packages/deploy-trigger build ``` #### 2. Build the fixtures The fixtures are real Next.js apps that need to be built with `tf-next build` before passing them to the e2e-test. You can build all fixtures by running: ```sh yarn test:e2e:prepare ``` #### 3. Local S3 instance Before running the e2e-tests, make sure that the local S3 emulator from docker-compose is running. From the root of the project run: ```sh docker-compose up -d ``` #### 4. Run tests After that you should be able to execute the e2e-tests locally by running the `test:e2e` task: ```sh yarn test:e2e ``` The e2e-tests are executed from the `test/routes.test.ts` file. Each fixture in `test/fixtures/*` contains a `probes.json` file that contains the actual test cases. ================================================ FILE: LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2020 Felix Haus (milliVolt infrastructure) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: README.md ================================================

Note
The main branch currently contains the atomic deployments alpha preview.
For the lastest stable release, check out the v0.x branch.

Please see our blog post "The road to Atomic Deployments"
or watch the latest release review for more information:

--- # Terraform Next.js module for AWS ![CI status](https://github.com/milliHQ/terraform-aws-next-js/workflows/CI/badge.svg) A zero-config Terraform module for self-hosting Next.js sites serverless on AWS Lambda. ## Features Some features are still under development, here is a list of features that are currently supported and what we plan to bring with the next releases: - ✅  Supports any version of [Next.js](https://nextjs.org/) - ✅  [Terraform](https://www.terraform.io/) `v0.15+` - ✅  Unlimited parallel deployments of Next.js apps (atomic deployments) - ✅  Static, SSG, Lambda and API pages (with [dynamic routes](https://nextjs.org/docs/routing/dynamic-routes)) - ✅  Automatic expiration of old static assets - ✅  [Rewrites](https://nextjs.org/docs/api-reference/next.config.js/rewrites) & [Redirects](https://nextjs.org/docs/api-reference/next.config.js/redirects) - ✅  [Image Component & Image Optimization](https://nextjs.org/docs/basic-features/image-optimization) support - 🚧  [Incremental Static Regeneration](https://nextjs.org/docs/basic-features/data-fetching#incremental-static-regeneration) - ⛔️  [Middleware](https://nextjs.org/docs/advanced-features/middleware) (Not supported by Lambda@Edge / CloudFront functions) ## Architecture The Next.js Terraform module is designed as a full stack AWS app. It relies on multiple AWS services and connects them to work as a single application: ![Architecture overview diagram](https://github.com/milliHQ/terraform-aws-next-js/blob/main/docs/assets/architecture.png?raw=true) ## Usage ### Prerequisites You should have the following tools installed: - [Terraform](https://www.terraform.io/downloads) - [Node.js](https://nodejs.org) - [Bash](https://www.gnu.org/software/bash/) & [curl](https://curl.se/) (Should be available by default on many Linux based images or macOS) > **Note:** Additionally we assume here that you already have a public [Route53 Hosted Zone](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/AboutHZWorkingWith.html) associated with your AWS account. > > This is a requirement in the preview phase of atomic deployments, where each deployment gets a unique subdomain assigned. > It will change once atomic deployments become generally available. ### Setup the Next.js Terraform module The Terraform module contains the system that is later used for creating new deployments and managing the aliases (domains) for your Next.js app(s). Creating the Terraform stack is only required on initial setup and creates the global resources (CloudFront distributions, DynamoDB tables, S3 storage) that is used for handling incoming requests to your website. Create a new `main.tf` file in an empty folder (or add it to your existing Terraform stack) and add the following content: ```tf terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 4.0" } } } # Main region where the resources should be created in # Should be close to the location of your viewers provider "aws" { region = "us-west-2" } # Provider used for creating the Lambda@Edge function which must be deployed # to us-east-1 region (Should not be changed) provider "aws" { alias = "global_region" region = "us-east-1" } ########### # Variables ########### variable "custom_domain" { description = "Your custom domain" type = string default = "example.com" } # Assuming that the ZONE of your domain is already available in your AWS account (Route 53) # https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/AboutHZWorkingWith.html variable "custom_domain_zone_name" { description = "The Route53 zone name of the custom domain" type = string default = "example.com." } ######## # Locals ######## locals { # A wildcard domain(ex: *.example.com) has to be added when using atomic deployments: aliases = [var.custom_domain, "*.${var.custom_domain}"] } ####################### # Route53 Domain record ####################### # Get the hosted zone for the custom domain data "aws_route53_zone" "custom_domain_zone" { name = var.custom_domain_zone_name } # Create a new record in Route 53 for the domain resource "aws_route53_record" "cloudfront_alias_domain" { for_each = toset(local.aliases) zone_id = data.aws_route53_zone.custom_domain_zone.zone_id name = each.key type = "A" alias { name = module.tf_next.cloudfront_domain_name zone_id = module.tf_next.cloudfront_hosted_zone_id evaluate_target_health = false } } ########## # SSL Cert ########## # Creates a free SSL certificate for CloudFront distribution # For more options (e.g. multiple domains) see: # https://registry.terraform.io/modules/terraform-aws-modules/acm/aws/ module "cloudfront_cert" { source = "terraform-aws-modules/acm/aws" version = "~> 3.0" domain_name = var.custom_domain zone_id = data.aws_route53_zone.custom_domain_zone.zone_id subject_alternative_names = slice(local.aliases, 1, length(local.aliases)) wait_for_validation = true tags = { Name = "CloudFront ${var.custom_domain}" } # CloudFront works only with certs stored in us-east-1 providers = { aws = aws.global_region } } ########################## # Terraform Next.js Module ########################## module "tf_next" { source = "milliHQ/next-js/aws" version = "1.0.0-canary.4" cloudfront_aliases = local.aliases cloudfront_acm_certificate_arn = module.cloudfront_cert.acm_certificate_arn deployment_name = "atomic-deployments" enable_multiple_deployments = true multiple_deployments_base_domain = "*.${var.custom_domain}" providers = { aws.global_region = aws.global_region } } ######### # Outputs ######### output "api_endpoint" { value = module.tf_next.api_endpoint } output "api_endpoint_access_policy_arn" { value = module.tf_next.api_endpoint_access_policy_arn } ``` To create the resources in your AWS account, run the following commands: ```sh terraform init # Only needed on the first time running Terraform terraform plan # (Optional) See what resources Terraform will create terraform apply # Create the resources in your AWS account > Apply complete! > > Outputs: > > api_endpoint = "https://.execute-api.us-west-2.amazonaws.com" > api_endpoint_access_policy_arn = "arn:aws:iam::123456789012:policy/access-api" ``` The `api_endpoint` is later used by the CLI tool to create new deployments. With the `api_endpoint_access_policy_arn` AWS policy you can create new users (and assign that policy) that only can use the CLI tool `tf-next` but cannot access other resources inside of your AWS account. After the successful deployment your Next.js app is publicly available at the CloudFront subdomain from the `cloudfront_domain_name` output. ### Deploy a Next.js App For building and deploying Next.js apps to the system we created a CLI tool called [`tf-next`](https://www.npmjs.com/package/tf-next). It is a npm package that can be installed with: ```sh npm i -g tf-next@canary ``` Next, we need to build the Next.js so that it can run in a serverless environment (with AWS Lambda). This is archived by running `tf-next build` in the same directory where your Next.js app is located (Right where your `package.json` or `next.config.js` files are located): ``` tf-next build > All serverless functions created in: 20.791ms > 1752924 total bytes > Build successful! ``` Now deploy the Next.js app by running `tf-next deploy` from the same directory. The deploy command communicates through a secured (and authenticated with your AWS credentials) API with the Terraform module. To tell the command where to deploy the app, an additional `--endpoint` flag must be provided, which should use the value from the `api_endpoint` output from the `terraform apply` step: ``` tf-next deploy --endpoint https://.execute-api.us-west-2.amazonaws.com > Available at: https://3edade7a2bf7bb0343699af6b851bbfa.example.com/ ``` The preview deployment can now be accessed by the displayed url. To make the deployment available from a more readable url, you can use the `tf-next alias` subcommand: ``` tf-next alias set my-app.example.com 3edade7a2bf7bb0343699af6b851bbfa.example.com > Available at: https://my-app.example.com/ ``` For a full list of available commands that can be used with `tf-next`, check the [command reference](https://github.com/milliHQ/terraform-aws-next-js/blob/main/packages/tf-next/README.md). ## Examples - [Atomic Deployments](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/atomic-deployments) Each deployment gets a unique url from where it can be previewed. - [Complete](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/complete) Complete example with SSR, API and static pages. - [Static](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/static) Example that uses static pages only (No SSR). - [Next Image](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/next-image) Images are optimized on the fly by AWS Lambda. - [Existing CloudFront](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-existing-cloudfront) Use the module together with an existing CloudFront distribution that can be fully customized. - [Custom Domain](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-custom-domain) Use the module with your own domain from Route 53. ## Requirements | Name | Version | |------|---------| | terraform | >= 0.15 | | aws | >= 4.8 | ## Providers | Name | Version | |------|---------| | aws | >= 4.8 | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | cloudfront\_acm\_certificate\_arn | ACM certificate arn for custom\_domain | `string` | `null` | no | | cloudfront\_aliases | Aliases for custom\_domain | `list(string)` | `[]` | no | | cloudfront\_cache\_key\_headers | Header keys that should be used to calculate the cache key in CloudFront. | `list(string)` |
[
"Authorization"
]
| no | | cloudfront\_create\_distribution | Controls whether the main CloudFront distribution should be created. | `bool` | `true` | no | | cloudfront\_external\_arn | When using an external CloudFront distribution provide its arn. | `string` | `null` | no | | cloudfront\_external\_id | When using an external CloudFront distribution provide its id. | `string` | `null` | no | | cloudfront\_minimum\_protocol\_version | The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections. One of SSLv3, TLSv1, TLSv1\_2016, TLSv1.1\_2016, TLSv1.2\_2018 or TLSv1.2\_2019. | `string` | `"TLSv1"` | no | | cloudfront\_origin\_request\_policy | Id of a custom request policy that overrides the default policy (AllViewer). Can be custom or managed. | `string` | `null` | no | | cloudfront\_price\_class | Price class for the CloudFront distributions (main & proxy config). One of PriceClass\_All, PriceClass\_200, PriceClass\_100. | `string` | `"PriceClass_100"` | no | | cloudfront\_response\_headers\_policy | Id of a response headers policy. Can be custom or managed. Default is empty. | `string` | `null` | no | | cloudfront\_webacl\_id | An optional webacl2 arn or webacl id to associate with the cloudfront distribution | `string` | `null` | no | | create\_image\_optimization | Controls whether resources for image optimization support should be created or not. | `bool` | `true` | no | | debug\_use\_local\_packages | Use locally built packages rather than download them from npm. | `bool` | `false` | no | | deployment\_name | Identifier for the deployment group (only lowercase alphanumeric characters and hyphens are allowed). | `string` | `"tf-next"` | no | | enable\_multiple\_deployments | Controls whether it should be possible to run multiple deployments in parallel (requires multiple\_deployments\_base\_domain). | `bool` | `false` | no | | image\_optimization\_lambda\_memory\_size | Amount of memory in MB the worker Lambda Function for image optimization can use. Valid value between 128 MB to 10,240 MB, in 1 MB increments. | `number` | `2048` | no | | lambda\_attach\_policy\_json | Whether to deploy additional lambda JSON policies. If false, lambda\_policy\_json will not be attached to the lambda function. (Necessary since policy strings are only known after apply when using Terraforms data.aws\_iam\_policy\_document) | `bool` | `false` | no | | lambda\_attach\_to\_vpc | Set to true if the Lambda functions should be attached to a VPC. Use this setting if VPC resources should be accessed by the Lambda functions. When setting this to true, use vpc\_security\_group\_ids and vpc\_subnet\_ids to specify the VPC networking. Note that attaching to a VPC would introduce a delay on to cold starts | `bool` | `false` | no | | lambda\_policy\_json | Additional policy document as JSON to attach to the Lambda Function role | `string` | `null` | no | | lambda\_role\_permissions\_boundary | ARN of IAM policy that scopes aws\_iam\_role access for the lambda | `string` | `null` | no | | multiple\_deployments\_base\_domain | Default wildcard domain where new deployments should be available. Should be in the form of *.example.com. | `string` | `null` | no | | tags | Tag metadata to label AWS resources that support tags. | `map(string)` | `{}` | no | | tags\_s3\_bucket | Tag metadata to label AWS S3 buckets. Overrides tags with the same name in input variable tags. | `map(string)` | `{}` | no | | vpc\_security\_group\_ids | The list of Security Group IDs to be used by the Lambda functions. lambda\_attach\_to\_vpc should be set to true for these to be applied. | `list(string)` | `[]` | no | | vpc\_subnet\_ids | The list of VPC subnet IDs to attach the Lambda functions. lambda\_attach\_to\_vpc should be set to true for these to be applied. | `list(string)` | `[]` | no | ## Outputs | Name | Description | |------|-------------| | api\_endpoint | API endpoint that is used by the CLI. | | api\_endpoint\_access\_policy\_arn | ARN of the policy that grants access to the API endpoint. | | cloudfront\_custom\_error\_response | Preconfigured custom error response the CloudFront distribution should use. | | cloudfront\_default\_cache\_behavior | Preconfigured default cache behavior the CloudFront distribution should use. | | cloudfront\_default\_root\_object | Preconfigured root object the CloudFront distribution should use. | | cloudfront\_domain\_name | Domain of the main CloudFront distribution (When created). | | cloudfront\_hosted\_zone\_id | Zone id of the main CloudFront distribution (When created). | | cloudfront\_ordered\_cache\_behaviors | Preconfigured ordered cache behaviors the CloudFront distribution should use. | | cloudfront\_origins | Preconfigured origins the CloudFront distribution should use. | | upload\_bucket\_id | n/a | ## Known issues Under the hood this module uses a lot of [Vercel's](https://github.com/vercel/vercel/) build pipeline. So issues that exist on Vercel are likely to occur on this project too. - Stack deletion (`terraform destroy`) fails on first run ([terraform-provider-aws#1721](https://github.com/hashicorp/terraform-provider-aws/issues/1721)) This is intentional because we cannot delete a Lambda@Edge function (Used by proxy module) in a synchronous way. It can take up to an hour for AWS to unbind a Lambda@Edge function from it's CloudFront distribution even when the distribution is already destroyed. **Workaround:** After running the initial `terraform destroy` command (that failed) wait ~1 hour and run the command again. This time it should run successfully and delete the rest of the stack. - Initial apply fails with error message `Error: error creating Lambda Event Source Mapping` ([#138](https://github.com/milliHQ/terraform-aws-next-js/issues/138)) There is some race condition when the permissions are created for the static deployment Lambda. This should only happen on the first deployment. **Workaround:** You should be able to run`terraform apply` again and the stack creation would proceed without this error. ## Contributing Contributions are welcome! If you want to improve this module, please take a look at our [contributing guidelines](https://github.com/milliHQ/terraform-aws-next-js/tree/main/CONTRIBUTING.md) to get started. ## About This project is maintained by [milliVolt infrastructure](https://milli.is). We build custom infrastructure solutions for any cloud provider. ## License Apache-2.0 - see [LICENSE](./LICENSE) for details. > **Note:** All sample projects in [`examples/*`](./examples) are licensed as MIT to comply with the official [Next.js examples](https://github.com/vercel/next.js/tree/canary/examples). ================================================ FILE: docker-compose.yml ================================================ ################################################################################ # This docker-compose file is only meant for e2e testing packages that # require an S3 / dynamoDB connection: # - test/routes.test.ts # - packages/deploy-trigger ################################################################################ version: '3.6' services: local-s3: image: minio/minio ports: - 9000:9000 command: server /data volumes: - s3-data:/data env_file: - ./test.env dynamodb-local: image: amazon/dynamodb-local:latest ports: - "8000:8000" volumes: s3-data: ================================================ FILE: docs/development.md ================================================ # Development This is a small guide to get started with development of this module. From time to time I come back to it as well when I forgot something. ## Testing For local testing make sure that you have the following tools installed on your machine: - [Docker](https://docs.docker.com/get-docker/) - [Docker Compose](https://docs.docker.com/compose/install/) (Already included in Docker for Mac & Windows) - [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) We have 2 kinds of tests: - **Unit tests** Unit tests have mostly no external requirements. However some of them (e.g. `deploy-trigger`) need a connection to external services like S3 which is emulated locally by docker containers. The unit tests are located at their corresponding packages. Before executing any unit tests, you should make sure to start the services from the workspace root: ```sh docker-compose up -d ``` - **e2e tests** The e2e tests ensure that real Next.js are bundled and deployed in the right way. To do this we have fixture apps in `/test/fixtures/` directory that are builded and then deployed locally in Docker containers via AWS SAM CLI. Running e2e tests consist of two steps: 1. Building the fixtures with `terraform-next-build`: ```sh yarn test:e2e:prepare ``` 2. Run the actual tests ```sh yarn test:e2e ``` ================================================ FILE: examples/.gitignore ================================================ *.lock.hcl ================================================ FILE: examples/atomic-deployments/.gitignore ================================================ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # next.js /.next/ /out/ # production /build # misc .DS_Store *.pem # debug npm-debug.log* yarn-debug.log* yarn-error.log* # local env files .env.local .env.development.local .env.test.local .env.production.local # vercel .vercel # Terraform **/.terraform/* *.tfstate *.tfstate.* # tf-next /.tf-next/ ================================================ FILE: examples/atomic-deployments/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2022 Felix Haus (milliVolt infrastructure) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: examples/atomic-deployments/README.md ================================================ # Atomic Deployments Example This example shows how to use the atomic deployments feature with the [Next.js Terraform module for AWS](https://registry.terraform.io/modules/milliHQ/next-js/aws). To learn more about this feature, please see the blog post ["The road to Atomic Deployments"](https://milli.is/blog/the-road-to-atomic-deployments) or watch the release review: [First look at the new atomic deployments feature](https://youtu.be/NY3zKnIcLd4). ## Features - ✅  Unlimited parallel deployments of Next.js apps served by a single CloudFront distribution - ✅  Preview deployment subdomains, e.g. `.example.com` > **Notice:** You can find the full example code on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/atomic-deployments). ## How to use > **Cost disclaimer**: All resources that are created in your AWS account are designed to be fully serverless. > This means it produces **no running costs** until it is actually used (e.g. by deploying a Next.js application or when your app starts receiving requests from the web). > Most of the resources created are also eligible for the [AWS always free tier](https://aws.amazon.com/free/). > > Highest cost factor in this example is the Route 53 hosted zone which can [produce costs of up to $0.50 / month](https://aws.amazon.com/route53/pricing/#Hosted_Zones_and_Records) when creating a new one. Run [`create-next-app`](https://www.npmjs.com/package/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [yarn](https://classic.yarnpkg.com/en/docs/cli/create/) or [pnpm](https://pnpm.io/cli/create) to bootstrap the example: ```sh npx create-next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/atomic-deployments atomic-deployments # or yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/atomic-deployments atomic-deployments # or pnpm create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/atomic-deployments atomic-deployments ``` ### Terraform setup Use Terraform to deploy the base system to your AWS account. Open the `main.tf` file in the root of the Next.js app, and set the custom domain that should be assigned to the CloudFront distribution: ```tf # main.tf ... variable "custom_domain" { description = "Your custom domain" type = string default = "example.com" } variable "custom_domain_zone_name" { description = "The Route53 zone name of the custom domain" type = string default = "example.com." } ... ``` You can change `example.com` to every domain (or subdomain) that is associated with Route 53 in your AWS account. Then deploy the base system. ```sh # Expose your AWS Access Keys (administrator) to the current terminal session export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY terraform init # Only needed on the first time running Terraform terraform plan # (Optional) See what resources Terraform will create terraform apply # Deploy the base system ``` After the deployment was successful, you should see the following output: ```sh > Apply complete! > > Outputs: > > api_endpoint = "https://.execute-api..amazonaws.com" > api_endpoint_access_policy_arn = "arn:aws:iam::123456789012:policy/access-api" ``` > For deploying your apps in the next step you can optionally [create a new IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html) and assign it the policy that you got from the `api_endpoint_access_policy_arn` output. > This is a security feature that prevents a full AWS account access during deployments. It only allows access to the internal API, but not to create, destroy or modify any resources in the AWS account directly. ### Build First, install the [`tf-next`](https://github.com/milliHQ/terraform-aws-next-js/tree/main/packages/tf-next) CLI by running: ``` npm i -g tf-next@canary # or yarn global add tf-next@canary # or pnpm add -g tf-next@canary ``` Then prepare your Next.js application for a serverless deployment: ```sh tf-next build ``` ### Deploy Deploy the previously built Next.js app to your AWS infrastructure. For the `--endpoint` flag use the domain you got from the `api_endpoint` output in the previous [Terraform Setup](#terraform-setup) step. ```sh tf-next deploy --endpoint https://.execute-api..amazonaws.com > success Deployment package uploaded. > success Deployment ready > Available at: https://.example.com/ (copied to clipboard) ``` You can now access your Next.js app in the browser at the `https://.example.com` domain. Repeat the [build](#build) & [deploy](#deploy) step for each new app or deployment you want to push to the system. ## Cleanup To delete all resources from your AWS account that were created in this examples follow this steps: 1. **Cleanup all deployments with the `tf-next` CLI** First, get all active deployments through the CLI ``` tf-next deployment ls > age ▼ deployment-id status > 5m 59ec3b01f4325c906af8573efe0d75ba ready ``` Then remove each deployment by its id: ``` tf-next deployment rm 59ec3b01f4325c906af8573efe0d75ba ``` Repeat this until `tf-next deployment ls` shows no more active deployments. 2. **Remove the Terraform module** To remove the deployment system (with it's global resources like CloudFront, S3 etc.) that were created with Terraform: ``` terraform destroy ``` > **Note:** The destroy command could fail on the first execution since [Lambda@Edge functions cannot be deleted in a synchronous way](https://github.com/hashicorp/terraform-provider-aws/issues/1721). You can workaround this by simply wait ~30 minutes and then run `terraform destroy` again. ================================================ FILE: examples/atomic-deployments/main.tf ================================================ terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 4.0" } } } # Main region where the resources should be created in # Should be close to the location of your viewers provider "aws" { region = "us-west-2" } # Provider used for creating the Lambda@Edge function which must be deployed # to us-east-1 region (Should not be changed) provider "aws" { alias = "global_region" region = "us-east-1" } ########### # Variables ########### variable "custom_domain" { description = "Your custom domain" type = string default = "example.com" } # Assuming that the ZONE of your domain is already available in your AWS account (Route 53) # https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/AboutHZWorkingWith.html variable "custom_domain_zone_name" { description = "The Route53 zone name of the custom domain" type = string default = "example.com." } ######## # Locals ######## locals { # A wildcard domain(ex: *.example.com) has to be added when using atomic deployments: aliases = [var.custom_domain, "*.${var.custom_domain}"] } ####################### # Route53 Domain record ####################### # Get the hosted zone for the custom domain data "aws_route53_zone" "custom_domain_zone" { name = var.custom_domain_zone_name } # Create a new record in Route 53 for the domain resource "aws_route53_record" "cloudfront_alias_domain" { for_each = toset(local.aliases) zone_id = data.aws_route53_zone.custom_domain_zone.zone_id name = each.key type = "A" alias { name = module.tf_next.cloudfront_domain_name zone_id = module.tf_next.cloudfront_hosted_zone_id evaluate_target_health = false } } ########## # SSL Cert ########## # Creates a free SSL certificate for CloudFront distribution # For more options (e.g. multiple domains) see: # https://registry.terraform.io/modules/terraform-aws-modules/acm/aws/ module "cloudfront_cert" { source = "terraform-aws-modules/acm/aws" version = "~> 3.0" domain_name = var.custom_domain zone_id = data.aws_route53_zone.custom_domain_zone.zone_id subject_alternative_names = slice(local.aliases, 1, length(local.aliases)) wait_for_validation = true tags = { Name = "CloudFront ${var.custom_domain}" } # CloudFront works only with certs stored in us-east-1 providers = { aws = aws.global_region } } ########################## # Terraform Next.js Module ########################## module "tf_next" { source = "milliHQ/next-js/aws" version = "1.0.0-canary.5" cloudfront_aliases = local.aliases cloudfront_acm_certificate_arn = module.cloudfront_cert.acm_certificate_arn deployment_name = "atomic-deployments" enable_multiple_deployments = true multiple_deployments_base_domain = "*.${var.custom_domain}" providers = { aws.global_region = aws.global_region } # Uncomment when using in the cloned monorepo for tf-next development # source = "../.." # debug_use_local_packages = true } ######### # Outputs ######### output "api_endpoint" { value = module.tf_next.api_endpoint } output "api_endpoint_access_policy_arn" { value = module.tf_next.api_endpoint_access_policy_arn } ================================================ FILE: examples/atomic-deployments/package.json ================================================ { "name": "terraform-next-js-example-custom-domain", "version": "1.0.0", "private": true, "scripts": { "dev": "next", "build": "next build", "tf-next": "tf-next build", "start": "next start" }, "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "tf-next": "canary" }, "license": "MIT" } ================================================ FILE: examples/atomic-deployments/pages/index.js ================================================ export default function IndexPage() { return (

Custom domain example

); } ================================================ FILE: examples/complete/.gitignore ================================================ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # next.js /.next/ /out/ # production /build # misc .DS_Store *.pem # debug npm-debug.log* yarn-debug.log* yarn-error.log* # local env files .env.local .env.development.local .env.test.local .env.production.local # vercel .vercel # Terraform **/.terraform/* *.tfstate *.tfstate.* # tf-next /.tf-next/ ================================================ FILE: examples/complete/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2020 Felix Haus (milliVolt infrastructure) Copyright (c) 2020 Vercel, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: examples/complete/README.md ================================================ # Terraform Next.js complete example > **Warning:** This example is not fully updated for the upcoming `v1.0.0` release. > We recommend following the [Atomic Deployments Example](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/atomic-deployments) instead until this example gets an update. This example contains a fully featured Next.js app (Static files, API-Routes, SSR) that can be deployed using the [Terraform Next.js for AWS](https://registry.terraform.io/modules/milliHQ/next-js/aws) module. > **Notice:** You can find the full example code on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/complete). ## Setup Download the files from the example app: ```sh yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/complete my-app cd my-app ``` ## Build Prepare the Next.js application to be deployed with Terraform: ```sh yarn tf-next ``` ## Deploy Use Terraform to deploy the Next.js app to your AWS account: ```sh # Expose your AWS Access Keys to the current terminal session # Only needed when running Terraform commands export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY terraform init # Only needed on the first time running Terraform terraform plan # (Optional) See what resources Terraform will create terraform apply # Deploy the Next.js app to your AWS account ``` After the deployment was successful, you should see the following output: ```sh > Apply complete! > > Outputs: > > cloudfront_domain_name = ".cloudfront.net" ``` You can now access your Next.js app in the browser under the [https://<distribution-id>.cloudfront.net](https://.cloudfront.net) domain. ================================================ FILE: examples/complete/components/header.js ================================================ import * as React from 'react'; import Link from 'next/link'; export const Header = () => { return (
); }; ================================================ FILE: examples/complete/main.tf ================================================ terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 4.0" } } } # Main region where the resources should be created in # Should be close to the location of your viewers provider "aws" { region = "us-west-2" } # Provider used for creating the Lambda@Edge function which must be deployed # to us-east-1 region (Should not be changed) provider "aws" { alias = "global_region" region = "us-east-1" } module "tf_next" { source = "milliHQ/next-js/aws" version = "1.0.0-canary.5" deployment_name = "tf-next-example-complete" providers = { aws.global_region = aws.global_region } # Uncomment when using in the cloned monorepo for tf-next development # source = "../.." # debug_use_local_packages = true } output "cloudfront_domain_name" { value = module.tf_next.cloudfront_domain_name } ================================================ FILE: examples/complete/next.config.js ================================================ module.exports = { async rewrites() { return [ { source: '/robots.txt', destination: '/api/robots', }, ]; }, async redirects() { return [ { source: '/blog/:slug*', destination: '/test/:slug*', // Matched parameters can be used in the destination permanent: true, }, ]; }, }; ================================================ FILE: examples/complete/package.json ================================================ { "name": "terraform-next-js-example-complete", "version": "1.0.0", "private": true, "scripts": { "dev": "next", "build": "next build", "tf-next": "tf-next build", "start": "next start" }, "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "tf-next": "latest" }, "license": "MIT" } ================================================ FILE: examples/complete/pages/about.js ================================================ import { Header } from '../components/header'; export default function About() { return (

About us

); } ================================================ FILE: examples/complete/pages/api/robots.js ================================================ const content = `# Example robots.txt User-agent: * Allow: / Sitemap: http://www.example.com/sitemap.xml`; const RobotsHandler = (_req, res) => { res.statusCode = 200; res.setHeader('Content-Type', 'text/plain'); res.end(content); }; export default RobotsHandler; ================================================ FILE: examples/complete/pages/index.js ================================================ import { useRouter } from 'next/router'; import { format } from 'url'; import { Header } from '../components/header'; let counter = 0; export async function getServerSideProps() { counter++; return { props: { initialPropsCounter: counter } }; } export default function Index({ initialPropsCounter }) { const router = useRouter(); const { pathname, query } = router; const reload = () => { router.push(format({ pathname, query })); }; const incrementCounter = () => { const currentCounter = query.counter ? parseInt(query.counter) : 0; const href = `/?counter=${currentCounter + 1}`; router.push(href, href, { shallow: true }); }; return (

This is the Home Page

"getServerSideProps" ran for "{initialPropsCounter}" times.

Counter: "{query.counter || 0}".

); } ================================================ FILE: examples/complete/pages/test/[...slug].js ================================================ import { useRouter } from 'next/router'; import Link from 'next/link'; import { format } from 'url'; import { Header } from '../../components/header'; let counter = 0; export async function getServerSideProps(ctx) { counter++; return { props: { params: ctx.params, query: ctx.query, slug: ctx.query && ctx.query.slug, initialPropsCounter: counter, }, }; } export default function Index({ initialPropsCounter, slug, params, query: serverQuery, }) { const router = useRouter(); const { pathname, query } = router; const reload = () => { router.push(format({ pathname, query })); }; const incrementCounter = () => { const currentCounter = query.counter ? parseInt(query.counter) : 0; const href = `/?counter=${currentCounter + 1}`; router.push(href, href, { shallow: true }); }; return (

This is the Home Page

About
Server: {JSON.stringify(slug)}
Client: {JSON.stringify(query.slug)}
Params: {JSON.stringify(params)}
Query: {JSON.stringify(serverQuery)}

"getServerSideProps" ran for "{initialPropsCounter}" times.

Counter: "{query.counter || 0}".

); } ================================================ FILE: examples/next-image/.gitignore ================================================ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # next.js /.next/ /out/ # production /build # misc .DS_Store *.pem # debug npm-debug.log* yarn-debug.log* yarn-error.log* # local env files .env.local .env.development.local .env.test.local .env.production.local # vercel .vercel # Terraform **/.terraform/* *.tfstate *.tfstate.* # tf-next /.tf-next/ ================================================ FILE: examples/next-image/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2021 Felix Haus (milliVolt infrastructure) Copyright (c) 2021 Vercel, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: examples/next-image/README.md ================================================ # Terraform Next.js Image component example > **Warning:** This example is not fully updated for the upcoming `v1.0.0` release. > We recommend following the [Atomic Deployments Example](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/atomic-deployments) instead until this example gets an update. This example shows the usage of Next.js together with the `next/image` component. You can find the full example code on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/next-image). > **Note:** Support for `next/image` component is enabled in the Terraform Next.js module by default and requires no extra config other than the standard setup! ## Setup Download the files from the example app: ```sh yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/next-image my-app cd my-app ``` ## Build Prepare the Next.js application to be deployed with Terraform: ```sh yarn tf-next ``` ## Deploy Use Terraform to deploy the Next.js app to your AWS account: ```sh # Expose your AWS Access Keys to the current terminal session # Only needed when running Terraform commands export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY terraform init # Only needed on the first time running Terraform terraform plan # (Optional) See what resources Terraform will create terraform apply # Deploy the Next.js app to your AWS account ``` After the deployment was successful, you should see the following output: ```sh > Apply complete! > > Outputs: > > cloudfront_domain_name = ".cloudfront.net" ``` You can now access your Next.js app in the browser under the [https://<distribution-id>.cloudfront.net](https://.cloudfront.net) domain. ================================================ FILE: examples/next-image/app.css ================================================ body { font-family: -apple-system, BlinkMacSystemFont, sans-serif; margin: 0; padding: 0; background: black; color: white; } a { cursor: pointer; color: #0076ff; text-decoration: none; transition: all 0.2s ease; border-bottom: 1px solid black; } a:hover { border-bottom: 1px solid #0076ff; } ================================================ FILE: examples/next-image/components/view-source.js ================================================ import { svg, arm } from './view-source.module.css' const ViewSource = ({ pathname }) => ( ) export default ViewSource ================================================ FILE: examples/next-image/components/view-source.module.css ================================================ .svg { position: absolute; top: 0; right: 0; } .arm { transform-origin: 130px 106px; } .svg:hover .arm { animation: wave 560ms ease-in-out; } @keyframes wave { 0% { transform: rotate(0deg); } 20% { transform: rotate(-25deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-25deg); } 80% { transform: rotate(10deg); } 100% { transform: rotate(0deg); } } @media (max-width: 500px) { .svg:hover .arm { animation: none; } .svg:hover .arm { animation: wave 560ms ease-in-out; } } ================================================ FILE: examples/next-image/main.tf ================================================ terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 4.0" } } } # Main region where the resources should be created in # Should be close to the location of your viewers provider "aws" { region = "us-west-2" } # Provider used for creating the Lambda@Edge function which must be deployed # to us-east-1 region (Should not be changed) provider "aws" { alias = "global_region" region = "us-east-1" } module "tf_next" { source = "milliHQ/next-js/aws" version = "1.0.0-canary.5" deployment_name = "tf-next-example-image" providers = { aws.global_region = aws.global_region } # Uncomment when using in the cloned monorepo for tf-next development # source = "../.." # debug_use_local_packages = true } output "cloudfront_domain_name" { value = module.tf_next.cloudfront_domain_name } ================================================ FILE: examples/next-image/next.config.js ================================================ module.exports = { images: { domains: ['assets.vercel.com'], }, } ================================================ FILE: examples/next-image/package.json ================================================ { "name": "tf-next-example-next-image", "version": "1.0.0", "scripts": { "dev": "next dev", "build": "next build", "tf-next": "tf-next build", "start": "next start" }, "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "tf-next": "latest" }, "license": "MIT" } ================================================ FILE: examples/next-image/pages/_app.js ================================================ import '../app.css' export default function MyApp({ Component, pageProps }) { return } ================================================ FILE: examples/next-image/pages/background.js ================================================ import Image from 'next/image' import ViewSource from '../components/view-source' import { bgWrap, bgText } from '../styles.module.css' const Background = () => (
Mountains

Image Component
as a Background

) export default Background ================================================ FILE: examples/next-image/pages/index.js ================================================ import styles from '../styles.module.css' import Image from 'next/image' import Link from 'next/link' import ViewSource from '../components/view-source' const Code = (p) => const Index = () => (

Image Component with Next.js

This page demonstrates the usage of the{' '} next/image {' '} component with live examples.

This component is designed to{' '} automatically optimizate {' '} images on-demand as the browser requests them.


Layout

The layout property tells the image to respond differently depending on the device size or the container size.

Select a layout below and try resizing the window or rotating your device to see how the image reacts.


Internal Image

The following is an example of a reference to an interal image from the{' '} public directory.

This image is intentionally large so you have to scroll down to the next image.

Vercel logo

External Image

The following is an example of a reference to an external image at{' '} assets.vercel.com.

External domains must be configured in next.config.js using the domains property.

Next.js logo

Learn More

You can optionally configure a cloud provider, device sizes, and more!

Checkout the{' '} Image Optimization documentation {' '} to learn more.

) export default Index ================================================ FILE: examples/next-image/pages/layout-fill.js ================================================ import Image from 'next/image' import ViewSource from '../components/view-source' const Fill = () => (

Image Component With Layout Fill

Mountains
Mountains
Mountains
) export default Fill ================================================ FILE: examples/next-image/pages/layout-fixed.js ================================================ import Image from 'next/image' import ViewSource from '../components/view-source' const Fixed = () => (

Image Component With Layout Fixed

Mountains
) export default Fixed ================================================ FILE: examples/next-image/pages/layout-intrinsic.js ================================================ import Image from 'next/image' import ViewSource from '../components/view-source' const Intrinsic = () => (

Image Component With Layout Intrinsic

Mountains
) export default Intrinsic ================================================ FILE: examples/next-image/pages/layout-responsive.js ================================================ import Image from 'next/image' import ViewSource from '../components/view-source' const Responsive = () => (

Image Component With Layout Responsive

Mountains
) export default Responsive ================================================ FILE: examples/next-image/styles.module.css ================================================ .container { padding: 4rem 1rem; } .container p { margin: 1.5rem 0; } .card { max-width: 60rem; box-shadow: -10px 10px 80px rgba(255, 255, 255, 0.1); border: 1px solid #333; border-radius: 8px; padding: 2rem; margin: 0 auto; } .inlineCode { color: #be00ff; font-size: 16px; white-space: pre-wrap; } .inlineCode::before, .inlineCode::after { content: '`'; } .hr { border: 0; border-top: 1px solid #333; margin: 1.5rem 0; } .bgWrap { position: fixed; height: 100vh; width: 100vw; overflow: hidden; z-index: -1; } .bgText { margin: 0; font-size: 2rem; line-height: 3rem; text-align: center; padding-top: 40vh; text-shadow: 1px 1px 1px #3c5c5e; } ================================================ FILE: examples/static/.gitignore ================================================ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # next.js /.next/ /out/ # production /build # misc .DS_Store *.pem # debug npm-debug.log* yarn-debug.log* yarn-error.log* # local env files .env.local .env.development.local .env.test.local .env.production.local # vercel .vercel # Terraform **/.terraform/* *.tfstate *.tfstate.* # tf-next /.tf-next/ ================================================ FILE: examples/static/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2020 Felix Haus (milliVolt infrastructure) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: examples/static/README.md ================================================ # Terraform Next.js static example > **Warning:** This example is not fully updated for the upcoming `v1.0.0` release. > We recommend following the [Atomic Deployments Example](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/atomic-deployments) instead until this example gets an update. This example shows a simple static Next.js app that is deployed to S3 without lambdas using the [Terraform Next.js for AWS](https://registry.terraform.io/modules/milliHQ/next-js/aws) module. You can find the full example code on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/static). ## Setup Download the files from the example app: ```sh yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/static my-app cd my-app ``` ## Build Prepare the Next.js application to be deployed with Terraform: ```sh yarn tf-next ``` ## Deploy Use Terraform to deploy the Next.js app to your AWS account: ```sh # Expose your AWS Access Keys to the current terminal session # Only needed when running Terraform commands export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY terraform init # Only needed on the first time running Terraform terraform plan # (Optional) See what resources Terraform will create terraform apply # Deploy the Next.js app to your AWS account ``` After the deployment was successful, you should see the following output: ```sh > Apply complete! > > Outputs: > > cloudfront_domain_name = ".cloudfront.net" ``` You can now access your Next.js app in the browser under the [https://<distribution-id>.cloudfront.net](https://.cloudfront.net) domain. ================================================ FILE: examples/static/main.tf ================================================ terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 4.0" } } } # Main region where the resources should be created in # Should be close to the location of your viewers provider "aws" { region = "us-west-2" } # Provider used for creating the Lambda@Edge function which must be deployed # to us-east-1 region (Should not be changed) provider "aws" { alias = "global_region" region = "us-east-1" } module "tf_next" { source = "milliHQ/next-js/aws" version = "1.0.0-canary.5" deployment_name = "tf-next-example-static" providers = { aws.global_region = aws.global_region } # Uncomment when using in the cloned monorepo for tf-next development # source = "../.." # debug_use_local_packages = true } output "cloudfront_domain_name" { value = module.tf_next.cloudfront_domain_name } ================================================ FILE: examples/static/package.json ================================================ { "name": "terraform-next-js-example-static", "version": "1.0.0", "private": true, "scripts": { "dev": "next", "build": "next build", "tf-next": "tf-next build", "start": "next start" }, "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "tf-next": "latest" }, "license": "MIT" } ================================================ FILE: examples/static/pages/about.js ================================================ export default function AboutPage() { return (

About

); } ================================================ FILE: examples/static/pages/blog/index.js ================================================ export default function BlogPage() { return (

Blog

); } ================================================ FILE: examples/static/pages/index.js ================================================ export default function IndexPage() { return (

Home

); } ================================================ FILE: examples/with-custom-domain/.gitignore ================================================ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # next.js /.next/ /out/ # production /build # misc .DS_Store *.pem # debug npm-debug.log* yarn-debug.log* yarn-error.log* # local env files .env.local .env.development.local .env.test.local .env.production.local # vercel .vercel # Terraform **/.terraform/* *.tfstate *.tfstate.* # tf-next /.tf-next/ ================================================ FILE: examples/with-custom-domain/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2020 Felix Haus (milliVolt infrastructure) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: examples/with-custom-domain/README.md ================================================ # Terraform Next.js custom domain example > **Warning:** This example is not fully updated for the upcoming `v1.0.0` release. > We recommend following the [Atomic Deployments Example](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/atomic-deployments) instead until this example gets an update. This example shows how to use a custom domain with the [Next.js Terraform module for AWS](https://registry.terraform.io/modules/milliHQ/next-js/aws). ## Features - Creates a new domain record in Route53 - Provisions a free SSL certificate from the AWS Certificate Manager for the domain - Assigns the domain and the SSL certificate to the CloudFront distribution > **Note:** You can find the full example code on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-custom-domain). ## Setup Download the files from the example app: ```sh yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-custom-domain my-app cd my-app ``` ## Build Prepare the Next.js application to be deployed with Terraform: ```sh yarn tf-next ``` ## Setting the domain Open the `main.tf` file in the root of the Next.js app, and set the custom domain that should be assigned to the CloudFront distribution: ```tf # main.tf ... variable "custom_domain" { description = "Your custom domain" type = string default = "example.com" } variable "custom_domain_zone_name" { description = "The Route53 zone name of the custom domain" type = string default = "example.com." } ... ``` You can change `example.com` to every domain (or subdomain) that is associated with Route 53 in your AWS account. ## Deploy Use Terraform to deploy the Next.js app to your AWS account: ```sh # Expose your AWS Access Keys to the current terminal session # Only needed when running Terraform commands export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY terraform init # Only needed on the first time running Terraform terraform plan # (Optional) See what resources Terraform will create terraform apply # Deploy the Next.js app to your AWS account ``` After the deployment was successful, you should see the following output: ```sh > Apply complete! > > Outputs: > > cloudfront_domain_name = ".cloudfront.net" > custom_domain_name = "example.com" ``` You can now access your Next.js app in the browser under the [example.com](https://example.com) or [https://<distribution-id>.cloudfront.net](https://.cloudfront.net) domain. ================================================ FILE: examples/with-custom-domain/main.tf ================================================ terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 4.0" } } } # Main region where the resources should be created in # Should be close to the location of your viewers provider "aws" { region = "us-west-2" } # Provider used for creating the Lambda@Edge function which must be deployed # to us-east-1 region (Should not be changed) provider "aws" { alias = "global_region" region = "us-east-1" } ########### # Variables ########### variable "custom_domain" { description = "Your custom domain" type = string default = "example.com" } # Assuming that the ZONE of your domain is already registrated in your AWS account (Route 53) # https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/AboutHZWorkingWith.html variable "custom_domain_zone_name" { description = "The Route53 zone name of the custom domain" type = string default = "example.com." } ########### # Locals ########### locals { aliases = [var.custom_domain] # If you need a wildcard domain(ex: *.example.com), you can add it like this: # aliases = [var.custom_domain, "*.${var.custom_domain}"] } ####################### # Route53 Domain record ####################### # Get the hosted zone for the custom domain data "aws_route53_zone" "custom_domain_zone" { name = var.custom_domain_zone_name } # Create a new record in Route 53 for the domain resource "aws_route53_record" "cloudfront_alias_domain" { for_each = toset(local.aliases) zone_id = data.aws_route53_zone.custom_domain_zone.zone_id name = each.key type = "A" alias { name = module.tf_next.cloudfront_domain_name zone_id = module.tf_next.cloudfront_hosted_zone_id evaluate_target_health = false } } ########## # SSL Cert ########## # Creates a free SSL certificate for CloudFront distribution # For more options (e.g. multiple domains) see: # https://registry.terraform.io/modules/terraform-aws-modules/acm/aws/ module "cloudfront_cert" { source = "terraform-aws-modules/acm/aws" version = "~> 3.0" domain_name = var.custom_domain zone_id = data.aws_route53_zone.custom_domain_zone.zone_id subject_alternative_names = slice(local.aliases, 1, length(local.aliases)) tags = { Name = "CloudFront ${var.custom_domain}" } # CloudFront works only with certs stored in us-east-1 providers = { aws = aws.global_region } } ########################## # Terraform Next.js Module ########################## module "tf_next" { source = "milliHQ/next-js/aws" version = "1.0.0-canary.5" cloudfront_aliases = local.aliases cloudfront_acm_certificate_arn = module.cloudfront_cert.acm_certificate_arn deployment_name = "tf-next-example-custom-domain" providers = { aws.global_region = aws.global_region } # Uncomment when using in the cloned monorepo for tf-next development # source = "../.." # debug_use_local_packages = true } ######### # Outputs ######### output "cloudfront_domain_name" { value = module.tf_next.cloudfront_domain_name } output "custom_domain_name" { value = var.custom_domain } ================================================ FILE: examples/with-custom-domain/package.json ================================================ { "name": "terraform-next-js-example-custom-domain", "version": "1.0.0", "private": true, "scripts": { "dev": "next", "build": "next build", "tf-next": "tf-next build", "start": "next start" }, "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "tf-next": "latest" }, "license": "MIT" } ================================================ FILE: examples/with-custom-domain/pages/index.js ================================================ export default function IndexPage() { return (

Custom domain example

); } ================================================ FILE: examples/with-existing-cloudfront/.gitignore ================================================ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # next.js /.next/ /out/ # production /build # misc .DS_Store *.pem # debug npm-debug.log* yarn-debug.log* yarn-error.log* # local env files .env.local .env.development.local .env.test.local .env.production.local # vercel .vercel # Terraform **/.terraform/* *.tfstate *.tfstate.* # tf-next /.tf-next/ ================================================ FILE: examples/with-existing-cloudfront/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2021 Felix Haus (milliVolt infrastructure) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: examples/with-existing-cloudfront/README.md ================================================ # Example with existing CloudFront distribution > **Warning:** This example is not fully updated for the upcoming `v1.0.0` release. > We recommend following the [Atomic Deployments Example](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/atomic-deployments) instead until this example gets an update. This example shows how to integrate the Terraform Next.js module for AWS into an existing CloudFront distribution (Without creating a new one). > **Note:** The full example code is available on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-existing-cloudfront) ## Setup Download the files from the example app: ```sh yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-existing-cloudfront my-app cd my-app ``` ## Build Prepare the Next.js application to be deployed with Terraform: ```sh yarn tf-next ``` ## Deploy Use Terraform to deploy the Next.js app to your AWS account: ```sh # Expose your AWS Access Keys to the current terminal session # Only needed when running Terraform commands export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY terraform init # Only needed on the first time running Terraform terraform plan # (Optional) See what resources Terraform will create terraform apply # Deploy the Next.js app to your AWS account ``` After the deployment was successful, you should see the following output: ```sh > Apply complete! > > Outputs: > > cloudfront_domain_name = ".cloudfront.net" ``` You can now access your Next.js app in the browser under the [https://<distribution-id>.cloudfront.net](https://.cloudfront.net) domain. ================================================ FILE: examples/with-existing-cloudfront/main.tf ================================================ terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 4.0" } } } # Main region where the resources should be created in # Should be close to the location of your viewers provider "aws" { region = "us-west-2" } # Provider used for creating the Lambda@Edge function which must be deployed # to us-east-1 region (Should not be changed) provider "aws" { alias = "global_region" region = "us-east-1" } ########################## # Terraform Next.js Module ########################## module "tf_next" { source = "milliHQ/next-js/aws" version = "1.0.0-canary.5" # Prevent creation of the main CloudFront distribution cloudfront_create_distribution = false cloudfront_external_id = aws_cloudfront_distribution.distribution.id cloudfront_external_arn = aws_cloudfront_distribution.distribution.arn deployment_name = "tf-next-existing-cloudfront" providers = { aws.global_region = aws.global_region } # Uncomment when using in the cloned monorepo for tf-next development # source = "../.." # debug_use_local_packages = true } ################################## # Existing CloudFront distribution ################################## # You can fully customize all the settings of the CloudFront distribution # as described in the AWS Provider documentation: # https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution resource "aws_cloudfront_distribution" "distribution" { enabled = true is_ipv6_enabled = true comment = "next-image-optimizer-example-external-cf" default_root_object = module.tf_next.cloudfront_default_root_object # Default cache behavior ######################## # Inserts the preconfigured default cache behavior from the tf-next module # No manual edits should be neccessary here dynamic "default_cache_behavior" { for_each = module.tf_next.cloudfront_default_cache_behavior content { allowed_methods = default_cache_behavior.value["allowed_methods"] cached_methods = default_cache_behavior.value["cached_methods"] target_origin_id = default_cache_behavior.value["target_origin_id"] viewer_protocol_policy = default_cache_behavior.value["viewer_protocol_policy"] compress = default_cache_behavior.value["compress"] origin_request_policy_id = default_cache_behavior.value["origin_request_policy_id"] cache_policy_id = default_cache_behavior.value["cache_policy_id"] dynamic "lambda_function_association" { for_each = [default_cache_behavior.value["lambda_function_association"]] content { event_type = lambda_function_association.value["event_type"] lambda_arn = lambda_function_association.value["lambda_arn"] include_body = lambda_function_association.value["include_body"] } } } } # Ordered cache behaviors ######################### # Inserts the preconfigured ordered cache behaviors from the tf-next module # No manual edits should be neccessary here dynamic "ordered_cache_behavior" { for_each = module.tf_next.cloudfront_ordered_cache_behaviors content { path_pattern = ordered_cache_behavior.value["path_pattern"] allowed_methods = ordered_cache_behavior.value["allowed_methods"] cached_methods = ordered_cache_behavior.value["cached_methods"] target_origin_id = ordered_cache_behavior.value["target_origin_id"] compress = ordered_cache_behavior.value["compress"] viewer_protocol_policy = ordered_cache_behavior.value["viewer_protocol_policy"] origin_request_policy_id = ordered_cache_behavior.value["origin_request_policy_id"] cache_policy_id = ordered_cache_behavior.value["cache_policy_id"] } } # You can add your own cache behaviours here (uncomment the following block) # ordered_cache_behavior { # path_pattern = "/test/*" # allowed_methods = ["GET", "HEAD", "OPTIONS"] # cached_methods = ["GET", "HEAD"] # ... # } # Origins ######### # Adds the preconfigured origins from the tf-next module # No manual edits should be neccessary here dynamic "origin" { for_each = module.tf_next.cloudfront_origins content { domain_name = origin.value["domain_name"] origin_id = origin.value["origin_id"] # Origin Shield dynamic "origin_shield" { for_each = lookup(origin.value, "origin_shield", null) != null ? [true] : [] content { enabled = lookup(origin.value["origin_shield"], "enabled", false) origin_shield_region = lookup(origin.value["origin_shield"], "origin_shield_region", null) } } # S3 origin dynamic "s3_origin_config" { for_each = lookup(origin.value, "s3_origin_config", null) != null ? [true] : [] content { origin_access_identity = lookup(origin.value["s3_origin_config"], "origin_access_identity", null) } } # Custom origin dynamic "custom_origin_config" { for_each = lookup(origin.value, "custom_origin_config", null) != null ? [true] : [] content { http_port = lookup(origin.value["custom_origin_config"], "http_port", null) https_port = lookup(origin.value["custom_origin_config"], "https_port", null) origin_protocol_policy = lookup(origin.value["custom_origin_config"], "origin_protocol_policy", null) origin_ssl_protocols = lookup(origin.value["custom_origin_config"], "origin_ssl_protocols", null) origin_keepalive_timeout = lookup(origin.value["custom_origin_config"], "origin_keepalive_timeout", null) origin_read_timeout = lookup(origin.value["custom_origin_config"], "origin_read_timeout", null) } } dynamic "custom_header" { for_each = lookup(origin.value, "custom_header", null) != null ? origin.value["custom_header"] : [] content { name = custom_header.value["name"] value = custom_header.value["value"] } } } } # You can add your own origins here (uncomment the following block) # origin { # domain_name = "example.com" # origin_id = "My custom origin" # ... # } # Custom Error response (S3 failover) ##################################### # Adds the preconfigured custom error response from the tf-next module # No manual edits should be neccessary here dynamic "custom_error_response" { for_each = module.tf_next.cloudfront_custom_error_response content { error_caching_min_ttl = custom_error_response.value["error_caching_min_ttl"] error_code = custom_error_response.value["error_code"] response_code = custom_error_response.value["response_code"] response_page_path = custom_error_response.value["response_page_path"] } } viewer_certificate { cloudfront_default_certificate = true } restrictions { geo_restriction { restriction_type = "none" } } } output "cloudfront_domain_name" { value = aws_cloudfront_distribution.distribution.domain_name } ================================================ FILE: examples/with-existing-cloudfront/package.json ================================================ { "name": "terraform-next-js-example-existing-cloudfront", "version": "1.0.0", "private": true, "scripts": { "dev": "next", "build": "next build", "tf-next": "tf-next build", "start": "next start" }, "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "tf-next": "latest" }, "license": "MIT" } ================================================ FILE: examples/with-existing-cloudfront/pages/index.js ================================================ import { useRouter } from 'next/router'; import { format } from 'url'; let counter = 0; export async function getServerSideProps() { counter++; return { props: { initialPropsCounter: counter } }; } export default function Index({ initialPropsCounter }) { const router = useRouter(); const { pathname, query } = router; const reload = () => { router.push(format({ pathname, query })); }; const incrementCounter = () => { const currentCounter = query.counter ? parseInt(query.counter) : 0; const href = `/?counter=${currentCounter + 1}`; router.push(href, href, { shallow: true }); }; return (

This is the Home Page

"getServerSideProps" ran for "{initialPropsCounter}" times.

Counter: "{query.counter || 0}".

); } ================================================ FILE: jest.config.js ================================================ /** @type {import('ts-jest').InitialOptionsTsJest} */ module.exports = { projects: ['/packages/*'], globalSetup: '/test/jest.setup.ts', }; ================================================ FILE: main.tf ================================================ data "aws_region" "current" {} ########## # DynamoDB ########## # Please see the documentation in packages/dynamodb-actions for information # about the used schema. resource "aws_dynamodb_table" "aliases" { name = "${var.deployment_name}_aliases" billing_mode = "PAY_PER_REQUEST" hash_key = "PK" range_key = "SK" attribute { name = "PK" type = "S" } attribute { name = "SK" type = "S" } attribute { name = "GSI1PK" type = "S" } attribute { name = "GSI1SK" type = "S" } global_secondary_index { name = "DeploymentIdIndex" hash_key = "GSI1PK" range_key = "GSI1SK" projection_type = "INCLUDE" non_key_attributes = [ "BasePath", "CreateDate", "DeploymentId", "DeploymentAlias", "HostnameRev" ] } tags = var.tags } # Using infrequent access tier here since this table is only used during API # operations (creating deployments and aliases), but serves no customer facing # purposes. resource "aws_dynamodb_table" "deployments" { name = "${var.deployment_name}_deployments" billing_mode = "PAY_PER_REQUEST" table_class = "STANDARD_INFREQUENT_ACCESS" hash_key = "PK" range_key = "SK" attribute { name = "PK" type = "S" } attribute { name = "SK" type = "S" } attribute { name = "GSI1SK" type = "S" } global_secondary_index { name = "CreateDateIndex" hash_key = "PK" range_key = "GSI1SK" projection_type = "INCLUDE" non_key_attributes = ["CreateDate", "DeploymentAlias", "DeploymentId", "Status"] } tags = var.tags } ##################### # CloudFormation Role ##################### # Policy that controls which actions can be performed when CloudFormation # creates a substack (from CDK) data "aws_iam_policy_document" "cloudformation_permission" { # Allow CloudFormation to publish status changes to the SNS queue statement { effect = "Allow" actions = [ "sns:Publish" ] resources = [module.deploy_controller.sns_topic_arn] } # Allow CloudFormation to access the lambda content statement { effect = "Allow" actions = [ "s3:GetObject" ] resources = [ module.statics_deploy.static_bucket_arn, "${module.statics_deploy.static_bucket_arn}/*" ] } # Stack creation statement { effect = "Allow" actions = [ # TODO: Restrict the API Gateway action more "apigateway:*", "iam:CreateRole", "iam:GetRole", "iam:GetRolePolicy", "iam:PassRole", "iam:PutRolePolicy", "iam:TagRole", "lambda:AddPermission", "lambda:CreateFunction", "lambda:CreateFunctionUrlConfig", "lambda:GetFunctionUrlConfig", "lambda:GetFunction", "lambda:TagResource", "logs:CreateLogGroup", "logs:PutRetentionPolicy", "logs:TagLogGroup" ] resources = ["*"] } # Stack deletion statement { effect = "Allow" actions = [ "apigateway:*", "iam:DeleteRole", "iam:DeleteRolePolicy", "iam:UntagRole", "lambda:DeleteFunction", "lambda:DeleteFunctionUrlConfig", "lambda:RemovePermission", "lambda:UntagResource", "logs:DeleteLogGroup", "logs:DeleteRetentionPolicy", "logs:UntagLogGroup" ] resources = ["*"] } } data "aws_iam_policy_document" "cloudformation_permission_assume_role" { statement { effect = "Allow" actions = ["sts:AssumeRole"] principals { type = "Service" identifiers = ["cloudformation.amazonaws.com"] } } } resource "aws_iam_policy" "cloudformation_permission" { name = "${var.deployment_name}_cf-control" description = "Managed by Terraform Next.js" policy = data.aws_iam_policy_document.cloudformation_permission.json tags = var.tags } resource "aws_iam_role" "cloudformation_permission" { name = "${var.deployment_name}_cf-control" assume_role_policy = data.aws_iam_policy_document.cloudformation_permission_assume_role.json managed_policy_arns = [ aws_iam_policy.cloudformation_permission.arn ] } ################### # Deploy Controller ################### module "deploy_controller" { source = "./modules/deploy-controller" dynamodb_region = data.aws_region.current.name dynamodb_table_aliases_arn = aws_dynamodb_table.aliases.arn dynamodb_table_aliases_name = aws_dynamodb_table.aliases.id dynamodb_table_deployments_arn = aws_dynamodb_table.deployments.arn dynamodb_table_deployments_name = aws_dynamodb_table.deployments.id enable_multiple_deployments = var.enable_multiple_deployments multiple_deployments_base_domain = var.multiple_deployments_base_domain deployment_name = var.deployment_name tags = var.tags debug_use_local_packages = var.debug_use_local_packages tf_next_module_root = path.module } ################### # Deployment Lambda ################### # Static deployment to S3 website and handles CloudFront invalidations module "statics_deploy" { source = "./modules/statics-deploy" cloudfront_id = var.cloudfront_create_distribution ? module.cloudfront_main[0].cloudfront_id : var.cloudfront_external_id cloudfront_arn = var.cloudfront_create_distribution ? module.cloudfront_main[0].cloudfront_arn : var.cloudfront_external_arn deploy_status_sns_topic_arn = module.deploy_controller.sns_topic_arn dynamodb_region = data.aws_region.current.name dynamodb_table_aliases_arn = aws_dynamodb_table.aliases.arn dynamodb_table_aliases_name = aws_dynamodb_table.aliases.id dynamodb_table_deployments_arn = aws_dynamodb_table.deployments.arn dynamodb_table_deployments_name = aws_dynamodb_table.deployments.id cloudformation_role_arn = aws_iam_role.cloudformation_permission.arn enable_multiple_deployments = var.enable_multiple_deployments multiple_deployments_base_domain = var.multiple_deployments_base_domain lambda_role_permissions_boundary = var.lambda_role_permissions_boundary deployment_name = var.deployment_name tags = var.tags tags_s3_bucket = var.tags_s3_bucket debug_use_local_packages = var.debug_use_local_packages tf_next_module_root = path.module } ##### # API ##### module "api" { source = "./modules/api" dynamodb_region = data.aws_region.current.name dynamodb_table_aliases_arn = aws_dynamodb_table.aliases.arn dynamodb_table_aliases_name = aws_dynamodb_table.aliases.id dynamodb_table_deployments_arn = aws_dynamodb_table.deployments.arn dynamodb_table_deployments_name = aws_dynamodb_table.deployments.id upload_bucket_id = module.statics_deploy.upload_bucket_id upload_bucket_region = module.statics_deploy.upload_bucket_region upload_bucket_arn = module.statics_deploy.upload_bucket_arn deployment_name = var.deployment_name tags = var.tags debug_use_local_packages = var.debug_use_local_packages tf_next_module_root = path.module } ############ # Next/Image ############ # Permission for image optimizer to fetch images from S3 deployment data "aws_iam_policy_document" "access_static_deployment" { statement { actions = ["s3:GetObject"] resources = ["${module.statics_deploy.static_bucket_arn}/*"] } } module "next_image" { count = var.create_image_optimization ? 1 : 0 source = "milliHQ/next-js-image-optimization/aws" version = ">= 12.1.0" cloudfront_create_distribution = false # tf-next does not distinct between image and device sizes, because they # are eventually merged together on the image optimizer. # So we only use a single key (next_image_domains) to pass ALL (image & # device) sizes to the optimizer and by setting the other # (next_image_device_sizes) to an empty array which prevents the optimizer # from adding the default device settings # TODO: Find way to pass these dynamically from the deployment next_image_domains = [] next_image_image_sizes = [] next_image_device_sizes = [] source_bucket_id = module.statics_deploy.static_bucket_id lambda_memory_size = var.image_optimization_lambda_memory_size lambda_attach_policy_json = true lambda_policy_json = data.aws_iam_policy_document.access_static_deployment.json lambda_role_permissions_boundary = var.lambda_role_permissions_boundary deployment_name = "${var.deployment_name}_tfn-image" tags = var.tags } ######################### # CloudFront Proxy Config ######################### module "proxy_config" { source = "./modules/cloudfront-proxy-config" cloudfront_price_class = var.cloudfront_price_class lambda_role_permissions_boundary = var.lambda_role_permissions_boundary dynamodb_region = data.aws_region.current.name dynamodb_table_aliases_arn = aws_dynamodb_table.aliases.arn dynamodb_table_aliases_name = aws_dynamodb_table.aliases.id static_deploy_bucket_region = module.statics_deploy.static_bucket_region static_deploy_bucket_arn = module.statics_deploy.static_bucket_arn static_deploy_bucket_id = module.statics_deploy.static_bucket_id deployment_name = var.deployment_name tags = var.tags debug_use_local_packages = var.debug_use_local_packages tf_next_module_root = path.module providers = { aws.global_region = aws.global_region } } ##################### # Proxy (Lambda@Edge) ##################### module "proxy" { source = "./modules/proxy" lambda_role_permissions_boundary = var.lambda_role_permissions_boundary deployment_name = var.deployment_name tags = var.tags debug_use_local_packages = var.debug_use_local_packages tf_next_module_root = path.module providers = { aws.global_region = aws.global_region } } ######################### # CloudFront distribution ######################### # Origin & Cache Policies ######################### # Managed origin policy for default behavior data "aws_cloudfront_origin_request_policy" "managed_all_viewer" { name = "Managed-AllViewer" } locals { # Default headers on which the cache key should be determined # # host - When using multiple domains host header ensures that each # (sub-)domain has a unique cache key cloudfront_cache_default_key_headers = ["host"] cloudfront_cache_key_headers = sort(concat( local.cloudfront_cache_default_key_headers, var.cloudfront_cache_key_headers )) } resource "aws_cloudfront_cache_policy" "this" { name = "${var.deployment_name}_tfn-cache" comment = "Managed by Terraform Next.js" # Default values (Should be provided by origin) min_ttl = 0 default_ttl = 0 max_ttl = 31536000 parameters_in_cache_key_and_forwarded_to_origin { cookies_config { cookie_behavior = "all" } headers_config { header_behavior = "whitelist" headers { items = local.cloudfront_cache_key_headers } } query_strings_config { query_string_behavior = "all" } enable_accept_encoding_gzip = true enable_accept_encoding_brotli = true } } locals { # CloudFront default root object ################################ cloudfront_default_root_object = "" # CloudFront Origins #################### # Default origin (With config for Lambda@Edge Proxy) cloudfront_origin_static_content = { domain_name = module.statics_deploy.static_bucket_endpoint origin_id = "tf-next-s3-static-content" s3_origin_config = { origin_access_identity = module.statics_deploy.static_bucket_access_identity } custom_header = [ { // Intentionally using http here (instead of https) to safe the time // the SSL handshake costs. name = "x-env-config-endpoint" value = "http://${module.proxy_config.config_endpoint}" }, ] } # Little hack here to create a dynamic object with different number of attributes # using filtering: https://www.terraform.io/docs/language/expressions/for.html#filtering-elements _cloudfront_origins = { static_content = merge(local.cloudfront_origin_static_content, { create = true }) next_image = merge( var.create_image_optimization ? module.next_image[0].cloudfront_origin : null, { create = var.create_image_optimization }) } cloudfront_origins = { for key, origin in local._cloudfront_origins : key => origin if origin.create } # CloudFront behaviors ###################### # Default CloudFront behavior # (Lambda@Edge Proxy) cloudfront_default_behavior = { default_behavior = { allowed_methods = ["DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"] cached_methods = ["GET", "HEAD"] target_origin_id = local.cloudfront_origin_static_content.origin_id compress = true viewer_protocol_policy = "redirect-to-https" origin_request_policy_id = var.cloudfront_origin_request_policy != null ? var.cloudfront_origin_request_policy : data.aws_cloudfront_origin_request_policy.managed_all_viewer.id response_headers_policy_id = var.cloudfront_response_headers_policy cache_policy_id = aws_cloudfront_cache_policy.this.id lambda_function_association = { event_type = "origin-request" lambda_arn = module.proxy.lambda_edge_arn include_body = false } } } # next/image behavior cloudfront_ordered_cache_behavior_next_image = var.create_image_optimization ? module.next_image[0].cloudfront_cache_behavior : null # Little hack here to create a dynamic object with different number of attributes # using filtering: https://www.terraform.io/docs/language/expressions/for.html#filtering-elements _cloudfront_ordered_cache_behaviors = { next_image = merge(local.cloudfront_ordered_cache_behavior_next_image, { create = var.create_image_optimization }) } cloudfront_ordered_cache_behaviors = { for key, behavior in local._cloudfront_ordered_cache_behaviors : key => behavior if behavior.create } cloudfront_custom_error_response = { s3_failover = { error_caching_min_ttl = 60 error_code = 403 response_code = 404 response_page_path = "/404" } } } module "cloudfront_main" { count = var.cloudfront_create_distribution ? 1 : 0 source = "./modules/cloudfront-main" cloudfront_price_class = var.cloudfront_price_class cloudfront_aliases = var.cloudfront_aliases cloudfront_acm_certificate_arn = var.cloudfront_acm_certificate_arn cloudfront_minimum_protocol_version = var.cloudfront_minimum_protocol_version cloudfront_webacl_id = var.cloudfront_webacl_id cloudfront_default_root_object = local.cloudfront_default_root_object cloudfront_origins = local.cloudfront_origins cloudfront_default_behavior = local.cloudfront_default_behavior cloudfront_ordered_cache_behaviors = local.cloudfront_ordered_cache_behaviors cloudfront_custom_error_response = local.cloudfront_custom_error_response deployment_name = var.deployment_name tags = var.tags } ================================================ FILE: modules/api/main.tf ================================================ ######## # Lambda ######## # For changing records in deployment & alias tables data "aws_iam_policy_document" "access_dynamodb_tables" { statement { effect = "Allow" actions = [ "dynamodb:GetItem", "dynamodb:DeleteItem", "dynamodb:PutItem", "dynamodb:Query", "dynamodb:UpdateItem" ] resources = [ var.dynamodb_table_deployments_arn, "${var.dynamodb_table_deployments_arn}/index/*", var.dynamodb_table_aliases_arn, "${var.dynamodb_table_aliases_arn}/index/*", ] } } # For creating the presigned upload URL in S3 data "aws_iam_policy_document" "access_upload_bucket" { statement { effect = "Allow" actions = [ "s3:PutObject" ] resources = [ "${var.upload_bucket_arn}/*" ] } } # Initiate deletion of CloudFormation stacks data "aws_iam_policy_document" "delete_cloudformation_stack" { statement { effect = "Allow" actions = [ "cloudformation:DeleteStack" ] resources = [ "arn:aws:cloudformation:*:*:stack/*/*" ] } } module "lambda" { source = "../lambda-worker" module_name = "@millihq/terraform-next-api" module_version = var.api_component_version module_asset_path = "dist.zip" local_cwd = var.tf_next_module_root function_name = "${var.deployment_name}_tfn-api" description = "Managed by Terraform Next.js" handler = "handler.handler" memory_size = 128 attach_policy_jsons = true number_of_policy_jsons = 3 policy_jsons = [ data.aws_iam_policy_document.access_dynamodb_tables.json, data.aws_iam_policy_document.access_upload_bucket.json, data.aws_iam_policy_document.delete_cloudformation_stack.json, ] environment_variables = { NODE_ENV = "production" TABLE_REGION = var.dynamodb_region TABLE_NAME_DEPLOYMENTS = var.dynamodb_table_deployments_name TABLE_NAME_ALIASES = var.dynamodb_table_aliases_name UPLOAD_BUCKET_ID = var.upload_bucket_id UPLOAD_BUCKET_REGION = var.upload_bucket_region } allowed_triggers = { InvokeFromAPIGateway = { principal = "apigateway.amazonaws.com" source_arn = "${aws_apigatewayv2_api.api.execution_arn}/*/*" } } tags = var.tags debug_use_local_packages = var.debug_use_local_packages } ############# # API Gateway ############# resource "aws_apigatewayv2_api" "api" { name = "${var.deployment_name}_api" protocol_type = "HTTP" tags = var.tags } resource "aws_apigatewayv2_integration" "lambda_integration" { api_id = aws_apigatewayv2_api.api.id integration_type = "AWS_PROXY" connection_type = "INTERNET" payload_format_version = "2.0" integration_uri = module.lambda.lambda_function_invoke_arn } resource "aws_apigatewayv2_route" "lambda_integration" { api_id = aws_apigatewayv2_api.api.id route_key = "ANY /{proxy+}" authorization_type = "AWS_IAM" target = "integrations/${aws_apigatewayv2_integration.lambda_integration.id}" } resource "aws_apigatewayv2_stage" "default" { api_id = aws_apigatewayv2_api.api.id name = "$default" auto_deploy = true tags = var.tags } ################################### # Invoke Permission for API Gateway ################################### data "aws_iam_policy_document" "access_api" { statement { effect = "Allow" actions = [ "execute-api:Invoke", ] resources = [ "${aws_apigatewayv2_api.api.execution_arn}/*/*" ] } } resource "aws_iam_policy" "access_api" { name = "${var.deployment_name}_api-access" description = "Managed by Terraform Next.js" policy = data.aws_iam_policy_document.access_api.json tags = var.tags } ================================================ FILE: modules/api/outputs.tf ================================================ output "api_endpoint" { value = aws_apigatewayv2_api.api.api_endpoint } output "api_endpoint_access_policy_arn" { value = aws_iam_policy.access_api.arn } ================================================ FILE: modules/api/variables.tf ================================================ variable "tf_next_module_root" { type = string } variable "api_component_version" { type = string default = "1.0.0-canary.5" } ########## # Database ########## variable "dynamodb_region" { type = string } variable "dynamodb_table_aliases_arn" { type = string } variable "dynamodb_table_aliases_name" { type = string } variable "dynamodb_table_deployments_arn" { type = string } variable "dynamodb_table_deployments_name" { type = string } ############### # Upload Bucket ############### variable "upload_bucket_id" { type = string } variable "upload_bucket_region" { type = string } variable "upload_bucket_arn" { type = string } ########## # Labeling ########## variable "deployment_name" { type = string } variable "tags" { type = map(string) default = {} } ####### # Debug ####### variable "debug_use_local_packages" { type = bool default = false } ================================================ FILE: modules/cloudfront-main/main.tf ================================================ resource "aws_cloudfront_distribution" "distribution" { enabled = true is_ipv6_enabled = true comment = "${var.deployment_name} - Main" price_class = var.cloudfront_price_class aliases = var.cloudfront_aliases default_root_object = var.cloudfront_default_root_object web_acl_id = var.cloudfront_webacl_id # Add CloudFront origins dynamic "origin" { for_each = var.cloudfront_origins content { domain_name = origin.value["domain_name"] origin_id = origin.value["origin_id"] # Origin Shield dynamic "origin_shield" { for_each = lookup(origin.value, "origin_shield", null) != null ? [true] : [] content { enabled = lookup(origin.value["origin_shield"], "enabled", false) origin_shield_region = lookup(origin.value["origin_shield"], "origin_shield_region", null) } } # S3 origin dynamic "s3_origin_config" { for_each = lookup(origin.value, "s3_origin_config", null) != null ? [true] : [] content { origin_access_identity = lookup(origin.value["s3_origin_config"], "origin_access_identity", null) } } # Custom origin dynamic "custom_origin_config" { for_each = lookup(origin.value, "custom_origin_config", null) != null ? [true] : [] content { http_port = lookup(origin.value["custom_origin_config"], "http_port", null) https_port = lookup(origin.value["custom_origin_config"], "https_port", null) origin_protocol_policy = lookup(origin.value["custom_origin_config"], "origin_protocol_policy", null) origin_ssl_protocols = lookup(origin.value["custom_origin_config"], "origin_ssl_protocols", null) origin_keepalive_timeout = lookup(origin.value["custom_origin_config"], "origin_keepalive_timeout", null) origin_read_timeout = lookup(origin.value["custom_origin_config"], "origin_read_timeout", null) } } dynamic "custom_header" { for_each = lookup(origin.value, "custom_header", null) != null ? origin.value["custom_header"] : [] content { name = custom_header.value["name"] value = custom_header.value["value"] } } } } # Lambda@Edge Proxy dynamic "default_cache_behavior" { for_each = var.cloudfront_default_behavior content { allowed_methods = default_cache_behavior.value["allowed_methods"] cached_methods = default_cache_behavior.value["cached_methods"] target_origin_id = default_cache_behavior.value["target_origin_id"] viewer_protocol_policy = default_cache_behavior.value["viewer_protocol_policy"] compress = default_cache_behavior.value["compress"] origin_request_policy_id = default_cache_behavior.value["origin_request_policy_id"] response_headers_policy_id = default_cache_behavior.value["response_headers_policy_id"] cache_policy_id = default_cache_behavior.value["cache_policy_id"] dynamic "lambda_function_association" { for_each = [default_cache_behavior.value["lambda_function_association"]] content { event_type = lambda_function_association.value["event_type"] lambda_arn = lambda_function_association.value["lambda_arn"] include_body = lambda_function_association.value["include_body"] } } } } # Ordered cache behaviors dynamic "ordered_cache_behavior" { for_each = var.cloudfront_ordered_cache_behaviors content { path_pattern = ordered_cache_behavior.value["path_pattern"] allowed_methods = ordered_cache_behavior.value["allowed_methods"] cached_methods = ordered_cache_behavior.value["cached_methods"] target_origin_id = ordered_cache_behavior.value["target_origin_id"] compress = ordered_cache_behavior.value["compress"] viewer_protocol_policy = ordered_cache_behavior.value["viewer_protocol_policy"] origin_request_policy_id = ordered_cache_behavior.value["origin_request_policy_id"] cache_policy_id = ordered_cache_behavior.value["cache_policy_id"] } } # Custom error response when a doc is not found in S3 (returns 403) # Then shows the 404 page dynamic "custom_error_response" { for_each = var.cloudfront_custom_error_response content { error_caching_min_ttl = custom_error_response.value["error_caching_min_ttl"] error_code = custom_error_response.value["error_code"] response_code = custom_error_response.value["response_code"] response_page_path = custom_error_response.value["response_page_path"] } } viewer_certificate { cloudfront_default_certificate = var.cloudfront_acm_certificate_arn == null acm_certificate_arn = var.cloudfront_acm_certificate_arn minimum_protocol_version = var.cloudfront_minimum_protocol_version ssl_support_method = var.cloudfront_acm_certificate_arn != null ? "sni-only" : null } restrictions { geo_restriction { restriction_type = "none" } } tags = var.tags } ================================================ FILE: modules/cloudfront-main/outputs.tf ================================================ output "cloudfront_id" { value = aws_cloudfront_distribution.distribution.id } output "cloudfront_hosted_zone_id" { value = aws_cloudfront_distribution.distribution.hosted_zone_id } output "cloudfront_domain_name" { value = aws_cloudfront_distribution.distribution.domain_name } output "cloudfront_arn" { value = aws_cloudfront_distribution.distribution.arn } ================================================ FILE: modules/cloudfront-main/variables.tf ================================================ ############ # CloudFront ############ variable "cloudfront_price_class" { type = string } variable "cloudfront_aliases" { type = list(string) default = [] } variable "cloudfront_acm_certificate_arn" { type = string default = null } variable "cloudfront_minimum_protocol_version" { type = string default = "TLSv1" } variable "cloudfront_default_root_object" { type = string } variable "cloudfront_origins" { type = any default = null } variable "cloudfront_default_behavior" { type = any default = null } variable "cloudfront_ordered_cache_behaviors" { type = any default = null } variable "cloudfront_custom_error_response" { type = any default = null } variable "cloudfront_webacl_id" { description = "An optional webacl2 arn or webacl id to associate with the cloudfront distribution" type = string default = null } ########## # Labeling ########## variable "deployment_name" { type = string } variable "tags" { type = map(string) default = {} } ================================================ FILE: modules/cloudfront-main/versions.tf ================================================ terraform { required_version = ">= 0.13" required_providers { aws = { source = "hashicorp/aws" version = ">= 3.64.0" } } } ================================================ FILE: modules/cloudfront-proxy-config/main.tf ================================================ locals { origin_id = "Proxy-Config-Edge" } ############# # Lambda@Edge ############# data "aws_iam_policy_document" "access_resources" { # Access the aliases dynamodb table statement { effect = "Allow" actions = [ "dynamodb:Query", ] resources = [ var.dynamodb_table_aliases_arn ] } # Query the S3 bucket for static files statement { effect = "Allow" actions = [ "s3:GetObject" ] resources = [ "${var.static_deploy_bucket_arn}/*" ] } } module "proxy_config_package" { source = "milliHQ/download/npm" version = "2.1.0" module_name = "@millihq/terraform-next-proxy-config" module_version = var.proxy_config_module_version path_to_file = "dist.zip" use_local = var.debug_use_local_packages local_cwd = var.tf_next_module_root } module "proxy_config" { source = "terraform-aws-modules/lambda/aws" version = "3.1.0" lambda_at_edge = true function_name = "${var.deployment_name}_tfn-proxy-config" description = "Managed by Terraform Next.js" handler = "handler.handler" runtime = var.lambda_runtime memory_size = 1024 timeout = 30 attach_policy_json = true policy_json = data.aws_iam_policy_document.access_resources.json role_permissions_boundary = var.lambda_role_permissions_boundary create_package = false local_existing_package = module.proxy_config_package.rel_path cloudwatch_logs_retention_in_days = 30 tags = var.tags providers = { aws = aws.global_region } } ############ # CloudFront ############ # Managed origin request policy data "aws_cloudfront_origin_request_policy" "managed_cors_custom_origin" { name = "Managed-CORS-CustomOrigin" } # Managed cache policy data "aws_cloudfront_cache_policy" "managed_caching_optimized_for_uncompressed_objects" { name = "Managed-CachingOptimizedForUncompressedObjects" } resource "aws_cloudfront_distribution" "distribution" { enabled = true is_ipv6_enabled = true comment = "${var.deployment_name} - Proxy-Config" price_class = var.cloudfront_price_class # Dummy origin, since all requests are served from Lambda@Edge and never # reach the custom origin endpoint. origin { domain_name = "milli.is" origin_id = local.origin_id custom_origin_config { http_port = 80 https_port = 443 origin_protocol_policy = "https-only" origin_ssl_protocols = ["SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2"] } custom_header { name = "x-env-dynamodb-region" value = var.dynamodb_region } custom_header { name = "x-env-dynamodb-table-aliases" value = var.dynamodb_table_aliases_name } custom_header { name = "x-env-bucket-region" value = var.static_deploy_bucket_region } custom_header { name = "x-env-bucket-id" value = var.static_deploy_bucket_id } } default_cache_behavior { allowed_methods = ["GET", "HEAD"] cached_methods = ["GET", "HEAD"] target_origin_id = local.origin_id # Allow connections via HTTP to improve speed viewer_protocol_policy = "allow-all" origin_request_policy_id = data.aws_cloudfront_origin_request_policy.managed_cors_custom_origin.id cache_policy_id = data.aws_cloudfront_cache_policy.managed_caching_optimized_for_uncompressed_objects.id lambda_function_association { event_type = "origin-request" lambda_arn = module.proxy_config.lambda_function_qualified_arn include_body = false } } viewer_certificate { cloudfront_default_certificate = true } restrictions { geo_restriction { restriction_type = "none" } } tags = var.tags } ================================================ FILE: modules/cloudfront-proxy-config/outputs.tf ================================================ output "config_endpoint" { value = aws_cloudfront_distribution.distribution.domain_name } ================================================ FILE: modules/cloudfront-proxy-config/variables.tf ================================================ ############ # CloudFront ############ variable "proxy_config_module_version" { type = string default = "1.0.0-canary.5" } variable "lambda_runtime" { type = string default = "nodejs14.x" } variable "lambda_role_permissions_boundary" { type = string default = null } variable "cloudfront_price_class" { type = string } ################### # Deployment Bucket ################### variable "static_deploy_bucket_region" { type = string } variable "static_deploy_bucket_arn" { type = string } variable "static_deploy_bucket_id" { type = string } ########## # DynamoDB ########## variable "dynamodb_region" { type = string } variable "dynamodb_table_aliases_arn" { type = string } variable "dynamodb_table_aliases_name" { type = string } ########## # Labeling ########## variable "deployment_name" { type = string } variable "tags" { type = map(string) default = {} } ####### # Debug ####### variable "debug_use_local_packages" { type = bool default = false } variable "tf_next_module_root" { type = string } ================================================ FILE: modules/cloudfront-proxy-config/versions.tf ================================================ terraform { required_version = ">= 0.15" required_providers { aws = { source = "hashicorp/aws" version = ">= 4.0" configuration_aliases = [aws.global_region] } } } ================================================ FILE: modules/deploy-controller/README.md ================================================ # Deploy Controller The deploy controller is responsible for handling updates to the SubStacks and synchronizing the entries in the DynamoDB accordingly. ================================================ FILE: modules/deploy-controller/main.tf ================================================ locals { function_name = "${var.deployment_name}_tfn-controller" } ########### # SNS-Topic ########### resource "aws_sns_topic" "cloudformation_updates" { name_prefix = var.deployment_name tags = var.tags } # CloudFormation sends events for each status change of each resource in the # stack, including the stack itself. # Unfortunately the payload of the stack events is always delivered as a single # SNS message instead of using messageAttributes, so no filtering for updates # that only affect the stack is possible. # See: https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/635 resource "aws_sns_topic_subscription" "lambda" { topic_arn = aws_sns_topic.cloudformation_updates.arn protocol = "lambda" endpoint = module.worker.lambda_function_arn } ############# # Permissions ############# # Access the dynamodb tables data "aws_iam_policy_document" "access_dynamodb_tables" { statement { effect = "Allow" actions = [ "dynamodb:GetItem", "dynamodb:PutItem", "dynamodb:Query", "dynamodb:UpdateItem", "dynamodb:DeleteItem" ] resources = [ var.dynamodb_table_deployments_arn, var.dynamodb_table_aliases_arn ] } } # Read the output from the created CloudFormation stacks data "aws_iam_policy_document" "access_cloudformation_stacks" { statement { effect = "Allow" actions = [ "cloudformation:DescribeStacks", ] resources = [ "*" ] } } ############### # Worker Lambda ############### module "worker" { source = "../lambda-worker" module_name = "@millihq/terraform-next-deploy-controller" module_version = var.deploy_controller_component_version module_asset_path = "dist.zip" local_cwd = var.tf_next_module_root function_name = "${var.deployment_name}_tfn-controller" description = "Managed by Terraform Next.js" handler = "handler.handler" memory_size = 128 attach_policy_jsons = true number_of_policy_jsons = 2 policy_jsons = [ data.aws_iam_policy_document.access_dynamodb_tables.json, data.aws_iam_policy_document.access_cloudformation_stacks.json, ] environment_variables = { NODE_ENV = "production" TABLE_REGION = var.dynamodb_region TABLE_NAME_DEPLOYMENTS = var.dynamodb_table_deployments_name TABLE_NAME_ALIASES = var.dynamodb_table_aliases_name # Remove the * from the base domain (e.g. *.example.com -> .example.com) MULTI_DEPLOYMENTS_BASE_DOMAIN = var.enable_multiple_deployments ? replace(var.multiple_deployments_base_domain, "/^\\*/", "") : null } allowed_triggers = { CloudFormationUpdates = { principal = "sns.amazonaws.com" source_arn = aws_sns_topic.cloudformation_updates.arn } } tags = var.tags debug_use_local_packages = var.debug_use_local_packages } ================================================ FILE: modules/deploy-controller/outputs.tf ================================================ output "sns_topic_arn" { value = aws_sns_topic.cloudformation_updates.arn } ================================================ FILE: modules/deploy-controller/variables.tf ================================================ variable "tf_next_module_root" { type = string } variable "deploy_controller_component_version" { type = string default = "1.0.0-canary.5" } ##################### # Deployment database ##################### variable "dynamodb_region" { type = string } variable "dynamodb_table_aliases_arn" { type = string } variable "dynamodb_table_aliases_name" { type = string } variable "dynamodb_table_deployments_arn" { type = string } variable "dynamodb_table_deployments_name" { type = string } ###################### # Multiple deployments ###################### variable "enable_multiple_deployments" { type = bool } variable "multiple_deployments_base_domain" { type = string default = null } ########## # Labeling ########## variable "deployment_name" { type = string } variable "tags" { type = map(string) default = {} } ####### # Debug ####### variable "debug_use_local_packages" { type = bool default = false } ================================================ FILE: modules/deploy-controller/versions.tf ================================================ terraform { required_version = ">= 0.13" required_providers { aws = { source = "hashicorp/aws" version = ">= 3.0" } } } ================================================ FILE: modules/lambda-worker/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS ================================================ FILE: modules/lambda-worker/iam.tf ================================================ # This module is based on the terraform-aws-lambda module: # https://github.com/terraform-aws-modules/terraform-aws-lambda # # See the LICENSE file in the directory of this module for more information. # # It simplifies the available options for configuration to match the needs of # this project. ############# # Lambda Role ############# data "aws_iam_policy_document" "assume_role" { statement { effect = "Allow" actions = ["sts:AssumeRole"] principals { type = "Service" identifiers = ["lambda.amazonaws.com"] } } } resource "aws_iam_role" "lambda" { name = var.function_name assume_role_policy = data.aws_iam_policy_document.assume_role.json tags = var.tags } ################# # Cloudwatch Logs ################# data "aws_iam_policy_document" "logs" { statement { effect = "Allow" actions = ["logs:CreateLogStream", "logs:PutLogEvents"] resources = flatten([for _, v in ["%v:*", "%v:*:*"] : format(v, aws_cloudwatch_log_group.lambda.arn)]) } } resource "aws_iam_policy" "logs" { name = "${local.role_name}-logs" policy = data.aws_iam_policy_document.logs.json tags = var.tags } resource "aws_iam_role_policy_attachment" "logs" { role = aws_iam_role.lambda.name policy_arn = aws_iam_policy.logs.arn } ================================================ FILE: modules/lambda-worker/main.tf ================================================ # This module is based on the terraform-aws-lambda module: # https://github.com/terraform-aws-modules/terraform-aws-lambda # # See the LICENSE file in the directory of this module for more information. # # It simplifies the available options for configuration to match the needs of # this project. locals { role_name = var.function_name } ############### # Lambda Source ############### module "lambda_content" { source = "milliHQ/download/npm" version = "2.1.0" module_name = var.module_name module_version = var.module_version path_to_file = "dist.zip" use_local = var.debug_use_local_packages local_cwd = var.local_cwd } ########### # Log Group ########### resource "aws_cloudwatch_log_group" "lambda" { name = "/aws/lambda/${var.function_name}" retention_in_days = var.cloudwatch_logs_retention_in_days tags = var.tags } ########## # Function ########## resource "aws_lambda_function" "this" { function_name = var.function_name description = var.description handler = var.handler runtime = var.runtime memory_size = var.memory_size timeout = var.timeout role = aws_iam_role.lambda.arn filename = module.lambda_content.rel_path source_code_hash = filebase64sha256(module.lambda_content.rel_path) dynamic "environment" { for_each = length(keys(var.environment_variables)) == 0 ? [] : [true] content { variables = var.environment_variables } } tags = var.tags # Wait until the creation of the log group is finished before the lambda is # deployed. depends_on = [aws_cloudwatch_log_group.lambda] } resource "aws_lambda_permission" "triggers" { for_each = var.allowed_triggers function_name = aws_lambda_function.this.function_name statement_id = try(each.value.statement_id, each.key) action = try(each.value.action, "lambda:InvokeFunction") principal = try(each.value.principal, format("%s.amazonaws.com", try(each.value.service, ""))) source_arn = try(each.value.source_arn, null) source_account = try(each.value.source_account, null) event_source_token = try(each.value.event_source_token, null) } #################################### # Additional policies (list of JSON) #################################### resource "aws_iam_policy" "additional_jsons" { count = var.attach_policy_jsons ? var.number_of_policy_jsons : 0 name = "${local.role_name}-${count.index}" policy = var.policy_jsons[count.index] tags = var.tags } resource "aws_iam_role_policy_attachment" "additional_jsons" { count = var.attach_policy_jsons ? var.number_of_policy_jsons : 0 role = aws_iam_role.lambda.name policy_arn = aws_iam_policy.additional_jsons[count.index].arn } ================================================ FILE: modules/lambda-worker/outputs.tf ================================================ # This module is based on the terraform-aws-lambda module: # https://github.com/terraform-aws-modules/terraform-aws-lambda # # See the LICENSE file in the directory of this module for more information. # # It simplifies the available options for configuration to match the needs of # this project. output "lambda_function_arn" { description = "The ARN of the Lambda Function." value = aws_lambda_function.this.arn } output "lambda_function_invoke_arn" { description = "ARN to be used for invoking Lambda Function from API Gateway." value = aws_lambda_function.this.invoke_arn } ================================================ FILE: modules/lambda-worker/variables.tf ================================================ # This module is based on the terraform-aws-lambda module: # https://github.com/terraform-aws-modules/terraform-aws-lambda # # See the LICENSE file in the directory of this module for more information. # # It simplifies the available options for configuration to match the needs of # this project. ############### # Lambda Source ############### variable "module_name" { description = "Name of the package that should be downloaded from npm." type = string } variable "module_version" { description = "Version of the module that should be fetched from npm registry." type = string } variable "module_asset_path" { description = "Path of the asset that should be used from the npm package." type = string default = "dist.zip" } variable "local_cwd" { description = "Root path where node.resolve should start looking for the local module." } ######## # Lambda ######## variable "function_name" { description = "Name of the Lambda function." type = string } variable "description" { description = "Description that should be added to the function." type = string } variable "runtime" { description = "Runtime that the function should use." type = string default = "nodejs14.x" } variable "memory_size" { description = "Amount of memory that should be allocated by the function." type = number default = 128 } variable "handler" { description = "Entry point of the function that should be called on execution" type = string } variable "allowed_triggers" { description = "Map of allowed triggers to create Lambda permissions." type = map(any) default = {} } variable "environment_variables" { description = "Map that defines environment variables for the Lambda Function." type = map(string) default = {} } variable "timeout" { description = "Amount of time your Lambda Function has to run in seconds." type = number default = 3 } ########### # Log Group ########### variable "cloudwatch_logs_retention_in_days" { description = "Amount of days you want to retain log events of the function." type = number default = 30 } ############## # IAM Policies ############## variable "attach_policy_jsons" { description = "Controls whether policy_jsons should be added to IAM role for Lambda Function." type = bool default = false } variable "number_of_policy_jsons" { description = "Number of policies JSON to attach to IAM role for Lambda Function." type = number default = 0 } variable "policy_jsons" { description = "List of additional policy documents as JSON to attach to Lambda Function role." type = list(string) default = [] } ########## # Labeling ########## variable "tags" { description = "Map of tags to assign to resources." type = map(string) default = {} } ####### # Debug ####### variable "debug_use_local_packages" { description = "Instead of downloading the package content from the npm registry, resolve locally." type = bool default = false } ================================================ FILE: modules/lambda-worker/versions.tf ================================================ # This module is based on the terraform-aws-lambda module: # https://github.com/terraform-aws-modules/terraform-aws-lambda # # See the LICENSE file in the directory of this module for more information. # # It simplifies the available options for configuration to match the needs of # this project. terraform { required_version = ">= 0.13" required_providers { aws = { source = "hashicorp/aws" version = ">= 3.0" } } } ================================================ FILE: modules/proxy/main.tf ================================================ module "proxy_package" { source = "milliHQ/download/npm" version = "2.1.0" module_name = "@millihq/terraform-next-proxy" module_version = var.proxy_module_version path_to_file = "dist.zip" use_local = var.debug_use_local_packages local_cwd = var.tf_next_module_root } ############# # Lambda@Edge ############# module "edge_proxy" { source = "terraform-aws-modules/lambda/aws" version = "3.1.0" lambda_at_edge = true function_name = "${var.deployment_name}_tfn-proxy" description = "Managed by Terraform Next.js" handler = "handler.handler" runtime = var.lambda_default_runtime role_permissions_boundary = var.lambda_role_permissions_boundary create_package = false local_existing_package = module.proxy_package.rel_path cloudwatch_logs_retention_in_days = 30 tags = var.tags providers = { aws = aws.global_region } } ================================================ FILE: modules/proxy/outputs.tf ================================================ ############# # Lambda@Edge ############# output "lambda_edge_arn" { value = module.edge_proxy.lambda_function_qualified_arn } ================================================ FILE: modules/proxy/variables.tf ================================================ ############# # Lambda@Edge ############# variable "proxy_module_version" { type = string default = "1.0.0-canary.5" } variable "lambda_default_runtime" { type = string default = "nodejs14.x" } variable "lambda_role_permissions_boundary" { type = string default = null } ########## # Labeling ########## variable "deployment_name" { type = string } variable "tags" { type = map(string) default = {} } ####### # Debug ####### variable "debug_use_local_packages" { type = bool default = false } variable "tf_next_module_root" { type = string } ================================================ FILE: modules/proxy/versions.tf ================================================ terraform { required_version = ">= 0.15" required_providers { aws = { source = "hashicorp/aws" version = ">= 3.0" configuration_aliases = [aws.global_region] } } } ================================================ FILE: modules/statics-deploy/main.tf ================================================ locals { manifest_key = "_tf-next/deployment.json" lambda_timeout = 60 } ######################## # Upload Bucket (zipped) ######################## resource "aws_s3_bucket" "static_upload" { bucket_prefix = "${var.deployment_name}-tfn-deploy" force_destroy = true tags = merge(var.tags, var.tags_s3_bucket) } resource "aws_s3_bucket_acl" "static_upload" { bucket = aws_s3_bucket.static_upload.id acl = "private" } resource "aws_s3_bucket_notification" "on_create" { bucket = aws_s3_bucket.static_upload.id lambda_function { lambda_function_arn = module.deploy_trigger.lambda_function_arn events = ["s3:ObjectCreated:*"] } } ######################### # Serve Bucket (unzipped) ######################### resource "aws_s3_bucket" "static_deploy" { bucket_prefix = "${var.deployment_name}-tfn-static" force_destroy = true tags = merge(var.tags, var.tags_s3_bucket) } resource "aws_s3_bucket_acl" "static_deploy" { bucket = aws_s3_bucket.static_deploy.id acl = "private" } # CloudFront permissions for the bucket resource "aws_cloudfront_origin_access_identity" "this" { comment = "S3 CloudFront access ${aws_s3_bucket.static_deploy.id}" } data "aws_iam_policy_document" "cf_access" { statement { actions = ["s3:GetObject"] resources = ["${aws_s3_bucket.static_deploy.arn}/*"] principals { type = "AWS" identifiers = [aws_cloudfront_origin_access_identity.this.iam_arn] } } # Do not expose the manifest to the public statement { effect = "Deny" actions = ["s3:GetObject"] resources = ["${aws_s3_bucket.static_deploy.arn}/${local.manifest_key}"] principals { type = "AWS" identifiers = [aws_cloudfront_origin_access_identity.this.iam_arn] } } } resource "aws_s3_bucket_policy" "origin_access" { bucket = aws_s3_bucket.static_deploy.id policy = data.aws_iam_policy_document.cf_access.json } ######## # Lambda ######## # TODO: Look into if it would be more sense to combine all policies here into # a single ressorce # # Lambda permissions for updating the static files bucket and to create # CloudFront invalidations # data "aws_iam_policy_document" "access_static_deploy" { statement { actions = [ "s3:ListBucket", "s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:GetObjectTagging", "s3:PutObjectTagging" ] resources = [ aws_s3_bucket.static_deploy.arn, "${aws_s3_bucket.static_deploy.arn}/*" ] } statement { actions = [ "cloudfront:CreateInvalidation" ] resources = [var.cloudfront_arn] } # Create new substacks from CDK templates statement { actions = [ "cloudformation:CreateStack" ] resources = ["*"] } # Allow to pass the cloudfront role to the cloudformation stack statement { actions = [ "iam:PassRole" ] resources = [var.cloudformation_role_arn] } } # # Lambda permission to download the zipped static uploads package # data "aws_iam_policy_document" "access_static_upload" { statement { actions = [ "s3:GetObject", "s3:GetObjectVersion", "s3:DeleteObject", "s3:DeleteObjectVersion" ] resources = ["${aws_s3_bucket.static_upload.arn}/*"] } } # Access the dynamoDB deployment table data "aws_iam_policy_document" "access_dynamodb_table_deployments" { statement { effect = "Allow" actions = [ "dynamodb:Query", "dynamodb:PutItem", "dynamodb:UpdateItem" ] resources = [ var.dynamodb_table_aliases_arn, var.dynamodb_table_deployments_arn ] } } # # Lambda permission to access the SQS queue # data "aws_iam_policy_document" "access_sqs_queue" { statement { actions = [ "sqs:ReceiveMessage", "sqs:DeleteMessage", "sqs:SendMessage", "sqs:GetQueueUrl", "sqs:GetQueueAttributes", "sqs:ChangeMessageVisibility", ] resources = [ aws_sqs_queue.this.arn ] } } module "lambda_content" { source = "milliHQ/download/npm" version = "2.1.0" module_name = "@millihq/terraform-next-deploy-trigger" module_version = var.deploy_trigger_module_version path_to_file = "dist.zip" use_local = var.debug_use_local_packages local_cwd = var.tf_next_module_root } module "deploy_trigger" { source = "terraform-aws-modules/lambda/aws" version = "3.1.0" function_name = "${var.deployment_name}_tfn-deploy" description = "Managed by Terraform Next.js" handler = "handler.handler" runtime = "nodejs14.x" memory_size = 1024 timeout = local.lambda_timeout publish = true tags = var.tags role_permissions_boundary = var.lambda_role_permissions_boundary create_package = false local_existing_package = module.lambda_content.rel_path cloudwatch_logs_retention_in_days = 14 allowed_triggers = { AllowExecutionFromS3Bucket = { service = "s3" source_arn = aws_s3_bucket.static_upload.arn } InvalidationQueue = { principal = "sqs.amazonaws.com" source_arn = aws_sns_topic.this.arn }, } attach_policy_jsons = true number_of_policy_jsons = 4 policy_jsons = [ data.aws_iam_policy_document.access_static_deploy.json, data.aws_iam_policy_document.access_static_upload.json, data.aws_iam_policy_document.access_sqs_queue.json, data.aws_iam_policy_document.access_dynamodb_table_deployments.json ] environment_variables = { NODE_ENV = "production" TARGET_BUCKET = aws_s3_bucket.static_deploy.id DISTRIBUTION_ID = var.cloudfront_id SQS_QUEUE_URL = aws_sqs_queue.this.id DEPLOY_STATUS_SNS_ARN = var.deploy_status_sns_topic_arn TABLE_REGION = var.dynamodb_region TABLE_NAME_ALIASES = var.dynamodb_table_aliases_name TABLE_NAME_DEPLOYMENTS = var.dynamodb_table_deployments_name CLOUDFORMATION_ROLE_ARN = var.cloudformation_role_arn # Remove the * from the base domain (e.g. *.example.com -> .example.com) MULTI_DEPLOYMENTS_BASE_DOMAIN = var.enable_multiple_deployments ? replace(var.multiple_deployments_base_domain, "/^\\*/", "") : null } event_source_mapping = { sqs_source = { batch_size = 10 # Maximum batch size for SQS event_source_arn = aws_sqs_queue.this.arn } } } ################################ # SQS Queue # (For CloudFront invalidations) ################################ resource "aws_sns_topic" "this" { name_prefix = var.deployment_name tags = var.tags } resource "aws_sqs_queue" "this" { name_prefix = var.deployment_name message_retention_seconds = var.sqs_message_retention_seconds receive_wait_time_seconds = var.sqs_receive_wait_time_seconds # SQS visibility_timeout_seconds must be >= lambda fn timeout, # aws reccomends at least 6 times the lambda # https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-queueconfig visibility_timeout_seconds = local.lambda_timeout * 6 tags = var.tags } resource "aws_sns_topic_subscription" "this" { topic_arn = aws_sns_topic.this.arn endpoint = aws_sqs_queue.this.arn protocol = "sqs" } data "aws_iam_policy_document" "sqs_queue" { statement { actions = [ "sqs:SendMessage", ] condition { test = "ArnEquals" variable = "aws:SourceArn" values = [ aws_sns_topic.this.arn, module.deploy_trigger.lambda_function_arn ] } principals { type = "AWS" identifiers = [ "*", ] } resources = [ module.deploy_trigger.lambda_function_arn, ] } } resource "aws_sqs_queue_policy" "this" { queue_url = aws_sqs_queue.this.id policy = data.aws_iam_policy_document.sqs_queue.json } ================================================ FILE: modules/statics-deploy/outputs.tf ================================================ output "static_bucket_access_identity" { value = aws_cloudfront_origin_access_identity.this.cloudfront_access_identity_path } output "static_bucket_endpoint" { value = aws_s3_bucket.static_deploy.bucket_regional_domain_name } output "static_bucket_id" { value = aws_s3_bucket.static_deploy.id } output "static_bucket_region" { value = aws_s3_bucket.static_deploy.region } output "static_bucket_arn" { value = aws_s3_bucket.static_deploy.arn } ############### # Upload Bucket ############### output "upload_bucket_id" { value = aws_s3_bucket.static_upload.id } output "upload_bucket_region" { value = aws_s3_bucket.static_upload.region } output "upload_bucket_arn" { value = aws_s3_bucket.static_upload.arn } ================================================ FILE: modules/statics-deploy/variables.tf ================================================ variable "deploy_trigger_module_version" { type = string default = "1.0.0-canary.5" } variable "cloudfront_id" { description = "The ID of the CloudFront distribution where the route invalidations should be sent to." type = string } variable "cloudfront_arn" { description = "The ARN of the CloudFront distribution where the route invalidations should be sent to." type = string } variable "lambda_role_permissions_boundary" { type = string default = null } ################ # CloudFormation ################ variable "cloudformation_role_arn" { description = "Role ARN that should be assigned to the CloudFormation substacks created by CDK." type = string } ###################### # Multiple deployments ###################### variable "enable_multiple_deployments" { type = bool } variable "multiple_deployments_base_domain" { type = string default = null } ##################### # Deployment database ##################### variable "dynamodb_region" { type = string } variable "dynamodb_table_aliases_arn" { type = string } variable "dynamodb_table_aliases_name" { type = string } variable "dynamodb_table_deployments_arn" { type = string } variable "dynamodb_table_deployments_name" { type = string } ##### # SNS ##### variable "deploy_status_sns_topic_arn" { description = "ARN of the SNS topic where CloudFormation status changes should be sent to." type = string } ########### # SQS Queue ########### variable "sqs_message_retention_seconds" { type = number default = 86400 } variable "sqs_receive_wait_time_seconds" { type = number default = 10 } ########## # Labeling ########## variable "deployment_name" { type = string } variable "tags" { type = map(string) default = {} } variable "tags_s3_bucket" { type = map(string) default = {} } ####### # Debug ####### variable "debug_use_local_packages" { type = bool default = false } variable "tf_next_module_root" { type = string } ================================================ FILE: modules/statics-deploy/versions.tf ================================================ terraform { required_version = ">= 0.13" required_providers { aws = { source = "hashicorp/aws" version = ">= 3.0" } } } ================================================ FILE: outputs.tf ================================================ output "upload_bucket_id" { value = module.statics_deploy.upload_bucket_id } output "api_endpoint" { description = "API endpoint that is used by the CLI." value = module.api.api_endpoint } output "api_endpoint_access_policy_arn" { description = "ARN of the policy that grants access to the API endpoint." value = module.api.api_endpoint_access_policy_arn } ################################## # Internal CloudFront distribution ################################## output "cloudfront_domain_name" { description = "Domain of the main CloudFront distribution (When created)." value = var.cloudfront_create_distribution ? module.cloudfront_main[0].cloudfront_domain_name : null } output "cloudfront_hosted_zone_id" { description = "Zone id of the main CloudFront distribution (When created)." value = var.cloudfront_create_distribution ? module.cloudfront_main[0].cloudfront_hosted_zone_id : null } ################################## # External CloudFront distribution ################################## output "cloudfront_default_root_object" { description = "Preconfigured root object the CloudFront distribution should use." value = local.cloudfront_default_root_object } output "cloudfront_default_cache_behavior" { description = "Preconfigured default cache behavior the CloudFront distribution should use." value = local.cloudfront_default_behavior } output "cloudfront_ordered_cache_behaviors" { description = "Preconfigured ordered cache behaviors the CloudFront distribution should use." value = local.cloudfront_ordered_cache_behaviors } output "cloudfront_origins" { description = "Preconfigured origins the CloudFront distribution should use." value = local.cloudfront_origins } output "cloudfront_custom_error_response" { description = "Preconfigured custom error response the CloudFront distribution should use." value = local.cloudfront_custom_error_response } ================================================ FILE: package.json ================================================ { "name": "@dealmore/terraform-aws-nextjs-ws", "version": "1.0.0-canary.5", "private": true, "license": "Apache-2.0", "workspaces": [ "packages/*" ], "scripts": { "build": "turbo run build", "test:prepare": "docker-compose up -d", "test:runtime": "jest packages/runtime/**", "test:not:runtime": "jest packages/** --testPathIgnorePatterns \"packages/runtime\"", "test": "jest packages/**", "test:e2e:prepare": "node test/build-fixtures.js", "test:e2e": "jest test/routes.test.ts", "release": "release-it --no-npm", "release:ci": "release-it --no-increment --no-git.push --ci", "postinstall": "patch-package" }, "devDependencies": { "@millihq/sammy": "^2.0.1", "@ofhouse/keep-a-changelog": "2.3.0-no-increment-fix", "@release-it/bumper": "^3.0.1", "@tsconfig/node14": "^1.0.1", "@types/aws-lambda": "^8.10.76", "@types/hjson": "^2.4.2", "@types/jest": "^27.0.2", "@types/node": "^14.0.0", "aws-sdk": "*", "dotenv": "^8.2.0", "fs-extra": "^9.1.0", "hjson": "^3.2.2", "jest": "*", "postinstall-postinstall": "^2.1.0", "prettier": "^2.6.2", "release-it": "^14.12.3", "release-it-yarn-workspaces": "^2.0.1", "tmp": "^0.2.1", "ts-jest": "*", "turbo": "^1.2.4", "typescript": "*" }, "resolutions": { "@types/aws-lambda": "^8.10.95", "@vercel/ncc": "^0.33.4", "archiver": "^5.3.0", "aws-sdk": "2.1001.0", "jest": "27.2.1", "ts-jest": "27.0.5", "typescript": "4.6.4" }, "release-it": { "git": { "commitMessage": "v${version}", "tagName": "packages-v${version}" }, "npm": false, "plugins": { "release-it-yarn-workspaces": true, "@release-it/bumper": { "out": [ { "file": "modules/api/variables.tf", "type": "text/plain" }, { "file": "modules/cloudfront-proxy-config/variables.tf", "type": "text/plain" }, { "file": "modules/deploy-controller/variables.tf", "type": "text/plain" }, { "file": "modules/proxy/variables.tf", "type": "text/plain" }, { "file": "modules/statics-deploy/variables.tf", "type": "text/plain" }, { "file": "examples/*/main.tf", "type": "text/plain" } ] }, "@ofhouse/keep-a-changelog": { "filename": "CHANGELOG.md", "addUnreleased": true } } } } ================================================ FILE: packages/api/.gitignore ================================================ # Build output dist dist.zip ================================================ FILE: packages/api/jest.config.js ================================================ /** @type {import('ts-jest').InitialOptionsTsJest} */ module.exports = { preset: 'ts-jest', testEnvironment: 'node', rootDir: './', }; ================================================ FILE: packages/api/ncc.config.json ================================================ { "externals": { "aws-sdk": "aws-sdk", "/^aws-sdk(/.*)/": "aws-sdk$1" }, "minify": true } ================================================ FILE: packages/api/package.json ================================================ { "name": "@millihq/terraform-next-api", "version": "1.0.0-canary.5", "scripts": { "generate:schema": "openapi-typescript schema.yaml --output schema.ts --prettier-config ../../.prettier.config.js", "build": "ncc-zip build -f handler --license third-party-licenses.txt src/handler.ts", "prepack": "cp dist/third-party-licenses.txt ../../LICENSE ./", "postpack": "rm ./LICENSE ./third-party-licenses.txt" }, "dependencies": { "@millihq/tfn-dynamodb-actions": "1.0.0-canary.5", "aws-sdk": "*", "class-validator": "^0.13.2", "lambda-api": "^0.11.2" }, "devDependencies": { "@types/aws-lambda": "*", "@types/validator": "^13.0.0", "@vercel/ncc": "*", "jest": "*", "ncc-zip": "^2.1.0", "openapi-typescript": "^5.3.0", "ts-jest": "*", "typescript": "*" }, "files": [ "dist.zip", "third-party-licenses.txt" ] } ================================================ FILE: packages/api/schema.ts ================================================ /** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ export interface paths { '/aliases': { get: { parameters: { query: { /** Only list aliases that are associated with the specified deployment. */ deploymentId: string; /** Beginning index from where to get the aliases. */ startAt?: string; }; }; responses: { /** Successful response. */ 200: { content: { 'application/json': { metadata: components['schemas']['Pagination']; items: components['schemas']['Alias'][]; }; }; }; 400: components['responses']['InvalidParamsError']; 404: components['responses']['NotFound']; }; }; post: { responses: { /** Successful response. */ 201: { content: { 'application/json': components['schemas']['Alias']; }; }; 400: components['responses']['InvalidParamsError']; }; /** Request payload. */ requestBody: { content: { 'application/json': { alias: string; target: string; override?: boolean; }; }; }; }; }; '/aliases/{hostname}/{basePath}': { delete: { parameters: { path: { /** The hostname of the alias that should be deleted. */ hostname: string; /** The basePath of the alias that should be deleted. If not present, defaults to `/`. */ basePath?: string; }; }; responses: { /** Successful response. */ 204: never; 400: components['responses']['InvalidParamsError']; 404: components['responses']['NotFound']; }; }; }; '/deployments': { get: { parameters: { query: { /** Beginning index from where to get the deployments. */ startAt?: string; }; }; responses: { /** Successful response. */ 200: { content: { 'application/json': { metadata: components['schemas']['Pagination']; items: components['schemas']['Deployment'][]; }; }; }; }; }; post: { responses: { /** Successful response. */ 201: { content: { 'application/json': components['schemas']['DeploymentInitialized']; }; }; }; }; }; '/deployments/{deploymentId}': { get: { parameters: { path: { /** The id of the deployment to get. */ deploymentId: string; }; }; responses: { /** Successful response. */ 200: { content: { 'application/json': components['schemas']['Deployment']; }; }; 404: components['responses']['NotFound']; }; }; delete: { parameters: { path: { /** The id of the deployment to delete. */ deploymentId: string; }; }; responses: { /** Deletion successfully requested. */ 200: { content: { 'application/json': components['schemas']['Deployment']; }; }; /** Successful deletion. */ 204: never; 400: components['responses']['InvalidParamsError']; }; }; }; } export interface components { schemas: { Error: { status: number; code: string; message?: string; }; Pagination: { next: string | null; }; Alias: { id: string; deployment: string; createDate: string; }; /** @enum {string} */ DeploymentStatus: | 'INITIALIZED' | 'CREATE_IN_PROGRESS' | 'CREATE_COMPLETE' | 'CREATE_FAILED' | 'FINISHED' | 'DESTROY_IN_PROGRESS' | 'DESTROY_FAILED' | 'DESTROY_REQUESTED'; DeploymentInitialized: { id: string; status: components['schemas']['DeploymentStatus']; uploadUrl: string; uploadAttributes: { [key: string]: unknown }; }; Deployment: { id: string; status: components['schemas']['DeploymentStatus']; /** Format: date-time */ createDate: string; deploymentAlias?: string; }; }; responses: { /** The specified resource was not found. */ NotFound: { content: { 'application/json': components['schemas']['Error']; }; }; /** The validation of the parameters failed. */ InvalidParamsError: { content: { 'application/json': components['schemas']['Error']; }; }; }; } export interface operations {} export interface external {} ================================================ FILE: packages/api/schema.yaml ================================================ # OpenAPI 3.0 schema for the API endpoints openapi: 3.1.0 info: title: MilliVolt deployment API version: 1.0.0 components: securitySchemes: sigv4: type: apiKey in: header name: Authorization 'x-amazon-apigateway-authtype': 'awsSigv4' schemas: # Utilities Error: type: object properties: status: type: number code: type: string message: type: string required: - status - code Pagination: type: object properties: next: type: string nullable: true required: - next # Entities Alias: type: object properties: id: type: string deployment: type: string createDate: type: string required: - id - deployment - createDate DeploymentStatus: type: string enum: - INITIALIZED - CREATE_IN_PROGRESS - CREATE_COMPLETE - CREATE_FAILED - FINISHED - DESTROY_IN_PROGRESS - DESTROY_FAILED - DESTROY_REQUESTED DeploymentInitialized: type: object properties: id: type: string status: $ref: '#/components/schemas/DeploymentStatus' uploadUrl: type: string uploadAttributes: type: object required: - id - status - uploadUrl - uploadAttributes Deployment: type: object properties: id: type: string status: $ref: '#/components/schemas/DeploymentStatus' createDate: type: string format: date-time deploymentAlias: type: string required: - id - status - createDate responses: NotFound: description: The specified resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error' InvalidParamsError: description: The validation of the parameters failed. content: application/json: schema: $ref: '#/components/schemas/Error' security: - sigv4: [] paths: /aliases: get: summary: List all aliases associated with a given deployment, sorted by its creation date DESC. parameters: - in: query name: deploymentId schema: type: string required: true description: Only list aliases that are associated with the specified deployment. - in: query name: startAt schema: type: string description: Beginning index from where to get the aliases. responses: '200': description: Successful response. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/Pagination' items: type: array items: $ref: '#/components/schemas/Alias' required: - metadata - items '404': $ref: '#/components/responses/NotFound' '400': $ref: '#/components/responses/InvalidParamsError' post: summary: Create a new alias or update an existing alias. requestBody: description: Request payload. required: true content: application/json: schema: type: object properties: alias: type: string target: type: string override: type: boolean required: - alias - target responses: '201': description: Successful response. content: application/json: schema: $ref: '#/components/schemas/Alias' '400': $ref: '#/components/responses/InvalidParamsError' /aliases/{hostname}/{basePath}: delete: summary: Request a deployment by its Id. parameters: - in: path name: hostname schema: type: string required: true description: The hostname of the alias that should be deleted. - in: path name: basePath schema: type: string description: The basePath of the alias that should be deleted. If not present, defaults to `/`. responses: '204': description: Successful response. '400': $ref: '#/components/responses/InvalidParamsError' '404': $ref: '#/components/responses/NotFound' /deployments: get: summary: List all deployments sorted by its creation date DESC. parameters: - in: query name: startAt schema: type: string description: Beginning index from where to get the deployments. responses: '200': description: Successful response. content: application/json: schema: type: object properties: metadata: $ref: '#/components/schemas/Pagination' items: type: array items: $ref: '#/components/schemas/Deployment' required: - metadata - items post: summary: Initializes a new deployment and creates a upload link where the deployment package can be uploaded to. responses: '201': description: Successful response. content: application/json: schema: $ref: '#/components/schemas/DeploymentInitialized' /deployments/{deploymentId}: get: summary: Request a deployment by its Id. parameters: - in: path name: deploymentId schema: type: string required: true description: The id of the deployment to get. responses: '200': description: Successful response. content: application/json: schema: $ref: '#/components/schemas/Deployment' '404': $ref: '#/components/responses/NotFound' delete: summary: Delete a single deployment by its Id. parameters: - in: path name: deploymentId schema: type: string required: true description: The id of the deployment to delete. responses: '200': description: Deletion successfully requested. content: application/json: schema: $ref: '#/components/schemas/Deployment' '204': description: Successful deletion. '400': $ref: '#/components/responses/InvalidParamsError' ================================================ FILE: packages/api/src/actions/alias/alias-utils.ts ================================================ import { reverseHostname } from '@millihq/tfn-dynamodb-actions'; import Validator from 'validator'; type LikeRouteItem = { HostnameRev: string; BasePath: string; }; /** * Generates a id from the alias object that can be returned from the REST API. * @param routeItem * @returns */ function generateAliasId(routeItem: T) { return reverseHostname(routeItem.HostnameRev) + routeItem.BasePath; } /** * Options that can be passed into the isUrl() validator to check the hostname * of an alias for correctness. */ const hostnameValidationOptions: Validator.IsURLOptions = { require_host: true, allow_query_components: false, require_valid_protocol: true, protocols: [], disallow_auth: true, }; export { generateAliasId, hostnameValidationOptions }; ================================================ FILE: packages/api/src/actions/alias/create-or-update-alias.ts ================================================ import { URL } from 'url'; import { getAliasById, getDeploymentById, createAlias, reverseHostname, } from '@millihq/tfn-dynamodb-actions'; import { IsOptional, Length, validate, IsUrl, isURL } from 'class-validator'; import { Request, Response } from 'lambda-api'; import { paths } from '../../../schema'; import { DynamoDBServiceType } from '../../services/dynamodb'; import { generateAliasId, hostnameValidationOptions } from './alias-utils'; type SuccessResponse = paths['/aliases']['post']['responses']['201']['content']['application/json']; type ErrorResponse = paths['/aliases']['post']['responses']['400']['content']['application/json']; class CreateOrUpdateAliasPayload { /** * The alias name that should be created. * Consists of hostname and basePath, e.g. example.com/ */ @IsUrl(hostnameValidationOptions) alias: string; /** * deploymentId or alias (other customDomain) */ @Length(1) target: string; /** * When set the alias gets overridden, when it already exists. * An exception from it are the deployment aliases, which cannot be deleted or * overridden. */ @IsOptional() override?: boolean; } async function createOrUpdateAlias( req: Request, res: Response ): Promise { const dynamoDB = req.namespace.dynamoDB as DynamoDBServiceType; const { body: requestBody = {} } = req; // Validate requestBody const payload = new CreateOrUpdateAliasPayload(); payload.alias = requestBody.alias; payload.target = requestBody.target; payload.override = requestBody.override; const payloadErrors = await validate(payload); if (payloadErrors.length > 0) { const errorResponse: ErrorResponse = { code: 'INVALID_PARAMS', status: 400, message: payloadErrors.toString(), }; return res.status(400).json(errorResponse); } // URL always requires a protocol const aliasToCreateUrl = new URL(`http://${payload.alias}`); const aliasToCreateHostname = aliasToCreateUrl.hostname; const aliasToCreateHostnameRev = reverseHostname(aliasToCreateHostname); const aliasToCreateBasePath = aliasToCreateUrl.pathname; // Check if the target is an alias or an deployment-id let targetDeploymentId: string; const targetIsDeploymentId = payload.target.indexOf('.') === -1; if (!targetIsDeploymentId) { // Check if the target is an URL if (!isURL(payload.target, hostnameValidationOptions)) { const errorResponse: ErrorResponse = { code: 'INVALID_PARAMS', status: 400, message: 'Parameter target is not a valid alias.', }; return res.status(400).json(errorResponse); } // URL always requires a protocol const aliasTargetUrl = new URL(`http://${payload.target}`); const aliasTargetHostnameRev = reverseHostname(aliasTargetUrl.hostname); // Target is another alias, get the deployment ID from the alias first const targetAlias = await getAliasById({ dynamoDBClient: dynamoDB.getDynamoDBClient(), aliasTableName: dynamoDB.getAliasTableName(), hostnameRev: aliasTargetHostnameRev, basePath: aliasTargetUrl.pathname, }); if (!targetAlias) { const errorResponse: ErrorResponse = { code: 'INVALID_ALIAS', status: 400, message: `Alias target ${payload.target} does not exist.`, }; return res.status(400).json(errorResponse); } targetDeploymentId = targetAlias.DeploymentId; } else { targetDeploymentId = payload.target; } // Get the target deployment const targetDeployment = await getDeploymentById({ dynamoDBClient: dynamoDB.getDynamoDBClient(), deploymentTableName: dynamoDB.getDeploymentTableName(), deploymentId: targetDeploymentId, }); if (!targetDeployment) { const errorResponse: ErrorResponse = { code: 'INVALID_DEPLOYMENT_ID', status: 400, message: `Deployment with id ${targetDeploymentId} does not exist.`, }; return res.status(400).json(errorResponse); } // Check if the alias already exists const maybeExistingAlias = await getAliasById({ dynamoDBClient: dynamoDB.getDynamoDBClient(), aliasTableName: dynamoDB.getAliasTableName(), hostnameRev: aliasToCreateHostnameRev, basePath: aliasToCreateBasePath, }); if (maybeExistingAlias) { if (maybeExistingAlias.DeploymentAlias === true) { const errorResponse: ErrorResponse = { code: 'DEPLOYMENT_ALIAS', status: 400, message: `Cannot override existing alias ${payload.alias} because it is a deployment alias that cannot be changed.`, }; return res.status(400).json(errorResponse); } // If override option is not set explicit, fail if (!payload.override) { const errorResponse: ErrorResponse = { code: 'ALIAS_OVERRIDE_NOT_ALLOWED', status: 400, message: `Cannot override existing alias ${payload.alias} because override flag is not set.`, }; return res.status(400).json(errorResponse); } } // Create the new alias const createdAlias = await createAlias({ dynamoDBClient: dynamoDB.getDynamoDBClient(), aliasTableName: dynamoDB.getAliasTableName(), hostnameRev: aliasToCreateHostnameRev, deploymentId: targetDeploymentId, lambdaRoutes: targetDeployment.LambdaRoutes, prerenders: targetDeployment.Prerenders, routes: targetDeployment.Routes, }); res.status(201); return { id: generateAliasId(createdAlias), deployment: createdAlias.DeploymentId, createDate: createdAlias.CreateDate, }; } export { createOrUpdateAlias }; ================================================ FILE: packages/api/src/actions/alias/delete-alias-by-id.ts ================================================ import { deleteAliasById as dynamoDeleteAliasById, getAliasById, reverseHostname, } from '@millihq/tfn-dynamodb-actions'; import { validate, IsUrl, IsOptional } from 'class-validator'; import { Request, Response } from 'lambda-api'; import { paths } from '../../../schema'; import { DynamoDBServiceType } from '../../services/dynamodb'; import { hostnameValidationOptions } from './alias-utils'; type ErrorResponse = paths['/aliases/{hostname}/{basePath}']['delete']['responses']['400']['content']['application/json']; type NotFoundResponse = paths['/aliases/{hostname}/{basePath}']['delete']['responses']['404']['content']['application/json']; class DeleteAliasRequestParams { /** * The hostname of the alias that should be removed. */ @IsUrl(hostnameValidationOptions) hostname: string; /** * The basePath of the alias that should be removed. */ @IsOptional() basePath: string = '/'; } async function deleteAliasById(req: Request, res: Response) { const { params: requestParams = {} } = req; const validatedRequestParams = new DeleteAliasRequestParams(); if (requestParams.hostname) { validatedRequestParams.hostname = requestParams.hostname; } if (requestParams.basePath) { validatedRequestParams.basePath = `/${requestParams.basePath}`; } const requestBodyErrors = await validate(validatedRequestParams); if (requestBodyErrors.length > 0) { const errorResponse: ErrorResponse = { code: 'INVALID_PARAMS', status: 400, message: requestBodyErrors.toString(), }; return res.status(400).json(errorResponse); } const dynamoDB = req.namespace.dynamoDB as DynamoDBServiceType; const aliasToDeleteHostnameRev = reverseHostname( validatedRequestParams.hostname ); // Check if the alias is protected (deployment alias) const dbAlias = await getAliasById({ dynamoDBClient: dynamoDB.getDynamoDBClient(), aliasTableName: dynamoDB.getAliasTableName(), hostnameRev: aliasToDeleteHostnameRev, basePath: validatedRequestParams.basePath, }); if (!dbAlias) { const errorResponse: NotFoundResponse = { code: 'ALIAS_NOT_FOUND', status: 404, message: 'The requested alias does not exist.', }; return res.status(404).json(errorResponse); } if (dbAlias.DeploymentAlias === true) { const errorResponse: ErrorResponse = { code: 'DEPLOYMENT_ALIAS', status: 400, message: 'Requested alias cannot be deleted since it is a deployment alias. Can only be deleted when the deployment gets deleted.', }; return res.status(400).json(errorResponse); } await dynamoDeleteAliasById({ dynamoDBClient: dynamoDB.getDynamoDBClient(), aliasTableName: dynamoDB.getAliasTableName(), SK: dbAlias.SK, }); res.sendStatus(204); } export { deleteAliasById }; ================================================ FILE: packages/api/src/actions/alias/list-aliases.ts ================================================ import { getDeploymentById, listAliasesForDeployment, } from '@millihq/tfn-dynamodb-actions'; import { Request, Response } from 'lambda-api'; import { paths } from '../../../schema'; import { DynamoDBServiceType } from '../../services/dynamodb'; import { generateAliasId } from './alias-utils'; type NotFoundResponse = paths['/aliases']['get']['responses']['404']['content']['application/json']; type ErrorResponse = paths['/aliases']['get']['responses']['400']['content']['application/json']; type SuccessResponse = paths['/aliases']['get']['responses']['200']['content']['application/json']; /** * The amount of items that should be fetched with each query */ const PAGE_LIMIT = 25; const START_AT_KEY_SPLIT_CHAR = '#'; async function listAliases( req: Request, res: Response ): Promise { const { deploymentId, startAt } = req.query; let startKey: | { hostnameRev: string; basePath: string; deploymentId: string; createDate: string; } | undefined; if (typeof deploymentId !== 'string') { res.status(400); return { code: 'INVALID_PARAMS', status: 400, message: 'Required parameter deploymentId is invalid or missing.', }; } if (typeof startAt === 'string') { const [hostnameRev, basePath, deploymentId, createDate] = startAt.split( START_AT_KEY_SPLIT_CHAR ); if (hostnameRev && basePath && deploymentId && createDate) { startKey = { hostnameRev, basePath, deploymentId, createDate }; } } const dynamoDB = req.namespace.dynamoDB as DynamoDBServiceType; // Check if the deployment exists const deployment = await getDeploymentById({ dynamoDBClient: dynamoDB.getDynamoDBClient(), deploymentTableName: dynamoDB.getDeploymentTableName(), deploymentId, }); if (!deployment) { const notFoundResponse: NotFoundResponse = { code: 'DEPLOYMENT_NOT_FOUND', status: 404, message: 'Deployment does not exist.', }; res.sendStatus(404); return notFoundResponse; } const { meta, items } = await listAliasesForDeployment({ dynamoDBClient: dynamoDB.getDynamoDBClient(), aliasTableName: dynamoDB.getAliasTableName(), limit: PAGE_LIMIT, deploymentId: deployment.DeploymentId, startKey, }); let nextKey: string | null = null; if (meta.lastKey) { nextKey = [ meta.lastKey.hostnameRev, meta.lastKey.basePath, meta.lastKey.deploymentId, meta.lastKey.createDate, ].join(START_AT_KEY_SPLIT_CHAR); } return { metadata: { next: nextKey, }, items: items.map((alias) => { return { id: generateAliasId(alias), deployment: alias.DeploymentId, createDate: alias.CreateDate, }; }), }; } export { listAliases }; ================================================ FILE: packages/api/src/actions/deployment/create-deployment.ts ================================================ import { pseudoRandomBytes } from 'crypto'; import { createDeployment as dynamoDBCreateDeployment } from '@millihq/tfn-dynamodb-actions'; import { Request, Response } from 'lambda-api'; import { paths } from '../../../schema'; import { S3ServiceType } from '../../services/s3'; import { DynamoDBServiceType } from '../../services/dynamodb'; type SuccessResponse = paths['/deployments']['post']['responses']['201']['content']['application/json']; const UPLOAD_LINK_EXPIRES_SECONDS = 60 * 5; // S3 Metadata Key where the deployment is stored const DEPLOYMENT_ID_META_KEY = 'x-amz-meta-tf-next-deployment-id'; export function generateRandomDeploymentId() { return pseudoRandomBytes(16).toString('hex'); } async function createDeployment( req: Request, res: Response ): Promise { const s3Service = req.namespace.s3 as S3ServiceType; const dynamoDB = req.namespace.dynamoDB as DynamoDBServiceType; const s3Client = s3Service.getS3Client(); const deploymentId = generateRandomDeploymentId(); const deployment = await dynamoDBCreateDeployment({ deploymentId, dynamoDBClient: dynamoDB.getDynamoDBClient(), deploymentTableName: dynamoDB.getDeploymentTableName(), createDate: new Date(), }); const { url, fields } = s3Client.createPresignedPost({ Bucket: s3Service.getUploadBucketName(), Fields: { key: `${deploymentId}.zip`, 'Content-Type': 'application/zip', [DEPLOYMENT_ID_META_KEY]: deploymentId, }, Expires: UPLOAD_LINK_EXPIRES_SECONDS, }); res.status(201); return { id: deploymentId, uploadUrl: url, uploadAttributes: fields, status: deployment.Status, }; } export { createDeployment }; ================================================ FILE: packages/api/src/actions/deployment/delete-deployment-by-id.ts ================================================ import { Request, Response } from 'lambda-api'; import { listAliasesForDeployment, getDeploymentById, deleteDeploymentById as dynamoDBdeleteDeploymentById, deleteAliasById, updateDeploymentStatusDestroyRequested, } from '@millihq/tfn-dynamodb-actions'; import { paths } from '../../../schema'; import { DynamoDBServiceType } from '../../services/dynamodb'; import { CloudFormationServiceType } from '../../services/cloudformation'; import { deploymentDefaultSerializer } from '../../serializers/deployment'; type SuccessResponse = paths['/deployments/{deploymentId}']['delete']['responses']['200']['content']['application/json']; type ErrorResponse = paths['/deployments/{deploymentId}']['delete']['responses']['400']['content']['application/json']; const RESPONSE_DEPLOYMENT_DELETION_FAILED: ErrorResponse = { code: 'DEPLOYMENT_DELETION_FAILED', status: 400, message: 'The deployment with the provided id could not be deleted.', }; async function deleteDeploymentById( req: Request, res: Response ): Promise { const cloudFormationService = req.namespace .cloudFormation as CloudFormationServiceType; const dynamoDB = req.namespace.dynamoDB as DynamoDBServiceType; const deploymentId = req.params.deploymentId; if (typeof deploymentId !== 'string') { const paramsErrorResponse: ErrorResponse = { code: 'INVALID_PARAMS', status: 400, message: 'The deploymentId provided is invalid.', }; return res.status(400).json(paramsErrorResponse); } // Check if the deployment has aliases const aliases = await listAliasesForDeployment({ dynamoDBClient: dynamoDB.getDynamoDBClient(), aliasTableName: dynamoDB.getAliasTableName(), deploymentId, }); // Check if an alias is present that is not the deploymentAlias const hasDeploymentAliasOnly = !aliases.items.some((alias) => { return alias.DeploymentAlias === false; }); // When it only has a deployment alias the length of the returned aliases // should be 1. // However for the case that the alias was already deleted in the past and the // deployment still exists we also allow 0 aliases. if (!hasDeploymentAliasOnly || aliases.items.length > 1) { const errorResponse: ErrorResponse = { code: 'ALIASES_ASSOCIATED', status: 400, message: 'The deployment cannot be removed because it has custom aliases associated with it. Remove the aliases first before deleting the deployment.', }; return res.status(400).json(errorResponse); } // Check the status of the deployment const deployment = await getDeploymentById({ dynamoDBClient: dynamoDB.getDynamoDBClient(), deploymentTableName: dynamoDB.getDeploymentTableName(), deploymentId, }); if (!deployment) { const errorResponse: ErrorResponse = { code: 'NOT_FOUND', status: 404, message: 'The deployment with the provided id does not exist.', }; return res.status(404).json(errorResponse); } switch (deployment.Status) { /** * If the deployment is in one of the following status, it can be deleted from * the database without handling CloudFormation stack deletion. */ case 'INITIALIZED': { const deleteResponse = await dynamoDBdeleteDeploymentById({ dynamoDBClient: dynamoDB.getDynamoDBClient(), deploymentTableName: dynamoDB.getDeploymentTableName(), deploymentId: { PK: deployment.PK, SK: deployment.SK, }, }); if (!deleteResponse) { return res.status(400).json(RESPONSE_DEPLOYMENT_DELETION_FAILED); } return res.sendStatus(204); } /** * If the deployment has one of the following status, a CloudFormation stack * deletion should be triggered, the deployment is then removed from the * database by the deployment controller. */ case 'CREATE_FAILED': case 'FINISHED': // Delete aliases const deploymentAlias = aliases.items[0]; if (deploymentAlias) { await deleteAliasById({ dynamoDBClient: dynamoDB.getDynamoDBClient(), aliasTableName: dynamoDB.getAliasTableName(), SK: deploymentAlias.SK, }); } // Trigger stack deletion if (deployment.CFStack) { const updatedDeployment = await updateDeploymentStatusDestroyRequested({ dynamoDBClient: dynamoDB.getDynamoDBClient(), deploymentTableName: dynamoDB.getDeploymentTableName(), deploymentId: { PK: deployment.PK, SK: deployment.SK, }, }); await cloudFormationService.deleteStack(deployment.CFStack); // Deployment status is updated by deployment-controller when // CloudFormation triggers a `DELETE_IN_PROGRESS` event on the stack res.status(200); return deploymentDefaultSerializer(updatedDeployment); } // No CloudFormation Stack present, so we can delete it from the database const deleteResponse = await dynamoDBdeleteDeploymentById({ dynamoDBClient: dynamoDB.getDynamoDBClient(), deploymentTableName: dynamoDB.getDeploymentTableName(), deploymentId: { PK: deployment.PK, SK: deployment.SK, }, }); if (!deleteResponse) { return res.status(400).json(RESPONSE_DEPLOYMENT_DELETION_FAILED); } return res.sendStatus(204); case 'DESTROY_REQUESTED': case 'DESTROY_IN_PROGRESS': { const errorResponse: ErrorResponse = { code: 'DEPLOYMENT_DESTROY_IN_PROGRESS', status: 400, message: 'The deployment is currently being deleted.', }; return res.status(400).json(errorResponse); } default: { const errorResponse: ErrorResponse = { code: 'DEPLOYMENT_DRIFT', status: 400, message: 'The deployment is currently in a drift status. Please contact your administrator to resolve this.', }; res.status(400).json(errorResponse); } } } export { deleteDeploymentById }; ================================================ FILE: packages/api/src/actions/deployment/get-deployment-by-id.ts ================================================ import { getDeploymentById as dynamoDBgetDeploymentById } from '@millihq/tfn-dynamodb-actions'; import { Request, Response } from 'lambda-api'; import { paths } from '../../../schema'; import { deploymentDefaultSerializer } from '../../serializers/deployment'; import { DynamoDBServiceType } from '../../services/dynamodb'; type SuccessResponse = paths['/deployments/{deploymentId}']['get']['responses']['200']['content']['application/json']; type NotFoundResponse = paths['/deployments/{deploymentId}']['get']['responses']['404']['content']['application/json']; async function getDeploymentById( req: Request, res: Response ): Promise { const dynamoDB = req.namespace.dynamoDB as DynamoDBServiceType; const deploymentId = req.params.deploymentId; if (!deploymentId) { throw new Error('Could not get deploymentId from path'); } const deployment = await dynamoDBgetDeploymentById({ dynamoDBClient: dynamoDB.getDynamoDBClient(), deploymentTableName: dynamoDB.getDeploymentTableName(), deploymentId, }); if (!deployment) { res.status(404); return { status: 404, code: 'DEPLOYMENT_NOT_FOUND', message: `Deployment with id "${deploymentId}" does not exist.`, }; } return deploymentDefaultSerializer(deployment); } export { getDeploymentById }; ================================================ FILE: packages/api/src/actions/deployment/list-deployments.ts ================================================ import { listDeployments as dynamoDBlistDeployments } from '@millihq/tfn-dynamodb-actions'; import { Request, Response } from 'lambda-api'; import { paths } from '../../../schema'; import { deploymentDefaultSerializer } from '../../serializers/deployment'; import { DynamoDBServiceType } from '../../services/dynamodb'; /** * The amount of items that should be fetched with each query */ const PAGE_LIMIT = 25; const START_AT_KEY_SPLIT_CHAR = '#'; type SuccessResponse = paths['/deployments']['get']['responses']['200']['content']['application/json']; async function listDeployments( req: Request, _res: Response ): Promise { /** * StartAt is a combined index key of the form: deploymentId#CreateDate that * needs to be splitted at the character `#`. */ const { startAt } = req.query; let startAtDeploymentId: string | undefined; let startAtCreateDate: string | undefined; if (typeof startAt === 'string') { const splittedStartKey = startAt.split(START_AT_KEY_SPLIT_CHAR); startAtDeploymentId = splittedStartKey[0]; startAtCreateDate = splittedStartKey[1]; } const dynamoDB = req.namespace.dynamoDB as DynamoDBServiceType; const { meta, items } = await dynamoDBlistDeployments({ dynamoDBClient: dynamoDB.getDynamoDBClient(), deploymentTableName: dynamoDB.getDeploymentTableName(), limit: PAGE_LIMIT, startKey: startAtDeploymentId && startAtCreateDate ? { deploymentId: startAtDeploymentId, createDate: startAtCreateDate, } : undefined, }); let nextKey: string | null = null; if (meta.lastKey) { nextKey = meta.lastKey.deploymentId + START_AT_KEY_SPLIT_CHAR + meta.lastKey.createDate; } return { metadata: { next: nextKey, }, items: items.map(deploymentDefaultSerializer), }; } export { listDeployments }; ================================================ FILE: packages/api/src/api.ts ================================================ import LambdaApi, { ErrorHandlingMiddleware } from 'lambda-api'; import { createOrUpdateAlias } from './actions/alias/create-or-update-alias'; import { deleteAliasById } from './actions/alias/delete-alias-by-id'; import { listAliases } from './actions/alias/list-aliases'; import { getDeploymentById } from './actions/deployment/get-deployment-by-id'; import { deleteDeploymentById } from './actions/deployment/delete-deployment-by-id'; import { createDeployment } from './actions/deployment/create-deployment'; import { listDeployments } from './actions/deployment/list-deployments'; import { CloudFormationService } from './services/cloudformation'; import { DynamoDBService } from './services/dynamodb'; import { S3Service } from './services/s3'; function createApi() { const api = LambdaApi(); api.app('cloudFormation', CloudFormationService); api.app('dynamoDB', DynamoDBService); api.app('s3', S3Service); // aliases api.delete('/aliases/:hostname/:basePath', deleteAliasById); api.delete('/aliases/:hostname', deleteAliasById); api.get('/aliases', listAliases); api.post('/aliases', createOrUpdateAlias); // deployments api.get('/deployments/:deploymentId', getDeploymentById); api.delete('/deployments/:deploymentId', deleteDeploymentById); api.get('/deployments', listDeployments); api.post('/deployments', createDeployment); // Since all errors should be handled in the the actions in the first place // errors that caught here are unhandled exceptions. // The exceptions can contain sensitive information so we ensure that they // are only logged but not exposed through the API. const errorHandler: ErrorHandlingMiddleware = (err, _req, res, next) => { // Log the error message to CloudWatch console.error(err); const cloudWatchLogGroupName = process.env.AWS_LAMBDA_LOG_GROUP_NAME; const cloudWatchLogStreamName = process.env.AWS_LAMBDA_LOG_STREAM_NAME; const awsRegion = process.env.AWS_REGION; res.status(500).json({ status: 500, code: 'INTERNAL_ERROR', message: `Internal error. Contact your administrator for a detailed error message. The error message is logged to CloudWatch LogGroup: '${cloudWatchLogGroupName}', LogStream: '${cloudWatchLogStreamName}' in AWS region '${awsRegion}'.`, cloudWatchLogGroupName, cloudWatchLogStreamName, awsRegion, }); next(); }; api.use(errorHandler); return api; } export { createApi }; ================================================ FILE: packages/api/src/declarations.d.ts ================================================ declare namespace NodeJS { export interface ProcessEnv { TABLE_REGION: string; TABLE_NAME_DEPLOYMENTS: string; TABLE_NAME_ALIASES: string; UPLOAD_BUCKET_ID: string; UPLOAD_BUCKET_REGION: string; // Reserved environment variables from AWS Lambda // @see {@link https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime} AWS_LAMBDA_LOG_GROUP_NAME: string; AWS_LAMBDA_LOG_STREAM_NAME: string; AWS_REGION: string; } } ================================================ FILE: packages/api/src/handler.ts ================================================ import { APIGatewayProxyEvent, Context } from 'aws-lambda'; import { createApi } from './api'; const api = createApi(); async function handler(event: APIGatewayProxyEvent, context: Context) { return await api.run(event, context); } export { handler }; ================================================ FILE: packages/api/src/serializers/deployment.ts ================================================ import { DeploymentItem } from '@millihq/tfn-dynamodb-actions'; import { components } from '../../schema'; type Deployment = components['schemas']['Deployment']; /* ----------------------------------------------------------------------------- * deploymentDefaultSerializer * ---------------------------------------------------------------------------*/ type DeploymentDefaultSerializerInput = Pick< DeploymentItem, 'DeploymentId' | 'CreateDate' | 'Status' | 'DeploymentAlias' >; function deploymentDefaultSerializer< DeploymentInput extends DeploymentDefaultSerializerInput >(deployment: DeploymentInput): Deployment { return { // Required attributes id: deployment.DeploymentId, createDate: deployment.CreateDate, status: deployment.Status, // Optional attributes deploymentAlias: deployment.DeploymentAlias, }; } export { deploymentDefaultSerializer }; ================================================ FILE: packages/api/src/services/cloudformation.ts ================================================ import CloudFormation from 'aws-sdk/clients/cloudformation'; type CloudFormationServiceType = typeof CloudFormationService; class CloudFormationService { static async deleteStack(stackName: string): Promise { const cloudFormationClient = new CloudFormation(); const response = await cloudFormationClient .deleteStack({ StackName: stackName, }) .promise(); if (response.$response.error) { throw response.$response.error; } } } export type { CloudFormationServiceType }; export { CloudFormationService }; ================================================ FILE: packages/api/src/services/dynamodb.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; type DynamoDBServiceType = typeof DynamoDBService; class DynamoDBService { static dynamoDBClient: DynamoDB; static getDynamoDBClient() { if (!DynamoDBService.dynamoDBClient) { DynamoDBService.dynamoDBClient = new DynamoDB({ region: process.env.TABLE_REGION, }); } return DynamoDBService.dynamoDBClient; } static getAliasTableName() { return process.env.TABLE_NAME_ALIASES; } static getDeploymentTableName() { return process.env.TABLE_NAME_DEPLOYMENTS; } } export type { DynamoDBServiceType }; export { DynamoDBService }; ================================================ FILE: packages/api/src/services/s3.ts ================================================ import S3 from 'aws-sdk/clients/s3'; type S3ServiceType = typeof S3Service; class S3Service { static s3Client: S3; static getS3Client(): S3 { if (!S3Service.s3Client) { S3Service.s3Client = new S3({ region: process.env.UPLOAD_BUCKET_REGION, }); } return S3Service.s3Client; } static getUploadBucketName(): string { return process.env.UPLOAD_BUCKET_ID; } } export type { S3ServiceType }; export { S3Service }; ================================================ FILE: packages/api/test/actions/alias/create-or-update-alias.test.ts ================================================ import { createDeployment, createAlias } from '@millihq/tfn-dynamodb-actions'; import { APIGatewayProxyStructuredResultV2 } from 'aws-lambda'; import { API } from 'lambda-api'; import { createApi } from '../../../src/api'; import { DynamoDBServiceType } from '../../../src/services/dynamodb'; import { mockS3Service, mockDynamoDBService, createAPIGatewayProxyEventV2, mockCloudFormationService, } from '../../test-utils'; describe('CreateOrUpdateAlias', () => { let api: API; let dynamoDBService: DynamoDBServiceType; let s3CleanupCallback: () => Promise; let dynamoDBCleanupCallback: () => Promise; beforeAll(async () => { api = createApi(); // Insert mocks api.app('cloudFormation', mockCloudFormationService()); const s3Mock = await mockS3Service(); api.app('s3', s3Mock[0]); s3CleanupCallback = s3Mock[1]; const dynamoDBMock = await mockDynamoDBService(); api.app('dynamoDB', dynamoDBMock[0]); dynamoDBService = dynamoDBMock[0]; dynamoDBCleanupCallback = dynamoDBMock[1]; }); afterAll(async () => { await s3CleanupCallback(); await dynamoDBCleanupCallback(); }); test('RequestBody: Missing', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'INVALID_PARAMS', status: 400, }); }); test('RequestBody: Missing alias', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', body: { target: 'abc', }, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'INVALID_PARAMS', status: 400, }); }); test('RequestBody: Alias not an URL', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', body: { alias: 'abc', target: 'abc', }, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'INVALID_PARAMS', status: 400, }); }); test('RequestBody: Alias is URL with protocol', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', body: { alias: 'http://example.com', target: 'abc', }, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'INVALID_PARAMS', status: 400, }); }); test('RequestBody: Alias is URL with querystring', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', body: { alias: 'example.com?hello=world', target: 'abc', }, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'INVALID_PARAMS', status: 400, }); }); test('RequestBody: Missing target', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', body: { alias: 'abc', }, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'INVALID_PARAMS', status: 400, }); }); test('RequestBody: Target is invalid alias', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', body: { alias: 'valid.example.com', target: 'http://invalid.target', }, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'INVALID_PARAMS', status: 400, message: 'Parameter target is not a valid alias.', }); }); test('Alias from deploymentId: Deployment does not exist', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', body: { alias: 'from-deployment-id.example.com', target: 'missingDeployment', }, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'INVALID_DEPLOYMENT_ID', status: 400, message: 'Deployment with id missingDeployment does not exist.', }); }); test('Alias from deploymentId: Valid request', async () => { await createDeployment({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: 'aliasFromDeploymentId', }); const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', body: { alias: 'from-deployment-id.example.com', target: 'aliasFromDeploymentId', }, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 201, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ id: 'from-deployment-id.example.com/', deployment: 'aliasFromDeploymentId', }); }); test('Alias from deploymentId: Override forbidden', async () => { await createDeployment({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: 'overrideForbidden', }); await createAlias({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), aliasTableName: dynamoDBService.getAliasTableName(), deploymentId: 'overrideForbidden', hostnameRev: 'com.example.override-forbidden', lambdaRoutes: '', prerenders: '', routes: '', }); const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', body: { alias: 'override-forbidden.example.com', target: 'overrideForbidden', }, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'ALIAS_OVERRIDE_NOT_ALLOWED', status: 400, message: 'Cannot override existing alias override-forbidden.example.com because override flag is not set.', }); }); test('Alias from deploymentId: Override allowed', async () => { await createDeployment({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: 'oldOverrideAllowed', }); await createDeployment({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: 'newOverrideAllowed', }); await createAlias({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), aliasTableName: dynamoDBService.getAliasTableName(), deploymentId: 'oldOverrideAllowed', hostnameRev: 'com.example.override-allowed', lambdaRoutes: '', prerenders: '', routes: '', }); const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', body: { alias: 'override-allowed.example.com', target: 'newOverrideAllowed', override: true, }, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 201, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ id: 'override-allowed.example.com/', deployment: 'newOverrideAllowed', }); }); test('Alias from Alias: Alias does not exist', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', body: { alias: 'from-deployment-id.example.com', target: 'missing-alias-example.com', }, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'INVALID_ALIAS', status: 400, message: 'Alias target missing-alias-example.com does not exist.', }); }); test('Alias from Alias: Existing alias is deployment alias', async () => { await createDeployment({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: 'deploymentWithAlias', }); // Create deployment Alias await createAlias({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), aliasTableName: dynamoDBService.getAliasTableName(), deploymentId: 'deploymentWithAlias', hostnameRev: 'com.example.deployment-alias', lambdaRoutes: '', prerenders: '', routes: '', isDeploymentAlias: true, }); const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', body: { alias: 'deployment-alias.example.com', target: 'deploymentWithAlias', }, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'DEPLOYMENT_ALIAS', status: 400, message: 'Cannot override existing alias deployment-alias.example.com because it is a deployment alias that cannot be changed.', }); }); test('Alias from Alias: Valid request', async () => { await createDeployment({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: 'aliasfromalias', }); await createAlias({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), aliasTableName: dynamoDBService.getAliasTableName(), deploymentId: 'aliasfromalias', hostnameRev: 'com.example.existing-alias', lambdaRoutes: '', prerenders: '', routes: '', }); const event = createAPIGatewayProxyEventV2({ uri: '/aliases', method: 'POST', body: { alias: 'alias-from-alias.example.com', target: 'existing-alias.example.com', }, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 201, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ id: 'alias-from-alias.example.com/', deployment: 'aliasfromalias', }); }); }); ================================================ FILE: packages/api/test/actions/alias/delete-alias-by-id.test.ts ================================================ import { createAlias } from '@millihq/tfn-dynamodb-actions'; import { APIGatewayProxyStructuredResultV2 } from 'aws-lambda'; import { API } from 'lambda-api'; import { createApi } from '../../../src/api'; import { DynamoDBServiceType } from '../../../src/services/dynamodb'; import { mockS3Service, mockDynamoDBService, createAPIGatewayProxyEventV2, mockCloudFormationService, } from '../../test-utils'; describe('DeleteAliasById', () => { let api: API; let dynamoDBService: DynamoDBServiceType; let s3CleanupCallback: () => Promise; let dynamoDBCleanupCallback: () => Promise; beforeAll(async () => { api = createApi(); // Insert mocks api.app('cloudFormation', mockCloudFormationService()); const s3Mock = await mockS3Service(); api.app('s3', s3Mock[0]); s3CleanupCallback = s3Mock[1]; const dynamoDBMock = await mockDynamoDBService(); api.app('dynamoDB', dynamoDBMock[0]); dynamoDBService = dynamoDBMock[0]; dynamoDBCleanupCallback = dynamoDBMock[1]; }); afterAll(async () => { await s3CleanupCallback(); await dynamoDBCleanupCallback(); }); test('Invalid aliasId', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/aliases/hello', method: 'DELETE', }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'INVALID_PARAMS', status: 400, }); }); test('Alias not found', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/aliases/not-existing.example.com', method: 'DELETE', }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 404, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'ALIAS_NOT_FOUND', status: 404, message: 'The requested alias does not exist.', }); }); test('DeploymentAlias', async () => { // Create deployment Alias await createAlias({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), aliasTableName: dynamoDBService.getAliasTableName(), deploymentId: 'deploymentWithAlias', hostnameRev: 'com.example.deployment-alias', lambdaRoutes: '', prerenders: '', routes: '', isDeploymentAlias: true, }); const event = createAPIGatewayProxyEventV2({ uri: '/aliases/deployment-alias.example.com', method: 'DELETE', }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'DEPLOYMENT_ALIAS', status: 400, message: 'Requested alias cannot be deleted since it is a deployment alias. Can only be deleted when the deployment gets deleted.', }); }); test('Without basePath', async () => { // Create deployment Alias await createAlias({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), aliasTableName: dynamoDBService.getAliasTableName(), deploymentId: 'withoutBasePathDeployment', hostnameRev: 'com.example.without-basepath', lambdaRoutes: '', prerenders: '', routes: '', }); const event = createAPIGatewayProxyEventV2({ uri: '/aliases/without-basepath.example.com', method: 'DELETE', }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 204, isBase64Encoded: false, }); }); test('With basePath', async () => { // Create deployment Alias await createAlias({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), aliasTableName: dynamoDBService.getAliasTableName(), deploymentId: 'withoutBasePathDeployment', hostnameRev: 'com.example.without-basepath', lambdaRoutes: '', prerenders: '', routes: '', basePath: '/1', }); const event = createAPIGatewayProxyEventV2({ uri: '/aliases/without-basepath.example.com/1/', method: 'DELETE', }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 204, isBase64Encoded: false, }); }); }); ================================================ FILE: packages/api/test/actions/alias/list-aliases.test.ts ================================================ import { createAlias, createDeployment } from '@millihq/tfn-dynamodb-actions'; import { APIGatewayProxyStructuredResultV2 } from 'aws-lambda'; import { API } from 'lambda-api'; import { createApi } from '../../../src/api'; import { DynamoDBServiceType } from '../../../src/services/dynamodb'; import { mockS3Service, mockDynamoDBService, createAPIGatewayProxyEventV2, mockCloudFormationService, } from '../../test-utils'; describe('ListAliases', () => { let api: API; let dynamoDBService: DynamoDBServiceType; let s3CleanupCallback: () => Promise; let dynamoDBCleanupCallback: () => Promise; beforeAll(async () => { api = createApi(); // Insert mocks api.app('cloudFormation', mockCloudFormationService()); const s3Mock = await mockS3Service(); api.app('s3', s3Mock[0]); s3CleanupCallback = s3Mock[1]; const dynamoDBMock = await mockDynamoDBService(); api.app('dynamoDB', dynamoDBMock[0]); dynamoDBService = dynamoDBMock[0]; dynamoDBCleanupCallback = dynamoDBMock[1]; }); afterAll(async () => { await s3CleanupCallback(); await dynamoDBCleanupCallback(); }); test('Missing deploymentId', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/aliases', }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'INVALID_PARAMS', status: 400, message: 'Required parameter deploymentId is invalid or missing.', }); }); test('No aliases with deploymentId', async () => { await createDeployment({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: 'deploymentIdWithoutAliases', }); const event = createAPIGatewayProxyEventV2({ uri: `/aliases?deploymentId=${encodeURIComponent( 'deploymentIdWithoutAliases' )}`, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 200, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ metadata: { next: null, }, items: [], }); }); test('Provided deployment id does not exist', async () => { const event = createAPIGatewayProxyEventV2({ uri: `/aliases?deploymentId=${encodeURIComponent( 'notExistingDeployment' )}`, }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 404, isBase64Encoded: false, }); }); test('Pagination', async () => { await createDeployment({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: 'paginationDeployment', }); // Create some entries first for (let index = 1; index <= 30; index++) { await createAlias({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), aliasTableName: dynamoDBService.getAliasTableName(), deploymentId: 'paginationDeployment', hostnameRev: `com.pagination.${index}`, lambdaRoutes: '', prerenders: '', routes: '', createDate: new Date(2022, 0, index), }); } const event1 = createAPIGatewayProxyEventV2({ uri: `/aliases?deploymentId=${encodeURIComponent( 'paginationDeployment' )}`, }); const response1 = (await api.run( event1 as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(response1).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 200, isBase64Encoded: false, }); const parsedBody1 = JSON.parse(response1.body!); expect(parsedBody1).toMatchObject({ metadata: { next: `com.pagination.6#/#paginationDeployment#${new Date( 2022, 0, 30 - 24 ).toISOString()}`, }, items: expect.any(Array), }); expect(parsedBody1.items.length).toBe(25); // Paginated request const event2 = createAPIGatewayProxyEventV2({ uri: `/aliases?deploymentId=${encodeURIComponent( 'paginationDeployment' )}&startAt=${encodeURIComponent(parsedBody1.metadata.next)}`, }); const response2 = (await api.run( event2 as any, {} as any )) as APIGatewayProxyStructuredResultV2; const parsedBody2 = JSON.parse(response2.body!); expect(parsedBody2).toMatchObject({ metadata: { next: null, }, items: expect.any(Array), }); expect(parsedBody2.items.length).toBe(5); }); }); ================================================ FILE: packages/api/test/actions/deployment/create-deployment.test.ts ================================================ import { APIGatewayProxyStructuredResultV2 } from 'aws-lambda'; import { API } from 'lambda-api'; import { createApi } from '../../../src/api'; import { mockS3Service, mockDynamoDBService, createAPIGatewayProxyEventV2, mockCloudFormationService, } from '../../test-utils'; describe('CreateDeployment', () => { let api: API; let s3CleanupCallback: () => Promise; let dynamoDBCleanupCallback: () => Promise; beforeAll(async () => { api = createApi(); // Insert mocks api.app('cloudFormation', mockCloudFormationService()); const s3Mock = await mockS3Service(); api.app('s3', s3Mock[0]); s3CleanupCallback = s3Mock[1]; const dynamoDBMock = await mockDynamoDBService(); api.app('dynamoDB', dynamoDBMock[0]); dynamoDBCleanupCallback = dynamoDBMock[1]; }); afterAll(async () => { await s3CleanupCallback(); await dynamoDBCleanupCallback(); }); test('Valid createDeployment request', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/deployments', method: 'POST', }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 201, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ id: expect.any(String), uploadUrl: expect.any(String), uploadAttributes: { key: expect.any(String), 'Content-Type': expect.any(String), 'x-amz-meta-tf-next-deployment-id': expect.any(String), bucket: expect.any(String), 'X-Amz-Algorithm': 'AWS4-HMAC-SHA256', 'X-Amz-Credential': expect.any(String), 'X-Amz-Date': expect.any(String), Policy: expect.any(String), 'X-Amz-Signature': expect.any(String), }, status: 'INITIALIZED', }); }); }); ================================================ FILE: packages/api/test/actions/deployment/delete-deployment-by-id.test.ts ================================================ import { createAlias, createDeployment, getDeploymentById, updateDeploymentStatusCreateInProgress, updateDeploymentStatusFinished, } from '@millihq/tfn-dynamodb-actions'; import { APIGatewayProxyStructuredResultV2 } from 'aws-lambda'; import { API } from 'lambda-api'; import { createApi } from '../../../src/api'; import { CloudFormationServiceType } from '../../../src/services/cloudformation'; import { DynamoDBServiceType } from '../../../src/services/dynamodb'; import { mockS3Service, mockDynamoDBService, createAPIGatewayProxyEventV2, mockCloudFormationService, } from '../../test-utils'; describe('DeleteDeployment', () => { let api: API; let cloudFormationService: CloudFormationServiceType; let dynamoDBService: DynamoDBServiceType; let s3CleanupCallback: () => Promise; let dynamoDBCleanupCallback: () => Promise; beforeAll(async () => { api = createApi(); const s3Mock = await mockS3Service(); api.app('s3', s3Mock[0]); s3CleanupCallback = s3Mock[1]; const dynamoDBMock = await mockDynamoDBService(); api.app('dynamoDB', dynamoDBMock[0]); dynamoDBService = dynamoDBMock[0]; dynamoDBCleanupCallback = dynamoDBMock[1]; }); beforeEach(() => { // Insert mocks cloudFormationService = mockCloudFormationService(); api.app('cloudFormation', cloudFormationService); }); afterAll(async () => { await s3CleanupCallback(); await dynamoDBCleanupCallback(); }); afterEach(() => { jest.clearAllMocks(); }); test('CloudFormation fail', async () => { console.error = jest.fn(); const stackDeleteError = new Error('Throw from deleteStack'); /** * Mock for the cloudFormationService that fails when */ function mockFailedCloudFormationService(): CloudFormationServiceType { return class CloudFormationServiceMock { static deleteStack(_stackName: string) { return Promise.reject(stackDeleteError); } }; } api.app('cloudFormation', mockFailedCloudFormationService()); const deployment = await createDeployment({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: 'deploymentDeletionFails', }); // Status: INITIALIZED -> CREATE_IN-PROGRESS await updateDeploymentStatusCreateInProgress({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: { PK: deployment.PK, SK: deployment.SK, }, prerenders: 'foo', routes: 'bar', cloudFormationStack: 'arn:aws:cloudformation:eu-central-1:123456789123:stack/tfn-d35de1a94815e0562689b89b6225cd85/319a93a0-c3df-11ec-9e1a-0a226e11de6a', }); // Status: CREATE_IN-PROGRESS -> FINISHED await updateDeploymentStatusFinished({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: { PK: deployment.PK, SK: deployment.SK, }, }); const event = createAPIGatewayProxyEventV2({ uri: '/deployments/deploymentDeletionFails', method: 'DELETE', }); const response = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(response).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 500, isBase64Encoded: false, }); expect(JSON.parse(response.body!)).toMatchObject({ status: 500, code: 'INTERNAL_ERROR', }); expect(console.error).toHaveBeenCalledWith(stackDeleteError); }); test('Deployment without aliases', async () => { await createDeployment({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: 'deploymentWithoutAlias', }); const event = createAPIGatewayProxyEventV2({ uri: '/deployments/deploymentWithoutAlias', method: 'DELETE', }); const response = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(response).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 204, isBase64Encoded: false, }); const getDeploymentResponse = await getDeploymentById({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: 'deploymentWithoutAlias', }); expect(getDeploymentResponse).toBeNull(); }); test('Deployment with deployment alias', async () => { // Insert temporary mock const deleteStackSpy = jest.spyOn(cloudFormationService, 'deleteStack'); // Status: INITIALIZED const deployment = await createDeployment({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: 'deploymentWithAlias', }); // Status: INITIALIZED -> CREATE_IN-PROGRESS await updateDeploymentStatusCreateInProgress({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: { PK: deployment.PK, SK: deployment.SK, }, prerenders: 'foo', routes: 'bar', cloudFormationStack: 'arn:aws:cloudformation:eu-central-1:123456789123:stack/tfn-d35de1a94815e0562689b89b6225cd85/319a93a0-c3df-11ec-9e1a-0a226e11de6a', }); // Status: CREATE_IN-PROGRESS -> FINISHED await updateDeploymentStatusFinished({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: { PK: deployment.PK, SK: deployment.SK, }, }); await createAlias({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), aliasTableName: dynamoDBService.getAliasTableName(), deploymentId: 'deploymentWithAlias', hostnameRev: 'com.with-alias', lambdaRoutes: '', prerenders: '', routes: '', isDeploymentAlias: true, }); const event = createAPIGatewayProxyEventV2({ uri: '/deployments/deploymentWithAlias', method: 'DELETE', }); const response = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(response).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 200, isBase64Encoded: false, }); expect(JSON.parse(response.body!)).toMatchObject({ status: 'DESTROY_REQUESTED', }); expect(deleteStackSpy).toHaveBeenCalledTimes(1); }); test('Deployment with custom alias', async () => { const deployment = await createDeployment({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: 'deploymentWithMultipleAliases', }); // Deployment alias await createAlias({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), aliasTableName: dynamoDBService.getAliasTableName(), deploymentId: 'deploymentWithMultipleAliases', hostnameRev: 'com.with-multiple-alias', lambdaRoutes: '', prerenders: '', routes: '', isDeploymentAlias: true, }); // Custom alias await createAlias({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), aliasTableName: dynamoDBService.getAliasTableName(), deploymentId: 'deploymentWithMultipleAliases', hostnameRev: 'com.with-multiple-alias.custom', lambdaRoutes: '', prerenders: '', routes: '', }); await updateDeploymentStatusFinished({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: { PK: deployment.PK, SK: deployment.SK, }, }); const event = createAPIGatewayProxyEventV2({ uri: '/deployments/deploymentWithMultipleAliases', method: 'DELETE', }); const response = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(response).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 400, isBase64Encoded: false, }); expect(JSON.parse(response.body!)).toMatchObject({}); }); }); ================================================ FILE: packages/api/test/actions/deployment/get-deployment-by-id.test.ts ================================================ import { createDeployment } from '@millihq/tfn-dynamodb-actions'; import { APIGatewayProxyStructuredResultV2 } from 'aws-lambda'; import { API } from 'lambda-api'; import { createApi } from '../../../src/api'; import { DynamoDBServiceType } from '../../../src/services/dynamodb'; import { mockS3Service, mockDynamoDBService, createAPIGatewayProxyEventV2, mockCloudFormationService, } from '../../test-utils'; describe('GetDeploymentById', () => { let api: API; let dynamoDBService: DynamoDBServiceType; let s3CleanupCallback: () => Promise; let dynamoDBCleanupCallback: () => Promise; beforeAll(async () => { api = createApi(); // Insert mocks api.app('cloudFormation', mockCloudFormationService()); const s3Mock = await mockS3Service(); api.app('s3', s3Mock[0]); s3CleanupCallback = s3Mock[1]; const dynamoDBMock = await mockDynamoDBService(); api.app('dynamoDB', dynamoDBMock[0]); dynamoDBService = dynamoDBMock[0]; dynamoDBCleanupCallback = dynamoDBMock[1]; }); afterAll(async () => { await s3CleanupCallback(); await dynamoDBCleanupCallback(); }); test('Deployment not found', async () => { const event = createAPIGatewayProxyEventV2({ uri: '/deployments/notExistingDeployment', }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 404, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ code: 'DEPLOYMENT_NOT_FOUND', status: 404, message: `Deployment with id "notExistingDeployment" does not exist.`, }); }); test('Valid request', async () => { const createDate = new Date(); const deployment = await createDeployment({ deploymentTableName: dynamoDBService.getDeploymentTableName(), dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentId: 'someDeployment', createDate, }); const event = createAPIGatewayProxyEventV2({ uri: '/deployments/someDeployment', }); const result = (await api.run( event as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(result).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 200, isBase64Encoded: false, }); expect(JSON.parse(result.body!)).toMatchObject({ id: deployment.DeploymentId, createDate: createDate.toISOString(), status: deployment.Status, }); }); }); ================================================ FILE: packages/api/test/actions/deployment/list-deployments.test.ts ================================================ import { createDeployment } from '@millihq/tfn-dynamodb-actions'; import { APIGatewayProxyStructuredResultV2 } from 'aws-lambda'; import { API } from 'lambda-api'; import { createApi } from '../../../src/api'; import { DynamoDBServiceType } from '../../../src/services/dynamodb'; import { mockS3Service, mockDynamoDBService, createAPIGatewayProxyEventV2, mockCloudFormationService, } from '../../test-utils'; describe('CreateDeployment', () => { let api: API; let dynamoDBService: DynamoDBServiceType; let s3CleanupCallback: () => Promise; let dynamoDBCleanupCallback: () => Promise; beforeAll(async () => { api = createApi(); // Insert mocks api.app('cloudFormation', mockCloudFormationService()); const s3Mock = await mockS3Service(); api.app('s3', s3Mock[0]); s3CleanupCallback = s3Mock[1]; const dynamoDBMock = await mockDynamoDBService(); api.app('dynamoDB', dynamoDBMock[0]); dynamoDBService = dynamoDBMock[0]; dynamoDBCleanupCallback = dynamoDBMock[1]; }); afterAll(async () => { await s3CleanupCallback(); await dynamoDBCleanupCallback(); }); test('Valid listDeployments request', async () => { // Create some entries first for (let index = 1; index <= 30; index++) { await createDeployment({ dynamoDBClient: dynamoDBService.getDynamoDBClient(), deploymentTableName: dynamoDBService.getDeploymentTableName(), deploymentId: `deployment${index}`, createDate: new Date(2022, 0, index), }); } const event1 = createAPIGatewayProxyEventV2({ uri: '/deployments', }); const response1 = (await api.run( event1 as any, {} as any )) as APIGatewayProxyStructuredResultV2; expect(response1).toMatchObject({ headers: { 'content-type': 'application/json' }, statusCode: 200, isBase64Encoded: false, }); const parsedBody1 = JSON.parse(response1.body!); expect(parsedBody1).toMatchObject({ metadata: { next: `deployment6#${new Date(2022, 0, 30 - 24).toISOString()}`, }, items: expect.any(Array), }); expect(parsedBody1.items.length).toBe(25); // Paginated request const event2 = createAPIGatewayProxyEventV2({ uri: `/deployments?startAt=${encodeURIComponent( parsedBody1.metadata.next )}`, }); const response2 = (await api.run( event2 as any, {} as any )) as APIGatewayProxyStructuredResultV2; const parsedBody2 = JSON.parse(response2.body!); expect(parsedBody2).toMatchObject({ metadata: { next: null, }, items: expect.any(Array), }); expect(parsedBody2.items.length).toBe(5); }); }); ================================================ FILE: packages/api/test/test-utils.ts ================================================ import { pseudoRandomBytes } from 'crypto'; import { URL } from 'url'; import { createTestDynamoDBClient, createAliasTestTable, createDeploymentTestTable, } from '@millihq/tfn-dynamodb-actions/test/test-utils'; import { APIGatewayProxyEventV2 } from 'aws-lambda'; import DynamoDB from 'aws-sdk/clients/dynamodb'; import S3 from 'aws-sdk/clients/s3'; import { CloudFormationServiceType } from '../src/services/cloudformation'; import { DynamoDBServiceType } from '../src/services/dynamodb'; import { S3ServiceType } from '../src/services/s3'; /** * Helper to create a new bucket */ async function createS3Bucket( s3: S3, bucketName: string = pseudoRandomBytes(16).toString('hex') ) { await s3 .createBucket({ Bucket: bucketName, }) .promise(); return { bucketName, async destroy() { // Empty bucket and destroy it // We can't delete a bucket before emptying its contents const { Contents } = await s3 .listObjects({ Bucket: bucketName }) .promise(); if (Contents && Contents.length > 0) { // TypeGuard function isObjectIdentifier( obj: S3.Object ): obj is S3.ObjectIdentifier { return typeof obj.Key === 'string'; } await s3 .deleteObjects({ Bucket: bucketName, Delete: { Objects: Contents.filter(isObjectIdentifier).map(({ Key }) => ({ Key, })), }, }) .promise(); } await s3.deleteBucket({ Bucket: bucketName }).promise(); }, }; } async function mockS3Service(): Promise<[S3ServiceType, () => Promise]> { const s3Client = new S3({ endpoint: process.env.S3_ENDPOINT, accessKeyId: process.env.MINIO_ACCESS_KEY, secretAccessKey: process.env.MINIO_SECRET_KEY, s3ForcePathStyle: true, signatureVersion: 'v4', sslEnabled: false, }); // Create temporary bucket const bucket = await createS3Bucket(s3Client); return [ class S3ServiceMock { static s3Client: S3 = s3Client; static getS3Client(): S3 { return s3Client; } static getUploadBucketName(): string { return bucket.bucketName; } }, bucket.destroy, ]; } async function mockDynamoDBService(): Promise< [DynamoDBServiceType, () => Promise] > { const dynamoDBClient = createTestDynamoDBClient(); const aliasTableName = await createAliasTestTable(dynamoDBClient); const deploymentTableName = await createDeploymentTestTable(dynamoDBClient); async function destroyCallback() { await dynamoDBClient.deleteTable({ TableName: aliasTableName, }); await dynamoDBClient.deleteTable({ TableName: deploymentTableName, }); } return [ class DynamoDBServiceMock { static dynamoDBClient: DynamoDB = dynamoDBClient; static getDynamoDBClient() { return dynamoDBClient; } static getAliasTableName() { return aliasTableName; } static getDeploymentTableName() { return deploymentTableName; } }, destroyCallback, ]; } function mockCloudFormationService(): CloudFormationServiceType { return class CloudFormationServiceMock { static deleteStack(_stackName: string) { return Promise.resolve(); } }; } type CreateAPIGatewayProxyEventV2Options = { uri: string; method?: 'GET' | 'POST' | 'DELETE' | string; body?: any | undefined; }; function createAPIGatewayProxyEventV2({ uri, method = 'GET', body, }: CreateAPIGatewayProxyEventV2Options): APIGatewayProxyEventV2 { const url = new URL(uri, 'http://n'); let requestBody: string | undefined; if (body !== undefined) { requestBody = JSON.stringify(body); } return { version: '2.0', routeKey: '$default', rawPath: url.pathname, rawQueryString: url.searchParams.toString(), cookies: [], headers: {}, queryStringParameters: Object.fromEntries(url.searchParams), requestContext: { accountId: '123456789012', apiId: 'api-id', domainName: 'id.execute-api.us-east-1.amazonaws.com', domainPrefix: 'id', http: { method, path: url.pathname, protocol: 'HTTP/1.1', sourceIp: 'IP', userAgent: 'agent', }, requestId: 'id', routeKey: '$default', stage: '$default', time: '12/Mar/2020:19:03:58 +0000', timeEpoch: 1583348638390, }, body: requestBody, isBase64Encoded: false, }; } export { mockS3Service, mockDynamoDBService, mockCloudFormationService, createAPIGatewayProxyEventV2, }; ================================================ FILE: packages/api/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./dist", "experimentalDecorators": true, "strictPropertyInitialization": false, "noFallthroughCasesInSwitch": true }, "include": ["schema.ts", "./src/**/*", "./test/**/*"] } ================================================ FILE: packages/deploy-controller/.gitignore ================================================ # Build output dist dist.zip ================================================ FILE: packages/deploy-controller/README.md ================================================ ================================================ FILE: packages/deploy-controller/jest.config.js ================================================ /** @type {import('ts-jest').InitialOptionsTsJest} */ module.exports = { preset: 'ts-jest', testEnvironment: 'node', rootDir: './', }; ================================================ FILE: packages/deploy-controller/package.json ================================================ { "name": "@millihq/terraform-next-deploy-controller", "version": "1.0.0-canary.5", "description": "Deployment controller component of Terraform Next.js module for AWS", "main": "index.js", "license": "Apache-2.0", "homepage": "https://registry.terraform.io/modules/milliHQ/next-js/aws", "repository": { "type": "git", "url": "https://github.com/milliHQ/terraform-next.js.git", "directory": "packages/deploy-controller" }, "scripts": { "build": "ncc-zip build -f handler --license third-party-licenses.txt src/handler.ts", "prepack": "cp dist/third-party-licenses.txt ../../LICENSE ./", "postpack": "rm ./LICENSE ./third-party-licenses.txt" }, "dependencies": { "@millihq/tfn-dynamodb-actions": "1.0.0-canary.5", "aws-sdk": "*" }, "devDependencies": { "@types/aws-lambda": "*", "@vercel/ncc": "*", "aws-sdk": "*", "jest": "*", "ncc-zip": "^2.1.0", "ts-jest": "*", "typescript": "*" }, "files": [ "dist.zip", "third-party-licenses.txt" ] } ================================================ FILE: packages/deploy-controller/src/controller.ts ================================================ import { createAlias, deleteDeploymentById, reverseHostname, updateDeploymentStatus, updateDeploymentStatusFinished, updateDeploymentStatusCreateFailed, updateDeploymentStatusDestroyInProgress, updateDeploymentStatusDestroyFailed, } from '@millihq/tfn-dynamodb-actions'; import { SNSEvent } from 'aws-lambda'; import CloudFormation from 'aws-sdk/clients/cloudformation'; import DynamoDB from 'aws-sdk/clients/dynamodb'; import { parseCloudFormationEvent } from './utils/parse-cloudformation-event'; import { parseLambdaRoutes } from './utils/parse-lambda-routes'; type ControllerOptions = { dynamoDBClient: DynamoDB; cloudFormationClient?: CloudFormation; }; type RuntimeOptions = { aliasTableName: string; deploymentTableName: string; }; class Controller { cloudFormationClient: CloudFormation; dynamoDBClient: DynamoDB; constructor({ dynamoDBClient, cloudFormationClient }: ControllerOptions) { this.cloudFormationClient = cloudFormationClient ?? new CloudFormation(); this.dynamoDBClient = dynamoDBClient; } run = async ( event: SNSEvent, { aliasTableName, deploymentTableName }: RuntimeOptions ) => { await Promise.all( event.Records.map(async (record) => { const message = record.Sns.Message; const parsedEvent = parseCloudFormationEvent(message); const { ResourceType, ResourceStatus, StackName } = parsedEvent; // Only handle stack related events if (ResourceType !== 'AWS::CloudFormation::Stack') { return; } if (typeof ResourceStatus !== 'string') { throw new Error('No attribute `ResourceStatus` present in event'); } if (typeof StackName !== 'string') { throw new Error('No attribute `StackName` present in event'); } // Remove the `tfn-` prefix from the stack name to get the deploymentID const deploymentId = StackName.slice(4); /** * The following values for resource status are possible: * {@link CloudFormation.StackStatus} */ switch (ResourceStatus) { case 'CREATE_COMPLETE': const stackARN = parsedEvent.StackId; if (!stackARN) { throw new Error('CreateComplete: No StackId present'); } // Get the stack that triggered the event const stacksResponse = await this.cloudFormationClient .describeStacks({ StackName: stackARN, }) .promise(); if (!stacksResponse.Stacks || stacksResponse.Stacks.length !== 1) { throw new Error( 'CreateComplete: Could not retrieve stack with id: ' + stackARN ); } const stack = stacksResponse.Stacks[0]; const lambdaRoutesStackOutput = stack.Outputs?.find( ({ OutputKey }) => OutputKey === 'lambdaRoutes' ); let lambdaRoutes: Record = {}; if ( lambdaRoutesStackOutput && lambdaRoutesStackOutput.OutputValue ) { lambdaRoutes = parseLambdaRoutes( lambdaRoutesStackOutput.OutputValue ); } const stringifiedLambdaRoutes = JSON.stringify(lambdaRoutes); const deployment = await updateDeploymentStatus({ dynamoDBClient: this.dynamoDBClient, deploymentId, deploymentTableName, lambdaRoutes: stringifiedLambdaRoutes, newStatus: 'CREATE_COMPLETE', }); // TODO: Handle case when multi deployments is not enabled const deploymentAliasBasePath = '/'; const deploymentAliasHostname = deploymentId + process.env.MULTI_DEPLOYMENTS_BASE_DOMAIN; const deploymentAliasHostnameRev = reverseHostname( deploymentAliasHostname ); await createAlias({ dynamoDBClient: this.dynamoDBClient, hostnameRev: deploymentAliasHostnameRev, isDeploymentAlias: true, aliasTableName, createDate: new Date(), deploymentId, lambdaRoutes: stringifiedLambdaRoutes, // Copy values over from the deployment routes: deployment.Routes, prerenders: deployment.Prerenders, basePath: deploymentAliasBasePath, }); await updateDeploymentStatusFinished({ dynamoDBClient: this.dynamoDBClient, deploymentId, deploymentTableName, deploymentAlias: deploymentAliasHostname + deploymentAliasBasePath, }); break; case 'CREATE_FAILED': await updateDeploymentStatusCreateFailed({ dynamoDBClient: this.dynamoDBClient, deploymentTableName, deploymentId, }); break; case 'DELETE_COMPLETE': await deleteDeploymentById({ dynamoDBClient: this.dynamoDBClient, deploymentTableName, deploymentId, }); break; case 'DELETE_IN_PROGRESS': await updateDeploymentStatusDestroyInProgress({ dynamoDBClient: this.dynamoDBClient, deploymentTableName, deploymentId, }); break; case 'DELETE_FAILED': await updateDeploymentStatusDestroyFailed({ dynamoDBClient: this.dynamoDBClient, deploymentTableName, deploymentId, }); break; default: // Event is not handled, since it is not relevant } }) ); }; } function createController(options: ControllerOptions) { return new Controller(options); } export type { Controller }; export { createController }; ================================================ FILE: packages/deploy-controller/src/declarations.d.ts ================================================ declare namespace NodeJS { export interface ProcessEnv { TABLE_REGION: string; TABLE_NAME_DEPLOYMENTS: string; TABLE_NAME_ALIASES: string; MULTI_DEPLOYMENTS_BASE_DOMAIN?: string; } } ================================================ FILE: packages/deploy-controller/src/handler.ts ================================================ import { SNSEvent } from 'aws-lambda'; import DynamoDB from 'aws-sdk/clients/dynamodb'; import { ensureEnv } from './utils/ensure-env'; import { createController } from './controller'; const dynamoDBRegion = ensureEnv('TABLE_REGION'); const dynamoDBClient = new DynamoDB({ region: dynamoDBRegion, }); const controller = createController({ dynamoDBClient, }); /** * Entry point for the Lambda handler. * Receives CloudFormation status change events from SNS. */ async function handler(event: SNSEvent) { const dynamoDBTableNameDeployments = ensureEnv('TABLE_NAME_DEPLOYMENTS'); const dynamoDBTableNameAliases = ensureEnv('TABLE_NAME_ALIASES'); try { await controller.run(event, { aliasTableName: dynamoDBTableNameAliases, deploymentTableName: dynamoDBTableNameDeployments, }); } catch (error) { console.error(error); } } export { handler }; ================================================ FILE: packages/deploy-controller/src/utils/ensure-env.ts ================================================ /** * Ensures that the environment variables */ function ensureEnv(key: string, defaultValue?: string): string { const value = process.env[key]; if (typeof value === 'string') { return value; } if (typeof defaultValue === 'string') { return defaultValue; } throw new Error( `Environment variable "${key}" is required, but was not set.` ); } export { ensureEnv }; ================================================ FILE: packages/deploy-controller/src/utils/parse-cloudformation-event.ts ================================================ import { ResourceStatus } from 'aws-sdk/clients/cloudformation'; type ResourceType = 'AWS::CloudFormation::Stack' | string; type CloudFormationEvent = { StackId?: string; Timestamp?: string; EventId?: string; LogicalResourceId?: string; Namespace?: string; PhysicalResourceId?: string; PrincipalId?: string; /** * Contains properties that are used to create the resource. * Is a string that contains a JSON object or null. */ ResourceProperties?: string; ResourceStatus?: ResourceStatus | undefined; ResourceStatusReason?: string; ResourceType?: ResourceType; StackName?: string; ClientRequestToken?: string; }; // RegEx that matches AttributeName='value' // Copied from https://github.com/motdotla/dotenv/blob/master/lib/main.js const LINE = /(?:^|^)\s*([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm; /** * Thankfully CloudFormation sends the event not as message attributes, but as * a single string that has to be parsed. * * @see {@link https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/635} */ function parseCloudFormationEvent( incomingMessage: string ): CloudFormationEvent { // Message format: // // - Each attribute is separated by a new line (\n) // - AttributeName='value' const result: CloudFormationEvent = {}; let match; while ((match = LINE.exec(incomingMessage)) != null) { const key = match[1] as keyof CloudFormationEvent; let value = match[2] || ''; // Remove surrounding quotes value = value.replace(/^(['"`])([\s\S]*)\1$/gm, '$2'); // Add to result result[key] = value; } return result; } export { parseCloudFormationEvent }; ================================================ FILE: packages/deploy-controller/src/utils/parse-lambda-routes.ts ================================================ /** * The Lambda routes is basically a string separated by " ". * First value is the route (key), second one is the endpoint (value), e.g. * "/__NEXT_PAGE_LAMBDA_0 https://xyz.execute-api.eu-central-1.amazonaws.com" */ function parseLambdaRoutes(input: string): Record { const result: Record = {}; const splittedInput = input.trim().split(' '); for (let index = 0; index < splittedInput.length; index = index + 2) { const key = splittedInput[index]; const value = splittedInput[index + 1]; if (key && value) { result[key] = value; } } return result; } export { parseLambdaRoutes }; ================================================ FILE: packages/deploy-controller/test/controller.test.ts ================================================ import { createTestDynamoDBClient, createAliasTestTable, createDeploymentTestTable, } from '@millihq/tfn-dynamodb-actions/test/test-utils'; import DynamoDB from 'aws-sdk/clients/dynamodb'; import { Controller, createController } from '../src/controller'; import { createTestSNSEvent } from './test-utils'; describe('Deploy Controller', () => { let controller: Controller; let dynamoDBClient: DynamoDB; let aliasTableName: string; let deploymentTableName: string; beforeAll(async () => { dynamoDBClient = createTestDynamoDBClient(); aliasTableName = await createAliasTestTable(dynamoDBClient); deploymentTableName = await createDeploymentTestTable(dynamoDBClient); }); beforeEach(() => { controller = createController({ dynamoDBClient, }); }); afterAll(async () => { await dynamoDBClient.deleteTable({ TableName: aliasTableName, }); await dynamoDBClient.deleteTable({ TableName: deploymentTableName, }); }); test('No ResourceStatus present in event', async () => { const event = createTestSNSEvent({ ResourceStatus: null, }); await expect( controller.run(event, { aliasTableName, deploymentTableName, }) ).rejects.toThrow( new Error('No attribute `ResourceStatus` present in event') ); }); test('No StackName present in event', async () => { const event = createTestSNSEvent({ StackName: null, }); await expect( controller.run(event, { aliasTableName, deploymentTableName, }) ).rejects.toThrow(new Error('No attribute `StackName` present in event')); }); test('CreateComplete: No StackId present in event', async () => { const event = createTestSNSEvent({ ResourceStatus: 'CREATE_COMPLETE', StackId: null, }); await expect( controller.run(event, { aliasTableName, deploymentTableName, }) ).rejects.toThrow(new Error('CreateComplete: No StackId present')); }); }); ================================================ FILE: packages/deploy-controller/test/test-utils.ts ================================================ import { SNSEvent } from 'aws-lambda'; type CreateTestMessageOptions = { StackId?: string | null; Timestamp?: string | null; EventId?: string | null; LogicalResourceId?: string | null; Namespace?: string | null; PhysicalResourceId?: string | null; ResourceProperties?: string | null; ResourceStatus?: string | null; ResourceStatusReason?: string | null; ResourceType?: string | null; StackName?: string | null; ClientRequestToken?: string | null; }; const defaultMessageContent: Record = { StackId: 'arn:aws:cloudformation:eu-central-1:238476290347:stack/tfn-d35de1a94815e0562689b89b6225cd85/319a93a0-c3df-11ec-9e1a-0a226e11de6a', Timestamp: '2022-04-24T15:00:11.646Z', EventId: 'lambdaRoleC844FDB1-CREATE_COMPLETE-2022-04-24T15:00:11.646Z', LogicalResourceId: 'lambdaRoleC844FDB1', Namespace: '238476290347', PhysicalResourceId: 'fn-d35de1a94815e0562689b89b622-lambdaRoleC844FDB1-3O50QZY56BMU', ResourceProperties: '{"Description":"Managed by Terraform Next.js","AssumeRolePolicyDocument":{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"lambda.amazonaws.com"}}]}}', ResourceStatus: 'CREATE_COMPLETE', ResourceStatusReason: '', ResourceType: 'AWS::CloudFormation::Stack', StackName: 'tfn-d35de1a94815e0562689b89b6225cd85', ClientRequestToken: 'null', }; function createTestMessage(options: CreateTestMessageOptions = {}): string { return Object.entries(defaultMessageContent).reduce( (acc, [_key, defaultValue]) => { const key = _key as keyof CreateTestMessageOptions; const optionsValue = options[key]; let value: string; if (optionsValue === null) { // Dont set value return acc; } else if (optionsValue === undefined) { // Use default value value = defaultValue; } else { value = optionsValue; } return acc + `${key}='${value}'\n`; }, '' ); } function createTestSNSEvent(options: CreateTestMessageOptions = {}): SNSEvent { return { Records: [ { EventVersion: '', EventSubscriptionArn: '', EventSource: '', Sns: { SignatureVersion: '', Timestamp: '', Signature: '', SigningCertUrl: '', MessageId: '', Message: createTestMessage(options), MessageAttributes: {}, Type: '', UnsubscribeUrl: '', TopicArn: '', Subject: '', }, }, ], }; } export { createTestSNSEvent }; ================================================ FILE: packages/deploy-controller/test/utils/parse-cloudformation-event.test.ts ================================================ import { parseCloudFormationEvent } from '../../src/utils/parse-cloudformation-event'; test('Create Complete: IAM Role', () => { const message = `StackId='arn:aws:cloudformation:eu-central-1:238476290347:stack/tfn-d35de1a94815e0562689b89b6225cd85/319a93a0-c3df-11ec-9e1a-0a226e11de6a' Timestamp='2022-04-24T15:00:11.646Z' EventId='lambdaRoleC844FDB1-CREATE_COMPLETE-2022-04-24T15:00:11.646Z' LogicalResourceId='lambdaRoleC844FDB1' Namespace='238476290347' PhysicalResourceId='tfn-d35de1a94815e0562689b89b622-lambdaRoleC844FDB1-3O50QZY56BMU' ResourceProperties='{\"Description\":\"Managed by Terraform Next.js\",\"AssumeRolePolicyDocument\":{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"}}]}}' ResourceStatus='CREATE_COMPLETE' ResourceStatusReason='' ResourceType='AWS::IAM::Role' StackName='tfn-d35de1a94815e0562689b89b6225cd85' ClientRequestToken='null' `; const result = parseCloudFormationEvent(message); expect(result).toMatchObject({ StackId: 'arn:aws:cloudformation:eu-central-1:238476290347:stack/tfn-d35de1a94815e0562689b89b6225cd85/319a93a0-c3df-11ec-9e1a-0a226e11de6a', Timestamp: '2022-04-24T15:00:11.646Z', EventId: 'lambdaRoleC844FDB1-CREATE_COMPLETE-2022-04-24T15:00:11.646Z', LogicalResourceId: 'lambdaRoleC844FDB1', Namespace: '238476290347', PhysicalResourceId: 'tfn-d35de1a94815e0562689b89b622-lambdaRoleC844FDB1-3O50QZY56BMU', ResourceProperties: '{"Description":"Managed by Terraform Next.js","AssumeRolePolicyDocument":{"Version":"2012-10-17","Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"lambda.amazonaws.com"}}]}}', ResourceStatus: 'CREATE_COMPLETE', ResourceStatusReason: '', ResourceType: 'AWS::IAM::Role', StackName: 'tfn-d35de1a94815e0562689b89b6225cd85', ClientRequestToken: 'null', }); }); ================================================ FILE: packages/deploy-controller/test/utils/parse-lambda-routes.test.ts ================================================ import { parseLambdaRoutes } from '../../src/utils/parse-lambda-routes'; describe('Parse Lambda routes', () => { test('Empty input', () => { const result = parseLambdaRoutes(''); expect(result).toMatchObject({}); }); test('Multiple routes', () => { const input = '/__NEXT_PAGE_LAMBDA_0 https://abc.execute-api.eu-central-1.amazonaws.com ' + '/__NEXT_PAGE_LAMBDA_1 https://def.execute-api.eu-central-1.amazonaws.com'; const result = parseLambdaRoutes(input); expect(result).toMatchObject({ '/__NEXT_PAGE_LAMBDA_0': 'https://abc.execute-api.eu-central-1.amazonaws.com', '/__NEXT_PAGE_LAMBDA_1': 'https://def.execute-api.eu-central-1.amazonaws.com', }); }); }); ================================================ FILE: packages/deploy-controller/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./dist", "noFallthroughCasesInSwitch": true }, "include": ["./src/**/*", "./test/**/*"] } ================================================ FILE: packages/deploy-trigger/.gitignore ================================================ dist dist.zip ================================================ FILE: packages/deploy-trigger/README.md ================================================ # Terraform Next.js Deploy trigger component Deploy trigger component of [Terraform Next.js module for AWS](https://github.com/milliHQ/terraform-aws-next-js). ## License Apache-2.0 - see [LICENSE](./LICENSE) for details. ================================================ FILE: packages/deploy-trigger/jest.config.js ================================================ /** @type {import('ts-jest').InitialOptionsTsJest} */ module.exports = { preset: 'ts-jest', testEnvironment: 'node', rootDir: './', }; ================================================ FILE: packages/deploy-trigger/ncc.config.json ================================================ { "externals": { "aws-sdk": "aws-sdk", "/^aws-sdk(/.*)/": "aws-sdk$1" }, "minify": true } ================================================ FILE: packages/deploy-trigger/package.json ================================================ { "name": "@millihq/terraform-next-deploy-trigger", "version": "1.0.0-canary.5", "description": "Deploy trigger component of Terraform Next.js module for AWS", "main": "index.js", "license": "Apache-2.0", "homepage": "https://registry.terraform.io/modules/milliHQ/next-js/aws", "repository": { "type": "git", "url": "https://github.com/milliHQ/terraform-next.js.git", "directory": "packages/deploy-trigger" }, "scripts": { "build": "ncc-zip build -i '*.zip' -f handler --license third-party-licenses.txt src/handler.ts", "prepack": "cp dist/third-party-licenses.txt ../../LICENSE ./", "postpack": "rm ./LICENSE ./third-party-licenses.txt" }, "dependencies": { "@aws-cdk/aws-apigatewayv2-alpha": "2.25.0-alpha.0", "@aws-cdk/aws-apigatewayv2-integrations-alpha": "2.25.0-alpha.0", "@millihq/tfn-dynamodb-actions": "1.0.0-canary.5", "aws-cdk-lib": "2.25.0", "constructs": "^10.0.130", "mime-types": "^2.1.33" }, "devDependencies": { "@types/archiver": "^5.1.0", "@types/aws-lambda": "*", "@types/mime-types": "^2.1.1", "@types/tmp": "^0.2.0", "@types/unzipper": "^0.10.3", "@vercel/ncc": "*", "archiver": "^5.3.0", "aws-sdk": "*", "jest": "*", "ncc-zip": "^2.1.0", "patch-package": "^6.4.7", "tmp": "^0.2.1", "ts-jest": "*", "typescript": "*", "unzipper": "^0.10.11" }, "files": [ "dist.zip", "third-party-licenses.txt" ] } ================================================ FILE: packages/deploy-trigger/src/cdk/aws-construct-function-urls.ts ================================================ import { Stack, RemovalPolicy, CfnOutput, Duration } from 'aws-cdk-lib'; import { Role, ServicePrincipal, PolicyStatement } from 'aws-cdk-lib/aws-iam'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { LogGroup, RetentionDays } from 'aws-cdk-lib/aws-logs'; import { Bucket } from 'aws-cdk-lib/aws-s3'; import { LambdaDefinition } from '../types'; import { getRuntime } from './cdk-utils'; /* ----------------------------------------------------------------------------- * CDK construct * ---------------------------------------------------------------------------*/ type AtomicDeploymentOptions = { /** * Bucket where the deployment is stored to. */ deploymentBucketId: string; /** * Unique ID of the deployment. */ deploymentId: string; /** * The lambdas that should be created as part of the stack. */ lambdas: LambdaDefinition[]; }; class AtomicDeploymentFunctionUrls extends Stack { constructor({ deploymentBucketId, deploymentId, lambdas, }: AtomicDeploymentOptions) { super(); /** * S3 bucket where the code for the Lambda is stored. */ const deploymentBucket = Bucket.fromBucketArn( this, 'deploymentBucket', `arn:aws:s3:::${deploymentBucketId}` ); if (lambdas.length > 0) { // Create service role for Lambdas const lambdaRole = new Role(this, 'lambdaRole', { assumedBy: new ServicePrincipal('lambda.amazonaws.com'), description: 'Managed by Terraform Next.js', }); lambdaRole.addToPolicy( new PolicyStatement({ actions: ['logs:PutLogEvents', 'logs:CreateLogStream'], resources: ['arn:aws:logs:*:*:log-group:/aws/lambda/*'], }) ); const routes = lambdas.map((lambdaSource) => { const functionCode = new lambda.S3Code( deploymentBucket, lambdaSource.sourceKey ); const lambdaFn = new lambda.Function(this, lambdaSource.functionName, { description: deploymentId, runtime: getRuntime(lambdaSource.runtime), handler: lambdaSource.handler, code: functionCode, role: lambdaRole, timeout: Duration.seconds(29), memorySize: 1024, }); const functionUrl = lambdaFn.addFunctionUrl({ authType: lambda.FunctionUrlAuthType.NONE, }); // LogGroup for Lambda // We create the logGroup manually here, because setting the retention on // the function does not work // See: https://milangatyas.com/Blog/Detail/8/set-aws-lambda-log-group-retention-with-aws-c new LogGroup(this, `logGroup${lambdaSource.functionName}`, { logGroupName: `/aws/lambda/${lambdaFn.functionName}`, retention: RetentionDays.FIVE_DAYS, removalPolicy: RemovalPolicy.DESTROY, }); return `${lambdaSource.route} ${functionUrl.url}`; }); new CfnOutput(this, 'lambdaRoutes', { value: routes.join(' '), }); } } } export { AtomicDeploymentFunctionUrls }; ================================================ FILE: packages/deploy-trigger/src/cdk/aws-construct.ts ================================================ import { HttpApi, HttpMethod, PayloadFormatVersion, } from '@aws-cdk/aws-apigatewayv2-alpha'; import { HttpLambdaIntegration } from '@aws-cdk/aws-apigatewayv2-integrations-alpha'; import { Stack, RemovalPolicy, CfnOutput, Duration } from 'aws-cdk-lib'; import { Role, ServicePrincipal, PolicyStatement } from 'aws-cdk-lib/aws-iam'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { LogGroup, RetentionDays } from 'aws-cdk-lib/aws-logs'; import { Bucket } from 'aws-cdk-lib/aws-s3'; import { LambdaDefinition } from '../types'; import { getRuntime } from './cdk-utils'; /* ----------------------------------------------------------------------------- * CDK construct * ---------------------------------------------------------------------------*/ type AtomicDeploymentOptions = { /** * Bucket where the deployment is stored to. */ deploymentBucketId: string; /** * Unique ID of the deployment. */ deploymentId: string; /** * The lambdas that should be created as part of the stack. */ lambdas: LambdaDefinition[]; }; class AtomicDeploymentAPIGateway extends Stack { constructor({ deploymentBucketId, deploymentId, lambdas, }: AtomicDeploymentOptions) { super(); /** * S3 bucket where the code for the Lambda is stored. */ const deploymentBucket = Bucket.fromBucketArn( this, 'deploymentBucket', `arn:aws:s3:::${deploymentBucketId}` ); if (lambdas.length > 0) { // Create service role for Lambdas const lambdaRole = new Role(this, 'lambdaRole', { assumedBy: new ServicePrincipal('lambda.amazonaws.com'), description: 'Managed by Terraform Next.js', }); lambdaRole.addToPolicy( new PolicyStatement({ actions: ['logs:PutLogEvents', 'logs:CreateLogStream'], resources: ['arn:aws:logs:*:*:log-group:/aws/lambda/*'], }) ); // API Gateway const httpApi = new HttpApi(this, 'ApiGateway', { apiName: deploymentId, }); const routes = lambdas.map((lambdaSource) => { const functionCode = new lambda.S3Code( deploymentBucket, lambdaSource.sourceKey ); const lambdaFn = new lambda.Function(this, lambdaSource.functionName, { description: deploymentId, runtime: getRuntime(lambdaSource.runtime), handler: lambdaSource.handler, code: functionCode, role: lambdaRole, timeout: Duration.seconds(29), memorySize: 1024, }); // LogGroup for Lambda // We create the logGroup manually here, because setting the retention on // the function does not work // See: https://milangatyas.com/Blog/Detail/8/set-aws-lambda-log-group-retention-with-aws-c new LogGroup(this, `logGroup${lambdaSource.functionName}`, { logGroupName: `/aws/lambda/${lambdaFn.functionName}`, retention: RetentionDays.FIVE_DAYS, removalPolicy: RemovalPolicy.DESTROY, }); const lambdaIntegration = new HttpLambdaIntegration( `lambdaIntegration${lambdaSource.functionName}`, lambdaFn, { payloadFormatVersion: PayloadFormatVersion.VERSION_2_0, } ); httpApi.addRoutes({ path: `${lambdaSource.route}/{proxy+}`, methods: [HttpMethod.ANY], integration: lambdaIntegration, }); return `${lambdaSource.route} ${httpApi.apiEndpoint}${lambdaSource.route}`; }); new CfnOutput(this, 'lambdaRoutes', { value: routes.join(' '), }); } } } export { AtomicDeploymentAPIGateway }; ================================================ FILE: packages/deploy-trigger/src/cdk/cdk-utils.ts ================================================ import * as lambda from 'aws-cdk-lib/aws-lambda'; import { SupportedRuntime } from '../types'; function getRuntime(runtimeIdentifier: SupportedRuntime | string) { switch (runtimeIdentifier) { case 'nodejs12.x': return lambda.Runtime.NODEJS_12_X; case 'nodejs14.x': return lambda.Runtime.NODEJS_14_X; case 'nodejs16.x': return lambda.Runtime.NODEJS_16_X; default: throw new Error(`Runtime not supported: ${runtimeIdentifier}`); } } export { getRuntime }; ================================================ FILE: packages/deploy-trigger/src/cdk/create-cloudformation-stack.ts ================================================ import { Stack } from 'aws-cdk-lib'; import CloudFormation from 'aws-sdk/clients/cloudformation'; import { toCloudFormation } from './to-cloudformation'; type CreateCloudFormationStackReturnValue = { /** * The full arn of the created CloudFormation stack. */ stackARN: string; }; type CreateCloudFormationStackOptions = { /** * SNS topic ARNs that should be notified of stack change events * @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html#cfn-cloudformation-stack-notificationarns} */ notificationARNs: string[]; stack: Stack; stackName: string; /** * ARN of the role that should be used for managing the CloudFormation stack. */ cloudFormationRoleArn: string; }; async function createCloudFormationStack({ notificationARNs, stack, stackName, cloudFormationRoleArn, }: CreateCloudFormationStackOptions): Promise { const cloudformationClient = new CloudFormation(); const template = toCloudFormation(stack); const result = await cloudformationClient .createStack({ Capabilities: ['CAPABILITY_IAM'], NotificationARNs: notificationARNs, StackName: stackName, TemplateBody: JSON.stringify(template), RoleARN: cloudFormationRoleArn, }) .promise(); if (result.$response.error) { throw result.$response.error; } if (!result.$response.data?.StackId) { throw new Error('No stackId returned.'); } return { stackARN: result.$response.data.StackId, }; } export { createCloudFormationStack }; ================================================ FILE: packages/deploy-trigger/src/cdk/to-cloudformation.ts ================================================ import { Stack } from 'aws-cdk-lib'; import { synthesize } from 'aws-cdk-lib/core/lib/private/synthesis'; /** * Utility to create a CloudFormation template from a Stack * * @see {@link https://github.com/aws/aws-cdk/blob/3e9f04dbbd7aadb8ab4394fefd6281f1d6d30fe0/packages/%40aws-cdk/core/test/util.ts#L5} * * @param stack * @returns */ function toCloudFormation(stack: Stack) { const template = synthesize(stack, { skipValidation: true }).getStackByName( stack.stackName ).template; // Remove cdk specific parameters from the CloudFormation template delete template.Rules.CheckBootstrapVersion; delete template.Parameters.BootstrapVersion; return template; } export { toCloudFormation }; ================================================ FILE: packages/deploy-trigger/src/constants.ts ================================================ // Filename of the manifest export const deploymentConfigurationKey = '_tf-next/deployment.json'; export const manifestVersion = 1; // Defined by the Terraform statics-deploy module export const expireTagKey = 'tfnextExpire'; export const expireTagValue = 'true'; ================================================ FILE: packages/deploy-trigger/src/create-invalidation.ts ================================================ import CloudFront from 'aws-sdk/clients/cloudfront'; // Number of paths a single invalidation can hold // A invalidation should not have more than 15 paths with wildcards (*) at a time // https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects%23InvalidationLimits const limitMultiPathsPerInvalidation = 15; const limitTotalPathsPerInvalidation = 3000; /** * Splits the incoming paths into paths with tailing wildcard character (`*`), * called multiPaths and regular paths, called singlePaths * @param invalidationPaths * @returns [multiPaths, singlePaths] */ export function prepareInvalidations(invalidationPaths: string[]) { let multiPaths: string[] = []; let singlePaths: string[] = []; // Search through the for (const invalidationPath of invalidationPaths) { // Paths with `*` at the end are multiPaths if (invalidationPath.endsWith('*')) { multiPaths.push(invalidationPath); } else { singlePaths.push(invalidationPath); } } // Normalize multipaths // E.g. we have the following paths: // - /a* // - /a/b* // They can then be combined into // - /a* // 1. Sort by length DESC (n...0) // 2. Check for every path if there is a shorter path with the same beginning // If true then remove the path multiPaths = multiPaths .sort((a, b) => b.length - a.length) .filter((multiPath, index, array) => { // Search for a shorter string that is a substring multiPath for (let i = index + 1; i < array.length; i++) { // Cut the tailing `*` const pathWithoutTail = array[i].substr(0, array[i].length - 1); if (multiPath.startsWith(pathWithoutTail)) { return false; } } return true; }); // Check if regular paths are already caught by a multiPath singlePaths = singlePaths.filter((singlePath) => { for (const multiPath of multiPaths) { // Cut the tailing `*` const pathWithoutTail = multiPath.substr(0, multiPath.length - 1); if (singlePath.startsWith(pathWithoutTail)) { return false; } } return true; }); return [multiPaths, singlePaths]; } /** * Creates a chunk of paths for a CloudFront invalidation request * @param multiPaths * @param singlePaths * @param maxMultiPaths limit of multiPaths * @param maxTotalPaths limit of total paths that can be included in an invalidation * @returns */ export function createInvalidationChunk( multiPaths: string[], singlePaths: string[], maxMultiPaths: number, maxTotalPaths: number ) { let pathsChunk: string[] = []; let newSinglePaths: string[] = singlePaths; let newMultiPaths: string[] = multiPaths; // First, try to put as many singlePaths into an invalidation chunk as possible const singlePathIndex = Math.min(singlePaths.length, maxTotalPaths); if (singlePathIndex > 0) { pathsChunk = singlePaths.slice(0, singlePathIndex); newSinglePaths = singlePaths.slice(singlePathIndex); } // Check if chunk is already full and fill the remaining paths with multiPaths const numOfAvailablePathsInChunk = maxTotalPaths - pathsChunk.length; const numOfAvailableMultiPathsInChunk = Math.min( numOfAvailablePathsInChunk, maxMultiPaths ); if (numOfAvailableMultiPathsInChunk > 0) { pathsChunk.push(...multiPaths.slice(0, numOfAvailableMultiPathsInChunk)); newMultiPaths = multiPaths.slice(numOfAvailableMultiPathsInChunk); } return [pathsChunk, newMultiPaths, newSinglePaths]; } /** * Creates a batch of paths that can be used as CloudFront invalidation * @param invalidationPaths * @returns */ export function createInvalidation( invalidationId: string, multiPaths: string[], singlePaths: string[] ): [CloudFront.InvalidationBatch, string[], string[]] { const [pathsChunk, newMultiPaths, newSinglePaths] = createInvalidationChunk( multiPaths, singlePaths, limitMultiPathsPerInvalidation, limitTotalPathsPerInvalidation ); const cloudFrontInvalidationBatch: CloudFront.InvalidationBatch = { CallerReference: `${new Date().getTime()}-${invalidationId}`, Paths: { Quantity: pathsChunk.length, Items: pathsChunk, }, }; return [cloudFrontInvalidationBatch, newMultiPaths, newSinglePaths]; } ================================================ FILE: packages/deploy-trigger/src/declarations.d.ts ================================================ declare namespace NodeJS { export interface ProcessEnv { TARGET_BUCKET: string; DISTRIBUTION_ID: string; SQS_QUEUE_URL: string; DEPLOY_STATUS_SNS_ARN: string; TABLE_REGION: string; TABLE_NAME_DEPLOYMENTS: string; TABLE_NAME_ALIASES: string; CLOUDFORMATION_ROLE_ARN: string; MULTI_DEPLOYMENTS_BASE_DOMAIN?: string; } } ================================================ FILE: packages/deploy-trigger/src/deploy-trigger.ts ================================================ import { extname } from 'path'; import S3 from 'aws-sdk/clients/s3'; import unzipper from 'unzipper'; import { lookup as mimeLookup, contentType as mimeContentType, } from 'mime-types'; import { deploymentConfigurationKey } from './constants'; import { DeploymentConfig, FileResult, LambdaDefinition } from './types'; // Metadata Key where the buildId is stored const DEPLOYMENT_ID_META_KEY = 'tf-next-deployment-id'; /** * Cache control header for immutable files that are stored in _next/static */ const CacheControlImmutable = 'public,max-age=31536000,immutable'; /** * Static files that have no hashed filenames * * Must be refetched by the browser every time (max-age=0). * But CloudFront CDN can hold the copy infinite time until a invalidation * removes it (s-maxage=31536000). * https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html#ExpirationDownloadDist */ const CacheControlStatic = 'public,max-age=0,must-revalidate,s-maxage=31536000'; interface Props { s3: S3; sourceBucket: string; deployBucket: string; key: string; } interface Response { files: FileResult[]; lambdas: LambdaDefinition[]; deploymentId: string; deploymentConfig: DeploymentConfig; } async function deployTrigger({ s3, key, sourceBucket, deployBucket, }: Props): Promise { let deploymentConfig: DeploymentConfig | null = null; let deploymentId: string | undefined; const params = { Key: key, Bucket: sourceBucket, }; // Get the deploymentId from the metadata of the package // If none is present, create a random id const zipHeaders = await s3.headObject(params).promise(); if (zipHeaders.Metadata && DEPLOYMENT_ID_META_KEY in zipHeaders.Metadata) { deploymentId = zipHeaders.Metadata[DEPLOYMENT_ID_META_KEY]; } if (!deploymentId) { throw new Error('Could not get the deployment ID from the uploaded file.'); } // Get the object that triggered the event const zip = s3 .getObject(params) .createReadStream() .pipe(unzipper.Parse({ forceStream: true })); const fileUploads: Promise[] = []; const lambdaUploads: Promise[] = []; /** * Unpacks a deployment zip with the following format: * * deployment.zip * ├── lambdas/ * | ├── lambda1.zip * | └── lambda2.zip * ├── static/ * | ├── _next/... * | └── prerendered-site * └── config.json * * And uploads it to the bucket in the following way: * * / * ├── lambdas/ * | ├── lambda1.zip * | └── lambda2.zip * ├── static/ * | ├── _next/... * | └── prerendered-site * └── manifest.json (contains the inventory of the `/` path) */ for await (const e of zip) { const entry = e as unzipper.Entry; const { path: filePath, type } = entry; if (type === 'File') { let contentType: string | undefined; let cacheControl: string | undefined; let targetKey: string; if (filePath === 'config.json') { const content = await entry.buffer(); deploymentConfig = JSON.parse(content.toString()) as DeploymentConfig; continue; } else if (filePath.startsWith('lambdas')) { contentType = 'application/zip'; targetKey = `${deploymentId}/lambdas/${filePath}`; lambdaUploads.push( s3 .upload({ Bucket: deployBucket, Key: targetKey, Body: entry, ContentType: contentType, }) .promise() ); } else { const filePathWithoutPrefix = filePath.substring('static/'.length); targetKey = `${deploymentId}/static/${filePathWithoutPrefix}`; // Get ContentType // Static pre-rendered pages have no file extension, // files without extension get HTML mime type as fallback // // Explicitly use the extname here since mime treats files without // extension e.g. `/es` as extension => `application/ecmascript` const mimeType = mimeLookup(extname(filePath)); const possibleContentType = typeof mimeType === 'string' ? mimeContentType(mimeType) : false; contentType = typeof possibleContentType === 'string' ? possibleContentType : 'text/html; charset=utf-8'; // When the file is static (served from /_next/*) then it has immutable // client - side caching). // Otherwise it is only immutable on the CDN cacheControl = filePathWithoutPrefix.startsWith('_next/') ? CacheControlImmutable : CacheControlStatic; // Sorry, but you cannot override the manifest if (filePath !== deploymentConfigurationKey) { fileUploads.push( s3 .upload({ Bucket: deployBucket, Key: targetKey, Body: entry, ContentType: contentType, CacheControl: cacheControl, }) .promise() ); } } } else { entry.autodrain(); } } const files = (await Promise.all(fileUploads)).map((obj) => { return { key: obj.Key, eTag: obj.ETag }; }); const lambdaFiles = (await Promise.all(lambdaUploads)).map((obj) => { return { key: obj.Key, eTag: obj.ETag }; }); // Cleanup await s3.deleteObject(params).promise(); if (deploymentConfig === null) { throw new Error( 'No deploymentConfig was found inside the uploaded package.' ); } const lambdas: LambdaDefinition[] = []; for (const [key, lambda] of Object.entries(deploymentConfig.lambdas)) { // Find the uploaded Lambda const lambdaFile = lambdaFiles.find((uploadedArchive) => { return uploadedArchive.key.endsWith(lambda.filename); }); if (lambdaFile) { lambdas.push({ route: lambda.route, sourceKey: lambdaFile.key, functionName: key, handler: lambda.handler, runtime: lambda.runtime, }); } } return { deploymentConfig, files, lambdas, deploymentId, }; } export { DEPLOYMENT_ID_META_KEY, deployTrigger }; ================================================ FILE: packages/deploy-trigger/src/get-or-create-manifest.ts ================================================ import S3 from 'aws-sdk/clients/s3'; import { manifestVersion } from './constants'; import { FileResult, Manifest, ManifestFile } from './types'; import { generateRandomBuildId } from './utils/random-id'; async function getAllObjectsFromBucket( s3: S3, bucketId: string ): Promise { let keys: FileResult[] = []; let hasMore = true; let ContinuationToken: string | undefined; while (hasMore) { const response = await s3 .listObjectsV2({ Bucket: bucketId, ContinuationToken }) .promise(); if (response.Contents) { const _keys = response.Contents.map((entry) => ({ key: entry.Key!, eTag: entry.ETag!, })); keys = keys.concat(_keys); } // Has more than 1000 entries in the last request, // so we need to make another call hasMore = Boolean(response.IsTruncated); ContinuationToken = response.NextContinuationToken; } return keys; } export async function getOrCreateManifest( s3: S3, bucketId: string, deploymentConfigurationKey: string ): Promise { let manifest: Manifest | undefined; try { const manifestObj = await s3 .getObject({ Key: deploymentConfigurationKey, Bucket: bucketId, }) .promise(); if (manifestObj.Body) { // Parse the manifest const manifestBody = manifestObj.Body.toString('utf-8'); manifest = JSON.parse(manifestBody) as Manifest; } } catch (err) {} // If manifest parsing was successful return it if (manifest) { return manifest; } // Create a new manifest with existing files from the bucket const fileKeys = await getAllObjectsFromBucket(s3, bucketId); const newBuildId = generateRandomBuildId(); const files: Record = {}; for (const fileKey of fileKeys) { files[fileKey.key] = { buildId: [newBuildId], eTag: fileKey.eTag, }; } return { currentBuild: newBuildId, version: manifestVersion, files, }; } ================================================ FILE: packages/deploy-trigger/src/handler.ts ================================================ import { updateDeploymentStatusCreateInProgress, getDeploymentById, updateDeploymentStatusCreateFailed, updateDeploymentStatusFinished, reverseHostname, createAlias, } from '@millihq/tfn-dynamodb-actions'; import { S3Event, S3EventRecord, SQSEvent, SQSRecord } from 'aws-lambda'; import CloudFront from 'aws-sdk/clients/cloudfront'; import DynamoDB from 'aws-sdk/clients/dynamodb'; import S3 from 'aws-sdk/clients/s3'; import SQS from 'aws-sdk/clients/sqs'; import { deployTrigger } from './deploy-trigger'; import { ExpireValue } from './types'; import { updateManifest } from './update-manifest'; import { deploymentConfigurationKey } from './constants'; import { getOrCreateManifest } from './get-or-create-manifest'; import { createInvalidation, prepareInvalidations, } from './create-invalidation'; import { ensureEnv } from './utils/ensure-env'; import { generateRandomId } from './utils/random-id'; import { AtomicDeploymentAPIGateway } from './cdk/aws-construct'; import { AtomicDeploymentFunctionUrls } from './cdk/aws-construct-function-urls'; import { createCloudFormationStack } from './cdk/create-cloudformation-stack'; interface InvalidationSQSMessage { id: string; distributionId: string; retries: number; multiPaths: string[]; singlePaths: string[]; } // Default value after how many days an old deployment should be expired const defaultExpireAfterDays = 30; // Timeout in seconds to wait after an invalidation is send to SQS const timeOutBetweenInvalidations = 60; // Sets the number of retries for an invalidation const numberOfRetriesForInvalidation = 3; function parseExpireAfterDays() { return defaultExpireAfterDays; } async function createCloudFrontInvalidation( incomingMultiPaths: string[], incomingSinglePaths: string[], distributionId: string, incomingRetries: number ) { let retries = incomingRetries; // Invalidate the paths from the CloudFront distribution const cloudFrontClient = new CloudFront({ apiVersion: '2020-05-31', }); const invalidationId = generateRandomId(4); let [InvalidationBatch, multiPaths, singlePaths] = createInvalidation( invalidationId, incomingMultiPaths, incomingSinglePaths ); try { await cloudFrontClient .createInvalidation({ DistributionId: distributionId, InvalidationBatch, }) .promise(); } catch (error) { const err = error as any; console.log(err); if (err.code === 'TooManyInvalidationsInProgress') { // Send the invalidation back to the queue if (retries < numberOfRetriesForInvalidation) { console.log('Invalidation rescheduled'); retries = retries + 1; multiPaths = incomingMultiPaths; singlePaths = incomingSinglePaths; } } } // Create SQS event if there are paths left to invalidate if (multiPaths.length + singlePaths.length > 0) { const MessageBody: InvalidationSQSMessage = { id: invalidationId, distributionId, multiPaths, singlePaths, retries, }; const sqsClient = new SQS(); try { await sqsClient .sendMessage({ QueueUrl: process.env.SQS_QUEUE_URL, MessageBody: JSON.stringify(MessageBody), DelaySeconds: timeOutBetweenInvalidations, }) .promise(); } catch (err) { // TODO: Find way to handle errors here console.log(err); } } } /** * Handler of the Lambda that is invoked * Trigger can be one of the following: * - S3 (From static upload) * - SQS (Queued CloudFront invalidations) * @param event S3Event or SQSEvent */ export const handler = async function (event: S3Event | SQSEvent) { // SQS invokes can contain up to 10 records for (const Record of event.Records) { if ('s3' in Record) { // Check if S3 Record await s3Handler(Record); } else { await sqsHandler(Record); } } }; async function s3Handler(Record: S3EventRecord) { const dynamoDBRegion = ensureEnv('TABLE_REGION'); const dynamoDBTableNameDeployments = ensureEnv('TABLE_NAME_DEPLOYMENTS'); const dynamoDBTableNameAliases = ensureEnv('TABLE_NAME_ALIASES'); const dynamoDBClient = new DynamoDB({ region: dynamoDBRegion, }); let s3: S3; // Only for testing purposes when connecting against a local S3 backend if (process.env.__DEBUG__USE_LOCAL_BUCKET) { s3 = new S3(JSON.parse(process.env.__DEBUG__USE_LOCAL_BUCKET)); } else { s3 = new S3({ apiVersion: '2006-03-01' }); } const deployBucket = process.env.TARGET_BUCKET; const distributionId = process.env.DISTRIBUTION_ID; const expireAfterDays: ExpireValue = parseExpireAfterDays(); // Get needed information of the event const { object } = Record.s3; const { key } = object; const sourceBucket = Record.s3.bucket.name; const manifest = await getOrCreateManifest( s3, deployBucket, deploymentConfigurationKey ); // Unpack the package to S3 const { files, deploymentId, lambdas, deploymentConfig } = await deployTrigger({ s3, sourceBucket, deployBucket, key, }); // Get the deployment from the Database const deployment = await getDeploymentById({ dynamoDBClient, deploymentTableName: dynamoDBTableNameDeployments, deploymentId, }); if (!deployment) { throw new Error( `Deployment with id ${deploymentId} could not be found in database.` ); // TODO: Cleanup extracted files from S3 } // Static deployment, doesn't need a CloudFormation template if (lambdas.length === 0) { const lambdaRoutes = '{}'; const routes = JSON.stringify(deploymentConfig.routes); const prerenders = JSON.stringify(deploymentConfig.prerenders); // TODO: Handle case when multi deployments is not enabled const deploymentAliasBasePath = '/'; const deploymentAliasHostname = deploymentId + process.env.MULTI_DEPLOYMENTS_BASE_DOMAIN; const deploymentAliasHostnameRev = reverseHostname(deploymentAliasHostname); await createAlias({ dynamoDBClient, hostnameRev: deploymentAliasHostnameRev, isDeploymentAlias: true, aliasTableName: dynamoDBTableNameAliases, createDate: new Date(), deploymentId, lambdaRoutes, routes, prerenders, basePath: deploymentAliasBasePath, }); await updateDeploymentStatusFinished({ dynamoDBClient, deploymentTableName: dynamoDBTableNameDeployments, deploymentId, routes, prerenders, lambdaRoutes, deploymentAlias: deploymentAliasHostname + deploymentAliasBasePath, }); } else { // Create the CloudFormation stack for the lambdas const atomicDeployment = deployment.DeploymentTemplate === 'API_GATEWAY' ? new AtomicDeploymentAPIGateway({ deploymentId, deploymentBucketId: deployBucket, lambdas: lambdas, }) : new AtomicDeploymentFunctionUrls({ deploymentId, deploymentBucketId: deployBucket, lambdas: lambdas, }); try { const stackName = `tfn-${deploymentId}`; const { stackARN } = await createCloudFormationStack({ notificationARNs: [process.env.DEPLOY_STATUS_SNS_ARN], stack: atomicDeployment, // Stackname has to match [a-zA-Z][-a-zA-Z0-9]* stackName, cloudFormationRoleArn: process.env.CLOUDFORMATION_ROLE_ARN, }); // TODO: Move this to the deployment controller await updateDeploymentStatusCreateInProgress({ dynamoDBClient, deploymentTableName: dynamoDBTableNameDeployments, deploymentId, routes: JSON.stringify(deploymentConfig.routes), prerenders: JSON.stringify(deploymentConfig.prerenders), cloudFormationStack: stackARN, }); } catch (error) { console.error(error); await updateDeploymentStatusCreateFailed({ dynamoDBClient, deploymentTableName: dynamoDBTableNameDeployments, deploymentId, }); } } // Update the manifest const { invalidate: invalidationPaths } = await updateManifest({ s3, bucket: deployBucket, expireAfterDays, files, buildId: deploymentId, deploymentConfigurationKey, manifest, }); // Allow skipping the creation of the invalidation for local e2e tests if (!process.env.__DEBUG__SKIP_INVALIDATIONS) { const [multiPaths, singlePaths] = prepareInvalidations(invalidationPaths); await createCloudFrontInvalidation( multiPaths, singlePaths, distributionId, 0 ); } } async function sqsHandler(Record: SQSRecord) { const body = JSON.parse(Record.body) as InvalidationSQSMessage; await createCloudFrontInvalidation( body.multiPaths, body.singlePaths, body.distributionId, body.retries ); } ================================================ FILE: packages/deploy-trigger/src/types.ts ================================================ import { Route } from '@vercel/routing-utils'; /** * Supported runtime values for the Lambdas. */ export type SupportedRuntime = 'nodejs12.x' | 'nodejs14.x' | 'nodejs16.x'; export type LambdaDefinition = { /** * Internal functionName, must be unique in this stack. */ functionName: string; /** * Handler of the Lambda function. */ handler: string; /** * Key of the zip that is associated with the Lambda. */ sourceKey: string; /** * Route where the Lambda should be called from. */ route: string; /** * The runtime of the Lambda. */ runtime: SupportedRuntime; }; export type DeploymentConfig = { routes: Route[]; lambdas: Record< string, { handler: string; runtime: SupportedRuntime; filename: string; route: string; } >; lambdaRoutes: string[]; prerenders: Record< string, { lambda: string; } >; staticRoutes: string[]; version: number; }; export type ExpireValue = number | 'never'; export interface ManifestFile { buildId: string[]; expiredAt?: string; eTag?: string; } export interface Manifest { version: number; currentBuild: string; // All files that are currently managed by the manifest files: Record; } export interface FileResult { key: string; eTag: string; } ================================================ FILE: packages/deploy-trigger/src/update-manifest.ts ================================================ import S3 from 'aws-sdk/clients/s3'; import { expireTagKey, expireTagValue } from './constants'; import { ExpireValue, FileResult, Manifest, ManifestFile } from './types'; // Regex mather for paths with dynamic parts // e.g. - [id]/index // - test/[...slug]/index const dynamicPartMatcher = new RegExp(/\/?\[[^\]]+\].*/); async function expireFiles(s3: S3, bucketId: string, files: string[]) { // Set the expiration tags on the expired files for (const file of files) { // Reset S3 Object Timestamp (CreationDate) // So the expire rule runs at (t + expireAfterDays) // https://stackoverflow.com/a/18730911/831465 await s3 .copyObject({ Bucket: bucketId, CopySource: `/${bucketId}/${file}`, Key: file, StorageClass: 'STANDARD', // This makes the Timestamp reset }) .promise(); // Set the expiration tag const existingTags = await s3 .getObjectTagging({ Bucket: bucketId, Key: file, }) .promise(); await s3 .putObjectTagging({ Bucket: bucketId, Key: file, Tagging: { TagSet: [ ...existingTags.TagSet, { Key: expireTagKey, Value: expireTagValue, }, ], }, }) .promise(); } } async function removeExpirationFromFiles( s3: S3, bucketId: string, files: string[] ) { // Remove expire tags from file for (const file of files) { const tags = await s3 .getObjectTagging({ Bucket: bucketId, Key: file, }) .promise(); // Remove expire tag from the tagSet const newTags = tags.TagSet.filter(({ Key }) => { return Key !== expireTagKey; }); await s3.putObjectTagging({ Bucket: bucketId, Key: file, Tagging: { TagSet: newTags, }, }); } } async function deleteFiles(s3: S3, bucketId: string, files: string[]) { try { await s3.deleteObjects({ Bucket: bucketId, Delete: { Objects: files.map((file) => ({ Key: file, })), }, }).promise; } catch (err) { // Fail silently when the file is already deleted } } function getInvalidationKeys(files: string[]) { const invalidations: string[] = []; for (const file of files) { // Skip static assets files with hashes if (file.startsWith('_next')) { continue; } // check for root route // Since we don't want to kill the whole cache we cannot return /* here // but use // - `/` (without query params) // - `/?*` (with query params) if (file === 'index') { invalidations.push('/', '/?*'); continue; } // Check if the a dynamic part is in the filename // e.g. - [abc]/index -> * // - test/[...slug] -> test/* if (file.match(dynamicPartMatcher)) { invalidations.push(`/${file.replace(dynamicPartMatcher, '*')}`); continue; } // Default index routes // /some/route/index -> /some/route* if (file.endsWith('/index')) { invalidations.push(`/${file.slice(0, -6)}*`); continue; } invalidations.push(`/${file}*`); } return invalidations; } interface Props { s3: S3; bucket: string; buildId: string; files: FileResult[]; expireAfterDays: ExpireValue; deploymentConfigurationKey: string; manifest: Manifest; } interface Response { expire: string[]; restore: string[]; deleted: string[]; invalidate: string[]; manifest: Manifest; } /** * Reads or creates a deployment.json file which holds information about * which files were included in the deployment * * It returns an array of keys that should be expired */ async function updateManifest({ files, buildId, s3, deploymentConfigurationKey, expireAfterDays, bucket, manifest, }: Props): Promise { const expire: string[] = []; const deleted: string[] = []; const restore: string[] = []; const unchangedFiles = new Set(); const newManifestFiles: Record = {}; const { files: manifestFiles } = manifest; const now = new Date(); const minExpireDate = expireAfterDays !== 'never' ? new Date(now.getDate() - expireAfterDays) : now; // Merge old and new file keys const fileKeys = files.map(({ key }) => key); // Convert to Set -> make sure we have unique keys const allFiles = new Set([...fileKeys, ...Object.keys(manifestFiles)]); for (const fileKey of allFiles) { // New file if (!(fileKey in manifestFiles)) { const file = files.find(({ key }) => key === fileKey); newManifestFiles[fileKey] = { buildId: [buildId], eTag: file?.eTag, }; continue; } const file = manifestFiles[fileKey]; let isDeleted = false; // Get the files that can be expired const changedFile = files.find(({ key }) => key === fileKey); if (changedFile === undefined) { // If the file it is not present in the current build // Check if the file is already expired if (!file.expiredAt) { if (fileKey.startsWith('_next')) { // Treat the file as static asset that can be expired expire.push(fileKey); file.expiredAt = now.toUTCString(); } else { // Treat the file as static route that should be deleted immediately deleted.push(fileKey); isDeleted = true; } } } else { // If the file already exists and is also present in the current build file.buildId.push(buildId); if (file.eTag === changedFile.eTag) { unchangedFiles.add(fileKey); } else { file.eTag = changedFile.eTag; } if (file.expiredAt) { // If the file was already expired we have to undo it restore.push(fileKey); delete file.expiredAt; } } // Check if a file is already expired and can be removed from the list if (expireAfterDays !== 'never' && file.expiredAt) { const fileExpirationDate = new Date(file.expiredAt); // It is > here instead of >= to delete files immediately when // `expireAfterDays` is set to 0 if (fileExpirationDate > minExpireDate) { // Expire date is not yet reached // keep the file in the manifest newManifestFiles[fileKey] = file; } } else { if (!isDeleted) { newManifestFiles[fileKey] = file; } } } const newManifest = { ...manifest, currentBuild: buildId, files: newManifestFiles, }; // Expire files await expireFiles(s3, bucket, expire); // Restore files await removeExpirationFromFiles(s3, bucket, restore); // Delete files await deleteFiles(s3, bucket, deleted); // Calculate the invalidation keys for CloudFront // Check from eTag which files have changed const changedFiles = Array.from(allFiles).filter( (fileKey) => !unchangedFiles.has(fileKey) ); const invalidate = getInvalidationKeys(changedFiles); // Write the new manifest to the bucket await s3 .putObject({ Bucket: bucket, Key: deploymentConfigurationKey, Body: JSON.stringify(newManifest), }) .promise(); return { expire, restore, manifest: newManifest, invalidate, deleted }; } export { updateManifest, getInvalidationKeys }; ================================================ FILE: packages/deploy-trigger/src/utils/ensure-env.ts ================================================ /** * Ensures that the environment variables */ function ensureEnv(key: string, defaultValue?: string): string { const value = process.env[key]; if (typeof value === 'string') { return value; } if (typeof defaultValue === 'string') { return defaultValue; } throw new Error( `Environment variable "${key}" is required, but was not set.` ); } export { ensureEnv }; ================================================ FILE: packages/deploy-trigger/src/utils/random-id.ts ================================================ import { pseudoRandomBytes } from 'crypto'; export function generateRandomId(length: number) { return pseudoRandomBytes(length).toString('hex'); } export function generateRandomBuildId() { return generateRandomId(16); } ================================================ FILE: packages/deploy-trigger/test/create-invalidation.test.ts ================================================ import { createInvalidationChunk, prepareInvalidations, } from '../src/create-invalidation'; describe('prepareInvalidations', () => { test('Collapse multiPaths', async () => { const invalidationPaths = ['a/b*', 'a*', 'c/d**', 'c*']; const [multiPaths, singlePaths] = prepareInvalidations(invalidationPaths); expect(singlePaths.length).toBe(0); expect(multiPaths).toEqual(['a*', 'c*']); }); test('Remove single paths that are caught by multiPath', () => { const invalidationPaths = ['a*', 'aaa', 'bbb']; const [multiPaths, singlePaths] = prepareInvalidations(invalidationPaths); expect(singlePaths).toEqual(['bbb']); expect(multiPaths).toEqual(['a*']); }); }); describe('createInvalidationChunk', () => { const maxMultiPaths = 15; const maxTotalPaths = 3000; test('Full singlePaths', () => { const singlePaths = [...Array(maxTotalPaths).keys()].map( () => 'singlePath' ); const multiPaths = [...Array(maxMultiPaths).keys()].map(() => 'multiPath'); const [pathsChunk, newMultiPaths, newSinglePaths] = createInvalidationChunk( multiPaths, singlePaths, maxMultiPaths, maxTotalPaths ); expect(pathsChunk.length).toBe(maxTotalPaths); expect(newSinglePaths.length).toBe(0); expect(newMultiPaths.length).toBe(maxMultiPaths); }); test('Overfull singlePaths', () => { const overfillSinglePathsBy = 100; const singlePaths = [ ...Array(maxTotalPaths + overfillSinglePathsBy).keys(), ].map(() => 'singlePath'); const multiPaths = [...Array(maxMultiPaths).keys()].map(() => 'multiPath'); const [pathsChunk, newMultiPaths, newSinglePaths] = createInvalidationChunk( multiPaths, singlePaths, maxMultiPaths, maxTotalPaths ); expect(pathsChunk.length).toBe(maxTotalPaths); expect(newSinglePaths.length).toBe(overfillSinglePathsBy); expect(newMultiPaths.length).toBe(maxMultiPaths); }); test('No singlePaths', () => { const overfillMultiPathsBy = 10; const singlePaths: string[] = []; const multiPaths = [ ...Array(maxMultiPaths + overfillMultiPathsBy).keys(), ].map(() => 'multiPath'); const [pathsChunk, newMultiPaths, newSinglePaths] = createInvalidationChunk( multiPaths, singlePaths, maxMultiPaths, maxTotalPaths ); expect(pathsChunk.length).toBe(maxMultiPaths); expect(newSinglePaths.length).toBe(0); expect(newMultiPaths.length).toBe(overfillMultiPathsBy); }); test('Fillup paths with multiPaths', () => { const allowedMultiPaths = 7; const singlePaths = [ ...Array(maxTotalPaths - allowedMultiPaths).keys(), ].map(() => 'singlePath'); const multiPaths = [...Array(maxMultiPaths).keys()].map(() => 'multiPath'); const [pathsChunk, newMultiPaths, newSinglePaths] = createInvalidationChunk( multiPaths, singlePaths, maxMultiPaths, maxTotalPaths ); expect(pathsChunk.length).toBe(maxTotalPaths); expect(newSinglePaths.length).toBe(0); expect(newMultiPaths.length).toBe(maxMultiPaths - allowedMultiPaths); }); }); ================================================ FILE: packages/deploy-trigger/test/deploy-trigger.test.ts ================================================ import * as fs from 'fs'; import S3 from 'aws-sdk/clients/s3'; import { BucketHandler, s3CreateBucket as createBucket, } from '../../../test/utils'; import { DEPLOYMENT_ID_META_KEY, deployTrigger } from '../src/deploy-trigger'; import { generateZipBundle } from './test-utils'; import { generateRandomBuildId } from '../src/utils/random-id'; describe('deploy-trigger', () => { let s3: S3; beforeAll(() => { // Initialize the local S3 client s3 = new S3({ endpoint: process.env.S3_ENDPOINT, accessKeyId: process.env.MINIO_ACCESS_KEY, secretAccessKey: process.env.MINIO_SECRET_KEY, s3ForcePathStyle: true, signatureVersion: 'v4', sslEnabled: false, }); }); describe('Extract an uploaded deployment', () => { let sourceBucket: BucketHandler; let targetBucket: BucketHandler; beforeAll(async () => { // Initialize buckets sourceBucket = await createBucket(s3); targetBucket = await createBucket(s3); }); afterAll(async () => { // Cleanup buckets await sourceBucket.destroy(); await targetBucket.destroy(); }); test('Extract an uploaded deployment', async () => { const staticRouteKey = '404'; const localeStaticRouteKey = 'es'; const staticAssetKey = '_next/static/some.js'; const packageContent = [ 'index', localeStaticRouteKey, staticRouteKey, staticAssetKey, ]; // Create an dummy deployment package const bundle = await generateZipBundle( { routes: [], lambdas: {}, lambdaRoutes: [], prerenders: {}, staticRoutes: [], version: 1, }, packageContent ); const initialDeploymentId = generateRandomBuildId(); const packageKey = `${initialDeploymentId}.zip`; await s3 .upload({ Key: packageKey, Body: fs.createReadStream(bundle), Bucket: sourceBucket.bucketName, Metadata: { [DEPLOYMENT_ID_META_KEY]: initialDeploymentId, }, }) .promise(); // Run deployTrigger const { deploymentId, files } = await deployTrigger({ s3, sourceBucket: sourceBucket.bucketName, deployBucket: targetBucket.bucketName, key: packageKey, }); expect(deploymentId).toBe(initialDeploymentId); expect(files.length).toBe(packageContent.length); // Check targetBucket const { Contents } = await s3 .listObjects({ Bucket: targetBucket.bucketName }) .promise(); // Check if the whole content from the deployment package is uploaded // to the target bucket for (const fileKey of packageContent) { expect(Contents).toEqual( expect.arrayContaining([ expect.objectContaining({ Key: `${deploymentId}/static/${fileKey}`, }), ]) ); } // Check the mime-type and Cache-Control headers const localeStaticRouteObject = await s3 .getObject({ Bucket: targetBucket.bucketName, Key: `${deploymentId}/static/${localeStaticRouteKey}`, }) .promise(); expect(localeStaticRouteObject.ContentType).toBe( 'text/html; charset=utf-8' ); expect(localeStaticRouteObject.CacheControl).toBe( 'public,max-age=0,must-revalidate,s-maxage=31536000' ); // Check the mime-type and Cache-Control headers const staticRouteObject = await s3 .getObject({ Bucket: targetBucket.bucketName, Key: `${deploymentId}/static/${staticRouteKey}`, }) .promise(); expect(staticRouteObject.ContentType).toBe('text/html; charset=utf-8'); expect(staticRouteObject.CacheControl).toBe( 'public,max-age=0,must-revalidate,s-maxage=31536000' ); const staticAssetObject = await s3 .getObject({ Bucket: targetBucket.bucketName, Key: `${deploymentId}/static/${staticAssetKey}`, }) .promise(); expect(staticAssetObject.ContentType).toBe( 'application/javascript; charset=utf-8' ); expect(staticAssetObject.CacheControl).toBe( 'public,max-age=31536000,immutable' ); }); }); }); ================================================ FILE: packages/deploy-trigger/test/get-or-create-manifest.test.ts ================================================ import S3 from 'aws-sdk/clients/s3'; import { BucketHandler, s3CreateBucket as createBucket, } from '../../../test/utils'; import { deploymentConfigurationKey, manifestVersion } from '../src/constants'; import { getOrCreateManifest } from '../src/get-or-create-manifest'; import { Manifest } from '../src/types'; import { generateS3ClientForTesting } from './test-utils'; describe('deploy-trigger', () => { let s3: S3; beforeAll(() => { // Initialize the local S3 client s3 = generateS3ClientForTesting(); }); describe('get or create manifest', () => { let bucket: BucketHandler; const fileNames = [ '_next/static/chunks/b5500a63de92ae71a2560a1f3ee9c7923c1de4ef.1f52a3ec41a5d5095e70.js', '_next/static/chunks/framework.972e47ad649981044547.js', '_next/static/chunks/pages/[teamSlug]/[id]-08ca39a64982590c011d.js', '404', ]; beforeAll(async () => { bucket = await createBucket(s3); // Add some fake files to the bucket for (const file of fileNames) { await s3 .putObject({ Bucket: bucket.bucketName, Key: file, Body: '', }) .promise(); } }); afterAll(async () => { await bucket.destroy(); }); test('pre-filled bucket with no manifest', async () => { const manifest = await getOrCreateManifest( s3, bucket.bucketName, deploymentConfigurationKey ); expect(manifest.version).toBe(manifestVersion); expect(typeof manifest.currentBuild).toBe('string'); expect(Object.keys(manifest.files).length).toBe(fileNames.length); for (const file of fileNames) { expect(manifest.files[file]).toBeDefined(); expect(manifest.files[file].buildId).toContain(manifest.currentBuild); expect(manifest.files[file].expiredAt).not.toBeDefined(); } }); }); describe('Manifest from empty bucket', () => { let bucket: BucketHandler; beforeAll(async () => { bucket = await createBucket(s3); }); afterAll(async () => { await bucket.destroy(); }); test('Manifest with no files', async () => { const manifest = await getOrCreateManifest( s3, bucket.bucketName, deploymentConfigurationKey ); expect(manifest.version).toBe(manifestVersion); expect(typeof manifest.currentBuild).toBe('string'); expect(Object.keys(manifest.files).length).toBe(0); }); }); describe('Get existing manifest', () => { const manifestBody: Manifest = { currentBuild: 'abc', version: 1, files: { '123': { buildId: ['def'], expiredAt: new Date().toString(), }, }, }; let bucket: BucketHandler; beforeAll(async () => { bucket = await createBucket(s3); // Add the manifest to the bucket await s3 .putObject({ Bucket: bucket.bucketName, Key: deploymentConfigurationKey, Body: JSON.stringify(manifestBody), }) .promise(); }); afterAll(async () => { await bucket.destroy(); }); test('Manifest should be found', async () => { const manifest = await getOrCreateManifest( s3, bucket.bucketName, deploymentConfigurationKey ); expect(manifest).toMatchObject(manifestBody); }); }); }); ================================================ FILE: packages/deploy-trigger/test/test-utils.ts ================================================ import * as crypto from 'crypto'; import * as fs from 'fs'; import archiver from 'archiver'; import S3 from 'aws-sdk/clients/s3'; import * as tmp from 'tmp'; import { DeploymentConfig } from '../src/types'; export function generateS3ClientForTesting() { return new S3({ endpoint: process.env.S3_ENDPOINT, accessKeyId: process.env.MINIO_ACCESS_KEY, secretAccessKey: process.env.MINIO_SECRET_KEY, s3ForcePathStyle: true, signatureVersion: 'v4', sslEnabled: false, }); } /** * Creates a zip archive with dummy files */ export async function generateZipBundle( deploymentConfig: DeploymentConfig, filesNames: string[] ) { return new Promise((resolve) => { const tmpFile = tmp.fileSync(); const output = fs.createWriteStream(tmpFile.name); output.on('close', () => resolve(tmpFile.name)); const archive = archiver('zip', { zlib: { level: 5 }, }); archive.pipe(output); archive.append(JSON.stringify(deploymentConfig), { name: 'config.json' }); for (const file of filesNames) { archive.append('', { name: file, prefix: 'static/' }); } archive.finalize(); }); } export function addFilesToS3Bucket( s3: S3, bucketId: string, fileNames: string[] ) { const promises = []; for (const fileName of fileNames) { // Fill with random body to create different etags in S3 const body = crypto.randomBytes(20).toString('hex'); promises.push( s3 .putObject({ Bucket: bucketId, Key: fileName, Body: body, }) .promise() ); } return Promise.all(promises); } ================================================ FILE: packages/deploy-trigger/test/update-manifest.test.ts ================================================ import S3 from 'aws-sdk/clients/s3'; import { BucketHandler, s3CreateBucket as createBucket, } from '../../../test/utils'; import { deploymentConfigurationKey, expireTagKey, expireTagValue, } from '../src/constants'; import { getOrCreateManifest } from '../src/get-or-create-manifest'; import { Manifest } from '../src/types'; import { getInvalidationKeys, updateManifest } from '../src/update-manifest'; import { generateRandomBuildId } from '../src/utils/random-id'; import { addFilesToS3Bucket, generateS3ClientForTesting } from './test-utils'; describe('deploy-trigger', () => { let s3: S3; let bucket: BucketHandler; beforeAll(() => { // Initialize the local S3 client s3 = generateS3ClientForTesting(); }); beforeEach(async () => { bucket = await createBucket(s3); }); afterEach(async () => { await bucket.destroy(); }); describe('update manifest', () => { const toBeExpiredFiles = [ // Static routes 'a', 'b/c', // root index routes 'index', // Static assets '_next/a.js', '_next/b.js', ]; let manifest: Manifest; beforeEach(async () => { await addFilesToS3Bucket(s3, bucket.bucketName, toBeExpiredFiles); manifest = await getOrCreateManifest( s3, bucket.bucketName, deploymentConfigurationKey ); // Wait a second // So that we can spot a difference on LastModified dates in S3 await new Promise((resolve) => setTimeout(resolve, 1000)); }); test('should expire files', async () => { const buildId = generateRandomBuildId(); const files = [ // Replace route { key: 'a', eTag: '1', }, // Delete route // /b/c -> delete // Add new route { key: 'd', eTag: '1' }, // Keep asset { key: '_next/a.js', eTag: '1' }, // Remove asset // /_next/b.js -> expire // New asset { key: '_next/c.js', eTag: '1' }, // Index route { key: 'e/f/index', eTag: '1' }, ]; // Get the soon to be expired files before the update const expiredObjectBeforeUpdate = await s3 .getObject({ Bucket: bucket.bucketName, Key: '_next/b.js' }) .promise(); const { manifest: updatedManifest, expire, restore, invalidate, deleted, } = await updateManifest({ s3, bucket: bucket.bucketName, buildId, deploymentConfigurationKey, expireAfterDays: 30, files, manifest, }); // No restores here expect(restore.length).toBe(0); expect(expire).toContain('_next/b.js'); const expiredS3Object = await s3 .getObject({ Bucket: bucket.bucketName, Key: '_next/b.js', }) .promise(); // Check that modify date has changed after update expect(expiredObjectBeforeUpdate.LastModified).toBeDefined(); expect(expiredS3Object.LastModified).toBeDefined(); expect(expiredObjectBeforeUpdate.LastModified).not.toEqual( expiredS3Object.LastModified ); const expiredS3ObjectTags = await s3 .getObjectTagging({ Bucket: bucket.bucketName, Key: '_next/b.js', }) .promise(); expect(expiredS3ObjectTags.TagSet).toContainEqual( expect.objectContaining({ Key: expireTagKey, Value: expireTagValue, }) ); const shouldNotExpired = ['_next/a.js', '_next/c.js', 'a', '/b/c', 'd']; expect(expire).not.toEqual(expect.arrayContaining(shouldNotExpired)); for (const notExpired of ['_next/a.js', 'a']) { const notExpiredS3ObjectTags = await s3 .getObjectTagging({ Bucket: bucket.bucketName, Key: notExpired, }) .promise(); expect(notExpiredS3ObjectTags.TagSet).not.toContainEqual( expect.objectContaining({ Key: expireTagKey, Value: expireTagValue, }) ); } expect(updatedManifest.currentBuild).toBe(buildId); // Check if both arrays contain the same elements expect(Object.keys(updatedManifest.files).sort()).toEqual( ['a', 'd', '_next/a.js', 'e/f/index', '_next/b.js', '_next/c.js'].sort() ); // Test the invalidation paths expect(invalidate.sort()).toEqual( ['/', '/?*', '/e/f*', '/a*', '/b/c*', '/d*'].sort() ); // Check which files got deleted const shouldBeDeleted = ['index', 'b/c']; expect(deleted.sort()).toEqual(shouldBeDeleted.sort()); // Check if the files were deleted from S3 for (const file of shouldBeDeleted) { expect( s3.headObject({ Bucket: bucket.bucketName, Key: file, }).promise ).toThrow(); } }); }); test('Should not invalidate files with the same eTag that are part of current and old deployment', async () => { const staticFileKey = 'static-file.txt'; // Upload initial build files await Promise.all([ s3 .putObject({ Bucket: bucket.bucketName, Key: staticFileKey, Body: 'static-content', }) .promise(), s3 .putObject({ Bucket: bucket.bucketName, Key: 'dynamic-route', Body: 'dynamic-content-1', }) .promise(), ]); const initialETag = ( await s3 .getObject({ Bucket: bucket.bucketName, Key: staticFileKey, }) .promise() ).ETag; expect(initialETag).toBeDefined(); const manifest = await getOrCreateManifest( s3, bucket.bucketName, deploymentConfigurationKey ); // Reupload static and changed dynamic content // Upload initial build files await Promise.all([ s3 .putObject({ Bucket: bucket.bucketName, Key: staticFileKey, Body: 'static-content', }) .promise(), s3 .putObject({ Bucket: bucket.bucketName, Key: 'dynamic-route', Body: 'dynamic-content-2', }) .promise(), ]); const updatedETag = ( await s3 .getObject({ Bucket: bucket.bucketName, Key: staticFileKey, }) .promise() ).ETag; expect(updatedETag).toBeDefined(); expect(initialETag).toEqual(updatedETag); const buildId = generateRandomBuildId(); const { manifest: updatedManifest, invalidate } = await updateManifest({ s3, bucket: bucket.bucketName, buildId, deploymentConfigurationKey, expireAfterDays: 30, files: [ { key: staticFileKey, eTag: initialETag! }, // same eTag { key: 'dynamic-route', eTag: 'changedETag' }, // changed eTag ], manifest, }); expect(updatedManifest.currentBuild).toBe(buildId); // Should only expect(invalidate.sort()).toEqual(['/dynamic-route*'].sort()); }); }); describe('[deploy-trigger] getInvalidationKeys', () => { test.each([ ['test', '/test*'], ['test/[slug]', '/test*'], ['test/[slug]/abc', '/test*'], ['test/[...slug]', '/test*'], ['test/[[...slug]]', '/test*'], ['test/[testId]/index', '/test*'], ['test/[testId]/[otherId]', '/test*'], ])('Generated invalidationKey from %s should be %s', (input, output) => { const invalidationKeys = getInvalidationKeys([input]); expect(invalidationKeys).toEqual([output]); }); test('Root index route', () => { const invalidationKeys = getInvalidationKeys(['index']); expect(invalidationKeys).toEqual(['/', '/?*']); }); test('Skip routes from _next', () => { const invalidationKeys = getInvalidationKeys([ '_next/abc', '_next/def', '_next/ghi', ]); expect(invalidationKeys).toEqual([]); }); }); ================================================ FILE: packages/deploy-trigger/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./dist" }, "include": ["./src/**/*", "./test/**/*"] } ================================================ FILE: packages/dynamodb-actions/.gitignore ================================================ # Build output dist ================================================ FILE: packages/dynamodb-actions/README.md ================================================ # DynamoDB Actions This package describes the actions that can be performed on the DynamoDB data model. The database consists of multiple entities that are splitted over two tables. The division into two tables is mostly for cost-management reasons. Items from the AliasTable are expected to have a much higher ReadCapacity units consumption than the items from DeploymentTable. ## Entities All entities that are used across the tables are listed here with their short name in brackets. - Deployment (D) - Route (R) - ConfigNextJS (CN) ## Tables The design consists of the following tables: ### DeploymentTable | Entity | PK | SK | GSI1SK | | -------------- | ------------- | ------------------ | ------------------------------- | | Deployment (D) | `DEPLOYMENTS` | `D#` | `#D#` | #### GSI1: CreateDateIndex Allows to get all deployments sorted by CreateDate. Only the listed attributes are available (ProjectionType: INCLUDE).
Primary Key Attributes
PK GSI1SK
DEPLOYMENTS <CreateDate>#D#<DeploymentId> CreateDate DeploymentAlias DeploymentId Status
### AliasTable An alias is a virtual construct and consists of multiple entities with the same sort key (SK) but different partition keys (PK). The table is designed for a high ReadCapacity consumption through `PK` & `SK` keys (main query is `getAliasByHostname`). | Entity | PK | SK | GSI1PK | GSI1SK | | ----------------- | -------------- | -------------------------- | ------------------ | ------------------------------------------ | | Route (R) | `ROUTES` | `#` | `D#` | `#R##` | | ConfigNextJS (CN) | `CONFIGNEXTJS` | `#` | `D#` | `#CN##` | - `` Full domain under which a deployment is served in reverse order (e.g. `com.example.subdomain`). The hostname is reversed to allow a lookup of wildcards (e.g. `begins_with(com.example)` matches `com.example.*`) in the future. - `` Subpath under which the deployment is available (default `/`). #### GSI1: DeploymentIdIndex Allows to get all aliases that are associated with a deployment sorted by CreateDate. Only the listed attributes are available (ProjectionType: INCLUDE).
Primary Key Attributes
GSI1PK GSI1SK
D#<D-id> <CreateDate>#R#<hostnameRev>#<basePath> BasePath CreateDate DeploymentId DeploymentAlias HostnameRev
## Actions The following actions on the database are supported: ### Deployments - `createDeployment` Inserts a new deployment into the DeploymentTable. - `deleteDeploymentById` - `getDeploymentById` Returns the Deployment for the given ID. Returns `null` when it does not exist. - `listDeployments` Lists all deployments from the DeploymentTable, sorted by `CreateDate` DESC. - `updateDeploymentStatusCreateFailed` - `updateDeploymentStatusCreateInProgress` - `updateDeploymentStatusDestroyFailed` - `updateDeploymentStatusDestroyInProgress` - `updateDeploymentStatus` - `updateDeploymentStatusDestroyRequested` - `updateDeploymentStatusFinished` - `updateDeploymentStatus` ### Aliases - `createAlias` Inserts a new route item into the AliasTable. - `deleteAliasById` - `getAliasById` - `listAliasesForDeployment` Lists all aliases that are associated with a given deployment, sorted by `CreateDate` DESC. ================================================ FILE: packages/dynamodb-actions/jest.config.js ================================================ /** @type {import('ts-jest').InitialOptionsTsJest} */ module.exports = { preset: 'ts-jest', testEnvironment: 'node', rootDir: './', }; ================================================ FILE: packages/dynamodb-actions/package.json ================================================ { "name": "@millihq/tfn-dynamodb-actions", "version": "1.0.0-canary.5", "private": true, "main": "src/index.ts", "dependencies": { "aws-sdk": "*" }, "devDependencies": { "jest": "*", "ts-jest": "*", "typescript": "*" } } ================================================ FILE: packages/dynamodb-actions/src/alias/create-alias.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { RouteItem } from '../types'; const { marshall } = DynamoDB.Converter; type CreatedRouteItem = Pick< RouteItem, | 'PK' | 'SK' | 'GSI1PK' | 'GSI1SK' | 'BasePath' | 'CreateDate' | 'DeploymentAlias' | 'DeploymentId' | 'HostnameRev' | 'ItemVersion' | 'LambdaRoutes' | 'Prerenders' | 'Routes' >; type CreateAliasOptions = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the aliases. */ aliasTableName: string; /** * The full domain of the alias, in reversed form: com.example.my-alias */ hostnameRev: string; /** * The basePath under which the alias is served, defaults to `/.` */ basePath?: string; /** * Date when the alias was created. */ createDate?: Date; /** * If the alias is the default alias of an deployment. */ isDeploymentAlias?: boolean; /** * ID of the deployment where the alias points to. */ deploymentId: string; /** * Stringified JSON Routing table which paths should be served by Lambdas. */ lambdaRoutes: string; /** * Stringified JSON object that contains the route config. * This value gets copied over from the associated deployment. */ routes: string; /** * Stringified JSON object that contains routes that are served from * prerendered generated HTML files. * This value gets copied over from the associated deployment. */ prerenders: string; }; /** * Creates a new alias for an deployment. */ async function createAlias({ dynamoDBClient, aliasTableName, hostnameRev, basePath = '/', createDate = new Date(), isDeploymentAlias = false, deploymentId, lambdaRoutes, routes, prerenders, }: CreateAliasOptions): Promise { const createDateString = createDate.toISOString(); const routeItemToCreate: CreatedRouteItem = { // Keys PK: 'ROUTES', SK: `${hostnameRev}#${basePath}`, GSI1PK: `D#${deploymentId}`, GSI1SK: `${createDateString}#R#${hostnameRev}#${basePath}`, // Attributes ItemVersion: 1, CreateDate: createDateString, DeploymentId: deploymentId, HostnameRev: hostnameRev, BasePath: basePath, DeploymentAlias: isDeploymentAlias, Routes: routes, LambdaRoutes: lambdaRoutes, Prerenders: prerenders, }; const response = await dynamoDBClient .putItem({ TableName: aliasTableName, Item: marshall(routeItemToCreate), }) .promise(); if (response.$response.error) { throw response.$response.error; } return routeItemToCreate; } export { createAlias }; ================================================ FILE: packages/dynamodb-actions/src/alias/delete-alias-by-id.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { getAliasById } from './get-alias-by-id'; interface DeleteAliasByIdBaseOptions { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the aliases. */ aliasTableName: string; } /** * Options to delete an alias by providing hostname & basePath. */ interface DeleteAliasByIdHostnameOptions extends DeleteAliasByIdBaseOptions { /** * The id of the alias that should be deleted. */ hostnameRev: string; /** * The basePath of the alias that should be deleted. */ basePath: string; } /** * Options to delete an alias by providing the SortKey (SK) */ interface DeleteAliasByIdKeyOptions extends DeleteAliasByIdBaseOptions { /** * The sort key (SK) of the alias that should be deleted. */ SK: string; } type DeleteAliasByIdOptions = | DeleteAliasByIdHostnameOptions | DeleteAliasByIdKeyOptions; async function deleteAliasById(options: DeleteAliasByIdOptions) { const { dynamoDBClient, aliasTableName } = options; let SK: string; if (!('SK' in options)) { // Cannot delete by query, so we have to receive the item first const aliasToDelete = await getAliasById(options); if (!aliasToDelete) { throw new Error('Alias does not exist.'); } SK = aliasToDelete.SK; } else { SK = options.SK; } await dynamoDBClient .deleteItem({ TableName: aliasTableName, Key: { PK: { S: 'ROUTES', }, SK: { S: SK, }, }, }) .promise(); } export { deleteAliasById }; ================================================ FILE: packages/dynamodb-actions/src/alias/get-alias-by-hostname.ts ================================================ import { DynamoDB } from 'aws-sdk'; import { RouteItem } from '../types'; const { unmarshall } = DynamoDB.Converter; type GetAliasByHostnameOptions = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the aliases. */ aliasTableName: string; /** * The hostname of the alias that should be requested. */ hostnameRev: string; /** * Only return the attributes defined */ attributes?: Partial>; }; async function getAliasByHostname({ dynamoDBClient, aliasTableName, hostnameRev, attributes = {}, }: GetAliasByHostnameOptions): Promise { const queryParams: DynamoDB.QueryInput = { TableName: aliasTableName, ExpressionAttributeValues: { ':v1': { S: 'ROUTES', }, ':v2': { S: hostnameRev, }, }, KeyConditionExpression: 'PK = :v1 and begins_with(SK, :v2)', Limit: 1, }; const projectionAttributes = Object.keys(attributes); if (projectionAttributes.length > 0) { queryParams.ProjectionExpression = projectionAttributes.join(', '); } const { Count, Items } = await dynamoDBClient.query(queryParams).promise(); if (Count !== 1) { return null; } return unmarshall(Items![0]) as RouteItem; } export { getAliasByHostname }; ================================================ FILE: packages/dynamodb-actions/src/alias/get-alias-by-id.ts ================================================ import { DynamoDB } from 'aws-sdk'; import { RouteItem } from '../types'; const { unmarshall } = DynamoDB.Converter; type GetAliasByIdOptions = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the aliases. */ aliasTableName: string; /** * Hostname of the route config that is requested. */ hostnameRev: string; /** * Basepath of the route config that is requested. */ basePath?: string; /** * Only return the attributes defined */ attributes?: Partial>; }; async function getAliasById({ dynamoDBClient, aliasTableName, hostnameRev, basePath = '/', attributes = {}, }: GetAliasByIdOptions): Promise { const queryParams: DynamoDB.QueryInput = { TableName: aliasTableName, ExpressionAttributeValues: { ':v1': { S: 'ROUTES', }, ':v2': { S: `${hostnameRev}#${basePath}`, }, }, KeyConditionExpression: 'PK = :v1 and SK = :v2', Limit: 1, }; const projectionAttributes = Object.keys(attributes); if (projectionAttributes.length > 0) { queryParams.ProjectionExpression = projectionAttributes.join(', '); } const { Count, Items } = await dynamoDBClient.query(queryParams).promise(); if (Count !== 1) { return null; } return unmarshall(Items![0]) as RouteItem; } export { getAliasById }; ================================================ FILE: packages/dynamodb-actions/src/alias/list-aliases-for-deployment.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { RouteItemDeploymentIdIndex } from '../types'; const { unmarshall } = DynamoDB.Converter; type StartKey = { hostnameRev: string; deploymentId: string; createDate: string; basePath: string; }; type ListAliasesForDeploymentOptions = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the aliases. */ aliasTableName: string; /** * The id of the deployment. */ deploymentId: string; /** * Maximum number of items that should be returned. */ limit?: number | undefined; /** * The id where to start the query from. */ startKey?: StartKey; }; type ListAliasesResult = { meta: { lastKey: StartKey | null; count: number; }; items: RouteItemDeploymentIdIndex[]; }; /** * Returns all aliases that are associated with a deploymentId in DESC order. */ async function listAliasesForDeployment({ aliasTableName, dynamoDBClient, deploymentId, limit, startKey, }: ListAliasesForDeploymentOptions): Promise { const params: DynamoDB.QueryInput = { TableName: aliasTableName, IndexName: 'DeploymentIdIndex', ExpressionAttributeValues: { ':v1': { S: `D#${deploymentId}`, }, }, KeyConditionExpression: 'GSI1PK = :v1', Limit: limit, // Return the items in DESC order (newer -> older) ScanIndexForward: false, }; if (startKey) { params.ExclusiveStartKey = { PK: { S: 'ROUTES', }, SK: { S: `${startKey.hostnameRev}#${startKey.basePath}`, }, GSI1PK: { S: `D#${startKey.deploymentId}`, }, GSI1SK: { S: `${startKey.createDate}#R#${startKey.hostnameRev}#${startKey.basePath}`, }, }; } const { Count, Items, LastEvaluatedKey } = await dynamoDBClient .query(params) .promise(); let lastKey: StartKey | null = null; if (LastEvaluatedKey) { const [, deploymentId] = LastEvaluatedKey.GSI1PK.S!.split('#'); const [createDate, , hostnameRev, basePath] = LastEvaluatedKey.GSI1SK.S!.split('#'); lastKey = { hostnameRev, basePath, deploymentId, createDate, }; } return { meta: { count: Count !== undefined ? Count : 0, lastKey, }, items: Items ? Items.map(unmarshall as () => RouteItemDeploymentIdIndex) : [], }; } export { listAliasesForDeployment }; ================================================ FILE: packages/dynamodb-actions/src/deployment/create-deployment.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { DeploymentItem, DeploymentTemplateType } from '../types'; const { marshall } = DynamoDB.Converter; type CreatedDeploymentItem = Pick< DeploymentItem, | 'PK' | 'SK' | 'GSI1SK' | 'DeploymentId' | 'CreateDate' | 'ItemVersion' | 'Status' | 'DeploymentTemplate' >; type CreateDeploymentOptions = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the deployments. */ deploymentTableName: string; /** * Id of the deployment (must be unique). */ deploymentId: string; /** * Date when the deployment was created. */ createDate?: Date; /** * Template that should be used for deployment. */ templateType?: DeploymentTemplateType; }; /** * Creates and initializes a new deployment. */ async function createDeployment({ dynamoDBClient, deploymentTableName, deploymentId, createDate = new Date(), templateType = 'FUNCTION_URLS', }: CreateDeploymentOptions): Promise { const createDateString = createDate.toISOString(); const deploymentItemToCreate: CreatedDeploymentItem = { // Keys PK: 'DEPLOYMENTS', SK: `D#${deploymentId}`, GSI1SK: `${createDateString}#D#${deploymentId}`, // Attributes DeploymentId: deploymentId, CreateDate: createDateString, ItemVersion: 1, Status: 'INITIALIZED', DeploymentTemplate: templateType, }; const response = await dynamoDBClient .putItem({ TableName: deploymentTableName, Item: marshall(deploymentItemToCreate), }) .promise(); if (response.$response.error) { throw response.$response.error; } return deploymentItemToCreate; } export { createDeployment }; ================================================ FILE: packages/dynamodb-actions/src/deployment/delete-deployment-by-id.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { DeploymentItem } from '../types'; import { getDeploymentById } from './get-deployment-by-id'; const { unmarshall } = DynamoDB.Converter; type DeleteDeploymentByIdOptions = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the deployments. */ deploymentTableName: string; /** * Id of the deployment that should be deleted. */ deploymentId: string | { PK: string; SK: string }; }; /** * Deletes a deployment by id. * Returns null when no deployment with the given id could be found. * @param options * @returns */ async function deleteDeploymentById({ dynamoDBClient, deploymentTableName, deploymentId, }: DeleteDeploymentByIdOptions): Promise { let PK: string; let SK: string; if (typeof deploymentId === 'string') { const deploymentToDelete = await getDeploymentById({ dynamoDBClient, deploymentTableName, deploymentId, }); if (!deploymentToDelete) { return null; } PK = deploymentToDelete.PK; SK = deploymentToDelete.SK; } else { PK = deploymentId.PK; SK = deploymentId.SK; } const deleteCommandResponse = await dynamoDBClient .deleteItem({ TableName: deploymentTableName, Key: { PK: { S: PK, }, SK: { S: SK, }, }, ReturnValues: 'ALL_OLD', }) .promise(); if ( deleteCommandResponse.$response.error || !deleteCommandResponse.Attributes ) { return null; } return unmarshall(deleteCommandResponse.Attributes) as DeploymentItem; } export { deleteDeploymentById }; ================================================ FILE: packages/dynamodb-actions/src/deployment/get-deployment-by-id.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { DeploymentItem } from '../types'; const { unmarshall } = DynamoDB.Converter; type GetDeploymentByIdOptions = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the deployments. */ deploymentTableName: string; /** * The id of the deployment that should be requested. */ deploymentId: string; /** * Only return the attributes defined */ attributes?: Partial>; }; async function getDeploymentById({ dynamoDBClient, deploymentTableName, deploymentId, attributes = {}, }: GetDeploymentByIdOptions): Promise { const queryParams: DynamoDB.QueryInput = { TableName: deploymentTableName, ExpressionAttributeValues: { ':v1': { S: 'DEPLOYMENTS', }, ':v2': { S: `D#${deploymentId}`, }, }, KeyConditionExpression: 'PK = :v1 and SK = :v2', Limit: 1, }; const projectionAttributes = Object.keys(attributes); if (projectionAttributes.length > 0) { // Ensure that the attribute names does not conflict with reserved DynamoDB // names, we convert them into attributeNames first queryParams.ExpressionAttributeNames = projectionAttributes.reduce( (accumulator, k, index) => ({ ...accumulator, [`#field${index}`]: k, }), {} ); queryParams.ProjectionExpression = projectionAttributes .map((_, index) => `#field${index}`) .join(', '); } const { Count, Items } = await dynamoDBClient.query(queryParams).promise(); if (Count !== 1) { return null; } return unmarshall(Items![0]) as DeploymentItem; } export { getDeploymentById }; ================================================ FILE: packages/dynamodb-actions/src/deployment/list-deployments.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { DeploymentItemCreateDateIndex } from '../types'; const { unmarshall } = DynamoDB.Converter; type StartKey = { deploymentId: string; createDate: string; }; type ListDeploymentOptions = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the deployments. */ deploymentTableName: string; /** * Maximum number of items that should be returned. */ limit?: number | undefined; /** * The id where to start the query from. */ startKey?: StartKey; }; type ListDeploymentsResult = { meta: { lastKey: StartKey | null; count: number; }; items: DeploymentItemCreateDateIndex[]; }; /** * Returns all deployments ordered by creationDate. * * @param options * @returns */ async function listDeployments({ dynamoDBClient, deploymentTableName, limit, startKey, }: ListDeploymentOptions): Promise { const params: DynamoDB.QueryInput = { TableName: deploymentTableName, IndexName: 'CreateDateIndex', ExpressionAttributeValues: { ':v1': { S: 'DEPLOYMENTS', }, }, KeyConditionExpression: 'PK = :v1', Limit: limit, // Return the items in DESC order (newer -> older) ScanIndexForward: false, }; if (startKey) { params.ExclusiveStartKey = { PK: { S: 'DEPLOYMENTS', }, SK: { S: `D#${startKey.deploymentId}`, }, GSI1SK: { S: `${startKey.createDate}#D#${startKey.deploymentId}`, }, }; } const { Count, Items, LastEvaluatedKey } = await dynamoDBClient .query(params) .promise(); let lastKey: StartKey | null = null; if (LastEvaluatedKey) { const [createDate, , deploymentId] = LastEvaluatedKey.GSI1SK.S!.split('#'); lastKey = { deploymentId: deploymentId, createDate, }; } return { meta: { count: Count !== undefined ? Count : 0, lastKey, }, items: Items ? Items.map(unmarshall as () => DeploymentItemCreateDateIndex) : [], }; } export { listDeployments }; ================================================ FILE: packages/dynamodb-actions/src/deployment/update-deployment-status-create-failed.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { updateDeployment } from './update-deployment'; type UpdateDeploymentStatusCreateFailed = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the deployments. */ deploymentTableName: string; /** * ID of the deployment. */ deploymentId: string | { PK: string; SK: string }; }; /** * Updates the status of an existing deployment to create failed state. * * @param options * @returns */ function updateDeploymentStatusCreateFailed({ dynamoDBClient, deploymentTableName, deploymentId, }: UpdateDeploymentStatusCreateFailed) { return updateDeployment({ dynamoDBClient, deploymentTableName, deploymentId, updateAttributes: { Status: 'CREATE_FAILED', }, }); } export { updateDeploymentStatusCreateFailed }; ================================================ FILE: packages/dynamodb-actions/src/deployment/update-deployment-status-create-in-progress.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { updateDeployment } from './update-deployment'; type UpdateDeploymentStatusCreateInProgressOptions = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the deployments. */ deploymentTableName: string; /** * ID of the deployment. */ deploymentId: string | { PK: string; SK: string }; /** * The CloudFormation stack ARN that is associated with this deployment. */ cloudFormationStack: string; /** * Stringified JSON object that contains routes that are served from * prerendered generated HTML files. */ prerenders: string; /** * Stringified JSON object that contains the route config. */ routes: string; }; /** * Updates the status of an existing deployment in the database. * * @param options * @returns */ function updateDeploymentStatusCreateInProgress({ dynamoDBClient, deploymentTableName, deploymentId, cloudFormationStack, prerenders, routes, }: UpdateDeploymentStatusCreateInProgressOptions) { return updateDeployment({ dynamoDBClient, deploymentTableName, deploymentId, updateAttributes: { Status: 'CREATE_IN_PROGRESS', // Lambda routes are empty at the creation of the stack since they // can only be determined when the stack creation is finished and the // endpoints of API Gateway or function URLs can be resolved. LambdaRoutes: '{}', Prerenders: prerenders, Routes: routes, CFStack: cloudFormationStack, }, }); } export { updateDeploymentStatusCreateInProgress }; ================================================ FILE: packages/dynamodb-actions/src/deployment/update-deployment-status-destroy-failed.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { updateDeployment } from './update-deployment'; type UpdateDeploymentStatusDestroyFailed = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the deployments. */ deploymentTableName: string; /** * ID of the deployment. */ deploymentId: string | { PK: string; SK: string }; }; /** * Updates the status of an existing deployment to DESTROY_FAILED. * * @param options * @returns */ function updateDeploymentStatusDestroyFailed({ dynamoDBClient, deploymentTableName, deploymentId, }: UpdateDeploymentStatusDestroyFailed) { return updateDeployment({ dynamoDBClient, deploymentTableName, deploymentId, updateAttributes: { Status: 'DESTROY_FAILED', }, }); } export { updateDeploymentStatusDestroyFailed }; ================================================ FILE: packages/dynamodb-actions/src/deployment/update-deployment-status-destroy-in-progress.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { updateDeployment } from './update-deployment'; type UpdateDeploymentStatusDestroyInProgress = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the deployments. */ deploymentTableName: string; /** * ID of the deployment. */ deploymentId: string | { PK: string; SK: string }; }; /** * Updates the status of an existing deployment to DESTROY_IN_PROGRESS. * * @param options * @returns */ function updateDeploymentStatusDestroyInProgress({ dynamoDBClient, deploymentTableName, deploymentId, }: UpdateDeploymentStatusDestroyInProgress) { return updateDeployment({ dynamoDBClient, deploymentTableName, deploymentId, updateAttributes: { Status: 'DESTROY_IN_PROGRESS', }, }); } export { updateDeploymentStatusDestroyInProgress }; ================================================ FILE: packages/dynamodb-actions/src/deployment/update-deployment-status-destroy-requested.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { updateDeployment } from './update-deployment'; type UpdateDeploymentStatusDestroyRequested = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the deployments. */ deploymentTableName: string; /** * ID of the deployment. */ deploymentId: string | { PK: string; SK: string }; }; /** * Updates the status of an existing deployment to DESTROY_REQUESTED. * * @param options * @returns */ function updateDeploymentStatusDestroyRequested({ dynamoDBClient, deploymentTableName, deploymentId, }: UpdateDeploymentStatusDestroyRequested) { return updateDeployment({ dynamoDBClient, deploymentTableName, deploymentId, updateAttributes: { Status: 'DESTROY_REQUESTED', }, }); } export { updateDeploymentStatusDestroyRequested }; ================================================ FILE: packages/dynamodb-actions/src/deployment/update-deployment-status-finished.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { updateDeployment } from './update-deployment'; type UpdateDeploymentStatusFinishedOptions = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the deployments. */ deploymentTableName: string; /** * ID of the deployment. */ deploymentId: string | { PK: string; SK: string }; /** * The alias that is assigned with this deployment. */ deploymentAlias?: string; /** * Only used for static deployments. * Stringified JSON object that contains routes that are served from * prerendered generated HTML files. * */ prerenders?: string; /** * Only used for static deployments. * Stringified JSON object that contains the route config. */ routes?: string; /** * Only used for static deployments. * Stringified routing table for Lambdas */ lambdaRoutes?: string; }; /** * Updates the status of an existing deployment to finished state. * * @param options * @returns */ function updateDeploymentStatusFinished({ dynamoDBClient, deploymentTableName, deploymentId, deploymentAlias, prerenders, routes, lambdaRoutes, }: UpdateDeploymentStatusFinishedOptions) { return updateDeployment({ dynamoDBClient, deploymentTableName, deploymentId, updateAttributes: { DeploymentAlias: deploymentAlias, Status: 'FINISHED', LambdaRoutes: lambdaRoutes, Prerenders: prerenders, Routes: routes, }, }); } export { updateDeploymentStatusFinished }; ================================================ FILE: packages/dynamodb-actions/src/deployment/update-deployment-status.ts ================================================ import { DynamoDB } from 'aws-sdk'; import { updateItem } from '../utils/dynamodb'; import { getDeploymentById } from './get-deployment-by-id'; type UpdateDeploymentStatusOptions = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the deployments. */ deploymentTableName: string; /** * ID of the deployment. */ deploymentId: string; /** * Stringified routing table for Lambdas */ lambdaRoutes: string; /** * The new status that. */ newStatus: string; }; /** * Updates the status of an existing deployment in the database. * * @param options * @returns */ async function updateDeploymentStatus({ dynamoDBClient, deploymentTableName, deploymentId, lambdaRoutes, newStatus, }: UpdateDeploymentStatusOptions) { const deployment = await getDeploymentById({ dynamoDBClient, deploymentId, deploymentTableName, }); if (!deployment) { throw new Error(`Deployment does not exist: "${deploymentId}"`); } return updateItem({ client: dynamoDBClient, tableName: deploymentTableName, key: { PK: deployment.PK, SK: deployment.SK, }, item: { Status: newStatus, LambdaRoutes: lambdaRoutes, }, }); } export { updateDeploymentStatus }; ================================================ FILE: packages/dynamodb-actions/src/deployment/update-deployment.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { DeploymentItem } from '../types'; import { updateItem } from '../utils/dynamodb'; import { getDeploymentById } from './get-deployment-by-id'; type UpdateDeploymentOptions = { /** * DynamoDB client */ dynamoDBClient: DynamoDB; /** * Name of the table that holds the deployments. */ deploymentTableName: string; /** * ID of the deployment to update. */ deploymentId: string | { PK: string; SK: string }; /** * Attributes that should be updated. */ updateAttributes: Partial; }; /** * Updates the status of an existing deployment to DESTROY_IN_PROGRESS. * * @param options * @returns */ async function updateDeployment({ dynamoDBClient, deploymentTableName, deploymentId, updateAttributes, }: UpdateDeploymentOptions): Promise { let PK: string; let SK: string; if (typeof deploymentId === 'string') { const deploymentToUpdate = await getDeploymentById({ dynamoDBClient, deploymentId, deploymentTableName, }); if (!deploymentToUpdate) { throw new Error(`Deployment does not exist: "${deploymentId}"`); } PK = deploymentToUpdate.PK; SK = deploymentToUpdate.SK; } else { PK = deploymentId.PK; SK = deploymentId.SK; } return updateItem({ client: dynamoDBClient, tableName: deploymentTableName, key: { PK: PK, SK: SK, }, item: updateAttributes, }) as unknown as DeploymentItem; } export { updateDeployment }; ================================================ FILE: packages/dynamodb-actions/src/index.ts ================================================ // Alias export { createAlias } from './alias/create-alias'; export { getAliasById } from './alias/get-alias-by-id'; export { deleteAliasById } from './alias/delete-alias-by-id'; export { getAliasByHostname } from './alias/get-alias-by-hostname'; export { listAliasesForDeployment } from './alias/list-aliases-for-deployment'; // Deployment export { createDeployment } from './deployment/create-deployment'; export { deleteDeploymentById } from './deployment/delete-deployment-by-id'; export { getDeploymentById } from './deployment/get-deployment-by-id'; export { listDeployments } from './deployment/list-deployments'; export { updateDeploymentStatusCreateFailed } from './deployment/update-deployment-status-create-failed'; export { updateDeploymentStatusCreateInProgress } from './deployment/update-deployment-status-create-in-progress'; export { updateDeploymentStatusDestroyFailed } from './deployment/update-deployment-status-destroy-failed'; export { updateDeploymentStatusDestroyInProgress } from './deployment/update-deployment-status-destroy-in-progress'; export { updateDeploymentStatusDestroyRequested } from './deployment/update-deployment-status-destroy-requested'; export { updateDeploymentStatusFinished } from './deployment/update-deployment-status-finished'; export { updateDeploymentStatus } from './deployment/update-deployment-status'; // Utils export { reverseHostname } from './utils/reverse-hostname'; export * from './types'; ================================================ FILE: packages/dynamodb-actions/src/types.ts ================================================ /** * CDK Template that is used for a deployment. */ export type DeploymentTemplateType = 'FUNCTION_URLS' | 'API_GATEWAY'; export type DeploymentItem = { /* ------------------------------- Keys ----------------------------------- */ /** * Partition Key: DEPLOYMENTS */ PK: 'DEPLOYMENTS'; /** * Sort Key: D# */ SK: string; /** * Sort key for the CreateDateIndex: #D# */ GSI1SK: string; /* ---------------------------- Attributes -------------------------------- */ /** * Unique id of the deployment. */ DeploymentId: string; /** * Timestamp when the deployment was created. Format is ISO 8601. */ CreateDate: string; /** * Status of the deployment */ Status: | 'INITIALIZED' | 'CREATE_IN_PROGRESS' | 'CREATE_COMPLETE' | 'CREATE_FAILED' | 'FINISHED' | 'DESTROY_IN_PROGRESS' | 'DESTROY_FAILED' | 'DESTROY_REQUESTED'; /** * Version of the item */ ItemVersion: number; /** * Stringified object that contains the route config. */ Routes: string; /** * Stringified object that contains the routes that should be served from * Lambda functions. */ LambdaRoutes: string; /** * Stringified object that contains the routes that are prerendered. */ Prerenders: string; /** * The (fixed) deployment alias that was assigned on creation. * Only present if multi-deployment feature is enabled. */ DeploymentAlias?: string; /** * The CDK template that is used for the deployment. */ DeploymentTemplate: DeploymentTemplateType; /** * The CloudFormation stack that are associated with this deployment. */ CFStack?: string; }; export type DeploymentItemCreateDateIndex = Pick< DeploymentItem, 'DeploymentId' | 'CreateDate' | 'Status' | 'DeploymentAlias' >; export type RouteItem = { /* ------------------------------- Keys ----------------------------------- */ /** * Partition Key: DEPLOYMENTS */ PK: 'ROUTES'; /** * Sort Key: # */ SK: string; /** * Partition Key for DeploymentIdIndex: D# */ GSI1PK: string; /** * Sort Key for DeploymentIdIndex: #R## */ GSI1SK: string; /* ---------------------------- Attributes -------------------------------- */ /** * Version of the item */ ItemVersion: number; /** * Timestamp when the deployment was created. Format is ISO 8601. */ CreateDate: string; /** * The hostname where the alias belongs to in reversed form. * e.g. com.example.sub */ HostnameRev: string; /** * The basePath of the alias. */ BasePath: string; /** * Stringified object that contains the route config. */ Routes: string; /** * Stringified object that contains the routes that should be served from * Lambda functions. */ LambdaRoutes: string; /** * Stringified object that contains the routes that are prerendered. */ Prerenders: string; /** * Id of the associated deployment */ DeploymentId: string; /** * Wether or not the alias is associated (fixed) with a deployment. */ DeploymentAlias: boolean; }; export type RouteItemDeploymentIdIndex = Pick< RouteItem, | 'PK' | 'SK' | 'GSI1PK' | 'GSI1SK' | 'BasePath' | 'CreateDate' | 'DeploymentAlias' | 'DeploymentId' | 'HostnameRev' >; export type PaginatedQuery = { /** * The next key that should be used when */ nextKey: string | null; hasNext: boolean; items: Item[]; }; ================================================ FILE: packages/dynamodb-actions/src/utils/dynamodb/index.ts ================================================ export { updateItem } from './update-item'; ================================================ FILE: packages/dynamodb-actions/src/utils/dynamodb/update-item.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; const { marshall, unmarshall } = DynamoDB.Converter; type UpdateItemOptions = { /** * DynamoDB instance. */ client: DynamoDB; /** * Name of the target table. */ tableName: string; /** * Key of the target item. */ key: Record; /** * Updates for target item. */ item: Record; }; /** * Helper to make simple updates to an item in DynamoDB. * @see {@link https://stackoverflow.com/a/66036730/831465} * * @param options */ async function updateItem({ client, tableName, key, item }: UpdateItemOptions) { // Filter out keys that have undefined values const itemKeys = Object.keys(item).filter((key) => item[key] !== undefined); // When we do updates we need to tell DynamoDB what fields we want updated. // If that's not annoying enough, we also need to be careful as some field names // are reserved - so DynamoDB won't like them in the UpdateExpressions list. // To avoid passing reserved words we prefix each field with "#field" and provide the correct // field mapping in ExpressionAttributeNames. The same has to be done with the actual // value as well. They are prefixed with ":value" and mapped in ExpressionAttributeValues // along with their actual value const { Attributes } = await client .updateItem({ TableName: tableName, Key: marshall(key), ReturnValues: 'ALL_NEW', UpdateExpression: `SET ${itemKeys .map((_, index) => `#field${index} = :value${index}`) .join(', ')}`, ExpressionAttributeNames: itemKeys.reduce( (accumulator, k, index) => ({ ...accumulator, [`#field${index}`]: k }), {} ), ExpressionAttributeValues: marshall( itemKeys.reduce( (accumulator, k, index) => ({ ...accumulator, [`:value${index}`]: item[k], }), {} ) ), }) .promise(); if (!Attributes) { throw new Error('No Attributes returned after updating.'); } return unmarshall(Attributes); } export { updateItem }; ================================================ FILE: packages/dynamodb-actions/src/utils/reverse-hostname.ts ================================================ /** * Reverses the groups of a hostname. * e.g. sub.example.com -> com.example.sub */ function reverseHostname(hostname: string) { return hostname.split('.').reverse().join('.'); } export { reverseHostname }; ================================================ FILE: packages/dynamodb-actions/test/alias/create-alias.test.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { createAlias } from '../../src'; import { createAliasTestTable, createTestDynamoDBClient } from '../test-utils'; const { unmarshall } = DynamoDB.Converter; describe('CreateAlias', () => { let dynamoDBClient: DynamoDB; let aliasTableName: string; beforeAll(async () => { dynamoDBClient = createTestDynamoDBClient(); // Create table aliasTableName = await createAliasTestTable(dynamoDBClient); }); afterAll(async () => { await dynamoDBClient .deleteTable({ TableName: aliasTableName, }) .promise(); }); test('Insert new alias', async () => { const createDate = new Date(2022, 0, 1); const expectedObject = { PK: 'ROUTES', SK: 'com.example#/', GSI1PK: 'D#abc', GSI1SK: `${createDate.toISOString()}#R#com.example#/`, }; const response = await createAlias({ dynamoDBClient, aliasTableName, deploymentId: 'abc', hostnameRev: 'com.example', lambdaRoutes: '', prerenders: '', routes: '', createDate, }); expect(response).toMatchObject(expectedObject); const getItemResponse = await dynamoDBClient .getItem({ Key: { PK: { S: 'ROUTES', }, SK: { S: 'com.example#/', }, }, TableName: aliasTableName, }) .promise(); expect(unmarshall(getItemResponse.Item!)).toMatchObject(expectedObject); }); }); ================================================ FILE: packages/dynamodb-actions/test/alias/delete-alias-by-id.test.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { createAlias, deleteAliasById, getAliasById } from '../../src'; import { createAliasTestTable, createTestDynamoDBClient } from '../test-utils'; describe('GetAliasById', () => { let dynamoDBClient: DynamoDB; let aliasTableName: string; beforeAll(async () => { dynamoDBClient = createTestDynamoDBClient(); // Create table aliasTableName = await createAliasTestTable(dynamoDBClient); }); afterAll(async () => { await dynamoDBClient .deleteTable({ TableName: aliasTableName, }) .promise(); }); test('Delete alias by hostname and basePath', async () => { await createAlias({ dynamoDBClient, aliasTableName, deploymentId: 'abc', hostnameRev: 'com.example', lambdaRoutes: '', prerenders: '', routes: '', }); const getResponse1 = await getAliasById({ dynamoDBClient, aliasTableName, hostnameRev: 'com.example', }); expect(getResponse1).not.toBe(null); await deleteAliasById({ dynamoDBClient, aliasTableName, hostnameRev: 'com.example', basePath: '/', }); const getResponse2 = await getAliasById({ dynamoDBClient, aliasTableName, hostnameRev: 'com.example', }); expect(getResponse2).toBe(null); }); test('Delete alias by sortKey', async () => { const alias = await createAlias({ dynamoDBClient, aliasTableName, deploymentId: 'abc', hostnameRev: 'delete.by.sk', lambdaRoutes: '', prerenders: '', routes: '', }); const getResponse1 = await getAliasById({ dynamoDBClient, aliasTableName, hostnameRev: 'delete.by.sk', }); expect(getResponse1).not.toBe(null); await deleteAliasById({ dynamoDBClient, aliasTableName, SK: alias.SK, }); const getResponse2 = await getAliasById({ dynamoDBClient, aliasTableName, hostnameRev: 'delete.by.sk', }); expect(getResponse2).toBe(null); }); }); ================================================ FILE: packages/dynamodb-actions/test/alias/get-alias-by-id.test.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { createAlias, getAliasById } from '../../src'; import { createAliasTestTable, createTestDynamoDBClient } from '../test-utils'; describe('GetAliasById', () => { let dynamoDBClient: DynamoDB; let aliasTableName: string; beforeAll(async () => { dynamoDBClient = createTestDynamoDBClient(); // Create table aliasTableName = await createAliasTestTable(dynamoDBClient); }); afterAll(async () => { await dynamoDBClient .deleteTable({ TableName: aliasTableName, }) .promise(); }); test('Retrieve an alias by hostname', async () => { await createAlias({ dynamoDBClient, aliasTableName, deploymentId: 'abc', hostnameRev: 'com.example', lambdaRoutes: '', prerenders: '', routes: '', }); const response = await getAliasById({ dynamoDBClient, aliasTableName, hostnameRev: 'com.example', }); expect(response).not.toBeNull(); expect(response).toMatchObject({ HostnameRev: 'com.example', }); }); test('Retrieve an alias by hostname with multiple matching', async () => { await createAlias({ dynamoDBClient, aliasTableName, deploymentId: 'abc', hostnameRev: 'com.example', lambdaRoutes: '', prerenders: '', routes: '', }); await createAlias({ dynamoDBClient, aliasTableName, deploymentId: 'abc', hostnameRev: 'com.example.sub', lambdaRoutes: '', prerenders: '', routes: '', }); await createAlias({ dynamoDBClient, aliasTableName, deploymentId: 'abc', hostnameRev: 'com.example.sub1', lambdaRoutes: '', prerenders: '', routes: '', }); { const response = await getAliasById({ dynamoDBClient, aliasTableName, hostnameRev: 'com.example', }); expect(response).not.toBeNull(); expect(response).toMatchObject({ HostnameRev: 'com.example', }); } { const response = await getAliasById({ dynamoDBClient, aliasTableName, hostnameRev: 'com.example.sub', }); expect(response).not.toBeNull(); expect(response).toMatchObject({ HostnameRev: 'com.example.sub', }); } { const response = await getAliasById({ dynamoDBClient, aliasTableName, hostnameRev: 'com.example.sub1', }); expect(response).not.toBeNull(); expect(response).toMatchObject({ HostnameRev: 'com.example.sub1', }); } }); }); ================================================ FILE: packages/dynamodb-actions/test/alias/list-aliases-for-deployment.test.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { createAlias, listAliasesForDeployment } from '../../src'; import { createAliasTestTable, createTestDynamoDBClient } from '../test-utils'; describe('ListAliasesForDeployment', () => { let dynamoDBClient: DynamoDB; let aliasTableName: string; beforeAll(async () => { dynamoDBClient = createTestDynamoDBClient(); // Create table aliasTableName = await createAliasTestTable(dynamoDBClient); }); afterAll(async () => { await dynamoDBClient .deleteTable({ TableName: aliasTableName, }) .promise(); }); test('List all alias for a deploymentId', async () => { // Fill with aliases await Promise.all( ['com.deployment1.1', 'com.deployment1.2', 'com.deployment1.3'].map( (hostnameRev, index) => { return createAlias({ dynamoDBClient, aliasTableName, hostnameRev, createDate: new Date(2022, 0, 3 - index), deploymentId: 'deployment1', lambdaRoutes: '', prerenders: '', routes: '', }); } ) ); await Promise.all( ['com.deployment2.1', 'com.deployment2.2', 'com.deployment2.3'].map( (hostnameRev, index) => { return createAlias({ dynamoDBClient, aliasTableName, hostnameRev, createDate: new Date(2022, 0, index + 1), deploymentId: 'deployment2', lambdaRoutes: '', prerenders: '', routes: '', }); } ) ); const result = await listAliasesForDeployment({ aliasTableName, dynamoDBClient, deploymentId: 'deployment1', }); expect(result.meta.count).toBe(3); expect(result.meta.lastKey).toBeNull(); result.items.forEach((item) => { expect(item.DeploymentId).toBe('deployment1'); }); }); test('Sort Order', async () => { // #2 await createAlias({ dynamoDBClient, aliasTableName, hostnameRev: 'com.sortorder.2', createDate: new Date(2022, 0, 2), deploymentId: 'sortOrderDeployment', lambdaRoutes: '', prerenders: '', routes: '', }); // #1 await createAlias({ dynamoDBClient, aliasTableName, hostnameRev: 'com.sortorder.1', createDate: new Date(2022, 0, 3), deploymentId: 'sortOrderDeployment', lambdaRoutes: '', prerenders: '', routes: '', }); // #3 await createAlias({ dynamoDBClient, aliasTableName, hostnameRev: 'com.sortorder.3', createDate: new Date(2022, 0, 1), deploymentId: 'sortOrderDeployment', lambdaRoutes: '', prerenders: '', routes: '', }); const result1 = await listAliasesForDeployment({ aliasTableName, dynamoDBClient, deploymentId: 'sortOrderDeployment', limit: 1, }); expect(result1.meta.count).toBe(1); expect(result1.meta.lastKey).not.toBeNull(); expect(result1.items).toEqual( expect.arrayContaining([ expect.objectContaining({ SK: 'com.sortorder.1#/', DeploymentId: 'sortOrderDeployment', CreateDate: new Date(2022, 0, 3).toISOString(), }), ]) ); const result2 = await listAliasesForDeployment({ aliasTableName, dynamoDBClient, deploymentId: 'sortOrderDeployment', limit: 1, startKey: result1.meta.lastKey!, }); expect(result2.meta.count).toBe(1); expect(result2.meta.lastKey).not.toBeNull(); expect(result2.items).toEqual( expect.arrayContaining([ expect.objectContaining({ SK: 'com.sortorder.2#/', DeploymentId: 'sortOrderDeployment', CreateDate: new Date(2022, 0, 2).toISOString(), }), ]) ); const result3 = await listAliasesForDeployment({ aliasTableName, dynamoDBClient, deploymentId: 'sortOrderDeployment', limit: 1, startKey: result2.meta.lastKey!, }); expect(result3.meta.count).toBe(1); expect(result3.meta.lastKey).not.toBeNull(); expect(result3.items).toEqual( expect.arrayContaining([ expect.objectContaining({ SK: 'com.sortorder.3#/', DeploymentId: 'sortOrderDeployment', CreateDate: new Date(2022, 0, 1).toISOString(), }), ]) ); const result4 = await listAliasesForDeployment({ aliasTableName, dynamoDBClient, deploymentId: 'sortOrderDeployment', limit: 1, startKey: result3.meta.lastKey!, }); expect(result4.meta.count).toBe(0); expect(result4.meta.lastKey).toBeNull(); }); }); ================================================ FILE: packages/dynamodb-actions/test/deployment/create-deployment.test.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { createDeployment } from '../../src'; import { createTestDynamoDBClient, createDeploymentTestTable, } from '../test-utils'; const { unmarshall } = DynamoDB.Converter; describe('CreateDeployment', () => { let dynamoDBClient: DynamoDB; let deploymentTableName: string; beforeAll(async () => { dynamoDBClient = createTestDynamoDBClient(); // Create table deploymentTableName = await createDeploymentTestTable(dynamoDBClient); }); afterAll(async () => { await dynamoDBClient .deleteTable({ TableName: deploymentTableName, }) .promise(); }); test('Put item into the database', async () => { const createDate = new Date(); const result = await createDeployment({ deploymentId: 'abc', deploymentTableName, dynamoDBClient, createDate, }); const resultItem = { PK: 'DEPLOYMENTS', SK: 'D#abc', GSI1SK: `${createDate.toISOString()}#D#abc`, DeploymentId: 'abc', CreateDate: createDate.toISOString(), ItemVersion: 1, Status: 'INITIALIZED', DeploymentTemplate: 'FUNCTION_URLS', }; expect(result).toMatchObject(resultItem); // Check item in the database const getItemResponse = await dynamoDBClient .getItem({ Key: { PK: { S: resultItem.PK, }, SK: { S: resultItem.SK, }, }, TableName: deploymentTableName, }) .promise(); expect(unmarshall(getItemResponse.Item!)).toMatchObject(resultItem); }); }); ================================================ FILE: packages/dynamodb-actions/test/deployment/delete-deployment.test.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { createDeployment, deleteDeploymentById, getDeploymentById, } from '../../src'; import { createTestDynamoDBClient, createDeploymentTestTable, } from '../test-utils'; describe('DeleteDeploymentById', () => { let dynamoDBClient: DynamoDB; let deploymentTableName: string; beforeAll(async () => { dynamoDBClient = createTestDynamoDBClient(); // Create table deploymentTableName = await createDeploymentTestTable(dynamoDBClient); }); afterAll(async () => { await dynamoDBClient .deleteTable({ TableName: deploymentTableName, }) .promise(); }); test('Delete a single deployment from database', async () => { await createDeployment({ dynamoDBClient, deploymentTableName, deploymentId: 'deploymentToDelete', }); const response1 = await getDeploymentById({ dynamoDBClient, deploymentTableName, deploymentId: 'deploymentToDelete', }); expect(response1).not.toBeNull(); const response2 = await deleteDeploymentById({ dynamoDBClient, deploymentTableName, deploymentId: 'deploymentToDelete', }); expect(response2).not.toBeNull(); const response3 = await getDeploymentById({ dynamoDBClient, deploymentTableName, deploymentId: 'deploymentToDelete', }); expect(response3).toBeNull(); }); test('Delete a deployment by PK and SK', async () => { await createDeployment({ dynamoDBClient, deploymentTableName, deploymentId: 'deploymentToDelete', }); }) }); ================================================ FILE: packages/dynamodb-actions/test/deployment/get-deployment-by-id.test.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { createDeployment, getDeploymentById } from '../../src'; import { createTestDynamoDBClient, createDeploymentTestTable, } from '../test-utils'; describe('GetDeploymentById', () => { let dynamoDBClient: DynamoDB; let deploymentTableName: string; beforeAll(async () => { dynamoDBClient = createTestDynamoDBClient(); // Create table deploymentTableName = await createDeploymentTestTable(dynamoDBClient); }); afterAll(async () => { await dynamoDBClient .deleteTable({ TableName: deploymentTableName, }) .promise(); }); test('Get deployment by id', async () => { await createDeployment({ dynamoDBClient, deploymentTableName, deploymentId: 'abc', createDate: new Date(2022, 0, 1), }); const result = await getDeploymentById({ dynamoDBClient, deploymentTableName, deploymentId: 'abc', }); expect(result).not.toBeNull(); expect(result!.DeploymentId).toBe('abc'); expect(result!.CreateDate).toBe(new Date(2022, 0, 1).toISOString()); }); test('Deployment does not exist', async () => { const result = await getDeploymentById({ dynamoDBClient, deploymentTableName, deploymentId: 'doesNotExist', }); expect(result).toBeNull(); }); }); ================================================ FILE: packages/dynamodb-actions/test/deployment/list-deployments.test.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { createDeployment, listDeployments } from '../../src'; import { createTestDynamoDBClient, createDeploymentTestTable, } from '../test-utils'; describe('ListDeployments', () => { let dynamoDBClient: DynamoDB; let deploymentTableName: string; beforeAll(async () => { dynamoDBClient = createTestDynamoDBClient(); // Create table deploymentTableName = await createDeploymentTestTable(dynamoDBClient); }); afterAll(async () => { await dynamoDBClient .deleteTable({ TableName: deploymentTableName, }) .promise(); }); test('Get the latest deployments', async () => { // Create 20 fake deployments for (let index = 1; index <= 20; index++) { const deploymentId = `test${index}`; await createDeployment({ dynamoDBClient, deploymentTableName, deploymentId, createDate: new Date(2022, 0, index), }); } // First batch const result1 = await listDeployments({ deploymentTableName, dynamoDBClient, limit: 10, }); expect(result1.meta.count).toBe(10); expect(result1.meta.lastKey!.deploymentId).toBe('test11'); // Second batch const result2 = await listDeployments({ deploymentTableName, dynamoDBClient, limit: 5, startKey: result1.meta.lastKey!, }); expect(result2.meta.count).toBe(5); expect(result2.meta.lastKey!.deploymentId).toBe('test6'); // Last batch const result3 = await listDeployments({ deploymentTableName, dynamoDBClient, limit: 10, startKey: result2.meta.lastKey!, }); expect(result3.meta.count).toBe(5); expect(result3.meta.lastKey).toBeNull(); }); }); ================================================ FILE: packages/dynamodb-actions/test/deployment/update-deployment.test.ts ================================================ import DynamoDB from 'aws-sdk/clients/dynamodb'; import { createDeployment, getDeploymentById, updateDeploymentStatusCreateInProgress, updateDeploymentStatusFinished, } from '../../src'; import { createTestDynamoDBClient, createDeploymentTestTable, } from '../test-utils'; describe('Update deployment', () => { let dynamoDBClient: DynamoDB; let deploymentTableName: string; beforeAll(async () => { dynamoDBClient = createTestDynamoDBClient(); // Create table deploymentTableName = await createDeploymentTestTable(dynamoDBClient); }); afterAll(async () => { await dynamoDBClient .deleteTable({ TableName: deploymentTableName, }) .promise(); }); test('Status: Create in progress', async () => { const deploymentId = 'statusCreateInProgress'; const deployment = await createDeployment({ dynamoDBClient, deploymentTableName, deploymentId, }); const expectedObject = { ...deployment, Prerenders: 'foo', Routes: 'bar', Status: 'CREATE_IN_PROGRESS', LambdaRoutes: '{}', }; const updateResponse = await updateDeploymentStatusCreateInProgress({ dynamoDBClient, deploymentTableName, deploymentId, prerenders: 'foo', routes: 'bar', cloudFormationStack: 'arn:aws:cloudformation:eu-central-1:123456789123:stack/tfn-d35de1a94815e0562689b89b6225cd85/319a93a0-c3df-11ec-9e1a-0a226e11de6a', }); expect(updateResponse).toMatchObject(expectedObject); const updatedDeployment = await getDeploymentById({ dynamoDBClient, deploymentTableName, deploymentId, }); expect(updatedDeployment).toMatchObject(expectedObject); }); test('Status: Finished', async () => { const deploymentId = 'statusFinished'; const deployment = await createDeployment({ dynamoDBClient, deploymentTableName, deploymentId, }); const expectedObject = { ...deployment, Prerenders: 'foo', Routes: 'bar', Status: 'FINISHED', LambdaRoutes: '{}', }; // INITIALIZED -> CREATE_IN_PROGRESS await updateDeploymentStatusCreateInProgress({ dynamoDBClient, deploymentTableName, deploymentId, prerenders: 'foo', routes: 'bar', cloudFormationStack: 'arn:aws:cloudformation:eu-central-1:123456789123:stack/tfn-d35de1a94815e0562689b89b6225cd85/319a93a0-c3df-11ec-9e1a-0a226e11de6a', }); // CREATE_IN_PROGRESS -> FINISHED const updateResponse = await updateDeploymentStatusFinished({ dynamoDBClient, deploymentTableName, deploymentId, }); expect(updateResponse).toMatchObject(expectedObject); const updatedDeployment = await getDeploymentById({ dynamoDBClient, deploymentTableName, deploymentId, }); expect(updatedDeployment).toMatchObject(expectedObject); }); }); ================================================ FILE: packages/dynamodb-actions/test/test-utils.ts ================================================ import { pseudoRandomBytes } from 'crypto'; import DynamoDB from 'aws-sdk/clients/dynamodb'; function createTestDynamoDBClient() { return new DynamoDB({ endpoint: process.env.TEST_DYNAMO_ENDPOINT ?? 'http://localhost:8000', region: 'mock', credentials: { accessKeyId: 'accessKeyId', secretAccessKey: 'secretAccessKey', }, }); } async function createAliasTestTable(dynamoDBClient: DynamoDB) { const tableName = pseudoRandomBytes(16).toString('hex'); // Uses the same definition as in main.tf (in the project root) const response = await dynamoDBClient .createTable({ BillingMode: 'PAY_PER_REQUEST', TableName: tableName, AttributeDefinitions: [ { AttributeName: 'PK', AttributeType: 'S', }, { AttributeName: 'SK', AttributeType: 'S', }, { AttributeName: 'GSI1PK', AttributeType: 'S', }, { AttributeName: 'GSI1SK', AttributeType: 'S', }, ], KeySchema: [ { AttributeName: 'PK', KeyType: 'HASH', }, { AttributeName: 'SK', KeyType: 'RANGE', }, ], ProvisionedThroughput: { ReadCapacityUnits: 0, WriteCapacityUnits: 0, }, GlobalSecondaryIndexes: [ { IndexName: 'DeploymentIdIndex', KeySchema: [ { AttributeName: 'GSI1PK', KeyType: 'HASH', }, { AttributeName: 'GSI1SK', KeyType: 'RANGE', }, ], Projection: { ProjectionType: 'INCLUDE', NonKeyAttributes: [ 'BasePath', 'CreateDate', 'DeploymentAlias', 'DeploymentId', 'HostnameRev', ], }, }, ], }) .promise(); if (response.$response.error) { throw response.$response.error; } return tableName; } async function createDeploymentTestTable(dynamoDBClient: DynamoDB) { const tableName = pseudoRandomBytes(16).toString('hex'); // Uses the same definition as in main.tf (in the project root) const response = await dynamoDBClient .createTable({ BillingMode: 'PAY_PER_REQUEST', TableName: tableName, AttributeDefinitions: [ { AttributeName: 'PK', AttributeType: 'S', }, { AttributeName: 'SK', AttributeType: 'S', }, { AttributeName: 'GSI1SK', AttributeType: 'S', }, ], KeySchema: [ { AttributeName: 'PK', KeyType: 'HASH', }, { AttributeName: 'SK', KeyType: 'RANGE', }, ], ProvisionedThroughput: { ReadCapacityUnits: 0, WriteCapacityUnits: 0, }, GlobalSecondaryIndexes: [ // GSI1SK: CreateDateIndex { IndexName: 'CreateDateIndex', KeySchema: [ { AttributeName: 'PK', KeyType: 'HASH', }, { AttributeName: 'GSI1SK', KeyType: 'RANGE', }, ], Projection: { ProjectionType: 'INCLUDE', NonKeyAttributes: [ 'DeploymentId', 'CreateDate', 'Status', 'DeploymentAlias', ], }, }, ], }) .promise(); if (response.$response.error) { throw response.$response.error; } return tableName; } export { createDeploymentTestTable, createAliasTestTable, createTestDynamoDBClient, }; ================================================ FILE: packages/dynamodb-actions/test/utils/reverse-hostname.test.ts ================================================ import { reverseHostname } from '../../src/utils/reverse-hostname'; describe('Reverse hostname', () => { test('Unicode characters', () => { expect(reverseHostname('𝌆.bar.mañana.mañana.example.com')).toBe( 'com.example.mañana.mañana.bar.𝌆' ); }); }); ================================================ FILE: packages/dynamodb-actions/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./dist" }, "include": ["./src/**/*", "./test/**/*"] } ================================================ FILE: packages/node-bridge/.gitignore ================================================ dist ================================================ FILE: packages/node-bridge/LICENSE ================================================ Apache License Version 2.0, January 2004 https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2020 Felix Haus (milliVolt infrastructure) Copyright 2017 Vercel, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: packages/node-bridge/README.md ================================================ # @millihq/terraform-next-node-bridge Fork from [`@vercel/now-node-bridge`](https://github.com/vercel/vercel/tree/master/packages/now-node-bridge). ## Differences - Supports API Gateway 2.0 format - Removes Support for NowProxyEvents ================================================ FILE: packages/node-bridge/jest.config.js ================================================ /** @type {import('ts-jest').InitialOptionsTsJest} */ module.exports = { preset: 'ts-jest', testEnvironment: 'node', rootDir: './', }; ================================================ FILE: packages/node-bridge/package.json ================================================ { "name": "@millihq/terraform-next-node-bridge", "version": "1.0.0-canary.5", "license": "Apache-2.0", "repository": { "type": "git", "url": "https://github.com/milliHQ/terraform-next.js.git", "directory": "packages/node-bridge" }, "main": "./dist/bridge.js", "types": "./dist/bridge.d.ts", "files": [ "dist/*" ], "scripts": { "build": "tsc" }, "devDependencies": { "jest": "*", "ts-jest": "*", "typescript": "*" } } ================================================ FILE: packages/node-bridge/src/bridge.ts ================================================ /// import { AddressInfo } from 'net'; import { APIGatewayProxyEventV2, APIGatewayProxyStructuredResultV2, Context, } from 'aws-lambda'; import { Server, IncomingHttpHeaders, OutgoingHttpHeaders, request, } from 'http'; // Remember that all header names are lower-cased in API Gateway context // However the local API Gateway emulation does not guarantee that they are // always lower-cased (https://github.com/aws/aws-sam-cli/issues/3034) const HEADER_KEY_X_FORWARDED_HOST = 'x-forwarded-host'; const HEADER_KEY_COOKIE = 'cookie'; const HEADER_KEY_HOST = 'host'; export interface NowProxyRequest { method: string; path: string; headers: IncomingHttpHeaders; body: Buffer; } export interface NowProxyResponse { statusCode: number; headers: OutgoingHttpHeaders; body: string; isBase64Encoded: boolean; } interface ServerLike { timeout?: number; listen: ( opts: { host?: string; port?: number; }, callback: (this: Server | null) => void ) => Server | void; } /** * If the `http.Server` handler function throws an error asynchronously, * then it ends up being an unhandled rejection which doesn't kill the node * process which causes the HTTP request to hang indefinitely. So print the * error here and force the process to exit so that the lambda invocation * returns an Unhandled error quickly. */ process.on('unhandledRejection', (err) => { console.error('Unhandled rejection:', err); process.exit(1); }); function findInsensitiveKeyInObject(obj: Record, key: string) { // Check for exact match first if (key in obj) { return key; } // Try to find insensitive key const lowerCaseKey = key.toLowerCase(); for (const indexKey in obj) { if (indexKey.toLowerCase() === lowerCaseKey) { return indexKey; } } return null; } function normalizeAPIGatewayProxyEvent( event: APIGatewayProxyEventV2 ): NowProxyRequest { let bodyBuffer: Buffer | null; const { requestContext: { http: { method }, }, rawQueryString, headers = {}, body, pathParameters = {}, cookies, } = event; // Since we always use a path like // `/__NEXT_PAGE_LAMBDA_0/{proxy+}` // proxy is always the absolute path without the resource // e.g. `/__NEXT_PAGE_LAMBDA_0/test` => proxy: `test` const trimmedPath = pathParameters.proxy ? `/${pathParameters.proxy}` : '/'; // API Gateway cuts the query string from the path // https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html // TODO: Move to Vercel trusted params in future const parameterizedPath = rawQueryString ? `${trimmedPath}?${rawQueryString}` : trimmedPath; // API Gateway 2.0 payload splits cookie header from the rest, // so we need to readd them if (cookies) { headers[HEADER_KEY_COOKIE] = cookies.join('; '); } // Replace the `host` header with the value of `X-Forwarded-Host` if available const forwardedHostHeaderKey = findInsensitiveKeyInObject( headers, HEADER_KEY_X_FORWARDED_HOST ); if (forwardedHostHeaderKey !== null) { headers[HEADER_KEY_HOST] = headers[forwardedHostHeaderKey]; delete headers[forwardedHostHeaderKey]; } if (body) { if (event.isBase64Encoded) { bodyBuffer = Buffer.from(body, 'base64'); } else { bodyBuffer = Buffer.from(body); } } else { bodyBuffer = Buffer.alloc(0); } return { method, path: parameterizedPath, headers, body: bodyBuffer, }; } export class Bridge { private server: ServerLike | null; private listening: Promise; private resolveListening: (info: AddressInfo) => void; private events: { [key: string]: NowProxyRequest } = {}; private reqIdSeed = 1; private shouldStoreEvents = false; constructor(server?: ServerLike, shouldStoreEvents = false) { this.server = null; this.shouldStoreEvents = shouldStoreEvents; if (server) { this.setServer(server); } this.launcher = this.launcher.bind(this); // This is just to appease TypeScript strict mode, since it doesn't // understand that the Promise constructor is synchronous this.resolveListening = (_info: AddressInfo) => {}; // eslint-disable-line @typescript-eslint/no-unused-vars this.listening = new Promise((resolve) => { this.resolveListening = resolve; }); } setServer(server: ServerLike) { this.server = server; } listen() { const { server, resolveListening } = this; if (!server) { throw new Error('Server has not been set!'); } if (typeof server.timeout === 'number' && server.timeout > 0) { // Disable timeout (usually 2 minutes until Node 13). // Instead, user should assign function `maxDuration`. server.timeout = 0; } return server.listen( { host: '127.0.0.1', port: 0, }, function listeningCallback() { if (!this || typeof this.address !== 'function') { throw new Error( 'Missing server.address() function on `this` in server.listen()' ); } const addr = this.address(); if (!addr) { throw new Error('`server.address()` returned `null`'); } if (typeof addr === 'string') { throw new Error( `Unexpected string for \`server.address()\`: ${addr}` ); } resolveListening(addr); } ); } async launcher( event: APIGatewayProxyEventV2, context: Pick ): Promise { context.callbackWaitsForEmptyEventLoop = false; const { port } = await this.listening; const normalizedEvent = normalizeAPIGatewayProxyEvent(event); const { method, path, headers, body } = normalizedEvent; if (this.shouldStoreEvents) { const reqId = `${this.reqIdSeed++}`; this.events[reqId] = normalizedEvent; headers['x-now-bridge-request-id'] = reqId; } // eslint-disable-next-line consistent-return return new Promise((resolve, reject) => { const opts = { hostname: '127.0.0.1', port, path, method }; const req = request(opts, (res) => { const response = res; const respBodyChunks: Buffer[] = []; response.on('data', (chunk) => respBodyChunks.push(Buffer.from(chunk))); response.on('error', reject); response.on('end', () => { const bodyBuffer = Buffer.concat(respBodyChunks); const _headers: Record = {}; const cookies: string[] = []; // Iterate over all headers and normalize them (to strings) and filter our cookies for (const headerKey in response.headers) { const headerValue = response.headers[headerKey]; // 'content-length' is calculated by API Gateway if (headerKey === 'content-length') { continue; } // Is dropped by API Gateway // Was added in Next.js 11.1.0 // We need to remove this, since the in the local e2e tests // AWS SAM CLI forwards this header to the viewer, which produces // an error, since `transfer-encoding` and `content-length` headers // should not be present on the same response if (headerKey === 'transfer-encoding') { continue; } // Filter out cookies if (headerKey === 'set-cookie' && headerValue) { if (typeof headerValue === 'string') { cookies.push(headerValue); } else { cookies.push(...headerValue); } continue; } // Transform multi value headers to comma separated headers // ['value1', 'value2'] => 'value1,value2' // TODO: Seems like headers are already comma separated when they // arrive here (comment this out and run unit tests) // So we should find out if this is the general behavior of Node.js if (Array.isArray(headerValue)) { _headers[headerKey] = headerValue.join(', '); continue; } if (headerValue) { _headers[headerKey] = headerValue as string; } } resolve({ cookies, statusCode: response.statusCode || 200, headers: _headers, body: bodyBuffer.toString('base64'), isBase64Encoded: true, }); }); }); req.on('error', (error) => { setTimeout(() => { // this lets express print the true error of why the connection was closed. // it is probably 'Cannot set headers after they are sent to the client' reject(error); }, 2); }); for (const [name, value] of Object.entries(headers)) { if (value === undefined) { console.error( 'Skipping HTTP request header %j because value is undefined', name ); continue; } try { req.setHeader(name, value); } catch (err: any) { console.error( 'Skipping HTTP request header: %j', `${name}: ${value}` ); console.error(err.message); } } if (body) req.write(body); req.end(); }); } consumeEvent(reqId: string) { const event = this.events[reqId]; delete this.events[reqId]; return event; } } ================================================ FILE: packages/node-bridge/test/bridge.test.js ================================================ const assert = require('assert'); const { Server } = require('http'); const { Bridge } = require('../src/bridge'); const { parse: parseUrl } = require('url'); test('port binding', async () => { const server = new Server(); const bridge = new Bridge(server); bridge.listen(); // Test port binding const info = await bridge.listening; expect(info.address).toBe('127.0.0.1'); expect(typeof info.port).toBe('number'); server.close(); }); test('[APIGatewayProxyEvent] normalizing', async () => { const server = new Server((req, res) => { res.setHeader('Set-Cookie', 'abc'); res.setHeader('x-some-multi-header', ['d', 'e', 'f']); res.end( JSON.stringify({ method: req.method, path: req.url, headers: req.headers, }) ); }); const bridge = new Bridge(server); bridge.listen(); const context = {}; const result = await bridge.launcher( { headers: { foo: 'bar', multi: 'a,b,c' }, rawPath: '/__NEXT_PAGE_LAMBDA_0/test/a/b/c/', requestContext: { http: { method: 'GET', path: '/__NEXT_PAGE_LAMBDA_0/test/a/b/c/', }, }, pathParameters: { proxy: 'test/a/b/c/', }, body: null, }, context ); expect(result.isBase64Encoded).toBe(true); expect(result.statusCode).toBe(200); expect(result.isBase64Encoded).toBe(true); expect(result.headers['set-cookie']).toBeUndefined(); expect(result.headers['Set-Cookie']).toBeUndefined(); expect(result.cookies).toEqual(['abc']); expect(result.headers).toEqual( expect.objectContaining({ 'x-some-multi-header': 'd, e, f', }) ); const body = JSON.parse(Buffer.from(result.body, 'base64').toString()); expect(body.method).toBe('GET'); expect(body.path).toBe('/test/a/b/c/'); expect(body.headers.foo).toBe('bar'); expect(body.headers.multi).toEqual('a,b,c'); expect(context.callbackWaitsForEmptyEventLoop).toBe(false); server.close(); }); test('[APIGatewayProxyEvent] cookie handling', async () => { const server = new Server((req, res) => { res.setHeader('Set-Cookie', ['server-cookie-1', 'server-cookie-2']); res.end( JSON.stringify({ method: req.method, path: req.url, headers: req.headers, }) ); }); const bridge = new Bridge(server); bridge.listen(); const context = {}; const result = await bridge.launcher( { cookies: ['cookie-1; cookie-2', 'cookie-3'], rawPath: '/__NEXT_PAGE_LAMBDA_0/', requestContext: { http: { method: 'POST', path: '/__NEXT_PAGE_LAMBDA_0/', }, }, pathParameters: { proxy: '', }, body: null, }, context ); expect(result.cookies).toEqual(['server-cookie-1', 'server-cookie-2']); const body = JSON.parse(Buffer.from(result.body, 'base64').toString()); expect(body.method).toBe('POST'); expect(body.path).toBe('/'); expect(body.headers.cookie).toBe('cookie-1; cookie-2; cookie-3'); server.close(); }); test('[APIGatewayProxyEvent] Querystring handling', async () => { const server = new Server((req, res) => { const { query } = parseUrl(req.url, true); res.end( JSON.stringify({ method: req.method, path: req.url, query: query, headers: req.headers, }) ); }); const bridge = new Bridge(server); bridge.listen(); const context = {}; const result = await bridge.launcher( { rawQueryString: 'id=param1&id=param2', queryStringParameters: { id: 'param1,param2', }, rawPath: '/__NEXT_PAGE_LAMBDA_0/', requestContext: { http: { method: 'GET', path: '/__NEXT_PAGE_LAMBDA_0/', }, }, pathParameters: { proxy: '', }, body: null, }, context ); const body = JSON.parse(Buffer.from(result.body, 'base64').toString()); expect(body.method).toBe('GET'); expect(body.path).toBe(`/?id=param1&id=param2`); expect(body.query).toEqual({ id: ['param1', 'param2'], }); server.close(); }); test('consumeEvent', async () => { const mockListener = jest.fn((req, res) => { res.end('hello'); }); const server = new Server(mockListener); const bridge = new Bridge(server, true); bridge.listen(); const context = { callbackWaitsForEmptyEventLoop: true }; await bridge.launcher( { headers: { foo: 'baz' }, requestContext: { http: { method: 'POST', path: '/nowproxy', }, }, rawPath: '/nowproxy', body: 'body=1', }, context ); const headers = mockListener.mock.calls[0][0].headers; const reqId = headers['x-now-bridge-request-id']; expect(reqId).toBeTruthy(); const event = bridge.consumeEvent(reqId); expect(event.body.toString()).toBe('body=1'); // an event can't be consumed multiple times // to avoid memory leaks expect(bridge.consumeEvent(reqId)).toBeUndefined(); server.close(); }); test('invalid request headers', async () => { const server = new Server((req, res) => res.end( JSON.stringify({ method: req.method, path: req.url, headers: req.headers, }) ) ); const bridge = new Bridge(server); bridge.listen(); const context = { callbackWaitsForEmptyEventLoop: true }; const result = await bridge.launcher( { requestContext: { http: { method: 'GET', path: '/nowproxy', }, }, rawPath: '/nowproxy', headers: { foo: 'baz\n', ok: 'true' }, body: JSON.stringify({ method: 'GET', path: '/nowproxy', body: 'body=1', }), pathParameters: { proxy: 'nowproxy', }, }, context ); expect(result.isBase64Encoded).toBe(true); expect(result.statusCode).toBe(200); const body = JSON.parse(Buffer.from(result.body, 'base64').toString()); expect(body.method).toBe('GET'); expect(body.path).toBe('/nowproxy'); expect(body.headers.ok).toBe('true'); assert(!body.headers.foo); expect(context.callbackWaitsForEmptyEventLoop).toBe(false); server.close(); }); test('[APIGatewayProxyEvent] Replace Host header with X-Forwarded-Host', async () => { const server = new Server((req, res) => { const { query } = parseUrl(req.url, true); res.end( JSON.stringify({ method: req.method, path: req.url, query: query, headers: req.headers, }) ); }); const bridge = new Bridge(server); bridge.listen(); const context = {}; const result = await bridge.launcher( { rawQueryString: '', queryStringParameters: {}, rawPath: '/__NEXT_PAGE_LAMBDA_0/', requestContext: { http: { method: 'GET', path: '/__NEXT_PAGE_LAMBDA_0/', }, }, headers: { 'x-forwarded-host': 'example.com' }, pathParameters: { proxy: '', }, body: null, }, context ); const body = JSON.parse(Buffer.from(result.body, 'base64').toString()); expect(body.method).toBe('GET'); expect(body.headers).toEqual( expect.objectContaining({ host: 'example.com', }) ); expect(body.headers['x-forwarded-host']).toBeUndefined(); server.close(); }); ================================================ FILE: packages/node-bridge/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "compilerOptions": { "typeRoots": ["../../node_modules/@types"], "outDir": "dist", "declaration": true }, "include": ["src/**/*"] } ================================================ FILE: packages/proxy/.gitignore ================================================ dist dist.zip ================================================ FILE: packages/proxy/README.md ================================================ # Terraform Next.js Proxy component Proxy component of [Terraform Next.js module for AWS](https://github.com/milliHQ/terraform-aws-next-js). ## License Apache-2.0 - see [LICENSE](./LICENSE) for details. ================================================ FILE: packages/proxy/error.html ================================================ ${title}

${title}

Code: ${errorCode}

================================================ FILE: packages/proxy/jest.config.js ================================================ /** @type {import('ts-jest').InitialOptionsTsJest} */ module.exports = { preset: 'ts-jest', testEnvironment: 'node', rootDir: './', }; ================================================ FILE: packages/proxy/ncc.config.json ================================================ { "externals": { "aws-sdk": "aws-sdk", "/^aws-sdk(/.*)/": "aws-sdk$1" }, "minify": true } ================================================ FILE: packages/proxy/package.json ================================================ { "name": "@millihq/terraform-next-proxy", "version": "1.0.0-canary.5", "description": "Proxy component of Terraform Next.js module for AWS", "main": "index.js", "license": "Apache-2.0", "homepage": "https://registry.terraform.io/modules/milliHQ/next-js/aws", "repository": { "type": "git", "url": "https://github.com/milliHQ/terraform-next.js.git", "directory": "packages/proxy" }, "scripts": { "build": "ncc-zip build -f handler --license third-party-licenses.txt src/handler.ts", "prepack": "cp dist/third-party-licenses.txt ../../LICENSE ./", "postpack": "rm ./LICENSE ./third-party-licenses.txt" }, "dependencies": { "@vercel/fetch-cached-dns": "^2.1.0", "@vercel/routing-utils": "^1.9.1", "abort-controller": "^3.0.0", "node-fetch": "^2.6.7" }, "devDependencies": { "@types/aws-lambda": "*", "@types/node-fetch": "^2.6.1", "@vercel/ncc": "*", "get-port": "^5.1.1", "jest": "*", "ncc-zip": "^2.1.0", "ts-jest": "*", "typescript": "*" }, "files": [ "dist.zip", "third-party-licenses.txt" ] } ================================================ FILE: packages/proxy/src/actions/fetch-cached.ts ================================================ import { fetchTimeout } from '../util/fetch-timeout'; import { TTLCache } from '../util/ttl-cache'; type NodeFetch = typeof import('node-fetch').default; // Timeout the connection before 30000ms to be able to print an error message // See Lambda@Edge Limits for origin-request event here: // https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html#limits-lambda-at-edge const FETCH_TIMEOUT = 29500; /** * Gets items from the cache or updates the cache when the item is * stale or not in the cache. * * @param fetch - Fetch library to use * @param cache - TTL cache to use * @param url - URL for revalidating stale / fetching uncached items * @key key - Key that is used to store the item in cache * @returns Parsed item */ async function fetchCached( fetch: NodeFetch, cache: TTLCache, url: string, key: string ): Promise { let etag: string | undefined; // 1. Check cache for existing item const cacheResult = cache.get(key); if (cacheResult !== null) { // 1.1 Item is in cache and not stale if (!cacheResult.expired) { return cacheResult.item; } // 1.2 Item is in cache but is stale, then set etag etag = cacheResult.item.etag; } // 2. Revalidate cache from proxy config endpoint const response = await fetchTimeout(fetch, FETCH_TIMEOUT, url, etag); // 2.1 Existing cache is still valid, update TTL, return cached item if (response.status === 304) { cache.updateTTL(key); return cacheResult!.item; } // 2.2 Parse the result and save it to the cache if (response.status === 200) { const parsedItem = (await response.json()) as Data; // Etag is always present on CloudFront responses const responseEtag = response.headers.get('etag')!; parsedItem.etag = responseEtag; cache.set(key, parsedItem); return parsedItem; } // 3. Not found if (response.status === 404) { return null; } // 4. Other Error throw new Error('Failed to fetch from endpoint.'); } export { fetchCached }; ================================================ FILE: packages/proxy/src/actions/fetch-file-system.ts ================================================ import { TTLCache } from '../util/ttl-cache'; import { FileSystemEntry } from '../types'; import { fetchCached } from './fetch-cached'; type NodeFetch = typeof import('node-fetch').default; /** * Checks if a file exits in the fileSystem. * * @param fetch * @param cache * @param endpointUrl * @param deploymentId * @param filePath * @returns */ function fetchFileSystem( fetch: NodeFetch, cache: TTLCache, endpointUrl: string, deploymentId: string, filePath: string ): Promise { const url = `${endpointUrl}/filesystem/${deploymentId}/${filePath}`; const cacheKey = deploymentId + filePath; return fetchCached(fetch, cache, url, cacheKey); } export { fetchFileSystem }; ================================================ FILE: packages/proxy/src/actions/fetch-proxy-config.ts ================================================ import { TTLCache } from '../util/ttl-cache'; import { ProxyConfig } from '../types'; import { fetchCached } from './fetch-cached'; type NodeFetch = typeof import('node-fetch').default; /** * Gets the proxy config from the cache or updates the cache when the item is * stale or not in the cache. * * @param endpointUrl - URL where the config should be fetched from * @returns Parsed config object */ function fetchProxyConfig( fetch: NodeFetch, cache: TTLCache, endpointUrl: string, key: string ): Promise { const url = `${endpointUrl}/aliases/${encodeURI(key)}`; return fetchCached(fetch, cache, url, key); } export { fetchProxyConfig }; ================================================ FILE: packages/proxy/src/error/alias-not-configured.ts ================================================ import { CloudFrontResultResponse } from 'aws-lambda'; import { renderError } from './render-error'; class AliasNotConfigured extends Error { isHandled = true; toCloudFrontResponse(): CloudFrontResultResponse { return renderError({ status: 404, errorCode: 'PROXY_ALIAS_NOT_CONFIGURED', ttl: 60, }); } } export { AliasNotConfigured }; ================================================ FILE: packages/proxy/src/error/missing-config.ts ================================================ import { CloudFrontResultResponse } from 'aws-lambda'; import { renderError } from './render-error'; /** * Used when the config of the proxy cannot be loaded */ class MissingConfigError extends Error { toCloudFrontResponse(): CloudFrontResultResponse { return renderError({ status: 500, errorCode: 'PROXY_MISSING_CONFIG', }); } } export { MissingConfigError }; ================================================ FILE: packages/proxy/src/error/render-error.ts ================================================ import { STATUS_CODES } from 'http'; import { CloudFrontResultResponse } from 'aws-lambda'; type RenderErrorOptions = { errorCode: string; /** * HTTP status code. */ status: number; /** * How long should this live in the CloudFront cache. */ ttl?: number; }; /** * Render a customer facing HTML error response. */ function renderError({ errorCode, status, ttl = 0, }: RenderErrorOptions): CloudFrontResultResponse { const title = `${status} - ${STATUS_CODES[status]}`; return { status: status.toString(), headers: { 'cache-control': [ { key: 'Cache-Control', value: `public, max-age=${ttl}, must-revalidate`, }, ], 'content-type': [ { key: 'Content-Type', value: 'text/html; charset=utf-8', }, ], }, body: `${title}

${title}

Code: ${errorCode}

`, }; } export { renderError }; ================================================ FILE: packages/proxy/src/handler.ts ================================================ import { CloudFrontHeaders, CloudFrontResultResponse, CloudFrontRequestEvent, CloudFrontRequest, } from 'aws-lambda'; import { appendQuerystring } from './util/append-querystring'; import { fetchProxyConfig } from './actions/fetch-proxy-config'; import { generateCloudFrontHeaders } from './util/generate-cloudfront-headers'; import { createCustomOriginFromApiGateway, createCustomOriginFromUrl, serveRequestFromCustomOrigin, serveRequestFromS3Origin, } from './util/custom-origin'; import { TTLCache } from './util/ttl-cache'; import { Proxy } from './proxy'; import { ProxyConfig, RouteResult } from './types'; import { renderError } from './error/render-error'; import { MissingConfigError } from './error/missing-config'; import { getEnv } from './util/get-env'; /** * We use a custom fetch implementation here that caches DNS resolutions * to improve performance for repeated requests. */ const fetch = require('@vercel/fetch-cached-dns')(require('node-fetch')); // TTL in ms const CACHE_TTL = 60_000; // Calculating with a const proxyConfigCache = new TTLCache(CACHE_TTL); const proxy = new Proxy(fetch); /** * Checks if a route result issued a redirect */ function isRedirect( routeResult: RouteResult ): false | CloudFrontResultResponse { if ( routeResult.status && routeResult.status >= 300 && routeResult.status <= 309 ) { const redirectTarget = routeResult.headers['Location']; if (redirectTarget) { // Append the original querystring to the redirect const redirectTargetWithQuerystring = routeResult.uri_args ? appendQuerystring(redirectTarget, routeResult.uri_args) : redirectTarget; // Override the Location header value with the appended querystring routeResult.headers['Location'] = redirectTargetWithQuerystring; // Redirects are not cached, see discussion for details: // https://github.com/milliHQ/terraform-aws-next-js/issues/296 const initialHeaders: CloudFrontHeaders = { 'cache-control': [ { key: 'Cache-Control', value: 'public, max-age=0, must-revalidate', }, ], 'content-type': [ { key: 'Content-Type', value: 'text/plain', }, ], }; return { status: routeResult.status.toString(), headers: generateCloudFrontHeaders(initialHeaders, routeResult.headers), body: `Redirecting to ${redirectTargetWithQuerystring} (${routeResult.status})`, }; } } return false; } /** * Handler that is called by Lambda@Edge. * * @param event - Incoming event from CloudFront * @see {@link http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html} * @returns CloudFront request or response modified by the proxy. */ async function handler( event: CloudFrontRequestEvent ): Promise { /** * ! Important ! * The `request` object should only be modified when the function returns. * Changing properties inside of the function may cause unwanted side-effects * that are difficult to track. */ try { const { request } = event.Records[0].cf; const configEndpoint = getEnv(request, 'x-env-config-endpoint'); const alias = request.headers.host[0].value; // TODO: Remove const apiEndpoint = ''; if (!alias) { throw new Error('Alias could not be determined from request'); } const proxyConfig = await fetchProxyConfig( fetch, proxyConfigCache, configEndpoint, alias ); if (!proxyConfig) { throw new MissingConfigError(); } // Check if we have a prerender route // Bypasses proxy if (request.uri in proxyConfig.prerenders) { const customOrigin = createCustomOriginFromApiGateway( `/${proxyConfig.prerenders[request.uri].lambda}`, proxyConfig.lambdaRoutes ); return serveRequestFromCustomOrigin(request, customOrigin); } // Handle request by proxy // Append query string if we have one // @see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html const requestPath = request.querystring !== '' ? `${request.uri}?${request.querystring}` : request.uri; const proxyResult = await proxy.route( proxyConfig.deploymentId, proxyConfig.routes, proxyConfig.lambdaRoutes, configEndpoint, requestPath ); // Check for redirect const redirect = isRedirect(proxyResult); if (redirect) { return redirect; } // Check if route is served by lambda if (proxyResult.target === 'lambda') { // Modify request to be served from Api Gateway const customOrigin = createCustomOriginFromApiGateway( proxyResult.dest, proxyConfig.lambdaRoutes ); // Append querystring if we have any const querystring = proxyResult.uri_args ? proxyResult.uri_args.toString() : ''; return serveRequestFromCustomOrigin( request, customOrigin, proxyResult.headers, querystring ); } if (proxyResult.target === 'url') { // Modify request to be served from external host const [customOrigin, destUrl] = createCustomOriginFromUrl( proxyResult.dest ); // Modify URI to match the path const uri = destUrl.pathname; // Append querystring if we have any const querystring = proxyResult.uri_args ? proxyResult.uri_args.toString() : ''; return serveRequestFromCustomOrigin( request, customOrigin, proxyResult.headers, querystring, uri ); } // Route is served by S3 bucket const notFound = proxyResult.phase === 'error' && proxyResult.status === 404; const uri = !notFound && proxyResult.found ? proxyResult.dest : undefined; return serveRequestFromS3Origin(request, uri); } catch (error: any) { if (!error.isHandled) { // Log full error message to CloudWatch Logs console.error(error); } // Errors that generate its own response if (error.toCloudFrontResponse) { return error.toCloudFrontResponse(); } // Unhandled error return renderError({ errorCode: 'PROXY_ERROR', status: 500, }); } } export { handler }; ================================================ FILE: packages/proxy/src/index.ts ================================================ /** * This is a export only file used for test suites * The file is not shipped with the production build */ export { Proxy } from './proxy'; export { ProxyConfig } from './types'; ================================================ FILE: packages/proxy/src/proxy.ts ================================================ import { URL, URLSearchParams } from 'url'; import { Route, isHandler, HandleValue } from '@vercel/routing-utils'; import { fetchFileSystem } from './actions/fetch-file-system'; import isURL from './util/is-url'; import { resolveRouteParameters } from './util/resolve-route-parameters'; import { TTLCache } from './util/ttl-cache'; import { RouteResult, HTTPHeaders, FileSystemEntry } from './types'; import { ETagCache } from './util/etag-cache'; type NodeFetch = typeof import('node-fetch').default; /* ----------------------------------------------------------------------------- * Utils * ---------------------------------------------------------------------------*/ // Since we have no replacement for url.parse, thanks Node.js // https://github.com/nodejs/node/issues/12682 const baseUrl = 'http://n'; function parseUrl(url: string) { const _url = new URL(url, baseUrl); return { pathname: _url.pathname, searchParams: _url.searchParams, }; } /** * Appends URLSearchParams from param 2 to param 1. * Basically Object.assign for URLSearchParams * @param param1 * @param param2 */ function appendURLSearchParams( param1: URLSearchParams, param2: URLSearchParams ) { for (const [key, value] of param2.entries()) { param1.append(key, value); } return param1; } /* ----------------------------------------------------------------------------- * Proxy * ---------------------------------------------------------------------------*/ export class Proxy { filesystemCache: TTLCache; routeCache: ETagCache; fetch: NodeFetch; constructor(fetch: NodeFetch) { this.fetch = fetch; // TTL for filesystem is 0 since TTL is determined by the cache-control // of the file. this.filesystemCache = new TTLCache(0); this.routeCache = new ETagCache(); } /** * Checks if the requested path matches a static file from the filesystem * * @param requestedFilePath - Path to the potential file. Could include a * querystring. * @returns Absolute path to the file that is matched, otherwise null */ async checkFileSystem( deploymentId: string, fileSystemEndpointUrl: string, requestedFilePathWithPossibleQuerystring: string ): Promise { // Make sure the querystring is removed from the requested file before // doing the lookup const querystringStartPos = requestedFilePathWithPossibleQuerystring.indexOf('?'); const requestedFilePath = querystringStartPos === -1 ? requestedFilePathWithPossibleQuerystring : requestedFilePathWithPossibleQuerystring.substring( 0, querystringStartPos ); // If the last character is a `/` (invalid S3 key), change it to `/index` let requestedFilePathWithoutTrailingSlash = requestedFilePath; if (requestedFilePath.charAt(requestedFilePath.length - 1) === '/') { requestedFilePathWithoutTrailingSlash = requestedFilePath + 'index'; } // If the first character is a `/` (invalid S3 key), remove it let s3Key = requestedFilePathWithoutTrailingSlash; if (s3Key.charAt(0) === '/') { s3Key = s3Key.substring(1); } try { const file = await fetchFileSystem( this.fetch, this.filesystemCache, fileSystemEndpointUrl, deploymentId, s3Key ); if (file) { return '/' + file.key; } } catch (error) { console.error( 'Unhandled error while checking fileSystem for route: ' + requestedFilePathWithoutTrailingSlash ); console.error(error); return null; } // requestedFilePath does not match a key in S3 return null; } async route( deploymentId: string, routes: Route[], lambdaRoutes: Record, fileSystemEndpointUrl: string, reqUrl: string ) { const parsedUrl = parseUrl(reqUrl); let { searchParams, pathname: reqPathname = '/' } = parsedUrl; let result: RouteResult | undefined; let status: number | undefined; let isContinue = false; let phase: HandleValue | undefined; let combinedHeaders: HTTPHeaders = {}; let target: undefined | 'filesystem' | 'lambda'; /** * Set the route result target as filesystem */ function setTargetFilesystem(dest: string) { result = { found: true, target: 'filesystem', dest, headers: combinedHeaders, continue: false, isDestUrl: false, status, phase, }; } for (let routeIndex = 0; routeIndex < routes.length; routeIndex++) { /** * This is how the routing basically works: * (For reference see: https://vercel.com/docs/configuration#routes) * * 1. Checks if the route is an exact match to a route in the * S3 filesystem (e.g. /test.html -> s3://test.html) * --> true: returns found in filesystem * 2. * */ const routeConfig = routes[routeIndex]; ////////////////////////////////////////////////////////////////////////// // Phase 1: Check for handler if (isHandler(routeConfig)) { phase = routeConfig.handle; // Check if the path is a static file that should be served from the // filesystem if (routeConfig.handle === 'filesystem') { const filePath = await this.checkFileSystem( deploymentId, fileSystemEndpointUrl, reqPathname ); // Check if the route matches a route from the filesystem if (filePath !== null) { setTargetFilesystem(filePath); break; } } continue; } // Skip resource phase entirely because we don't support it if (phase === 'resource') { continue; } // Special case to allow redirect to kick in when a continue route was touched before if (phase === 'error' && isContinue) { break; } ////////////////////////////////////////////////////////////////////////// // Phase 2: Check for source const { src, headers } = routeConfig; // Note: Routes are case-insensitive // TODO: Performance: Cache matcher results const matcher = new RegExp(src, 'i'); const match = matcher.exec(reqPathname); if (match !== null) { const keys = Object.keys(match.groups ?? {}); isContinue = false; // The path that should be sent to the target system (lambda or filesystem) let destPath: string = reqPathname; if (routeConfig.status) { status = routeConfig.status; } if (routeConfig.dest) { // Rewrite dynamic routes // e.g. /posts/1234 -> /posts/[id]?id=1234 destPath = resolveRouteParameters(routeConfig.dest, match, keys); } if (headers) { for (const originalKey in headers) { const originalValue = headers[originalKey]; const value = resolveRouteParameters(originalValue, match, keys); combinedHeaders[originalKey] = value; } } if (routeConfig.continue) { reqPathname = destPath; isContinue = true; } // Check for external rewrite const isDestUrl = isURL(destPath); if (isDestUrl) { result = { found: true, dest: destPath, continue: isContinue, userDest: false, isDestUrl, status: status, uri_args: searchParams, matched_route: routeConfig, matched_route_idx: routeIndex, phase, headers: combinedHeaders, target: 'url', }; if (isContinue) { continue; } break; } if (routeConfig.check && phase !== 'hit') { if (destPath in lambdaRoutes) { target = 'lambda'; } else { // Check if the path matches a route from the filesystem const filePath = await this.checkFileSystem( deploymentId, fileSystemEndpointUrl, destPath ); if (filePath !== null) { setTargetFilesystem(filePath); break; } // When it is not a lambda route we cut the url_args // for the next iteration const nextUrl = parseUrl(destPath); reqPathname = nextUrl.pathname!; appendURLSearchParams(searchParams, nextUrl.searchParams); continue; } } if (destPath.charAt(0) !== '/') { destPath = `/${destPath}`; } const destParsed = parseUrl(destPath); appendURLSearchParams(searchParams, destParsed.searchParams); result = { found: true, dest: destParsed.pathname || '/', continue: isContinue, userDest: Boolean(routeConfig.dest), isDestUrl, status: status, uri_args: searchParams, matched_route: routeConfig, matched_route_idx: routeIndex, phase, headers: combinedHeaders, target, }; if (isContinue) { continue; } break; } } if (!result) { result = { found: false, dest: reqPathname, continue: isContinue, status, isDestUrl: false, uri_args: searchParams, phase, headers: combinedHeaders, }; } return result; } } ================================================ FILE: packages/proxy/src/types.ts ================================================ import { URLSearchParams } from 'url'; import { Route, HandleValue } from '@vercel/routing-utils'; export type HTTPHeaders = Record; export interface ProxyConfig { etag: string; deploymentId: string; routes: Route[]; lambdaRoutes: Record; prerenders: Record; } export interface RouteResult { // `true` if a route was matched, `false` otherwise found: boolean; // if found this indicated wether it is a lambda or static file or an external URL target?: 'lambda' | 'filesystem' | 'url'; // "dest": dest: string; // `true` if last route in current phase matched but set `continue: true` continue: boolean; // "status": status?: number; // "headers": headers: HTTPHeaders; // "uri_args": uri_args?: URLSearchParams; // "matched_route": matched_route?: Route; // "matched_route_idx": matched_route_idx?: number; // "userDest": userDest?: boolean; // url as destination should end routing isDestUrl: boolean; // the phase that this route is defined in phase?: HandleValue | null; } export type FileSystemEntry = { etag: string; key: string; }; ================================================ FILE: packages/proxy/src/util/append-querystring.ts ================================================ import { URL, URLSearchParams } from 'url'; import isURL from './is-url'; /** * Append a querystring to a relative or absolute URL. * Already existing searchParams are not overridden by the new searchParams. * * @param url The relative or absolute URL * @param searchParams The searchParams that should be merged with the input URL */ function appendQuerystring(url: string, searchParams: URLSearchParams): string { const urlObj = new URL(url, 'https://n'); const combinedSearchParams = new URLSearchParams({ ...Object.fromEntries(searchParams), ...Object.fromEntries(urlObj.searchParams), }).toString(); if (combinedSearchParams == '') { return url; } if (isURL(url)) { urlObj.search = ''; return `${urlObj.toString()}?${combinedSearchParams}`; } return `${urlObj.pathname}?${combinedSearchParams}`; } export { appendQuerystring }; ================================================ FILE: packages/proxy/src/util/custom-origin.ts ================================================ import { URL } from 'url'; import { CloudFrontCustomOrigin, CloudFrontRequest } from 'aws-lambda'; import { generateCloudFrontHeaders } from './generate-cloudfront-headers'; import { HTTPHeaders } from '../types'; /** * Converts the input URL into a CloudFront custom origin * @param url * @returns */ export function createCustomOriginFromUrl( url: string ): [CloudFrontCustomOrigin, URL] { const _url = new URL(url); // Protocol const protocol = _url.protocol === 'http:' ? 'http' : 'https'; // Get the correct port const port = _url.port ? parseInt(_url.port, 10) : protocol === 'http' ? 80 : 443; return [ { domainName: _url.hostname, path: '', // Must not have a trailing / at the end customHeaders: {}, keepaliveTimeout: 5, port, protocol, readTimeout: 30, sslProtocols: ['TLSv1.2'], }, _url, ]; } /** * Modifies the request that it is served by API Gateway (Lambda) * * @param apiEndpoint * @param path * @returns */ export function createCustomOriginFromApiGateway( path: string, lambdaMapping: Record ): CloudFrontCustomOrigin { const _url = lambdaMapping[path]; if (!_url) { throw new Error('Lambda does not exist'); } const url = new URL(_url); return { domainName: url.hostname, path, customHeaders: {}, keepaliveTimeout: 5, port: 443, protocol: 'https', readTimeout: 30, sslProtocols: ['TLSv1.2'], }; } function serveRequestFromCustomOrigin( request: CloudFrontRequest, customOrigin: CloudFrontCustomOrigin, headers: HTTPHeaders = {}, querystring?: string, uri?: string ): CloudFrontRequest { // Change request origin to custom origin request.origin = { custom: customOrigin, }; const headersToAddToRequest: HTTPHeaders = { ...headers, host: customOrigin.domainName, }; // If the client has a `Host header defined, forward it as `X-Forwarded-Host` // to the origin if ('host' in request.headers) { headersToAddToRequest['X-Forwarded-Host'] = request.headers.host[0].value; } // Modify `Host` header to match the external host request.headers = generateCloudFrontHeaders( request.headers, headersToAddToRequest ); // Append querstring if we have one, otherwise set to '' if (typeof querystring === 'string') { request.querystring = querystring; } else { request.querystring = ''; } // Change uri if defined if (typeof uri === 'string') { request.uri = uri; } return request; } /** * Modifies a CloudFront response object so that the response gets served by S3. * * @param request Incoming request from the handler. Gets modified by the * function. * @returns Modified request that is served from S3. */ function serveRequestFromS3Origin( request: CloudFrontRequest, uri?: string ): CloudFrontRequest { // Modify `Host` header to match the S3 host. If the `Host` header is // the actual `Host` header from the client we get a `SignatureDoesNotMatch`. if (!request.origin?.s3?.domainName) { throw new Error( 'S3 domain name not present in request.origin.s3.domainName' ); } request.headers = generateCloudFrontHeaders(request.headers, { host: request.origin.s3.domainName, }); if (typeof uri === 'string') { request.uri = uri; } // Querystring is not supported by S3 origin request.querystring = ''; return request; } export { serveRequestFromS3Origin, serveRequestFromCustomOrigin }; ================================================ FILE: packages/proxy/src/util/etag-cache.ts ================================================ /** * Key/Value cache where all items with the same eTag are invalidated, * when the eTag changes. */ class ETagCache { /** * Holds the data in the following structure. * When the eTag changes, all keys with this eTag are destroyed. * { * "eTag": { * "key1": data1, * "key2": data2 * } * } */ data: Record>; /** * Holds the eTag that is used for storing the. */ eTagMap: Map; constructor() { this.data = {}; this.eTagMap = new Map(); } set(key: string, value: TData, eTag: string) { if (!(eTag in this.data)) { this.data[eTag] = {}; } // Get the last eTag that was used to store it const lastUsedETag = this.eTagMap.get(key); if (lastUsedETag && eTag !== lastUsedETag) { // eTag has changed, delete the whole eTag data from the cache delete this.data[lastUsedETag]; } this.eTagMap.set(key, eTag); this.data[eTag][key] = value; } get(key: string, eTag: string): TData | undefined { if (!(eTag in this.data)) { return undefined; } // Get the last eTag that was used to store it const lastUsedETag = this.eTagMap.get(key); if (lastUsedETag !== eTag) { return undefined; } return this.data[eTag][key]; } } export { ETagCache }; ================================================ FILE: packages/proxy/src/util/fetch-timeout.ts ================================================ import AbortController from 'abort-controller'; import { RequestInit, Response } from 'node-fetch'; type NodeFetch = typeof import('node-fetch').default; /** * Fetch with timeout * @param timeout Timeout in milliseconds * @param url * @param etag * @returns */ export async function fetchTimeout( fetch: NodeFetch, timeout: number, url: string, etag?: string ) { const controller = new AbortController(); const timeoutFunc = setTimeout(() => { controller.abort(); }, timeout); let error: Error | undefined; let fetchResponse: Response | undefined; const params: RequestInit = { signal: controller.signal }; // Apply If-None-Match header if etag is present // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match if (etag) { params.headers = { 'If-None-Match': `"${etag}"`, }; } try { fetchResponse = await fetch(url, params); } catch (err: any) { if (err.name === 'AbortError') { error = new Error(`Timeout while fetching from ${url}`); } else { error = err; } } finally { clearTimeout(timeoutFunc); } if (error) { throw error; } return fetchResponse!; } ================================================ FILE: packages/proxy/src/util/generate-cloudfront-headers.ts ================================================ import { CloudFrontHeaders } from 'aws-lambda'; import { HTTPHeaders } from '../types'; /** * Converts a key value object of headers to the CloudFront format. * * @param initialHeaders - Headers that are already in the CloudFront format * that should be added to the result. * @param headers - Header object in key-value format that should be converted * to CloudFront format. If there is a header with the same key in * `initialHeaders` this will be overridden. * @returns Object with headers in CloudFront format (merged `initialHeaders` * and `headers`). */ function generateCloudFrontHeaders( initialHeaders: CloudFrontHeaders, headers: HTTPHeaders ): CloudFrontHeaders { const cloudFrontHeaders: CloudFrontHeaders = { ...initialHeaders }; for (const key in headers) { const lowercaseKey = key.toLowerCase(); cloudFrontHeaders[lowercaseKey] = [{ key, value: headers[key] }]; } return cloudFrontHeaders; } export { generateCloudFrontHeaders }; ================================================ FILE: packages/proxy/src/util/get-env.ts ================================================ import { CloudFrontRequest } from 'aws-lambda'; import { MissingConfigError } from '../error/missing-config'; /** * Gets a environment variable from the CloudFront Request */ function getEnv(request: CloudFrontRequest, key: string) { const env = request.origin?.s3?.customHeaders[key][0]; if (!env) { throw new MissingConfigError(`Env ${key} is not set.`); } return env.value; } export { getEnv }; ================================================ FILE: packages/proxy/src/util/is-url.ts ================================================ export default function isURL(str: string): boolean { return /^https?:\/\//.test(str); } ================================================ FILE: packages/proxy/src/util/resolve-route-parameters.ts ================================================ /** * Replaces parameters inside a route with the given parameters * * @param str - Input string * @param match - Matcher result from RegExp.exec * @param keys - Named keys from matcher result (contains the values) * @returns String with all parameters replaced by values */ function resolveRouteParameters( str: string, match: RegExpExecArray, keys: string[] ): string { return str.replace(/\$([1-9a-zA-Z_]+)/g, (_, param) => { let matchIndex: number = keys.indexOf(param); if (matchIndex === -1) { // It's a number match, not a named capture matchIndex = parseInt(param, 10); } else { // For named captures, add one to the `keys` index to // match up with the RegExp group matches matchIndex++; } return match[matchIndex] || ''; }); } export { resolveRouteParameters }; ================================================ FILE: packages/proxy/src/util/ttl-cache.ts ================================================ // performance.now is slightly faster than Date.now on Node.js from my // benchmarks import { performance } from 'perf_hooks'; /** * A minimal TTL cache with focus on performance. * Expired items are only purged from cache during set operation. * Get operation does not modify the cache, so that get is usually more * performant than set. */ class TTLCache { /** * The minimum time to life (TTL) for the objects in the data map. */ minTTL: number; /** * Holds the data */ data: Map; /** * Holds the expiration times in ms. */ expirationMap: Map; /** * List of all expirations */ expirations: Record; /** * @param ttl milliseconds until an entry is considered stale. */ constructor(minTTL: number) { this.minTTL = minTTL; this.data = new Map(); this.expirationMap = new Map(); this.expirations = Object.create(null); } set(key: string, value: T, ttl: number = 0) { const minTTL = Math.max(this.minTTL, ttl); const time = performance.now(); // Purge expired items from cache this.purgeStale(time); const expiration = Math.ceil(time + minTTL); // Set the data this.expirationMap.set(key, expiration); this.data.set(key, value); // Update the expiration table if (!this.expirations[expiration]) { this.expirations[expiration] = [key]; } else { this.expirations[expiration].push(key); } } get(key: string): { expired: boolean; item: T; } | null { const expiration = this.expirationMap.get(key); // When no expiration is present, the data is also not present, exit early if (expiration === undefined) { return null; } // Check if object is already expired const time = performance.now(); const expired = time > expiration; return { expired, item: this.data.get(key)!, }; } /** * Purges stale items from cache * @param time * @returns */ purgeStale(time: number) { for (const exp in this.expirations) { // List goes from low -> high, so when the time exceeds we don't have // to check items that came after. if (Number(exp) > time) { return; } for (const key of this.expirations[exp]) { this.data.delete(key); this.expirationMap.delete(key); } delete this.expirations[exp]; } } /** * Update the TTL of an existing item in the cache * @param key */ updateTTL(key: string, ttl: number = 0) { const minTTL = Math.max(this.minTTL, ttl); const oldExpiration = this.expirationMap.get(key); if (oldExpiration) { const newExpiration = Math.ceil(performance.now() + minTTL); this.expirationMap.set(key, newExpiration); this.expirations[oldExpiration] = this.expirations[oldExpiration].filter( (item) => item !== key ); } } } export { TTLCache }; ================================================ FILE: packages/proxy/test/actions/fetch-cached.test.ts ================================================ import { performance } from 'perf_hooks'; import { fetchCached } from '../../src/actions/fetch-cached'; import { TTLCache } from '../../src/util/ttl-cache'; import { generateMockedFetchResponse } from '../test-utils'; type CacheEntry = { etag: string; value: string; }; /* ----------------------------------------------------------------------------- * Mocks * ---------------------------------------------------------------------------*/ jest.mock('perf_hooks', () => { return { performance: { now: jest.fn(() => Date.now()), }, }; }); /* ----------------------------------------------------------------------------- * Tests * ---------------------------------------------------------------------------*/ describe('Fetch cached', () => { test('Get item from empty cache', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(200, { value: 'bar' }, { etag: '"123"' }) ); const cache = new TTLCache(60); const result = await fetchCached( mockedFetch as any, cache, 'http://localhost', 'foo' ); expect(result).toMatchObject({ etag: '"123"', value: 'bar', }); expect(mockedFetch).toBeCalledTimes(1); }); test('Refetch expired item', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(200, { value: 'bar' }, { etag: '"123"' }) ); const cache = new TTLCache(60); jest.spyOn(cache, 'set'); jest.spyOn(cache, 'updateTTL'); let result: CacheEntry | null; // @ts-ignore performance.now.mockReturnValue(0); cache.set('foo', { etag: '"123"', value: 'bar', }); // Cache not expired, no revalidation // @ts-ignore performance.now.mockReturnValue(60); result = await fetchCached( mockedFetch as any, cache, 'http://localhost', 'foo' ); expect(result).toMatchObject({ etag: '"123"', value: 'bar', }); expect(mockedFetch).not.toBeCalled(); // Stale local cache, revalidate with same remote content // @ts-ignore performance.now.mockReturnValue(61); mockedFetch.mockImplementation(() => generateMockedFetchResponse(304, {}, { etag: '"123"' }) ); result = await fetchCached( mockedFetch as any, cache, 'http://localhost', 'foo' ); expect(result).toMatchObject({ etag: '"123"', value: 'bar', }); // Set should not have been called, since same object expect(cache.set).toHaveBeenCalledTimes(1); expect(cache.updateTTL).toHaveBeenCalledTimes(1); // Stale local cache, revalidate with changed content // @ts-ignore performance.now.mockReturnValue(122); mockedFetch.mockImplementation(() => generateMockedFetchResponse( 200, { value: 'updatedBar' }, { etag: '"456"' } ) ); result = await fetchCached( mockedFetch as any, cache, 'http://localhost', 'foo' ); expect(result).toMatchObject({ etag: '"456"', value: 'updatedBar', }); expect(cache.set).toHaveBeenCalledTimes(2); }); }); ================================================ FILE: packages/proxy/test/handler.test.ts ================================================ import { createServer, Server } from 'http'; import { CloudFrontRequest } from 'aws-lambda'; import getPort from 'get-port'; import { ProxyConfig } from '../src/types'; import { generateCloudFrontRequestEvent } from './test-utils'; /* ----------------------------------------------------------------------------- * Proxy config server mock * ---------------------------------------------------------------------------*/ class ConfigServer { public proxyConfig?: ProxyConfig; public staticFiles: string[] = []; private server?: Server; async start() { const port = await getPort(); this.server = createServer((req, res) => { if (req.url && req.url.startsWith('/filesystem')) { const splittedUrl = req.url.split('/'); const filePath = splittedUrl.slice(3).join('/'); if (this.proxyConfig && this.staticFiles.includes(filePath)) { res.statusCode = 200; return res.end( JSON.stringify({ key: this.proxyConfig.deploymentId + '/static/' + filePath, }) ); } else { res.statusCode = 404; return res.end(JSON.stringify({})); } } // Respond with config res.end(JSON.stringify(this.proxyConfig)); }); await new Promise((resolve) => this.server!.listen(port, resolve)); return `http://localhost:${port}`; } stop() { if (!this.server) { return Promise.resolve(); } return new Promise((resolve, reject) => { this.server!.close((err) => { if (err) { return reject(err); } resolve(); }); }); } } /* ----------------------------------------------------------------------------- * Tests * ---------------------------------------------------------------------------*/ describe('[proxy] Handler', () => { let handler: any; let configServer: ConfigServer; let configEndpoint: string; beforeEach(async () => { // Since the handler has it's own state we need to isolate it between test runs to prevent // using a cached proxyConfig jest.isolateModules(() => { handler = require('../src/handler').handler; }); configServer = new ConfigServer(); configEndpoint = await configServer.start(); }); afterEach(async () => { await configServer.stop(); }); test('External redirect [HTTP]', async () => { const proxyConfig: ProxyConfig = { etag: '123', deploymentId: 'abc', lambdaRoutes: {}, prerenders: {}, routes: [ { src: '^\\/docs(?:\\/([^\\/]+?))$', dest: 'http://example.com/docs/$1', check: true, }, ], }; const requestPath = '/docs/hello-world'; // Prepare configServer configServer.proxyConfig = proxyConfig; const cloudFrontEvent = generateCloudFrontRequestEvent({ configEndpoint, uri: requestPath, }); const result = (await handler(cloudFrontEvent)) as CloudFrontRequest; expect(result.origin?.custom).toEqual( expect.objectContaining({ domainName: 'example.com', path: '', port: 80, protocol: 'http', }) ); expect(result.uri).toBe('/docs/hello-world'); expect(result.headers.host).toEqual( expect.arrayContaining([ { key: 'host', value: 'example.com', }, ]) ); }); test('External redirect [HTTPS]', async () => { const proxyConfig: ProxyConfig = { etag: '123', deploymentId: 'abc', lambdaRoutes: {}, prerenders: {}, routes: [ { src: '^\\/docs(?:\\/([^\\/]+?))$', dest: 'https://example.com/docs/$1', check: true, }, ], }; const requestPath = '/docs/hello-world'; // Prepare configServer configServer.proxyConfig = proxyConfig; const cloudFrontEvent = generateCloudFrontRequestEvent({ configEndpoint, uri: requestPath, }); const result = (await handler(cloudFrontEvent)) as CloudFrontRequest; expect(result.origin?.custom).toEqual( expect.objectContaining({ domainName: 'example.com', path: '', port: 443, protocol: 'https', }) ); expect(result.uri).toBe('/docs/hello-world'); expect(result.headers.host).toEqual( expect.arrayContaining([ { key: 'host', value: 'example.com', }, ]) ); }); test('External redirect [Custom Port]', async () => { const proxyConfig: ProxyConfig = { etag: '123', deploymentId: 'abc', lambdaRoutes: {}, prerenders: {}, routes: [ { src: '^\\/docs(?:\\/([^\\/]+?))$', dest: 'https://example.com:666/docs/$1', check: true, }, ], }; const requestPath = '/docs/hello-world'; // Prepare configServer configServer.proxyConfig = proxyConfig; const cloudFrontEvent = generateCloudFrontRequestEvent({ configEndpoint, uri: requestPath, }); const result = (await handler(cloudFrontEvent)) as CloudFrontRequest; expect(result.origin?.custom).toEqual( expect.objectContaining({ domainName: 'example.com', path: '', port: 666, protocol: 'https', }) ); expect(result.uri).toBe('/docs/hello-world'); expect(result.headers.host).toEqual( expect.arrayContaining([ { key: 'host', value: 'example.com', }, ]) ); }); test('External redirect [Subdomain]', async () => { const proxyConfig: ProxyConfig = { etag: '123', deploymentId: 'abc', lambdaRoutes: {}, prerenders: {}, routes: [ { src: '^\\/docs(?:\\/([^\\/]+?))$', dest: 'https://sub.example.com/docs/$1', check: true, }, ], }; const requestPath = '/docs/hello-world'; // Prepare configServer configServer.proxyConfig = proxyConfig; const cloudFrontEvent = generateCloudFrontRequestEvent({ configEndpoint, uri: requestPath, }); const result = (await handler(cloudFrontEvent)) as CloudFrontRequest; expect(result.origin?.custom).toEqual( expect.objectContaining({ domainName: 'sub.example.com', path: '', port: 443, protocol: 'https', }) ); expect(result.uri).toBe('/docs/hello-world'); expect(result.headers.host).toEqual( expect.arrayContaining([ { key: 'host', value: 'sub.example.com', }, ]) ); }); test('i18n default locale rewrite', async () => { const proxyConfig: ProxyConfig = { etag: '123', deploymentId: 'abc', lambdaRoutes: {}, prerenders: {}, routes: [ { src: '^/(?!(?:_next/.*|en|fr\\-FR|nl)(?:/.*|$))(.*)$', dest: '$wildcard/$1', continue: true, }, { src: '/', locale: { redirect: { en: '/', 'fr-FR': '/fr-FR', nl: '/nl', }, cookie: 'NEXT_LOCALE', }, continue: true, }, { src: '^/$', dest: '/en', continue: true, }, { handle: 'filesystem', }, ], }; const requestPath = '/'; // Prepare configServer configServer.proxyConfig = proxyConfig; configServer.staticFiles = ['en']; const cloudFrontEvent = generateCloudFrontRequestEvent({ configEndpoint, uri: requestPath, }); const result = (await handler(cloudFrontEvent)) as CloudFrontRequest; expect(result.origin?.s3).toEqual( expect.objectContaining({ domainName: 's3.localhost', path: '', }) ); // deploymentId + path expect(result.uri).toBe('/abc/static/en'); }); test('Correctly request /index object from S3 when requesting /', async () => { const proxyConfig: ProxyConfig = { etag: '123', deploymentId: 'abc', lambdaRoutes: {}, routes: [ { src: '^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$', headers: { Location: '/$1', }, status: 308, continue: true, }, { src: '/404', status: 404, continue: true, }, { handle: 'filesystem', }, { handle: 'resource', }, { src: '/.*', status: 404, }, { handle: 'miss', }, { handle: 'rewrite', }, { handle: 'hit', }, { handle: 'error', }, { src: '/.*', dest: '/404', status: 404, }, ], prerenders: {}, }; const requestPath = '/'; // Prepare configServer configServer.staticFiles = ['404', '500', 'index']; configServer.proxyConfig = proxyConfig; const cloudFrontEvent = generateCloudFrontRequestEvent({ configEndpoint, uri: requestPath, }); const result = (await handler(cloudFrontEvent)) as CloudFrontRequest; expect(result.origin?.s3).toEqual( expect.objectContaining({ domainName: 's3.localhost', path: '', }) ); expect(result.uri).toBe('/abc/static/index'); }); test('Add x-forwarded-host header to API-Gateway requests', async () => { const hostHeader = 'example.org'; const proxyConfig: ProxyConfig = { etag: '123', deploymentId: 'abc', lambdaRoutes: { '/__NEXT_API_LAMBDA_0': 'https://lambda-endpoint.localhost/__NEXT_API_LAMBDA_0', }, prerenders: {}, routes: [ { src: '^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$', headers: { Location: '/$1', }, status: 308, continue: true, }, { src: '/404', status: 404, continue: true, }, { handle: 'filesystem', }, { src: '^/api/test/?$', dest: '/__NEXT_API_LAMBDA_0', headers: { 'x-nextjs-page': '/api/test', }, check: true, }, { handle: 'resource', }, { src: '/.*', status: 404, }, { handle: 'miss', }, { handle: 'rewrite', }, { src: '^/api/test/?$', dest: '/__NEXT_API_LAMBDA_0', headers: { 'x-nextjs-page': '/api/test', }, check: true, }, { handle: 'hit', }, { handle: 'error', }, { src: '/.*', dest: '/404', status: 404, }, ], }; const requestPath = '/api/test'; // Prepare configServer configServer.proxyConfig = proxyConfig; const cloudFrontEvent = generateCloudFrontRequestEvent({ configEndpoint, uri: requestPath, }); const result = (await handler(cloudFrontEvent)) as CloudFrontRequest; expect(result.origin?.custom).toEqual( expect.objectContaining({ domainName: 'lambda-endpoint.localhost', path: '/__NEXT_API_LAMBDA_0', }) ); expect(result.headers).toEqual( expect.objectContaining({ 'x-nextjs-page': [ { key: 'x-nextjs-page', value: '/api/test', }, ], 'x-forwarded-host': [ { key: 'X-Forwarded-Host', value: hostHeader, }, ], }) ); }); // Related to issue: https://github.com/milliHQ/terraform-aws-next-js/issues/218 test('Dynamic routes with dynamic part in directory', async () => { const proxyConfig: ProxyConfig = { etag: '123', deploymentId: 'abc', lambdaRoutes: { '/__NEXT_API_LAMBDA_0': 'https://lambda-endpoint.localhost/__NEXT_API_LAMBDA_0', '/__NEXT_PAGE_LAMBDA_0': 'https://lambda-endpoint.localhost/__NEXT_PAGE_LAMBDA_0', }, prerenders: {}, routes: [ { src: '^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$', headers: { Location: '/$1', }, status: 308, continue: true, }, { src: '^\\/blog(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))?$', headers: { Location: '/test/$1', }, status: 308, }, { src: '/404', status: 404, continue: true, }, { handle: 'filesystem', }, { src: '^/api/robots/?$', dest: '/__NEXT_API_LAMBDA_0', headers: { 'x-nextjs-page': '/api/robots', }, check: true, }, { src: '^(/|/index|)/?$', dest: '/__NEXT_PAGE_LAMBDA_0', headers: { 'x-nextjs-page': '/index', }, check: true, }, { src: '^\\/robots\\.txt$', dest: '/api/robots', check: true, }, { handle: 'resource', }, { src: '/.*', status: 404, }, { handle: 'miss', }, { handle: 'rewrite', }, { src: '^/_next/data/oniBm2oZ9GXevuUEdEG44/index.json$', dest: '/', check: true, }, { src: '^/_next/data/oniBm2oZ9GXevuUEdEG44/test/(?.+?)\\.json$', dest: '/test/[...slug]?slug=$slug', check: true, }, { src: '^/test/\\[\\.\\.\\.slug\\]/?$', dest: '/__NEXT_PAGE_LAMBDA_0', headers: { 'x-nextjs-page': '/test/[...slug]', }, check: true, }, { src: '^/api/robots/?$', dest: '/__NEXT_API_LAMBDA_0', headers: { 'x-nextjs-page': '/api/robots', }, check: true, }, { src: '^(/|/index|)/?$', dest: '/__NEXT_PAGE_LAMBDA_0', headers: { 'x-nextjs-page': '/index', }, check: true, }, { src: '^/test/(?.+?)(?:/)?$', dest: '/test/[...slug]?slug=$slug', check: true, }, { src: '^/test/\\[\\.\\.\\.slug\\]/?$', dest: '/__NEXT_PAGE_LAMBDA_0', headers: { 'x-nextjs-page': '/test/[...slug]', }, check: true, }, { src: '^/users/(?[^/]+?)(?:/)?$', dest: '/users/[user_id]?user_id=$user_id', check: true, }, { handle: 'hit', }, { handle: 'error', }, { src: '/.*', dest: '/404', status: 404, }, ], }; const requestPath = '/users/432'; // Prepare configServer configServer.proxyConfig = proxyConfig; configServer.staticFiles = [ '404', '500', 'favicon.ico', 'about', 'users/[user_id]', ]; const cloudFrontEvent = generateCloudFrontRequestEvent({ configEndpoint, uri: requestPath, }); const result = (await handler(cloudFrontEvent)) as CloudFrontRequest; expect(result.origin?.s3).toEqual( expect.objectContaining({ domainName: 's3.localhost', path: '', }) ); expect(result.uri).toBe('/abc/static/users/[user_id]'); }); test('Redirects with querystring', async () => { const proxyConfig: ProxyConfig = { etag: '123', deploymentId: 'abc', lambdaRoutes: {}, prerenders: {}, routes: [ { src: '^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$', headers: { Location: '/$1', }, status: 308, continue: true, }, { src: '^\\/one$', headers: { Location: '/newplace', }, status: 308, }, { src: '^\\/two(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))?$', headers: { Location: '/newplacetwo/$1', }, status: 308, }, { src: '^\\/three$', headers: { Location: '/newplace?foo=bar', }, status: 308, }, { src: '^\\/four$', headers: { Location: 'https://example.com', }, status: 308, }, ], }; configServer.proxyConfig = proxyConfig; { // Remove trailing slash // /test/?foo=bar -> /test?foo=bar const cloudFrontEvent = generateCloudFrontRequestEvent({ configEndpoint, uri: '/test/', querystring: 'foo=bar', }); const result = (await handler(cloudFrontEvent)) as CloudFrontRequest; expect(result.headers).toEqual( expect.objectContaining({ location: [ { key: 'Location', value: '/test?foo=bar', }, ], }) ); } { // Relative route replace // /one?foo=bar -> /newplace?foo=bar const cloudFrontEvent = generateCloudFrontRequestEvent({ configEndpoint, uri: '/one', querystring: 'foo=bar', }); const result = (await handler(cloudFrontEvent)) as CloudFrontRequest; expect(result.headers).toEqual( expect.objectContaining({ location: [ { key: 'Location', value: '/newplace?foo=bar', }, ], }) ); } { // Relative route partial replace // /two/some/path?foo=bar -> /newplace/some/path?foo=bar const cloudFrontEvent = generateCloudFrontRequestEvent({ configEndpoint, uri: '/two/some/path', querystring: 'foo=bar', }); const result = (await handler(cloudFrontEvent)) as CloudFrontRequest; expect(result.headers).toEqual( expect.objectContaining({ location: [ { key: 'Location', value: '/newplacetwo/some/path?foo=bar', }, ], }) ); } { // Try to override predefined param // /three?foo=badValue -> /newplace?foo=bar const cloudFrontEvent = generateCloudFrontRequestEvent({ configEndpoint, uri: '/three', querystring: 'foo=badValue', }); const result = (await handler(cloudFrontEvent)) as CloudFrontRequest; expect(result.headers).toEqual( expect.objectContaining({ location: [ { key: 'Location', value: '/newplace?foo=bar', }, ], }) ); } { // Redirect to external URL // /four?foo=bar -> https://example.com?foo=bar const cloudFrontEvent = generateCloudFrontRequestEvent({ configEndpoint, uri: '/four', querystring: 'foo=bar', }); const result = (await handler(cloudFrontEvent)) as CloudFrontRequest; expect(result.headers).toEqual( expect.objectContaining({ location: [ { key: 'Location', value: 'https://example.com/?foo=bar', }, ], }) ); } }); }); ================================================ FILE: packages/proxy/test/proxy.test.ts ================================================ import { Proxy } from '../src/proxy'; import { ProxyConfig } from '../src/types'; import { generateMockedFetchResponse } from './test-utils'; describe('Proxy', () => { describe('Proxy::Routing 001', () => { let proxy: Proxy; let config: ProxyConfig; beforeAll(() => { // Initialize proxy config = require('./res/config-001.json') as ProxyConfig; const staticRoutes = ['favicon.ico', 'sitemap.xml']; const mockedFetch = jest.fn().mockImplementation((url: string) => { for (const staticRoute of staticRoutes) { if ( url === `http://localhost/filesystem/123/${encodeURIComponent(staticRoute)}` ) { return generateMockedFetchResponse( 200, { key: staticRoute, }, { etag: '"found"' } ); } } return generateMockedFetchResponse(404, {}, { etag: '"notfound"' }); }); proxy = new Proxy(mockedFetch as any); }); test('/: Index Lambda route', async () => { const route = await proxy.route( '123', config.routes, config.lambdaRoutes, 'http://localhost', '/' ); expect(route).toEqual( expect.objectContaining({ found: true, dest: '/__NEXT_PAGE_LAMBDA_0', headers: { 'x-nextjs-page': '/index', }, target: 'lambda', }) ); }); test('/about: Route not found', async () => { const route = await proxy.route( '123', config.routes, config.lambdaRoutes, 'http://localhost', '/about' ); expect(route).toEqual( expect.objectContaining({ found: true, dest: '/404', headers: { 'x-nextjs-page': '', }, }) ); }); test('/test/a/b/c: Slug Lambda Route', async () => { const route = await proxy.route( '123', config.routes, config.lambdaRoutes, 'http://localhost', '/test/a/b/c' ); expect(route).toEqual( expect.objectContaining({ found: true, dest: '/__NEXT_PAGE_LAMBDA_0', headers: { 'x-nextjs-page': '/test/[...slug]', }, target: 'lambda', }) ); }); test('/sitemap.xml: Static file routing', async () => { const route = await proxy.route( '123', config.routes, config.lambdaRoutes, 'http://localhost', '/sitemap.xml' ); expect(route).toEqual( expect.objectContaining({ found: true, dest: '/sitemap.xml', target: 'filesystem', headers: {}, }) ); }); }); describe('Proxy::Routing 002', () => { let proxy: Proxy; let config: ProxyConfig; beforeAll(() => { // Initialize proxy config = require('./res/config-002.json') as ProxyConfig; // No static routes const mockedFetch = jest.fn().mockImplementation(() => { return generateMockedFetchResponse(404, {}, { etag: '"notfound"' }); }); proxy = new Proxy(mockedFetch as any); }); test('/product/corsair-vengeance-ram-GuyH42koQBDk0pFJq3tc: Dynamic URL', async () => { const route = await proxy.route( '123', config.routes, config.lambdaRoutes, 'http://localhost', '/product/corsair-vengeance-ram-GuyH42koQBDk0pFJq3tc' ); expect(route).toEqual( expect.objectContaining({ found: true, dest: '/__NEXT_PAGE_LAMBDA_0', headers: { 'x-nextjs-page': '/product/[...slug]', }, target: 'lambda', }) ); }); }); describe('Proxy::Routing 003', () => { let proxy: Proxy; let config: ProxyConfig; beforeAll(() => { // Initialize proxy config = require('./res/config-003.json') as ProxyConfig; const staticRoutes = ['404', 'hello']; const mockedFetch = jest.fn().mockImplementation((url: string) => { for (const staticRoute of staticRoutes) { if ( url === `http://localhost/filesystem/123/${encodeURIComponent(staticRoute)}` ) { return generateMockedFetchResponse(200, {}, { etag: '"found"' }); } } return generateMockedFetchResponse(404, {}, { etag: '"notfound"' }); }); proxy = new Proxy(mockedFetch as any); }); test('/hello/: Trailing slash', async () => { const route = await proxy.route( '123', config.routes, config.lambdaRoutes, 'http://localhost', '/hello/' ); expect(route).toEqual( expect.objectContaining({ found: true, dest: '/hello/', status: 308, headers: { Location: '/hello', }, }) ); }); test('/unknown-route-with-trailing-slash/: Redirect trailing slash of unknown route', async () => { const route = await proxy.route( '123', config.routes, config.lambdaRoutes, 'http://localhost', '/unknown-route-with-trailing-slash/' ); expect(route).toEqual( expect.objectContaining({ found: true, dest: '/unknown-route-with-trailing-slash/', status: 308, headers: { Location: '/unknown-route-with-trailing-slash', }, }) ); }); }); describe('Proxy::Routing 004', () => { let proxy: Proxy; let config: ProxyConfig; beforeAll(() => { // Initialize proxy config = require('./res/config-004.json') as ProxyConfig; const staticRoutes = ['404', 'hello']; const mockedFetch = jest.fn().mockImplementation((url: string) => { for (const staticRoute of staticRoutes) { if ( url === `http://localhost/filesystem/123/${encodeURIComponent(staticRoute)}` ) { return generateMockedFetchResponse(200, {}, { etag: '"found"' }); } } return generateMockedFetchResponse(404, {}, { etag: '"notfound"' }); }); proxy = new Proxy(mockedFetch as any); }); test('/unknown-route-with-trailing-slash/: Redirect trailing slash of unknown route', async () => { const route = await proxy.route( '123', config.routes, config.lambdaRoutes, 'http://localhost', '/unknown-route-with-trailing-slash/' ); expect(route).toEqual( expect.objectContaining({ found: true, dest: '/unknown-route-with-trailing-slash/', status: 308, headers: { Location: '/unknown-route-with-trailing-slash', }, }) ); }); }); }); ================================================ FILE: packages/proxy/test/proxy.unit.test.ts ================================================ /** * Unit tests for proxy with simple routing rules * @see: https://github.com/vercel/vercel/blob/master/packages/now-cli/test/dev-router.unit.js */ import { URLSearchParams } from 'url'; import { Route } from '@vercel/routing-utils'; import { Proxy } from '../src/proxy'; import { generateMockedFetchResponse } from './test-utils'; describe('Proxy unit', () => { test('Captured groups', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(404, {}, { etag: '"notfound"' }) ); const routesConfig = [{ src: '/api/(.*)', dest: '/endpoints/$1.js' }]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, {}, 'http://localhost', '/api/user' ); expect(result).toEqual({ found: true, dest: '/endpoints/user.js', continue: false, status: undefined, headers: {}, uri_args: new URLSearchParams(), matched_route: routesConfig[0], matched_route_idx: 0, userDest: true, isDestUrl: false, phase: undefined, }); }); test('Named groups', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(404, {}, { etag: '"notfound"' }) ); const routesConfig = [{ src: '/user/(?.+)', dest: '/user.js?id=$id' }]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, {}, 'http://localhost', '/user/123' ); expect(result).toEqual({ found: true, dest: '/user.js', continue: false, status: undefined, headers: {}, uri_args: new URLSearchParams('id=123'), matched_route: routesConfig[0], matched_route_idx: 0, userDest: true, isDestUrl: false, phase: undefined, }); }); test('Optional named groups', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(404, {}, { etag: '"notfound"' }) ); const routesConfig = [ { src: '/api/hello(/(?[^/]+))?', dest: '/api/functions/hello/index.js?name=$name', }, ]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, {}, 'http://localhost', '/api/hello' ); expect(result).toEqual({ found: true, dest: '/api/functions/hello/index.js', continue: false, status: undefined, headers: {}, uri_args: new URLSearchParams('name'), matched_route: routesConfig[0], matched_route_idx: 0, userDest: true, isDestUrl: false, phase: undefined, }); }); test('Shared lambda', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(404, {}, { etag: '"notfound"' }) ); const routesConfig = [ { src: '^/product/\\[\\.\\.\\.slug\\]/?$', dest: '/__NEXT_PAGE_LAMBDA_0', headers: { 'x-nextjs-page': '/product/[...slug]', }, check: true, }, ]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, { '/__NEXT_PAGE_LAMBDA_0': 'localhost' }, 'http://localhost', '/product/[...slug]?slug=hello/world' ); expect(result).toEqual({ found: true, dest: '/__NEXT_PAGE_LAMBDA_0', continue: false, status: undefined, headers: { 'x-nextjs-page': '/product/[...slug]' }, uri_args: new URLSearchParams('slug=hello/world'), matched_route: routesConfig[0], matched_route_idx: 0, userDest: true, isDestUrl: false, phase: undefined, target: 'lambda', }); }); test('Slug group and shared lambda', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(404, {}, { etag: '"notfound"' }) ); const routesConfig = [ { src: '^/product/(?.+?)(?:/)?$', dest: '/product/[...slug]?slug=$slug', check: true, }, { src: '^/product/\\[\\.\\.\\.slug\\]/?$', dest: '/__NEXT_PAGE_LAMBDA_0', headers: { 'x-nextjs-page': '/product/[...slug]', }, check: true, }, ]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, { '/__NEXT_PAGE_LAMBDA_0': 'localhost', }, 'http://localhost', '/product/hello/world' ); expect(result).toEqual({ found: true, dest: '/__NEXT_PAGE_LAMBDA_0', continue: false, status: undefined, headers: { 'x-nextjs-page': '/product/[...slug]' }, uri_args: new URLSearchParams('slug=hello/world'), matched_route: routesConfig[1], matched_route_idx: 1, userDest: true, isDestUrl: false, phase: undefined, target: 'lambda', }); }); test('Ignore other routes when no continue is set', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(404, {}, { etag: '"notfound"' }) ); const routesConfig = [ { src: '/about', dest: '/about.html' }, { src: '/about', dest: '/about.php' }, ]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, {}, 'http://localhost', '/about' ); expect(result).toEqual({ found: true, dest: '/about.html', continue: false, status: undefined, headers: {}, uri_args: new URLSearchParams(), matched_route: routesConfig[0], matched_route_idx: 0, userDest: true, isDestUrl: false, phase: undefined, }); }); test('Continue after first route found', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(404, {}, { etag: '"notfound"' }) ); const routesConfig = [ { src: '/about', dest: '/about.html', headers: { 'x-test': 'test', }, continue: true, }, { src: '/about', dest: '/about.php' }, ]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, {}, 'http://localhost', '/about' ); expect(result).toEqual({ found: true, dest: '/about.php', continue: false, status: undefined, headers: { 'x-test': 'test', }, uri_args: new URLSearchParams(), matched_route: routesConfig[1], matched_route_idx: 1, userDest: true, isDestUrl: false, phase: undefined, }); }); describe('Redirect: Remove trailing slash', () => { const routesConfig: Route[] = [ { src: '^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$', headers: { Location: '/$1', }, status: 308, continue: true, }, { handle: 'filesystem', }, ]; let proxy: Proxy; beforeAll(() => { const mockedFetch = jest.fn().mockImplementation((url: string) => { if (url === `localhost/filesystem/123/${encodeURIComponent('test')}`) { return generateMockedFetchResponse(200, {}, { etag: '"found"' }); } return generateMockedFetchResponse(404, {}, { etag: '"notfound"' }); }); proxy = new Proxy(mockedFetch as any); }); test('Matches static route, but has a trailing slash', async () => { const result = await proxy.route( '123', routesConfig, {}, 'http://localhost', '/test/' ); expect(result).toEqual({ found: true, dest: '/test/', continue: true, status: 308, headers: { Location: '/test' }, uri_args: new URLSearchParams(), matched_route: routesConfig[0], matched_route_idx: 0, userDest: false, isDestUrl: false, phase: undefined, target: undefined, }); }); test('Matches no route', async () => { const result = await proxy.route( '123', routesConfig, {}, 'http://localhost', '/other-route/' ); expect(result).toEqual({ found: true, dest: '/other-route/', continue: true, status: 308, headers: { Location: '/other-route' }, uri_args: new URLSearchParams(), matched_route: routesConfig[0], matched_route_idx: 0, userDest: false, isDestUrl: false, phase: undefined, target: undefined, }); }); test('Has querystring', async () => { const result = await proxy.route( '123', routesConfig, {}, 'http://localhost', '/other-route/?foo=bar' ); expect(result).toEqual({ found: true, dest: '/other-route/', continue: true, status: 308, headers: { Location: '/other-route' }, uri_args: new URLSearchParams('foo=bar'), matched_route: routesConfig[0], matched_route_idx: 0, userDest: false, isDestUrl: false, phase: undefined, target: undefined, }); }); }); test('With trailing slash', async () => { const mockedFetch = jest.fn().mockImplementation((url: string) => { if ( url === 'http://localhost/filesystem/123/test/index' || url === 'http://localhost/filesystem/123/index' ) { return generateMockedFetchResponse( 200, { key: '123/static/' + url.substring('http://localhost/filesystem/123/'.length), }, { etag: '"found"' } ); } return generateMockedFetchResponse(404, {}, { etag: '"notfound"' }); }); const routesConfig: Route[] = [ { handle: 'filesystem', }, ]; const proxy = new Proxy(mockedFetch as any); const result1 = await proxy.route( '123', routesConfig, {}, 'http://localhost', '/test/' ); expect(result1).toEqual({ found: true, dest: '/123/static/test/index', continue: false, status: undefined, headers: {}, isDestUrl: false, phase: 'filesystem', target: 'filesystem', }); const result2 = await proxy.route( '123', routesConfig, {}, 'http://localhost', '/' ); expect(result2).toEqual({ found: true, dest: '/123/static/index', continue: false, status: undefined, headers: {}, isDestUrl: false, phase: 'filesystem', target: 'filesystem', }); }); test('Redirect partial replace', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(404, {}, { etag: '"notfound"' }) ); const routesConfig = [ { src: '^\\/redir(?:\\/([^\\/]+?))$', headers: { Location: '/$1', }, status: 307, }, { src: '^/param/?$', dest: '/__NEXT_PAGE_LAMBDA_0', headers: { 'x-nextjs-page': '/param', }, check: true, }, ] as Route[]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, {}, 'http://localhost', '/redir/other-path' ); expect(result).toEqual({ found: true, dest: '/redir/other-path', continue: false, status: 307, headers: { Location: '/other-path' }, uri_args: new URLSearchParams(), matched_route: routesConfig[0], matched_route_idx: 0, userDest: false, isDestUrl: false, phase: undefined, target: undefined, }); }); test('Redirect to partial path', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(404, {}, { etag: '"notfound"' }) ); const routesConfig = [ { src: '^\\/two(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))?$', headers: { Location: '/newplacetwo/$1', }, status: 308, }, ] as Route[]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, {}, 'http://localhost', '/two/some/path?foo=bar' ); expect(result).toEqual({ found: true, dest: '/two/some/path', continue: false, status: 308, headers: { Location: '/newplacetwo/some/path' }, uri_args: new URLSearchParams('foo=bar'), matched_route: routesConfig[0], matched_route_idx: 0, userDest: false, isDestUrl: false, phase: undefined, target: undefined, }); }); test('External rewrite', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(404, {}, { etag: '"notfound"' }) ); const routesConfig = [ { src: '^\\/docs(?:\\/([^\\/]+?))$', dest: 'http://example.com/docs/$1', check: true, }, ] as Route[]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, {}, 'http://localhost', '/docs/hello-world' ); expect(result).toEqual({ found: true, dest: 'http://example.com/docs/hello-world', continue: false, status: undefined, headers: {}, uri_args: new URLSearchParams(''), matched_route: routesConfig[0], matched_route_idx: 0, userDest: false, isDestUrl: true, phase: undefined, target: 'url', }); }); test('Rewrite with ^ and $', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(404, {}, { etag: '"notfound"' }) ); const routesConfig = [ { src: '^/$', dest: '/en', continue: true, }, ] as Route[]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, {}, 'http://localhost', '/' ); expect(result).toEqual({ found: true, dest: '/en', continue: true, status: undefined, headers: {}, uri_args: new URLSearchParams(), matched_route: routesConfig[0], matched_route_idx: 0, userDest: true, isDestUrl: false, phase: undefined, target: undefined, }); }); test('I18n default locale', async () => { const mockedFetch = jest .fn() .mockImplementation(() => generateMockedFetchResponse(404, {}, { etag: '"notfound"' }) ); const routesConfig = [ { src: '^/(?!(?:_next/.*|en|fr\\-FR|nl)(?:/.*|$))(.*)$', dest: '$wildcard/$1', continue: true, }, { src: '/', locale: { redirect: { en: '/', 'fr-FR': '/fr-FR', nl: '/nl', }, cookie: 'NEXT_LOCALE', }, continue: true, }, { src: '^/$', dest: '/en', continue: true, }, ] as Route[]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, {}, 'http://localhost', '/' ); expect(result).toEqual({ found: true, dest: '/en', continue: true, status: undefined, headers: {}, uri_args: new URLSearchParams(''), matched_route: routesConfig[2], matched_route_idx: 2, userDest: true, isDestUrl: false, phase: undefined, target: undefined, }); }); test('Static index route', async () => { const mockedFetch = jest.fn().mockImplementation((url: string) => { if (url === 'http://localhost/filesystem/123/index') { return generateMockedFetchResponse( 200, { key: '123/static/index', }, { etag: '"found"' } ); } return generateMockedFetchResponse(404, {}, { etag: '"notfound"' }); }); const routesConfig = [ { handle: 'filesystem' as const, }, ]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, {}, 'http://localhost', '/' ); expect(result).toEqual({ found: true, dest: '/123/static/index', target: 'filesystem', continue: false, status: undefined, headers: {}, isDestUrl: false, phase: 'filesystem', }); }); test('Multiple dynamic parts', async () => { const mockedFetch = jest.fn().mockImplementation((url: string) => { if (url === 'http://localhost/filesystem/123/[teamSlug]/[project]/[id]') { return generateMockedFetchResponse( 200, { key: '123/static/[teamSlug]/[project]/[id]', }, { etag: '"found"' } ); } return generateMockedFetchResponse(404, {}, { etag: '"notfound"' }); }); const routesConfig: Route[] = [ { handle: 'filesystem', }, { handle: 'rewrite', }, { // Original path of the page: /pages/[teamSlug]/[project]/[id].js src: '^/(?[^/]+?)/(?[^/]+?)/(?[^/]+?)(?:/)?$', dest: '/[teamSlug]/[project]/[id]?teamSlug=$teamSlug&project=$project&id=$id', check: true, }, { handle: 'hit', }, ]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, {}, 'http://localhost', '/another/invite/hello' ); expect(result).toEqual({ found: true, dest: '/123/static/[teamSlug]/[project]/[id]', target: 'filesystem', continue: false, status: undefined, headers: {}, isDestUrl: false, phase: 'rewrite', }); }); test('Dynamic static route', async () => { const mockedFetch = jest.fn().mockImplementation((url: string) => { if (url === 'http://localhost/filesystem/123/users/[user_id]') { return generateMockedFetchResponse( 200, { key: '123/static/users/[user_id]', }, { etag: '"found"' } ); } return generateMockedFetchResponse(404, {}, { etag: '"notfound"' }); }); const routesConfig: Route[] = [ { handle: 'rewrite', }, { src: '^/users/(?[^/]+?)(?:/)?$', dest: '/users/[user_id]?user_id=$user_id', check: true, }, { handle: 'hit', }, ]; const result = await new Proxy(mockedFetch as any).route( '123', routesConfig, {}, 'http://localhost', '/users/123' ); expect(result).toEqual({ found: true, dest: '/123/static/users/[user_id]', target: 'filesystem', continue: false, status: undefined, headers: {}, isDestUrl: false, phase: 'rewrite', }); }); }); ================================================ FILE: packages/proxy/test/res/config-001.json ================================================ { "lambdaRoutes": { "/__NEXT_API_LAMBDA_0": "lambda1.localhost", "/__NEXT_PAGE_LAMBDA_0": "lambda2.localhost" }, "routes": [ { "src": "^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$", "headers": { "Location": "/$1" }, "status": 308 }, { "src": "/404", "status": 404, "continue": true }, { "handle": "filesystem" }, { "src": "^/api/robots/?$", "dest": "/__NEXT_API_LAMBDA_0", "headers": { "x-nextjs-page": "/api/robots" }, "check": true }, { "src": "^(/|/index|)/?$", "dest": "/__NEXT_PAGE_LAMBDA_0", "headers": { "x-nextjs-page": "/index" }, "check": true }, { "src": "^/test/\\[\\.\\.\\.slug\\]/?$", "dest": "/__NEXT_PAGE_LAMBDA_0", "headers": { "x-nextjs-page": "/test/[...slug]" }, "check": true }, { "src": "^\\/robots\\.txt$", "dest": "/api/robots", "check": true }, { "handle": "miss" }, { "src": "/_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|media)/.+", "status": 404, "check": true, "dest": "$0" }, { "handle": "rewrite" }, { "src": "^/_next/data/3L\\-yA_7zVvNyrhLaBNi3Z/index.json$", "dest": "/", "check": true }, { "src": "^/_next/data/3L\\-yA_7zVvNyrhLaBNi3Z/test/(?.+?)\\.json$", "dest": "/test/[...slug]?slug=$slug", "check": true }, { "src": "^/test/\\[\\.\\.\\.slug\\]/?$", "dest": "/__NEXT_PAGE_LAMBDA_0", "headers": { "x-nextjs-page": "/test/[...slug]" }, "check": true }, { "src": "^/api/robots/?$", "dest": "/__NEXT_API_LAMBDA_0", "headers": { "x-nextjs-page": "/api/robots" }, "check": true }, { "src": "^(/|/index|)/?$", "dest": "/__NEXT_PAGE_LAMBDA_0", "headers": { "x-nextjs-page": "/index" }, "check": true }, { "src": "^/test/(?.+?)(?:/)?$", "dest": "/test/[...slug]?slug=$slug", "check": true }, { "src": "^/test/\\[\\.\\.\\.slug\\]/?$", "dest": "/__NEXT_PAGE_LAMBDA_0", "headers": { "x-nextjs-page": "/test/[...slug]" }, "check": true }, { "handle": "hit" }, { "src": "/_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|media)/.+", "headers": { "cache-control": "public,max-age=31536000,immutable" }, "continue": true }, { "handle": "error" }, { "src": "/.*", "dest": "/404", "status": 404, "headers": { "x-nextjs-page": "" } } ] } ================================================ FILE: packages/proxy/test/res/config-002.json ================================================ { "lambdaRoutes": { "/__NEXT_API_LAMBDA_0": "lambda1.localhost", "/__NEXT_PAGE_LAMBDA_0": "lambda2.localhost" }, "routes": [ { "src": "^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$", "headers": { "Location": "/$1" }, "status": 308 }, { "src": "/404", "status": 404, "continue": true }, { "handle": "filesystem" }, { "src": "^/api/robots/?$", "dest": "/__NEXT_API_LAMBDA_0", "headers": { "x-nextjs-page": "/api/robots" }, "check": true }, { "src": "^(/|/index|)/?$", "dest": "/__NEXT_PAGE_LAMBDA_0", "headers": { "x-nextjs-page": "/index" }, "check": true }, { "src": "^/product/\\[\\.\\.\\.slug\\]/?$", "dest": "/__NEXT_PAGE_LAMBDA_0", "headers": { "x-nextjs-page": "/product/[...slug]" }, "check": true }, { "src": "^\\/robots\\.txt$", "dest": "/api/robots", "check": true }, { "handle": "miss" }, { "src": "/_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|media)/.+", "status": 404, "check": true, "dest": "$0" }, { "handle": "rewrite" }, { "src": "^/api/robots/?$", "dest": "/__NEXT_API_LAMBDA_0", "headers": { "x-nextjs-page": "/api/robots" }, "check": true }, { "src": "^(/|/index|)/?$", "dest": "/__NEXT_PAGE_LAMBDA_0", "headers": { "x-nextjs-page": "/index" }, "check": true }, { "src": "^/product/(?.+?)(?:/)?$", "dest": "/product/[...slug]?slug=$slug", "check": true }, { "src": "^/product/\\[\\.\\.\\.slug\\]/?$", "dest": "/__NEXT_PAGE_LAMBDA_0", "headers": { "x-nextjs-page": "/product/[...slug]" }, "check": true }, { "handle": "hit" }, { "src": "/_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|media)/.+", "headers": { "cache-control": "public,max-age=31536000,immutable" }, "continue": true }, { "handle": "error" }, { "src": "/.*", "dest": "/404", "status": 404, "headers": { "x-nextjs-page": "" } } ] } ================================================ FILE: packages/proxy/test/res/config-003.json ================================================ { "lambdas": { "__NEXT_PAGE_LAMBDA_0": { "handler": "now__launcher.launcher", "runtime": "nodejs12.x", "filename": "lambdas/__NEXT_PAGE_LAMBDA_0.zip", "route": "/__NEXT_PAGE_LAMBDA_0" } }, "lambdaRoutes": {}, "routes": [ { "src": "^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$", "headers": { "Location": "/$1" }, "status": 308, "continue": true }, { "src": "^\\/redir1$", "headers": { "Location": "/redir2" }, "status": 308 }, { "src": "^\\/redir2$", "headers": { "Location": "/hello" }, "status": 307 }, { "src": "^\\/redir(?:\\/([^\\/]+?))$", "headers": { "Location": "/$1" }, "status": 307 }, { "src": "/404", "status": 404, "continue": true }, { "handle": "filesystem" }, { "src": "^/param/?$", "dest": "/__NEXT_PAGE_LAMBDA_0", "headers": { "x-nextjs-page": "/param" }, "check": true }, { "handle": "miss" }, { "src": "/_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|media)/.+", "status": 404, "check": true, "dest": "$0" }, { "handle": "rewrite" }, { "src": "^/_next/data/UV8gMhl9p5YQXuutxHHVa/param.json$", "dest": "/param", "check": true }, { "src": "^/param/?$", "dest": "/__NEXT_PAGE_LAMBDA_0", "headers": { "x-nextjs-page": "/param" }, "check": true }, { "handle": "hit" }, { "src": "/_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|media|UV8gMhl9p5YQXuutxHHVa)/.+", "headers": { "cache-control": "public,max-age=31536000,immutable" }, "continue": true }, { "handle": "error" }, { "src": "/.*", "dest": "/404", "status": 404, "headers": { "x-nextjs-page": "" } } ], "buildId": "UV8gMhl9p5YQXuutxHHVa", "prerenders": {}, "staticFilesArchive": "static-website-files.zip" } ================================================ FILE: packages/proxy/test/res/config-004.json ================================================ { "lambdas": { "__NEXT_PAGE_LAMBDA_0": { "handler": "now__launcher.launcher", "runtime": "nodejs12.x", "filename": "lambdas/__NEXT_PAGE_LAMBDA_0.zip", "route": "/__NEXT_PAGE_LAMBDA_0" } }, "lambdaRoutes": {}, "routes": [ { "src": "^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$", "headers": { "Location": "/$1" }, "status": 308, "continue": true }, { "src": "^\\/redir1$", "headers": { "Location": "/redir2" }, "status": 308 }, { "src": "^\\/redir2$", "headers": { "Location": "/hello" }, "status": 307 }, { "src": "^\\/redir(?:\\/([^\\/]+?))$", "headers": { "Location": "/$1" }, "status": 307 }, { "src": "/404", "status": 404, "continue": true }, { "handle": "filesystem" }, { "src": "^/param/?$", "dest": "/__NEXT_PAGE_LAMBDA_0", "headers": { "x-nextjs-page": "/param" }, "check": true }, { "handle": "resource" }, { "src": "/.*", "status": 404 }, { "handle": "miss" }, { "handle": "rewrite" }, { "src": "^/_next/data/NohaCTYF291LU27JmlG_U/param.json$", "dest": "/param", "check": true }, { "src": "^/param/?$", "dest": "/__NEXT_PAGE_LAMBDA_0", "headers": { "x-nextjs-page": "/param" }, "check": true }, { "handle": "hit" }, { "handle": "error" }, { "src": "/.*", "dest": "/404", "status": 404 } ], "buildId": "NohaCTYF291LU27JmlG_U", "prerenders": {}, "staticFilesArchive": "static-website-files.zip", "version": 1 } ================================================ FILE: packages/proxy/test/resolve-route-parameters.test.ts ================================================ import { resolveRouteParameters } from '../src/util/resolve-route-parameters'; describe('resolve route parameters', () => { test('resolve numbered param', () => { const matcher = new RegExp('^\\/docs(?:\\/([^\\/]+?))$', 'i'); const match = matcher.exec('/docs/hello-world'); expect(match).not.toBeNull(); const keys = Object.keys(match!.groups ?? {}); const result = resolveRouteParameters( 'http://example.com/docs/$1', match!, keys ); expect(result).toBe('http://example.com/docs/hello-world'); }); // Underscores in query params are valid // See: https://github.com/milliHQ/terraform-aws-next-js/issues/218 test('resolve named param with underscore', () => { const matcher = new RegExp('^/users/(?[^/]+?)(?:/)?$', 'i'); const match = matcher.exec('/users/123'); expect(match).not.toBeNull(); const keys = Object.keys(match!.groups ?? {}); const result = resolveRouteParameters( '/users/[user_id]?user_id=$user_id', match!, keys ); expect(result).toBe('/users/[user_id]?user_id=123'); }); }); ================================================ FILE: packages/proxy/test/test-utils.ts ================================================ import { CloudFrontRequestEvent } from 'aws-lambda'; /* ----------------------------------------------------------------------------- * generateCloudFrontRequestEvent * ---------------------------------------------------------------------------*/ type GenerateCloudFrontRequestEventOptions = { /** * URL where the proxy config can be fetched from. */ configEndpoint: string; /** * Querystring of the original request. */ querystring?: string; /** * Pathname (without querystring) of the original request. */ uri: string; }; /** * Generates a CloudFrontRequestEvent object. * @see {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html#example-origin-request} */ function generateCloudFrontRequestEvent( options: GenerateCloudFrontRequestEventOptions ): CloudFrontRequestEvent { const { configEndpoint, querystring = '', uri } = options; return { Records: [ { cf: { config: { distributionDomainName: 'd111111abcdef8.cloudfront.net', distributionId: 'EDFDVBD6EXAMPLE', eventType: 'origin-request', requestId: '4TyzHTaYWb1GX1qTfsHhEqV6HUDd_BzoBZnwfnvQc_1oF26ClkoUSEQ==', }, request: { clientIp: '203.0.113.178', headers: { 'x-forwarded-for': [ { key: 'X-Forwarded-For', value: '203.0.113.178', }, ], 'user-agent': [ { key: 'User-Agent', value: 'Amazon CloudFront', }, ], via: [ { key: 'Via', value: '2.0 2afae0d44e2540f472c0635ab62c232b.cloudfront.net (CloudFront)', }, ], host: [ { key: 'Host', value: 'example.org', }, ], 'cache-control': [ { key: 'Cache-Control', value: 'no-cache, cf-no-cache', }, ], }, method: 'GET', origin: { s3: { customHeaders: { 'x-env-config-endpoint': [ { key: 'x-env-config-endpoint', value: configEndpoint, }, ], }, region: 'us-east-1', authMethod: 'origin-access-identity', domainName: 's3.localhost', path: '', }, }, querystring, uri, }, }, }, ], }; } /* ----------------------------------------------------------------------------- * generateMockedFetchResponse * ---------------------------------------------------------------------------*/ /** * Generates a fake fetch-like response. * * @param status - HTTP status * @param data - Object that should be returned from the .json() call * @param headers - HTTP response header that should be included in the response * @returns */ function generateMockedFetchResponse( status: number, data: any, headers: Record = {} ) { // Fake headers get method headers.get('key') const headerMap = new Map(); for (const [key, value] of Object.entries(headers)) { headerMap.set(key.toLowerCase(), value); } return Promise.resolve({ status, json: () => Promise.resolve(data), headers: { get: (key: string) => headerMap.get(key.toLowerCase()), }, }); } export { generateCloudFrontRequestEvent, generateMockedFetchResponse }; ================================================ FILE: packages/proxy/test/util/append-querystring.test.ts ================================================ import { URLSearchParams } from 'url'; import { appendQuerystring } from '../../src/util/append-querystring'; describe('Relative URL', () => { test('SearchParams', () => { const result = appendQuerystring('/test', new URLSearchParams('foo=bar')); expect(result).toBe('/test?foo=bar'); }); test('Empty SearchParams', () => { const result = appendQuerystring('/test', new URLSearchParams()); expect(result).toBe('/test'); }); test('Querystring, empty SearchParams', () => { const result = appendQuerystring('/test?foo=bar', new URLSearchParams()); expect(result).toBe('/test?foo=bar'); }); test('Querystring, same SearchParams', () => { const result = appendQuerystring( '/test?foo=bar', new URLSearchParams('foo=bar') ); expect(result).toBe('/test?foo=bar'); }); test('Querystring, different SearchParams', () => { const result = appendQuerystring( '/test?foo=bar', new URLSearchParams('bar=foo') ); expect(result).toBe('/test?bar=foo&foo=bar'); }); test('Querystring, try to override SearchParams', () => { const result = appendQuerystring( '/test?foo=bar', new URLSearchParams('foo=xxx') ); expect(result).toBe('/test?foo=bar'); }); }); describe('Absolute URL', () => { test('SearchParams', () => { const result = appendQuerystring( 'https://example.org/test', new URLSearchParams('foo=bar') ); expect(result).toBe('https://example.org/test?foo=bar'); }); test('Empty SearchParams', () => { const result = appendQuerystring( 'https://example.org/test', new URLSearchParams() ); expect(result).toBe('https://example.org/test'); }); test('Querystring, empty SearchParams', () => { const result = appendQuerystring( 'https://example.org/test?foo=bar', new URLSearchParams() ); expect(result).toBe('https://example.org/test?foo=bar'); }); test('Querystring, same SearchParams', () => { const result = appendQuerystring( 'https://example.org/test?foo=bar', new URLSearchParams('foo=bar') ); expect(result).toBe('https://example.org/test?foo=bar'); }); test('Querystring, different SearchParams', () => { const result = appendQuerystring( 'https://example.org/test?foo=bar', new URLSearchParams('bar=foo') ); expect(result).toBe('https://example.org/test?bar=foo&foo=bar'); }); test('Querystring, try to override SearchParams', () => { const result = appendQuerystring( 'https://example.org/test?foo=bar', new URLSearchParams('foo=xxx') ); expect(result).toBe('https://example.org/test?foo=bar'); }); }); ================================================ FILE: packages/proxy/test/util/ttl-cache.test.ts ================================================ import { performance } from 'perf_hooks'; import { TTLCache } from '../../src/util/ttl-cache'; jest.mock('perf_hooks', () => { return { performance: { now: jest.fn(), }, }; }); describe('TTL cache', () => { test('Set and retrieve items from the cache ', () => { const cache = new TTLCache(60); expect(cache.get('foo')).toBeNull(); // @ts-ignore performance.now.mockReturnValue(0); cache.set('foo', 'bar'); // @ts-ignore performance.now.mockReturnValue(60); expect(cache.get('foo')).toMatchObject({ expired: false, item: 'bar', }); // @ts-ignore performance.now.mockReturnValue(61); expect(cache.get('foo')).toMatchObject({ expired: true, item: 'bar', }); }); test('Purge cache', () => { const cache = new TTLCache(60); // @ts-ignore performance.now.mockReturnValue(0); cache.set('foo', 'bar'); // @ts-ignore performance.now.mockReturnValue(10); cache.set('hello', 'world'); // @ts-ignore performance.now.mockReturnValue(30); cache.set('nice', 'try'); cache.purgeStale(71); expect(cache.get('foo')).toBeNull(); expect(cache.get('hello')).toBeNull(); expect(cache.get('nice')).not.toBeNull(); }); test('Purge cache on set', () => { const cache = new TTLCache(60); // @ts-ignore performance.now.mockReturnValue(0); cache.set('foo', 'bar'); // @ts-ignore performance.now.mockReturnValue(61); cache.set('hello', 'world'); // @ts-ignore performance.now.mockReturnValue(80); expect(cache.get('foo')).toBeNull(); // @ts-ignore performance.now.mockReturnValue(81); expect(cache.get('hello')).toMatchObject({ expired: false, item: 'world', }); // @ts-ignore performance.now.mockReturnValue(122); expect(cache.get('hello')).toMatchObject({ expired: true, item: 'world', }); }); test('Custom TTL', () => { const cache = new TTLCache(60); // @ts-ignore performance.now.mockReturnValue(0); cache.set('expire1', 'expire'); cache.set('foo', 'bar', 80); cache.set('expire2', 'expire'); // @ts-ignore performance.now.mockReturnValue(61); cache.set('hello', 'world'); expect(cache.get('foo')).toMatchObject({ expired: false, item: 'bar', }); expect(cache.get('expire1')).toBeNull(); expect(cache.get('expire2')).toBeNull(); // @ts-ignore performance.now.mockReturnValue(81); expect(cache.get('foo')).toMatchObject({ expired: true, item: 'bar', }); }); }); ================================================ FILE: packages/proxy/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "compilerOptions": { "typeRoots": ["../../node_modules/@types"] }, "include": ["./src/**/*"] } ================================================ FILE: packages/proxy-config/.gitignore ================================================ # Build output dist dist.zip ================================================ FILE: packages/proxy-config/jest.config.js ================================================ /** @type {import('ts-jest').InitialOptionsTsJest} */ module.exports = { preset: 'ts-jest', testEnvironment: 'node', rootDir: './', }; ================================================ FILE: packages/proxy-config/ncc.config.json ================================================ { "externals": { "aws-sdk": "aws-sdk", "/^aws-sdk(/.*)/": "aws-sdk$1" }, "minify": true } ================================================ FILE: packages/proxy-config/package.json ================================================ { "name": "@millihq/terraform-next-proxy-config", "version": "1.0.0-canary.5", "description": "Proxy config component of Terraform Next.js module for AWS", "main": "index.js", "license": "Apache-2.0", "homepage": "https://registry.terraform.io/modules/milliHQ/next-js/aws", "repository": { "type": "git", "url": "https://github.com/milliHQ/terraform-next.js.git", "directory": "packages/proxy-config" }, "scripts": { "build": "ncc-zip build -f handler --license third-party-licenses.txt src/handler.ts", "prepack": "cp dist/third-party-licenses.txt ../../LICENSE ./", "postpack": "rm ./LICENSE ./third-party-licenses.txt" }, "dependencies": { "@millihq/tfn-dynamodb-actions": "1.0.0-canary.5", "aws-sdk": "*" }, "devDependencies": { "@types/aws-lambda": "*", "@types/node-fetch": "^2.6.1", "@vercel/ncc": "*", "jest": "*", "ncc-zip": "^2.1.0", "ts-jest": "*", "typescript": "*" }, "files": [ "dist.zip", "third-party-licenses.txt" ] } ================================================ FILE: packages/proxy-config/src/actions/deployment-file-exists.ts ================================================ import { CloudFrontResultResponse } from 'aws-lambda'; import { S3 } from 'aws-sdk'; import { NotFoundError } from '../errors/not-found-error'; import { splitAtCharacter } from '../utils/split-at-character'; type DeploymentFileExistsOptions = { s3Client: S3; s3BucketId: string; uri?: string; }; /** * Checks if a file exists in the deployment bucket. * * @param options * @returns */ async function deploymentFileExists({ s3Client, s3BucketId, uri, }: DeploymentFileExistsOptions): Promise { if (!uri) { throw new NotFoundError('Missing deploymentId and FileKey'); } const [deploymentId, key] = splitAtCharacter(uri, '/'); if (!deploymentId || !key) { throw new NotFoundError('Missing deploymentId or FileKey'); } const decodedKey = decodeURIComponent(key); const absoluteKey = deploymentId + '/static/' + decodedKey; try { const result = await s3Client .headObject({ Bucket: s3BucketId, Key: absoluteKey, }) .promise(); return { status: '200', body: JSON.stringify({ status: 200, key: absoluteKey, cacheControl: result.CacheControl, contentType: result.ContentType, }), headers: { // Cache indefinitely, only reset through invalidation 'cache-control': [ { key: 'Cache-Control', value: 'public, max-age=31536000', }, ], 'content-type': [ { key: 'Content-Type', value: 'application/json', }, ], }, }; } catch (s3Error: any) { // Files that are not found in S3 return a 403 (Forbidden) status if (s3Error.statusCode === 403) { throw new NotFoundError('File does not exist'); } throw s3Error; } } export { deploymentFileExists }; ================================================ FILE: packages/proxy-config/src/actions/get-alias.ts ================================================ import { getAliasById, reverseHostname } from '@millihq/tfn-dynamodb-actions'; import { CloudFrontResultResponse } from 'aws-lambda'; import { DynamoDB } from 'aws-sdk'; import { NotFoundError } from '../errors/not-found-error'; type GetAliasOptions = { dynamoDBClient: DynamoDB; dynamoDBTable: string; uri?: string; }; /** * Gets the proxy config for an alias and returns it back to the viewer. * * @param options * @returns */ async function getAlias({ dynamoDBClient, dynamoDBTable, uri: alias, }: GetAliasOptions): Promise { if (!alias) { throw new NotFoundError('Empty alias is not allowed'); } const hostnameRev = reverseHostname(alias); const aliasRecord = await getAliasById({ hostnameRev, aliasTableName: dynamoDBTable, dynamoDBClient, attributes: { Routes: true, Prerenders: true, LambdaRoutes: true, DeploymentId: true, }, }); if (!aliasRecord) { throw new NotFoundError(`No Alias found for ${alias}`); } // For performance reasons we build the JSON response here manually, since // the records in the database are already stringified JSON objects. return { status: '200', body: '{"routes":' + aliasRecord.Routes + ',"lambdaRoutes":' + aliasRecord.LambdaRoutes + ',"prerenders":' + aliasRecord.Prerenders + ',"deploymentId":' + '"' + aliasRecord.DeploymentId + '"' + '}', headers: { 'cache-control': [ { key: 'Cache-Control', value: 'public, max-age=31536000', }, ], 'content-type': [ { key: 'Content-Type', value: 'application/json', }, ], }, }; } export { getAlias }; ================================================ FILE: packages/proxy-config/src/errors/not-found-error.ts ================================================ import { CloudFrontResultResponse } from 'aws-lambda'; class NotFoundError extends Error { toCloudFrontResponse(): CloudFrontResultResponse { return { status: '404', headers: { // 404 errors should be stored indefinitely in CloudFront cache, can // only reset through invalidation 'cache-control': [ { key: 'Cache-Control', value: 'public, max-age=31536000', }, ], 'content-type': [ { key: 'Content-Type', value: 'application/json', }, ], }, body: JSON.stringify({ status: 404, message: this.message, }), }; } } export { NotFoundError }; ================================================ FILE: packages/proxy-config/src/handler.ts ================================================ import { CloudFrontRequestEvent, CloudFrontResultResponse } from 'aws-lambda'; import { DynamoDB, S3 } from 'aws-sdk'; import { deploymentFileExists } from './actions/deployment-file-exists'; import { getAlias } from './actions/get-alias'; import { NotFoundError } from './errors/not-found-error'; import { getEnv } from './utils/get-env'; import { splitAtCharacter } from './utils/split-at-character'; // Things that can be reused on different runs of the same Lambda, saving // performance let dynamoDBClient: DynamoDB; let s3Client: S3; async function handler( event: CloudFrontRequestEvent ): Promise { try { const { request } = event.Records[0].cf; // Split the uri at after the action // // // ^-- Split here // We start at index 1, to ignore the first `/` const [action, restUri] = splitAtCharacter(request.uri, '/', 1); switch (action) { // /aliases/ case 'aliases': if (!dynamoDBClient) { const dynamoDBRegion = getEnv(request, 'x-env-dynamodb-region'); dynamoDBClient = new DynamoDB({ region: dynamoDBRegion, }); } const dynamoDBTable = getEnv(request, 'x-env-dynamodb-table-aliases'); // Awaited return allows error catch return await getAlias({ dynamoDBClient, dynamoDBTable, uri: restUri, }); // /filesystem// case 'filesystem': if (!s3Client) { const bucketRegion = getEnv(request, 'x-env-bucket-region'); s3Client = new S3({ region: bucketRegion, }); } const bucketId = getEnv(request, 'x-env-bucket-id'); // Awaited return allows error catch return await deploymentFileExists({ s3Client, s3BucketId: bucketId, uri: restUri, }); default: throw new NotFoundError('Method does not exist.'); } } catch (error) { if (error instanceof NotFoundError) { return error.toCloudFrontResponse(); } // Unhandled error console.error(error); return { status: '500', body: 'Something went wrong.', }; } } export { handler }; ================================================ FILE: packages/proxy-config/src/utils/get-env.ts ================================================ import { CloudFrontRequest } from 'aws-lambda'; /** * Gets a environment variable from the CloudFront Request */ function getEnv(request: CloudFrontRequest, key: string) { const env = request.origin?.custom?.customHeaders[key][0]; if (!env) { throw new Error(`Env ${key} is not set.`); } return env.value; } export { getEnv }; ================================================ FILE: packages/proxy-config/src/utils/split-at-character.ts ================================================ /** * Splits a string at the fist occurrence into two substrings. * * @param input * @param char * @param startIndex */ function splitAtCharacter( input: string, char: string, startIndex: number = 0 ): [string, string] { const firstSlashInUrl = input.indexOf(char, startIndex); return [ input.substring(startIndex, firstSlashInUrl), input.substring(firstSlashInUrl + char.length), ]; } export { splitAtCharacter }; ================================================ FILE: packages/proxy-config/test/utils/split-at-character.test.ts ================================================ import { splitAtCharacter } from '../../src/utils/split-at-character'; describe('Split at character', () => { test('Start at position', () => { const [part1, part2] = splitAtCharacter('/foo/bar/test', '/', 1); expect(part1).toBe('foo'); expect(part2).toBe('bar/test'); }); test('Empty string', () => { const [part1, part2] = splitAtCharacter('', '/'); expect(part1).toBe(''); expect(part2).toBe(''); }); test('Missing second part', () => { const [part1, part2] = splitAtCharacter('hello/', '/'); expect(part1).toBe('hello'); expect(part2).toBe(''); }); }); ================================================ FILE: packages/proxy-config/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "include": ["./src/**/*", "./test/**/*"] } ================================================ FILE: packages/runtime/.gitignore ================================================ /dist /src/now__bridge.ts ================================================ FILE: packages/runtime/LICENSE ================================================ Apache License Version 2.0, January 2004 https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2021 Felix Haus (milliVolt infrastructure) Copyright 2017 Vercel, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: packages/runtime/README.md ================================================ # Terraform Next.js Runtime ## License Apache-2.0 - see [LICENSE](https://github.com/milliHQ/terraform-aws-next-js/blob/main/packages/runtime/LICENSE) for details. ================================================ FILE: packages/runtime/build.sh ================================================ #!/bin/bash set -euo pipefail # Use customized version of now-node-bridge bridge_defs=$(node -e "\ console.log(require.resolve('@millihq/terraform-next-node-bridge/src/bridge.ts')); \ "); # bridge_defs="$(dirname $(pwd))/now-node-bridge/src/bridge.ts" cp -v "$bridge_defs" src/now__bridge.ts tsc # ncc build src/dev-server.ts -e @vercel/build-utils -e @now/build-utils -o dist/dev # mv dist/dev/index.js dist/dev-server.js # rm -rf dist/dev ncc build src/index.ts --minify -e @vercel/build-utils -e @now/build-utils -o dist/main mv dist/main/index.js dist/index.js rm -rf dist/main ================================================ FILE: packages/runtime/jest.config.js ================================================ /** @type {import('ts-jest').InitialOptionsTsJest} */ module.exports = { preset: 'ts-jest', testEnvironment: 'node', rootDir: './', }; ================================================ FILE: packages/runtime/package.json ================================================ { "name": "@millihq/tf-next-runtime", "version": "1.0.0-canary.5", "license": "Apache-2.0", "main": "./dist/index", "homepage": "https://registry.terraform.io/modules/milliHQ/next-js/aws", "scripts": { "build": "./build.sh", "test-integration-once": "jest --env node --verbose --runInBand --bail" }, "repository": { "type": "git", "url": "https://github.com/milliHQ/terraform-aws-next-js.git", "directory": "packages/runtime" }, "files": [ "dist" ], "devDependencies": { "@types/aws-lambda": "*", "@types/buffer-crc32": "0.2.0", "@types/find-up": "4.0.0", "@types/fs-extra": "8.0.0", "@types/next-server": "8.0.0", "@types/resolve-from": "5.0.1", "@types/semver": "6.0.0", "@types/yazl": "2.4.1", "@vercel/build-utils": "2.17.0", "@vercel/nft": "0.19.1", "@vercel/routing-utils": "1.10.1", "async-sema": "3.0.1", "buffer-crc32": "0.2.13", "escape-string-regexp": "2.0.0", "execa": "2.0.4", "find-up": "4.1.0", "fs-extra": "7.0.0", "get-port": "5.0.0", "jest": "*", "resolve-from": "5.0.0", "semver": "6.1.1", "set-cookie-parser": "2.4.6", "ts-jest": "*", "typescript": "*", "yazl": "https://github.com/ijjk/yazl#70949c55b482647669ce37023017b1514c42b33c" } } ================================================ FILE: packages/runtime/src/create-serverless-config.ts ================================================ import fs from 'fs-extra'; import path from 'path'; import semver from 'semver'; import { ExperimentalTraceVersion } from './utils'; function getCustomData(importName: string, target: string) { return ` module.exports = function(...args) { let original = require('./${importName}'); const finalConfig = {}; const target = { target: '${target}' }; if (typeof original === 'function' && original.constructor.name === 'AsyncFunction') { // AsyncFunctions will become promises original = original(...args); } if (original instanceof Promise) { // Special case for promises, as it's currently not supported // and will just error later on return original .then((orignalConfig) => Object.assign(finalConfig, orignalConfig)) .then((config) => Object.assign(config, target)); } else if (typeof original === 'function') { Object.assign(finalConfig, original(...args)); } else if (typeof original === 'object') { Object.assign(finalConfig, original); } Object.assign(finalConfig, target); return finalConfig; } `.trim(); } function getDefaultData(target: string) { return `module.exports = { target: '${target}' };`; } export default async function createServerlessConfig( workPath: string, entryPath: string, nextVersion: string | undefined ) { let target = 'serverless'; if (nextVersion) { try { if (semver.gte(nextVersion, ExperimentalTraceVersion)) { target = 'experimental-serverless-trace'; } } catch ( _ignored // eslint-disable-next-line ) {} } const primaryConfigPath = path.join(entryPath, 'next.config.js'); const secondaryConfigPath = path.join(workPath, 'next.config.js'); const backupConfigName = `next.config.__vercel_builder_backup__.js`; const hasPrimaryConfig = fs.existsSync(primaryConfigPath); const hasSecondaryConfig = fs.existsSync(secondaryConfigPath); let configPath: string; let backupConfigPath: string; if (hasPrimaryConfig) { // Prefer primary path configPath = primaryConfigPath; backupConfigPath = path.join(entryPath, backupConfigName); } else if (hasSecondaryConfig) { // Work with secondary path (some monorepo setups) configPath = secondaryConfigPath; backupConfigPath = path.join(workPath, backupConfigName); } else { // Default to primary path for creation configPath = primaryConfigPath; backupConfigPath = path.join(entryPath, backupConfigName); } if (fs.existsSync(configPath)) { await fs.rename(configPath, backupConfigPath); await fs.writeFile(configPath, getCustomData(backupConfigName, target)); } else { await fs.writeFile(configPath, getDefaultData(target)); } } ================================================ FILE: packages/runtime/src/dev-server.ts ================================================ import resolveFrom from 'resolve-from'; import { parse } from 'url'; import getPort from 'get-port'; import { createServer } from 'http'; import { syncEnvVars } from './utils'; process.on('unhandledRejection', err => { console.error('Exiting builder due to build error:'); console.error(err); process.exit(1); }); process.once('message', async ({ dir, runtimeEnv }) => { // eslint-disable-next-line @typescript-eslint/no-var-requires const next = require(resolveFrom(dir, 'next')); const app = next({ dev: true, dir }); const handler = app.getRequestHandler(); const [openPort] = await Promise.all([getPort(), app.prepare()]); const url = `http://localhost:${openPort}`; syncEnvVars(process.env, process.env, runtimeEnv); createServer((req, res) => { const parsedUrl = parse(req.url || '', true); handler(req, res, parsedUrl); }).listen(openPort, () => { if (process.send) { process.send(url); } }); }); ================================================ FILE: packages/runtime/src/index.ts ================================================ import { BuildOptions, Config, createLambda, debug, download, execCommand, FileBlob, FileFsRef, Files, getLambdaOptionsFromFunction, getNodeBinPath, getNodeVersion, getScriptName, getSpawnOptions, glob, Meta, Lambda, NowBuildError, PackageJson, PrepareCacheOptions, Prerender, runNpmInstall, runPackageJsonScript, } from '@vercel/build-utils'; import { Handler, Route, Source } from '@vercel/routing-utils'; import { convertHeaders, convertRedirects, convertRewrites, } from '@vercel/routing-utils/dist/superstatic'; import { nodeFileTrace, NodeFileTraceReasons } from '@vercel/nft'; import { Sema } from 'async-sema'; import { ChildProcess, fork } from 'child_process'; // escape-string-regexp version must match Next.js version import escapeStringRegexp from 'escape-string-regexp'; import findUp from 'find-up'; import { lstat, pathExists, readFile, remove, writeFile } from 'fs-extra'; import os from 'os'; import path from 'path'; import resolveFrom from 'resolve-from'; import semver from 'semver'; import url from 'url'; import createServerlessConfig from './create-serverless-config'; import nextLegacyVersions from './legacy-versions'; import { addLocaleOrDefault, createLambdaFromPseudoLayers, createPseudoLayer, EnvConfig, excludeFiles, ExperimentalTraceVersion, getDynamicRoutes, getExportIntent, getExportStatus, getImagesManifest, getNextConfig, getPathsInside, getPrerenderManifest, getRoutes, getRoutesManifest, getSourceFilePathFromPage, isDynamicRoute, normalizeLocalePath, normalizePackageJson, normalizePage, PseudoLayer, stringMap, syncEnvVars, validateEntrypoint, } from './utils'; interface BuildParamsMeta { isDev: boolean | undefined; env?: EnvConfig; buildEnv?: EnvConfig; } interface BuildParamsType extends BuildOptions { files: Files; entrypoint: string; workPath: string; meta: Meta; } export const version = 2; const htmlContentType = 'text/html; charset=utf-8'; const nowDevChildProcesses = new Set(); ['SIGINT', 'SIGTERM'].forEach(signal => { process.once(signal as NodeJS.Signals, () => { for (const child of nowDevChildProcesses) { debug( `Got ${signal}, killing dev server child process (pid=${child.pid})` ); process.kill(child.pid, signal); } process.exit(0); }); }); const MAX_AGE_ONE_YEAR = 31536000; /** * Read package.json from files */ async function readPackageJson(entryPath: string): Promise { const packagePath = path.join(entryPath, 'package.json'); try { return JSON.parse(await readFile(packagePath, 'utf8')); } catch (err) { debug('package.json not found in entry'); return {}; } } /** * Write package.json */ async function writePackageJson(workPath: string, packageJson: PackageJson) { await writeFile( path.join(workPath, 'package.json'), JSON.stringify(packageJson, null, 2) ); } /** * Write .npmrc with npm auth token */ async function writeNpmRc(workPath: string, token: string) { await writeFile( path.join(workPath, '.npmrc'), `//registry.npmjs.org/:_authToken=${token}` ); } /** * Get the installed Next version. */ function getRealNextVersion(entryPath: string): string | false { try { // First try to resolve the `next` dependency and get the real version from its // package.json. This allows the builder to be used with frameworks like Blitz that // bundle Next but where Next isn't in the project root's package.json const nextVersion: string = require(resolveFrom( entryPath, 'next/package.json' )).version; debug(`Detected Next.js version: ${nextVersion}`); return nextVersion; } catch (_ignored) { debug( `Could not identify real Next.js version, ensure it is defined as a project dependency.` ); return false; } } /** * Get the package.json Next version. */ async function getNextVersionRange(entryPath: string): Promise { let nextVersion: string | false = false; const pkg = await readPackageJson(entryPath); if (pkg.dependencies && pkg.dependencies.next) { nextVersion = pkg.dependencies.next; } else if (pkg.devDependencies && pkg.devDependencies.next) { nextVersion = pkg.devDependencies.next; } return nextVersion; } function isLegacyNext(nextVersion: string) { // If version is using the dist-tag instead of a version range if (nextVersion === 'canary' || nextVersion === 'latest') { return false; } // If the version is an exact match with the legacy versions if (nextLegacyVersions.indexOf(nextVersion) !== -1) { return true; } const maxSatisfying = semver.maxSatisfying(nextLegacyVersions, nextVersion); // When the version can't be matched with legacy versions, so it must be a newer version if (maxSatisfying === null) { return false; } return true; } const name = '[@vercel/next]'; const urls: stringMap = {}; function startDevServer(entryPath: string, runtimeEnv: EnvConfig) { // `env` is omitted since that makes it default to `process.env` const forked = fork(path.join(__dirname, 'dev-server.js'), [], { cwd: entryPath, execArgv: [], }); const getUrl = () => new Promise((resolve, reject) => { forked.once('message', resolve); forked.once('error', reject); }); forked.send({ dir: entryPath, runtimeEnv }); return { forked, getUrl }; } export async function build({ files, workPath, repoRootPath, entrypoint, config = {} as Config, meta = {} as Meta, }: BuildParamsType): Promise<{ routes: Route[]; images?: { domains: string[]; sizes: number[]; formats?: string[] | undefined; dangerouslyAllowSVG?: boolean | undefined; contentSecurityPolicy?: string | undefined; }; output: Files; wildcard?: Array<{ domain: string; value: string; }>; watch?: string[]; childProcesses: ChildProcess[]; }> { validateEntrypoint(entrypoint); // Limit for max size each lambda can be, 50 MB if no custom limit const lambdaCompressedByteLimit = config.maxLambdaSize || 50 * 1000 * 1000; let entryDirectory = path.dirname(entrypoint); const entryPath = path.join(workPath, entryDirectory); const outputDirectory = config.outputDirectory || '.next'; const dotNextStatic = path.join(entryPath, outputDirectory, 'static'); const baseDir = repoRootPath || workPath; await download(files, workPath, meta); let pkg = await readPackageJson(entryPath); const nextVersionRange = await getNextVersionRange(entryPath); const nodeVersion = await getNodeVersion(entryPath, undefined, config, meta); const spawnOpts = getSpawnOptions(meta, nodeVersion); // Add Vercel build environment variables that some dependencies need // to determine a Vercel like build environment spawnOpts.env = { ...spawnOpts.env, NOW_BUILDER: '1', VERCEL: '1', // Next.js changed the default output folder beginning with // 10.0.8-canary.15 from `.next/serverless` to `.next/server`. // This is an opt-out of this behavior until we support it. // https://github.com/dealmore/terraform-aws-next-js/issues/86 // https://github.com/vercel/next.js/pull/22731 NEXT_PRIVATE_TARGET: 'experimental-serverless-trace', // We override init CWD here with the entrypoint to ensure that applications // can get the CWD from the download directory root INIT_CWD: entryPath, }; const nowJsonPath = await findUp(['now.json', 'vercel.json'], { cwd: entryPath, }); let hasLegacyRoutes = false; const hasFunctionsConfig = !!config.functions; if (nowJsonPath) { const nowJsonData = JSON.parse(await readFile(nowJsonPath, 'utf8')); if (Array.isArray(nowJsonData.routes) && nowJsonData.routes.length > 0) { hasLegacyRoutes = true; console.warn( `WARNING: your application is being opted out of @vercel/next's optimized lambdas mode due to legacy routes in ${path.basename( nowJsonPath )}. http://err.sh/vercel/vercel/next-legacy-routes-optimized-lambdas` ); } } if (hasFunctionsConfig) { console.warn( `WARNING: Your application is being opted out of "@vercel/next" optimized lambdas mode due to \`functions\` config.\nMore info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas` ); } // default to true but still allow opting out with the config const isSharedLambdas = !hasLegacyRoutes && !hasFunctionsConfig && typeof config.sharedLambdas === 'undefined' ? true : !!config.sharedLambdas; if (meta.isDev) { let childProcess: ChildProcess | undefined; // If this is the initial build, we want to start the server if (!urls[entrypoint]) { if (!process.env.NODE_ENV) { process.env.NODE_ENV = 'development'; } // The runtime env vars consist of the base `process.env` vars, but with the // build env vars removed, and the runtime env vars mixed in afterwards const runtimeEnv: EnvConfig = Object.assign({}, process.env); syncEnvVars(runtimeEnv, meta.buildEnv || {}, meta.env || {}); const { forked, getUrl } = startDevServer(entryPath, runtimeEnv); urls[entrypoint] = await getUrl(); childProcess = forked; nowDevChildProcesses.add(forked); debug( `${name} Development server for ${entrypoint} running at ${urls[entrypoint]}` ); } const pathsInside = getPathsInside(entryDirectory, files); return { output: {}, images: undefined, routes: await getRoutes( entryPath, entryDirectory, pathsInside, files, urls[entrypoint] ), watch: pathsInside, childProcesses: childProcess ? [childProcess] : [], }; } if (await pathExists(dotNextStatic)) { console.warn('WARNING: You should not upload the `.next` directory.'); } const isLegacy = nextVersionRange && isLegacyNext(nextVersionRange); debug(`MODE: ${isLegacy ? 'legacy' : 'serverless'}`); if (isLegacy) { console.warn( "WARNING: your application is being deployed in @vercel/next's legacy mode. http://err.sh/vercel/vercel/now-next-legacy-mode" ); await Promise.all([ remove(path.join(entryPath, 'yarn.lock')), remove(path.join(entryPath, 'package-lock.json')), ]); debug('Normalizing package.json'); pkg = normalizePackageJson(pkg); debug('Normalized package.json result: ', pkg); await writePackageJson(entryPath, pkg); } let buildScriptName = getScriptName(pkg, [ 'vercel-build', 'now-build', 'build', ]); const { installCommand, buildCommand } = config; if (!buildScriptName && !buildCommand) { console.log( 'Your application is being built using `next build`. ' + 'If you need to define a different build step, please create a `vercel-build` script in your `package.json` ' + '(e.g. `{ "scripts": { "vercel-build": "npm run prepare && next build" } }`).' ); await writePackageJson(entryPath, { ...pkg, scripts: { 'vercel-build': 'next build', ...pkg.scripts, }, }); buildScriptName = 'vercel-build'; } if (process.env.NPM_AUTH_TOKEN) { debug('Found NPM_AUTH_TOKEN in environment, creating .npmrc'); await writeNpmRc(entryPath, process.env.NPM_AUTH_TOKEN); } if (typeof installCommand === 'string') { if (installCommand.trim()) { console.log(`Running "install" command: \`${installCommand}\`...`); await execCommand(installCommand, { ...spawnOpts, // Yarn v2 PnP mode may be activated, so force // "node-modules" linker style env: { YARN_NODE_LINKER: 'node-modules', ...spawnOpts.env, }, cwd: entryPath, }); } else { console.log(`Skipping "install" command...`); } } else { console.log('Installing dependencies...'); const installTime = Date.now(); await runNpmInstall(entryPath, [], spawnOpts, meta); debug(`Install complete [${Date.now() - installTime}ms]`); } // Refetch Next version now that dependencies are installed. // This will now resolve the actual installed Next version, // even if Next isn't in the project package.json const nextVersion = getRealNextVersion(entryPath); if (!nextVersion) { throw new NowBuildError({ code: 'NEXT_NO_VERSION', message: 'No Next.js version could be detected in your project. Make sure `"next"` is installed in "dependencies" or "devDependencies"', }); } if (!isLegacy) { await createServerlessConfig(workPath, entryPath, nextVersion); } const memoryToConsume = Math.floor(os.totalmem() / 1024 ** 2) - 128; const env: typeof process.env = { ...spawnOpts.env }; env.NODE_OPTIONS = `--max_old_space_size=${memoryToConsume}`; if (buildCommand) { // Add `node_modules/.bin` to PATH const nodeBinPath = await getNodeBinPath({ cwd: entryPath }); env.PATH = `${nodeBinPath}${path.delimiter}${env.PATH}`; // Yarn v2 PnP mode may be activated, so force "node-modules" linker style if (!env.YARN_NODE_LINKER) { env.YARN_NODE_LINKER = 'node-modules'; } debug( `Added "${nodeBinPath}" to PATH env because a build command was used.` ); console.log(`Running "${buildCommand}"`); await execCommand(buildCommand, { ...spawnOpts, cwd: entryPath, env, }); } else if (buildScriptName) { await runPackageJsonScript(entryPath, buildScriptName, { ...spawnOpts, env, }); } let appMountPrefixNoTrailingSlash = path.posix .join('/', entryDirectory) .replace(/\/+$/, ''); const routesManifest = await getRoutesManifest( entryPath, outputDirectory, nextVersion ); const imagesManifest = await getImagesManifest(entryPath, outputDirectory); const prerenderManifest = await getPrerenderManifest( entryPath, outputDirectory ); const headers: Route[] = []; const rewrites: Route[] = []; let redirects: Route[] = []; const dataRoutes: Route[] = []; let dynamicRoutes: Route[] = []; // whether they have enabled pages/404.js as the custom 404 page let hasPages404 = false; let buildId = ''; let escapedBuildId = ''; if (isLegacy || isSharedLambdas) { try { buildId = await readFile( path.join(entryPath, outputDirectory, 'BUILD_ID'), 'utf8' ); escapedBuildId = escapeStringRegexp(buildId); } catch (err) { throw new NowBuildError({ code: 'NOW_NEXT_NO_BUILD_ID', message: 'The BUILD_ID file was not found in the Output Directory. Did you forget to run "next build" in your Build Command?', }); } } if (routesManifest) { switch (routesManifest.version) { case 1: case 2: case 3: case 4: { redirects.push(...convertRedirects(routesManifest.redirects)); rewrites.push(...convertRewrites(routesManifest.rewrites)); if (routesManifest.headers) { headers.push(...convertHeaders(routesManifest.headers)); } if (routesManifest.basePath && routesManifest.basePath !== '/') { const nextBasePath = routesManifest.basePath; if (!nextBasePath.startsWith('/')) { throw new NowBuildError({ code: 'NEXT_BASEPATH_STARTING_SLASH', message: 'basePath must start with `/`. Please upgrade your `@vercel/next` builder and try again. Contact support if this continues to happen.', }); } if (nextBasePath.endsWith('/')) { throw new NowBuildError({ code: 'NEXT_BASEPATH_TRAILING_SLASH', message: 'basePath must not end with `/`. Please upgrade your `@vercel/next` builder and try again. Contact support if this continues to happen.', }); } entryDirectory = path.join(entryDirectory, nextBasePath); appMountPrefixNoTrailingSlash = path.posix .join('/', entryDirectory) .replace(/\/+$/, ''); } if (routesManifest.dataRoutes) { // Load the /_next/data routes for both dynamic SSG and SSP pages. // These must be combined and sorted to prevent conflicts for (const dataRoute of routesManifest.dataRoutes) { const ssgDataRoute = prerenderManifest.fallbackRoutes[dataRoute.page] || prerenderManifest.blockingFallbackRoutes[dataRoute.page]; // we don't need to add routes for non-lazy SSG routes since // they have outputs which would override the routes anyways if ( prerenderManifest.staticRoutes[dataRoute.page] || prerenderManifest.omittedRoutes.includes(dataRoute.page) ) { continue; } const route = { src: ( dataRoute.namedDataRouteRegex || dataRoute.dataRouteRegex ).replace(/^\^/, `^${appMountPrefixNoTrailingSlash}`), dest: path.join( '/', entryDirectory, // make sure to route SSG data route to the data prerender // output, we don't do this for SSP routes since they don't // have a separate data output `${(ssgDataRoute && ssgDataRoute.dataRoute) || dataRoute.page}${ dataRoute.routeKeys ? `?${Object.keys(dataRoute.routeKeys) .map(key => `${dataRoute.routeKeys![key]}=$${key}`) .join('&')}` : '' }` ), check: true, }; const { i18n } = routesManifest; if (i18n) { const origSrc = route.src; route.src = route.src.replace( // we need to double escape the build ID here // to replace it properly `/${escapedBuildId}/`, `/${escapedBuildId}/(?${ ssgDataRoute ? '' : ':' }${i18n.locales .map(locale => escapeStringRegexp(locale)) .join('|')})/` ); // optional-catchall routes don't have slash between // build-id and the regex if (route.src === origSrc) { route.src = route.src.replace( // we need to double escape the build ID here // to replace it properly `/${escapedBuildId}`, `/${escapedBuildId}/(?${ ssgDataRoute ? '' : ':' }${i18n.locales .map(locale => escapeStringRegexp(locale)) .join('|')})[/]?` ); } // make sure to route to the correct prerender output if (ssgDataRoute) { route.dest = route.dest.replace( `/${buildId}/`, `/${buildId}/$nextLocale/` ); } } dataRoutes.push(route); } } if (routesManifest.pages404) { hasPages404 = true; } break; } default: { // update MIN_ROUTES_MANIFEST_VERSION in ./utils.ts throw new NowBuildError({ code: 'NEXT_VERSION_OUTDATED', message: 'This version of `@vercel/next` does not support the version of Next.js you are trying to deploy.\n' + 'Please upgrade your `@vercel/next` builder and try again. Contact support if this continues to happen.', }); } } } if (imagesManifest) { switch (imagesManifest.version) { case 1: { if (!imagesManifest.images) { throw new NowBuildError({ code: 'NEXT_IMAGES_MISSING', message: 'image-manifest.json "images" is required. Contact support if this continues to happen.', }); } const { images } = imagesManifest; if (!Array.isArray(images.domains)) { throw new NowBuildError({ code: 'NEXT_IMAGES_DOMAINS', message: 'image-manifest.json "images.domains" must be an array. Contact support if this continues to happen.', }); } if (!Array.isArray(images.sizes)) { throw new NowBuildError({ code: 'NEXT_IMAGES_SIZES', message: 'image-manifest.json "images.sizes" must be an array. Contact support if this continues to happen.', }); } if ( typeof images.dangerouslyAllowSVG !== 'undefined' && typeof images.dangerouslyAllowSVG !== 'boolean' ) { throw new NowBuildError({ code: 'NEXT_IMAGES_DANGEROUSLYALLOWSVG', message: 'image-manifest.json "images.dangerouslyAllowSVG" must be an boolean. Contact support if this continues to happen.', }); } if ( typeof images.contentSecurityPolicy !== 'undefined' && typeof images.contentSecurityPolicy !== 'string' ) { throw new NowBuildError({ code: 'NEXT_IMAGES_CONTENTSECURITYPOLICY', message: 'image-manifest.json "images.contentSecurityPolicy" must be an string. Contact support if this continues to happen.', }); } break; } default: { throw new NowBuildError({ code: 'NEXT_IMAGES_VERSION_UNKNOWN', message: 'This version of `@vercel/next` does not support the version of Next.js you are trying to deploy.\n' + 'Please upgrade your `@vercel/next` builder and try again. Contact support if this continues to happen.', }); } } } const userExport = await getExportStatus(entryPath); if (userExport) { const exportIntent = await getExportIntent(entryPath); const { trailingSlash = false } = exportIntent || {}; const resultingExport = await getExportStatus(entryPath); if (!resultingExport) { throw new NowBuildError({ code: 'NEXT_EXPORT_FAILED', message: 'Exporting Next.js app failed. Please check your build logs and contact us if this continues.', }); } if (resultingExport.success !== true) { throw new NowBuildError({ code: 'NEXT_EXPORT_FAILED', message: 'Export of Next.js app failed. Please check your build logs.', }); } const outDirectory = resultingExport.outDirectory; debug(`next export should use trailing slash: ${trailingSlash}`); // This handles pages, `public/`, and `static/`. const filesAfterBuild = await glob('**', outDirectory); const output: Files = { ...filesAfterBuild }; // Strip `.html` extensions from build output Object.entries(output) .filter(([name]) => name.endsWith('.html')) .forEach(([name, value]) => { const cleanName = name.slice(0, -5); delete output[name]; output[cleanName] = value; if (value.type === 'FileBlob' || value.type === 'FileFsRef') { value.contentType = value.contentType || 'text/html; charset=utf-8'; } }); return { output, images: imagesManifest?.images?.loader === 'default' ? { domains: imagesManifest.images.domains, sizes: imagesManifest.images.sizes, } : undefined, routes: [ // User headers ...headers, // User redirects ...redirects, // Make sure to 404 for the /404 path itself { src: path.join('/', entryDirectory, '404'), status: 404, continue: true, }, // Next.js pages, `static/` folder, reserved assets, and `public/` // folder { handle: 'filesystem' }, // These need to come before handle: miss or else they are grouped // with that routing section ...rewrites, // make sure 404 page is used when a directory is matched without // an index page { handle: 'resource' }, { src: path.join('/', entryDirectory, '.*'), status: 404 }, // We need to make sure to 404 for /_next after handle: miss since // handle: miss is called before rewrites and to prevent rewriting // /_next { handle: 'miss' }, { src: path.join( '/', entryDirectory, '_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|media)/.+' ), status: 404, check: true, dest: '$0', }, // Dynamic routes // TODO: do we want to do this?: ...dynamicRoutes, // (if so make sure to add any dynamic routes after handle: 'rewrite' ) // routes to call after a file has been matched { handle: 'hit' }, // Before we handle static files we need to set proper caching headers { // This ensures we only match known emitted-by-Next.js files and not // user-emitted files which may be missing a hash in their filename. src: path.join( '/', entryDirectory, `_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|media|${escapedBuildId})/.+` ), // Next.js assets contain a hash or entropy in their filenames, so they // are guaranteed to be unique and cacheable indefinitely. headers: { 'cache-control': `public,max-age=${MAX_AGE_ONE_YEAR},immutable`, }, continue: true, important: true, }, // error handling ...(output[path.join('./', entryDirectory, '404')] || output[path.join('./', entryDirectory, '404/index')] ? [ { handle: 'error' } as Handler, { status: 404, src: path.join(entryDirectory, '.*'), dest: path.join('/', entryDirectory, '404'), }, ] : []), ], watch: [], childProcesses: [], }; } if (isLegacy) { debug('Running npm install --production...'); await runNpmInstall(entryPath, ['--production'], spawnOpts, meta); } if (process.env.NPM_AUTH_TOKEN) { await remove(path.join(entryPath, '.npmrc')); } const pageLambdaRoutes: Route[] = []; const dynamicPageLambdaRoutes: Route[] = []; const dynamicPageLambdaRoutesMap: { [page: string]: Route } = {}; const pageLambdaMap: { [page: string]: string } = {}; const lambdas: { [key: string]: Lambda } = {}; const prerenders: { [key: string]: Prerender | FileFsRef } = {}; const staticPages: { [key: string]: FileFsRef } = {}; const dynamicPages: string[] = []; let static404Page: string | undefined; let page404Path = ''; if (isLegacy) { const filesAfterBuild = await glob('**', entryPath); debug('Preparing serverless function files...'); const dotNextRootFiles = await glob(`${outputDirectory}/*`, entryPath); const dotNextServerRootFiles = await glob( `${outputDirectory}/server/*`, entryPath ); const nodeModules = excludeFiles( await glob('node_modules/**', entryPath), file => file.startsWith('node_modules/.cache') ); const launcherFiles = { 'now__bridge.js': new FileFsRef({ fsPath: path.join(__dirname, 'now__bridge.js'), }), }; const nextFiles: { [key: string]: FileFsRef } = { ...nodeModules, ...dotNextRootFiles, ...dotNextServerRootFiles, ...launcherFiles, }; if (filesAfterBuild['next.config.js']) { nextFiles['next.config.js'] = filesAfterBuild['next.config.js']; } const pagesDir = path.join( entryPath, outputDirectory, 'server', 'static', buildId, 'pages' ); const pages = await glob('**/*.js', pagesDir); const launcherPath = path.join(__dirname, 'legacy-launcher.js'); const launcherData = await readFile(launcherPath, 'utf8'); await Promise.all( Object.keys(pages).map(async page => { // These default pages don't have to be handled as they'd always 404 if (['_app.js', '_error.js', '_document.js'].includes(page)) { return; } const pathname = page.replace(/\.js$/, ''); const launcher = launcherData.replace( 'PATHNAME_PLACEHOLDER', `/${pathname.replace(/(^|\/)index$/, '')}` ); const pageFiles = { [`${outputDirectory}/server/static/${buildId}/pages/_document.js`]: filesAfterBuild[ `${outputDirectory}/server/static/${buildId}/pages/_document.js` ], [`${outputDirectory}/server/static/${buildId}/pages/_app.js`]: filesAfterBuild[ `${outputDirectory}/server/static/${buildId}/pages/_app.js` ], [`${outputDirectory}/server/static/${buildId}/pages/_error.js`]: filesAfterBuild[ `${outputDirectory}/server/static/${buildId}/pages/_error.js` ], [`${outputDirectory}/server/static/${buildId}/pages/${page}`]: filesAfterBuild[ `${outputDirectory}/server/static/${buildId}/pages/${page}` ], }; let lambdaOptions = {}; if (config && config.functions) { lambdaOptions = await getLambdaOptionsFromFunction({ sourceFile: await getSourceFilePathFromPage({ workPath: entryPath, page, }), config, }); } debug(`Creating serverless function for page: "${page}"...`); lambdas[path.join(entryDirectory, pathname)] = await createLambda({ files: { ...nextFiles, ...pageFiles, 'now__launcher.js': new FileBlob({ data: launcher }), }, handler: 'now__launcher.launcher', runtime: nodeVersion.runtime, ...lambdaOptions, }); debug(`Created serverless function for page: "${page}"`); }) ); } else { debug('Preparing serverless function files...'); const pagesDir = path.join( entryPath, outputDirectory, 'serverless', 'pages' ); const pages = await glob('**/*.js', pagesDir); const staticPageFiles = await glob('**/*.html', pagesDir); Object.keys(staticPageFiles).forEach((page: string) => { const pathname = page.replace(/\.html$/, ''); const routeName = normalizeLocalePath( normalizePage(pathname), routesManifest?.i18n?.locales ).pathname; // Prerendered routes emit a `.html` file but should not be treated as a // static page. // Lazily prerendered routes have a fallback `.html` file on newer // Next.js versions so we need to also not treat it as a static page here. if ( prerenderManifest.staticRoutes[routeName] || prerenderManifest.fallbackRoutes[routeName] || prerenderManifest.staticRoutes[normalizePage(pathname)] || prerenderManifest.fallbackRoutes[normalizePage(pathname)] ) { return; } const staticRoute = path.join(entryDirectory, pathname); staticPages[staticRoute] = staticPageFiles[page]; staticPages[staticRoute].contentType = htmlContentType; if (isDynamicRoute(pathname)) { dynamicPages.push(routeName); return; } }); // this can be either 404.html in latest versions // or _errors/404.html versions while this was experimental static404Page = staticPages[path.join(entryDirectory, '404')] && hasPages404 ? path.join(entryDirectory, '404') : staticPages[path.join(entryDirectory, '_errors/404')] ? path.join(entryDirectory, '_errors/404') : undefined; // TODO: locale specific 404s const { i18n } = routesManifest || {}; if (!static404Page && i18n) { static404Page = staticPages[ path.join(entryDirectory, i18n.defaultLocale, '404') ] ? path.join(entryDirectory, i18n.defaultLocale, '404') : undefined; } // > 1 because _error is a lambda but isn't used if a static 404 is available const pageKeys = Object.keys(pages); let hasLambdas = !static404Page || pageKeys.length > 1; if (pageKeys.length === 0) { const nextConfig = await getNextConfig(workPath, entryPath); if (nextConfig != null) { console.info('Found next.config.js:'); console.info(nextConfig); console.info(); } throw new NowBuildError({ code: 'NEXT_NO_SERVERLESS_PAGES', message: 'No serverless pages were built', link: 'https://err.sh/vercel/vercel/now-next-no-serverless-pages-built', }); } // Assume tracing to be safe, bail if we know we don't need it. let requiresTracing = hasLambdas; try { if (nextVersion && semver.lt(nextVersion, ExperimentalTraceVersion)) { debug( 'Next.js version is too old for us to trace the required dependencies.\n' + 'Assuming Next.js has handled it!' ); requiresTracing = false; } } catch (err) { console.log( 'Failed to check Next.js version for tracing compatibility: ' + err ); } let assets: | undefined | { [filePath: string]: FileFsRef; }; const isApiPage = (page: string) => page.replace(/\\/g, '/').match(/serverless\/pages\/api(\/|\.js$)/); const canUsePreviewMode = Object.keys(pages).some(page => isApiPage(pages[page].fsPath) ); let pseudoLayerBytes = 0; let apiPseudoLayerBytes = 0; const pseudoLayers: PseudoLayer[] = []; const apiPseudoLayers: PseudoLayer[] = []; const nonLambdaSsgPages = new Set(); const onPrerenderRouteInitial = (routeKey: string) => { // Get the route file as it'd be mounted in the builder output const pr = prerenderManifest.staticRoutes[routeKey]; const { initialRevalidate, srcRoute } = pr; const route = srcRoute || routeKey; if ( initialRevalidate === false && (!canUsePreviewMode || (hasPages404 && routeKey === '/404')) && !prerenderManifest.fallbackRoutes[route] && !prerenderManifest.blockingFallbackRoutes[route] ) { // if the 404 page used getStaticProps we need to update static404Page // since it wasn't populated from the staticPages group if (route === '/404') { static404Page = path.join(entryDirectory, '404'); } nonLambdaSsgPages.add(route === '/' ? '/index' : route); } }; Object.keys(prerenderManifest.staticRoutes).forEach(route => onPrerenderRouteInitial(route) ); const tracedFiles: { [filePath: string]: FileFsRef; } = {}; const apiTracedFiles: { [filePath: string]: FileFsRef; } = {}; if (requiresTracing) { const apiPages: string[] = []; const nonApiPages: string[] = []; const pageKeys = Object.keys(pages); for (const page of pageKeys) { const pagePath = pages[page].fsPath; const route = `/${page.replace(/\.js$/, '')}`; if (route === '/_error' && static404Page) continue; if (isApiPage(pagePath)) { apiPages.push(pagePath); } else if (!nonLambdaSsgPages.has(route)) { nonApiPages.push(pagePath); } } hasLambdas = !static404Page || apiPages.length > 0 || nonApiPages.length > 0; const tracingLabel = 'Traced Next.js serverless functions for external files in'; if (hasLambdas) { console.time(tracingLabel); } const nftCache = Object.create(null); const { fileList: apiFileList, reasons: apiReasons, } = await nodeFileTrace(apiPages, { base: baseDir, processCwd: entryPath, cache: nftCache, }); debug(`node-file-trace result for api routes: ${apiFileList}`); const { fileList, reasons: nonApiReasons } = await nodeFileTrace( nonApiPages, { base: baseDir, processCwd: entryPath, cache: nftCache, } ); debug(`node-file-trace result for pages: ${fileList}`); const lstatSema = new Sema(25, { capacity: fileList.size + apiFileList.size, }); const lstatResults: { [key: string]: ReturnType } = {}; const collectTracedFiles = ( reasons: NodeFileTraceReasons, files: { [filePath: string]: FileFsRef } ) => async (file: string) => { const reason = reasons.get(file); if (reason && reason.type.indexOf('initial') !== -1) { // Initial files are manually added to the lambda later return; } const filePath = path.join(baseDir, file); if (!lstatResults[filePath]) { lstatResults[filePath] = lstatSema .acquire() .then(() => lstat(filePath)) .finally(() => lstatSema.release()); } const { mode } = await lstatResults[filePath]; files[file] = new FileFsRef({ fsPath: path.join(baseDir, file), mode, }); }; await Promise.all( Array.from(fileList).map(collectTracedFiles(nonApiReasons, tracedFiles)) ); await Promise.all( Array.from(apiFileList).map( collectTracedFiles(apiReasons, apiTracedFiles) ) ); if (hasLambdas) { console.timeEnd(tracingLabel); } const zippingLabel = 'Compressed shared serverless function files'; if (hasLambdas) { console.time(zippingLabel); } let pseudoLayer; let apiPseudoLayer; ({ pseudoLayer, pseudoLayerBytes } = await createPseudoLayer( tracedFiles )); ({ pseudoLayer: apiPseudoLayer, pseudoLayerBytes: apiPseudoLayerBytes, } = await createPseudoLayer(apiTracedFiles)); pseudoLayers.push(pseudoLayer); apiPseudoLayers.push(apiPseudoLayer); if (hasLambdas) { console.timeEnd(zippingLabel); } } else { // An optional assets folder that is placed alongside every page // entrypoint. // This is a legacy feature that was needed before we began tracing // lambdas. assets = await glob( 'assets/**', path.join(entryPath, outputDirectory, 'serverless') ); const assetKeys = Object.keys(assets); if (assetKeys.length > 0) { debug( 'detected (legacy) assets to be bundled with serverless function:' ); assetKeys.forEach(assetFile => debug(`\t${assetFile}`)); debug( '\nPlease upgrade to Next.js 9.1 to leverage modern asset handling.' ); } } const launcherPath = path.join(__dirname, 'templated-launcher.js'); const launcherData = await readFile(launcherPath, 'utf8'); const allLambdasLabel = `All serverless functions created in`; if (hasLambdas) { console.time(allLambdasLabel); } type LambdaGroup = { pages: { [outputName: string]: { pageName: string; pageFileName: string; pageLayer: PseudoLayer; }; }; isApiLambda: boolean; lambdaIdentifier: string; lambdaCombinedBytes: number; }; const apiLambdaGroups: Array = []; const pageLambdaGroups: Array = []; if (isSharedLambdas) { // Do initial check to make sure the traced files don't already // exceed the lambda size limit as we won't be able to continue // if they do if ( pseudoLayerBytes >= lambdaCompressedByteLimit || apiPseudoLayerBytes >= lambdaCompressedByteLimit ) { throw new Error( `Required lambda files exceed max lambda size of ${lambdaCompressedByteLimit} bytes` ); } for (const page of pageKeys) { // These default pages don't have to be handled as they'd always 404 if (['_app.js', '_document.js'].includes(page)) { continue; } // Don't add _error to lambda if we have a static 404 page or // pages404 is enabled and 404.js is present if ( page === '_error.js' && ((static404Page && staticPages[static404Page]) || (hasPages404 && pages['404.js'])) ) { continue; } const pageFileName = path.normalize( path.relative(workPath, pages[page].fsPath) ); const pathname = page.replace(/\.js$/, ''); const routeIsApi = isApiPage(pageFileName); const routeIsDynamic = isDynamicRoute(pathname); if (routeIsDynamic) { dynamicPages.push(normalizePage(pathname)); } if (nonLambdaSsgPages.has(`/${pathname}`)) { continue; } const outputName = path.join('/', entryDirectory, pathname); const lambdaGroups = routeIsApi ? apiLambdaGroups : pageLambdaGroups; let lambdaGroupIndex = lambdaGroups.length - 1; const lastLambdaGroup = lambdaGroups[lambdaGroupIndex]; let currentLambdaGroup = lastLambdaGroup; if ( !currentLambdaGroup || currentLambdaGroup.lambdaCombinedBytes >= lambdaCompressedByteLimit ) { lambdaGroupIndex++; currentLambdaGroup = { pages: {}, isApiLambda: !!routeIsApi, lambdaCombinedBytes: !requiresTracing ? 0 : routeIsApi ? apiPseudoLayerBytes : pseudoLayerBytes, lambdaIdentifier: path.join( entryDirectory, `__NEXT_${routeIsApi ? 'API' : 'PAGE'}_LAMBDA_${lambdaGroupIndex}` ), }; } const addPageLambdaRoute = (escapedOutputPath: string) => { const pageLambdaRoute: Route = { src: `^${escapedOutputPath.replace(/\/index$/, '(/|/index|)')}/?$`, dest: `${path.join('/', currentLambdaGroup.lambdaIdentifier)}`, headers: { 'x-nextjs-page': outputName, }, check: true, }; // we only need to add the additional routes if shared lambdas // is enabled if (routeIsDynamic) { dynamicPageLambdaRoutes.push(pageLambdaRoute); dynamicPageLambdaRoutesMap[outputName] = pageLambdaRoute; } else { pageLambdaRoutes.push(pageLambdaRoute); } }; const { i18n } = routesManifest || {}; if (i18n) { addPageLambdaRoute( `[/]?(?:${i18n.locales .map(locale => escapeStringRegexp(locale)) .join('|')})?${escapeStringRegexp(outputName)}` ); } else { addPageLambdaRoute(escapeStringRegexp(outputName)); } if (page === '_error.js' || (hasPages404 && page === '404.js')) { page404Path = path.join('/', entryDirectory, pathname); } // we create the page as it's own layer so we can track how much // it increased the lambda size on it's own and know when we // need to create a new lambda const { pseudoLayer: pageLayer, pseudoLayerBytes: pageLayerBytes, } = await createPseudoLayer({ [path.join(path.relative(baseDir, entryPath), pageFileName)]: pages[ page ], }); currentLambdaGroup.pages[outputName] = { pageLayer, pageFileName, pageName: page, }; currentLambdaGroup.lambdaCombinedBytes += pageLayerBytes; lambdaGroups[lambdaGroupIndex] = currentLambdaGroup; } } else { await Promise.all( pageKeys.map(async page => { // These default pages don't have to be handled as they'd always 404 if (['_app.js', '_document.js'].includes(page)) { return; } // Don't create _error lambda if we have a static 404 page or // pages404 is enabled and 404.js is present if ( page === '_error.js' && ((static404Page && staticPages[static404Page]) || (hasPages404 && pages['404.js'])) ) { return; } const pathname = page.replace(/\.js$/, ''); if (isDynamicRoute(pathname)) { dynamicPages.push(normalizePage(pathname)); } const pageFileName = path.normalize( path.relative(entryPath, pages[page].fsPath) ); const launcher = launcherData.replace( /__LAUNCHER_PAGE_PATH__/g, JSON.stringify(requiresTracing ? `./${pageFileName}` : './page') ); const launcherFiles: { [name: string]: FileFsRef | FileBlob } = { [path.join( path.relative(baseDir, entryPath), 'now__bridge.js' )]: new FileFsRef({ fsPath: path.join(__dirname, 'now__bridge.js'), }), [path.join( path.relative(baseDir, entryPath), 'now__launcher.js' )]: new FileBlob({ data: launcher }), }; const lambdaOptions = await getLambdaOptionsFromFunction({ sourceFile: await getSourceFilePathFromPage({ workPath: entryPath, page, }), config, }); const outputName = path.join(entryDirectory, pathname); if (requiresTracing) { lambdas[outputName] = await createLambdaFromPseudoLayers({ files: { ...launcherFiles, [path.join( path.relative(baseDir, entryPath), pageFileName )]: pages[page], }, layers: isApiPage(pageFileName) ? apiPseudoLayers : pseudoLayers, handler: path.join( path.relative(baseDir, entryPath), 'now__launcher.launcher' ), runtime: nodeVersion.runtime, ...lambdaOptions, }); } else { lambdas[outputName] = await createLambda({ files: { ...launcherFiles, ...assets, ...tracedFiles, ['page.js']: pages[page], }, handler: 'now__launcher.launcher', runtime: nodeVersion.runtime, ...lambdaOptions, }); } }) ); } let dynamicPrefix = path.join('/', entryDirectory); dynamicPrefix = dynamicPrefix === '/' ? '' : dynamicPrefix; dynamicRoutes = await getDynamicRoutes( entryPath, entryDirectory, dynamicPages, false, routesManifest, new Set(prerenderManifest.omittedRoutes) ).then(arr => arr.map(route => { const { i18n } = routesManifest || {}; if (i18n) { const { pathname } = url.parse(route.dest!); const isFallback = prerenderManifest.fallbackRoutes[pathname!]; const isBlocking = prerenderManifest.blockingFallbackRoutes[pathname!]; const isAutoExport = staticPages[ addLocaleOrDefault(pathname!, routesManifest).substr(1) ]; const isLocalePrefixed = isFallback || isBlocking || isAutoExport; route.src = route.src.replace( '^', `^${dynamicPrefix ? `${dynamicPrefix}[/]?` : '[/]?'}(?${ isLocalePrefixed ? '' : ':' }${i18n.locales .map(locale => escapeStringRegexp(locale)) .join('|')})?` ); if (isLocalePrefixed) { // ensure destination has locale prefix to match prerender output // path so that the prerender object is used route.dest = route.dest!.replace( `${path.join('/', entryDirectory, '/')}`, `${path.join('/', entryDirectory, '$nextLocale', '/')}` ); } } else { route.src = route.src.replace('^', `^${dynamicPrefix}`); } return route; }) ); if (isSharedLambdas) { const launcherPath = path.join(__dirname, 'templated-launcher-shared.js'); const launcherData = await readFile(launcherPath, 'utf8'); // we need to include the prerenderManifest.omittedRoutes here // for the page to be able to be matched in the lambda for preview mode const completeDynamicRoutes = await getDynamicRoutes( entryPath, entryDirectory, dynamicPages, false, routesManifest ).then(arr => arr.map(route => { route.src = route.src.replace('^', `^${dynamicPrefix}`); return route; }) ); await Promise.all( [...apiLambdaGroups, ...pageLambdaGroups].map( async function buildLambdaGroup(group: LambdaGroup) { const groupPageKeys = Object.keys(group.pages); const launcher = launcherData.replace( /\/\/ __LAUNCHER_PAGE_HANDLER__/g, ` const url = require('url'); ${ routesManifest?.i18n ? ` function stripLocalePath(pathname) { // first item will be empty string from splitting at first char const pathnameParts = pathname.split('/') ;(${JSON.stringify( routesManifest.i18n.locales )}).some((locale) => { if (pathnameParts[1].toLowerCase() === locale.toLowerCase()) { pathnameParts.splice(1, 1) pathname = pathnameParts.join('/') || '/index' return true } return false }) return pathname } ` : `function stripLocalePath(pathname) { return pathname }` } page = function(req, res) { try { const pages = { ${groupPageKeys .map( page => `'${page}': () => require('./${path.join( './', group.pages[page].pageFileName )}')` ) .join(',\n')} ${ '' /* creates a mapping of the page and the page's module e.g. '/about': () => require('./.next/serverless/pages/about.js') */ } } let toRender = req.headers['x-nextjs-page'] if (!toRender) { try { const { pathname } = url.parse(req.url) toRender = stripLocalePath(pathname).replace(/\\/$/, '') || '/index' } catch (_) { // handle failing to parse url res.statusCode = 400 return res.end('Bad Request') } } let currentPage = pages[toRender] if ( toRender && !currentPage ) { if (toRender.includes('/_next/data')) { toRender = toRender .replace(new RegExp('/_next/data/${escapedBuildId}/'), '/') .replace(/\\.json$/, '') toRender = stripLocalePath(toRender) || '/index' currentPage = pages[toRender] } if (!currentPage) { // for prerendered dynamic routes (/blog/post-1) we need to // find the match since it won't match the page directly const dynamicRoutes = ${JSON.stringify( completeDynamicRoutes.map(route => ({ src: route.src, dest: route.dest, })) )} for (const route of dynamicRoutes) { const matcher = new RegExp(route.src) if (matcher.test(toRender)) { toRender = url.parse(route.dest).pathname currentPage = pages[toRender] break } } } } if (!currentPage) { console.error( "Failed to find matching page for", {toRender, header: req.headers['x-nextjs-page'], url: req.url }, "in lambda" ) console.error('pages in lambda', Object.keys(pages)) res.statusCode = 500 return res.end('internal server error') } const mod = currentPage() const method = mod.render || mod.default || mod return method(req, res) } catch (err) { console.error('Unhandled error during request:', err) throw err } } ` ); const launcherFiles: { [name: string]: FileFsRef | FileBlob } = { [path.join( path.relative(baseDir, entryPath), 'now__bridge.js' )]: new FileFsRef({ fsPath: path.join(__dirname, 'now__bridge.js'), }), [path.join( path.relative(baseDir, entryPath), 'now__launcher.js' )]: new FileBlob({ data: launcher }), }; const pageLayers: PseudoLayer[] = []; for (const page of groupPageKeys) { const { pageLayer } = group.pages[page]; pageLambdaMap[page] = group.lambdaIdentifier; pageLayers.push(pageLayer); } if (requiresTracing) { lambdas[ group.lambdaIdentifier ] = await createLambdaFromPseudoLayers({ files: { ...launcherFiles, }, layers: [ ...(group.isApiLambda ? apiPseudoLayers : pseudoLayers), ...pageLayers, ], handler: path.join( path.relative(baseDir, entryPath), 'now__launcher.launcher' ), runtime: nodeVersion.runtime, }); } else { lambdas[ group.lambdaIdentifier ] = await createLambdaFromPseudoLayers({ files: { ...launcherFiles, ...assets, }, layers: pageLayers, handler: path.join( path.relative(baseDir, entryPath), 'now__launcher.launcher' ), runtime: nodeVersion.runtime, }); } } ) ); } if (hasLambdas) { console.timeEnd(allLambdasLabel); } let prerenderGroup = 1; const onPrerenderRoute = ( routeKey: string, { isBlocking, isFallback, locale, }: { isBlocking: boolean; isFallback: boolean; locale?: string; } ) => { if (isBlocking && isFallback) { throw new NowBuildError({ code: 'NEXT_ISBLOCKING_ISFALLBACK', message: 'invariant: isBlocking and isFallback cannot both be true', }); } // Get the route file as it'd be mounted in the builder output let routeFileNoExt = routeKey === '/' ? '/index' : routeKey; const origRouteFileNoExt = routeFileNoExt; const nonDynamicSsg = !isFallback && !isBlocking && !prerenderManifest.staticRoutes[routeKey].srcRoute; // if there isn't a srcRoute then it's a non-dynamic SSG page and if (nonDynamicSsg || isFallback) { routeFileNoExt = addLocaleOrDefault( // root index files are located without folder/index.html routeFileNoExt, routesManifest, locale ); } const isNotFound = prerenderManifest.notFoundRoutes.includes( routeFileNoExt ); const htmlFsRef = isBlocking ? // Blocking pages do not have an HTML fallback null : new FileFsRef({ fsPath: path.join( pagesDir, isFallback ? // Fallback pages have a special file. addLocaleOrDefault( prerenderManifest.fallbackRoutes[routeKey].fallback, routesManifest, locale ) : // Otherwise, the route itself should exist as a static HTML // file. `${routeFileNoExt}.html` ), }); const jsonFsRef = // JSON data does not exist for fallback or blocking pages isFallback || isBlocking ? null : new FileFsRef({ fsPath: path.join(pagesDir, `${routeFileNoExt}.json`), }); let initialRevalidate: false | number; let srcRoute: string | null; let dataRoute: string; if (isFallback || isBlocking) { const pr = isFallback ? prerenderManifest.fallbackRoutes[routeKey] : prerenderManifest.blockingFallbackRoutes[routeKey]; initialRevalidate = 1; // TODO: should Next.js provide this default? // @ts-ignore if (initialRevalidate === false) { // Lazy routes cannot be "snapshotted" in time. throw new NowBuildError({ code: 'NEXT_ISLAZY_INITIALREVALIDATE', message: 'invariant isLazy: initialRevalidate !== false', }); } srcRoute = null; dataRoute = pr.dataRoute; } else { const pr = prerenderManifest.staticRoutes[routeKey]; ({ initialRevalidate, srcRoute, dataRoute } = pr); } const outputPathPage = path.posix.join(entryDirectory, routeFileNoExt); const outputPathPageOrig = path.posix.join( entryDirectory, origRouteFileNoExt ); let lambda: undefined | Lambda; let outputPathData = path.posix.join(entryDirectory, dataRoute); if (nonDynamicSsg || isFallback) { outputPathData = outputPathData.replace( new RegExp(`${escapeStringRegexp(origRouteFileNoExt)}.json$`), `${routeFileNoExt}.json` ); } if (isSharedLambdas) { const outputSrcPathPage = path.join( '/', srcRoute == null ? outputPathPageOrig : path.join(entryDirectory, srcRoute === '/' ? '/index' : srcRoute) ); const lambdaId = pageLambdaMap[outputSrcPathPage]; lambda = lambdas[lambdaId]; } else { const outputSrcPathPage = srcRoute == null ? outputPathPageOrig : path.posix.join( entryDirectory, srcRoute === '/' ? '/index' : srcRoute ); lambda = lambdas[outputSrcPathPage]; } if (!isNotFound && initialRevalidate === false) { if (htmlFsRef == null || jsonFsRef == null) { throw new NowBuildError({ code: 'NEXT_HTMLFSREF_JSONFSREF', message: 'invariant: htmlFsRef != null && jsonFsRef != null', }); } // If revalidate isn't enabled we force the /404 route to be static // to match next start behavior otherwise getStaticProps would be // recalled for each 404 URL path since Prerender is cached based // on the URL path if (!canUsePreviewMode || (hasPages404 && routeKey === '/404')) { htmlFsRef.contentType = htmlContentType; prerenders[outputPathPage] = htmlFsRef; prerenders[outputPathData] = jsonFsRef; } } if (prerenders[outputPathPage] == null && !isNotFound) { if (lambda == null) { throw new NowBuildError({ code: 'NEXT_MISSING_LAMBDA', message: `Unable to find lambda for route: ${routeFileNoExt}`, }); } prerenders[outputPathPage] = new Prerender({ expiration: initialRevalidate, lambda, fallback: htmlFsRef, group: prerenderGroup, bypassToken: prerenderManifest.bypassToken, }); prerenders[outputPathData] = new Prerender({ expiration: initialRevalidate, lambda, fallback: jsonFsRef, group: prerenderGroup, bypassToken: prerenderManifest.bypassToken, }); ++prerenderGroup; if (routesManifest?.i18n && isBlocking) { for (const locale of routesManifest.i18n.locales) { const localeRouteFileNoExt = addLocaleOrDefault( routeFileNoExt, routesManifest, locale ); const localeOutputPathPage = path.posix.join( entryDirectory, localeRouteFileNoExt ); const localeOutputPathData = outputPathData.replace( new RegExp(`${escapeStringRegexp(origRouteFileNoExt)}.json$`), `${localeRouteFileNoExt}${ localeRouteFileNoExt !== origRouteFileNoExt && origRouteFileNoExt === '/index' ? '/index' : '' }.json` ); const origPrerenderPage = prerenders[outputPathPage]; const origPrerenderData = prerenders[outputPathData]; prerenders[localeOutputPathPage] = { ...origPrerenderPage, group: prerenderGroup, } as Prerender; prerenders[localeOutputPathData] = { ...origPrerenderData, group: prerenderGroup, } as Prerender; ++prerenderGroup; } } } if ((nonDynamicSsg || isFallback) && routesManifest?.i18n && !locale) { // load each locale for (const locale of routesManifest.i18n.locales) { if (locale === routesManifest.i18n.defaultLocale) continue; onPrerenderRoute(routeKey, { isBlocking, isFallback, locale, }); } } }; Object.keys(prerenderManifest.staticRoutes).forEach(route => onPrerenderRoute(route, { isBlocking: false, isFallback: false }) ); Object.keys(prerenderManifest.fallbackRoutes).forEach(route => onPrerenderRoute(route, { isBlocking: false, isFallback: true }) ); Object.keys(prerenderManifest.blockingFallbackRoutes).forEach(route => onPrerenderRoute(route, { isBlocking: true, isFallback: false }) ); // We still need to use lazyRoutes if the dataRoutes field // isn't available for backwards compatibility if (!(routesManifest && routesManifest.dataRoutes)) { // Dynamic pages for lazy routes should be handled by the lambda flow. [ ...Object.entries(prerenderManifest.fallbackRoutes), ...Object.entries(prerenderManifest.blockingFallbackRoutes), ].forEach(([, { dataRouteRegex, dataRoute }]) => { dataRoutes.push({ // Next.js provided data route regex src: dataRouteRegex.replace( /^\^/, `^${appMountPrefixNoTrailingSlash}` ), // Location of lambda in builder output dest: path.posix.join(entryDirectory, dataRoute), check: true, }); }); } } const nextStaticFiles = await glob( '**', path.join(entryPath, outputDirectory, 'static') ); const staticFolderFiles = await glob('**', path.join(entryPath, 'static')); let publicFolderFiles: Files = {}; let publicFolderPath: string | undefined; if (await pathExists(path.join(entryPath, 'public'))) { publicFolderPath = path.join(entryPath, 'public'); } else if ( // check at the same level as the output directory also await pathExists(path.join(entryPath, outputDirectory, '../public')) ) { publicFolderPath = path.join(entryPath, outputDirectory, '../public'); } if (publicFolderPath) { debug(`Using public folder at ${publicFolderPath}`); publicFolderFiles = await glob('**/*', publicFolderPath); } else { debug('No public folder found'); } const staticFiles = Object.keys(nextStaticFiles).reduce( (mappedFiles, file) => ({ ...mappedFiles, [path.join(entryDirectory, `_next/static/${file}`)]: nextStaticFiles[ file ], }), {} ); const staticDirectoryFiles = Object.keys(staticFolderFiles).reduce( (mappedFiles, file) => ({ ...mappedFiles, [path.join(entryDirectory, 'static', file)]: staticFolderFiles[file], }), {} ); const publicDirectoryFiles = Object.keys(publicFolderFiles).reduce( (mappedFiles, file) => ({ ...mappedFiles, [path.join(entryDirectory, file)]: publicFolderFiles[file], }), {} ); if (!isSharedLambdas) { // We need to delete lambdas from output instead of omitting them from the // start since we rely on them for powering Preview Mode (read above in // onPrerenderRoute). prerenderManifest.omittedRoutes.forEach(routeKey => { // Get the route file as it'd be mounted in the builder output const routeFileNoExt = path.posix.join( entryDirectory, routeKey === '/' ? '/index' : routeKey ); if (typeof lambdas[routeFileNoExt] === undefined) { throw new NowBuildError({ code: 'NEXT__UNKNOWN_ROUTE_KEY', message: `invariant: unknown lambda ${routeKey} (lookup: ${routeFileNoExt}) | please report this immediately`, }); } delete lambdas[routeFileNoExt]; }); } const mergedDataRoutesLambdaRoutes = []; const mergedDynamicRoutesLambdaRoutes = []; if (isSharedLambdas) { // we need to define the page lambda route immediately after // the dynamic route in handle: 'rewrite' so that a matching // dynamic route doesn't catch it before the page lambda route // e.g. /teams/[team]/[inviteCode] -> page lambda // but we also have /[teamSlug]/[project]/[id] which could match it first for (let i = 0; i < dynamicRoutes.length; i++) { const route = dynamicRoutes[i]; mergedDynamicRoutesLambdaRoutes.push(route); const { pathname } = url.parse(route.dest!); if (pathname && pageLambdaMap[pathname]) { mergedDynamicRoutesLambdaRoutes.push( dynamicPageLambdaRoutesMap[pathname] ); } } for (let i = 0; i < dataRoutes.length; i++) { const route = dataRoutes[i]; mergedDataRoutesLambdaRoutes.push(route); const { pathname } = url.parse(route.dest!); if ( pathname && pageLambdaMap[pathname] && dynamicPageLambdaRoutesMap[pathname] ) { mergedDataRoutesLambdaRoutes.push(dynamicPageLambdaRoutesMap[pathname]); } } } const { i18n } = routesManifest || {}; const trailingSlashRedirects: Route[] = []; redirects = redirects.filter(_redir => { const redir = _redir as Source; // detect the trailing slash redirect and make sure it's // kept above the wildcard mapping to prevent erroneous redirects // since non-continue routes come after continue the $wildcard // route will come before the redirect otherwise and if the // redirect is triggered it breaks locale mapping const location = redir.headers && (redir.headers.location || redir.headers.Location); if (redir.status === 308 && (location === '/$1' || location === '/$1/')) { // we set continue here to prevent the redirect from // moving underneath i18n routes redir.continue = true; trailingSlashRedirects.push(redir); return false; } return true; }); return { output: { ...publicDirectoryFiles, ...lambdas, // Prerenders may override Lambdas -- this is an intentional behavior. ...prerenders, ...staticPages, ...staticFiles, ...staticDirectoryFiles, }, wildcard: i18n?.domains ? i18n?.domains.map(item => { return { domain: item.domain, value: item.defaultLocale === i18n.defaultLocale ? '' : `/${item.defaultLocale}`, }; }) : undefined, images: imagesManifest?.images?.loader === 'default' ? { domains: imagesManifest.images.domains, sizes: imagesManifest.images.sizes, formats: imagesManifest.images.formats, dangerouslyAllowSVG: imagesManifest.images.dangerouslyAllowSVG, contentSecurityPolicy: imagesManifest.images.contentSecurityPolicy, } : undefined, /* Desired routes order - Runtime headers - User headers and redirects - Runtime redirects - Runtime routes - Check filesystem, if nothing found continue - User rewrites - Builder rewrites */ routes: [ // force trailingSlashRedirect to the very top so it doesn't // conflict with i18n routes that don't have or don't have the // trailing slash ...trailingSlashRedirects, ...(i18n ? [ // Handle auto-adding current default locale to path based on // $wildcard { src: `^${path.join( '/', entryDirectory, '/' )}(?!(?:_next/.*|${i18n.locales .map(locale => escapeStringRegexp(locale)) .join('|')})(?:/.*|$))(.*)$`, // we aren't able to ensure trailing slash mode here // so ensure this comes after the trailing slash redirect dest: '$wildcard/$1', continue: true, }, // Handle redirecting to locale specific domains ...(i18n.domains && i18n.localeDetection !== false ? [ { src: `^${path.join( '/', entryDirectory )}/?(?:${i18n.locales .map(locale => escapeStringRegexp(locale)) .join('|')})?/?$`, locale: { redirect: i18n.domains.reduce( (prev: Record, item) => { prev[item.defaultLocale] = `http${ item.http ? '' : 's' }://${item.domain}/`; if (item.locales) { item.locales.map(locale => { prev[locale] = `http${item.http ? '' : 's'}://${ item.domain }/${locale}`; }); } return prev; }, {} ), cookie: 'NEXT_LOCALE', }, continue: true, }, ] : []), // Handle redirecting to locale paths ...(i18n.localeDetection !== false ? [ { // TODO: if default locale is included in this src it won't // be visitable by users who prefer another language since a // cookie isn't set signaling the default locale is // preferred on redirect currently, investigate adding this src: '/', locale: { redirect: i18n.locales.reduce( (prev: Record, locale) => { prev[locale] = locale === i18n.defaultLocale ? `/` : `/${locale}`; return prev; }, {} ), cookie: 'NEXT_LOCALE', }, continue: true, }, ] : []), { src: `^${path.join('/', entryDirectory)}$`, dest: `/${i18n.defaultLocale}`, continue: true, }, // Auto-prefix non-locale path with default locale // note for prerendered pages this will cause // x-now-route-matches to contain the path minus the locale // e.g. for /de/posts/[slug] x-now-route-matches would have // 1=posts%2Fpost-1 { src: `^${path.join( '/', entryDirectory, '/' )}(?!(?:_next/.*|${i18n.locales .map(locale => escapeStringRegexp(locale)) .join('|')})(?:/.*|$))(.*)$`, dest: `/${i18n.defaultLocale}/$1`, continue: true, }, ] : []), // headers ...headers, // redirects ...redirects, // Make sure to 404 for the /404 path itself ...(i18n ? [ { src: `${path.join( '/', entryDirectory, '/' )}(?:${i18n.locales .map(locale => escapeStringRegexp(locale)) .join('|')})?[/]?404`, status: 404, continue: true, }, ] : [ { src: path.join('/', entryDirectory, '404'), status: 404, continue: true, }, ]), // Next.js page lambdas, `static/` folder, reserved assets, and `public/` // folder { handle: 'filesystem' }, // map pages to their lambda ...pageLambdaRoutes.filter(route => { // filter out any SSG pages as they are already present in output if ('headers' in route) { let page = route.headers?.['x-nextjs-page']!; page = page === '/index' ? '/' : page; if ( prerenderManifest.staticRoutes[page] || prerenderManifest.fallbackRoutes[page] || prerenderManifest.blockingFallbackRoutes[page] ) { return false; } } return true; }), // These need to come before handle: miss or else they are grouped // with that routing section ...rewrites, // make sure 404 page is used when a directory is matched without // an index page { handle: 'resource' }, { src: path.join('/', entryDirectory, '.*'), status: 404 }, // We need to make sure to 404 for /_next after handle: miss since // handle: miss is called before rewrites and to prevent rewriting /_next { handle: 'miss' }, { src: path.join( '/', entryDirectory, '_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|media)/.+' ), status: 404, check: true, dest: '$0', }, // remove locale prefixes to check public files ...(i18n ? [ { src: `^${path.join( '/', entryDirectory )}/?(?:${i18n.locales .map(locale => escapeStringRegexp(locale)) .join('|')})/(.*)`, dest: `${path.join('/', entryDirectory, '/')}$1`, check: true, }, ] : []), // for non-shared lambdas remove locale prefix if present // to allow checking for lambda ...(isSharedLambdas || !i18n ? [] : [ { src: `${path.join( '/', entryDirectory, '/' )}(?:${i18n?.locales .map(locale => escapeStringRegexp(locale)) .join('|')})/(.*)`, dest: '/$1', check: true, }, ]), // routes that are called after each rewrite or after routes // if there no rewrites { handle: 'rewrite' }, // /_next/data routes for getServerProps/getStaticProps pages ...(isSharedLambdas ? mergedDataRoutesLambdaRoutes : dataRoutes), // re-check page routes to map them to the lambda ...pageLambdaRoutes, // Dynamic routes (must come after dataRoutes as dataRoutes are more // specific) ...(isSharedLambdas ? mergedDynamicRoutesLambdaRoutes : dynamicRoutes), // routes to call after a file has been matched { handle: 'hit' }, // Before we handle static files we need to set proper caching headers { // This ensures we only match known emitted-by-Next.js files and not // user-emitted files which may be missing a hash in their filename. src: path.join( '/', entryDirectory, `_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|media|${escapedBuildId})/.+` ), // Next.js assets contain a hash or entropy in their filenames, so they // are guaranteed to be unique and cacheable indefinitely. headers: { 'cache-control': `public,max-age=${MAX_AGE_ONE_YEAR},immutable`, }, continue: true, important: true, }, // error handling ...(isLegacy ? [] : [ // Custom Next.js 404 page { handle: 'error' } as Handler, ...(i18n && static404Page ? [ { src: `${path.join( '/', entryDirectory, '/' )}(?${i18n.locales .map(locale => escapeStringRegexp(locale)) .join('|')})(/.*|$)`, dest: '/$nextLocale/404', status: 404, }, { src: path.join('/', entryDirectory, '.*'), dest: `/${i18n.defaultLocale}/404`, status: 404, }, ] : [ isSharedLambdas ? { src: path.join('/', entryDirectory, '.*'), // if static 404 is not present but we have pages/404.js // it is a lambda due to _app getInitialProps dest: path.join( '/', (static404Page ? static404Page : pageLambdaMap[page404Path]) as string ), status: 404, ...(static404Page ? {} : { headers: { 'x-nextjs-page': page404Path, }, }), } : { src: path.join('/', entryDirectory, '.*'), // if static 404 is not present but we have pages/404.js // it is a lambda due to _app getInitialProps dest: static404Page ? path.join('/', static404Page) : path.join( '/', entryDirectory, hasPages404 && lambdas[path.join('./', entryDirectory, '404')] ? '404' : '_error' ), status: 404, }, ]), ]), ], watch: [], childProcesses: [], }; } export const prepareCache = async ({ workPath, entrypoint, config = {}, }: PrepareCacheOptions): Promise => { debug('Preparing cache...'); const entryDirectory = path.dirname(entrypoint); const entryPath = path.join(workPath, entryDirectory); const outputDirectory = config.outputDirectory || '.next'; const nextVersionRange = await getNextVersionRange(entryPath); const isLegacy = nextVersionRange && isLegacyNext(nextVersionRange); if (isLegacy) { // skip caching legacy mode (swapping deps between all and production can get bug-prone) return {}; } debug('Producing cache file manifest...'); const cacheEntrypoint = path.relative(workPath, entryPath); const cache = { ...(await glob(path.join(cacheEntrypoint, 'node_modules/**'), workPath)), ...(await glob( path.join(cacheEntrypoint, outputDirectory, 'cache/**'), workPath )), }; debug('Cache file manifest produced'); return cache; }; ================================================ FILE: packages/runtime/src/legacy-launcher.ts ================================================ import { Server } from 'http'; import next from 'next-server'; import url from 'url'; import { Bridge } from './now__bridge'; if (!process.env.NODE_ENV) { const region = process.env.VERCEL_REGION || process.env.NOW_REGION; process.env.NODE_ENV = region === 'dev1' ? 'development' : 'production'; } const app = next({}); const server = new Server((req, res) => { const parsedUrl = url.parse(req.url || '', true); app.render(req, res, 'PATHNAME_PLACEHOLDER', parsedUrl.query, parsedUrl); }); const bridge = new Bridge(server); bridge.listen(); exports.launcher = bridge.launcher; ================================================ FILE: packages/runtime/src/legacy-versions.ts ================================================ export default [ '0.1.0', '0.1.1', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.2.10', '0.2.11', '0.2.12', '0.2.13', '0.2.14', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.4.0', '0.4.1', '0.9.9', '0.9.10', '0.9.11', '1.0.0', '1.0.1', '1.0.2', '1.1.0', '1.1.1', '1.1.2', '1.2.0', '1.2.1', '1.2.2', '1.2.3', '2.0.0-beta.0', '2.0.0-beta.1', '2.0.0-beta.2', '2.0.0-beta.3', '2.0.0-beta.4', '2.0.0-beta.5', '2.0.0-beta.6', '2.0.0-beta.7', '2.0.0-beta.8', '2.0.0-beta.9', '2.0.0-beta.10', '2.0.0-beta.11', '2.0.0-beta.12', '2.0.0-beta.13', '2.0.0-beta.14', '2.0.0-beta.15', '2.0.0-beta.16', '2.0.0-beta.17', '2.0.0-beta.18', '2.0.0-beta.19', '2.0.0-beta.20', '2.0.0-beta.21', '2.0.0-beta.22', '2.0.0-beta.23', '2.0.0-beta.24', '2.0.0-beta.25', '2.0.0-beta.26', '2.0.0-beta.27', '2.0.0-beta.28', '2.0.0-beta.29', '2.0.0-beta.30', '2.0.0-beta.31', '2.0.0-beta.32', '2.0.0-beta.33', '2.0.0-beta.34', '2.0.0-beta.35', '2.0.0-beta.36', '2.0.0-beta.37', '2.0.0-beta.38', '2.0.0-beta.39', '2.0.0-beta.40', '2.0.0-beta.41', '2.0.0-beta.42', '2.0.0', '2.0.1', '2.1.0', '2.1.1', '2.2.0', '2.3.0-alpha1', '2.3.0', '2.3.1', '2.4.0', '2.4.1', '2.4.2', '2.4.3', '2.4.4', '2.4.5', '2.4.6', '2.4.7', '2.4.8', '2.4.9', '3.0.0-beta1', '3.0.0-beta10', '3.0.0-beta11', '3.0.0-beta12', '3.0.0-beta13', '3.0.0-beta14', '3.0.0-beta15', '3.0.0-beta16', '3.0.0-beta2', '3.0.0-beta3', '3.0.0-beta4', '3.0.0-beta5', '3.0.0-beta6', '3.0.0-beta7', '3.0.0-beta8', '3.0.0-beta9', '3.0.1-beta.1', '3.0.1-beta.2', '3.0.1-beta.3', '3.0.1-beta.4', '3.0.1-beta.5', '3.0.1-beta.6', '3.0.1-beta.7', '3.0.1-beta.8', '3.0.1-beta.9', '3.0.1-beta.10', '3.0.1-beta.11', '3.0.1-beta.12', '3.0.1-beta.13', '3.0.1-beta.14', '3.0.1-beta.15', '3.0.1-beta.16', '3.0.1-beta.17', '3.0.1-beta.18', '3.0.1-beta.19', '3.0.1-beta.20', '3.0.1-beta.21', '3.0.1', '3.0.2', '3.0.3', '3.0.4', '3.0.5', '3.0.6', '3.1.0', '3.2.0', '3.2.1', '3.2.2', '3.2.3', '4.0.0-beta.1', '4.0.0-beta.2', '4.0.0-beta.3', '4.0.0-beta.4', '4.0.0-beta.5', '4.0.0-beta.6', '4.0.0', '4.0.1', '4.0.2', '4.0.3', '4.0.4', '4.0.5', '4.1.0', '4.1.1', '4.1.2', '4.1.3', '4.1.4-canary.1', '4.1.4-canary.2', '4.1.4', '4.2.0-canary.1', '4.2.0-zones.2', '4.2.0', '4.2.1', '4.2.2', '4.2.3', '4.3.0-canary.1', '4.3.0-universal-alpha.1', '4.3.0-universal-alpha.2', '4.3.0-universal-alpha.3', '4.3.0-universal-alpha.4', '4.3.0-zones.1', '4.4.0-canary.2', '4.4.0-canary.3', '5.0.0-universal-alpha.1', '5.0.0-universal-alpha.2', '5.0.0-universal-alpha.3', '5.0.0-universal-alpha.4', '5.0.0-universal-alpha.5', '5.0.0-universal-alpha.6', '5.0.0-universal-alpha.7', '5.0.0-universal-alpha.8', '5.0.0-universal-alpha.9', '5.0.0-universal-alpha.10', '5.0.0-universal-alpha.11', '5.0.0-universal-alpha.12', '5.0.0-universal-alpha.13', '5.0.0-universal-alpha.14', '5.0.0-universal-alpha.15', '5.0.0-universal-alpha.16', '5.0.0-universal-alpha.17', '5.0.0-universal-alpha.18', '5.0.0-universal-alpha.19', '5.0.0-universal-alpha.20', '5.0.0-universal-alpha.21', '5.0.0-universal-alpha.22', '5.0.0-universal-alpha.23', '5.0.0-zones.1', '5.0.0', '5.0.1-canary.1', '5.0.1-canary.2', '5.0.1-canary.3', '5.0.1-canary.4', '5.0.1-canary.5', '5.0.1-canary.6', '5.0.1-canary.7', '5.0.1-canary.8', '5.0.1-canary.9', '5.0.1-canary.10', '5.0.1-canary.11', '5.0.1-canary.12', '5.0.1-canary.13', '5.0.1-canary.14', '5.0.1-canary.15', '5.0.1-canary.16', '5.0.1-canary.17', '5.1.0', '6.0.0-canary.1', '6.0.0-canary.2', '6.0.0-canary.3', '6.0.0-canary.4', '6.0.0-canary.5', '6.0.0-canary.6', '6.0.0-canary.7', '6.0.0', '6.0.1-canary.0', '6.0.1-canary.1', '6.0.1-canary.2', '6.0.1', '6.0.2-canary.0', '6.0.2', '6.0.3-canary.0', '6.0.3-canary.1', '6.0.3', '6.0.4-canary.0', '6.0.4-canary.1', '6.0.4-canary.2', '6.0.4-canary.3', '6.0.4-canary.4', '6.0.4-canary.5', '6.0.4-canary.6', '6.0.4-canary.7', '6.0.4-canary.8', '6.0.4-canary.9', '6.1.0-canary.0', '6.1.0', '6.1.1-canary.0', '6.1.1-canary.1', '6.1.1-canary.2', '6.1.1-canary.3', '6.1.1-canary.4', '6.1.1-canary.5', '6.1.1', '6.1.2', '7.0.0-canary.0', '7.0.0-canary.1', '7.0.0-canary.2', '7.0.0-canary.3', '7.0.0-canary.4', '7.0.0-canary.5', '7.0.0-canary.6', '7.0.0-canary.7', '7.0.0-canary.8', '7.0.0-canary.9', '7.0.0-canary.10', '7.0.0-canary.11', '7.0.0-canary.12', '7.0.0-canary.13', '7.0.0-canary.14', '7.0.0-canary.15', '7.0.0-canary.16', '7.0.0-canary.18', '7.0.0-canary.19', '7.0.0-canary.20', '7.0.0', '7.0.1-canary.0', '7.0.1-canary.1', '7.0.1-canary.2', '7.0.1-canary.3', '7.0.1-canary.4', '7.0.1-canary.5', '7.0.1-canary.6', '7.0.1', '7.0.2-alpha.1', '7.0.2-alpha.3', '7.0.2-canary.5', '7.0.2-canary.6', '7.0.2-canary.7', '7.0.2-canary.8', '7.0.2-canary.9', '7.0.2-canary.10', '7.0.2-canary.11', '7.0.2-canary.12', '7.0.2-canary.13', '7.0.2-canary.14', '7.0.2-canary.15', '7.0.2-canary.16', '7.0.2-canary.17', '7.0.2-canary.18', '7.0.2-canary.19', '7.0.2-canary.20', '7.0.2-canary.21', '7.0.2-canary.22', '7.0.2-canary.23', '7.0.2-canary.24', '7.0.2-canary.25', '7.0.2-canary.26', '7.0.2-canary.27', '7.0.2-canary.28', '7.0.2-canary.29', '7.0.2-canary.31', '7.0.2-canary.33', '7.0.2-canary.34', '7.0.2-canary.35', '7.0.2-canary.36', '7.0.2-canary.37', '7.0.2-canary.38', '7.0.2-canary.39', '7.0.2-canary.40', '7.0.2-canary.41', '7.0.2-canary.42', '7.0.2-canary.43', '7.0.2-canary.44', '7.0.2-canary.45', '7.0.2-canary.46', '7.0.2-canary.47', '7.0.2-canary.48', '7.0.2-canary.49', '7.0.2-canary.50', '7.0.2', ]; ================================================ FILE: packages/runtime/src/templated-launcher-shared.ts ================================================ // The Next.js builder can emit the project in a subdirectory depending on how // many folder levels of `node_modules` are traced. To ensure `process.cwd()` // returns the proper path, we change the directory to the folder with the // launcher. This mimics `yarn workspace run` behavior. process.chdir(__dirname); if (!process.env.NODE_ENV) { const region = process.env.VERCEL_REGION || process.env.NOW_REGION; process.env.NODE_ENV = region === 'dev1' ? 'development' : 'production'; } import { Server } from 'http'; import { Bridge } from './now__bridge'; // eslint-disable-next-line let page: any = {}; // __LAUNCHER_PAGE_HANDLER__ // page.render is for React rendering // page.default is for /api rendering // page is for module.exports in /api const server = new Server(page.render || page.default || page); const bridge = new Bridge(server); bridge.listen(); exports.launcher = bridge.launcher; ================================================ FILE: packages/runtime/src/templated-launcher.ts ================================================ // The Next.js builder can emit the project in a subdirectory depending on how // many folder levels of `node_modules` are traced. To ensure `process.cwd()` // returns the proper path, we change the directory to the folder with the // launcher. This mimics `yarn workspace run` behavior. process.chdir(__dirname); if (!process.env.NODE_ENV) { const region = process.env.VERCEL_REGION || process.env.NOW_REGION; process.env.NODE_ENV = region === 'dev1' ? 'development' : 'production'; } import { Server } from 'http'; import { Bridge } from './now__bridge'; // @ts-ignore // eslint-disable-next-line @typescript-eslint/no-var-requires const page = require(__LAUNCHER_PAGE_PATH__); // page.render is for React rendering // page.default is for /api rendering // page is for module.exports in /api const server = new Server(page.render || page.default || page); const bridge = new Bridge(server); bridge.listen(); exports.launcher = bridge.launcher; ================================================ FILE: packages/runtime/src/utils.ts ================================================ import { FileFsRef, Files, isSymbolicLink, Lambda, NowBuildError, streamToBuffer, } from '@vercel/build-utils'; import { NowHeader, NowRewrite, Route, Source } from '@vercel/routing-utils'; import { Sema } from 'async-sema'; import crc32 from 'buffer-crc32'; import fs from 'fs-extra'; import path from 'path'; import resolveFrom from 'resolve-from'; import semver from 'semver'; import { ZipFile } from 'yazl'; import zlib from 'zlib'; type stringMap = { [key: string]: string }; export interface EnvConfig { [name: string]: string | undefined; } // Identify /[param]/ in route string // eslint-disable-next-line no-useless-escape const TEST_DYNAMIC_ROUTE = /\/\[[^\/]+?\](?=\/|$)/; function isDynamicRoute(route: string): boolean { route = route.startsWith('/') ? route : `/${route}`; return TEST_DYNAMIC_ROUTE.test(route); } /** * Validate if the entrypoint is allowed to be used */ function validateEntrypoint(entrypoint: string) { if ( !/package\.json$/.exec(entrypoint) && !/next\.config\.js$/.exec(entrypoint) ) { throw new NowBuildError({ message: 'Specified "src" for "@vercel/next" has to be "package.json" or "next.config.js"', code: 'NEXT_INCORRECT_SRC', }); } } /** * Exclude certain files from the files object */ function excludeFiles( files: Files, matcher: (filePath: string) => boolean ): Files { return Object.keys(files).reduce((newFiles, filePath) => { if (matcher(filePath)) { return newFiles; } return { ...newFiles, [filePath]: files[filePath], }; }, {}); } /** * Exclude package manager lockfiles from files */ function excludeLockFiles(files: Files): Files { const newFiles = files; if (newFiles['package-lock.json']) { delete newFiles['package-lock.json']; } if (newFiles['yarn.lock']) { delete newFiles['yarn.lock']; } return files; } /** * Enforce specific package.json configuration for smallest possible lambda */ function normalizePackageJson( defaultPackageJson: { dependencies?: stringMap; devDependencies?: stringMap; scripts?: stringMap; } = {} ) { const dependencies: stringMap = {}; const devDependencies: stringMap = { ...defaultPackageJson.dependencies, ...defaultPackageJson.devDependencies, }; if (devDependencies.react) { dependencies.react = devDependencies.react; delete devDependencies.react; } if (devDependencies['react-dom']) { dependencies['react-dom'] = devDependencies['react-dom']; delete devDependencies['react-dom']; } delete devDependencies['next-server']; return { ...defaultPackageJson, dependencies: { // react and react-dom can be overwritten react: 'latest', 'react-dom': 'latest', ...dependencies, // override react if user provided it // next-server is forced to canary 'next-server': 'v7.0.2-canary.49', }, devDependencies: { ...devDependencies, // next is forced to canary next: 'v7.0.2-canary.49', }, scripts: { ...defaultPackageJson.scripts, 'now-build': 'NODE_OPTIONS=--max_old_space_size=3000 next build --lambdas', }, }; } async function getNextConfig(workPath: string, entryPath: string) { const entryConfig = path.join(entryPath, './next.config.js'); if (await fs.pathExists(entryConfig)) { return fs.readFile(entryConfig, 'utf8'); } const workConfig = path.join(workPath, './next.config.js'); if (await fs.pathExists(workConfig)) { return fs.readFile(workConfig, 'utf8'); } return null; } function pathIsInside(firstPath: string, secondPath: string) { return !path.relative(firstPath, secondPath).startsWith('..'); } function getPathsInside(entryDirectory: string, files: Files) { const watch: string[] = []; for (const file of Object.keys(files)) { // If the file is outside of the entrypoint directory, we do // not want to monitor it for changes. if (!pathIsInside(entryDirectory, file)) { continue; } watch.push(file); } return watch; } function normalizePage(page: string): string { // Resolve on anything that doesn't start with `/` if (!page.startsWith('/')) { page = `/${page}`; } // remove '/index' from the end page = page.replace(/\/index$/, '/'); return page; } async function getRoutes( entryPath: string, entryDirectory: string, pathsInside: string[], files: Files, url: string ): Promise { let pagesDir = ''; const filesInside: Files = {}; const prefix = entryDirectory === `.` ? `/` : `/${entryDirectory}/`; const fileKeys = Object.keys(files); for (const file of fileKeys) { if (!pathsInside.includes(file)) { continue; } if (!pagesDir) { if (file.startsWith(path.join(entryDirectory, 'pages'))) { pagesDir = 'pages'; } } filesInside[file] = files[file]; } // If default pages dir isn't found check for `src/pages` if ( !pagesDir && fileKeys.some(file => file.startsWith(path.join(entryDirectory, 'src/pages')) ) ) { pagesDir = 'src/pages'; } const routes: Route[] = [ { src: `${prefix}_next/(.*)`, dest: `${url}/_next/$1`, }, { src: `${prefix}static/(.*)`, dest: `${url}/static/$1`, }, ]; const filePaths = Object.keys(filesInside); const dynamicPages = []; for (const file of filePaths) { const relativePath = path.relative(entryDirectory, file); const isPage = pathIsInside(pagesDir, relativePath); if (!isPage) { continue; } const relativeToPages = path.relative(pagesDir, relativePath); const extension = path.extname(relativeToPages); const pageName = relativeToPages.replace(extension, '').replace(/\\/g, '/'); if (pageName.startsWith('_')) { continue; } if (isDynamicRoute(pageName)) { dynamicPages.push(normalizePage(pageName)); continue; } routes.push({ src: `${prefix}${pageName}`, dest: `${url}/${pageName}`, }); if (pageName.endsWith('index')) { const resolvedIndex = pageName.replace('/index', '').replace('index', ''); routes.push({ src: `${prefix}${resolvedIndex}`, dest: `${url}/${resolvedIndex}`, }); } } routes.push( ...(await getDynamicRoutes( entryPath, entryDirectory, dynamicPages, true ).then(arr => arr.map((route: Source) => { // convert to make entire RegExp match as one group route.src = route.src .replace('^', `^${prefix}(`) .replace('(\\/', '(') .replace('$', ')$'); route.dest = `${url}/$1`; return route; }) )) ); // Add public folder routes for (const file of filePaths) { const relativePath = path.relative(entryDirectory, file); const isPublic = pathIsInside('public', relativePath); if (!isPublic) continue; const fileName = path.relative('public', relativePath); const route: Source = { src: `${prefix}${fileName}`, dest: `${url}/${fileName}`, }; // Only add the route if a page is not already using it if (!routes.some(r => (r as Source).src === route.src)) { routes.push(route); } } return routes; } // TODO: update to use type from `@vercel/routing-utils` after // adding permanent: true/false handling export type Redirect = NowRewrite & { statusCode?: number; permanent?: boolean; }; type RoutesManifestRegex = { regex: string; regexKeys: string[]; }; export type RoutesManifest = { pages404: boolean; basePath: string | undefined; redirects: (Redirect & RoutesManifestRegex)[]; rewrites: (NowRewrite & RoutesManifestRegex)[]; headers?: (NowHeader & RoutesManifestRegex)[]; dynamicRoutes: { page: string; regex: string; namedRegex?: string; routeKeys?: { [named: string]: string }; }[]; version: number; dataRoutes?: Array<{ page: string; dataRouteRegex: string; namedDataRouteRegex?: string; routeKeys?: { [named: string]: string }; }>; i18n?: { localeDetection?: boolean; defaultLocale: string; locales: string[]; domains?: Array<{ http?: boolean; domain: string; locales?: string[]; defaultLocale: string; }>; }; }; export async function getRoutesManifest( entryPath: string, outputDirectory: string, nextVersion?: string ): Promise { const shouldHaveManifest = nextVersion && semver.gte(nextVersion, '9.1.4-canary.0'); if (!shouldHaveManifest) return; const pathRoutesManifest = path.join( entryPath, outputDirectory, 'routes-manifest.json' ); const hasRoutesManifest = await fs .access(pathRoutesManifest) .then(() => true) .catch(() => false); if (shouldHaveManifest && !hasRoutesManifest) { throw new NowBuildError({ message: `A "routes-manifest.json" couldn't be found. This is normally caused by a misconfiguration in your project.\n` + 'Please check the following, and reach out to support if you cannot resolve the problem:\n' + ' 1. If present, be sure your `build` script in "package.json" calls `next build`.' + ' 2. Navigate to your project\'s settings in the Vercel dashboard, and verify that the "Build Command" is not overridden, or that it calls `next build`.' + ' 3. Navigate to your project\'s settings in the Vercel dashboard, and verify that the "Output Directory" is not overridden. Note that `next export` does **not** require you change this setting, even if you customize the `next export` output directory.', link: 'https://err.sh/vercel/vercel/now-next-routes-manifest', code: 'NEXT_NO_ROUTES_MANIFEST', }); } // eslint-disable-next-line @typescript-eslint/no-var-requires const routesManifest: RoutesManifest = require(pathRoutesManifest); // remove temporary array based routeKeys from v1/v2 of routes // manifest since it can result in invalid routes for (const route of routesManifest.dataRoutes || []) { if (Array.isArray(route.routeKeys)) { delete route.routeKeys; delete route.namedDataRouteRegex; } } for (const route of routesManifest.dynamicRoutes || []) { if (Array.isArray(route.routeKeys)) { delete route.routeKeys; delete route.namedRegex; } } return routesManifest; } export async function getDynamicRoutes( entryPath: string, entryDirectory: string, dynamicPages: string[], isDev?: boolean, routesManifest?: RoutesManifest, omittedRoutes?: Set ): Promise { if (!dynamicPages.length) { return []; } if (routesManifest) { switch (routesManifest.version) { case 1: case 2: { return routesManifest.dynamicRoutes .filter(({ page }) => omittedRoutes ? !omittedRoutes.has(page) : true ) .map(({ page, regex }: { page: string; regex: string }) => { return { src: regex, dest: !isDev ? path.join('/', entryDirectory, page) : page, check: true, }; }); } case 3: case 4: { return routesManifest.dynamicRoutes .filter(({ page }) => omittedRoutes ? !omittedRoutes.has(page) : true ) .map(({ page, namedRegex, regex, routeKeys }) => { return { src: namedRegex || regex, dest: `${!isDev ? path.join('/', entryDirectory, page) : page}${ routeKeys ? `?${Object.keys(routeKeys) .map(key => `${routeKeys[key]}=$${key}`) .join('&')}` : '' }`, check: true, }; }); } default: { // update MIN_ROUTES_MANIFEST_VERSION throw new NowBuildError({ message: 'This version of `@vercel/next` does not support the version of Next.js you are trying to deploy.\n' + 'Please upgrade your `@vercel/next` builder and try again. Contact support if this continues to happen.', code: 'NEXT_VERSION_UPGRADE', }); } } } // FALLBACK: // When `routes-manifest.json` does not exist (old Next.js versions), we'll try to // require the methods we need from Next.js' internals. let getRouteRegex: | ((pageName: string) => { re: RegExp }) | undefined = undefined; let getSortedRoutes: ((normalizedPages: string[]) => string[]) | undefined; try { ({ getRouteRegex, getSortedRoutes } = require(resolveFrom( entryPath, 'next-server/dist/lib/router/utils' ))); if (typeof getRouteRegex !== 'function') { getRouteRegex = undefined; } } catch (_) {} // eslint-disable-line no-empty if (!getRouteRegex || !getSortedRoutes) { try { ({ getRouteRegex, getSortedRoutes } = require(resolveFrom( entryPath, 'next/dist/next-server/lib/router/utils' ))); if (typeof getRouteRegex !== 'function') { getRouteRegex = undefined; } } catch (_) {} // eslint-disable-line no-empty } if (!getRouteRegex || !getSortedRoutes) { throw new NowBuildError({ message: 'Found usage of dynamic routes but not on a new enough version of Next.js.', code: 'NEXT_DYNAMIC_ROUTES_OUTDATED', }); } const pageMatchers = getSortedRoutes(dynamicPages).map(pageName => ({ pageName, matcher: getRouteRegex && getRouteRegex(pageName).re, })); const routes: Source[] = []; pageMatchers.forEach(pageMatcher => { // in `vercel dev` we don't need to prefix the destination const dest = !isDev ? path.join('/', entryDirectory, pageMatcher.pageName) : pageMatcher.pageName; if (pageMatcher && pageMatcher.matcher) { routes.push({ src: pageMatcher.matcher.source, dest, check: !isDev, }); } }); return routes; } type LoaderKey = 'imgix' | 'cloudinary' | 'akamai' | 'default'; type ImagesManifest = { version: number; images: { loader: LoaderKey; sizes: number[]; domains: string[]; formats?: string[] | undefined; minimumCacheTTL?: number | undefined; dangerouslyAllowSVG?: boolean | undefined; contentSecurityPolicy?: string | undefined; }; }; export async function getImagesManifest( entryPath: string, outputDirectory: string ): Promise { const pathImagesManifest = path.join( entryPath, outputDirectory, 'images-manifest.json' ); const hasImagesManifest = await fs .access(pathImagesManifest) .then(() => true) .catch(() => false); if (!hasImagesManifest) { return undefined; } // eslint-disable-next-line @typescript-eslint/no-var-requires const imagesManifest: ImagesManifest = require(pathImagesManifest); return imagesManifest; } function syncEnvVars(base: EnvConfig, removeEnv: EnvConfig, addEnv: EnvConfig) { // Remove any env vars from `removeEnv` // that are not present in the `addEnv` const addKeys = new Set(Object.keys(addEnv)); for (const name of Object.keys(removeEnv)) { if (!addKeys.has(name)) { delete base[name]; } } // Add in the keys from `addEnv` Object.assign(base, addEnv); } export const ExperimentalTraceVersion = `9.0.4-canary.1`; export type PseudoLayer = { [fileName: string]: PseudoFile | PseudoSymbolicLink; }; export type PseudoFile = { isSymlink: false; crc32: number; compBuffer: Buffer; uncompressedSize: number; mode: number; }; export type PseudoSymbolicLink = { isSymlink: true; file: FileFsRef; symlinkTarget: string; }; const compressBuffer = (buf: Buffer): Promise => { return new Promise((resolve, reject) => { zlib.deflateRaw( buf, { level: zlib.constants.Z_BEST_COMPRESSION }, (err, compBuf) => { if (err) return reject(err); resolve(compBuf); } ); }); }; export type PseudoLayerResult = { pseudoLayer: PseudoLayer; pseudoLayerBytes: number; }; export async function createPseudoLayer(files: { [fileName: string]: FileFsRef; }): Promise { const pseudoLayer: PseudoLayer = {}; let pseudoLayerBytes = 0; for (const fileName of Object.keys(files)) { const file = files[fileName]; if (isSymbolicLink(file.mode)) { const symlinkTarget = await fs.readlink(file.fsPath); pseudoLayer[fileName] = { file, isSymlink: true, symlinkTarget, }; } else { const origBuffer = await streamToBuffer(file.toStream()); const compBuffer = await compressBuffer(origBuffer); pseudoLayerBytes += compBuffer.byteLength; pseudoLayer[fileName] = { compBuffer, isSymlink: false, crc32: crc32.unsigned(origBuffer), uncompressedSize: origBuffer.byteLength, mode: file.mode, }; } } return { pseudoLayer, pseudoLayerBytes }; } interface CreateLambdaFromPseudoLayersOptions { files: Files; layers: PseudoLayer[]; handler: string; runtime: string; memory?: number; maxDuration?: number; environment?: { [name: string]: string }; } // measured with 1, 2, 5, 10, and `os.cpus().length || 5` // and sema(1) produced the best results const createLambdaSema = new Sema(1); export async function createLambdaFromPseudoLayers({ files, layers, handler, runtime, memory, maxDuration, environment = {}, }: CreateLambdaFromPseudoLayersOptions) { await createLambdaSema.acquire(); const zipFile = new ZipFile(); const addedFiles = new Set(); const names = Object.keys(files).sort(); const symlinkTargets = new Map(); for (const name of names) { const file = files[name]; if (file.mode && isSymbolicLink(file.mode) && file.type === 'FileFsRef') { const symlinkTarget = await fs.readlink((file as FileFsRef).fsPath); symlinkTargets.set(name, symlinkTarget); } } // apply pseudo layers (already compressed objects) for (const layer of layers) { for (const seedKey of Object.keys(layer)) { const item = layer[seedKey]; if (item.isSymlink) { const { symlinkTarget, file } = item; zipFile.addBuffer(Buffer.from(symlinkTarget, 'utf8'), seedKey, { mode: file.mode, }); continue; } const { compBuffer, crc32, uncompressedSize, mode } = item; // @ts-ignore: `addDeflatedBuffer` is a valid function, but missing on the type zipFile.addDeflatedBuffer(compBuffer, seedKey, { crc32, uncompressedSize, mode: mode, }); addedFiles.add(seedKey); } } for (const fileName of Object.keys(files)) { // was already added in a pseudo layer if (addedFiles.has(fileName)) continue; const file = files[fileName]; const symlinkTarget = symlinkTargets.get(fileName); if (typeof symlinkTarget === 'string') { zipFile.addBuffer(Buffer.from(symlinkTarget, 'utf8'), fileName, { mode: file.mode, }); } else { const fileBuffer = await streamToBuffer(file.toStream()); zipFile.addBuffer(fileBuffer, fileName); } } zipFile.end(); const zipBuffer = await streamToBuffer(zipFile.outputStream); createLambdaSema.release(); return new Lambda({ handler, runtime, zipBuffer, memory, maxDuration, environment, }); } export type NextPrerenderedRoutes = { bypassToken: string | null; staticRoutes: { [route: string]: { initialRevalidate: number | false; dataRoute: string; srcRoute: string | null; }; }; blockingFallbackRoutes: { [route: string]: { routeRegex: string; dataRoute: string; dataRouteRegex: string; }; }; fallbackRoutes: { [route: string]: { fallback: string; routeRegex: string; dataRoute: string; dataRouteRegex: string; }; }; omittedRoutes: string[]; notFoundRoutes: string[]; }; export async function getExportIntent( entryPath: string ): Promise { const pathExportMarker = path.join(entryPath, '.next', 'export-marker.json'); const hasExportMarker: boolean = await fs .access(pathExportMarker, fs.constants.F_OK) .then(() => true) .catch(() => false); if (!hasExportMarker) { return false; } const manifest: { version: 1; exportTrailingSlash: boolean; hasExportPathMap: boolean; } = JSON.parse(await fs.readFile(pathExportMarker, 'utf8')); switch (manifest.version) { case 1: { if (manifest.hasExportPathMap !== true) { return false; } return { trailingSlash: manifest.exportTrailingSlash }; } default: { return false; } } } export async function getExportStatus( entryPath: string ): Promise { const pathExportDetail = path.join(entryPath, '.next', 'export-detail.json'); const hasExportDetail: boolean = await fs .access(pathExportDetail, fs.constants.F_OK) .then(() => true) .catch(() => false); if (!hasExportDetail) { return false; } const manifest: { version: 1; success: boolean; outDirectory: string; } = JSON.parse(await fs.readFile(pathExportDetail, 'utf8')); switch (manifest.version) { case 1: { return { success: !!manifest.success, outDirectory: manifest.outDirectory, }; } default: { return false; } } } export async function getPrerenderManifest( entryPath: string, outputDirectory: string ): Promise { const pathPrerenderManifest = path.join( entryPath, outputDirectory, 'prerender-manifest.json' ); const hasManifest: boolean = await fs .access(pathPrerenderManifest, fs.constants.F_OK) .then(() => true) .catch(() => false); if (!hasManifest) { return { staticRoutes: {}, blockingFallbackRoutes: {}, fallbackRoutes: {}, bypassToken: null, omittedRoutes: [], notFoundRoutes: [], }; } const manifest: | { version: 1; routes: { [key: string]: { initialRevalidateSeconds: number | false; dataRoute: string; srcRoute: string | null; }; }; dynamicRoutes: { [key: string]: { fallback?: string; routeRegex: string; dataRoute: string; dataRouteRegex: string; }; }; preview?: { previewModeId: string; }; } | { version: 2; routes: { [route: string]: { initialRevalidateSeconds: number | false; srcRoute: string | null; dataRoute: string; }; }; dynamicRoutes: { [route: string]: { routeRegex: string; fallback: string | false; dataRoute: string; dataRouteRegex: string; }; }; preview: { previewModeId: string; }; notFoundRoutes?: string[]; } = JSON.parse(await fs.readFile(pathPrerenderManifest, 'utf8')); switch (manifest.version) { case 1: { const routes = Object.keys(manifest.routes); const lazyRoutes = Object.keys(manifest.dynamicRoutes); const ret: NextPrerenderedRoutes = { staticRoutes: {}, blockingFallbackRoutes: {}, fallbackRoutes: {}, bypassToken: (manifest.preview && manifest.preview.previewModeId) || null, omittedRoutes: [], notFoundRoutes: [], }; routes.forEach(route => { const { initialRevalidateSeconds, dataRoute, srcRoute, } = manifest.routes[route]; ret.staticRoutes[route] = { initialRevalidate: initialRevalidateSeconds === false ? false : Math.max(1, initialRevalidateSeconds), dataRoute, srcRoute, }; }); lazyRoutes.forEach(lazyRoute => { const { routeRegex, fallback, dataRoute, dataRouteRegex, } = manifest.dynamicRoutes[lazyRoute]; if (fallback) { ret.fallbackRoutes[lazyRoute] = { routeRegex, fallback, dataRoute, dataRouteRegex, }; } else { ret.blockingFallbackRoutes[lazyRoute] = { routeRegex, dataRoute, dataRouteRegex, }; } }); return ret; } case 2: { const routes = Object.keys(manifest.routes); const lazyRoutes = Object.keys(manifest.dynamicRoutes); const ret: NextPrerenderedRoutes = { staticRoutes: {}, blockingFallbackRoutes: {}, fallbackRoutes: {}, bypassToken: manifest.preview.previewModeId, omittedRoutes: [], notFoundRoutes: [], }; if (manifest.notFoundRoutes) { ret.notFoundRoutes.push(...manifest.notFoundRoutes); } routes.forEach(route => { const { initialRevalidateSeconds, dataRoute, srcRoute, } = manifest.routes[route]; ret.staticRoutes[route] = { initialRevalidate: initialRevalidateSeconds === false ? false : Math.max(1, initialRevalidateSeconds), dataRoute, srcRoute, }; }); lazyRoutes.forEach(lazyRoute => { const { routeRegex, fallback, dataRoute, dataRouteRegex, } = manifest.dynamicRoutes[lazyRoute]; if (typeof fallback === 'string') { ret.fallbackRoutes[lazyRoute] = { routeRegex, fallback, dataRoute, dataRouteRegex, }; } else if (fallback === null) { ret.blockingFallbackRoutes[lazyRoute] = { routeRegex, dataRoute, dataRouteRegex, }; } else { // Fallback behavior is disabled, all routes would've been provided // in the top-level `routes` key (`staticRoutes`). ret.omittedRoutes.push(lazyRoute); } }); return ret; } default: { return { staticRoutes: {}, blockingFallbackRoutes: {}, fallbackRoutes: {}, bypassToken: null, omittedRoutes: [], notFoundRoutes: [], }; } } } // We only need this once per build let _usesSrcCache: boolean | undefined; async function usesSrcDirectory(workPath: string): Promise { if (!_usesSrcCache) { const source = path.join(workPath, 'src', 'pages'); try { if ((await fs.stat(source)).isDirectory()) { _usesSrcCache = true; } } catch (_err) { _usesSrcCache = false; } } return Boolean(_usesSrcCache); } async function getSourceFilePathFromPage({ workPath, page, }: { workPath: string; page: string; }) { let fsPath = path.join(workPath, 'pages', page); if (await usesSrcDirectory(workPath)) { fsPath = path.join(workPath, 'src', 'pages', page); } if (fs.existsSync(fsPath)) { return path.relative(workPath, fsPath); } const extensionless = fsPath.slice(0, -3); // remove ".js" fsPath = extensionless + '.ts'; if (fs.existsSync(fsPath)) { return path.relative(workPath, fsPath); } if (isDirectory(extensionless)) { fsPath = path.join(extensionless, 'index.js'); if (fs.existsSync(fsPath)) { return path.relative(workPath, fsPath); } fsPath = path.join(extensionless, 'index.ts'); if (fs.existsSync(fsPath)) { return path.relative(workPath, fsPath); } } console.log(`WARNING: Unable to find source file for page ${page}`); return ''; } function isDirectory(path: string) { return fs.existsSync(path) && fs.lstatSync(path).isDirectory(); } export function normalizeLocalePath( pathname: string, locales?: string[] ): { detectedLocale?: string; pathname: string; } { let detectedLocale: string | undefined; // first item will be empty string from splitting at first char const pathnameParts = pathname.split('/'); (locales || []).some(locale => { if (pathnameParts[1].toLowerCase() === locale.toLowerCase()) { detectedLocale = locale; pathnameParts.splice(1, 1); pathname = pathnameParts.join('/') || '/'; return true; } return false; }); return { pathname, detectedLocale, }; } export function addLocaleOrDefault( pathname: string, routesManifest?: RoutesManifest, locale?: string ) { if (!routesManifest?.i18n) return pathname; if (!locale) locale = routesManifest.i18n.defaultLocale; return locale ? `/${locale}${pathname === '/index' ? '' : pathname}` : pathname; } export { excludeFiles, validateEntrypoint, excludeLockFiles, normalizePackageJson, getNextConfig, getPathsInside, getRoutes, stringMap, syncEnvVars, normalizePage, isDynamicRoute, getSourceFilePathFromPage, }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/additional.js ================================================ /* eslint-env jest */ const cheerio = require('cheerio'); const { check, waitFor } = require('../../utils'); const fetch = require('../../../../../test/lib/deployment/fetch-retry'); async function checkForChange(url, initialValue, hardError) { return check( async () => { const res = await fetch(url); if (res.status !== 200) { throw new Error(`Invalid status code ${res.status}`); } const $ = cheerio.load(await res.text()); const props = JSON.parse($('#props').text()); if (isNaN(props.random)) { throw new Error(`Invalid random value ${props.random}`); } const newValue = props.random; return initialValue !== newValue ? 'success' : 'fail'; }, 'success', hardError ); } module.exports = function (ctx) { it('should revalidate content properly from /', async () => { const dataRes = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/en-US.json` ); expect(dataRes.status).toBe(200); await dataRes.json(); await waitFor(2000); const res = await fetch(`${ctx.deploymentUrl}/`); expect(res.status).toBe(200); let $ = cheerio.load(await res.text()); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('en-US'); expect(JSON.parse($('#router-query').text())).toEqual({}); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#router-locale').text()).toBe('en-US'); expect(JSON.parse($('#router-query').text())).toEqual({}); await checkForChange(`${ctx.deploymentUrl}/`, initialRandom); }); it('should revalidate content properly from /fr', async () => { const dataRes = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/fr.json` ); expect(dataRes.status).toBe(200); await dataRes.json(); await waitFor(2000); const res = await fetch(`${ctx.deploymentUrl}/fr`); expect(res.status).toBe(200); let $ = cheerio.load(await res.text()); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('fr'); expect(JSON.parse($('#router-query').text())).toEqual({}); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/fr`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#router-locale').text()).toBe('fr'); expect(JSON.parse($('#router-query').text())).toEqual({}); await checkForChange(`${ctx.deploymentUrl}/fr`, initialRandom); }); it('should revalidate content properly from /nl-NL', async () => { const dataRes = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/nl-NL.json` ); expect(dataRes.status).toBe(200); await dataRes.json(); await waitFor(2000); const res = await fetch(`${ctx.deploymentUrl}/nl-NL`); expect(res.status).toBe(200); let $ = cheerio.load(await res.text()); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('nl-NL'); expect(JSON.parse($('#router-query').text())).toEqual({}); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/nl-NL`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#router-locale').text()).toBe('nl-NL'); expect(JSON.parse($('#router-query').text())).toEqual({}); await checkForChange(`${ctx.deploymentUrl}/nl-NL`, initialRandom); }); it('should revalidate content properly from /gsp/fallback/first', async () => { // check the _next/data URL first const dataRes = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/en-US/gsp/fallback/first.json` ); expect(dataRes.status).toBe(200); await dataRes.json(); await waitFor(2000); const res = await fetch(`${ctx.deploymentUrl}/gsp/fallback/first`); expect(res.status).toBe(200); const html = await res.text(); let $ = cheerio.load(html); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('en-US'); expect(props.params).toEqual({ slug: 'first' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'first' }); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/gsp/fallback/first`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); const props2 = JSON.parse($('#props').text()); expect($('#router-locale').text()).toBe('en-US'); expect(props2.params).toEqual({ slug: 'first' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'first' }); await checkForChange( `${ctx.deploymentUrl}/gsp/fallback/first`, initialRandom ); }); it('should revalidate content properly from /fr/gsp/fallback/first', async () => { // check the _next/data URL first const dataRes = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/fr/gsp/fallback/first.json` ); expect(dataRes.status).toBe(200); await dataRes.json(); await waitFor(2000); const res = await fetch(`${ctx.deploymentUrl}/fr/gsp/fallback/first`); expect(res.status).toBe(200); const html = await res.text(); let $ = cheerio.load(html); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('fr'); expect(props.params).toEqual({ slug: 'first' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'first' }); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/fr/gsp/fallback/first`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); const props2 = JSON.parse($('#props').text()); expect($('#router-locale').text()).toBe('fr'); expect(props2.params).toEqual({ slug: 'first' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'first' }); await checkForChange( `${ctx.deploymentUrl}/fr/gsp/fallback/first`, initialRandom ); }); it('should revalidate content properly from /nl-NL/gsp/fallback/first', async () => { // check the _next/data URL first const dataRes = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/nl-NL/gsp/fallback/first.json` ); expect(dataRes.status).toBe(200); await dataRes.json(); await waitFor(2000); const res = await fetch(`${ctx.deploymentUrl}/nl-NL/gsp/fallback/first`); expect(res.status).toBe(200); const html = await res.text(); let $ = cheerio.load(html); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('nl-NL'); expect(props.params).toEqual({ slug: 'first' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'first' }); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/nl-NL/gsp/fallback/first`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); const props2 = JSON.parse($('#props').text()); expect($('#router-locale').text()).toBe('nl-NL'); expect(props2.params).toEqual({ slug: 'first' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'first' }); await checkForChange( `${ctx.deploymentUrl}/nl-NL/gsp/fallback/first`, initialRandom ); }); // it('should revalidate content properly from /gsp/fallback/new-page', async () => { const dataRes = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/en-US/gsp/fallback/new-page.json` ); expect(dataRes.status).toBe(200); await dataRes.json(); const initRes = await fetch(`${ctx.deploymentUrl}/gsp/fallback/new-page`); expect(initRes.status).toBe(200); await waitFor(2000); const res = await fetch(`${ctx.deploymentUrl}/gsp/fallback/new-page`); expect(res.status).toBe(200); const html = await res.text(); let $ = cheerio.load(html); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('en-US'); expect(props.params).toEqual({ slug: 'new-page' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'new-page' }); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/gsp/fallback/new-page`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); const props2 = JSON.parse($('#props').text()); expect($('#router-locale').text()).toBe('en-US'); expect(props2.params).toEqual({ slug: 'new-page' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'new-page' }); await checkForChange( `${ctx.deploymentUrl}/gsp/fallback/new-page`, initialRandom ); }); it('should revalidate content properly from /fr/gsp/fallback/new-page', async () => { // we have to hit the _next/data URL first const dataRes = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/fr/gsp/fallback/new-page.json` ); expect(dataRes.status).toBe(200); await waitFor(2000); const res = await fetch(`${ctx.deploymentUrl}/fr/gsp/fallback/new-page`); expect(res.status).toBe(200); const html = await res.text(); let $ = cheerio.load(html); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('fr'); expect(props.params).toEqual({ slug: 'new-page' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'new-page' }); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/fr/gsp/fallback/new-page`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#router-locale').text()).toBe('fr'); await checkForChange( `${ctx.deploymentUrl}/fr/gsp/fallback/new-page`, initialRandom ); }); it('should revalidate content properly from /nl-NL/gsp/fallback/new-page', async () => { // we have to hit the _next/data URL first const dataRes = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/nl-NL/gsp/fallback/new-page.json` ); expect(dataRes.status).toBe(200); await waitFor(2000); const res = await fetch(`${ctx.deploymentUrl}/nl-NL/gsp/fallback/new-page`); expect(res.status).toBe(200); const html = await res.text(); let $ = cheerio.load(html); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('nl-NL'); expect(props.params).toEqual({ slug: 'new-page' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'new-page' }); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch( `${ctx.deploymentUrl}/nl-NL/gsp/fallback/new-page` ); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); const props2 = JSON.parse($('#props').text()); expect($('#router-locale').text()).toBe('nl-NL'); expect(props2.params).toEqual({ slug: 'new-page' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'new-page' }); await checkForChange( `${ctx.deploymentUrl}/nl-NL/gsp/fallback/new-page`, initialRandom ); }); it('should revalidate content properly from /gsp/no-fallback/first', async () => { const dataRes = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/en-US/gsp/no-fallback/first.json` ); expect(dataRes.status).toBe(200); await dataRes.json(); await waitFor(2000); const res = await fetch(`${ctx.deploymentUrl}/gsp/no-fallback/first`); expect(res.status).toBe(200); let $ = cheerio.load(await res.text()); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('en-US'); expect(props.params).toEqual({ slug: 'first' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'first' }); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/gsp/no-fallback/first`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); const props2 = JSON.parse($('#props').text()); expect($('#router-locale').text()).toBe('en-US'); expect(props2.params).toEqual({ slug: 'first' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'first' }); await checkForChange( `${ctx.deploymentUrl}/gsp/no-fallback/first`, initialRandom ); }); it('should revalidate content properly from /fr/gsp/no-fallback/first', async () => { const dataRes = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/fr/gsp/no-fallback/first.json` ); expect(dataRes.status).toBe(200); await dataRes.json(); await waitFor(2000); const res = await fetch(`${ctx.deploymentUrl}/fr/gsp/no-fallback/first`); expect(res.status).toBe(200); let $ = cheerio.load(await res.text()); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('fr'); expect(props.params).toEqual({ slug: 'first' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'first' }); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/fr/gsp/no-fallback/first`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); const props2 = JSON.parse($('#props').text()); expect($('#router-locale').text()).toBe('fr'); expect(props2.params).toEqual({ slug: 'first' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'first' }); await checkForChange( `${ctx.deploymentUrl}/fr/gsp/no-fallback/first`, initialRandom ); }); it('should revalidate content properly from /nl-NL/gsp/no-fallback/second', async () => { const dataRes = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/nl-NL/gsp/no-fallback/second.json` ); expect(dataRes.status).toBe(200); await dataRes.json(); await waitFor(2000); const res = await fetch( `${ctx.deploymentUrl}/nl-NL/gsp/no-fallback/second` ); expect(res.status).toBe(200); let $ = cheerio.load(await res.text()); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('nl-NL'); expect(props.params).toEqual({ slug: 'second' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'second' }); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch( `${ctx.deploymentUrl}/nl-NL/gsp/no-fallback/second` ); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); const props2 = JSON.parse($('#props').text()); expect($('#router-locale').text()).toBe('nl-NL'); expect(props2.params).toEqual({ slug: 'second' }); expect(JSON.parse($('#router-query').text())).toEqual({ slug: 'second' }); await checkForChange( `${ctx.deploymentUrl}/nl-NL/gsp/no-fallback/second`, initialRandom ); }); }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, i18n: { locales: ['nl-NL', 'nl-BE', 'nl', 'fr-BE', 'fr', 'en-US', 'en'], defaultLocale: 'en-US', // TODO: testing locale domains support, will require custom // testing set-up as test accounts are used currently domains: [ { domain: 'example.be', defaultLocale: 'nl-BE', }, { domain: 'example.fr', defaultLocale: 'fr', }, ], }, async redirects() { return [ { source: '/en-US/redirect-1', destination: '/somewhere-else', permanent: false, locale: false, }, { source: '/nl/redirect-2', destination: '/somewhere-else', permanent: false, locale: false, }, { source: '/redirect-3', destination: '/somewhere-else', permanent: false, }, ]; }, async rewrites() { return [ { source: '/en-US/rewrite-1', destination: '/another', locale: false, }, { source: '/nl/rewrite-2', destination: '/nl/another', locale: false, }, { source: '/fr/rewrite-3', destination: '/nl/another', locale: false, }, { source: '/rewrite-4', destination: '/another', }, ]; }, async headers() { return [ { source: '/en-US/add-header-1', locale: false, headers: [ { key: 'x-hello', value: 'world', }, ], }, { source: '/nl/add-header-2', locale: false, headers: [ { key: 'x-hello', value: 'world', }, ], }, { source: '/add-header-3', headers: [ { key: 'x-hello', value: 'world', }, ], }, ]; }, }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/now.json ================================================ { "version": 2, "builds": [ { "src": "package.json", "use": "@vercel/next" } ], "probes": [ { "path": "/", "headers": { "accept-language": "en;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//en/" } }, { "path": "/", "headers": { "accept-language": "nl;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//nl/" } }, { "path": "/", "headers": { "accept-language": "nl-NL;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//nl-NL/" } }, { "path": "/", "headers": { "accept-language": "fr;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//fr/" } }, { "path": "/", "headers": { "accept-language": "en-US;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "index page" }, { "path": "/en-US", "headers": { "accept-language": "nl;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "index page" }, { "path": "/", "status": 200, "mustContain": "index page" }, { "path": "/", "status": 200, "mustContain": ">en-US<" }, { "path": "/en", "status": 200, "mustContain": "index page" }, { "path": "/en", "status": 200, "mustContain": ">en<" }, { "path": "/fr", "status": 200, "mustContain": "index page" }, { "path": "/fr", "status": 200, "mustContain": ">fr<" }, { "path": "/nl", "status": 200, "mustContain": "index page" }, { "path": "/nl", "status": 200, "mustContain": ">nl<" }, { "path": "/nl-NL", "status": 200, "mustContain": "index page" }, { "path": "/nl-NL", "status": 200, "mustContain": ">nl-NL<" }, { "path": "/non-existent", "status": 404 }, { "path": "/fr/non-existent", "status": 404, "mustContain": "lang=\"fr\"" }, { "path": "/en/non-existent", "status": 404, "mustContain": "lang=\"en\"" }, { "path": "/en-US/non-existent", "status": 404, "mustContain": "lang=\"en-US\"" }, { "path": "/nl/non-existent", "status": 404, "mustContain": "lang=\"nl\"" }, { "path": "/nl-NL/non-existent", "status": 404, "mustContain": "lang=\"nl-NL\"" }, { "path": "/hello.txt", "status": 200, "mustContain": "hello world!" }, { "path": "/dynamic/hello", "status": 200, "mustContain": "dynamic page" }, { "path": "/dynamic/hello", "status": 200, "mustContain": "\"en-US\"" }, { "path": "/en/dynamic/hello", "status": 200, "mustContain": "dynamic page" }, { "path": "/en/dynamic/hello", "status": 200, "mustContain": "\"en\"" }, { "path": "/nl/dynamic/hello", "status": 200, "mustContain": "dynamic page" }, { "path": "/nl/dynamic/hello", "status": 200, "mustContain": "\"nl\"" }, { "path": "/fr/dynamic/hello", "status": 200, "mustContain": "dynamic page" }, { "path": "/fr/dynamic/hello", "status": 200, "mustContain": "\"fr\"" }, { "path": "/gsp", "status": 200, "mustContain": "gsp page" }, { "path": "/gsp", "status": 200, "mustContain": ">en-US<" }, { "path": "/en/gsp", "status": 200, "mustContain": "gsp page" }, { "path": "/en/gsp", "status": 200, "mustContain": ">en<" }, { "path": "/nl/gsp", "status": 200, "mustContain": "gsp page" }, { "path": "/nl/gsp", "status": 200, "mustContain": ">nl<" }, { "path": "/fr/gsp", "status": 200, "mustContain": "gsp page" }, { "path": "/fr/gsp", "status": 200, "mustContain": ">fr<" }, { "path": "/gssp", "status": 200, "mustContain": "gssp page" }, { "path": "/gssp", "status": 200, "mustContain": ">en-US<" }, { "path": "/en/gssp", "status": 200, "mustContain": "gssp page" }, { "path": "/en/gssp", "status": 200, "mustContain": ">en<" }, { "path": "/nl/gssp", "status": 200, "mustContain": "gssp page" }, { "path": "/nl/gssp", "status": 200, "mustContain": ">nl<" }, { "path": "/fr/gssp", "status": 200, "mustContain": "gssp page" }, { "path": "/fr/gssp", "status": 200, "mustContain": ">fr<" }, { "path": "/gssp/first", "status": 200, "mustContain": "gssp page" }, { "path": "/gssp/first", "status": 200, "mustContain": ">en-US<" }, { "path": "/gssp/first", "status": 200, "mustContain": "slug\":\"first\"" }, { "path": "/en/gssp/first", "status": 200, "mustContain": "gssp page" }, { "path": "/en/gssp/first", "status": 200, "mustContain": ">en<" }, { "path": "/en/gssp/first", "status": 200, "mustContain": "slug\":\"first\"" }, { "path": "/nl/gssp/first", "status": 200, "mustContain": "gssp page" }, { "path": "/nl/gssp/first", "status": 200, "mustContain": ">nl<" }, { "path": "/nl/gssp/first", "status": 200, "mustContain": "slug\":\"first\"" }, { "path": "/fr/gssp/first", "status": 200, "mustContain": "gssp page" }, { "path": "/fr/gssp/first", "status": 200, "mustContain": ">fr<" }, { "path": "/fr/gssp/first", "status": 200, "mustContain": "slug\":\"first\"" }, { "path": "/en/not-found", "status": 404 }, { "path": "/en/not-found", "mustContain": "lang=\"en\"" }, { "path": "/nl/not-found", "status": 404 }, { "path": "/nl/not-found", "mustContain": "lang=\"nl\"" }, { "path": "/en-US/not-found", "status": 200, "mustContain": "lang=\"en-US\"" }, { "path": "/nl-NL/not-found", "status": 200, "mustContain": "lang=\"nl-NL\"" }, { "path": "/fr/not-found", "status": 200, "mustContain": "lang=\"fr\"" }, // this will always be a 200 unless fallback: blocking is used // since the static fallback page is served before the 404 // page is rendered { "path": "/en/not-found/fallback/first", "status": 200, "mustContain": "lang=\"en\"" }, { "delay": 2000 }, { "path": "/en/not-found/fallback/first", "status": 200, "mustNotContain": "gsp page" }, { "path": "/_next/data/testing-build-id/en/not-found/fallback/first.json", "status": 404 }, { "path": "/en/not-found/fallback/first", "status": 200, "mustContain": "lang=\"en\"" }, { "path": "/en/not-found/fallback/first", "status": 200, "mustNotContain": "gsp page" }, { "path": "/fr/not-found/fallback/first", "status": 200, "mustContain": "lang=\"fr\"" }, { "path": "/_next/data/testing-build-id/fr/not-found/fallback/first.json", "status": 200 }, { "path": "/fr/not-found/fallback/first", "status": 200, "mustContain": "lang=\"fr\"" }, { "delay": 2000 }, { "path": "/fr/not-found/fallback/first", "status": 200, "mustContain": "gsp page" }, { "path": "/_next/data/testing-build-id/en-US.json", "status": 200, "mustContain": "\"locale\":\"en-US\"" }, { "path": "/_next/data/testing-build-id/en.json", "status": 200, "mustContain": "\"locale\":\"en\"" }, { "path": "/_next/data/testing-build-id/fr.json", "status": 200, "mustContain": "\"locale\":\"fr\"" }, { "path": "/_next/data/testing-build-id/nl.json", "status": 200, "mustContain": "\"locale\":\"nl\"" }, { "path": "/_next/data/testing-build-id/en-US/gsp.json", "status": 200, "mustContain": "\"locale\":\"en-US\"" }, { "path": "/_next/data/testing-build-id/en/gsp.json", "status": 200, "mustContain": "\"locale\":\"en\"" }, { "path": "/_next/data/testing-build-id/fr/gsp.json", "status": 200, "mustContain": "\"locale\":\"fr\"" }, { "path": "/_next/data/testing-build-id/nl/gsp.json", "status": 200, "mustContain": "\"locale\":\"nl\"" }, { "path": "/gsp/blocking/first", "status": 200, "mustContain": "catchall" }, { "path": "/gsp/blocking/first", "status": 200, "mustContain": "lang=\"en-US\"" }, { "path": "/_next/data/testing-build-id/en-US/gsp/blocking/first.json", "status": 200, "mustContain": "\"catchall\":\"yes\"" }, { "path": "/nl-NL/gsp/blocking/first", "status": 200, "mustContain": "catchall" }, { "path": "/nl-NL/gsp/blocking/first", "status": 200, "mustContain": "lang=\"nl-NL\"" }, { "path": "/_next/data/testing-build-id/nl-NL/gsp/blocking/first.json", "status": 200, "mustContain": "\"catchall\":\"yes\"" }, { "path": "/fr/gsp/blocking/first", "status": 200, "mustContain": "catchall" }, { "path": "/fr/gsp/blocking/first", "status": 200, "mustContain": "lang=\"fr\"" }, { "path": "/_next/data/testing-build-id/fr/gsp/blocking/first.json", "status": 200, "mustContain": "\"catchall\":\"yes\"" }, { "path": "/en-US/redirect-1", "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//somewhere-else/" } }, { "path": "/en/redirect-1", "fetchOptions": { "redirect": "manual" }, "status": 404 }, { "path": "/nl/redirect-2", "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//somewhere-else/" } }, { "path": "/en-US/redirect-2", "fetchOptions": { "redirect": "manual" }, "status": 404 }, { "path": "/redirect-3", "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//somewhere-else/" } }, { "path": "/en-US/redirect-3", "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//somewhere-else/" } }, { "path": "/fr/redirect-3", "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//somewhere-else/" } }, { "path": "/nl-NL/redirect-3", "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//somewhere-else/" } }, { "path": "/en-US/rewrite-1", "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "another page" }, { "path": "/en-US/rewrite-1", "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "lang=\"en-US\"" }, { "path": "/nl/rewrite-1", "fetchOptions": { "redirect": "manual" }, "status": 404 }, { "path": "/nl/rewrite-2", "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "another page" }, { "path": "/nl/rewrite-2", "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "lang=\"nl\"" }, { "path": "/rewrite-2", "fetchOptions": { "redirect": "manual" }, "status": 404 }, { "path": "/fr/rewrite-3", "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "another page" }, { "path": "/fr/rewrite-3", "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "lang=\"nl\"" }, { "path": "/rewrite-3", "fetchOptions": { "redirect": "manual" }, "status": 404 }, { "path": "/rewrite-4", "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "another page" }, { "path": "/rewrite-4", "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "lang=\"en-US\"" }, { "path": "/en/rewrite-4", "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "another page" }, { "path": "/en/rewrite-4", "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "lang=\"en\"" }, { "path": "/fr/rewrite-4", "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "another page" }, { "path": "/fr/rewrite-4", "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "lang=\"fr\"" }, { "path": "/en-US/add-header-1", "fetchOptions": { "redirect": "manual" }, "status": 404, "responseHeaders": { "x-hello": "world" } }, { "path": "/en/add-header-1", "fetchOptions": { "redirect": "manual" }, "status": 404, "responseHeaders": { "x-hello": null } }, { "path": "/nl/add-header-2", "fetchOptions": { "redirect": "manual" }, "status": 404, "responseHeaders": { "x-hello": "world" } }, { "path": "/en-US/add-header-2", "fetchOptions": { "redirect": "manual" }, "status": 404, "responseHeaders": { "x-hello": null } }, { "path": "/add-header-3", "fetchOptions": { "redirect": "manual" }, "status": 404, "responseHeaders": { "x-hello": "world" } }, { "path": "/en-US/add-header-3", "fetchOptions": { "redirect": "manual" }, "status": 404, "responseHeaders": { "x-hello": "world" } }, { "path": "/fr/add-header-3", "fetchOptions": { "redirect": "manual" }, "status": 404, "responseHeaders": { "x-hello": "world" } }, { "path": "/nl-NL/add-header-3", "fetchOptions": { "redirect": "manual" }, "status": 404, "responseHeaders": { "x-hello": "world" } } ] } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/pages/another.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

another page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getServerSideProps = ({ locale, locales }) => { return { props: { locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/pages/auto-export/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

auto-export page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to / ); } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/pages/dynamic/[slug].js ================================================ import { useRouter } from 'next/router'; export default function Dynamic(props) { const router = useRouter(); return ( <>

dynamic page

{JSON.stringify(router.query)}

); } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/pages/gsp/blocking/[[...slug]].js ================================================ import Link from 'next/link'; const Slug = props => { return ( ); }; export const getStaticProps = () => { return { props: { random: Math.random(), catchall: 'yes', }, revalidate: 1, }; }; export const getStaticPaths = () => { return { paths: [], fallback: 'blocking', }; }; export default Slug; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/pages/gsp/fallback/[slug].js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); if (router.isFallback) return 'Loading...'; return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getStaticProps = ({ params, locale, locales }) => { return { props: { random: Math.random(), params, locale, locales, }, revalidate: 1, }; }; export const getStaticPaths = ({ locales }) => { const paths = []; for (const locale of locales) { paths.push({ params: { slug: 'first' }, locale }); paths.push({ params: { slug: 'second' }, locale }); } return { // the default locale will be used since one isn't defined here paths, fallback: true, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/pages/gsp/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } // TODO: should non-dynamic GSP pages pre-render for each locale? export const getStaticProps = ({ locale, locales }) => { return { props: { locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/pages/gsp/no-fallback/[slug].js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); if (router.isFallback) return 'Loading...'; return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getStaticProps = ({ params, locale, locales }) => { return { props: { random: Math.random(), params, locale, locales, }, revalidate: 1, }; }; export const getStaticPaths = () => { return { paths: [ { params: { slug: 'first' } }, '/gsp/no-fallback/second', { params: { slug: 'first' }, locale: 'en-US' }, '/nl-NL/gsp/no-fallback/second', '/fr/gsp/no-fallback/first', ], fallback: false, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/pages/gssp/[slug].js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

gssp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getServerSideProps = ({ params, locale, locales }) => { return { props: { params, locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/pages/gssp/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

gssp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getServerSideProps = ({ locale, locales }) => { return { props: { locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/pages/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

index page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /another
to /gsp
to /gsp/fallback/first
to /gsp/fallback/hello
to /gsp/no-fallback/first
to /gssp
to /gssp/first
); } export const getStaticProps = ({ locale, locales }) => { return { props: { random: Math.random(), locale, locales, }, revalidate: 1, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/pages/links.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); const { nextLocale } = router.query; return ( <>

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /another
to /gsp
to /gsp/fallback/first
to /gsp/fallback/hello
to /gsp/no-fallback/first
to /gssp
to /gssp/first
); } // make SSR page so we have query values immediately export const getServerSideProps = () => { return { props: {}, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/pages/not-found/fallback/[slug].js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); if (router.isFallback) return 'Loading...'; return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getStaticProps = ({ params, locale, locales }) => { if (locale === 'en' || locale === 'nl') { return { notFound: true, }; } return { props: { params, locale, locales, }, }; }; export const getStaticPaths = () => { return { // the default locale will be used since one isn't defined here paths: ['first', 'second'].map(slug => ({ params: { slug }, })), fallback: true, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/pages/not-found/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getStaticProps = ({ locale, locales }) => { if (locale === 'en' || locale === 'nl') { return { notFound: true, }; } return { props: { locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support/public/hello.txt ================================================ hello world! ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, i18n: { localeDetection: false, locales: ['nl-NL', 'nl-BE', 'nl', 'fr-BE', 'fr', 'en-US', 'en'], defaultLocale: 'en-US', // TODO: testing locale domains support, will require custom // testing set-up as test accounts are used currently domains: [ { domain: 'example.be', defaultLocale: 'nl-BE', }, { domain: 'example.fr', defaultLocale: 'fr', }, ], }, }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/now.json ================================================ { "version": 2, "builds": [ { "src": "package.json", "use": "@vercel/next" } ], "probes": [ { "path": "/", "headers": { "accept-language": "en;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "\"en-US\"" }, { "path": "/", "headers": { "accept-language": "nl;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "\"en-US\"" }, { "path": "/", "headers": { "accept-language": "nl-NL;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "\"en-US\"" }, { "path": "/", "headers": { "accept-language": "fr;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "\"en-US\"" }, { "path": "/", "headers": { "accept-language": "en-US;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "index page" }, { "path": "/en-US", "headers": { "accept-language": "nl;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "index page" }, { "path": "/", "status": 200, "mustContain": "index page" }, { "path": "/", "status": 200, "mustContain": ">en-US<" }, { "path": "/en", "status": 200, "mustContain": "index page" }, { "path": "/en", "status": 200, "mustContain": ">en<" }, { "path": "/fr", "status": 200, "mustContain": "index page" }, { "path": "/fr", "status": 200, "mustContain": ">fr<" }, { "path": "/nl", "status": 200, "mustContain": "index page" }, { "path": "/nl", "status": 200, "mustContain": ">nl<" }, { "path": "/nl-NL", "status": 200, "mustContain": "index page" }, { "path": "/nl-NL", "status": 200, "mustContain": ">nl-NL<" }, { "path": "/non-existent", "status": 404 }, { "path": "/fr/non-existent", "status": 404, "mustContain": "lang=\"fr\"" }, { "path": "/en/non-existent", "status": 404, "mustContain": "lang=\"en\"" }, { "path": "/en-US/non-existent", "status": 404, "mustContain": "lang=\"en-US\"" }, { "path": "/nl/non-existent", "status": 404, "mustContain": "lang=\"nl\"" }, { "path": "/nl-NL/non-existent", "status": 404, "mustContain": "lang=\"nl-NL\"" }, { "path": "/hello.txt", "status": 200, "mustContain": "hello world!" }, { "path": "/dynamic/hello", "status": 200, "mustContain": "dynamic page" }, { "path": "/dynamic/hello", "status": 200, "mustContain": "\"en-US\"" }, { "path": "/en/dynamic/hello", "status": 200, "mustContain": "dynamic page" }, { "path": "/en/dynamic/hello", "status": 200, "mustContain": "\"en\"" }, { "path": "/nl/dynamic/hello", "status": 200, "mustContain": "dynamic page" }, { "path": "/nl/dynamic/hello", "status": 200, "mustContain": "\"nl\"" }, { "path": "/fr/dynamic/hello", "status": 200, "mustContain": "dynamic page" }, { "path": "/fr/dynamic/hello", "status": 200, "mustContain": "\"fr\"" }, { "path": "/gsp", "status": 200, "mustContain": "gsp page" }, { "path": "/gsp", "status": 200, "mustContain": ">en-US<" }, { "path": "/en/gsp", "status": 200, "mustContain": "gsp page" }, { "path": "/en/gsp", "status": 200, "mustContain": ">en<" }, { "path": "/nl/gsp", "status": 200, "mustContain": "gsp page" }, { "path": "/nl/gsp", "status": 200, "mustContain": ">nl<" }, { "path": "/fr/gsp", "status": 200, "mustContain": "gsp page" }, { "path": "/fr/gsp", "status": 200, "mustContain": ">fr<" }, { "path": "/gssp", "status": 200, "mustContain": "gssp page" }, { "path": "/gssp", "status": 200, "mustContain": ">en-US<" }, { "path": "/en/gssp", "status": 200, "mustContain": "gssp page" }, { "path": "/en/gssp", "status": 200, "mustContain": ">en<" }, { "path": "/nl/gssp", "status": 200, "mustContain": "gssp page" }, { "path": "/nl/gssp", "status": 200, "mustContain": ">nl<" }, { "path": "/fr/gssp", "status": 200, "mustContain": "gssp page" }, { "path": "/fr/gssp", "status": 200, "mustContain": ">fr<" }, { "path": "/gssp/first", "status": 200, "mustContain": "gssp page" }, { "path": "/gssp/first", "status": 200, "mustContain": ">en-US<" }, { "path": "/gssp/first", "status": 200, "mustContain": "slug\":\"first\"" }, { "path": "/en/gssp/first", "status": 200, "mustContain": "gssp page" }, { "path": "/en/gssp/first", "status": 200, "mustContain": ">en<" }, { "path": "/en/gssp/first", "status": 200, "mustContain": "slug\":\"first\"" }, { "path": "/nl/gssp/first", "status": 200, "mustContain": "gssp page" }, { "path": "/nl/gssp/first", "status": 200, "mustContain": ">nl<" }, { "path": "/nl/gssp/first", "status": 200, "mustContain": "slug\":\"first\"" }, { "path": "/fr/gssp/first", "status": 200, "mustContain": "gssp page" }, { "path": "/fr/gssp/first", "status": 200, "mustContain": ">fr<" }, { "path": "/fr/gssp/first", "status": 200, "mustContain": "slug\":\"first\"" }, { "path": "/en/not-found", "status": 404 }, { "path": "/en/not-found", "mustContain": "lang=\"en\"" }, { "path": "/nl/not-found", "status": 404 }, { "path": "/nl/not-found", "mustContain": "lang=\"nl\"" }, { "path": "/en-US/not-found", "status": 200, "mustContain": "lang=\"en-US\"" }, { "path": "/nl-NL/not-found", "status": 200, "mustContain": "lang=\"nl-NL\"" }, { "path": "/fr/not-found", "status": 200, "mustContain": "lang=\"fr\"" }, // this will always be a 200 unless fallback: blocking is used // since the static fallback page is served before the 404 // page is rendered { "path": "/en/not-found/fallback/first", "status": 200, "mustContain": "lang=\"en\"" }, { "delay": 2000 }, { "path": "/en/not-found/fallback/first", "status": 200, "mustNotContain": "gsp page" }, { "path": "/_next/data/testing-build-id/en/not-found/fallback/first.json", "status": 404 }, { "path": "/en/not-found/fallback/first", "status": 200, "mustContain": "lang=\"en\"" }, { "path": "/en/not-found/fallback/first", "status": 200, "mustNotContain": "gsp page" }, { "path": "/fr/not-found/fallback/first", "status": 200, "mustContain": "lang=\"fr\"" }, { "path": "/_next/data/testing-build-id/fr/not-found/fallback/first.json", "status": 200 }, { "path": "/fr/not-found/fallback/first", "status": 200, "mustContain": "lang=\"fr\"" }, { "delay": 2000 }, { "path": "/fr/not-found/fallback/first", "status": 200, "mustContain": "gsp page" }, { "path": "/_next/data/testing-build-id/en-US.json", "status": 200, "mustContain": "\"locale\":\"en-US\"" }, { "path": "/_next/data/testing-build-id/en.json", "status": 200, "mustContain": "\"locale\":\"en\"" }, { "path": "/_next/data/testing-build-id/fr.json", "status": 200, "mustContain": "\"locale\":\"fr\"" }, { "path": "/_next/data/testing-build-id/nl.json", "status": 200, "mustContain": "\"locale\":\"nl\"" }, { "path": "/_next/data/testing-build-id/en-US/gsp.json", "status": 200, "mustContain": "\"locale\":\"en-US\"" }, { "path": "/_next/data/testing-build-id/en/gsp.json", "status": 200, "mustContain": "\"locale\":\"en\"" }, { "path": "/_next/data/testing-build-id/fr/gsp.json", "status": 200, "mustContain": "\"locale\":\"fr\"" }, { "path": "/_next/data/testing-build-id/nl/gsp.json", "status": 200, "mustContain": "\"locale\":\"nl\"" }, { "path": "/gsp/blocking/first", "status": 200, "mustContain": "catchall" }, { "path": "/gsp/blocking/first", "status": 200, "mustContain": "lang=\"en-US\"" }, { "path": "/_next/data/testing-build-id/en-US/gsp/blocking/first.json", "status": 200, "mustContain": "\"catchall\":\"yes\"" }, { "path": "/nl-NL/gsp/blocking/first", "status": 200, "mustContain": "catchall" }, { "path": "/nl-NL/gsp/blocking/first", "status": 200, "mustContain": "lang=\"nl-NL\"" }, { "path": "/_next/data/testing-build-id/nl-NL/gsp/blocking/first.json", "status": 200, "mustContain": "\"catchall\":\"yes\"" }, { "path": "/fr/gsp/blocking/first", "status": 200, "mustContain": "catchall" }, { "path": "/fr/gsp/blocking/first", "status": 200, "mustContain": "lang=\"fr\"" }, { "path": "/_next/data/testing-build-id/fr/gsp/blocking/first.json", "status": 200, "mustContain": "\"catchall\":\"yes\"" } ] } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/pages/another.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

another page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getServerSideProps = ({ locale, locales }) => { return { props: { locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/pages/auto-export/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

auto-export page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to / ); } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/pages/dynamic/[slug].js ================================================ import { useRouter } from 'next/router'; export default function Dynamic(props) { const router = useRouter(); return ( <>

dynamic page

{JSON.stringify(router.query)}

); } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/pages/gsp/blocking/[[...slug]].js ================================================ import Link from 'next/link'; const Slug = props => { return ( ); }; export const getStaticProps = () => { return { props: { random: Math.random(), catchall: 'yes', }, revalidate: 1, }; }; export const getStaticPaths = () => { return { paths: [], fallback: 'blocking', }; }; export default Slug; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/pages/gsp/fallback/[slug].js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); if (router.isFallback) return 'Loading...'; return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getStaticProps = ({ params, locale, locales }) => { return { props: { random: Math.random(), params, locale, locales, }, revalidate: 1, }; }; export const getStaticPaths = ({ locales }) => { const paths = []; for (const locale of locales) { paths.push({ params: { slug: 'first' }, locale }); paths.push({ params: { slug: 'second' }, locale }); } return { // the default locale will be used since one isn't defined here paths, fallback: true, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/pages/gsp/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } // TODO: should non-dynamic GSP pages pre-render for each locale? export const getStaticProps = ({ locale, locales }) => { return { props: { locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/pages/gsp/no-fallback/[slug].js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); if (router.isFallback) return 'Loading...'; return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getStaticProps = ({ params, locale, locales }) => { return { props: { random: Math.random(), params, locale, locales, }, revalidate: 1, }; }; export const getStaticPaths = () => { return { paths: [ { params: { slug: 'first' } }, '/gsp/no-fallback/second', { params: { slug: 'first' }, locale: 'en-US' }, '/nl-NL/gsp/no-fallback/second', '/fr/gsp/no-fallback/first', ], fallback: false, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/pages/gssp/[slug].js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

gssp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getServerSideProps = ({ params, locale, locales }) => { return { props: { params, locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/pages/gssp/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

gssp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getServerSideProps = ({ locale, locales }) => { return { props: { locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/pages/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

index page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /another
to /gsp
to /gsp/fallback/first
to /gsp/fallback/hello
to /gsp/no-fallback/first
to /gssp
to /gssp/first
); } export const getStaticProps = ({ locale, locales }) => { return { props: { random: Math.random(), locale, locales, }, revalidate: 1, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/pages/links.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); const { nextLocale } = router.query; return ( <>

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /another
to /gsp
to /gsp/fallback/first
to /gsp/fallback/hello
to /gsp/no-fallback/first
to /gssp
to /gssp/first
); } // make SSR page so we have query values immediately export const getServerSideProps = () => { return { props: {}, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/pages/not-found/fallback/[slug].js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); if (router.isFallback) return 'Loading...'; return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getStaticProps = ({ params, locale, locales }) => { if (locale === 'en' || locale === 'nl') { return { notFound: true, }; } return { props: { params, locale, locales, }, }; }; export const getStaticPaths = () => { return { // the default locale will be used since one isn't defined here paths: ['first', 'second'].map(slug => ({ params: { slug }, })), fallback: true, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/pages/not-found/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getStaticProps = ({ locale, locales }) => { if (locale === 'en' || locale === 'nl') { return { notFound: true, }; } return { props: { locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-locale-detection/public/hello.txt ================================================ hello world! ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, i18n: { locales: ['nl-NL', 'nl-BE', 'nl', 'fr-BE', 'fr', 'en-US', 'en'], defaultLocale: 'en-US', // TODO: testing locale domains support, will require custom // testing set-up as test accounts are used currently domains: [ { domain: 'example.be', defaultLocale: 'nl-BE', }, { domain: 'example.fr', defaultLocale: 'fr', }, ], }, }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/now.json ================================================ { "version": 2, "builds": [ { "src": "package.json", "use": "@vercel/next", "config": { "sharedLambdas": false } } ], "probes": [ { "path": "/", "headers": { "accept-language": "en;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//en/" } }, { "path": "/", "headers": { "accept-language": "nl;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//nl/" } }, { "path": "/", "headers": { "accept-language": "nl-NL;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//nl-NL/" } }, { "path": "/", "headers": { "accept-language": "fr;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//fr/" } }, { "path": "/", "headers": { "accept-language": "en-US;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "index page" }, { "path": "/en-US", "headers": { "accept-language": "nl;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "index page" }, { "path": "/", "status": 200, "mustContain": "index page" }, { "path": "/", "status": 200, "mustContain": ">en-US<" }, { "path": "/en", "status": 200, "mustContain": "index page" }, { "path": "/en", "status": 200, "mustContain": ">en<" }, { "path": "/fr", "status": 200, "mustContain": "index page" }, { "path": "/fr", "status": 200, "mustContain": ">fr<" }, { "path": "/nl", "status": 200, "mustContain": "index page" }, { "path": "/nl", "status": 200, "mustContain": ">nl<" }, { "path": "/nl-NL", "status": 200, "mustContain": "index page" }, { "path": "/nl-NL", "status": 200, "mustContain": ">nl-NL<" }, { "path": "/non-existent", "status": 404 }, { "path": "/fr/non-existent", "status": 404, "mustContain": "lang=\"fr\"" }, { "path": "/en/non-existent", "status": 404, "mustContain": "lang=\"en\"" }, { "path": "/en-US/non-existent", "status": 404, "mustContain": "lang=\"en-US\"" }, { "path": "/nl/non-existent", "status": 404, "mustContain": "lang=\"nl\"" }, { "path": "/nl-NL/non-existent", "status": 404, "mustContain": "lang=\"nl-NL\"" }, { "path": "/hello.txt", "status": 200, "mustContain": "hello world!" }, { "path": "/dynamic/hello", "status": 200, "mustContain": "dynamic page" }, { "path": "/dynamic/hello", "status": 200, "mustContain": "\"en-US\"" }, { "path": "/en/dynamic/hello", "status": 200, "mustContain": "dynamic page" }, { "path": "/en/dynamic/hello", "status": 200, "mustContain": "\"en\"" }, { "path": "/nl/dynamic/hello", "status": 200, "mustContain": "dynamic page" }, { "path": "/nl/dynamic/hello", "status": 200, "mustContain": "\"nl\"" }, { "path": "/fr/dynamic/hello", "status": 200, "mustContain": "dynamic page" }, { "path": "/fr/dynamic/hello", "status": 200, "mustContain": "\"fr\"" }, { "path": "/gsp", "status": 200, "mustContain": "gsp page" }, { "path": "/gsp", "status": 200, "mustContain": ">en-US<" }, { "path": "/en/gsp", "status": 200, "mustContain": "gsp page" }, { "path": "/en/gsp", "status": 200, "mustContain": ">en<" }, { "path": "/nl/gsp", "status": 200, "mustContain": "gsp page" }, { "path": "/nl/gsp", "status": 200, "mustContain": ">nl<" }, { "path": "/fr/gsp", "status": 200, "mustContain": "gsp page" }, { "path": "/fr/gsp", "status": 200, "mustContain": ">fr<" }, { "path": "/gssp", "status": 200, "mustContain": "gssp page" }, { "path": "/gssp", "status": 200, "mustContain": ">en-US<" }, { "path": "/en/gssp", "status": 200, "mustContain": "gssp page" }, { "path": "/en/gssp", "status": 200, "mustContain": ">en<" }, { "path": "/nl/gssp", "status": 200, "mustContain": "gssp page" }, { "path": "/nl/gssp", "status": 200, "mustContain": ">nl<" }, { "path": "/fr/gssp", "status": 200, "mustContain": "gssp page" }, { "path": "/fr/gssp", "status": 200, "mustContain": ">fr<" }, { "path": "/gssp/first", "status": 200, "mustContain": "gssp page" }, { "path": "/gssp/first", "status": 200, "mustContain": ">en-US<" }, { "path": "/gssp/first", "status": 200, "mustContain": "slug\":\"first\"" }, { "path": "/en/gssp/first", "status": 200, "mustContain": "gssp page" }, { "path": "/en/gssp/first", "status": 200, "mustContain": ">en<" }, { "path": "/en/gssp/first", "status": 200, "mustContain": "slug\":\"first\"" }, { "path": "/nl/gssp/first", "status": 200, "mustContain": "gssp page" }, { "path": "/nl/gssp/first", "status": 200, "mustContain": ">nl<" }, { "path": "/nl/gssp/first", "status": 200, "mustContain": "slug\":\"first\"" }, { "path": "/fr/gssp/first", "status": 200, "mustContain": "gssp page" }, { "path": "/fr/gssp/first", "status": 200, "mustContain": ">fr<" }, { "path": "/fr/gssp/first", "status": 200, "mustContain": "slug\":\"first\"" } ] } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/pages/another.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

another page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getServerSideProps = ({ locale, locales }) => { return { props: { locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/pages/auto-export/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

auto-export page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to / ); } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/pages/dynamic/[slug].js ================================================ import { useRouter } from 'next/router'; export default function Dynamic(props) { const router = useRouter(); return ( <>

dynamic page

{JSON.stringify(router.query)}

); } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/pages/gsp/fallback/[slug].js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); if (router.isFallback) return 'Loading...'; return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getStaticProps = ({ params, locale, locales }) => { return { props: { params, locale, locales, }, }; }; export const getStaticPaths = () => { return { // the default locale will be used since one isn't defined here paths: ['first', 'second'].map(slug => ({ params: { slug }, })), fallback: true, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/pages/gsp/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } // TODO: should non-dynamic GSP pages pre-render for each locale? export const getStaticProps = ({ locale, locales }) => { return { props: { locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/pages/gsp/no-fallback/[slug].js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); if (router.isFallback) return 'Loading...'; return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getStaticProps = ({ params, locale, locales }) => { return { props: { params, locale, locales, }, }; }; export const getStaticPaths = () => { return { paths: [ { params: { slug: 'first' } }, '/gsp/no-fallback/second', { params: { slug: 'first' }, locale: 'en-US' }, '/nl-NL/gsp/no-fallback/second', ], fallback: false, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/pages/gssp/[slug].js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

gssp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getServerSideProps = ({ params, locale, locales }) => { return { props: { params, locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/pages/gssp/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

gssp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getServerSideProps = ({ locale, locales }) => { return { props: { locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/pages/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

index page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /another
to /gsp
to /gsp/fallback/first
to /gsp/fallback/hello
to /gsp/no-fallback/first
to /gssp
to /gssp/first
); } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/pages/links.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); const { nextLocale } = router.query; return ( <>

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /another
to /gsp
to /gsp/fallback/first
to /gsp/fallback/hello
to /gsp/no-fallback/first
to /gssp
to /gssp/first
); } // make SSR page so we have query values immediately export const getServerSideProps = () => { return { props: {}, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/pages/not-found/fallback/[slug].js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); if (router.isFallback) return 'Loading...'; return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getStaticProps = ({ params, locale, locales }) => { if (locale === 'en' || locale === 'nl') { return { notFound: true, }; } return { props: { params, locale, locales, }, }; }; export const getStaticPaths = () => { return { // the default locale will be used since one isn't defined here paths: ['first', 'second'].map(slug => ({ params: { slug }, })), fallback: true, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/pages/not-found/index.js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; export default function Page(props) { const router = useRouter(); return ( <>

gsp page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

to /
); } export const getStaticProps = ({ locale, locales }) => { if (locale === 'en' || locale === 'nl') { return { notFound: true, }; } return { props: { locale, locales, }, }; }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-no-shared-lambdas/public/hello.txt ================================================ hello world! ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-root-catchall/additional.js ================================================ /* eslint-env jest */ const cheerio = require('cheerio'); const { check, waitFor } = require('../../utils'); const fetch = require('../../../../../test/lib/deployment/fetch-retry'); async function checkForChange(url, initialValue, hardError) { return check( async () => { const res = await fetch(url); if (res.status !== 200) { throw new Error(`Invalid status code ${res.status}`); } const $ = cheerio.load(await res.text()); const props = JSON.parse($('#props').text()); if (isNaN(props.random)) { throw new Error(`Invalid random value ${props.random}`); } const newValue = props.random; return initialValue !== newValue ? 'success' : 'fail'; }, 'success', hardError ); } module.exports = function (ctx) { it('should revalidate content properly from /', async () => { const res = await fetch(`${ctx.deploymentUrl}/`); expect(res.status).toBe(200); let $ = cheerio.load(await res.text()); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('en-US'); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#router-locale').text()).toBe('en-US'); await checkForChange(`${ctx.deploymentUrl}/`, initialRandom); }); it('should revalidate content properly from /fr', async () => { const res = await fetch(`${ctx.deploymentUrl}/fr`); expect(res.status).toBe(200); let $ = cheerio.load(await res.text()); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('fr'); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/fr`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#router-locale').text()).toBe('fr'); await checkForChange(`${ctx.deploymentUrl}/fr`, initialRandom); }); it('should revalidate content properly from /nl-NL', async () => { const res = await fetch(`${ctx.deploymentUrl}/nl-NL`); expect(res.status).toBe(200); let $ = cheerio.load(await res.text()); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('nl-NL'); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/nl-NL`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#router-locale').text()).toBe('nl-NL'); await checkForChange(`${ctx.deploymentUrl}/nl-NL`, initialRandom); }); it('should revalidate content properly from /second', async () => { const res = await fetch(`${ctx.deploymentUrl}/second`); expect(res.status).toBe(200); const html = await res.text(); let $ = cheerio.load(html); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('en-US'); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/second`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#router-locale').text()).toBe('en-US'); await checkForChange(`${ctx.deploymentUrl}/second`, initialRandom); }); it('should revalidate content properly from /fr/second', async () => { const res = await fetch(`${ctx.deploymentUrl}/fr/second`); expect(res.status).toBe(200); const html = await res.text(); let $ = cheerio.load(html); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('fr'); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/fr/second`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#router-locale').text()).toBe('fr'); await checkForChange(`${ctx.deploymentUrl}/fr/second`, initialRandom); }); it('should revalidate content properly from /nl-NL/second', async () => { const res = await fetch(`${ctx.deploymentUrl}/nl-NL/second`); expect(res.status).toBe(200); const html = await res.text(); let $ = cheerio.load(html); const props = JSON.parse($('#props').text()); const initialRandom = props.random; expect($('#router-locale').text()).toBe('nl-NL'); // wait for revalidation to occur await waitFor(2000); const res2 = await fetch(`${ctx.deploymentUrl}/nl-NL/second`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#router-locale').text()).toBe('nl-NL'); await checkForChange(`${ctx.deploymentUrl}/nl-NL/second`, initialRandom); }); }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-root-catchall/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, i18n: { locales: ['nl-NL', 'nl-BE', 'nl', 'fr-BE', 'fr', 'en-US', 'en'], defaultLocale: 'en-US', // TODO: testing locale domains support, will require custom // testing set-up as test accounts are used currently domains: [ { domain: 'example.be', defaultLocale: 'nl-BE', }, { domain: 'example.fr', defaultLocale: 'fr', }, ], }, }; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-root-catchall/now.json ================================================ { "version": 2, "builds": [ { "src": "package.json", "use": "@vercel/next" } ], "probes": [ { "path": "/hello.txt", "status": 200, "mustContain": "hello world!" }, { "path": "/", "headers": { "accept-language": "en;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//en/" } }, { "path": "/", "headers": { "accept-language": "nl;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//nl/" } }, { "path": "/", "headers": { "accept-language": "nl-NL;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//nl-NL/" } }, { "path": "/", "headers": { "accept-language": "fr;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "//fr/" } }, { "path": "/", "headers": { "accept-language": "en-US;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "catchall page" }, { "path": "/en-US", "headers": { "accept-language": "nl;q=0.9" }, "fetchOptions": { "redirect": "manual" }, "status": 200, "mustContain": "catchall page" }, { "path": "/", "status": 200, "mustContain": "catchall page" }, { "path": "/", "status": 200, "mustContain": ">en-US<" }, { "path": "/en", "status": 200, "mustContain": "catchall page" }, { "path": "/en", "status": 200, "mustContain": ">en<" }, { "path": "/fr", "status": 200, "mustContain": "catchall page" }, { "path": "/fr", "status": 200, "mustContain": ">fr<" }, { "path": "/nl", "status": 200, "mustContain": "catchall page" }, { "path": "/nl", "status": 200, "mustContain": ">nl<" }, { "path": "/nl-NL", "status": 200, "mustContain": "catchall page" }, { "path": "/nl-NL", "status": 200, "mustContain": ">nl-NL<" }, { "path": "/first", "status": 200, "mustContain": "catchall page" }, { "path": "/first", "status": 200, "mustContain": ">en-US<" }, { "path": "/en/first", "status": 200, "mustContain": "catchall page" }, { "path": "/en/first", "status": 200, "mustContain": ">en<" }, { "path": "/fr/first", "status": 200, "mustContain": "catchall page" }, { "path": "/fr/first", "status": 200, "mustContain": ">fr<" }, { "path": "/nl/first", "status": 200, "mustContain": "catchall page" }, { "path": "/nl/first", "status": 200, "mustContain": ">nl<" }, { "path": "/nl-NL/first", "status": 200, "mustContain": "catchall page" }, { "path": "/nl-NL/first", "status": 200, "mustContain": ">nl-NL<" } ] } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-root-catchall/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-root-catchall/pages/[[...slug]].js ================================================ import Link from 'next/link'; import { useRouter } from 'next/router'; const Slug = props => { const router = useRouter(); // invariant ensuring fallback is never accidentally flipped if (router.isFallback) { return 'Loading...'; } return (

catchall page

{JSON.stringify(props)}

{router.locale}

{JSON.stringify(router.locales)}

{JSON.stringify(router.query)}

{router.pathname}

{router.asPath}

/nl-NL/gsp/blocking/hallo-wereld
/nl-NL/gsp/blocking/42
/fr/gsp/blocking/hallo-welt
/fr/gsp/blocking/42
/
); }; export const getStaticProps = ({ params }) => { return { props: { params, random: Math.random(), catchall: 'yes', }, revalidate: 1, }; }; export const getStaticPaths = ({ locales }) => { const paths = []; for (const locale of locales) { paths.push({ params: { slug: ['first'] }, locale }); paths.push({ params: { slug: ['first'] }, locale }); } return { paths, fallback: 'blocking', }; }; export default Slug; ================================================ FILE: packages/runtime/test/fixtures/00-i18n-support-root-catchall/public/hello.txt ================================================ hello world! ================================================ FILE: packages/runtime/test/fixtures/00-optional-fallback-revalidate/additional.js ================================================ /* eslint-env jest */ const fetch = require('../../../../../test/lib/deployment/fetch-retry'); const cheerio = require('cheerio'); const { waitFor, check } = require('../../utils'); module.exports = function (ctx) { const getProps = async path => { const html = await fetch(`${ctx.deploymentUrl}/${path}`).then(res => res.text() ); const $ = cheerio.load(html); return JSON.parse($('#props').text()); }; const getInitialData = async path => { return fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id${path}.json` ).then(res => res.json()); }; async function checkForChange(url, initialValue, hardError) { return check( async () => { const props = await getProps(url); if (isNaN(props.random)) { throw new Error(`Invalid random value ${props.random}`); } const newValue = props.random; return initialValue !== newValue ? 'success' : 'fail'; }, 'success', hardError ); } it('should render / correctly', async () => { const props = await getInitialData(''); expect(props.pageProps.params).toEqual({}); await waitFor(2000); await getProps('/'); const newProps = await getProps('/'); expect(newProps.params).toEqual({}); await checkForChange('/', props.pageProps.random); }); it('should render /a correctly', async () => { const props = await getInitialData('/a'); expect(props.pageProps.params).toEqual({ slug: ['a'] }); await waitFor(2000); await getProps('/a'); const newProps = await getProps('/a'); expect(newProps.params).toEqual({ slug: ['a'] }); await checkForChange('/a', props.pageProps.random); }); it('should render /hello/world correctly', async () => { const props = await getInitialData('/hello/world'); expect(props.pageProps.params).toEqual({ slug: ['hello', 'world'] }); await waitFor(2000); await getProps('/hello/world'); const newProps = await getProps('/hello/world'); expect(newProps.params).toEqual({ slug: ['hello', 'world'] }); await checkForChange('/hello/world', props.pageProps.random); }); it('should render /posts correctly', async () => { const props = await getInitialData('/posts'); expect(props.pageProps.params).toEqual({}); await waitFor(2000); await getProps('/posts'); const newProps = await getProps('/posts'); expect(newProps.params).toEqual({}); await checkForChange('/posts', props.pageProps.random); }); it('should render /posts/a correctly', async () => { const props = await getInitialData('/posts/a'); expect(props.pageProps.params).toEqual({ slug: ['a'] }); await waitFor(2000); await getProps('/posts/a'); const newProps = await getProps('/posts/a'); expect(newProps.params).toEqual({ slug: ['a'] }); await checkForChange('/posts/a', props.pageProps.random); }); it('should render /posts/hello/world correctly', async () => { const props = await getInitialData('/posts/hello/world'); expect(props.pageProps.params).toEqual({ slug: ['hello', 'world'] }); await waitFor(2000); await getProps('/posts/hello/world'); const newProps = await getProps('/posts/hello/world'); expect(newProps.params).toEqual({ slug: ['hello', 'world'] }); await checkForChange('/posts/hello/world', props.pageProps.random); }); }; ================================================ FILE: packages/runtime/test/fixtures/00-optional-fallback-revalidate/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/00-optional-fallback-revalidate/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/00-optional-fallback-revalidate/pages/[[...slug]].js ================================================ export default function Home(props) { return
{JSON.stringify(props)}
; } export async function getStaticPaths() { return { paths: [{ params: { slug: ['a'] } }], fallback: true, }; } export async function getStaticProps({ params }) { return { props: { params, random: Math.random(), }, revalidate: 1, }; } ================================================ FILE: packages/runtime/test/fixtures/00-optional-fallback-revalidate/pages/posts/[[...slug]].js ================================================ export default function Home(props) { return
{JSON.stringify(props)}
; } export async function getStaticPaths() { return { paths: [{ params: { slug: ['a'] } }], fallback: true, }; } export async function getStaticProps({ params }) { return { props: { params, random: Math.random(), }, revalidate: 1, }; } ================================================ FILE: packages/runtime/test/fixtures/00-optional-fallback-revalidate/vercel.json ================================================ { "version": 2, "builds": [ { "src": "package.json", "use": "@vercel/next" } ] } ================================================ FILE: packages/runtime/test/fixtures/00-public-dir-output-dir/now.json ================================================ { "version": 2, "builds": [ { "src": "package.json", "use": "@vercel/next", "config": { "outputDirectory": "web/.next" } } ], "probes": [ { "path": "/", "status": 200, "mustContain": "Index page" }, { "path": "/dynamic/first", "status": 200, "mustContain": "Dynamic Page" }, { "path": "/dynamic-ssr/second", "status": 200, "mustContain": "Dynamic SSR Page" }, { "path": "/hello.txt", "status": 200, "mustContain": "hello world!" }, { "path": "/public/data.txt", "status": 200, "mustContain": "data!!" } ] } ================================================ FILE: packages/runtime/test/fixtures/00-public-dir-output-dir/package.json ================================================ { "scripts": { "build": "next build web" }, "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/00-public-dir-output-dir/web/pages/dynamic/[slug].js ================================================ export default function Dynamic() { return

Dynamic Page

; } ================================================ FILE: packages/runtime/test/fixtures/00-public-dir-output-dir/web/pages/dynamic-ssr/[slug].js ================================================ export function getServerSideProps() { return { props: { hello: 'world', random: Math.random(), }, }; } export default function Dynamic() { return

Dynamic SSR Page

; } ================================================ FILE: packages/runtime/test/fixtures/00-public-dir-output-dir/web/pages/index.js ================================================ export default function Index() { return

Index page

; } ================================================ FILE: packages/runtime/test/fixtures/00-public-dir-output-dir/web/public/hello.txt ================================================ hello world! ================================================ FILE: packages/runtime/test/fixtures/00-public-dir-output-dir/web/public/public/data.txt ================================================ data!! ================================================ FILE: packages/runtime/test/fixtures/00-root-optional-revalidate/additional.js ================================================ /* eslint-env jest */ const fetch = require('node-fetch'); const cheerio = require('cheerio'); const waitFor = ms => new Promise(resolve => setTimeout(resolve, ms)); module.exports = function (ctx) { const getProps = async path => { const html = await fetch(`${ctx.deploymentUrl}/${path}`).then(res => res.text() ); const $ = cheerio.load(html); return JSON.parse($('#props').text()); }; it('should render / correctly', async () => { const props = await getProps('/', { params: {} }); expect(props.params).toEqual({}); await waitFor(4000); await getProps('/'); const newProps = await getProps('/', { params: {} }); expect(newProps.params).toEqual({}); expect(props.random).not.toBe(newProps.random); }); it('should render /a correctly', async () => { const props = await getProps('/a'); expect(props.params).toEqual({ slug: ['a'] }); await waitFor(4000); await getProps('/a'); const newProps = await getProps('/a'); expect(newProps.params).toEqual({ slug: ['a'] }); expect(props.random).not.toBe(newProps.random); }); it('should render /hello/world correctly', async () => { const props = await getProps('/hello/world'); expect(props.params).toEqual({ slug: ['hello', 'world'] }); await waitFor(4000); await getProps('/hello/world'); const newProps = await getProps('/hello/world'); expect(newProps.params).toEqual({ slug: ['hello', 'world'] }); expect(props.random).not.toBe(newProps.random); }); }; ================================================ FILE: packages/runtime/test/fixtures/00-root-optional-revalidate/now.json ================================================ { "version": 2, "builds": [ { "src": "package.json", "use": "@vercel/next" } ], "probes": [ { "path": "/non-existent", "status": 404 } ] } ================================================ FILE: packages/runtime/test/fixtures/00-root-optional-revalidate/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/00-root-optional-revalidate/pages/[[...slug]].js ================================================ export default function Home(props) { return
{JSON.stringify(props)}
; } export async function getStaticPaths() { return { paths: [ { params: { slug: false } }, { params: { slug: ['a'] } }, { params: { slug: ['hello', 'world'] } }, ], fallback: false, }; } export async function getStaticProps({ params }) { return { props: { params, random: Math.random(), }, revalidate: 1, }; } ================================================ FILE: packages/runtime/test/fixtures/00-shared-lambdas/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/00-shared-lambdas/now.json ================================================ { "version": 2, "uploadNowJson": true, "builds": [ { "src": "package.json", "use": "@vercel/next" } ], "probes": [ { "path": "/teams/invite/hello", "mustContain": "hello from /teams/invite/[inviteCode] hello" }, { "path": "/groups/first", "mustContain": "hello from /groups/[id] first" }, { "path": "/groups/second", "mustContain": "hello from /groups/[id] second" }, { "path": "/groups/third", "mustContain": "loading..." }, { "path": "/another/invite/hello", "mustContain": "hello from /[teamSlug]/[project]/[id]" }, { "logMustNotContain": "WARNING: your application is being opted out of @vercel/next's optimized lambdas mode due to legacy routes" }, { "logMustNotContain": "WARNING: Your application is being opted out of \"@vercel/next\" optimized lambdas mode due to `functions` config" } ] } ================================================ FILE: packages/runtime/test/fixtures/00-shared-lambdas/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/00-shared-lambdas/pages/[teamSlug]/[project]/[id].js ================================================ export default () => 'hello from /[teamSlug]/[project]/[id]'; ================================================ FILE: packages/runtime/test/fixtures/00-shared-lambdas/pages/groups/[id].js ================================================ import { useRouter } from 'next/router'; export const getStaticProps = ({ params }) => { return { props: { id: params.id, }, }; }; export const getStaticPaths = () => ({ paths: ['first', 'second'].map(id => ({ params: { id } })), fallback: true, }); export default ({ id }) => useRouter().isFallback ? `loading...` : `hello from /groups/[id] ${id}`; ================================================ FILE: packages/runtime/test/fixtures/00-shared-lambdas/pages/teams/invite/[inviteCode].js ================================================ export const getServerSideProps = ({ params }) => { return { props: { code: params.inviteCode, }, }; }; export default ({ code }) => `hello from /teams/invite/[inviteCode] ${code}`; ================================================ FILE: packages/runtime/test/fixtures/00-trailing-slash-add-export/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, trailingSlash: true, }; ================================================ FILE: packages/runtime/test/fixtures/00-trailing-slash-add-export/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/foo/", "status": 200, "mustContain": "foo page" }, { "fetchOptions": { "redirect": "manual" }, "path": "/foo", "status": 308, "responseHeaders": { "refresh": "/url=/foo/$/" } }, { "path": "/non-existent", "status": 404, "mustContain": "oops 404" }, { "path": "/non-existent/", "status": 404, "fetchOptions": { "redirect": "manual" }, "mustContain": "oops 404" } ] } ================================================ FILE: packages/runtime/test/fixtures/00-trailing-slash-add-export/package.json ================================================ { "scripts": { "build": "next build && next export" }, "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/00-trailing-slash-add-export/pages/404.js ================================================ export default () => 'oops 404'; ================================================ FILE: packages/runtime/test/fixtures/00-trailing-slash-add-export/pages/foo.js ================================================ export default function Page() { return

foo page

; } ================================================ FILE: packages/runtime/test/fixtures/00-trailing-slash-remove/next.config.js ================================================ module.exports = { trailingSlash: false }; ================================================ FILE: packages/runtime/test/fixtures/00-trailing-slash-remove/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/foo", "status": 200, "mustContain": "foo page" }, { "fetchOptions": { "redirect": "manual" }, "path": "/foo/", "status": 308, "responseHeaders": { "refresh": "/url=/foo$/" } }, { "path": "/abc/def", "status": 200, "mustContain": "nested page" }, { "fetchOptions": { "redirect": "manual" }, "path": "/abc/def/", "status": 308, "responseHeaders": { "refresh": "/url=/abc/def$/" } }, { "fetchOptions": { "redirect": "manual" }, "path": "/test.txt/", "status": 308, "responseHeaders": { "refresh": "/url=/test\\.txt$/" } }, { "fetchOptions": { "redirect": "manual" }, "path": "/test.txt", "status": 200, "mustContain": "this is a file" } ] } ================================================ FILE: packages/runtime/test/fixtures/00-trailing-slash-remove/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/00-trailing-slash-remove/pages/abc/def.js ================================================ export default function Page() { return

nested page

; } ================================================ FILE: packages/runtime/test/fixtures/00-trailing-slash-remove/pages/foo.js ================================================ export default function Page() { return

foo page

; } ================================================ FILE: packages/runtime/test/fixtures/00-trailing-slash-remove/public/test.txt ================================================ this is a file ================================================ FILE: packages/runtime/test/fixtures/01-cache-headers/next.config.js ================================================ module.exports = { async headers() { return [ { source: '/_next/static/testing-build-id/_buildManifest.js', headers: [ { key: 'cache-control', value: 'no-cache', }, ], }, ]; }, generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/01-cache-headers/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/_next/__NEXT_SCRIPT__(/)", "responseHeaders": { "cache-control": "public,max-age=31536000,immutable" } }, { "path": "/_next/static/testing-build-id/_buildManifest.js", "responseHeaders": { "cache-control": "public,max-age=31536000,immutable" } }, { "path": "/_next/static/invalid-build-id/pages/non-existent.js", "notResponseHeaders": { "cache-control": "public,max-age=31536000,immutable" } }, { "path": "/_next/static/invalid-build-id/pages/non-existent.js", "mustNotContain": "final route" } ] } ================================================ FILE: packages/runtime/test/fixtures/01-cache-headers/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/01-cache-headers/pages/[team]/[project]/[deployment]/[another]/[final]/index.js ================================================ export default () => 'hi from final route'; ================================================ FILE: packages/runtime/test/fixtures/01-cache-headers/pages/[team]/[project]/[deployment]/[another]/index.js ================================================ export default () => 'hi from another route'; ================================================ FILE: packages/runtime/test/fixtures/01-cache-headers/pages/[team]/[project]/[deployment]/index.js ================================================ export default () => 'hi from deployment route'; ================================================ FILE: packages/runtime/test/fixtures/01-cache-headers/pages/[team]/[project]/index.js ================================================ export default () => 'hi from project route'; ================================================ FILE: packages/runtime/test/fixtures/01-cache-headers/pages/[team]/index.js ================================================ export default () => 'hi from team route'; ================================================ FILE: packages/runtime/test/fixtures/01-cache-headers/pages/index.js ================================================ export default () => 'Hi'; ================================================ FILE: packages/runtime/test/fixtures/03-next-8/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/03-next-8/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/hello1", "mustContain": "Hello World 1" }, { "path": "/nested/hello2", "mustContain": "Hello World 2" } ] } ================================================ FILE: packages/runtime/test/fixtures/03-next-8/package.json ================================================ { "dependencies": { "next": "8.x.x", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/03-next-8/pages/hello1.js ================================================ function A({ data }) { return
{data}
; } A.getInitialProps = () => ({ data: 'Hello World 1' }); export default A; ================================================ FILE: packages/runtime/test/fixtures/03-next-8/pages/nested/hello2.js ================================================ function B({ data }) { return
{data}
; } B.getInitialProps = () => ({ data: 'Hello World 2' }); export default B; ================================================ FILE: packages/runtime/test/fixtures/04-firebase-node-10/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/04-firebase-node-10/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/nested/fb", "mustContain": "Hello Firebase: 0" }, { "path": "/nested/moar/fb", "mustContain": "Hello Firebase: 0" } ] } ================================================ FILE: packages/runtime/test/fixtures/04-firebase-node-10/package.json ================================================ { "engines": { "node": "10.x" }, "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6", "firebase": "6.3.4" } } ================================================ FILE: packages/runtime/test/fixtures/04-firebase-node-10/pages/nested/fb.js ================================================ import firebase from 'firebase/app'; import 'firebase/firestore'; if (!firebase.apps.length) { firebase.initializeApp({ projectId: 'noop' }); } const store = firebase.firestore(); const Comp = ({ results }) => { return
Hello Firebase: {results}
; }; Comp.getInitialProps = async () => { const query = await store.collection('users').get(); return { results: query.size }; }; export default Comp; ================================================ FILE: packages/runtime/test/fixtures/04-firebase-node-10/pages/nested/moar/[dynamic_fb].js ================================================ import firebase from 'firebase/app'; import 'firebase/firestore'; if (!firebase.apps.length) { firebase.initializeApp({ projectId: 'noop' }); } const store = firebase.firestore(); const Comp = ({ results }) => { return
Hello Firebase: {results}
; }; Comp.getInitialProps = async () => { const query = await store.collection('users').get(); return { results: query.size }; }; export default Comp; ================================================ FILE: packages/runtime/test/fixtures/05-spr-support/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/05-spr-support/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/lambda", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/forever", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "delay": 2000 }, { "path": "/forever", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/another", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "delay": 2000 }, { "path": "/another", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/blog/post-1", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "delay": 2000 }, { "path": "/blog/post-1", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/blog/post-2", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "delay": 2000 }, { "path": "/blog/post-2", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/blog/post-3", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "delay": 2000 }, { "path": "/blog/post-3", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE/" } }, { "path": "/_next/data/testing-build-id/blog/post-4.json", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "delay": 2000 }, { "path": "/_next/data/testing-build-id/blog/post-4.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE/" } }, { "path": "/blog/post-1/comment-1", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "path": "/blog/post-2/comment-2", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "path": "/blog/post-3/comment-3", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/_next/data/testing-build-id/lambda.json", "status": 404 }, { "path": "/_next/data/testing-build-id/forever.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/PRERENDER|HIT/" } }, { "delay": 2000 }, { "path": "/_next/data/testing-build-id/forever.json", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/_next/data/testing-build-id/another.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE/" } }, { "path": "/_next/data/testing-build-id/another2.json", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "delay": 2000 }, { "path": "/_next/data/testing-build-id/another2.json", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/_next/data/testing-build-id/blog/post-1.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE|PRERENDER/" } }, { "path": "/_next/data/testing-build-id/blog/post-1337/comment-1337.json", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } } ] } ================================================ FILE: packages/runtime/test/fixtures/05-spr-support/package.json ================================================ { "dependencies": { "next": "9.1.6-canary.1", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/05-spr-support/pages/another.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function unstable_getStaticProps() { return { props: { world: 'world', time: new Date().getTime(), }, revalidate: 5, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/05-spr-support/pages/another2.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function unstable_getStaticProps() { return { props: { world: 'world', time: new Date().getTime(), }, revalidate: 5, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/05-spr-support/pages/api/noop.js ================================================ export default (_, res) => { res.send('OK'); }; ================================================ FILE: packages/runtime/test/fixtures/05-spr-support/pages/blog/[post]/[comment].js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function unstable_getStaticPaths() { return [ '/blog/post-1/comment-1', { params: { post: 'post-2', comment: 'comment-2' } }, '/blog/post-1337/comment-1337', ]; } // eslint-disable-next-line camelcase export async function unstable_getStaticProps({ params }) { return { props: { post: params.post, comment: params.comment, time: new Date().getTime(), }, revalidate: 2, }; } export default ({ post, comment, time }) => { return ( <>

Post: {post}

Comment: {comment}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/05-spr-support/pages/blog/[post]/index.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function unstable_getStaticPaths() { return ['/blog/post-1', { params: { post: 'post-2' } }]; } // eslint-disable-next-line camelcase export async function unstable_getStaticProps({ params }) { if (params.post === 'post-10') { await new Promise(resolve => { setTimeout(() => resolve(), 1000); }); } return { props: { post: params.post, time: (await import('perf_hooks')).performance.now(), }, revalidate: 10, }; } export default ({ post, time }) => { return ( <>

Post: {post}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/05-spr-support/pages/forever.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function unstable_getStaticProps() { return { props: { world: 'world', time: new Date().getTime(), }, revalidate: false, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/05-spr-support/pages/index.js ================================================ export default () => 'Hi'; ================================================ FILE: packages/runtime/test/fixtures/05-spr-support/pages/lambda.js ================================================ const Page = ({ data }) =>

{data} world

; Page.getInitialProps = () => ({ data: 'hello' }); export default Page; ================================================ FILE: packages/runtime/test/fixtures/06-lambda-with-memory/now.json ================================================ { "builds": [ { "src": "package.json", "use": "@vercel/next", "config": { "functions": { "src/pages/api/memory.js": { "memory": 128 }, "src/pages/api/index.js": { "memory": 192 }, "src/pages/api/sub/index.ts": { "memory": 128 }, "src/pages/api/sub/another.ts": { "memory": 192 } } } } ], "probes": [ { "path": "/api/memory", "status": 200, "mustContain": "128" }, { "path": "/api", "status": 200, "mustContain": "192" }, { "path": "/api/sub", "status": 200, "mustContain": "128" }, { "path": "/api/sub/another", "status": 200, "mustContain": "192" }, { "logMustContain": "WARNING: Your application is being opted out of \"@vercel/next\" optimized lambdas mode due to `functions` config" } ] } ================================================ FILE: packages/runtime/test/fixtures/06-lambda-with-memory/package.json ================================================ { "private": true, "dependencies": { "@types/node": "^12.12.56", "@types/react": "^16.9.49", "next": "canary", "react": "^16.13.1", "react-dom": "^16.13.1", "typescript": "^4.0.2" } } ================================================ FILE: packages/runtime/test/fixtures/06-lambda-with-memory/src/pages/api/index.js ================================================ export default function (req, res) { res.end(`${process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE}`); } ================================================ FILE: packages/runtime/test/fixtures/06-lambda-with-memory/src/pages/api/memory.js ================================================ export default function (req, res) { res.end(`${process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE}`); } ================================================ FILE: packages/runtime/test/fixtures/06-lambda-with-memory/src/pages/api/sub/another.ts ================================================ export default function (req: any, res: any) { res.end(`${process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE}`); } ================================================ FILE: packages/runtime/test/fixtures/06-lambda-with-memory/src/pages/api/sub/index.ts ================================================ export default function (req: any, res: any) { res.end(`${process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE}`); } ================================================ FILE: packages/runtime/test/fixtures/07-custom-routes/next.config.js ================================================ module.exports = { async redirects() { return [ { source: '/redir1', destination: '/redir2', permanent: true, }, { source: '/redir2', destination: '/hello', permanent: false, }, { source: '/redir/:path', destination: '/:path', permanent: false, }, ]; }, async rewrites() { return [ { source: '/rewrite1', destination: '/rewrite2', }, { source: '/rewrite2', destination: '/hello', }, { source: '/rewrite/:first/:second', destination: '/rewrite-2/hello/:second', }, { source: '/rewrite-2/:first/:second', destination: '/params', }, { source: '/add-header', destination: '/hello', }, { source: '/catchall-header/:path*', destination: '/hello', }, ]; }, async headers() { return [ { source: '/add-header', headers: [ { key: 'x-hello', value: 'world', }, { key: 'x-another', value: 'value', }, ], }, { source: '/catchall-header/:path*', headers: [ { key: 'x-hello', value: 'world', }, { key: 'x-another', value: 'value', }, ], }, ]; }, }; ================================================ FILE: packages/runtime/test/fixtures/07-custom-routes/now.json ================================================ { "version": 2, "uploadNowJson": true, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/redir1", "fetchOptions": { "redirect": "manual" }, "status": 308, "responseHeaders": { "location": "/redir2/" } }, { "path": "/redir2", "fetchOptions": { "redirect": "manual" }, "status": 307, "responseHeaders": { "location": "/hello/" } }, { "path": "/redir/hello", "fetchOptions": { "redirect": "manual" }, "responseHeadersCo": { "location": "/hello/" }, "status": 307 }, { "path": "/rewrite1", "mustContain": "hello world!" }, { "path": "/rewrite2", "mustContain": "hello world!" }, { "path": "/rewrite/THIS_SHOULD_BE_GONE/another", "mustContain": "hello" }, { "path": "/rewrite/THIS_SHOULD_BE_GONE/another", "mustContain": "another" }, { "path": "/add-header", "responseHeaders": { "x-hello": "world", "x-another": "value" } }, { "path": "/catchall-header/first", "responseHeaders": { "x-hello": "world", "x-another": "value" } }, { "logMustNotContain": "WARNING: your application is being opted out of @vercel/next's optimized lambdas mode due to legacy routes" }, { "logMustNotContain": "WARNING: Your application is being opted out of \"@vercel/next\" optimized lambdas mode due to `functions` config" } ] } ================================================ FILE: packages/runtime/test/fixtures/07-custom-routes/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/07-custom-routes/pages/hello.js ================================================ export default () => 'hello world!'; ================================================ FILE: packages/runtime/test/fixtures/07-custom-routes/pages/params.js ================================================ import { useRouter } from 'next/router'; const Page = () => { const { query } = useRouter(); return

{JSON.stringify(query)}

; }; Page.getInitialProps = () => ({ a: 'b' }); export default Page; ================================================ FILE: packages/runtime/test/fixtures/08-custom-routes-catchall/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, async rewrites() { return [ { source: '/:path*', destination: '/params', }, ]; }, }; ================================================ FILE: packages/runtime/test/fixtures/08-custom-routes-catchall/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/_next/__NEXT_SCRIPT__(/hello)", "mustContain": "hello world" }, { "path": "/something", "mustContain": "something" } ] } ================================================ FILE: packages/runtime/test/fixtures/08-custom-routes-catchall/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/08-custom-routes-catchall/pages/hello.js ================================================ const Page = () => 'hello world'; Page.getInitialProps = () => ({ hello: 'world' }); export default Page; ================================================ FILE: packages/runtime/test/fixtures/08-custom-routes-catchall/pages/params.js ================================================ import { useRouter } from 'next/router'; const Page = () => { const { query } = useRouter(); return

{JSON.stringify(query)}

; }; Page.getInitialProps = () => ({ a: 'b' }); export default Page; ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/.gitignore ================================================ node_modules .next .env tsconfig.tsbuildinfo .DS_Store *.log ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/lerna.json ================================================ { "packages": ["packages/*"], "npmClient": "yarn", "version": "0.0.0" } ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/now.json ================================================ { "version": 2, "uploadNowJson": true, "builds": [{ "src": "packages/web/next.config.js", "use": "@vercel/next" }], "routes": [{ "src": "/(.*)", "dest": "/packages/web/$1", "continue": true }], "probes": [ { "path": "/", "mustContain": "hello world 6" }, { "logMustContain": "WARNING: your application is being opted out of @vercel/next's optimized lambdas mode due to legacy routes" } ] } ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/package.json ================================================ { "private": true, "workspaces": { "packages": [ "packages/*" ] }, "scripts": { "postinstall": "lerna run build --scope=@jimmy/common" }, "devDependencies": { "lerna": "^3.19.0" } } ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/packages/common/dist/index.d.ts ================================================ export declare const add: (a: number, b: number) => number; ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/packages/common/dist/index.js ================================================ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); exports.add = (a, b) => { return a + b; }; //# sourceMappingURL=index.js.map ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/packages/common/package.json ================================================ { "name": "@jimmy/common", "version": "1.0.64", "types": "dist/index.d.ts", "main": "dist/index.js", "license": "MIT", "scripts": { "watch": "tsc -w", "build": "tsc" }, "devDependencies": { "typescript": "^3.7.3" } } ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/packages/common/src/index.ts ================================================ export const add = (a: number, b: number) => { return a + b; }; ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/packages/common/tsconfig.json ================================================ { "compilerOptions": { "sourceMap": true, "removeComments": true, "strict": true, "noImplicitAny": true, "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitThis": true, "alwaysStrict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "skipLibCheck": true, "composite": true, "rootDir": "src", "outDir": "dist", "target": "es6", "module": "commonjs", "lib": ["dom", "es2017", "esnext.asynciterable", "es2017.object"], "declaration": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "resolveJsonModule": true }, "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.json"], "exclude": ["dist"] } ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/packages/web/next-env.d.ts ================================================ /// /// ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/packages/web/next.config.js ================================================ module.exports = {}; ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/packages/web/package.json ================================================ { "name": "@jimmy/web", "version": "1.0.67", "scripts": { "dev": "next", "build": "next build", "start": "next start" }, "dependencies": { "@jimmy/common": "^1.0.64", "next": "^9.1.4", "react": "^16.12.0", "react-dom": "^16.12.0" }, "devDependencies": { "@babel/plugin-syntax-class-properties": "^7.7.4", "@types/next": "^9.0.0", "@types/node": "^12.12.14", "@types/react": "^16.9.15", "@types/react-dom": "16.9.4", "typescript": "3.7.3" }, "license": "ISC" } ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/packages/web/pages/_app.tsx ================================================ import App from "next/app"; import React from "react"; class MyApp extends App { static async getInitialProps() { console.log("i am props"); return { q: 5, pageProps: {} }; } render() { const { Component, pageProps } = this.props; return ( <>
yo
); } } export default MyApp; ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/packages/web/pages/index.tsx ================================================ import { add } from "@jimmy/common"; export default () => { return
hello world {add(1, 5)}
; }; ================================================ FILE: packages/runtime/test/fixtures/09-yarn-workspaces/packages/web/tsconfig.json ================================================ { "compilerOptions": { "target": "esnext", "module": "esnext", "jsx": "preserve", "lib": ["dom", "es2017"], "baseUrl": ".", "moduleResolution": "node", "strict": true, "allowJs": true, "noEmit": true, "allowSyntheticDefaultImports": true, "esModuleInterop": true, "skipLibCheck": true, "noUnusedLocals": true, "noUnusedParameters": true, "isolatedModules": true, "removeComments": false, "preserveConstEnums": true, "sourceMap": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true }, "exclude": ["dist", ".next", "out", "next.config.js"], "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"] } ================================================ FILE: packages/runtime/test/fixtures/10-export-cache-headers/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/10-export-cache-headers/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/_next/__NEXT_SCRIPT__(/)", "responseHeaders": { "cache-control": "public,max-age=31536000,immutable" } }, { "path": "/_next/static/testing-build-id/_buildManifest.js", "responseHeaders": { "cache-control": "public,max-age=31536000,immutable" } }, { "path": "/", "mustContain": "nextExport\":true" } ] } ================================================ FILE: packages/runtime/test/fixtures/10-export-cache-headers/package.json ================================================ { "scripts": { "now-build": "next build && next export" }, "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/10-export-cache-headers/pages/index.js ================================================ const Page = () => 'Hi'; Page.getInitialProps = () => ({ hello: 'world' }); export default Page; ================================================ FILE: packages/runtime/test/fixtures/11-export-clean-urls/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/11-export-clean-urls/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/", "mustContain": "Hi There" }, { "path": "/about", "mustContain": "Hi on About" }, { "path": "/", "mustContain": "nextExport\":true" } ] } ================================================ FILE: packages/runtime/test/fixtures/11-export-clean-urls/package.json ================================================ { "scripts": { "vercel-build": "next build && next export" }, "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/11-export-clean-urls/pages/about.js ================================================ function About() { return
Hi on About
; } About.getInitialProps = () => ({}); export default About; ================================================ FILE: packages/runtime/test/fixtures/11-export-clean-urls/pages/index.js ================================================ function Home() { return
Hi There
; } Home.getInitialProps = () => ({}); export default Home; ================================================ FILE: packages/runtime/test/fixtures/12-no-export-auto/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, exportPathMap: d => d, }; ================================================ FILE: packages/runtime/test/fixtures/12-no-export-auto/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/", "mustContain": "Hi There" }, { "path": "/about", "mustContain": "Hi on About" }, { "path": "/", "mustNotContain": "nextExport\":true" } ] } ================================================ FILE: packages/runtime/test/fixtures/12-no-export-auto/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/12-no-export-auto/pages/about.js ================================================ function About() { return
Hi on About
; } About.getInitialProps = () => ({}); export default About; ================================================ FILE: packages/runtime/test/fixtures/12-no-export-auto/pages/index.js ================================================ function Home() { return
Hi There
; } Home.getInitialProps = () => ({}); export default Home; ================================================ FILE: packages/runtime/test/fixtures/13-export-custom-routes/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, exportPathMap: d => d, async rewrites() { return [ { source: '/first', destination: '/', }, ]; }, async redirects() { return [ { source: '/second', destination: '/about', permanent: false, }, ]; }, }; ================================================ FILE: packages/runtime/test/fixtures/13-export-custom-routes/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/first", "mustContain": "Hi There" }, { "path": "/second", "mustContain": "Hi on About" }, { "path": "/", "mustContain": "nextExport\":true" } ] } ================================================ FILE: packages/runtime/test/fixtures/13-export-custom-routes/package.json ================================================ { "scripts": { "build": "next build && next export" }, "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/13-export-custom-routes/pages/about.js ================================================ function About() { return
Hi on About
; } About.getInitialProps = () => ({}); export default About; ================================================ FILE: packages/runtime/test/fixtures/13-export-custom-routes/pages/index.js ================================================ function Home() { return
Hi There
; } Home.getInitialProps = () => ({}); export default Home; ================================================ FILE: packages/runtime/test/fixtures/14-next-offline/next.config.js ================================================ const withOffline = require('next-offline'); module.exports = withOffline({ generateBuildId() { return 'testing-build-id'; }, exportPathMap: d => d, }); ================================================ FILE: packages/runtime/test/fixtures/14-next-offline/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/", "mustContain": "Hi There" }, { "path": "/about", "mustContain": "Hi on About" }, { "path": "/", "mustNotContain": "nextExport\":true" } ] } ================================================ FILE: packages/runtime/test/fixtures/14-next-offline/package.json ================================================ { "dependencies": { "next": "canary", "next-offline": "4.0.6", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/14-next-offline/pages/about.js ================================================ function About() { return
Hi on About
; } About.getInitialProps = () => ({}); export default About; ================================================ FILE: packages/runtime/test/fixtures/14-next-offline/pages/index.js ================================================ function Home() { return
Hi There
; } Home.getInitialProps = () => ({}); export default Home; ================================================ FILE: packages/runtime/test/fixtures/16-base-path/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, basePath: '/docs', }; ================================================ FILE: packages/runtime/test/fixtures/16-base-path/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/docs/_next/__NEXT_SCRIPT__(/,/docs)", "responseHeaders": { "cache-control": "public,max-age=31536000,immutable" } }, { "path": "/docs/", "mustContain": "hello from index" }, { "path": "/docs", "mustContain": "hello from index" }, { "path": "/docs/another", "mustContain": "hello from another" }, { "path": "/", "mustNotContain": "hello from index" }, { "path": "/another", "mustNotContain": "hello from another" }, { "path": "/_next/__NEXT_SCRIPT__(/)", "mustNotContain": "hello from index" }, { "path": "/_next/__NEXT_SCRIPT__(/another)", "mustNotContain": "hello from another" }, { "path": "/docs/api/my-slug", "mustContain": "index slug: my-slug" }, { "path": "/docs/api/my-slug/another", "mustContain": "another slug: my-slug" }, { "path": "/docs/api/hello", "mustContain": "hello from hello" }, { "path": "/docs/blog/post-1", "mustContain": "index post: post-1" }, { "path": "/docs/blog/post-1/comments", "mustContain": "comments post: post-1" }, { "path": "/docs/_next/data/testing-build-id/blog/post-1.json", "status": 200, "mustContain": "\"post\"" }, { "path": "/docs/_next/data/testing-build-id/blog/post-2/comments.json", "status": 200, "mustContain": "\"post\"" }, { "path": "/docs/_next/data/testing-build-id/blog-ssg/post-1.json", "status": 200, "mustContain": "\"post\"" }, { "path": "/docs/_next/data/testing-build-id/blog-ssg/post-2/comments.json", "status": 200, "mustContain": "\"post\"" } ] } ================================================ FILE: packages/runtime/test/fixtures/16-base-path/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/16-base-path/pages/another.js ================================================ const Page = () => 'hello from another'; Page.getInitialProps = () => ({ hello: 'world' }); export default Page; ================================================ FILE: packages/runtime/test/fixtures/16-base-path/pages/api/[slug]/another.js ================================================ export default (req, res) => res.end(`another slug: ${req.query.slug}`); ================================================ FILE: packages/runtime/test/fixtures/16-base-path/pages/api/[slug]/index.js ================================================ export default (req, res) => res.end(`index slug: ${req.query.slug}`); ================================================ FILE: packages/runtime/test/fixtures/16-base-path/pages/api/hello.js ================================================ export default (req, res) => res.end('hello from hello'); ================================================ FILE: packages/runtime/test/fixtures/16-base-path/pages/blog/[post]/comments.js ================================================ export const getServerSideProps = ({ params }) => ({ props: { post: params.post, }, }); export default function Comment({ post }) { return `comments post: ${post}`; } ================================================ FILE: packages/runtime/test/fixtures/16-base-path/pages/blog/[post]/index.js ================================================ export const getServerSideProps = ({ params }) => ({ props: { post: params.post, }, }); export default function Post({ post }) { return `index post: ${post}`; } ================================================ FILE: packages/runtime/test/fixtures/16-base-path/pages/blog-ssg/[post]/comments.js ================================================ export const getStaticProps = ({ params }) => ({ props: { post: params.post, }, }); export const getStaticPaths = () => { return { paths: [{ params: { post: 'post-1' } }, { params: { post: 'post-2' } }], fallback: true, }; }; export default function Comment({ post }) { return `comments post: ${post}`; } ================================================ FILE: packages/runtime/test/fixtures/16-base-path/pages/blog-ssg/[post]/index.js ================================================ export const getStaticProps = ({ params }) => ({ props: { post: params.post, }, }); export const getStaticPaths = () => { return { paths: [{ params: { post: 'post-1' } }, { params: { post: 'post-2' } }], fallback: true, }; }; export default function Post({ post }) { return `index post: ${post}`; } ================================================ FILE: packages/runtime/test/fixtures/16-base-path/pages/index.js ================================================ export default () => 'hello from index'; ================================================ FILE: packages/runtime/test/fixtures/17-static-404/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, experimental: { static404: true, }, }; ================================================ FILE: packages/runtime/test/fixtures/17-static-404/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/", "mustContain": "Hi" }, { "path": "/", "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/non-existent", "mustContain": "page could not be found" }, { "path": "/non-existent", "mustContain": "__next" }, { "path": "/_errors/404", "mustContain": "__next" } ] } ================================================ FILE: packages/runtime/test/fixtures/17-static-404/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/17-static-404/pages/index.js ================================================ export default () => 'Hi'; ================================================ FILE: packages/runtime/test/fixtures/18-ssg-fallback-support/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/18-ssg-fallback-support/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/lambda", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/forever", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "delay": 2000 }, { "path": "/forever", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/another", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "delay": 2000 }, { "path": "/another", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/blog/post-1", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "delay": 2000 }, { "path": "/blog/post-1", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/blog/post-2", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "delay": 2000 }, { "path": "/blog/post-2", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/blog/post-3", "status": 200, "mustContain": "loading..." }, { "delay": 2000 }, { "path": "/blog/post-3", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE/" } }, { "path": "/_next/data/testing-build-id/blog/post-4.json", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "delay": 2000 }, { "path": "/_next/data/testing-build-id/blog/post-4.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE/" } }, { "path": "/blog/post-3", "status": 200, "mustContain": "post-3" }, { "path": "/blog/post-1/comment-1", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "path": "/blog/post-2/comment-2", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "path": "/blog/post-3/comment-3", "status": 200, "mustContain": "loading..." }, { "path": "/_next/data/testing-build-id/lambda.json", "status": 404 }, { "path": "/_next/data/testing-build-id/forever.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/PRERENDER|HIT/" } }, { "delay": 2000 }, { "path": "/blog/post-3/comment-3", "status": 200, "mustContain": "comment-3" }, { "path": "/_next/data/testing-build-id/forever.json", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/_next/data/testing-build-id/another.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE/" } }, { "path": "/_next/data/testing-build-id/another2.json", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "delay": 2000 }, { "path": "/_next/data/testing-build-id/another2.json", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/_next/data/testing-build-id/blog/post-1.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE|PRERENDER/" } }, { "path": "/_next/data/testing-build-id/blog/post-1337/comment-1337.json", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } } ] } ================================================ FILE: packages/runtime/test/fixtures/18-ssg-fallback-support/package.json ================================================ { "dependencies": { "next": "9.2.3-canary.13", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/18-ssg-fallback-support/pages/another.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function unstable_getStaticProps() { return { props: { world: 'world', time: new Date().getTime(), }, revalidate: 5, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/18-ssg-fallback-support/pages/another2.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function unstable_getStaticProps() { return { props: { world: 'world', time: new Date().getTime(), }, revalidate: 5, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/18-ssg-fallback-support/pages/api/noop.js ================================================ export default (_, res) => { res.send('OK'); }; ================================================ FILE: packages/runtime/test/fixtures/18-ssg-fallback-support/pages/blog/[post]/[comment].js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function unstable_getStaticPaths() { return { paths: [ '/blog/post-1/comment-1', { params: { post: 'post-2', comment: 'comment-2' } }, '/blog/post-1337/comment-1337', ], }; } // eslint-disable-next-line camelcase export async function unstable_getStaticProps({ params }) { return { props: { post: params.post, comment: params.comment, time: new Date().getTime(), }, revalidate: 2, }; } export default ({ post, comment, time }) => { if (!post) return

loading...

; return ( <>

Post: {post}

Comment: {comment}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/18-ssg-fallback-support/pages/blog/[post]/index.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function unstable_getStaticPaths() { return { paths: ['/blog/post-1', { params: { post: 'post-2' } }], }; } // eslint-disable-next-line camelcase export async function unstable_getStaticProps({ params }) { if (params.post === 'post-10') { await new Promise(resolve => { setTimeout(() => resolve(), 1000); }); } return { props: { post: params.post, time: (await import('perf_hooks')).performance.now(), }, revalidate: 10, }; } export default ({ post, time }) => { if (!post) return

loading...

; return ( <>

Post: {post}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/18-ssg-fallback-support/pages/forever.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function unstable_getStaticProps() { return { props: { world: 'world', time: new Date().getTime(), }, revalidate: false, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/18-ssg-fallback-support/pages/index.js ================================================ export default () => 'Hi'; ================================================ FILE: packages/runtime/test/fixtures/18-ssg-fallback-support/pages/lambda.js ================================================ const Page = ({ data }) =>

{data} world

; Page.getInitialProps = () => ({ data: 'hello' }); export default Page; ================================================ FILE: packages/runtime/test/fixtures/19-pages-404/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/19-pages-404/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/", "mustContain": "Hi" }, /* TODO: enable this again once all tests pass { "path": "/", "responseHeaders": { "x-vercel-cache": "HIT" } }, */ { "path": "/non-existent", "mustContain": "custom 404!!" }, { "path": "/non-existent", "mustContain": "__next" }, { "path": "/non-existent", "status": 404 }, { "path": "/404", "status": 404 } ] } ================================================ FILE: packages/runtime/test/fixtures/19-pages-404/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/19-pages-404/pages/404.js ================================================ export default () => 'custom 404!!'; ================================================ FILE: packages/runtime/test/fixtures/19-pages-404/pages/index.js ================================================ export default () => 'Hi'; ================================================ FILE: packages/runtime/test/fixtures/20-pages-404-lambda/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/20-pages-404-lambda/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/", "mustContain": "Hi" }, { "path": "/non-existent", "mustContain": "custom 404!!" }, { "path": "/non-existent", "mustContain": "__next" } ] } ================================================ FILE: packages/runtime/test/fixtures/20-pages-404-lambda/package.json ================================================ { "dependencies": { "next": "9.2.3-canary.4", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/20-pages-404-lambda/pages/404.js ================================================ export default () => 'custom 404!!'; ================================================ FILE: packages/runtime/test/fixtures/20-pages-404-lambda/pages/_app.js ================================================ const App = ({ Component, pageProps }) => ; App.getInitialProps = () => ({ hello: 'world' }); export default App; ================================================ FILE: packages/runtime/test/fixtures/20-pages-404-lambda/pages/index.js ================================================ export default () => 'Hi'; ================================================ FILE: packages/runtime/test/fixtures/21-server-props/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/21-server-props/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/lambda", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/forever", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "delay": 2000 }, { "path": "/forever", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/another", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "delay": 2000 }, { "path": "/another", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/blog/post-1", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "delay": 2000 }, { "path": "/blog/post-1", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/blog/post-2", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "delay": 2000 }, { "path": "/blog/post-2", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/blog/post-3", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "delay": 2000 }, { "path": "/blog/post-3", "status": 200, "responseHeaders": { "x-vercel-cache": "/MISS/" } }, { "path": "/blog/post-1/comment-1", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/blog/post-2/comment-2", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/blog/post-3/comment-3", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/_next/data/testing-build-id/lambda.json", "status": 404 }, { "path": "/_next/data/testing-build-id/another.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/MISS/" } }, { "path": "/_next/data/testing-build-id/another2.json", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "delay": 2000 }, { "path": "/_next/data/testing-build-id/another2.json", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/_next/data/testing-build-id/blog/post-1.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/MISS/" } }, { "path": "/_next/data/testing-build-id/blog/post-1.json", "status": 200, "mustContain": "post-1" }, { "path": "/_next/data/testing-build-id/blog/post-1337/comment-1337.json", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/_next/data/testing-build-id/blog/post-1337/comment-1337.json", "status": 200, "mustContain": "comment-1337" }, { "path": "/_next/data/testing-build-id/blog/post-1337/comment-1337.json", "status": 200, "mustContain": "post-1337" } ] } ================================================ FILE: packages/runtime/test/fixtures/21-server-props/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/21-server-props/pages/another.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getServerSideProps() { return { props: { world: 'world', time: new Date().getTime(), }, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/21-server-props/pages/another2.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getServerSideProps() { return { props: { world: 'world', time: new Date().getTime(), }, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/21-server-props/pages/blog/[post]/[comment].js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getServerSideProps({ params }) { return { props: { post: params.post, comment: params.comment, time: new Date().getTime(), }, }; } export default ({ post, comment, time }) => { return ( <>

Post: {post}

Comment: {comment}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/21-server-props/pages/blog/[post]/index.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getServerSideProps({ params }) { if (params.post === 'post-10') { await new Promise(resolve => { setTimeout(() => resolve(), 1000); }); } return { props: { post: params.post, time: (await import('perf_hooks')).performance.now(), }, }; } export default ({ post, time }) => { return ( <>

Post: {post}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/21-server-props/pages/forever.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getServerSideProps() { return { props: { world: 'world', time: new Date().getTime(), }, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/21-server-props/pages/index.js ================================================ export default () => 'Hi'; ================================================ FILE: packages/runtime/test/fixtures/21-server-props/pages/lambda.js ================================================ const Page = ({ data }) =>

{data} world

; Page.getInitialProps = () => ({ data: 'hello' }); export default Page; ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/additional.js ================================================ /* eslint-env jest */ const cheerio = require('cheerio'); const fetch = require('../../../../../test/lib/deployment/fetch-retry'); module.exports = function (ctx) { it('should revalidate content properly from pathname', async () => { const res = await fetch(`${ctx.deploymentUrl}/another`); expect(res.status).toBe(200); let $ = cheerio.load(await res.text()); const initialTime = $('#time').text(); const initialRandom = $('#random').text(); expect($('#hello').text()).toBe('hello: world'); // wait for revalidation to occur await new Promise(resolve => setTimeout(resolve, 4000)); const res2 = await fetch(`${ctx.deploymentUrl}/another`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#hello').text()).toBe('hello: world'); expect(initialTime).not.toBe($('#time').text()); expect(initialRandom).not.toBe($('#random').text()); }); it('should revalidate content properly from dynamic pathname', async () => { const res = await fetch(`${ctx.deploymentUrl}/blog/post-123`); expect(res.status).toBe(200); let $ = cheerio.load(await res.text()); const initialTime = $('#time').text(); const initialRandom = $('#random').text(); expect($('#post').text()).toBe('Post: post-123'); // wait for revalidation to occur await new Promise(resolve => setTimeout(resolve, 4000)); const res2 = await fetch(`${ctx.deploymentUrl}/blog/post-123`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#post').text()).toBe('Post: post-123'); expect(initialTime).not.toBe($('#time').text()); expect(initialRandom).not.toBe($('#random').text()); }); it('should revalidate content properly from dynamic pathnames', async () => { const res = await fetch(`${ctx.deploymentUrl}/blog/post-123/comment-321`); expect(res.status).toBe(200); let $ = cheerio.load(await res.text()); const initialTime = $('#time').text(); const initialRandom = $('#random').text(); expect($('#post').text()).toBe('Post: post-123'); expect($('#comment').text()).toBe('Comment: comment-321'); // wait for revalidation to occur await new Promise(resolve => setTimeout(resolve, 4000)); const res2 = await fetch(`${ctx.deploymentUrl}/blog/post-123/comment-321`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#post').text()).toBe('Post: post-123'); expect($('#comment').text()).toBe('Comment: comment-321'); expect(initialTime).not.toBe($('#time').text()); expect(initialRandom).not.toBe($('#random').text()); }); it('should revalidate content properly from /_next/data pathname', async () => { const res = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/another.json` ); expect(res.status).toBe(200); const { pageProps: data } = await res.json(); const initialTime = data.time; const initialRandom = data.random; expect(data.world).toBe('world'); expect(isNaN(initialTime)).toBe(false); expect(isNaN(initialRandom)).toBe(false); // wait for revalidation to occur await new Promise(resolve => setTimeout(resolve, 4000)); const res2 = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/another.json` ); expect(res2.status).toBe(200); const { pageProps: data2 } = await res2.json(); expect(data2.world).toBe('world'); expect(isNaN(data2.time)).toBe(false); expect(isNaN(data2.random)).toBe(false); expect(initialTime).not.toBe(data2.time); expect(initialRandom).not.toBe(data2.random); }); it('should revalidate content properly from /_next/data dynamic pathname', async () => { const res = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/blog/post-123.json` ); expect(res.status).toBe(200); const { pageProps: data } = await res.json(); const initialTime = data.time; const initialRandom = data.random; expect(data.post).toBe('post-123'); expect(isNaN(initialTime)).toBe(false); expect(isNaN(initialRandom)).toBe(false); // wait for revalidation to occur await new Promise(resolve => setTimeout(resolve, 4000)); const res2 = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/blog/post-123.json` ); expect(res2.status).toBe(200); const { pageProps: data2 } = await res2.json(); expect(data2.post).toBe('post-123'); expect(isNaN(data2.time)).toBe(false); expect(isNaN(data2.random)).toBe(false); expect(initialTime).not.toBe(data2.time); expect(initialRandom).not.toBe(data2.random); }); it('should revalidate content properly from /_next/data dynamic pathnames', async () => { const res = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/blog/post-123/comment-321.json` ); expect(res.status).toBe(200); const { pageProps: data } = await res.json(); const initialTime = data.time; const initialRandom = data.random; expect(data.post).toBe('post-123'); expect(data.comment).toBe('comment-321'); expect(isNaN(initialTime)).toBe(false); expect(isNaN(initialRandom)).toBe(false); // wait for revalidation to occur await new Promise(resolve => setTimeout(resolve, 4000)); const res2 = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/blog/post-123/comment-321.json` ); expect(res2.status).toBe(200); const { pageProps: data2 } = await res2.json(); expect(data2.post).toBe('post-123'); expect(data2.comment).toBe('comment-321'); expect(isNaN(data2.time)).toBe(false); expect(isNaN(data2.random)).toBe(false); expect(initialTime).not.toBe(data2.time); expect(initialRandom).not.toBe(data2.random); }); }; ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/now.json ================================================ { "version": 2, "uploadNowJson": true, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/lambda", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "path": "/forever", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "delay": 2000 }, { "path": "/forever", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/blog/post-3", "status": 200, "mustContain": "loading..." }, { "delay": 2000 }, { "path": "/blog/post-3", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE/" } }, { "path": "/_next/data/testing-build-id/blog/post-4.json", "status": 200, "responseHeaders": { "x-vercel-cache": "MISS" } }, { "delay": 2000 }, { "path": "/_next/data/testing-build-id/blog/post-4.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE/" } }, { "path": "/blog/post-3", "status": 200, "mustContain": "post-3" }, { "path": "/blog/post-3/comment-3", "status": 200, "mustContain": "loading..." }, { "path": "/_next/data/testing-build-id/lambda.json", "status": 404 }, { "path": "/_next/data/testing-build-id/forever.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/PRERENDER|HIT/" } }, { "delay": 2000 }, { "path": "/blog/post-3/comment-3", "status": 200, "mustContain": "comment-3" }, { "path": "/_next/data/testing-build-id/forever.json", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/_next/data/testing-build-id/another2.json", "status": 200, "responseHeaders": { "x-vercel-cache": "PRERENDER" } }, { "delay": 2000 }, { "path": "/_next/data/testing-build-id/another2.json", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/nofallback/one", "status": 200, "mustContain": "one" }, { "path": "/nofallback/two", "status": 200, "mustContain": "two" }, { "path": "/nofallback/nope", "status": 404, "mustContain": "This page could not be found" }, { "path": "/_next/data/testing-build-id/nofallback/one.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE|PRERENDER/" } }, { "path": "/_next/data/testing-build-id/nofallback/two.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE|PRERENDER/" } }, { "path": "/_next/data/testing-build-id/nofallback/nope.json", "status": 404 }, { "path": "/api-docs/first", "status": 200, "mustContain": "API Docs" }, { "path": "/api-docs/second", "status": 200, "mustContain": "Loading..." }, { "path": "/_next/data/testing-build-id/api-docs/first.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE|PRERENDER/" } }, { "path": "/", "status": 200, "mustContain": "Hi" }, { "path": "/_next/data/testing-build-id/index.json", "status": 200, "mustContain": "\"hello\":\"index\"" }, { "path": "/_next/data/testing-build-id/api-docs/second.json", "status": 200 }, { "logMustNotContain": "WARNING: your application is being opted out of @vercel/next's optimized lambdas mode due to legacy routes" }, { "logMustNotContain": "WARNING: Your application is being opted out of \"@vercel/next\" optimized lambdas mode due to `functions` config" } ] } ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/pages/another.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticProps() { return { props: { world: 'world', random: Math.random(), time: new Date().getTime(), }, revalidate: 1, }; } export default ({ world, time, random }) => { return ( <>

hello: {world}

time: {time} random: {random} ); }; ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/pages/another2.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticProps() { return { props: { world: 'world', time: new Date().getTime(), }, revalidate: 5, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/pages/api/noop.js ================================================ export default (_, res) => { res.send('OK'); }; ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/pages/api-docs/[...slug].js ================================================ import { useRouter } from 'next/router'; export const getStaticProps = () => { return { props: { hello: 'world', }, }; }; export const getStaticPaths = () => { return { paths: ['/api-docs/first'], fallback: true, }; }; export default function Slug(props) { if (useRouter().isFallback) return 'Loading...'; return ( <>

API Docs

{JSON.stringify(props)}

); } ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/pages/blog/[post]/[comment].js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticPaths() { return { paths: [ '/blog/post-1/comment-1', { params: { post: 'post-2', comment: 'comment-2' } }, '/blog/post-1337/comment-1337', '/blog/post-123/comment-321', ], fallback: true, }; } // eslint-disable-next-line camelcase export async function getStaticProps({ params }) { return { props: { post: params.post, random: Math.random(), comment: params.comment, time: new Date().getTime(), }, revalidate: 1, }; } export default ({ post, comment, time, random }) => { if (!post) return

loading...

; return ( <>

Post: {post}

Comment: {comment}

time: {time} random: {random} ); }; ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/pages/blog/[post]/index.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticPaths() { return { paths: ['/blog/post-1', { params: { post: 'post-2' } }, '/blog/post-123'], fallback: true, }; } // eslint-disable-next-line camelcase export async function getStaticProps({ params }) { if (params.post === 'post-10') { await new Promise(resolve => { setTimeout(() => resolve(), 1000); }); } return { props: { post: params.post, random: Math.random(), time: (await import('perf_hooks')).performance.now(), }, revalidate: 1, }; } export default ({ post, time, random }) => { if (!post) return

loading...

; return ( <>

Post: {post}

time: {time} random: {random} ); }; ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/pages/forever.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticProps() { return { props: { world: 'world', time: new Date().getTime(), }, revalidate: false, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/pages/index.js ================================================ export default () => 'Hi'; export const getStaticProps = () => { return { props: { hello: 'index', }, }; }; ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/pages/lambda.js ================================================ const Page = ({ data }) =>

{data} world

; Page.getInitialProps = () => ({ data: 'hello' }); export default Page; ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2/pages/nofallback/[slug].js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticPaths() { return { paths: ['/nofallback/one', { params: { slug: 'two' } }], fallback: false, }; } // eslint-disable-next-line camelcase export async function getStaticProps({ params }) { return { props: { slug: params.slug, time: (await import('perf_hooks')).performance.now(), }, revalidate: 10, }; } export default ({ slug, time }) => { return ( <>

Slug ({slug.length}): {slug}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2-catchall/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2-catchall/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ // make sure index responds correctly { "path": "/", "mustContain": "Create Next App" }, // make sure lazy catch-all SSG page matches { "path": "/another", "mustContain": "Loading..." }, { "delay": 2000 }, // make sure lazy catch-all SSG page was cached { "path": "/another", "mustContain": "My awesome article" }, // make sure lazy catch-all SSG data route matches { "path": "/_next/data/testing-build-id/something.json", "mustContain": "My awesome article" }, // make sure lazy catch-all SSG data route doesn't have HTML // make sure lazy catch-all SSG data route matches { "path": "/_next/data/testing-build-id/one-more.json", "mustNotContain": "" } ] } ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2-catchall/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2-catchall/pages/[...path].js ================================================ import { useRouter } from 'next/router'; import Error from 'next/error'; function loadArticle() { return { content: [ { type: 'header', content: 'My awesome article', }, { type: 'paragraph', content: 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend.', }, ], }; } const Page = ({ path, article }) => { const router = useRouter(); if (router.isFallback) { return
Loading...
; } if (!article.content) { return ; } const [header, ...body] = article.content; return (
{header.content}
path: {path.join('/')}
{body.map(({ content }) => (

{content}

))}
); }; export default Page; export async function getStaticProps({ params }) { const { path } = params; const article = loadArticle(path); return { props: { article, path, }, }; } export async function getStaticPaths() { return { paths: [], fallback: true, }; } ================================================ FILE: packages/runtime/test/fixtures/22-ssg-v2-catchall/pages/index.js ================================================ import Head from 'next/head'; const Home = () => (
Create Next App

Welcome to Next.js!

Get started by editing pages/index.js

); export default Home; ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/.gitignore ================================================ !public ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, async rewrites() { return [ { source: '/to-another', destination: '/another/one', }, { source: '/nav', destination: '/404', }, { source: '/hello-world', destination: '/static/hello.txt', }, { source: '/', destination: '/another', }, { source: '/another', destination: '/multi-rewrites', }, { source: '/first', destination: '/hello', }, { source: '/second', destination: '/hello-again', }, { source: '/to-hello', destination: '/hello', }, { source: '/(.*)-:id(\\d+).html', destination: '/blog/:id', }, { source: '/blog/post-1', destination: '/blog/post-2', }, { source: '/test/:path', destination: '/:path', }, { source: '/test-overwrite/:something/:another', destination: '/params/this-should-be-the-value', }, { source: '/params/:something', destination: '/with-params', }, { source: '/query-rewrite/:section/:name', destination: '/with-params?first=:section&second=:name', }, { source: '/hidden/_next/:path*', destination: '/_next/:path*', }, { source: '/api-hello', destination: '/api/hello', }, { source: '/api-hello-regex/(.*)', destination: '/api/hello?name=:1', }, { source: '/api-hello-param/:name', destination: '/api/hello?hello=:name', }, { source: '/api-dynamic-param/:name', destination: '/api/dynamic/:name?hello=:name', }, { source: '/:path/post-321', destination: '/with-params', }, { source: '/a/catch-all/:path*', destination: '/a/catch-all', }, ]; }, async redirects() { return [ { source: '/redirect/me/to-about/:lang', destination: '/:lang/about', permanent: false, }, { source: '/docs/router-status/:code', destination: '/docs/v2/network/status-codes#:code', statusCode: 301, }, { source: '/docs/github', destination: '/docs/v2/advanced/now-for-github', statusCode: 301, }, { source: '/docs/v2/advanced/:all(.*)', destination: '/docs/v2/more/:all', statusCode: 301, }, { source: '/hello/:id/another', destination: '/blog/:id', permanent: false, }, { source: '/redirect1', destination: '/', permanent: false, }, { source: '/redirect2', destination: '/', statusCode: 301, }, { source: '/redirect3', destination: '/another', statusCode: 302, }, { source: '/redirect4', destination: '/', permanent: true, }, { source: '/redir-chain1', destination: '/redir-chain2', statusCode: 301, }, { source: '/redir-chain2', destination: '/redir-chain3', statusCode: 302, }, { source: '/redir-chain3', destination: '/', statusCode: 303, }, { source: '/to-external', destination: 'https://google.com', permanent: false, }, { source: '/query-redirect/:section/:name', destination: '/with-params?first=:section&second=:name', permanent: false, }, { source: '/named-like-unnamed/:0', destination: '/:0', permanent: false, }, { source: '/redirect-override', destination: '/thank-you-next', permanent: false, }, ]; }, async headers() { return [ { source: '/add-header', headers: [ { key: 'x-custom-header', value: 'hello world', }, { key: 'x-another-header', value: 'hello again', }, ], }, { source: '/my-headers/(.*)', headers: [ { key: 'x-first-header', value: 'first', }, { key: 'x-second-header', value: 'second', }, ], }, { source: '/:path*', headers: [ { key: 'x-something', value: 'applied-everywhere', }, ], }, ]; }, }; ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/now.json ================================================ { "version": 2, "builds": [ { "src": "package.json", "use": "@vercel/next" } ], "probes": [ // should handle one-to-one rewrite successfully { "path": "/first", "mustContain": "hello" }, // should handle chained rewrites successfully { "path": "/", "mustContain": "multi-rewrites" }, // should not match dynamic route immediately after applying header { "path": "/blog/post-321", "mustContain": "with-params" }, { "path": "/blog/post-321", "mustNotContain": "post-321" }, // should handle chained redirects successfully { "path": "/redir-chain1", "status": 301, "responseHeaders": { "location": "//redir-chain2/" }, "fetchOptions": { "redirect": "manual" } }, { "path": "/redir-chain2", "status": 302, "responseHeaders": { "location": "//redir-chain3/" }, "fetchOptions": { "redirect": "manual" } }, { "path": "/redir-chain3", "status": 303, "responseHeaders": { "location": "//$/" }, "fetchOptions": { "redirect": "manual" } }, // should redirect successfully with permanent: false { "path": "/redirect1", "status": 307, "responseHeaders": { "location": "//$/" }, "fetchOptions": { "redirect": "manual" } }, // should redirect with params successfully { "path": "/hello/123/another", "status": 307, "responseHeaders": { "location": "//blog/123/" }, "fetchOptions": { "redirect": "manual" } }, // should redirect with hash successfully { "path": "/docs/router-status/500", "status": 301, "responseHeaders": { "location": "/#500$/" }, "fetchOptions": { "redirect": "manual" } }, // should redirect successfully with provided statusCode { "path": "/redirect2", "status": 301, "responseHeaders": { "location": "//$/" }, "fetchOptions": { "redirect": "manual" } }, // should server static files through a rewrite { "path": "/hello-world", "mustContain": "hello world!" }, // should rewrite with params successfully { "path": "/test/hello", "mustContain": "Hello" }, // should double redirect successfully { "path": "/docs/github", "mustContain": "hi there" }, // should allow params in query for rewrite { "path": "/query-rewrite/hello/world?a=b", "mustContain": "\"a\":\"b\"" }, { "path": "/query-rewrite/hello/world?a=b", "mustContain": "\"section\":\"hello\"" }, { "path": "/query-rewrite/hello/world?a=b", "mustContain": "\"name\":\"world\"" }, { "path": "/query-rewrite/hello/world?a=b", "mustContain": "\"first\":\"hello\"" }, { "path": "/query-rewrite/hello/world?a=b", "mustContain": "\"second\":\"world\"" }, // should not allow rewrite to override page file { "path": "/nav", "mustContain": "to-hello" }, // show allow redirect to override the page { "path": "/redirect-override", "status": 307, "responseHeaders": { "location": "//thank-you-next$/" }, "fetchOptions": { "redirect": "manual" } }, // should match a page after a rewrite { "path": "/to-hello", "mustContain": "Hello" }, // should match dynamic route after rewrite { "path": "/blog/post-1", "mustContain": "post-2" }, // should match public file after rewrite { "path": "/blog/data.json", "mustContain": "\"hello\": \"world\"" }, // should match /_next file after rewrite { "path": "/hidden/_next/__NEXT_SCRIPT__(/hello)", "mustContain": "createElement" }, // should allow redirecting to external resource { "path": "/to-external", "status": 307, "responseHeaders": { "location": "/google.com/" }, "fetchOptions": { "redirect": "manual" } }, // should apply headers for exact match { "path": "/add-header", "responseHeaders": { "x-custom-header": "hello world", "x-another-header": "hello again" } }, // should apply headers for multi match { "path": "/my-headers/first", "responseHeaders": { "x-first-header": "first", "x-second-header": "second" } }, // should handle basic api rewrite successfully { "path": "/api-hello", "mustContain": "{\"query\":{}}" }, // should handle api rewrite with param successfully { "path": "/api-hello-param/hello", "mustContain": "{\"query\":{\"hello\":\"hello\",\"name\":\"hello\"}}" }, // should handle encoded value in the pathname correctly { "path": "/redirect/me/to-about/%5Cgoogle.com", "status": 307, "responseHeaders": { "location": "/%5Cgoogle.com/about/" }, "fetchOptions": { "redirect": "manual" } }, // should apply un-named multi-match correctly { "path": "/hello/post-123.html", "status": 200, "mustContain": "123" }, // should rewrite to catch-all with dash in segment name { "path": "/catchall-dash/hello/world", "status": 200, "mustContain": "hello/world" }, // should rewrite and normalize catch-all rewrite param { "path": "/a/catch-all/hello/world", "status": 200, "mustContain": "hello/world" } ] } ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/a/catch-all.js ================================================ import { useRouter } from 'next/router'; export default () =>

{useRouter().query.path?.join('/')}

; export const getServerSideProps = () => { return { props: {}, }; }; ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/another/[id].js ================================================ export default () => 'hi'; ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/api/dynamic/[slug].js ================================================ export default async (req, res) => res.json({ query: req.query }); ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/api/hello.js ================================================ export default async (req, res) => res.json({ query: req.query }); ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/b/[123].js ================================================ export const getServerSideProps = ({ params }) => { console.log({ params }); return { props: { params, }, }; }; export default function Page(props) { return

{JSON.stringify(props)}

; } ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/blog/[post]/index.js ================================================ import { useRouter } from 'next/router'; const Page = () => ( <>

post: {useRouter().query.post}

); Page.getInitialProps = () => ({ hello: 'world' }); export default Page; ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/c/[alongparamnameshouldbeallowedeventhoughweird].js ================================================ export const getServerSideProps = ({ params }) => { console.log({ params }); return { props: { params, }, }; }; export default function Page(props) { return

{JSON.stringify(props)}

; } ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/catchall-dash/[...hello-world].js ================================================ import { useRouter } from 'next/router'; const Page = () => { return

path: {useRouter().query['hello-world']?.join('/')}

; }; export default Page; export const getServerSideProps = () => { return { props: { hello: 'world', }, }; }; ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/dash/[hello-world].js ================================================ export default () => 'hi'; ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/docs/v2/more/now-for-github.js ================================================ export default () => 'hi there'; ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/hello-again.js ================================================ import Link from 'next/link'; export default () => ( <>

Hello again

to nav ); ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/hello.js ================================================ import Link from 'next/link'; const Page = () => ( <>

Hello

to nav ); Page.getInitialProps = () => ({ hello: 'world' }); export default Page; ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/multi-rewrites.js ================================================ export default () => 'multi-rewrites'; ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/nav.js ================================================ import Link from 'next/link'; export default () => ( <> to hello to hello-again ); ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/params.js ================================================ import { useRouter } from 'next/router'; const Page = () => { const { query } = useRouter(); return

{JSON.stringify(query)}

; }; Page.getInitialProps = () => ({ a: 'b' }); export default Page; ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/redirect-override.js ================================================ export default () => 'got to the page'; ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/pages/with-params.js ================================================ import { useRouter } from 'next/router'; const Page = () => { const { query } = useRouter(); return

{JSON.stringify(query)}

; }; Page.getInitialProps = () => ({ hello: 'GIPGIP' }); export default Page; ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/public/blog/data.json ================================================ { "hello": "world" } ================================================ FILE: packages/runtime/test/fixtures/23-custom-routes-verbose/public/static/hello.txt ================================================ hello world! ================================================ FILE: packages/runtime/test/fixtures/24-custom-output-dir/next.config.js ================================================ module.exports = { distDir: 'the-output-directory', generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/24-custom-output-dir/now.json ================================================ { "builds": [ { "src": "package.json", "use": "@vercel/next", "config": { "buildCommand": "next build", "outputDirectory": "the-output-directory" } } ], "probes": [ { "path": "/", "status": 200, "mustContain": "hello world" }, { "path": "/ssg/first", "status": 200, "mustContain": "first" }, { "path": "/ssg/second", "status": 200, "mustContain": "Loading..." }, { "path": "/_next/data/testing-build-id/ssg/second.json", "status": 200, "mustContain": "\"slug\":\"second\"" }, { "path": "/_next/data/testing-build-id/ssg/third.json", "status": 200, "mustContain": "\"slug\":\"third\"" } ] } ================================================ FILE: packages/runtime/test/fixtures/24-custom-output-dir/package.json ================================================ { "scripts": { "build": "next build" }, "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/24-custom-output-dir/pages/index.js ================================================ export default function () { return
hello world
; } ================================================ FILE: packages/runtime/test/fixtures/24-custom-output-dir/pages/ssg/[slug].js ================================================ import { useRouter } from 'next/router'; export const getStaticProps = ({ params }) => { return { props: { params, hello: 'world', }, }; }; export const getStaticPaths = () => { return { paths: [{ params: { slug: 'first' } }], fallback: true, }; }; export default function Page(props) { const router = useRouter(); if (router.isFallback) { return 'Loading...'; } return ( <>

slug: {props.params?.slug}

{JSON.stringify(props)}

); } ================================================ FILE: packages/runtime/test/fixtures/25-index-routes/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/25-index-routes/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@now/next" }], "probes": [ { "path": "/", "mustContain": "hello from index" }, { "path": "/index", "mustContain": "hello from index" }, { "path": "/nested-index/index", "mustContain": "hello from nested index" }, { "path": "/sub", "mustContain": "hello from sub index" }, { "path": "/sub/index", "mustContain": "hello from sub id" }, { "path": "/sub/another", "mustContain": "hello from sub id" }, { "path": "/api/sub", "mustContain": "hi from sub index" }, { "path": "/api/sub/index", "mustContain": "hi from sub id" }, { "path": "/api/sub/another", "mustContain": "hi from sub id" } ] } ================================================ FILE: packages/runtime/test/fixtures/25-index-routes/package.json ================================================ { "dependencies": { "next": "latest", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/25-index-routes/pages/api/sub/[id].js ================================================ export default (req, res) => res.end('hi from sub id'); ================================================ FILE: packages/runtime/test/fixtures/25-index-routes/pages/api/sub/index.js ================================================ export default (req, res) => res.end('hi from sub index'); ================================================ FILE: packages/runtime/test/fixtures/25-index-routes/pages/index.js ================================================ const page = () => 'hello from index'; export default page; ================================================ FILE: packages/runtime/test/fixtures/25-index-routes/pages/nested-index/index/index.js ================================================ export default () => 'hello from nested index'; ================================================ FILE: packages/runtime/test/fixtures/25-index-routes/pages/sub/[id].js ================================================ const page = () => 'hello from sub id'; page.getInitialProps = () => ({ hello: 'hi' }); export default page; ================================================ FILE: packages/runtime/test/fixtures/25-index-routes/pages/sub/index.js ================================================ const page = () => 'hello from sub index'; page.getInitialProps = () => ({ hello: 'hi' }); export default page; ================================================ FILE: packages/runtime/test/fixtures/25-mono-repo-404/.gitignore ================================================ .now ================================================ FILE: packages/runtime/test/fixtures/25-mono-repo-404/package.json ================================================ { "workspaces": [ "packages/*" ], "private": true, "name": "mono-repo" } ================================================ FILE: packages/runtime/test/fixtures/25-mono-repo-404/packages/webapp/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/25-mono-repo-404/packages/webapp/package.json ================================================ { "name": "webapp", "version": "0.0.1", "dependencies": { "next": "9.3.4", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/25-mono-repo-404/packages/webapp/pages/404.js ================================================ export default () => 'custom 404!!'; ================================================ FILE: packages/runtime/test/fixtures/25-mono-repo-404/packages/webapp/pages/index.js ================================================ export default () => 'Hi'; ================================================ FILE: packages/runtime/test/fixtures/25-mono-repo-404/vercel.json ================================================ { "version": 2, "uploadNowJson": true, "routes": [ { "src": "/(.*)", "dest": "/packages/webapp/$1", "continue": true } ], "builds": [ { "src": "packages/webapp/next.config.js", "use": "@vercel/next" } ], "probes": [ { "path": "/", "mustContain": "Hi" }, { "path": "/", "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/non-existent", "mustContain": "custom 404!!" }, { "path": "/non-existent", "mustContain": "__next" }, { "path": "/non-existent", "status": 404 }, { "logMustContain": "WARNING: your application is being opted out of @vercel/next's optimized lambdas mode due to legacy routes" } ] } ================================================ FILE: packages/runtime/test/fixtures/26-mono-repo-404-lambda/.gitignore ================================================ .now ================================================ FILE: packages/runtime/test/fixtures/26-mono-repo-404-lambda/now.json ================================================ { "version": 2, "uploadNowJson": true, "routes": [ { "src": "/(.*)", "dest": "/packages/webapp/$1", "continue": true } ], "builds": [ { "src": "packages/webapp/next.config.js", "use": "@millihq/tf-next-runtime" } ], "probes": [ { "path": "/", "mustContain": "Hi" }, { "path": "/non-existent", "mustContain": "custom 404!!" }, { "path": "/non-existent", "mustContain": "__next" }, { "path": "/non-existent", "status": 404 }, { "logMustContain": "WARNING: your application is being opted out of @vercel/next's optimized lambdas mode due to legacy routes" } ] } ================================================ FILE: packages/runtime/test/fixtures/26-mono-repo-404-lambda/package.json ================================================ { "workspaces": [ "packages/*" ], "private": true, "name": "mono-repo" } ================================================ FILE: packages/runtime/test/fixtures/26-mono-repo-404-lambda/packages/webapp/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/26-mono-repo-404-lambda/packages/webapp/package.json ================================================ { "name": "webapp", "version": "0.0.1", "dependencies": { "next": "9.3.4", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/26-mono-repo-404-lambda/packages/webapp/pages/404.js ================================================ export default () => 'custom 404!!'; ================================================ FILE: packages/runtime/test/fixtures/26-mono-repo-404-lambda/packages/webapp/pages/_app.js ================================================ const App = ({ Component, pageProps }) => ; App.getInitialProps = async ({ ctx, Component }) => { let pageProps = {}; if (Component.getInitialProps) { pageProps = await Component.getInitialProps(ctx); } return { pageProps }; }; export default App; ================================================ FILE: packages/runtime/test/fixtures/26-mono-repo-404-lambda/packages/webapp/pages/index.js ================================================ export default () => 'Hi'; ================================================ FILE: packages/runtime/test/fixtures/27-non-word-param/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/27-non-word-param/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ // make sure index responds correctly { "path": "/", "mustContain": "Create Next App" }, // make sure lazy catch-all SSG page matches { "path": "/another", "mustContain": "Loading..." }, { "delay": 2000 }, // make sure lazy catch-all SSG page was cached { "path": "/another", "mustContain": "My awesome article" }, // make sure correct param is used { "path": "/another", "mustContain": "another" }, // make sure lazy catch-all SSG data route matches { "path": "/_next/data/testing-build-id/something.json", "mustContain": "My awesome article" }, // make sure lazy catch-all SSG data route has correct param { "path": "/_next/data/testing-build-id/something.json", "mustContain": "something" }, // make sure lazy catch-all SSG data route doesn't have HTML // make sure lazy catch-all SSG data route matches { "path": "/_next/data/testing-build-id/one-more.json", "mustNotContain": "" } ] } ================================================ FILE: packages/runtime/test/fixtures/27-non-word-param/package.json ================================================ { "dependencies": { "next": "9.4.4", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/27-non-word-param/pages/[...path-segments].js ================================================ import { useRouter } from 'next/router'; import Error from 'next/error'; function loadArticle() { return { content: [ { type: 'header', content: 'My awesome article', }, { type: 'paragraph', content: 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend.', }, ], }; } const Page = ({ path, article }) => { const router = useRouter(); if (router.isFallback) { return
Loading...
; } if (!article.content) { return ; } const [header, ...body] = article.content; return (
{header.content}
path: {path.join('/')}
{body.map(({ content }) => (

{content}

))}
); }; export default Page; export async function getStaticProps({ params }) { const path = params['path-segments']; const article = loadArticle(path); return { props: { article, path, }, }; } export async function getStaticPaths() { return { paths: [], fallback: true, }; } ================================================ FILE: packages/runtime/test/fixtures/27-non-word-param/pages/index.js ================================================ import Head from 'next/head'; const Home = () => (
Create Next App

Welcome to Next.js!

Get started by editing pages/index.js

); export default Home; ================================================ FILE: packages/runtime/test/fixtures/27-preview-mode/additional.js ================================================ /* eslint-env jest */ const cheerio = require('cheerio'); const setCookieParser = require('set-cookie-parser'); const fetch = require('../../../../../test/lib/deployment/fetch-retry'); module.exports = function (ctx) { let previewCookie; it('should enable preview mode successfully', async () => { const res = await fetch(`${ctx.deploymentUrl}/api/enable`); expect(res.status).toBe(200); const cookies = setCookieParser.parse( setCookieParser.splitCookiesString(res.headers.get('set-cookie')) ); const bypassCookie = cookies.find( cookie => cookie.name === '__prerender_bypass' ); const previewDataCookie = cookies.find( cookie => cookie.name === '__next_preview_data' ); expect(bypassCookie).toBeDefined(); expect(previewDataCookie).toBeDefined(); expect(bypassCookie.value.length > 0).toBe(true); expect(previewDataCookie.value.length > 0).toBe(true); previewCookie = cookies.reduce((prev, cur) => { return `${prev}${prev ? ';' : ''}${cur.name}=${cur.value}`; }, ''); }); it('should disable preview mode successfully', async () => { const res = await fetch(`${ctx.deploymentUrl}/api/disable`); expect(res.status).toBe(200); const cookies = setCookieParser.parse( setCookieParser.splitCookiesString(res.headers.get('set-cookie')) ); const bypassCookie = cookies.find( cookie => cookie.name === '__prerender_bypass' ); const previewDataCookie = cookies.find( cookie => cookie.name === '__next_preview_data' ); expect(bypassCookie).toBeDefined(); expect(previewDataCookie).toBeDefined(); expect(bypassCookie.value.length === 0).toBe(true); expect(previewDataCookie.value.length === 0).toBe(true); }); it('should render the page on-demand with preview mode enabled (normal page)', async () => { const res = await fetch(`${ctx.deploymentUrl}/docs`); expect(res.status).toBe(200); const html = await res.text(); const $ = cheerio.load(html); const props = JSON.parse($('#props').text()); const random = props.random; expect(props.hello).toBe('world'); const previewRes = await fetch(`${ctx.deploymentUrl}/docs`, { headers: { Cookie: previewCookie, }, }); expect(previewRes.status).toBe(200); const previewHtml = await previewRes.text(); const preview$ = cheerio.load(previewHtml); const previewProps = JSON.parse(preview$('#props').text()); expect(previewProps.random).not.toBe(random); expect(isNaN(previewProps.random)).toBe(false); expect(previewProps.hello).toBe('world'); }); it('should render the page on-demand with preview mode enabled (dynamic page)', async () => { const res = await fetch(`${ctx.deploymentUrl}/docs/first`); expect(res.status).toBe(200); const html = await res.text(); const $ = cheerio.load(html); const props = JSON.parse($('#props').text()); const random = props.random; expect(props.hello).toBe('world'); expect(props.params).toEqual({ rest: ['first'] }); const previewRes = await fetch(`${ctx.deploymentUrl}/docs/first`, { headers: { Cookie: previewCookie, }, }); expect(previewRes.status).toBe(200); const previewHtml = await previewRes.text(); const preview$ = cheerio.load(previewHtml); const previewProps = JSON.parse(preview$('#props').text()); expect(previewProps.random).not.toBe(random); expect(isNaN(previewProps.random)).toBe(false); expect(previewProps.hello).toBe('world'); expect(previewProps.params).toEqual({ rest: ['first'] }); }); }; ================================================ FILE: packages/runtime/test/fixtures/27-preview-mode/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/27-preview-mode/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }] } ================================================ FILE: packages/runtime/test/fixtures/27-preview-mode/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/27-preview-mode/pages/api/disable.js ================================================ export default (req, res) => { res.clearPreviewData(); res.end('preview mode disabled'); }; ================================================ FILE: packages/runtime/test/fixtures/27-preview-mode/pages/api/enable.js ================================================ export default (req, res) => { res.setPreviewData({ hello: 'world' }); res.end('preview mode enabled'); }; ================================================ FILE: packages/runtime/test/fixtures/27-preview-mode/pages/docs/[...rest].js ================================================ export const getStaticProps = ctx => { console.log('previewData', ctx.previewData); return { props: { hello: 'world', params: ctx.params, random: Math.random(), }, }; }; export const getStaticPaths = () => { return { paths: [['first'], ['second'], ['another', 'one']].map(rest => ({ params: { rest }, })), fallback: false, }; }; export default function Docs(props) { return

{JSON.stringify(props)}

; } ================================================ FILE: packages/runtime/test/fixtures/27-preview-mode/pages/docs/index.js ================================================ export const getStaticProps = ctx => { console.log('previewData', ctx.previewData); return { props: { hello: 'world', random: Math.random(), }, }; }; export default function Docs(props) { return

{JSON.stringify(props)}

; } ================================================ FILE: packages/runtime/test/fixtures/28-nested-public/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/28-nested-public/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/", "status": 200, "mustContain": "index page" }, { "path": "/republic/test.txt", "status": 200, "mustContain": "hello world" } ] } ================================================ FILE: packages/runtime/test/fixtures/28-nested-public/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/28-nested-public/pages/index.js ================================================ export default function Page() { return

index page

; } ================================================ FILE: packages/runtime/test/fixtures/28-nested-public/public/republic/test.txt ================================================ hello world ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static/now.json ================================================ { "version": 2, "uploadNowJson": true, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/forever", "status": 200, "mustContain": "hello" }, { "path": "/blog/post-1", "status": 200, "mustContain": "post-1" }, { "path": "/blog/post-2", "status": 200, "mustContain": "post-2" }, { "path": "/_next/data/testing-build-id/blog/post-1.json", "status": 200, "mustContain": "post-1" }, { "path": "/_next/data/testing-build-id/blog/post-2.json", "status": 200, "mustContain": "post-2" }, { "path": "/blog/post-1/comment-1", "status": 200, "mustContain": "comment-1" }, { "path": "/blog/post-2/comment-2", "status": 200, "mustContain": "comment-2" }, { "path": "/_next/data/testing-build-id/blog/post-1/comment-1.json", "status": 200, "mustContain": "comment-1" }, { "path": "/_next/data/testing-build-id/blog/post-2/comment-2.json", "status": 200, "mustContain": "comment-2" }, { "path": "/_next/data/testing-build-id/forever.json", "status": 200, "mustContain": "world" }, { "path": "/_next/data/testing-build-id/another2.json", "status": 200, "mustContain": "world" }, { "path": "/nofallback/one", "status": 200, "mustContain": "one" }, { "path": "/nofallback/two", "status": 200, "mustContain": "two" }, { "path": "/nofallback/nope", "status": 404, "mustContain": "This page could not be found" }, { "path": "/_next/data/testing-build-id/nofallback/one.json", "status": 200, "mustContain": "one" }, { "path": "/_next/data/testing-build-id/nofallback/two.json", "status": 200, "mustContain": "two" }, { "path": "/_next/data/testing-build-id/nofallback/nope.json", "status": 404 }, { "logMustNotContain": "WARNING: your application is being opted out of @vercel/next's optimized lambdas mode due to legacy routes" }, { "logMustNotContain": "WARNING: Your application is being opted out of \"@vercel/next\" optimized lambdas mode due to `functions` config" }, { "logMustNotContain": "Traced Next.js serverless functions for external files in" }, { "logMustNotContain": "All serverless functions created in" }, { "logMustNotContain": "Compressed shared serverless function files" } ] } ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static/pages/another-index/index.js ================================================ export default () => 'Hi'; export const getStaticProps = () => { return { props: { hello: 'world', }, }; }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static/pages/another.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticProps() { return { props: { world: 'world', random: Math.random(), time: new Date().getTime(), }, }; } export default ({ world, time, random }) => { return ( <>

hello: {world}

time: {time} random: {random} ); }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static/pages/another2.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticProps() { return { props: { world: 'world', time: new Date().getTime(), }, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static/pages/blog/[post]/[comment].js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticPaths() { return { paths: [ '/blog/post-1/comment-1', { params: { post: 'post-2', comment: 'comment-2' } }, '/blog/post-1337/comment-1337', '/blog/post-123/comment-321', ], fallback: false, }; } // eslint-disable-next-line camelcase export async function getStaticProps({ params }) { return { props: { post: params.post, random: Math.random(), comment: params.comment, time: new Date().getTime(), }, }; } export default ({ post, comment, time, random }) => { if (!post) return

loading...

; return ( <>

Post: {post}

Comment: {comment}

time: {time} random: {random} ); }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static/pages/blog/[post]/index.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticPaths() { return { paths: ['/blog/post-1', { params: { post: 'post-2' } }, '/blog/post-123'], fallback: false, }; } // eslint-disable-next-line camelcase export async function getStaticProps({ params }) { if (params.post === 'post-10') { await new Promise(resolve => { setTimeout(() => resolve(), 1000); }); } return { props: { post: params.post, random: Math.random(), time: (await import('perf_hooks')).performance.now(), }, }; } export default ({ post, time, random }) => { if (!post) return

loading...

; return ( <>

Post: {post}

time: {time} random: {random} ); }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static/pages/forever.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticProps() { return { props: { world: 'world', time: new Date().getTime(), }, revalidate: false, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static/pages/index.js ================================================ export default () => 'Hi'; export const getStaticProps = () => { return { props: { hello: 'world', }, }; }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static/pages/nofallback/[slug].js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticPaths() { return { paths: ['/nofallback/one', { params: { slug: 'two' } }], fallback: false, }; } // eslint-disable-next-line camelcase export async function getStaticProps({ params }) { return { props: { slug: params.slug, time: (await import('perf_hooks')).performance.now(), }, }; } export default ({ slug, time }) => { return ( <>

Slug ({slug.length}): {slug}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static-custom-404/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static-custom-404/now.json ================================================ { "version": 2, "uploadNowJson": true, "builds": [{ "src": "package.json", "use": "@vercel/next" }], "probes": [ { "path": "/forever", "status": 200, "mustContain": "hello" }, { "path": "/blog/post-1", "status": 200, "mustContain": "post-1" }, { "path": "/blog/post-2", "status": 200, "mustContain": "post-2" }, { "path": "/_next/data/testing-build-id/blog/post-1.json", "status": 200, "mustContain": "post-1" }, { "path": "/_next/data/testing-build-id/blog/post-2.json", "status": 200, "mustContain": "post-2" }, { "path": "/blog/post-1/comment-1", "status": 200, "mustContain": "comment-1" }, { "path": "/blog/post-2/comment-2", "status": 200, "mustContain": "comment-2" }, { "path": "/_next/data/testing-build-id/blog/post-1/comment-1.json", "status": 200, "mustContain": "comment-1" }, { "path": "/_next/data/testing-build-id/blog/post-2/comment-2.json", "status": 200, "mustContain": "comment-2" }, { "path": "/_next/data/testing-build-id/forever.json", "status": 200, "mustContain": "world" }, { "path": "/_next/data/testing-build-id/another2.json", "status": 200, "mustContain": "world" }, { "path": "/nofallback/one", "status": 200, "mustContain": "one" }, { "path": "/nofallback/two", "status": 200, "mustContain": "two" }, { "path": "/nofallback/nope", "status": 404, "mustContain": "page not found" }, { "path": "/_next/data/testing-build-id/nofallback/one.json", "status": 200, "mustContain": "one" }, { "path": "/_next/data/testing-build-id/nofallback/two.json", "status": 200, "mustContain": "two" }, { "path": "/_next/data/testing-build-id/nofallback/nope.json", "status": 404 }, { "path": "/404", "status": 404, "mustContain": "page not found" }, { "logMustNotContain": "WARNING: your application is being opted out of @vercel/next's optimized lambdas mode due to legacy routes" }, { "logMustNotContain": "WARNING: Your application is being opted out of \"@vercel/next\" optimized lambdas mode due to `functions` config" }, { "logMustNotContain": "Traced Next.js serverless functions for external files in" }, { "logMustNotContain": "All serverless functions created in" }, { "logMustNotContain": "Compressed shared serverless function files" } ] } ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static-custom-404/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static-custom-404/pages/404.js ================================================ export default function Page({ found }) { return

page not {found}

; } export const getStaticProps = () => { return { props: { found: 'found', }, }; }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static-custom-404/pages/another.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticProps() { return { props: { world: 'world', random: Math.random(), time: new Date().getTime(), }, }; } export default ({ world, time, random }) => { return ( <>

hello: {world}

time: {time} random: {random} ); }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static-custom-404/pages/another2.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticProps() { return { props: { world: 'world', time: new Date().getTime(), }, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static-custom-404/pages/blog/[post]/[comment].js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticPaths() { return { paths: [ '/blog/post-1/comment-1', { params: { post: 'post-2', comment: 'comment-2' } }, '/blog/post-1337/comment-1337', '/blog/post-123/comment-321', ], fallback: false, }; } // eslint-disable-next-line camelcase export async function getStaticProps({ params }) { return { props: { post: params.post, random: Math.random(), comment: params.comment, time: new Date().getTime(), }, }; } export default ({ post, comment, time, random }) => { if (!post) return

loading...

; return ( <>

Post: {post}

Comment: {comment}

time: {time} random: {random} ); }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static-custom-404/pages/blog/[post]/index.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticPaths() { return { paths: ['/blog/post-1', { params: { post: 'post-2' } }, '/blog/post-123'], fallback: false, }; } // eslint-disable-next-line camelcase export async function getStaticProps({ params }) { if (params.post === 'post-10') { await new Promise(resolve => { setTimeout(() => resolve(), 1000); }); } return { props: { post: params.post, random: Math.random(), time: (await import('perf_hooks')).performance.now(), }, }; } export default ({ post, time, random }) => { if (!post) return

loading...

; return ( <>

Post: {post}

time: {time} random: {random} ); }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static-custom-404/pages/forever.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticProps() { return { props: { world: 'world', time: new Date().getTime(), }, revalidate: false, }; } export default ({ world, time }) => { return ( <>

hello: {world}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static-custom-404/pages/index.js ================================================ export default () => 'Hi'; export const getStaticProps = () => { return { props: { hello: 'world', }, }; }; ================================================ FILE: packages/runtime/test/fixtures/29-ssg-all-static-custom-404/pages/nofallback/[slug].js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticPaths() { return { paths: ['/nofallback/one', { params: { slug: 'two' } }], fallback: false, }; } // eslint-disable-next-line camelcase export async function getStaticProps({ params }) { return { props: { slug: params.slug, time: (await import('perf_hooks')).performance.now(), }, }; } export default ({ slug, time }) => { return ( <>

Slug ({slug.length}): {slug}

time: {time} ); }; ================================================ FILE: packages/runtime/test/fixtures/30-monorepo-no-script/.gitignore ================================================ # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* lerna-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Runtime data pids *.pid *.seed *.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage *.lcov # nyc test coverage .nyc_output # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) .grunt # Bower dependency directory (https://bower.io/) bower_components # node-waf configuration .lock-wscript # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules/ jspm_packages/ # TypeScript v1 declaration files typings/ # TypeScript cache *.tsbuildinfo # Optional npm cache directory .npm # Optional eslint cache .eslintcache # Microbundle cache .rpt2_cache/ .rts2_cache_cjs/ .rts2_cache_es/ .rts2_cache_umd/ # Optional REPL history .node_repl_history # Output of 'npm pack' *.tgz # Yarn Integrity file .yarn-integrity # dotenv environment variables file .env .env.test # parcel-bundler cache (https://parceljs.org/) .cache # Next.js build output .next # Nuxt.js build / generate output .nuxt dist # Gatsby files .cache/ # Comment in the public line in if your project uses Gatsby and *not* Next.js # https://nextjs.org/blog/next-9-1#public-directory-support # public # vuepress build output .vuepress/dist # Serverless directories .serverless/ # FuseBox cache .fusebox/ # DynamoDB Local files .dynamodb/ # TernJS port file .tern-port # IDEA .idea/ *.iml ================================================ FILE: packages/runtime/test/fixtures/30-monorepo-no-script/babel.config.js ================================================ module.exports = api => { api.cache(true); const presets = [require.resolve('next/babel')]; return { presets, plugins: [] }; }; ================================================ FILE: packages/runtime/test/fixtures/30-monorepo-no-script/now.json ================================================ { "version": 2, "uploadNowJson": true, "builds": [{ "src": "packages/www/package.json", "use": "@vercel/next" }], "routes": [{ "src": "/(.*)", "dest": "/packages/www/$1" }], "probes": [ { "path": "/", "status": 200, "mustContain": "Hello World" }, { "logMustContain": "Your application is being built using `next build`" }, { "logMustContain": "WARNING: your application is being opted out of @vercel/next's optimized lambdas mode due to legacy routes" }, { "logMustNotContain": "WARNING: Your application is being opted out of \"@vercel/next\" optimized lambdas mode due to `functions` config" }, { "logMustNotContain": "Traced Next.js serverless functions for external files in" }, { "logMustNotContain": "All serverless functions created in" }, { "logMustNotContain": "Compressed shared serverless function files" } ] } ================================================ FILE: packages/runtime/test/fixtures/30-monorepo-no-script/package.json ================================================ { "private": true, "workspaces": [ "packages/*" ], "dependencies": { "next": "9.5.1", "react": "16.13.1", "react-dom": "16.13.1" } } ================================================ FILE: packages/runtime/test/fixtures/30-monorepo-no-script/packages/www/next.config.js ================================================ module.exports = { poweredByHeader: false, webpack: (config, { defaultLoaders }) => { defaultLoaders.babel.options.rootMode = 'upward'; return config; }, }; ================================================ FILE: packages/runtime/test/fixtures/30-monorepo-no-script/packages/www/package.json ================================================ { "name": "@vercel-crash-demo/www", "version": "1.0.0", "private": true, "sideEffects": false } ================================================ FILE: packages/runtime/test/fixtures/30-monorepo-no-script/packages/www/pages/index.jsx ================================================ import React from 'react'; const HelloWorld = () => (

Hello World

); export default HelloWorld; ================================================ FILE: packages/runtime/test/fixtures/31-blocking-fallback/additional.js ================================================ /* eslint-env jest */ const cheerio = require('cheerio'); const fetch = require('../../../../../test/lib/deployment/fetch-retry'); module.exports = function (ctx) { it('should revalidate content properly from dynamic pathname', async () => { // wait for revalidation to expire await new Promise(resolve => setTimeout(resolve, 4000)); const res = await fetch(`${ctx.deploymentUrl}/regenerated/blue`); expect(res.status).toBe(200); let $ = cheerio.load(await res.text()); const initialTime = $('#time').text(); expect($('#slug').text()).toBe('blue'); // wait for revalidation to occur await new Promise(resolve => setTimeout(resolve, 4000)); const res2 = await fetch(`${ctx.deploymentUrl}/regenerated/blue`); expect(res2.status).toBe(200); $ = cheerio.load(await res2.text()); expect($('#slug').text()).toBe('blue'); expect(initialTime).not.toBe($('#time').text()); }); it('should revalidate content properly from /_next/data dynamic pathname', async () => { // wait for revalidation to expire await new Promise(resolve => setTimeout(resolve, 4000)); const res = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/regenerated/blue.json` ); expect(res.status).toBe(200); const { pageProps: data } = await res.json(); const initialTime = data.time; expect(data.slug).toBe('blue'); expect(isNaN(initialTime)).toBe(false); // wait for revalidation to occur await new Promise(resolve => setTimeout(resolve, 4000)); const res2 = await fetch( `${ctx.deploymentUrl}/_next/data/testing-build-id/regenerated/blue.json` ); expect(res2.status).toBe(200); const { pageProps: data2 } = await res2.json(); expect(data2.slug).toBe('blue'); expect(initialTime).not.toBe(data2.time); }); }; ================================================ FILE: packages/runtime/test/fixtures/31-blocking-fallback/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/fixtures/31-blocking-fallback/now.json ================================================ { "version": 2, "builds": [ { "src": "package.json", "use": "@vercel/next" } ], "probes": [ { "path": "/fixed/yellow", "status": 200, "mustContain": "yellow" }, { "delay": 2000 }, { "path": "/fixed/yellow", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/_next/data/testing-build-id/fixed/yellow.json", "status": 200, "responseHeaders": { "x-vercel-cache": "HIT" } }, { "path": "/fixed/yellow", "status": 200, "mustContain": "yellow" }, { "path": "/_next/data/testing-build-id/fixed/yellow.json", "status": 200, "mustContain": "yellow" }, { "path": "/regenerated/blue", "status": 200, "mustContain": "blue" }, { "delay": 2000 }, { "path": "/regenerated/blue", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE/" } }, { "path": "/_next/data/testing-build-id/regenerated/blue.json", "status": 200, "responseHeaders": { "x-vercel-cache": "/HIT|STALE/" } } ] } ================================================ FILE: packages/runtime/test/fixtures/31-blocking-fallback/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/31-blocking-fallback/pages/fixed/[slug].js ================================================ export default function TestPage({ slug, time }) { return ( <> Slug:
{slug}

Time:
{time}
); } export function getStaticProps({ params }) { return { props: { slug: params.slug, time: new Date().getTime(), }, revalidate: false, }; } export function getStaticPaths() { return { paths: [], fallback: 'blocking' }; } ================================================ FILE: packages/runtime/test/fixtures/31-blocking-fallback/pages/regenerated/[slug].js ================================================ export default function TestPage({ slug, time }) { return ( <> Slug:
{slug}

Time:
{time}
); } export function getStaticProps({ params }) { return { props: { slug: params.slug, time: new Date().getTime(), }, revalidate: true, }; } export function getStaticPaths() { return { paths: [], fallback: 'blocking' }; } ================================================ FILE: packages/runtime/test/fixtures/32-custom-install-command/.gitignore ================================================ install.txt ================================================ FILE: packages/runtime/test/fixtures/32-custom-install-command/.yarn/releases/yarn-berry.cjs ================================================ #!/usr/bin/env node module.exports=(()=>{var e={25545:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=25545,e.exports=t},44692:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var A=r(54143);const n={optional:!0},o=[["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:n,zenObservable:n}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:n,zenObservable:n}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{"supports-color":n}}],["got@<11",{dependencies:{"@types/responselike":"^1.0.0","@types/keyv":"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{"@types/keyv":"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{"vscode-jsonrpc":"^5.0.1","vscode-languageserver-protocol":"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{"postcss-html":n,"postcss-jsx":n,"postcss-less":n,"postcss-markdown":n,"postcss-scss":n}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{"tiny-warning":"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:n}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@*",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@*",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4"},peerDependenciesMeta:{eslint:n}}],["rc-animate@*",{peerDependencies:{react:"^15.0.0 || ^16.0.0","react-dom":"^15.0.0 || ^16.0.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:n,"utf-8-validate":n}}],["react-portal@*",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}]];let i,s,a;const c=new Map([[A.makeIdent(null,"fsevents").identHash,function(){return void 0===i&&(i=r(78761).brotliDecompressSync(Buffer.from("G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2S5tvGrwHBAzdz+s/npQ6tgEvobvxisrPIadkXeUAJotBn5bDZ5kAhcRqsIHe3F75Walet5hNalwgFDtxb0BiDUjiUQkjG0yW2hto9HPgiCkm316d6bC0kST72YN7D7rfkhCE9x4J0XwB0yavalxpUu2t9xszHrmtwalOxT7VslsxWcB1qpqZwERUra4psWhTV8BgwWeizurec82Caf1ABL11YMfbf8FJ9JBceZOkgmvrQPbC9DUldX/yMbmX06UQluCEjSwUoyO+EZPIjofr+/oAZUck2enraRD+oWLlnlYnj8xB+gwSo9lmmks4fXv574qSqcWA6z21uYkzMu3EWj+K23RxeQlLqiE35/rC8GcS4CGkKHKKq+zAIQwD9iRDNfiAqueLLpicFFrNsAI4zeTD/eO9MHcnRa5m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L8EPbkmEMftMSeL6HFub/zy+2JQ==","base64")).toString()),i}],[A.makeIdent(null,"resolve").identHash,function(){return void 0===s&&(s=r(78761).brotliDecompressSync(Buffer.from("G1QTIIzURnVBnGa0VPvr81orV8AFIqdU0sqrdcVgCdukgAZwi8a50gLk9+19Z2NcUILjmzXkzt4dzm5a6Yoys+/9qnKiaApXukOiuoyUaMcynG4X7X4vBaIE/PL30gwG6HSGJkLxb9PnLjfMr+748n7sM6C/NycK6ber/bX1reVVxta6W/31tZIhfrS+upoE/TPRHj0S/l0T59gTGdtKOp1OmMOJt9rhfucDdLJ2tgyfnO+u4YMkQAcYq/nebTcDmbXhqhgo6iQA4M3m4xya4Cos3p6klmkmQT+S4DLDZfwfMF+sUCx36KleOtaHLQfEIz0Bmncj/Ngi3lqOl4391EWEfIss6gVp3oDUGwsSZJKeOVONJWZg+Mue3KUMV3aMqYJ+7b2219D+GFDi8EV5y/Y+5J+He0oNjKAgqLsJziEsS9uIaCu3BHBKSXxNKKa2ShbfglcWoiiVT2kfGI7Gw+YJ/Sqy1H6wdFWtyVUQIa82JPwbeV25YKLzc5ZIFM6GCPSA+J9dTvJbs5LuuKnLP3f09gCu2jxqsAv6CA+ZySVaUJr2d3A70BC/uBCKr2OVrWgC3fSwb7NlfkgSEEiejrMGvhya9lMbVI6lMsFKN330A1/FOaefHQdNGLEZ3IwFF87H3xVlM0Xxsmbi/7A60oymRcIe0tH90alG6ez/yA7jwYotxuHWZdR+1HlMcddGHAV6QD/gXYPV0wnNv47I+5FGevzZFMqWSO8GU4nQ3FjsdgdJcD+c1rvudERKuLyd7bxiBpnsMDHsvPP4nXdXkld/gUNks3GAE1Otmb90bavDyiw4Mrx496Iw+jbLTgsCZGZXSZ9vM55C7KGe4HyJAKXEk0iT/Cj/PFwLJBN7pcP7ZFfYtUApGTWKkYhI9IE2zt/5ByH72wdvH+88b71zuv/FMCX3w6x5nzhY44Cg5IYv9LeKwHuHIWgPbfgrAcUxOlKkPRdQOIDF/aBuLPJAXD+TgxCNXx4jQxeR/qlBWVikFPfEI4rXMUc4kZ2w9KbPKYRvFUag0dVlVoyUP4zfidbTXAdZF88jAckl+NHjLFCNdX7EQ1PbLSOl+P+MqgwEOCi6dxgWZ7NCwJBjWKpk1LaxwKrhZ4aEC/0lMPJYe5S8xAakDcmA2kSS86GjEMTrv3VEu0S0YGZcxToMV524G4WAc4CReePePdipvs4aXRL5p+aeN96yfMGjsiTbQNxgbdRKc+keQ+NxYIEm1mBtEO29WrcbrqNbQRMR66KpGG4aG0NtmRyZ2JhUvu0paCklRlID8PT3gSiwZrqr4XZXoBBzBMrveWCuOg7iTgGDXDdbGi8XHkQf5KXDGFUxWueu5wkSa6gMWY1599g2piQjwBKIAPt4N5cOZdFBidz2feGwEAy1j1UydGxDSCCUsh314cUIIRV/dWCheceubL2gU8CibewmP7UxmN5kN4I7zfQhPxkP0NCcei8GXQpw4c3krEzW7PR2hgi/hqqqR58UJ/ZVfWxfcH5ZKMo4itkmPK0FCGxzzIRP20lK/gz28Y03sY233KvSVWUKl9rcbX6MbHjpUG8MvNlw72p6FwTejv92zgpnCxVJnIHHZhCBxNcHF5RTveRp513hUtTHHq4BIndlytZT5xoTSYfHKqKNr4o9kcGINIz6tZSKRdtbON3Ydr9cgqxHIeisMNIsvPg/IFMZuBbSqqDLeSO5dak1cGr76FtH2PC7hs0S0Oq3GsmF1Ga4YABAMGcdPAWzTk26B7cKV91I2b0V/GYvnsEQ1YGntRqi5EQqTlgZszbV/32GuZtUF49JOA/r4jAdwUOsbPo6mNoBlJPYjM5axrZaWQf33bFsLWqiyvvDOM4x0Ng802T7cuP2a3q98GWq6yiq6q3M77hcZlOUnmryctRYmI4Hb2F5XixFohkBmySCjU+M7/WQVE5YAtnlxiUJDhFN0y1tNeMWY9E0MfZi2rQ4eC72WXjsAA==","base64")).toString()),s}],[A.makeIdent(null,"typescript").identHash,function(){return void 0===a&&(a=r(78761).brotliDecompressSync(Buffer.from("W/FcOBIh6A6ch1ZVK40i2Dg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WZohiTJd0WgCAO1WFGJ3KjYQd8IHoLtUbiXGtvr7BQGAprnU1RgHarbpiigwtXYPkAIzZYmxUmDQrh8kBThxClZSgKQt33NMlZJJDQF1lShpxMud2jI3GxDwdm4RCLCumJ0l4DD/zhXgVllRiojI4LhN9O6gnD9+XGN+a4MMkfEb6w0kgLr9hyOE4zYh4db4k9Dj6W3ywyuCzPyN9QsSQIFEwT+6ENP9JfKq5D3AK1nB5F/kPT8BHPOb9XiQZ1l54OqUZQCgzgguA9WawfQhLs/5l9E+PVZOQWefJgAwB6ZdGxZYypRTMz6R1yAAaIHHTtQSXGX7MOBea7wNHrl/AnjoGKjBiPW+AQ==","base64")).toString()),a}]]),g={hooks:{registerPackageExtensions:async(e,t)=>{for(const[e,r]of o)t(A.parseDescriptor(e,!0),r)},getBuiltinPatch:async(e,t)=>{var r;if(!t.startsWith("compat/"))return;const n=A.parseIdent(t.slice("compat/".length)),o=null===(r=c.get(n.identHash))||void 0===r?void 0:r();return void 0!==o?o:null},reduceDependency:async(e,t,r,n)=>void 0===c.get(e.identHash)?e:A.makeDescriptor(e,A.makeRange({protocol:"patch:",source:A.stringifyDescriptor(e),selector:`builtin`,params:null}))}}},10189:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>p});var A=r(36370),n=r(25413),o=r(54143),i=r(40822);class s extends n.BaseCommand{constructor(){super(...arguments),this.quiet=!1,this.args=[]}async execute(){const e=[];this.pkg&&e.push("--package",this.pkg),this.quiet&&e.push("--quiet");const t=o.parseIdent(this.command),r=o.makeIdent(t.scope,"create-"+t.name);return this.cli.run(["dlx",...e,o.stringifyIdent(r),...this.args])}}(0,A.gn)([i.Command.String("-p,--package",{description:"The package to run the provided command from"})],s.prototype,"pkg",void 0),(0,A.gn)([i.Command.Boolean("-q,--quiet",{description:"Only report critical errors instead of printing the full install logs"})],s.prototype,"quiet",void 0),(0,A.gn)([i.Command.String()],s.prototype,"command",void 0),(0,A.gn)([i.Command.Proxy()],s.prototype,"args",void 0),(0,A.gn)([i.Command.Path("create")],s.prototype,"execute",null);var a=r(39922),c=r(85824),g=r(63088),l=r(43896),u=r(46009);class h extends n.BaseCommand{constructor(){super(...arguments),this.quiet=!1,this.args=[]}async execute(){return a.VK.telemetry=null,await l.xfs.mktempPromise(async e=>{const t=u.y1.join(e,"dlx-"+process.pid);await l.xfs.mkdirPromise(t),await l.xfs.writeFilePromise(u.y1.join(t,"package.json"),"{}\n"),await l.xfs.writeFilePromise(u.y1.join(t,"yarn.lock"),"");const r=u.y1.join(t,".yarnrc.yml"),A=await a.VK.findProjectCwd(this.context.cwd,u.QS.lockfile),i=null!==A?u.y1.join(A,".yarnrc.yml"):null;null!==i&&l.xfs.existsSync(i)?(await l.xfs.copyFilePromise(i,r),await a.VK.updateConfiguration(t,e=>{const t={...e,enableGlobalCache:!0,enableTelemetry:!1};return Array.isArray(e.plugins)&&(t.plugins=e.plugins.map(e=>{const t="string"==typeof e?e:e.path,r=u.cS.isAbsolute(t)?t:u.cS.resolve(u.cS.fromPortablePath(A),t);return"string"==typeof e?r:{path:r,spec:e.spec}})),t})):await l.xfs.writeFilePromise(r,"enableGlobalCache: true\nenableTelemetry: false\n");const s=void 0!==this.pkg?[this.pkg]:[this.command],h=o.parseDescriptor(this.command).name,p=await this.cli.run(["add","--",...s],{cwd:t,quiet:this.quiet});if(0!==p)return p;this.quiet||this.context.stdout.write("\n");const d=await a.VK.find(t,this.context.plugins),{project:C,workspace:f}=await c.I.find(d,t);if(null===f)throw new n.WorkspaceRequiredError(C.cwd,t);return await C.restoreInstallState(),await g.executeWorkspaceAccessibleBinary(f,h,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}}h.usage=i.Command.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"]]}),(0,A.gn)([i.Command.String("-p,--package",{description:"The package to run the provided command from"})],h.prototype,"pkg",void 0),(0,A.gn)([i.Command.Boolean("-q,--quiet",{description:"Only report critical errors instead of printing the full install logs"})],h.prototype,"quiet",void 0),(0,A.gn)([i.Command.String()],h.prototype,"command",void 0),(0,A.gn)([i.Command.Proxy()],h.prototype,"args",void 0),(0,A.gn)([i.Command.Path("dlx")],h.prototype,"execute",null);const p={commands:[s,h]}},34777:(e,t,r)=>{"use strict";r.r(t),r.d(t,{dedupeUtils:()=>A,default:()=>We,suggestUtils:()=>A});var A={};r.r(A),r.d(A,{Modifier:()=>o,Strategy:()=>i,Target:()=>n,applyModifier:()=>S,extractDescriptorFromPath:()=>N,extractRangeModifier:()=>v,fetchDescriptorFrom:()=>K,findProjectDescriptors:()=>k,getModifier:()=>D,getSuggestedDescriptors:()=>F});var n,o,i,s=r(39922),a=r(36370),c=r(25413),g=r(28148),l=r(62152),u=r(92659),h=r(85824),p=r(15815),d=r(54143),C=r(40822),f=r(61899),I=r(33720),E=r(46611),B=r(71643),y=r(43896),m=r(46009),w=r(53887),Q=r.n(w);function D(e,t){return e.exact?o.EXACT:e.caret?o.CARET:e.tilde?o.TILDE:t.configuration.get("defaultSemverRangePrefix")}!function(e){e.REGULAR="dependencies",e.DEVELOPMENT="devDependencies",e.PEER="peerDependencies"}(n||(n={})),function(e){e.CARET="^",e.TILDE="~",e.EXACT=""}(o||(o={})),function(e){e.KEEP="keep",e.REUSE="reuse",e.PROJECT="project",e.LATEST="latest",e.CACHE="cache"}(i||(i={}));const b=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function v(e,{project:t}){const r=e.match(b);return r?r[1]:t.configuration.get("defaultSemverRangePrefix")}function S(e,t){let{protocol:r,source:A,params:n,selector:o}=d.parseRange(e.range);return Q().valid(o)&&(o=`${t}${e.range}`),d.makeDescriptor(e,d.makeRange({protocol:r,source:A,params:n,selector:o}))}async function k(e,{project:t,target:r}){const A=new Map,o=e=>{let t=A.get(e.descriptorHash);return t||A.set(e.descriptorHash,t={descriptor:e,locators:[]}),t};for(const A of t.workspaces)if(r===n.PEER){const t=A.manifest.peerDependencies.get(e.identHash);void 0!==t&&o(t).locators.push(A.locator)}else{const t=A.manifest.dependencies.get(e.identHash),i=A.manifest.devDependencies.get(e.identHash);r===n.DEVELOPMENT?void 0!==i?o(i).locators.push(A.locator):void 0!==t&&o(t).locators.push(A.locator):void 0!==t?o(t).locators.push(A.locator):void 0!==i&&o(i).locators.push(A.locator)}return A}async function N(e,{cwd:t,workspace:r}){return await async function(e){return await y.xfs.mktempPromise(async t=>{const r=s.VK.create(t);return r.useWithSource(t,{enableMirror:!1,compressionLevel:0},t,{overwrite:!0}),await e(new g.C(t,{configuration:r,check:!1,immutable:!1}))})}(async A=>{m.y1.isAbsolute(e)||(e=m.y1.relative(r.cwd,m.y1.resolve(t,e))).match(/^\.{0,2}\//)||(e="./"+e);const{project:n}=r,o=await K(d.makeIdent(null,"archive"),e,{project:r.project,cache:A,workspace:r});if(!o)throw new Error("Assertion failed: The descriptor should have been found");const i=new I.$,s=n.configuration.makeResolver(),a=n.configuration.makeFetcher(),c={checksums:n.storedChecksums,project:n,cache:A,fetcher:a,report:i,resolver:s},g=s.bindDescriptor(o,r.anchoredLocator,c),l=d.convertDescriptorToLocator(g),u=await a.fetch(l,c),h=await E.G.find(u.prefixPath,{baseFs:u.packageFs});if(!h.name)throw new Error("Target path doesn't have a name");return d.makeDescriptor(h.name,e)})}async function F(e,{project:t,workspace:r,cache:A,target:o,modifier:s,strategies:a,maxResults:c=1/0}){if(!(c>=0))throw new Error(`Invalid maxResults (${c})`);if("unknown"!==e.range)return{suggestions:[{descriptor:e,name:"Use "+d.prettyDescriptor(t.configuration,e),reason:"(unambiguous explicit request)"}],rejections:[]};const g=null!=r&&r.manifest[o].get(e.identHash)||null,l=[],u=[],h=async e=>{try{await e()}catch(e){u.push(e)}};for(const u of a){if(l.length>=c)break;switch(u){case i.KEEP:await h(async()=>{g&&l.push({descriptor:g,name:"Keep "+d.prettyDescriptor(t.configuration,g),reason:"(no changes)"})});break;case i.REUSE:await h(async()=>{for(const{descriptor:A,locators:n}of(await k(e,{project:t,target:o})).values()){if(1===n.length&&n[0].locatorHash===r.anchoredLocator.locatorHash&&a.includes(i.KEEP))continue;let e="(originally used by "+d.prettyLocator(t.configuration,n[0]);e+=n.length>1?` and ${n.length-1} other${n.length>2?"s":""})`:")",l.push({descriptor:A,name:"Reuse "+d.prettyDescriptor(t.configuration,A),reason:e})}});break;case i.CACHE:await h(async()=>{for(const r of t.storedDescriptors.values())r.identHash===e.identHash&&l.push({descriptor:r,name:"Reuse "+d.prettyDescriptor(t.configuration,r),reason:"(already used somewhere in the lockfile)"})});break;case i.PROJECT:await h(async()=>{if(null!==r.manifest.name&&e.identHash===r.manifest.name.identHash)return;const A=t.tryWorkspaceByIdent(e);null!==A&&l.push({descriptor:A.anchoredDescriptor,name:"Attach "+d.prettyWorkspace(t.configuration,A),reason:`(local workspace at ${A.cwd})`})});break;case i.LATEST:await h(async()=>{if("unknown"!==e.range)l.push({descriptor:e,name:"Use "+d.prettyRange(t.configuration,e.range),reason:"(explicit range requested)"});else if(o===n.PEER)l.push({descriptor:d.makeDescriptor(e,"*"),name:"Use *",reason:"(catch-all peer dependency pattern)"});else if(t.configuration.get("enableNetwork")){let n=await K(e,"latest",{project:t,cache:A,workspace:r,preserveModifier:!1});n&&(n=S(n,s),l.push({descriptor:n,name:"Use "+d.prettyDescriptor(t.configuration,n),reason:"(resolved from latest)"}))}else l.push({descriptor:null,name:"Resolve from latest",reason:B.pretty(t.configuration,"(unavailable because enableNetwork is toggled off)","grey")})})}}return{suggestions:l.slice(0,c),rejections:u.slice(0,c)}}async function K(e,t,{project:r,cache:A,workspace:n,preserveModifier:o=!0}){const i=d.makeDescriptor(e,t),s=new I.$,a=r.configuration.makeFetcher(),c=r.configuration.makeResolver(),g={project:r,fetcher:a,cache:A,checksums:r.storedChecksums,report:s,skipIntegrityCheck:!0},l={...g,resolver:c,fetchOptions:g},u=c.bindDescriptor(i,n.anchoredLocator,l),h=await c.getCandidates(u,new Map,l);if(0===h.length)return null;const p=h[0];let{protocol:C,source:f,params:E,selector:B}=d.parseRange(d.convertToManifestRange(p.reference));if(C===r.configuration.get("defaultProtocol")&&(C=null),Q().valid(B)&&!1!==o){B=v("string"==typeof o?o:i.range,{project:r})+B}return d.makeDescriptor(p,d.makeRange({protocol:C,source:f,params:E,selector:B}))}class M extends c.BaseCommand{constructor(){super(...arguments),this.packages=[],this.json=!1,this.exact=!1,this.tilde=!1,this.caret=!1,this.dev=!1,this.peer=!1,this.optional=!1,this.preferDev=!1,this.interactive=null,this.cached=!1}async execute(){var e;const t=await s.VK.find(this.context.cwd,this.context.plugins),{project:r,workspace:A}=await h.I.find(t,this.context.cwd),o=await g.C.find(t);if(!A)throw new c.WorkspaceRequiredError(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});const a=null!==(e=this.interactive)&&void 0!==e?e:t.get("preferInteractive"),I=D(this,r),E=[...a?[i.REUSE]:[],i.PROJECT,...this.cached?[i.CACHE]:[],i.LATEST],B=a?1/0:1,y=await Promise.all(this.packages.map(async e=>{const t=e.match(/^\.{0,2}\//)?await N(e,{cwd:this.context.cwd,workspace:A}):d.parseDescriptor(e),i=function(e,t,{dev:r,peer:A,preferDev:o,optional:i}){const s=e.manifest[n.REGULAR].has(t.identHash),a=e.manifest[n.DEVELOPMENT].has(t.identHash),c=e.manifest[n.PEER].has(t.identHash);if((r||A)&&s)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!A&&c)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(i&&a)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(i&&!A&&c)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||o)&&i)throw new C.UsageError(`Package "${d.prettyIdent(e.project.configuration,t)}" cannot simultaneously be a dev dependency and an optional dependency`);return A?n.PEER:r||o?n.DEVELOPMENT:s?n.REGULAR:a?n.DEVELOPMENT:n.REGULAR}(A,t,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return[t,await F(t,{project:r,workspace:A,cache:o,target:i,modifier:I,strategies:E,maxResults:B}),i]})),m=await l.h.start({configuration:t,stdout:this.context.stdout,suggestInstall:!1},async e=>{for(const[A,{suggestions:n,rejections:o}]of y){if(0===n.filter(e=>null!==e.descriptor).length){const[n]=o;if(void 0===n)throw new Error("Assertion failed: Expected an error to have been set");const i=this.cli.error(n);r.configuration.get("enableNetwork")?e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range:\n\n${i}`):e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range (note: network resolution has been disabled):\n\n${i}`)}}});if(m.hasErrors())return m.exitCode();let w=!1;const Q=[],b=[];for(const[,{suggestions:e},t]of y){let r;const n=e.filter(e=>null!==e.descriptor),o=n[0].descriptor,i=n.every(e=>d.areDescriptorsEqual(e.descriptor,o));1===n.length||i?r=o:(w=!0,({answer:r}=await(0,f.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:e.map(({descriptor:e,name:t,reason:r})=>e?{name:t,hint:r,descriptor:e}:{name:t,hint:r,disabled:!0}),onCancel:()=>process.exit(130),result(e){return this.find(e,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout})));const s=A.manifest[t].get(r.identHash);void 0!==s&&s.descriptorHash===r.descriptorHash||(A.manifest[t].set(r.identHash,r),this.optional&&("dependencies"===t?A.manifest.ensureDependencyMeta({...r,range:"unknown"}).optional=!0:"peerDependencies"===t&&(A.manifest.ensurePeerDependencyMeta({...r,range:"unknown"}).optional=!0)),void 0===s?Q.push([A,t,r,E]):b.push([A,t,s,r]))}await t.triggerMultipleHooks(e=>e.afterWorkspaceDependencyAddition,Q),await t.triggerMultipleHooks(e=>e.afterWorkspaceDependencyReplacement,b),w&&this.context.stdout.write("\n");return(await p.Pk.start({configuration:t,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async e=>{await r.install({cache:o,report:e})})).exitCode()}}M.usage=C.Command.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/features/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the current workspace","$0 add lodash@1.2.3"],["Add a package from a GitHub repository (the master branch) to the current workspace using a URL","$0 add lodash@https://github.com/lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol","$0 add lodash@github:lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)","$0 add lodash@lodash/lodash"],["Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)","$0 add lodash-es@lodash/lodash#es"]]}),(0,a.gn)([C.Command.Rest()],M.prototype,"packages",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],M.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("-E,--exact",{description:"Don't use any semver modifier on the resolved range"})],M.prototype,"exact",void 0),(0,a.gn)([C.Command.Boolean("-T,--tilde",{description:"Use the `~` semver modifier on the resolved range"})],M.prototype,"tilde",void 0),(0,a.gn)([C.Command.Boolean("-C,--caret",{description:"Use the `^` semver modifier on the resolved range"})],M.prototype,"caret",void 0),(0,a.gn)([C.Command.Boolean("-D,--dev",{description:"Add a package as a dev dependency"})],M.prototype,"dev",void 0),(0,a.gn)([C.Command.Boolean("-P,--peer",{description:"Add a package as a peer dependency"})],M.prototype,"peer",void 0),(0,a.gn)([C.Command.Boolean("-O,--optional",{description:"Add / upgrade a package to an optional regular / peer dependency"})],M.prototype,"optional",void 0),(0,a.gn)([C.Command.Boolean("--prefer-dev",{description:"Add / upgrade a package to a dev dependency"})],M.prototype,"preferDev",void 0),(0,a.gn)([C.Command.Boolean("-i,--interactive",{description:"Reuse the specified package from other workspaces in the project"})],M.prototype,"interactive",void 0),(0,a.gn)([C.Command.Boolean("--cached",{description:"Reuse the highest version already used somewhere within the project"})],M.prototype,"cached",void 0),(0,a.gn)([C.Command.Path("add")],M.prototype,"execute",null);var R=r(63088);class x extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,locator:r}=await h.I.find(e,this.context.cwd);if(await t.restoreInstallState(),this.name){const A=(await R.getPackageAccessibleBinaries(r,{project:t})).get(this.name);if(!A)throw new C.UsageError(`Couldn't find a binary named "${this.name}" for package "${d.prettyLocator(e,r)}"`);const[,n]=A;return this.context.stdout.write(n+"\n"),0}return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async A=>{const n=await R.getPackageAccessibleBinaries(r,{project:t}),o=Array.from(n.keys()).reduce((e,t)=>Math.max(e,t.length),0);for(const[e,[t,r]]of n)A.reportJson({name:e,source:d.stringifyIdent(t),path:r});if(this.verbose)for(const[t,[r]]of n)A.reportInfo(null,`${t.padEnd(o," ")} ${d.prettyLocator(e,r)}`);else for(const e of n.keys())A.reportInfo(null,e)})).exitCode()}}x.usage=C.Command.Usage({description:"get the path to a binary script",details:"\n When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the `-v,--verbose` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.\n\n When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.\n ",examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]}),(0,a.gn)([C.Command.String({required:!1})],x.prototype,"name",void 0),(0,a.gn)([C.Command.Boolean("-v,--verbose",{description:"Print both the binary name and the locator of the package that provides the binary"})],x.prototype,"verbose",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],x.prototype,"json",void 0),(0,a.gn)([C.Command.Path("bin")],x.prototype,"execute",null);class L extends c.BaseCommand{constructor(){super(...arguments),this.mirror=!1,this.all=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),t=await g.C.find(e);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async()=>{const e=(this.all||this.mirror)&&null!==t.mirrorCwd,r=!this.mirror;e&&await y.xfs.removePromise(t.mirrorCwd),r&&await y.xfs.removePromise(t.cwd)})).exitCode()}}L.usage=C.Command.Usage({description:"remove the shared cache files",details:"\n This command will remove all the files from the cache.\n ",examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]}),(0,a.gn)([C.Command.Boolean("--mirror",{description:"Remove the global cache files instead of the local cache files"})],L.prototype,"mirror",void 0),(0,a.gn)([C.Command.Boolean("--all",{description:"Remove both the global cache files and the local cache files of the current project"})],L.prototype,"all",void 0),(0,a.gn)([C.Command.Path("cache","clean")],L.prototype,"execute",null);var P=r(73632),O=r(44674),U=r.n(O),T=r(31669);class j extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.unsafe=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),t=this.name.replace(/[.[].*$/,""),r=this.name.replace(/^[^.[]*/,"");if(void 0===e.settings.get(t))throw new C.UsageError(`Couldn't find a configuration settings named "${t}"`);const A=e.getSpecial(t,{hideSecrets:!this.unsafe,getNativePaths:!0}),n=P.convertMapsToIndexableObjects(A),o=r?U()(n,r):n,i=await p.Pk.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async e=>{e.reportJson(o)});if(!this.json){if("string"==typeof o)return this.context.stdout.write(o+"\n"),i.exitCode();T.inspect.styles.name="cyan",this.context.stdout.write((0,T.inspect)(o,{depth:1/0,colors:e.get("enableColors"),compact:!1})+"\n")}return i.exitCode()}}j.usage=C.Command.Usage({description:"read a configuration settings",details:"\n This command will print a configuration setting.\n\n Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the `--no-redacted` to get the untransformed value.\n ",examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration","yarn config get 'npmScopes[\"my-company\"].npmRegistryServer'"],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]}),(0,a.gn)([C.Command.String()],j.prototype,"name",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],j.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("--no-redacted",{description:"Don't redact secrets (such as tokens) from the output"})],j.prototype,"unsafe",void 0),(0,a.gn)([C.Command.Path("config","get")],j.prototype,"execute",null);var Y=r(82558),G=r.n(Y),H=r(81534),J=r.n(H);class q extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.home=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);if(!e.projectCwd)throw new C.UsageError("This command must be run from within a project folder");const t=this.name.replace(/[.[].*$/,""),r=this.name.replace(/^[^.[]*\.?/,"");if(void 0===e.settings.get(t))throw new C.UsageError(`Couldn't find a configuration settings named "${t}"`);const A=this.json?JSON.parse(this.value):this.value,n=this.home?e=>s.VK.updateHomeConfiguration(e):t=>s.VK.updateConfiguration(e.projectCwd,t);await n(e=>{if(r){const t=G()(e);return J()(t,this.name,A),t}return{...e,[t]:A}});const o=(await s.VK.find(this.context.cwd,this.context.plugins)).getSpecial(t,{hideSecrets:!0,getNativePaths:!0}),i=P.convertMapsToIndexableObjects(o),a=r?U()(i,r):i;return(await p.Pk.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async t=>{T.inspect.styles.name="cyan",t.reportInfo(u.b.UNNAMED,`Successfully set ${this.name} to ${(0,T.inspect)(a,{depth:1/0,colors:e.get("enableColors"),compact:!1})}`)})).exitCode()}}q.usage=C.Command.Usage({description:"change a configuration settings",details:"\n This command will set a configuration setting.\n\n When used without the `--json` flag, it can only set a simple configuration setting (a string, a number, or a boolean).\n\n When used with the `--json` flag, it can set both simple and complex configuration settings, including Arrays and Objects.\n ",examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",'yarn config set unsafeHttpWhitelist --json \'["*.example.com", "example.com"]\''],["Set a complex configuration setting (an Object) using the `--json` flag",'yarn config set packageExtensions --json \'{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }\''],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",'yarn config set \'npmRegistries["//npm.example.com"].npmAuthToken\' "ffffffff-ffff-ffff-ffff-ffffffffffff"']]}),(0,a.gn)([C.Command.String()],q.prototype,"name",void 0),(0,a.gn)([C.Command.String()],q.prototype,"value",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Set complex configuration settings to JSON values"})],q.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("-H,--home",{description:"Update the home configuration instead of the project configuration"})],q.prototype,"home",void 0),(0,a.gn)([C.Command.Path("config","set")],q.prototype,"execute",null);class z extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.why=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins,{strict:!1});return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{if(e.invalid.size>0&&!this.json){for(const[r,A]of e.invalid)t.reportError(u.b.INVALID_CONFIGURATION_KEY,`Invalid configuration key "${r}" in ${A}`);t.reportSeparator()}if(this.json){const r=P.sortMap(e.settings.keys(),e=>e);for(const A of r){const r=e.settings.get(A),n=e.getSpecial(A,{hideSecrets:!0,getNativePaths:!0}),o=e.sources.get(A);this.verbose?t.reportJson({key:A,effective:n,source:o}):t.reportJson({key:A,effective:n,source:o,...r})}}else{const r=P.sortMap(e.settings.keys(),e=>e),A=r.reduce((e,t)=>Math.max(e,t.length),0),n={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){const o=r.map(t=>{const r=e.settings.get(t);if(!r)throw new Error(`Assertion failed: This settings ("${t}") should have been registered`);return[t,this.why?e.sources.get(t)||"":r.description]}),i=o.reduce((e,[,t])=>Math.max(e,t.length),0);for(const[r,s]of o)t.reportInfo(null,`${r.padEnd(A," ")} ${s.padEnd(i," ")} ${(0,T.inspect)(e.getSpecial(r,{hideSecrets:!0,getNativePaths:!0}),n)}`)}else for(const o of r)t.reportInfo(null,`${o.padEnd(A," ")} ${(0,T.inspect)(e.getSpecial(o,{hideSecrets:!0,getNativePaths:!0}),n)}`)}})).exitCode()}}z.usage=C.Command.Usage({description:"display the current configuration",details:"\n This command prints the current active configuration settings.\n ",examples:[["Print the active configuration settings","$0 config"]]}),(0,a.gn)([C.Command.Boolean("-v,--verbose",{description:"Print the setting description on top of the regular key/value information"})],z.prototype,"verbose",void 0),(0,a.gn)([C.Command.Boolean("--why",{description:"Print the reason why a setting is set a particular way"})],z.prototype,"why",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],z.prototype,"json",void 0),(0,a.gn)([C.Command.Path("config")],z.prototype,"execute",null);var W,X=r(15966),V=r(35691),_=r(2401),Z=r.n(_);!function(e){e.HIGHEST="highest"}(W||(W={}));const $=new Set(Object.values(W)),ee={highest:async(e,t,{resolver:r,fetcher:A,resolveOptions:n,fetchOptions:o})=>{const i=new Map;for(const[t,r]of e.storedResolutions){const A=e.storedDescriptors.get(t);if(void 0===A)throw new Error(`Assertion failed: The descriptor (${t}) should have been registered`);P.getSetWithDefault(i,A.identHash).add(r)}return Array.from(e.storedDescriptors.values(),async A=>{if(t.length&&!Z().isMatch(d.stringifyIdent(A),t))return null;const o=e.storedResolutions.get(A.descriptorHash);if(void 0===o)throw new Error(`Assertion failed: The resolution (${A.descriptorHash}) should have been registered`);const s=e.originalPackages.get(o);if(void 0===s)return null;if(!r.shouldPersistResolution(s,n))return null;const a=i.get(A.identHash);if(void 0===a)throw new Error(`Assertion failed: The resolutions (${A.identHash}) should have been registered`);if(1===a.size)return null;const c=[...a].map(t=>{const r=e.originalPackages.get(t);if(void 0===r)throw new Error(`Assertion failed: The package (${t}) should have been registered`);return r.reference}),g=await r.getSatisfying(A,c,n),l=null==g?void 0:g[0];if(void 0===l)return null;const u=l.locatorHash,h=e.originalPackages.get(u);if(void 0===h)throw new Error(`Assertion failed: The package (${u}) should have been registered`);return u===o?null:{descriptor:A,currentPackage:s,updatedPackage:h}})}};class te extends c.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.strategy=W.HIGHEST,this.check=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd),r=await g.C.find(e);let A=0;const n=await p.Pk.start({configuration:e,includeFooter:!1,stdout:this.context.stdout,json:this.json},async e=>{A=await async function(e,{strategy:t,patterns:r,cache:A,report:n}){const{configuration:o}=e,i=new I.$,s=o.makeResolver(),a=o.makeFetcher(),c={cache:A,checksums:e.storedChecksums,fetcher:a,project:e,report:i,skipIntegrityCheck:!0},g={project:e,resolver:s,report:i,fetchOptions:c};return await n.startTimerPromise("Deduplication step",async()=>{const A=ee[t],i=await A(e,r,{resolver:s,resolveOptions:g,fetcher:a,fetchOptions:c}),l=V.yG.progressViaCounter(i.length);n.reportProgress(l);let h,p=0;switch(await Promise.all(i.map(t=>t.then(t=>{if(null===t)return;p++;const{descriptor:r,currentPackage:A,updatedPackage:i}=t;n.reportInfo(u.b.UNNAMED,`${d.prettyDescriptor(o,r)} can be deduped from ${d.prettyLocator(o,A)} to ${d.prettyLocator(o,i)}`),n.reportJson({descriptor:d.stringifyDescriptor(r),currentResolution:d.stringifyLocator(A),updatedResolution:d.stringifyLocator(i)}),e.storedResolutions.set(r.descriptorHash,i.locatorHash)}).finally(()=>l.tick()))),p){case 0:h="No packages";break;case 1:h="One package";break;default:h=p+" packages"}const C=B.pretty(o,t,B.Type.CODE);return n.reportInfo(u.b.UNNAMED,`${h} can be deduped using the ${C} strategy`),p})}(t,{strategy:this.strategy,patterns:this.patterns,cache:r,report:e})});if(n.hasErrors())return n.exitCode();if(this.check)return A?1:0;return(await p.Pk.start({configuration:e,stdout:this.context.stdout,json:this.json},async e=>{await t.install({cache:r,report:e})})).exitCode()}}te.schema=X.object().shape({strategy:X.string().test({name:"strategy",message:"${path} must be one of ${strategies}",params:{strategies:[...$].join(", ")},test:e=>$.has(e)})}),te.usage=C.Command.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. It's also guaranteed that it never takes more than a single pass to dedupe the entire dependency tree.\n\n **Note:** Even though it never produces a wrong dependency tree, this command should be used with caution, as it modifies the dependency tree, which can sometimes cause problems when packages don't strictly follow semver recommendations. Because of this, it is recommended to also review the changes manually.\n\n If set, the `-c,--check` flag will only report the found duplicates, without persisting the modified dependency tree. If changes are found, the command will exit with a non-zero exit code, making it suitable for CI purposes.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n ### In-depth explanation:\n\n Yarn doesn't deduplicate dependencies by default, otherwise installs wouldn't be deterministic and the lockfile would be useless. What it actually does is that it tries to not duplicate dependencies in the first place.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@*`will cause Yarn to reuse `foo@2.3.4`, even if the latest `foo` is actually `foo@2.10.14`, thus preventing unnecessary duplication.\n\n Duplication happens when Yarn can't unlock dependencies that have already been locked inside the lockfile.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@2.10.14` will cause Yarn to install `foo@2.10.14` because the existing resolution doesn't satisfy the range `2.10.14`. This behavior can lead to (sometimes) unwanted duplication, since now the lockfile contains 2 separate resolutions for the 2 `foo` descriptors, even though they have overlapping ranges, which means that the lockfile can be simplified so that both descriptors resolve to `foo@2.10.14`.\n ",examples:[["Dedupe all packages","$0 dedupe"],["Dedupe all packages using a specific strategy","$0 dedupe --strategy highest"],["Dedupe a specific package","$0 dedupe lodash"],["Dedupe all packages with the `@babel/*` scope","$0 dedupe '@babel/*'"],["Check for duplicates (can be used as a CI step)","$0 dedupe --check"]]}),(0,a.gn)([C.Command.Rest()],te.prototype,"patterns",void 0),(0,a.gn)([C.Command.String("-s,--strategy",{description:"The strategy to use when deduping dependencies"})],te.prototype,"strategy",void 0),(0,a.gn)([C.Command.Boolean("-c,--check",{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"})],te.prototype,"check",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],te.prototype,"json",void 0),(0,a.gn)([C.Command.Path("dedupe")],te.prototype,"execute",null);class re extends C.Command{async execute(){const{plugins:e}=await s.VK.find(this.context.cwd,this.context.plugins),t=[];for(const r of e){const{commands:e}=r[1];if(e){const A=C.Cli.from(e).definitions();t.push([r[0],A])}}const A=this.cli.definitions(),n=r(60306)["@yarnpkg/builder"].bundles.standard;for(const e of t){const t=e[1];for(const r of t)A.find(e=>{return t=e.path,A=r.path,t.split(" ").slice(1).join()===A.split(" ").slice(1).join();var t,A}).plugin={name:e[0],isDefault:n.includes(e[0])}}this.context.stdout.write(JSON.stringify({commands:A},null,2)+"\n")}}(0,a.gn)([C.Command.Path("--clipanion=definitions")],re.prototype,"execute",null);class Ae extends C.Command{async execute(){this.context.stdout.write(this.cli.usage(null))}}(0,a.gn)([C.Command.Path("help"),C.Command.Path("--help"),C.Command.Path("-h")],Ae.prototype,"execute",null);class ne extends C.Command{constructor(){super(...arguments),this.args=[]}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!d.tryParseIdent(this.leadingArgument)){const e=m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:e})}return await this.cli.run(["run",this.leadingArgument,...this.args])}}(0,a.gn)([C.Command.String()],ne.prototype,"leadingArgument",void 0),(0,a.gn)([C.Command.Proxy()],ne.prototype,"args",void 0);var oe=r(59355);class ie extends C.Command{async execute(){this.context.stdout.write((oe.o||"")+"\n")}}(0,a.gn)([C.Command.Path("-v"),C.Command.Path("--version")],ie.prototype,"execute",null);var se=r(6220);class ae extends c.BaseCommand{constructor(){super(...arguments),this.args=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);return await y.xfs.mktempPromise(async e=>{const{code:r}=await se.pipevp(this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await R.makeScriptEnv({project:t,binFolder:e})});return r})}}ae.usage=C.Command.Usage({description:"execute a shell command",details:"\n This command simply executes a shell binary within the context of the root directory of the active workspace.\n\n It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n ",examples:[["Execute a shell command","$0 exec echo Hello World"]]}),(0,a.gn)([C.Command.String()],ae.prototype,"commandName",void 0),(0,a.gn)([C.Command.Proxy()],ae.prototype,"args",void 0),(0,a.gn)([C.Command.Path("exec")],ae.prototype,"execute",null);var ce=r(36545);class ge extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);if(await t.applyLightResolution(),void 0!==this.hash)return await async function(e,t,r){const{configuration:A}=t,n=t.peerRequirements.get(e);if(void 0===n)throw new Error(`No peerDependency requirements found for hash: "${e}"`);return(await p.Pk.start({configuration:A,stdout:r.stdout,includeFooter:!1},async e=>{var r,o;const i=t.storedPackages.get(n.subject);if(void 0===i)throw new Error("Assertion failed: Expected the subject package to have been registered");const s=t.storedPackages.get(n.rootRequester);if(void 0===s)throw new Error("Assertion failed: Expected the root package to have been registered");const a=null!==(r=i.dependencies.get(n.requested.identHash))&&void 0!==r?r:null,c=null!==a?t.storedResolutions.get(a.descriptorHash):null;if(void 0===c)throw new Error("Assertion failed: Expected the resolution to have been registered");const g=null!==c?t.storedPackages.get(c):null;if(void 0===g)throw new Error("Assertion failed: Expected the provided package to have been registered");const l=[...n.allRequesters.values()].map(e=>{const r=t.storedPackages.get(e);if(void 0===r)throw new Error("Assertion failed: Expected the package to be registered");const A=d.devirtualizeLocator(r),o=t.storedPackages.get(A.locatorHash);if(void 0===o)throw new Error("Assertion failed: Expected the package to be registered");const i=o.peerDependencies.get(n.requested.identHash);if(void 0===i)throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:r,peerDependency:i}});if(null!==g){const t=l.every(({peerDependency:e})=>ce.satisfiesWithPrereleases(g.version,e.range));e.reportInfo(u.b.UNNAMED,`${d.prettyLocator(A,i)} provides ${d.prettyLocator(A,g)} with version ${d.prettyReference(A,null!==(o=g.version)&&void 0!==o?o:"")}, which ${t?"satisfies":"doesn't satisfy"} the following requirements:`)}else e.reportInfo(u.b.UNNAMED,`${d.prettyLocator(A,i)} doesn't provide ${d.prettyIdent(A,n.requested)}, breaking the following requirements:`);e.reportSeparator();const h=B.mark(A),p=[];for(const{pkg:e,peerDependency:t}of P.sortMap(l,e=>d.stringifyLocator(e.pkg))){const r=null!==g&&ce.satisfiesWithPrereleases(g.version,t.range)?h.Check:h.Cross;p.push({stringifiedLocator:d.stringifyLocator(e),prettyLocator:d.prettyLocator(A,e),prettyRange:d.prettyRange(A,t.range),mark:r})}const C=Math.max(...p.map(({stringifiedLocator:e})=>e.length)),f=Math.max(...p.map(({prettyRange:e})=>e.length));for(const{stringifiedLocator:t,prettyLocator:r,prettyRange:A,mark:n}of P.sortMap(p,({stringifiedLocator:e})=>e))e.reportInfo(null,`${r.padEnd(C+(r.length-t.length)," ")} → ${A.padEnd(f," ")} ${n}`);p.length>1&&(e.reportSeparator(),e.reportInfo(u.b.UNNAMED,"Note: these requirements start with "+d.prettyLocator(t.configuration,s)))})).exitCode()}(this.hash,t,{stdout:this.context.stdout});return(await p.Pk.start({configuration:e,stdout:this.context.stdout,includeFooter:!1},async r=>{var A;const n=[([,e])=>d.stringifyLocator(t.storedPackages.get(e.subject)),([,e])=>d.stringifyIdent(e.requested)];for(const[o,i]of P.sortMap(t.peerRequirements,n)){const n=t.storedPackages.get(i.subject);if(void 0===n)throw new Error("Assertion failed: Expected the subject package to have been registered");const s=t.storedPackages.get(i.rootRequester);if(void 0===s)throw new Error("Assertion failed: Expected the root package to have been registered");const a=null!==(A=n.dependencies.get(i.requested.identHash))&&void 0!==A?A:null,c=B.pretty(e,o,B.Type.CODE),g=d.prettyLocator(e,n),l=d.prettyIdent(e,i.requested),u=d.prettyIdent(e,s),h=i.allRequesters.length-1,p="descendant"+(1===h?"":"s"),C=h>0?` and ${h} ${p}`:"",f=null!==a?"provides":"doesn't provide";r.reportInfo(null,`${c} → ${g} ${f} ${l} to ${u}${C}`)}})).exitCode()}}ge.schema=X.object().shape({hash:X.string().matches(/^p[0-9a-f]{5}$/)}),ge.usage=C.Command.Usage({description:"explain a set of peer requirements",details:"\n A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants.\n\n When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not.\n\n When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set.\n\n **Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (`yarn explain peer-requirements`).\n ",examples:[["Explain the corresponding set of peer requirements for a hash","$0 explain peer-requirements p1a4ed"],["List all sets of peer requirements","$0 explain peer-requirements"]]}),(0,a.gn)([C.Command.String({required:!1})],ge.prototype,"hash",void 0),(0,a.gn)([C.Command.Path("explain","peer-requirements")],ge.prototype,"execute",null);var le=r(85875);class ue extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.recursive=!1,this.extra=[],this.cache=!1,this.dependents=!1,this.manifest=!1,this.nameOnly=!1,this.virtuals=!1,this.json=!1,this.patterns=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r&&!this.all)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const n=new Set(this.extra);this.cache&&n.add("cache"),this.dependents&&n.add("dependents"),this.manifest&&n.add("manifest");const o=(e,{recursive:r})=>{const A=e.anchoredLocator.locatorHash,n=new Map,o=[A];for(;o.length>0;){const e=o.shift();if(n.has(e))continue;const i=t.storedPackages.get(e);if(void 0===i)throw new Error("Assertion failed: Expected the package to be registered");if(n.set(e,i),d.isVirtualLocator(i)&&o.push(d.devirtualizeLocator(i).locatorHash),r||e===A)for(const e of i.dependencies.values()){const r=t.storedResolutions.get(e.descriptorHash);if(void 0===r)throw new Error("Assertion failed: Expected the resolution to be registered");o.push(r)}}return n.values()},i=({all:e,recursive:A})=>e&&A?t.storedPackages.values():e?(({recursive:e})=>{const r=new Map;for(const A of t.workspaces)for(const t of o(A,{recursive:e}))r.set(t.locatorHash,t);return r.values()})({recursive:A}):o(r,{recursive:A}),{selection:a,sortedLookup:l}=(({all:e,recursive:t})=>{const r=i({all:e,recursive:t}),A=this.patterns.map(e=>{const t=d.parseLocator(e),r=Z().makeRe(d.stringifyIdent(t)),A=d.isVirtualLocator(t),n=A?d.devirtualizeLocator(t):t;return e=>{const o=d.stringifyIdent(e);if(!r.test(o))return!1;if("unknown"===t.reference)return!0;const i=d.isVirtualLocator(e),s=i?d.devirtualizeLocator(e):e;return(!A||!i||t.reference===e.reference)&&n.reference===s.reference}}),n=P.sortMap([...r],e=>d.stringifyLocator(e));return{selection:n.filter(e=>0===A.length||A.some(t=>t(e))),sortedLookup:n}})({all:this.all,recursive:this.recursive});if(0===a.length)throw new C.UsageError("No package matched your request");const u=new Map;if(this.dependents)for(const e of l)for(const r of e.dependencies.values()){const A=t.storedResolutions.get(r.descriptorHash);if(void 0===A)throw new Error("Assertion failed: Expected the resolution to be registered");P.getArrayWithDefault(u,A).push(e)}const p=new Map;for(const e of l){if(!d.isVirtualLocator(e))continue;const t=d.devirtualizeLocator(e);P.getArrayWithDefault(p,t.locatorHash).push(e)}const f={},m={children:f},w=e.makeFetcher(),Q={project:t,fetcher:w,cache:A,checksums:t.storedChecksums,report:new I.$,skipIntegrityCheck:!0},D=[async(e,t,r)=>{var A,n;if(!t.has("manifest"))return;const o=await w.fetch(e,Q);let i;try{i=await E.G.find(o.prefixPath,{baseFs:o.packageFs})}finally{null===(A=o.releaseFs)||void 0===A||A.call(o)}r("Manifest",{License:B.tuple(B.Type.NO_HINT,i.license),Homepage:B.tuple(B.Type.URL,null!==(n=i.raw.homepage)&&void 0!==n?n:null)})},async(e,r,n)=>{var o;if(!r.has("cache"))return;const i=null!==(o=t.storedChecksums.get(e.locatorHash))&&void 0!==o?o:null,s=A.getLocatorPath(e,i);let a;if(null!==s)try{a=y.xfs.statSync(s)}catch(e){}const c=void 0!==a?[a.size,B.Type.SIZE]:void 0;n("Cache",{Checksum:B.tuple(B.Type.NO_HINT,i),Path:B.tuple(B.Type.PATH,s),Size:c})}];for(const r of a){const A=d.isVirtualLocator(r);if(!this.virtuals&&A)continue;const o={},i={value:[r,B.Type.LOCATOR],children:o};if(f[d.stringifyLocator(r)]=i,this.nameOnly){delete i.children;continue}const s=p.get(r.locatorHash);void 0!==s&&(o.Instances={label:"Instances",value:B.tuple(B.Type.NUMBER,s.length)}),o.Version={label:"Version",value:B.tuple(B.Type.NO_HINT,r.version)};const a=(e,t)=>{const r={};if(o[e]=r,Array.isArray(t))r.children=t.map(e=>({value:e}));else{const e={};r.children=e;for(const[r,A]of Object.entries(t))void 0!==A&&(e[r]={label:r,value:A})}};if(!A){for(const e of D)await e(r,n,a);await e.triggerHook(e=>e.fetchPackageInfo,r,n,a)}r.bin.size>0&&!A&&a("Exported Binaries",[...r.bin.keys()].map(e=>B.tuple(B.Type.PATH,e)));const c=u.get(r.locatorHash);void 0!==c&&c.length>0&&a("Dependents",c.map(e=>B.tuple(B.Type.LOCATOR,e))),r.dependencies.size>0&&!A&&a("Dependencies",[...r.dependencies.values()].map(e=>{var r;const A=t.storedResolutions.get(e.descriptorHash),n=void 0!==A&&null!==(r=t.storedPackages.get(A))&&void 0!==r?r:null;return B.tuple(B.Type.RESOLUTION,{descriptor:e,locator:n})})),r.peerDependencies.size>0&&A&&a("Peer dependencies",[...r.peerDependencies.values()].map(e=>{var A,n;const o=r.dependencies.get(e.identHash),i=void 0!==o&&null!==(A=t.storedResolutions.get(o.descriptorHash))&&void 0!==A?A:null,s=null!==i&&null!==(n=t.storedPackages.get(i))&&void 0!==n?n:null;return B.tuple(B.Type.RESOLUTION,{descriptor:e,locator:s})}))}le.emitTree(m,{configuration:e,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}}ue.usage=C.Command.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]}),(0,a.gn)([C.Command.Boolean("-A,--all",{description:"Print versions of a package from the whole project"})],ue.prototype,"all",void 0),(0,a.gn)([C.Command.Boolean("-R,--recursive",{description:"Print information for all packages, including transitive dependencies"})],ue.prototype,"recursive",void 0),(0,a.gn)([C.Command.Array("-X,--extra",{description:"An array of requests of extra data provided by plugins"})],ue.prototype,"extra",void 0),(0,a.gn)([C.Command.Boolean("--cache",{description:"Print information about the cache entry of a package (path, size, checksum)"})],ue.prototype,"cache",void 0),(0,a.gn)([C.Command.Boolean("--dependents",{description:"Print all dependents for each matching package"})],ue.prototype,"dependents",void 0),(0,a.gn)([C.Command.Boolean("--manifest",{description:"Print data obtained by looking at the package archive (license, homepage, ...)"})],ue.prototype,"manifest",void 0),(0,a.gn)([C.Command.Boolean("--name-only",{description:"Only print the name for the matching packages"})],ue.prototype,"nameOnly",void 0),(0,a.gn)([C.Command.Boolean("--virtuals",{description:"Print each instance of the virtual packages"})],ue.prototype,"virtuals",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],ue.prototype,"json",void 0),(0,a.gn)([C.Command.Rest()],ue.prototype,"patterns",void 0),(0,a.gn)([C.Command.Path("info")],ue.prototype,"execute",null);var he=r(11640),pe=r(5864);class de extends c.BaseCommand{constructor(){super(...arguments),this.json=!1,this.checkCache=!1,this.skipBuilds=!1,this.silent=!1}async execute(){var e,t,r;const A=await s.VK.find(this.context.cwd,this.context.plugins);void 0!==this.inlineBuilds&&A.useWithSource("",{enableInlineBuilds:this.inlineBuilds},A.startingCwd,{overwrite:!0});const n=!!process.env.NOW_BUILDER,o=!!process.env.NETLIFY,i=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,a=async(e,{error:t})=>{const r=await p.Pk.start({configuration:A,stdout:this.context.stdout,includeFooter:!1},async r=>{t?r.reportError(u.b.DEPRECATED_CLI_SETTINGS,e):r.reportWarning(u.b.DEPRECATED_CLI_SETTINGS,e)});return r.hasErrors()?r.exitCode():null};if(void 0!==this.ignoreEngines){const e=await a("The --ignore-engines option is deprecated; engine checking isn't a core feature anymore",{error:!n});if(null!==e)return e}if(void 0!==this.registry){const e=await a("The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file",{error:!1});if(null!==e)return e}if(void 0!==this.preferOffline){const e=await a("The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead",{error:!n});if(null!==e)return e}if(void 0!==this.production){const e=await a("The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead",{error:!0});if(null!==e)return e}if(void 0!==this.nonInteractive){const e=await a("The --non-interactive option is deprecated",{error:!i});if(null!==e)return e}if(void 0!==this.frozenLockfile){const e=await a("The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead",{error:!i&&!pe.TRAVIS});if(null!==e)return e}if(void 0!==this.cacheFolder){const e=await a("The cache-folder option has been deprecated; use rc settings instead",{error:!o});if(null!==e)return e}const l=void 0===this.immutable&&void 0===this.frozenLockfile?null!==(e=A.get("enableImmutableInstalls"))&&void 0!==e&&e:null!==(r=null!==(t=this.immutable)&&void 0!==t?t:this.frozenLockfile)&&void 0!==r&&r;if(null!==A.projectCwd){const e=await p.Pk.start({configuration:A,json:this.json,stdout:this.context.stdout,includeFooter:!1},async e=>{await async function(e,t){if(!e.projectCwd)return!1;const r=m.y1.join(e.projectCwd,e.get("lockfileFilename"));if(!await y.xfs.existsPromise(r))return!1;const A=await y.xfs.readFilePromise(r,"utf8");if(!A.includes("<<<<<<<"))return!1;if(t)throw new V.lk(u.b.AUTOMERGE_IMMUTABLE,"Cannot autofix a lockfile when running an immutable install");const[n,o]=function(e){const t=[[],[]],r=e.split(/\r?\n/g);let A=!1;for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if(e.startsWith("<<<<<<<")){for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if("======="===e){A=!1;break}A||e.startsWith("|||||||")?A=!0:t[0].push(e)}for(;r.length>0;){const e=r.shift();if(void 0===e)throw new Error("Assertion failed: Some lines should remain");if(e.startsWith(">>>>>>>"))break;t[1].push(e)}}else t[0].push(e),t[1].push(e)}return[t[0].join("\n"),t[1].join("\n")]}(A);let i,s;try{i=(0,he.parseSyml)(n),s=(0,he.parseSyml)(o)}catch(e){throw new V.lk(u.b.AUTOMERGE_FAILED_TO_PARSE,"The individual variants of the lockfile failed to parse")}const a={...i,...s};for(const[e,t]of Object.entries(a))"string"==typeof t&&delete a[e];return await y.xfs.changeFilePromise(r,(0,he.stringifySyml)(a),{automaticNewlines:!0}),!0}(A,l)&&(e.reportInfo(u.b.AUTOMERGE_SUCCESS,"Automatically fixed merge conflicts 👍"),e.reportSeparator())});if(e.hasErrors())return e.exitCode()}if(null!==A.projectCwd){const e=await p.Pk.start({configuration:A,json:this.json,stdout:this.context.stdout,includeFooter:!1},async e=>{var t;(null===(t=s.VK.telemetry)||void 0===t?void 0:t.isNew)&&(e.reportInfo(u.b.TELEMETRY_NOTICE,"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry"),e.reportInfo(u.b.TELEMETRY_NOTICE,`Run ${B.pretty(A,"yarn config set --home enableTelemetry 0",B.Type.CODE)} to disable`),e.reportSeparator())});if(e.hasErrors())return e.exitCode()}const{project:d,workspace:C}=await h.I.find(A,this.context.cwd),f=await g.C.find(A,{immutable:this.immutableCache,check:this.checkCache});if(!C)throw new c.WorkspaceRequiredError(d.cwd,this.context.cwd);await d.restoreInstallState({restoreResolutions:!1});return(await p.Pk.start({configuration:A,json:this.json,stdout:this.context.stdout,includeLogs:!0},async e=>{await d.install({cache:f,report:e,immutable:l,skipBuild:this.skipBuilds})})).exitCode()}}de.usage=C.Command.Usage({description:"install the project dependencies",details:"\n This command setup your project if needed. The installation is splitted in four different steps that each have their own characteristics:\n\n - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).\n\n - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of `cacheFolder` in `yarn config` to see where are stored the cache files).\n\n - **Link:** Then we send the dependency tree information to internal plugins tasked from writing them on the disk in some form (for example by generating the .pnp.js file you might know).\n\n - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another.\n\n Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your .pnp.js file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.\n\n If the `--immutable` option is set, Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the `immutablePaths` configuration setting). For backward compatibility we offer an alias under the name of `--frozen-lockfile`, but it will be removed in a later release.\n\n If the `--immutable-cache` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed).\n\n If the `--check-cache` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them.\n\n If the `--inline-builds` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments.\n\n If the `--skip-builds` option is set, Yarn will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n ",examples:[["Install the project","$0 install"],["Validate a project when using Zero-Installs","$0 install --immutable --immutable-cache"],["Validate a project when using Zero-Installs (slightly safer if you accept external PRs)","$0 install --immutable --immutable-cache --check-cache"]]}),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],de.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("--immutable",{description:"Abort with an error exit code if the lockfile was to be modified"})],de.prototype,"immutable",void 0),(0,a.gn)([C.Command.Boolean("--immutable-cache",{description:"Abort with an error exit code if the cache folder was to be modified"})],de.prototype,"immutableCache",void 0),(0,a.gn)([C.Command.Boolean("--check-cache",{description:"Always refetch the packages and ensure that their checksums are consistent"})],de.prototype,"checkCache",void 0),(0,a.gn)([C.Command.Boolean("--production",{hidden:!0})],de.prototype,"production",void 0),(0,a.gn)([C.Command.Boolean("--non-interactive",{hidden:!0})],de.prototype,"nonInteractive",void 0),(0,a.gn)([C.Command.Boolean("--frozen-lockfile",{hidden:!0})],de.prototype,"frozenLockfile",void 0),(0,a.gn)([C.Command.Boolean("--prefer-offline",{hidden:!0})],de.prototype,"preferOffline",void 0),(0,a.gn)([C.Command.Boolean("--ignore-engines",{hidden:!0})],de.prototype,"ignoreEngines",void 0),(0,a.gn)([C.Command.String("--registry",{hidden:!0})],de.prototype,"registry",void 0),(0,a.gn)([C.Command.Boolean("--inline-builds",{description:"Verbosely print the output of the build steps of dependencies"})],de.prototype,"inlineBuilds",void 0),(0,a.gn)([C.Command.Boolean("--skip-builds",{description:"Skip the build step altogether"})],de.prototype,"skipBuilds",void 0),(0,a.gn)([C.Command.String("--cache-folder",{hidden:!0})],de.prototype,"cacheFolder",void 0),(0,a.gn)([C.Command.Boolean("--silent",{hidden:!0})],de.prototype,"silent",void 0),(0,a.gn)([C.Command.Path(),C.Command.Path("install")],de.prototype,"execute",null);class Ce extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.private=!1,this.relative=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.destination)),o=await s.VK.find(n,this.context.plugins),{project:i,workspace:a}=await h.I.find(o,n);if(!a)throw new c.WorkspaceRequiredError(i.cwd,n);const l=t.topLevelWorkspace,u=[];if(this.all){for(const e of i.workspaces)!e.manifest.name||e.manifest.private&&!this.private||u.push(e);if(0===u.length)throw new C.UsageError("No workspace found to be linked in the target project")}else{if(!a.manifest.name)throw new C.UsageError("The target workspace doesn't have a name and thus cannot be linked");if(a.manifest.private&&!this.private)throw new C.UsageError("The target workspace is marked private - use the --private flag to link it anyway");u.push(a)}for(const e of u){const r=d.stringifyIdent(e.locator),A=this.relative?m.y1.relative(t.cwd,e.cwd):e.cwd;l.manifest.resolutions.push({pattern:{descriptor:{fullName:r}},reference:"portal:"+A})}return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:A,report:e})})).exitCode()}}Ce.usage=C.Command.Usage({description:"connect the local project to another one",details:"\n This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\n\n There is no `yarn unlink` command. To unlink the workspaces from the current project one must revert the changes made to the `resolutions` field.\n ",examples:[["Register a remote workspace for use in the current project","$0 link ~/ts-loader"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]}),(0,a.gn)([C.Command.String()],Ce.prototype,"destination",void 0),(0,a.gn)([C.Command.Boolean("-A,--all",{description:"Link all workspaces belonging to the target project to the current one"})],Ce.prototype,"all",void 0),(0,a.gn)([C.Command.Boolean("-p,--private",{description:"Also link private workspaces belonging to the target project to the current one"})],Ce.prototype,"private",void 0),(0,a.gn)([C.Command.Boolean("-r,--relative",{description:"Link workspaces using relative paths instead of absolute paths"})],Ce.prototype,"relative",void 0),(0,a.gn)([C.Command.Path("link")],Ce.prototype,"execute",null);class fe extends c.BaseCommand{constructor(){super(...arguments),this.args=[]}async execute(){return this.cli.run(["exec","node",...this.args])}}fe.usage=C.Command.Usage({description:"run node with the hook already setup",details:"\n This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).\n\n The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.\n ",examples:[["Run a Node script","$0 node ./my-script.js"]]}),(0,a.gn)([C.Command.Proxy()],fe.prototype,"args",void 0),(0,a.gn)([C.Command.Path("node")],fe.prototype,"execute",null);var Ie=r(20624),Ee=r(12087),Be=r(85622),ye=r.n(Be),me=r(79669);class we extends c.BaseCommand{constructor(){super(...arguments),this.onlyIfNeeded=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);if(e.get("yarnPath")&&this.onlyIfNeeded)return 0;let t;if("latest"===this.version||"berry"===this.version)t="https://github.com/yarnpkg/berry/raw/master/packages/yarnpkg-cli/bin/yarn.js";else if("classic"===this.version)t="https://nightly.yarnpkg.com/latest.js";else if(ce.satisfiesWithPrereleases(this.version,">=2.0.0"))t=`https://github.com/yarnpkg/berry/raw/%40yarnpkg/cli/${this.version}/packages/yarnpkg-cli/bin/yarn.js`;else{if(!ce.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))throw Q().validRange(this.version)?new C.UsageError("Support for ranges got removed - please use the exact version you want to install, or 'latest' to get the latest build available"):new C.UsageError(`Invalid version descriptor "${this.version}"`);t=`https://github.com/yarnpkg/yarn/releases/download/v${this.version}/yarn-${this.version}.js`}return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{r.reportInfo(u.b.UNNAMED,"Downloading "+B.pretty(e,t,"green"));const A=await me.get(t,{configuration:e});await Qe(e,null,A,{report:r})})).exitCode()}}async function Qe(e,t,r,{report:A}){const n=e.projectCwd?e.projectCwd:e.startingCwd;null===t&&await y.xfs.mktempPromise(async e=>{const A=m.y1.join(e,"yarn.cjs");await y.xfs.writeFilePromise(A,r);const{stdout:o}=await se.execvp(process.execPath,[m.cS.fromPortablePath(A),"--version"],{cwd:n,env:{...process.env,YARN_IGNORE_PATH:"1"}});if(t=o.trim(),!Q().valid(t))throw new Error("Invalid semver version")});const o=m.y1.resolve(n,".yarn/releases"),i=m.y1.resolve(o,`yarn-${t}.cjs`),a=m.y1.relative(e.startingCwd,i),c=m.y1.relative(n,i),g=e.get("yarnPath"),l=null===g||g.startsWith(o+"/");A.reportInfo(u.b.UNNAMED,"Saving the new release in "+B.pretty(e,a,"magenta")),await y.xfs.removePromise(m.y1.dirname(i)),await y.xfs.mkdirPromise(m.y1.dirname(i),{recursive:!0}),await y.xfs.writeFilePromise(i,r),await y.xfs.chmodPromise(i,493),l&&await s.VK.updateConfiguration(n,{yarnPath:c})}we.usage=C.Command.Usage({description:"lock the Yarn version used by the project",details:"\n This command will download a specific release of Yarn directly from the Yarn GitHub repository, will store it inside your project, and will change the `yarnPath` settings from your project `.yarnrc.yml` file to point to the new file.\n\n A very good use case for this command is to enforce the version of Yarn used by the any single member of your team inside a same project - by doing this you ensure that you have control on Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting a different behavior than you.\n ",examples:[["Download the latest release from the Yarn repository","$0 set version latest"],["Download the latest classic release from the Yarn repository","$0 set version classic"],["Download a specific Yarn 2 build","$0 set version 2.0.0-rc.30"],["Switch back to a specific Yarn 1 release","$0 set version 1.22.1"]]}),(0,a.gn)([C.Command.Boolean("--only-if-needed",{description:"Only lock the Yarn version if it isn't already locked"})],we.prototype,"onlyIfNeeded",void 0),(0,a.gn)([C.Command.String()],we.prototype,"version",void 0),(0,a.gn)([C.Command.Path("policies","set-version"),C.Command.Path("set","version")],we.prototype,"execute",null);const De=/^[0-9]+$/;function be(e){return De.test(e)?`pull/${e}/head`:e}class ve extends c.BaseCommand{constructor(){super(...arguments),this.repository="https://github.com/yarnpkg/berry.git",this.branch="master",this.plugins=[],this.noMinify=!1,this.force=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),t=void 0!==this.installPath?m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.installPath)):m.y1.resolve(m.cS.toPortablePath((0,Ee.tmpdir)()),"yarnpkg-sources",Ie.makeHash(this.repository).slice(0,6));return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{await ke(this,{configuration:e,report:r,target:t}),r.reportSeparator(),r.reportInfo(u.b.UNNAMED,"Building a fresh bundle"),r.reportSeparator(),await Se((({plugins:e,noMinify:t},r)=>[["yarn","build:cli",...(new Array).concat(...e.map(e=>["--plugin",ye().resolve(r,e)])),...t?["--no-minify"]:[],"|"]])(this,t),{configuration:e,context:this.context,target:t}),r.reportSeparator();const A=m.y1.resolve(t,"packages/yarnpkg-cli/bundles/yarn.js"),n=await y.xfs.readFilePromise(A);await Qe(e,"sources",n,{report:r})})).exitCode()}}async function Se(e,{configuration:t,context:r,target:A}){for(const[n,...o]of e){const e="|"===o[o.length-1];if(e&&o.pop(),e)await se.pipevp(n,o,{cwd:A,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(B.pretty(t," $ "+[n,...o].join(" "),"grey")+"\n");try{await se.execvp(n,o,{cwd:A,strict:!0})}catch(e){throw r.stdout.write(e.stdout||e.stack),e}}}}async function ke(e,{configuration:t,report:r,target:A}){let n=!1;if(!e.force&&y.xfs.existsSync(m.y1.join(A,".git"))){r.reportInfo(u.b.UNNAMED,"Fetching the latest commits"),r.reportSeparator();try{await Se((({branch:e})=>[["git","fetch","origin",be(e),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]])(e),{configuration:t,context:e.context,target:A}),n=!0}catch(e){r.reportSeparator(),r.reportWarning(u.b.UNNAMED,"Repository update failed; we'll try to regenerate it")}}n||(r.reportInfo(u.b.UNNAMED,"Cloning the remote repository"),r.reportSeparator(),await y.xfs.removePromise(A),await y.xfs.mkdirPromise(A,{recursive:!0}),await Se((({repository:e,branch:t},r)=>[["git","init",m.cS.fromPortablePath(r)],["git","remote","add","origin",e],["git","fetch","origin",be(t)],["git","reset","--hard","FETCH_HEAD"]])(e,A),{configuration:t,context:e.context,target:A}))}ve.usage=C.Command.Usage({description:"build Yarn from master",details:"\n This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.\n ",examples:[["Build Yarn from master","$0 set version from sources"]]}),(0,a.gn)([C.Command.String("--path",{description:"The path where the repository should be cloned to"})],ve.prototype,"installPath",void 0),(0,a.gn)([C.Command.String("--repository",{description:"The repository that should be cloned"})],ve.prototype,"repository",void 0),(0,a.gn)([C.Command.String("--branch",{description:"The branch of the repository that should be cloned"})],ve.prototype,"branch",void 0),(0,a.gn)([C.Command.Array("--plugin",{description:"An array of additional plugins that should be included in the bundle"})],ve.prototype,"plugins",void 0),(0,a.gn)([C.Command.Boolean("--no-minify",{description:"Build a bundle for development (debugging) - non-minified and non-mangled"})],ve.prototype,"noMinify",void 0),(0,a.gn)([C.Command.Boolean("-f,--force",{description:"Always clone the repository instead of trying to fetch the latest commits"})],ve.prototype,"force",void 0),(0,a.gn)([C.Command.Path("set","version","from","sources")],ve.prototype,"execute",null);var Ne=r(78835);const Fe=require("vm");async function Ke(e){const t=await me.get("https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml",{configuration:e});return(0,he.parseSyml)(t.toString())}class Me extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{const r=await Ke(e);for(const[e,{experimental:A,...n}]of Object.entries(r)){let r=e;A&&(r+=" [experimental]"),t.reportJson({name:e,experimental:A,...n}),t.reportInfo(null,r)}})).exitCode()}}Me.usage=C.Command.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]}),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],Me.prototype,"json",void 0),(0,a.gn)([C.Command.Path("plugin","list")],Me.prototype,"execute",null);class Re extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{const{project:r}=await h.I.find(e,this.context.cwd);let A,n;if(this.name.match(/^\.{0,2}[\\/]/)||m.cS.isAbsolute(this.name)){const o=m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.name));t.reportInfo(u.b.UNNAMED,"Reading "+B.pretty(e,o,B.Type.PATH)),A=m.y1.relative(r.cwd,o),n=await y.xfs.readFilePromise(o)}else{let r;if(this.name.match(/^https?:/)){try{new Ne.URL(this.name)}catch(e){throw new V.lk(u.b.INVALID_PLUGIN_REFERENCE,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}A=this.name,r=this.name}else{const t=d.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),n=d.stringifyIdent(t),o=await Ke(e);if(!Object.prototype.hasOwnProperty.call(o,n))throw new V.lk(u.b.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${n}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be referenced by their name; any other plugin will have to be referenced through its public url (for example https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js).`);A=n,r=o[n].url}t.reportInfo(u.b.UNNAMED,"Downloading "+B.pretty(e,r,"green")),n=await me.get(r,{configuration:e})}await xe(A,n,{project:r,report:t})})).exitCode()}}async function xe(e,t,{project:r,report:A}){const{configuration:n}=r,o={},i={exports:o};(0,Fe.runInNewContext)(t.toString(),{module:i,exports:o});const a=i.exports.name,c=`.yarn/plugins/${a}.cjs`,g=m.y1.resolve(r.cwd,c);A.reportInfo(u.b.UNNAMED,"Saving the new plugin in "+B.pretty(n,c,"magenta")),await y.xfs.mkdirPromise(m.y1.dirname(g),{recursive:!0}),await y.xfs.writeFilePromise(g,t);const l={path:c,spec:e};await s.VK.updateConfiguration(r.cwd,e=>{const t=[];let A=!1;for(const n of e.plugins||[]){const e="string"!=typeof n?n.path:n,o=m.y1.resolve(r.cwd,m.cS.toPortablePath(e)),{name:i}=P.dynamicRequire(m.cS.fromPortablePath(o));i!==a?t.push(n):(t.push(l),A=!0)}return A||t.push(l),{...e,plugins:t}})}Re.usage=C.Command.Usage({category:"Plugin-related commands",description:"download a plugin",details:"\n This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.\n\n Three types of plugin references are accepted:\n\n - If the plugin is stored within the Yarn repository, it can be referenced by name.\n - Third-party plugins can be referenced directly through their public urls.\n - Local plugins can be referenced by their path on the disk.\n\n Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the `@yarnpkg/builder` package).\n ",examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]}),(0,a.gn)([C.Command.String()],Re.prototype,"name",void 0),(0,a.gn)([C.Command.Path("plugin","import")],Re.prototype,"execute",null);class Le extends c.BaseCommand{constructor(){super(...arguments),this.repository="https://github.com/yarnpkg/berry.git",this.branch="master",this.noMinify=!1,this.force=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),t=void 0!==this.installPath?m.y1.resolve(this.context.cwd,m.cS.toPortablePath(this.installPath)):m.y1.resolve(m.cS.toPortablePath((0,Ee.tmpdir)()),"yarnpkg-sources",Ie.makeHash(this.repository).slice(0,6));return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const{project:A}=await h.I.find(e,this.context.cwd),n=d.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),o=d.stringifyIdent(n),i=await Ke(e);if(!Object.prototype.hasOwnProperty.call(i,o))throw new V.lk(u.b.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${o}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);const s=o,a=s.replace(/@yarnpkg\//,"");await ke(this,{configuration:e,report:r,target:t}),r.reportSeparator(),r.reportInfo(u.b.UNNAMED,"Building a fresh "+a),r.reportSeparator(),await Se((({pluginName:e,noMinify:t},r)=>[["yarn","build:"+e,...t?["--no-minify"]:[],"|"]])({pluginName:a,noMinify:this.noMinify}),{configuration:e,context:this.context,target:t}),r.reportSeparator();const c=m.y1.resolve(t,`packages/${a}/bundles/${s}.js`),g=await y.xfs.readFilePromise(c);await xe(s,g,{project:A,report:r})})).exitCode()}}Le.usage=C.Command.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:"\n This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.\n\n The plugins can be referenced by their short name if sourced from the official Yarn repository.\n ",examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]}),(0,a.gn)([C.Command.String()],Le.prototype,"name",void 0),(0,a.gn)([C.Command.String("--path",{description:"The path where the repository should be cloned to"})],Le.prototype,"installPath",void 0),(0,a.gn)([C.Command.String("--repository",{description:"The repository that should be cloned"})],Le.prototype,"repository",void 0),(0,a.gn)([C.Command.String("--branch",{description:"The branch of the repository that should be cloned"})],Le.prototype,"branch",void 0),(0,a.gn)([C.Command.Boolean("--no-minify",{description:"Build a plugin for development (debugging) - non-minified and non-mangled"})],Le.prototype,"noMinify",void 0),(0,a.gn)([C.Command.Boolean("-f,--force",{description:"Always clone the repository instead of trying to fetch the latest commits"})],Le.prototype,"force",void 0),(0,a.gn)([C.Command.Path("plugin","import","from","sources")],Le.prototype,"execute",null);class Pe extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const A=this.name,n=d.parseIdent(A);if(!e.plugins.has(A))throw new C.UsageError(d.prettyIdent(e,n)+" isn't referenced by the current configuration");const o=`.yarn/plugins/${A}.cjs`,i=m.y1.resolve(t.cwd,o);y.xfs.existsSync(i)&&(r.reportInfo(u.b.UNNAMED,`Removing ${B.pretty(e,o,B.Type.PATH)}...`),await y.xfs.removePromise(i)),r.reportInfo(u.b.UNNAMED,"Updating the configuration..."),await s.VK.updateConfiguration(t.cwd,e=>{if(!Array.isArray(e.plugins))return e;const t=e.plugins.filter(e=>e.path!==o);return e.plugins.length===t.length?e:{...e,plugins:t}})})).exitCode()}}Pe.usage=C.Command.Usage({category:"Plugin-related commands",description:"remove a plugin",details:"\n This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.\n\n **Note:** The plugins have to be referenced by their name property, which can be obtained using the `yarn plugin runtime` command. Shorthands are not allowed.\n ",examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]}),(0,a.gn)([C.Command.String()],Pe.prototype,"name",void 0),(0,a.gn)([C.Command.Path("plugin","remove")],Pe.prototype,"execute",null);class Oe extends c.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins);return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async t=>{for(const r of e.plugins.keys()){const e=this.context.plugins.plugins.has(r);let A=r;e&&(A+=" [builtin]"),t.reportJson({name:r,builtin:e}),t.reportInfo(null,""+A)}})).exitCode()}}Oe.usage=C.Command.Usage({category:"Plugin-related commands",description:"list the active plugins",details:"\n This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.\n ",examples:[["List the currently active plugins","$0 plugin runtime"]]}),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],Oe.prototype,"json",void 0),(0,a.gn)([C.Command.Path("plugin","runtime")],Oe.prototype,"execute",null);class Ue extends c.BaseCommand{constructor(){super(...arguments),this.idents=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=new Set;for(const e of this.idents)n.add(d.parseIdent(e).identHash);await t.resolveEverything({cache:A,report:new I.$});const o=e.get("bstatePath"),i=y.xfs.existsSync(o)?(0,he.parseSyml)(await y.xfs.readFilePromise(o,"utf8")):{},a=new Map;for(const e of t.storedPackages.values()){if(!Object.prototype.hasOwnProperty.call(i,e.locatorHash))continue;if(0===n.size||n.has(e.identHash))continue;const t=i[e.locatorHash];a.set(e.locatorHash,t)}if(a.size>0){const r=e.get("bstatePath"),A=h.I.generateBuildStateFile(a,t.storedPackages);await y.xfs.mkdirPromise(m.y1.dirname(r),{recursive:!0}),await y.xfs.changeFilePromise(r,A,{automaticNewlines:!0})}else await y.xfs.removePromise(o);return(await p.Pk.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async e=>{await t.install({cache:A,report:e})})).exitCode()}}Ue.usage=C.Command.Usage({description:"rebuild the project's native packages",details:"\n This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.\n\n Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).\n\n By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.\n ",examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]}),(0,a.gn)([C.Command.Rest()],Ue.prototype,"idents",void 0),(0,a.gn)([C.Command.Path("rebuild")],Ue.prototype,"execute",null);class Te extends c.BaseCommand{constructor(){super(...arguments),this.all=!1,this.patterns=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState({restoreResolutions:!1});const o=this.all?t.workspaces:[r],i=[n.REGULAR,n.DEVELOPMENT,n.PEER],a=[];let l=!1;const u=[];for(const e of this.patterns){let t=!1;const r=d.parseIdent(e);for(const A of o){const n=[...A.manifest.peerDependenciesMeta.keys()];for(const r of Z()(n,e))A.manifest.peerDependenciesMeta.delete(r),l=!0,t=!0;for(const e of i){const n=A.manifest.getForScope(e),o=[...n.values()].map(e=>d.stringifyIdent(e));for(const i of Z()(o,d.stringifyIdent(r))){const{identHash:r}=d.parseIdent(i),o=n.get(r);if(void 0===o)throw new Error("Assertion failed: Expected the descriptor to be registered");A.manifest[e].delete(r),u.push([A,e,o]),l=!0,t=!0}}}t||a.push(e)}const f=a.length>1?"Patterns":"Pattern",I=a.length>1?"don't":"doesn't",E=this.all?"any":"this";if(a.length>0)throw new C.UsageError(`${f} ${B.prettyList(e,a,s.a5.CODE)} ${I} match any packages referenced by ${E} workspace`);if(l){await e.triggerMultipleHooks(e=>e.afterWorkspaceDependencyRemoval,u);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:A,report:e})})).exitCode()}return 0}}Te.usage=C.Command.Usage({description:"remove dependencies from the project",details:"\n This command will remove the packages matching the specified patterns from the current workspace.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n ",examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]}),(0,a.gn)([C.Command.Boolean("-A,--all",{description:"Apply the operation to all workspaces from the current project"})],Te.prototype,"all",void 0),(0,a.gn)([C.Command.Rest()],Te.prototype,"patterns",void 0),(0,a.gn)([C.Command.Path("remove")],Te.prototype,"execute",null);class je extends c.BaseCommand{async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{const A=r.manifest.scripts,n=P.sortMap(A.keys(),e=>e),o={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2},i=n.reduce((e,t)=>Math.max(e,t.length),0);for(const[e,r]of A.entries())t.reportInfo(null,`${e.padEnd(i," ")} ${(0,T.inspect)(r,o)}`)})).exitCode()}}(0,a.gn)([C.Command.Path("run")],je.prototype,"execute",null);class Ye extends c.BaseCommand{constructor(){super(...arguments),this.inspect=!1,this.inspectBrk=!1,this.topLevel=!1,this.binariesOnly=!1,this.args=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r,locator:A}=await h.I.find(e,this.context.cwd);await t.restoreInstallState();const n=this.topLevel?t.topLevelWorkspace.anchoredLocator:A;if(!this.binariesOnly&&await R.hasPackageScript(n,this.scriptName,{project:t}))return await R.executePackageScript(n,this.scriptName,this.args,{project:t,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if((await R.getPackageAccessibleBinaries(n,{project:t})).get(this.scriptName)){const e=[];return this.inspect&&("string"==typeof this.inspect?e.push("--inspect="+this.inspect):e.push("--inspect")),this.inspectBrk&&("string"==typeof this.inspectBrk?e.push("--inspect-brk="+this.inspectBrk):e.push("--inspect-brk")),await R.executePackageAccessibleBinary(n,this.scriptName,this.args,{cwd:this.context.cwd,project:t,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:e})}if(!this.topLevel&&!this.binariesOnly&&r&&this.scriptName.includes(":")){const e=(await Promise.all(t.workspaces.map(async e=>e.manifest.scripts.has(this.scriptName)?e:null))).filter(e=>null!==e);if(1===e.length)return await R.executeWorkspaceScript(e[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw"node-gyp"===this.scriptName?new C.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${d.prettyLocator(e,A)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new C.UsageError(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${d.prettyLocator(e,A)}).`);{if("global"===this.scriptName)throw new C.UsageError("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");const e=[this.scriptName].concat(this.args);for(const[t,r]of c.pluginCommands)for(const A of r)if(e.length>=A.length&&JSON.stringify(e.slice(0,A.length))===JSON.stringify(A))throw new C.UsageError(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${t} plugin. You can install it with "yarn plugin import ${t}".`);throw new C.UsageError(`Couldn't find a script named "${this.scriptName}".`)}}}Ye.usage=C.Command.Usage({description:"run a script defined in the package.json",details:"\n This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:\n\n - If the `scripts` field from your local package.json contains a matching script name, its definition will get executed.\n\n - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.\n\n - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.\n\n Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).\n ",examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]}),(0,a.gn)([C.Command.String("--inspect",{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"})],Ye.prototype,"inspect",void 0),(0,a.gn)([C.Command.String("--inspect-brk",{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"})],Ye.prototype,"inspectBrk",void 0),(0,a.gn)([C.Command.Boolean("-T,--top-level",{hidden:!0})],Ye.prototype,"topLevel",void 0),(0,a.gn)([C.Command.Boolean("-B,--binaries-only",{hidden:!0})],Ye.prototype,"binariesOnly",void 0),(0,a.gn)([C.Command.Boolean("--silent",{hidden:!0})],Ye.prototype,"silent",void 0),(0,a.gn)([C.Command.String()],Ye.prototype,"scriptName",void 0),(0,a.gn)([C.Command.Proxy()],Ye.prototype,"args",void 0),(0,a.gn)([C.Command.Path("run")],Ye.prototype,"execute",null);class Ge extends c.BaseCommand{constructor(){super(...arguments),this.save=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd),A=await g.C.find(e);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const n=d.parseDescriptor(this.descriptor,!0),o=d.makeDescriptor(n,this.resolution);t.storedDescriptors.set(n.descriptorHash,n),t.storedDescriptors.set(o.descriptorHash,o),t.resolutionAliases.set(n.descriptorHash,o.descriptorHash);return(await p.Pk.start({configuration:e,stdout:this.context.stdout},async e=>{await t.install({cache:A,report:e})})).exitCode()}}Ge.usage=C.Command.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, add the `-s,--save` flag which will also edit the `resolutions` field from your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 1.5.0"]]}),(0,a.gn)([C.Command.String()],Ge.prototype,"descriptor",void 0),(0,a.gn)([C.Command.String()],Ge.prototype,"resolution",void 0),(0,a.gn)([C.Command.Boolean("-s,--save",{description:"Persist the resolution inside the top-level manifest"})],Ge.prototype,"save",void 0),(0,a.gn)([C.Command.Path("set","resolution")],Ge.prototype,"execute",null);class He extends c.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.interactive=null,this.exact=!1,this.tilde=!1,this.caret=!1}async execute(){var e;const t=await s.VK.find(this.context.cwd,this.context.plugins),{project:r,workspace:A}=await h.I.find(t,this.context.cwd),o=await g.C.find(t);if(!A)throw new c.WorkspaceRequiredError(r.cwd,this.context.cwd);const a=null!==(e=this.interactive)&&void 0!==e?e:t.get("preferInteractive"),I=D(this,r),E=a?[i.KEEP,i.REUSE,i.PROJECT,i.LATEST]:[i.PROJECT,i.LATEST],y=[],m=[];for(const e of this.patterns){let t=!1;const A=d.parseDescriptor(e);for(const e of r.workspaces)for(const i of[n.REGULAR,n.DEVELOPMENT]){const n=[...e.manifest.getForScope(i).values()].map(e=>d.stringifyIdent(e));for(const s of Z()(n,d.stringifyIdent(A))){const n=d.parseIdent(s),a=e.manifest[i].get(n.identHash);if(void 0===a)throw new Error("Assertion failed: Expected the descriptor to be registered");const c=d.makeDescriptor(n,A.range);y.push(Promise.resolve().then(async()=>[e,i,a,await F(c,{project:r,workspace:e,cache:o,target:i,modifier:I,strategies:E})])),t=!0}}t||m.push(e)}if(m.length>1)throw new C.UsageError(`Patterns ${B.prettyList(t,m,s.a5.CODE)} don't match any packages referenced by any workspace`);if(m.length>0)throw new C.UsageError(`Pattern ${B.prettyList(t,m,s.a5.CODE)} doesn't match any packages referenced by any workspace`);const w=await Promise.all(y),Q=await l.h.start({configuration:t,stdout:this.context.stdout,suggestInstall:!1},async e=>{for(const[,,A,{suggestions:n,rejections:o}]of w){const i=n.filter(e=>null!==e.descriptor);if(0===i.length){const[n]=o;if(void 0===n)throw new Error("Assertion failed: Expected an error to have been set");const i=this.cli.error(n);r.configuration.get("enableNetwork")?e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range\n\n${i}`):e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,`${d.prettyDescriptor(t,A)} can't be resolved to a satisfying range (note: network resolution has been disabled)\n\n${i}`)}else i.length>1&&!a&&e.reportError(u.b.CANT_SUGGEST_RESOLUTIONS,d.prettyDescriptor(t,A)+" has multiple possible upgrade strategies; use -i to disambiguate manually")}});if(Q.hasErrors())return Q.exitCode();let b=!1;const v=[];for(const[e,A,,{suggestions:n}]of w){let o;const i=n.filter(e=>null!==e.descriptor),s=i[0].descriptor,a=i.every(e=>d.areDescriptorsEqual(e.descriptor,s));1===i.length||a?o=s:(b=!0,({answer:o}=await(0,f.prompt)({type:"select",name:"answer",message:`Which range to you want to use in ${d.prettyWorkspace(t,e)} ❯ ${A}?`,choices:n.map(({descriptor:e,name:t,reason:r})=>e?{name:t,hint:r,descriptor:e}:{name:t,hint:r,disabled:!0}),onCancel:()=>process.exit(130),result(e){return this.find(e,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout})));const c=e.manifest[A].get(o.identHash);if(void 0===c)throw new Error("Assertion failed: This descriptor should have a matching entry");if(c.descriptorHash!==o.descriptorHash)e.manifest[A].set(o.identHash,o),v.push([e,A,c,o]);else{const A=t.makeResolver(),n={project:r,resolver:A},o=A.bindDescriptor(c,e.anchoredLocator,n);r.forgetResolution(o)}}await t.triggerMultipleHooks(e=>e.afterWorkspaceDependencyReplacement,v),b&&this.context.stdout.write("\n");return(await p.Pk.start({configuration:t,stdout:this.context.stdout},async e=>{await r.install({cache:o,report:e})})).exitCode()}}He.usage=C.Command.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),(0,a.gn)([C.Command.Rest()],He.prototype,"patterns",void 0),(0,a.gn)([C.Command.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"})],He.prototype,"interactive",void 0),(0,a.gn)([C.Command.Boolean("-E,--exact",{description:"Don't use any semver modifier on the resolved range"})],He.prototype,"exact",void 0),(0,a.gn)([C.Command.Boolean("-T,--tilde",{description:"Use the `~` semver modifier on the resolved range"})],He.prototype,"tilde",void 0),(0,a.gn)([C.Command.Boolean("-C,--caret",{description:"Use the `^` semver modifier on the resolved range"})],He.prototype,"caret",void 0),(0,a.gn)([C.Command.Path("up")],He.prototype,"execute",null);class Je extends c.BaseCommand{constructor(){super(...arguments),this.recursive=!1,this.json=!1,this.peers=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const A=d.parseIdent(this.package).identHash,n=this.recursive?function(e,t,{configuration:r,peers:A}){const n=P.sortMap(e.workspaces,e=>d.stringifyLocator(e.anchoredLocator)),o=new Set,i=new Set,s=r=>{if(o.has(r.locatorHash))return i.has(r.locatorHash);if(o.add(r.locatorHash),r.identHash===t)return i.add(r.locatorHash),!0;let n=!1;r.identHash===t&&(n=!0);for(const t of r.dependencies.values()){if(!A&&r.peerDependencies.has(t.identHash))continue;const o=e.storedResolutions.get(t.descriptorHash);if(!o)throw new Error("Assertion failed: The resolution should have been registered");const i=e.storedPackages.get(o);if(!i)throw new Error("Assertion failed: The package should have been registered");s(i)&&(n=!0)}return n&&i.add(r.locatorHash),n};for(const t of n){const r=e.storedPackages.get(t.anchoredLocator.locatorHash);if(!r)throw new Error("Assertion failed: The package should have been registered");s(r)}const a=new Set,c={},g={children:c},l=(t,r,n)=>{if(!i.has(t.locatorHash))return;const o={},s={value:null!==n?B.tuple(B.Type.DEPENDENT,{locator:t,descriptor:n}):B.tuple(B.Type.LOCATOR,t),children:o};if(r[d.stringifyLocator(t)]=s,!a.has(t.locatorHash)&&(a.add(t.locatorHash),null===n||!e.tryWorkspaceByLocator(t)))for(const r of t.dependencies.values()){if(!A&&t.peerDependencies.has(r.identHash))continue;const n=e.storedResolutions.get(r.descriptorHash);if(!n)throw new Error("Assertion failed: The resolution should have been registered");const i=e.storedPackages.get(n);if(!i)throw new Error("Assertion failed: The package should have been registered");l(i,o,r)}};for(const t of n){const r=e.storedPackages.get(t.anchoredLocator.locatorHash);if(!r)throw new Error("Assertion failed: The package should have been registered");l(r,c,null)}return g}(t,A,{configuration:e,peers:this.peers}):function(e,t,{configuration:r,peers:A}){const n=P.sortMap(e.storedPackages.values(),e=>d.stringifyLocator(e)),o={},i={children:o};for(const r of n){const n={},i=null;for(const s of r.dependencies.values()){if(!A&&r.peerDependencies.has(s.identHash))continue;const a=e.storedResolutions.get(s.descriptorHash);if(!a)throw new Error("Assertion failed: The resolution should have been registered");const c=e.storedPackages.get(a);if(!c)throw new Error("Assertion failed: The package should have been registered");if(c.identHash!==t)continue;if(null===i){const e=d.stringifyLocator(r);o[e]={value:[r,B.Type.LOCATOR],children:n}}const g=d.stringifyLocator(c);n[g]={value:[{descriptor:s,locator:c},B.Type.DEPENDENT]}}}return i}(t,A,{configuration:e,peers:this.peers});le.emitTree(n,{configuration:e,stdout:this.context.stdout,json:this.json,separators:1})}}Je.usage=C.Command.Usage({description:"display the reason why a package is needed",details:'\n This command prints the exact reasons why a package appears in the dependency tree.\n\n If `-R,--recursive` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree.\n ',examples:[["Explain why lodash is used in your project","$0 why lodash"]]}),(0,a.gn)([C.Command.String()],Je.prototype,"package",void 0),(0,a.gn)([C.Command.Boolean("-R,--recursive",{description:"List, for each workspace, what are all the paths that lead to the dependency"})],Je.prototype,"recursive",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],Je.prototype,"json",void 0),(0,a.gn)([C.Command.Boolean("--peers",{description:"Also print the peer dependencies that match the specified name"})],Je.prototype,"peers",void 0),(0,a.gn)([C.Command.Path("why")],Je.prototype,"execute",null);class qe extends c.BaseCommand{constructor(){super(...arguments),this.verbose=!1,this.json=!1}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t}=await h.I.find(e,this.context.cwd);return(await p.Pk.start({configuration:e,json:this.json,stdout:this.context.stdout},async e=>{for(const r of t.workspaces){const{manifest:A}=r;let n;if(this.verbose){const e=new Set,r=new Set;for(const n of E.G.hardDependencies)for(const[o,i]of A.getForScope(n)){const A=t.tryWorkspaceByDescriptor(i);null===A?t.workspacesByIdent.has(o)&&r.add(i):e.add(A)}n={workspaceDependencies:Array.from(e).map(e=>e.relativeCwd),mismatchedWorkspaceDependencies:Array.from(r).map(e=>d.stringifyDescriptor(e))}}e.reportInfo(null,""+r.relativeCwd),e.reportJson({location:r.relativeCwd,name:A.name?d.stringifyIdent(A.name):null,...n})}})).exitCode()}}qe.usage=C.Command.Usage({category:"Workspace-related commands",description:"list all available workspaces",details:"\n This command will print the list of all workspaces in the project. If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\n "}),(0,a.gn)([C.Command.Boolean("-v,--verbose",{description:"Also return the cross-dependencies between workspaces"})],qe.prototype,"verbose",void 0),(0,a.gn)([C.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],qe.prototype,"json",void 0),(0,a.gn)([C.Command.Path("workspaces","list")],qe.prototype,"execute",null);class ze extends C.Command{constructor(){super(...arguments),this.args=[]}async execute(){const e=await s.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await h.I.find(e,this.context.cwd);if(!r)throw new c.WorkspaceRequiredError(t.cwd,this.context.cwd);const A=t.workspaces,n=new Map(A.map(e=>{const t=d.convertToIdent(e.locator);return[d.stringifyIdent(t),e]})),o=n.get(this.workspaceName);if(void 0===o){const e=Array.from(n.keys()).sort();throw new C.UsageError(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:\n - ${e.join("\n - ")}?`)}return this.cli.run([this.commandName,...this.args],{cwd:o.cwd})}}ze.usage=C.Command.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:"\n This command will run a given sub-command on a single workspace.\n ",examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]}),(0,a.gn)([C.Command.String()],ze.prototype,"workspaceName",void 0),(0,a.gn)([C.Command.String()],ze.prototype,"commandName",void 0),(0,a.gn)([C.Command.Proxy()],ze.prototype,"args",void 0),(0,a.gn)([C.Command.Path("workspace")],ze.prototype,"execute",null);const We={configuration:{enableImmutableInstalls:{description:"If true, prevents the install command from modifying the lockfile",type:s.a2.BOOLEAN,default:!1},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:s.a2.STRING,values:["^","~",""],default:o.CARET}},commands:[L,j,q,Ge,ve,we,qe,re,Ae,ne,ie,M,x,z,te,ae,ge,ue,de,Ce,fe,Le,Re,Pe,Me,Oe,Ue,Te,je,Ye,He,Je,ze]}},68023:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E,fileUtils:()=>A});var A={};r.r(A),r.d(A,{makeArchiveFromLocator:()=>p,makeBufferFromLocator:()=>d,makeLocator:()=>h,makeSpec:()=>u,parseSpec:()=>l});var n=r(54143),o=r(46009);const i=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,s=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/;var a=r(73632),c=r(72785),g=r(75448);function l(e){const{params:t,selector:r}=n.parseRange(e),A=o.cS.toPortablePath(r);return{parentLocator:t&&"string"==typeof t.locator?n.parseLocator(t.locator):null,path:A}}function u({parentLocator:e,path:t,folderHash:r,protocol:A}){const o=null!==e?{locator:n.stringifyLocator(e)}:{},i=void 0!==r?{hash:r}:{};return n.makeRange({protocol:A,source:t,selector:t,params:{...i,...o}})}function h(e,{parentLocator:t,path:r,folderHash:A,protocol:o}){return n.makeLocator(e,u({parentLocator:t,path:r,folderHash:A,protocol:o}))}async function p(e,{protocol:t,fetchOptions:r,inMemory:A=!1}){const{parentLocator:i,path:s}=n.parseFileStyleRange(e.reference,{protocol:t}),l=o.y1.isAbsolute(s)?{packageFs:new g.M(o.LZ.root),prefixPath:o.LZ.dot,localPath:o.LZ.root}:await r.fetcher.fetch(i,r),u=l.localPath?{packageFs:new g.M(o.LZ.root),prefixPath:o.y1.relative(o.LZ.root,l.localPath)}:l;l!==u&&l.releaseFs&&l.releaseFs();const h=u.packageFs,p=o.y1.join(u.prefixPath,s);return await a.releaseAfterUseAsync(async()=>await c.makeArchiveFromDirectory(p,{baseFs:h,prefixPath:n.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:A}),u.releaseFs)}async function d(e,{protocol:t,fetchOptions:r}){return(await p(e,{protocol:t,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var C=r(20624),f=r(32485),I=r(46611);const E={fetchers:[class{supports(e,t){return!!s.test(e.reference)&&!!e.reference.startsWith("file:")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.fetchFromDisk(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:A,releaseFs:o,prefixPath:n.getIdentVendorPath(e),checksum:i}}async fetchFromDisk(e,t){const{parentLocator:r,path:A}=n.parseFileStyleRange(e.reference,{protocol:"file:"}),i=o.y1.isAbsolute(A)?{packageFs:new g.M(o.LZ.root),prefixPath:o.LZ.dot,localPath:o.LZ.root}:await t.fetcher.fetch(r,t),s=i.localPath?{packageFs:new g.M(o.LZ.root),prefixPath:o.y1.relative(o.LZ.root,i.localPath)}:i;i!==s&&i.releaseFs&&i.releaseFs();const l=s.packageFs,u=o.y1.join(s.prefixPath,A),h=await l.readFilePromise(u);return await a.releaseAfterUseAsync(async()=>await c.convertToZip(h,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:n.getIdentVendorPath(e),stripComponents:1}),s.releaseFs)}},class{supports(e,t){return!!e.reference.startsWith("file:")}getLocalPath(e,t){const{parentLocator:r,path:A}=n.parseFileStyleRange(e.reference,{protocol:"file:"});if(o.y1.isAbsolute(A))return A;const i=t.fetcher.getLocalPath(r,t);return null===i?null:o.y1.resolve(i,A)}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,n.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.fetchFromDisk(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:A,releaseFs:o,prefixPath:n.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:i}}async fetchFromDisk(e,t){return p(e,{protocol:"file:",fetchOptions:t})}}],resolvers:[class{supportsDescriptor(e,t){return!!s.test(e.range)&&(!!e.range.startsWith("file:")||!!i.test(e.range))}supportsLocator(e,t){return!!s.test(e.reference)&&!!e.reference.startsWith("file:")}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return i.test(e.range)&&(e=n.makeDescriptor(e,"file:"+e.range)),n.bindDescriptor(e,{locator:n.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){let A=e.range;return A.startsWith("file:")&&(A=A.slice("file:".length)),[n.makeLocator(e,"file:"+o.cS.toPortablePath(A))]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await a.releaseAfterUseAsync(async()=>await I.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:f.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}},class{supportsDescriptor(e,t){return!!e.range.match(i)||!!e.range.startsWith("file:")}supportsLocator(e,t){return!!e.reference.startsWith("file:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return i.test(e.range)&&(e=n.makeDescriptor(e,"file:"+e.range)),n.bindDescriptor(e,{locator:n.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const{path:A,parentLocator:o}=l(e.range);if(null===o)throw new Error("Assertion failed: The descriptor should have been bound");const i=await d(n.makeLocator(e,n.makeRange({protocol:"file:",source:A,selector:A,params:{locator:n.stringifyLocator(o)}})),{protocol:"file:",fetchOptions:r.fetchOptions});return[h(e,{parentLocator:o,path:A,folderHash:C.makeHash("1",i).slice(0,6),protocol:"file:"})]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await a.releaseAfterUseAsync(async()=>await I.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:f.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},75641:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>F,gitUtils:()=>A});var A={};r.r(A),r.d(A,{TreeishProtocols:()=>y,clone:()=>S,isGitUrl:()=>m,lsRemote:()=>b,normalizeLocator:()=>D,normalizeRepoUrl:()=>Q,resolveUrl:()=>v,splitRepoUrl:()=>w});var n=r(39922),o=r(54143),i=r(63088),s=r(73632),a=r(72785),c=r(43896),g=r(46009),l=r(79669),u=r(6220),h=r(71191),p=r.n(h),d=r(53887),C=r.n(d),f=r(78835),I=r.n(f);function E(){return{...process.env,GIT_SSH_COMMAND:"ssh -o BatchMode=yes"}}const B=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/];var y;function m(e){return!!e&&B.some(t=>!!e.match(t))}function w(e){const t=(e=Q(e)).indexOf("#");if(-1===t)return{repo:e,treeish:{protocol:y.Head,request:"master"},extra:{}};const r=e.slice(0,t),A=e.slice(t+1);if(A.match(/^[a-z]+=/)){const e=p().parse(A);for(const[t,r]of Object.entries(e))if("string"!=typeof r)throw new Error(`Assertion failed: The ${t} parameter must be a literal string`);const t=Object.values(y).find(t=>Object.prototype.hasOwnProperty.call(e,t));let n,o;void 0!==t?(n=t,o=e[t]):(n=y.Head,o="master");for(const t of Object.values(y))delete e[t];return{repo:r,treeish:{protocol:n,request:o},extra:e}}{const e=A.indexOf(":");let t,n;return-1===e?(t=null,n=A):(t=A.slice(0,e),n=A.slice(e+1)),{repo:r,treeish:{protocol:t,request:n},extra:{}}}}function Q(e,{git:t=!1}={}){var r;if(e=(e=(e=e.replace(/^git\+https:/,"https:")).replace(/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3")).replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),t){let t;e=e.replace(/^git\+([^:]+):/,"$1:");try{t=I().parse(e)}catch(e){t=null}t&&"ssh:"===t.protocol&&(null===(r=t.path)||void 0===r?void 0:r.startsWith("/:"))&&(e=e.replace(/^ssh:\/\//,""))}return e}function D(e){return o.makeLocator(e,Q(e.reference))}async function b(e,t){const r=Q(e,{git:!0});if(!l.getNetworkSettings(r,{configuration:t}).enableNetwork)throw new Error(`Request to '${r}' has been blocked because of your configuration settings`);let A;try{A=await u.execvp("git",["ls-remote","--refs",r],{cwd:t.startingCwd,env:E(),strict:!0})}catch(t){throw t.message=`Listing the refs for ${e} failed`,t}const n=new Map,o=/^([a-f0-9]{40})\t(refs\/[^\n]+)/gm;let i;for(;null!==(i=o.exec(A.stdout));)n.set(i[2],i[1]);return n}async function v(e,t){const{repo:r,treeish:{protocol:A,request:n},extra:o}=w(e),i=await b(r,t),s=(e,t)=>{switch(e){case y.Commit:if(!t.match(/^[a-f0-9]{40}$/))throw new Error("Invalid commit hash");return p().stringify({...o,commit:t});case y.Head:{const e=i.get("refs/heads/"+t);if(void 0===e)throw new Error(`Unknown head ("${t}")`);return p().stringify({...o,commit:e})}case y.Tag:{const e=i.get("refs/tags/"+t);if(void 0===e)throw new Error(`Unknown tag ("${t}")`);return p().stringify({...o,commit:e})}case y.Semver:{if(!C().validRange(t))throw new Error(`Invalid range ("${t}")`);const e=new Map([...i.entries()].filter(([e])=>e.startsWith("refs/tags/")).map(([e,t])=>[C().parse(e.slice(10)),t]).filter(e=>null!==e[0])),r=C().maxSatisfying([...e.keys()],t);if(null===r)throw new Error(`No matching range ("${t}")`);return p().stringify({...o,commit:e.get(r)})}case null:{let e;if(null!==(e=a(y.Commit,t)))return e;if(null!==(e=a(y.Tag,t)))return e;if(null!==(e=a(y.Head,t)))return e;throw t.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve "${t}" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve "${t}" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol ("${e}")`)}},a=(e,t)=>{try{return s(e,t)}catch(e){return null}};return`${r}#${s(A,n)}`}async function S(e,t){return await t.getLimit("cloneConcurrency")(async()=>{const{repo:r,treeish:{protocol:A,request:n}}=w(e);if("commit"!==A)throw new Error("Invalid treeish protocol when cloning");const o=Q(r,{git:!0});if(!1===l.getNetworkSettings(o,{configuration:t}).enableNetwork)throw new Error(`Request to '${o}' has been blocked because of your configuration settings`);const i=await c.xfs.mktempPromise(),s={cwd:i,env:E(),strict:!0};try{await u.execvp("git",["clone","-c core.autocrlf=false",o,g.cS.fromPortablePath(i)],s),await u.execvp("git",["checkout",""+n],s)}catch(e){throw e.message="Repository clone failed: "+e.message,e}return i})}!function(e){e.Commit="commit",e.Head="head",e.Tag="tag",e.Semver="semver"}(y||(y={}));var k=r(32485),N=r(46611);const F={configuration:{cloneConcurrency:{description:"Maximal number of concurrent clones",type:n.a2.NUMBER,default:2}},fetchers:[class{supports(e,t){return m(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,A=D(e),n=new Map(t.checksums);n.set(A.locatorHash,r);const i={...t,checksums:n},s=await this.downloadHosted(A,i);if(null!==s)return s;const[a,c,g]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,o.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote repository"),loader:()=>this.cloneFromRemote(A,i),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:a,releaseFs:c,prefixPath:o.getIdentVendorPath(e),checksum:g}}async downloadHosted(e,t){return t.project.configuration.reduceHook(e=>e.fetchHostedRepository,null,e,t)}async cloneFromRemote(e,t){const r=await S(e.reference,t.project.configuration),A=w(e.reference),n=g.y1.join(r,"package.tgz");await i.prepareExternalProject(r,n,{configuration:t.project.configuration,report:t.report,workspace:A.extra.workspace});const l=await c.xfs.readFilePromise(n);return await s.releaseAfterUseAsync(async()=>await a.convertToZip(l,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:o.getIdentVendorPath(e),stripComponents:1}))}}],resolvers:[class{supportsDescriptor(e,t){return m(e.range)}supportsLocator(e,t){return m(e.reference)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const A=await v(e.range,r.project.configuration);return[o.makeLocator(e,A)]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await s.releaseAfterUseAsync(async()=>await N.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:k.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},68126:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var A=r(54143),n=r(79669),o=r(72785),i=r(63088),s=r(43896),a=r(75448),c=r(46009),g=r(75641),l=r(71191),u=r.n(l);const h=[/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+)\/tarball\/([^/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+?)(?:\.git)?(?:#(.*))?$/];class p{supports(e,t){return!(!(r=e.reference)||!h.some(e=>!!r.match(e)));var r}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,A.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from GitHub"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:n,releaseFs:o,prefixPath:A.getIdentVendorPath(e),checksum:i}}async fetchFromNetwork(e,t){const r=await n.get(this.getLocatorUrl(e,t),{configuration:t.project.configuration});return await s.xfs.mktempPromise(async n=>{const l=new a.M(n);await o.extractArchiveTo(r,l,{stripComponents:1});const u=g.gitUtils.splitRepoUrl(e.reference),h=c.y1.join(n,"package.tgz");await i.prepareExternalProject(n,h,{configuration:t.project.configuration,report:t.report,workspace:u.extra.workspace});const p=await s.xfs.readFilePromise(h);return await o.convertToZip(p,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:A.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,t){const{auth:r,username:A,reponame:n,treeish:o}=function(e){let t;for(const r of h)if(t=e.match(r),t)break;if(!t)throw new Error(`Input cannot be parsed as a valid GitHub URL ('${e}').`);let[,r,A,n,o="master"]=t;const{commit:i}=u().parse(o);return o=i||o.replace(/[^:]*:/,""),{auth:r,username:A,reponame:n,treeish:o}}(e.reference);return`https://${r?r+"@":""}github.com/${A}/${n}/archive/${o}.tar.gz`}}const d={hooks:{async fetchHostedRepository(e,t,r){if(null!==e)return e;const A=new p;if(!A.supports(t,r))return null;try{return await A.fetch(t,r)}catch(e){return null}}}}},99148:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var A=r(54143),n=r(79669),o=r(72785);const i=/^[^?]*\.(?:tar\.gz|tgz)(?:\?.*)?$/,s=/^https?:/;var a=r(46611),c=r(32485),g=r(73632);const l={fetchers:[class{supports(e,t){return!!i.test(e.reference)&&!!s.test(e.reference)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[n,o,i]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,A.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote server"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:n,releaseFs:o,prefixPath:A.getIdentVendorPath(e),checksum:i}}async fetchFromNetwork(e,t){const r=await n.get(e.reference,{configuration:t.project.configuration});return await o.convertToZip(r,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:A.getIdentVendorPath(e),stripComponents:1})}}],resolvers:[class{supportsDescriptor(e,t){return!!i.test(e.range)&&!!s.test(e.range)}supportsLocator(e,t){return!!i.test(e.reference)&&!!s.test(e.reference)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){return[A.convertDescriptorToLocator(e)]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await g.releaseAfterUseAsync(async()=>await a.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:c.Un.HARD,dependencies:A.dependencies,peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},64314:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>I});var A=r(39922),n=r(36370),o=r(25413),i=r(46611),s=r(85824),a=r(6220),c=r(63088),g=r(54143),l=r(43896),u=r(46009),h=r(40822),p=r(80305),d=r.n(p),C=r(31669);class f extends o.BaseCommand{constructor(){super(...arguments),this.usev2=!1,this.assumeFreshProject=!1,this.yes=!1,this.private=!1,this.workspace=!1,this.install=!1}async execute(){if(l.xfs.existsSync(u.y1.join(this.context.cwd,i.G.fileName)))throw new h.UsageError("A package.json already exists in the specified directory");const e=await A.VK.find(this.context.cwd,this.context.plugins),t=this.install?!0===this.install?"latest":this.install:null;return null!==t?await this.executeProxy(e,t):await this.executeRegular(e)}async executeProxy(e,t){if(null!==e.get("yarnPath"))throw new h.UsageError(`Cannot use the --install flag when the current directory already uses yarnPath (from ${e.sources.get("yarnPath")})`);if(null!==e.projectCwd)throw new h.UsageError("Cannot use the --install flag when the current directory is already part of a project");l.xfs.existsSync(this.context.cwd)||await l.xfs.mkdirPromise(this.context.cwd,{recursive:!0});const r=u.y1.join(this.context.cwd,e.get("lockfileFilename"));l.xfs.existsSync(r)||await l.xfs.writeFilePromise(r,"");const A=await this.cli.run(["set","version",t]);if(0!==A)return A;this.context.stdout.write("\n");const n=["--assume-fresh-project"];return this.private&&n.push("-p"),this.workspace&&n.push("-w"),this.yes&&n.push("-y"),await l.xfs.mktempPromise(async e=>{const{code:t}=await a.pipevp("yarn",["init",...n],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await c.makeScriptEnv({binFolder:e})});return t})}async executeRegular(e){let t=null;if(!this.assumeFreshProject)try{t=await s.I.find(e,this.context.cwd)}catch(e){t=null}l.xfs.existsSync(this.context.cwd)||await l.xfs.mkdirPromise(this.context.cwd,{recursive:!0});const r=new i.G,A=Object.fromEntries(e.get("initFields").entries());r.load(A),r.name=g.makeIdent(e.get("initScope"),u.y1.basename(this.context.cwd)),r.version=e.get("initVersion"),r.private=this.private||this.workspace,r.license=e.get("initLicense"),this.workspace&&(await l.xfs.mkdirPromise(u.y1.join(this.context.cwd,"packages"),{recursive:!0}),r.workspaceDefinitions=[{pattern:"packages/*"}]);const n={};r.exportTo(n),C.inspect.styles.name="cyan",this.context.stdout.write((0,C.inspect)(n,{depth:1/0,colors:!0,compact:!1})+"\n");const o=u.y1.join(this.context.cwd,i.G.fileName);await l.xfs.changeFilePromise(o,JSON.stringify(n,null,2)+"\n");const c=u.y1.join(this.context.cwd,"README.md");if(l.xfs.existsSync(c)||await l.xfs.writeFilePromise(c,`# ${g.stringifyIdent(r.name)}\n`),!t){const t=u.y1.join(this.context.cwd,u.QS.lockfile);await l.xfs.writeFilePromise(t,"");const r=["/.yarn/** linguist-vendored"].map(e=>e+"\n").join(""),A=u.y1.join(this.context.cwd,".gitattributes");l.xfs.existsSync(A)||await l.xfs.writeFilePromise(A,r);const n=["/.yarn/*","!/.yarn/releases","!/.yarn/plugins","!/.yarn/sdks","","# Swap the comments on the following lines if you don't wish to use zero-installs","# Documentation here: https://yarnpkg.com/features/zero-installs","!/.yarn/cache","#/.pnp.*"].map(e=>e+"\n").join(""),o=u.y1.join(this.context.cwd,".gitignore");l.xfs.existsSync(o)||await l.xfs.writeFilePromise(o,n);const i={"*":{endOfLine:"lf",insertFinalNewline:!0},"*.{js,json,.yml}":{charset:"utf-8",indentStyle:"space",indentSize:2}};d()(i,e.get("initEditorConfig"));let s="root = true\n";for(const[e,t]of Object.entries(i)){s+=`\n[${e}]\n`;for(const[e,r]of Object.entries(t)){s+=`${e.replace(/[A-Z]/g,e=>"_"+e.toLowerCase())} = ${r}\n`}}const c=u.y1.join(this.context.cwd,".editorconfig");l.xfs.existsSync(c)||await l.xfs.writeFilePromise(c,s),await a.execvp("git",["init"],{cwd:this.context.cwd})}}}f.usage=h.Command.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]}),(0,n.gn)([h.Command.Boolean("-2",{hidden:!0})],f.prototype,"usev2",void 0),(0,n.gn)([h.Command.Boolean("--assume-fresh-project",{hidden:!0})],f.prototype,"assumeFreshProject",void 0),(0,n.gn)([h.Command.Boolean("-y,--yes",{hidden:!0})],f.prototype,"yes",void 0),(0,n.gn)([h.Command.Boolean("-p,--private",{description:"Initialize a private package"})],f.prototype,"private",void 0),(0,n.gn)([h.Command.Boolean("-w,--workspace",{description:"Initialize a private workspace root with a `packages/` directory"})],f.prototype,"workspace",void 0),(0,n.gn)([h.Command.String("-i,--install",{tolerateBoolean:!0,description:"Initialize a package with a specific bundle that will be locked in the project"})],f.prototype,"install",void 0),(0,n.gn)([h.Command.Path("init")],f.prototype,"execute",null);const I={configuration:{initLicense:{description:"License used when creating packages via the init command",type:A.a2.STRING,default:null},initScope:{description:"Scope used when creating packages via the init command",type:A.a2.STRING,default:null},initVersion:{description:"Version used when creating packages via the init command",type:A.a2.STRING,default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:A.a2.MAP,valueDefinition:{description:"",type:A.a2.ANY}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:A.a2.MAP,valueDefinition:{description:"",type:A.a2.ANY}}},commands:[f]}},92994:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var A=r(54143),n=r(46009),o=r(75448),i=r(10489);var s=r(46611),a=r(32485),c=r(73632);const g={fetchers:[class{supports(e,t){return!!e.reference.startsWith("link:")}getLocalPath(e,t){const{parentLocator:r,path:o}=A.parseFileStyleRange(e.reference,{protocol:"link:"});if(n.y1.isAbsolute(o))return o;const i=t.fetcher.getLocalPath(r,t);return null===i?null:n.y1.resolve(i,o)}async fetch(e,t){const{parentLocator:r,path:s}=A.parseFileStyleRange(e.reference,{protocol:"link:"}),a=n.y1.isAbsolute(s)?{packageFs:new o.M(n.LZ.root),prefixPath:n.LZ.dot,localPath:n.LZ.root}:await t.fetcher.fetch(r,t),c=a.localPath?{packageFs:new o.M(n.LZ.root),prefixPath:n.y1.relative(n.LZ.root,a.localPath)}:a;a!==c&&a.releaseFs&&a.releaseFs();const g=c.packageFs,l=n.y1.join(c.prefixPath,s);return a.localPath?{packageFs:new o.M(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot,discardFromLookup:!0,localPath:l}:{packageFs:new i.n(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot,discardFromLookup:!0}}},class{supports(e,t){return!!e.reference.startsWith("portal:")}getLocalPath(e,t){const{parentLocator:r,path:o}=A.parseFileStyleRange(e.reference,{protocol:"portal:"});if(n.y1.isAbsolute(o))return o;const i=t.fetcher.getLocalPath(r,t);return null===i?null:n.y1.resolve(i,o)}async fetch(e,t){const{parentLocator:r,path:s}=A.parseFileStyleRange(e.reference,{protocol:"portal:"}),a=n.y1.isAbsolute(s)?{packageFs:new o.M(n.LZ.root),prefixPath:n.LZ.dot,localPath:n.LZ.root}:await t.fetcher.fetch(r,t),c=a.localPath?{packageFs:new o.M(n.LZ.root),prefixPath:n.y1.relative(n.LZ.root,a.localPath)}:a;a!==c&&a.releaseFs&&a.releaseFs();const g=c.packageFs,l=n.y1.join(c.prefixPath,s);return a.localPath?{packageFs:new o.M(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot,localPath:l}:{packageFs:new i.n(l,{baseFs:g}),releaseFs:c.releaseFs,prefixPath:n.LZ.dot}}}],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("link:")}supportsLocator(e,t){return!!e.reference.startsWith("link:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return A.bindDescriptor(e,{locator:A.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const o=e.range.slice("link:".length);return[A.makeLocator(e,"link:"+n.cS.toPortablePath(o))]}async getSatisfying(e,t,r){return null}async resolve(e,t){return{...e,version:"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:a.Un.SOFT,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}},class{supportsDescriptor(e,t){return!!e.range.startsWith("portal:")}supportsLocator(e,t){return!!e.reference.startsWith("portal:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return A.bindDescriptor(e,{locator:A.stringifyLocator(t)})}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const o=e.range.slice("portal:".length);return[A.makeLocator(e,"portal:"+n.cS.toPortablePath(o))]}async getSatisfying(e,t,r){return null}async resolve(e,t){if(!t.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const r=await t.fetchOptions.fetcher.fetch(e,t.fetchOptions),A=await c.releaseAfterUseAsync(async()=>await s.G.find(r.prefixPath,{baseFs:r.packageFs}),r.releaseFs);return{...e,version:A.version||"0.0.0",languageName:t.project.configuration.get("defaultLanguageName"),linkType:a.Un.SOFT,dependencies:new Map([...A.dependencies,...A.devDependencies]),peerDependencies:A.peerDependencies,dependenciesMeta:A.dependenciesMeta,peerDependenciesMeta:A.peerDependenciesMeta,bin:A.bin}}}]}},8375:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ne,getPnpPath:()=>Ae});var A,n=r(39922),o=r(46009),i=r(54143);!function(e){e[e.YES=0]="YES",e[e.NO=1]="NO",e[e.DEPENDS=2]="DEPENDS"}(A||(A={}));const s=(e,t)=>`${e}@${t}`,a=(e,t)=>{const r=t.indexOf("#"),A=r>=0?t.substring(r+1):t;return s(e,A)};var c;!function(e){e[e.NONE=-1]="NONE",e[e.PERF=0]="PERF",e[e.CHECK=1]="CHECK",e[e.REASONS=2]="REASONS",e[e.INTENSIVE_CHECK=9]="INTENSIVE_CHECK"}(c||(c={}));const g=(e,t)=>{if(t.decoupled)return t;const{name:r,references:A,ident:n,locator:o,dependencies:i,originalDependencies:s,hoistedDependencies:a,peerNames:c,reasons:g,isHoistBorder:l}=t,u={name:r,references:new Set(A),ident:n,locator:o,dependencies:new Map(i),originalDependencies:new Map(s),hoistedDependencies:new Map(a),peerNames:new Set(c),reasons:new Map(g),decoupled:!0,isHoistBorder:l},h=u.dependencies.get(r);return h&&h.ident==u.ident&&u.dependencies.set(r,u),e.dependencies.set(u.name,u),u},l=e=>{const t=new Set,r=(A,n=new Set)=>{if(!n.has(A)){n.add(A);for(const o of A.peerNames)if(!e.peerNames.has(o)){const A=e.dependencies.get(o);A&&!t.has(A)&&r(A,n)}t.add(A)}};for(const t of e.dependencies.values())e.peerNames.has(t.name)||r(t);return t},u=(e,t,r,A,n=new Set)=>{const o=t[t.length-1];if(n.has(o))return;n.add(o);const i=((e,t)=>{const r=new Map([[e.name,[e.ident]]]);for(const t of e.dependencies.values())e.peerNames.has(t.name)||r.set(t.name,[t.ident]);const A=Array.from(t.keys());A.sort((e,r)=>{const A=t.get(e),n=t.get(r);return n.peerDependents.size!==A.peerDependents.size?n.peerDependents.size-A.peerDependents.size:n.dependents.size-A.dependents.size});for(const t of A){const A=t.substring(0,t.indexOf("@",1)),n=t.substring(A.length+1);if(!e.peerNames.has(A)){let e=r.get(A);e||(e=[],r.set(A,e)),e.indexOf(n)<0&&e.push(n)}}return r})(o,E(o)),s=new Map(Array.from(i.entries()).map(([e,t])=>[e,t[0]])),a=o===e?new Map:(e=>{const t=new Map,r=new Set,A=n=>{if(!r.has(n)){r.add(n);for(const r of n.hoistedDependencies.values())e.dependencies.has(r.name)||t.set(r.name,r);for(const e of n.dependencies.values())n.peerNames.has(e.name)||A(e)}};return A(e),t})(o);let c;do{p(e,t,r,a,s,i,A),c=!1;for(const[e,t]of i)t.length>1&&!o.dependencies.has(e)&&(s.delete(e),t.shift(),s.set(e,t[0]),c=!0)}while(c);for(const n of o.dependencies.values())o.peerNames.has(n.name)||r.has(n.locator)||(r.add(n.locator),u(e,[...t,n],r,A),r.delete(n.locator))},h=(e,t,r,n,o,i,{outputReason:s})=>{let a,c=null,g=new Set;s&&(a=""+Array.from(e).map(e=>B(e)).join("→"));const l=t[t.length-1],u=r.ident===l.ident,h=o.get(r.name);let p=h===r.ident&&!u;if(s&&!p&&h&&!u&&(c=`- filled by: ${B(i.get(r.name)[0])} at ${a}`),p){let e=!1;const A=n.get(r.name);if(e=!A||A.ident===r.ident,s&&!e&&(c=`- filled by: ${B(A.locator)} at ${a}`),e)for(let A=1;A=1;r--){const n=t[r];for(const o of A){if(n.peerNames.has(o)&&n.originalDependencies.has(o))continue;const i=n.dependencies.get(o);i&&(r===t.length-1?g.add(i):(g=null,e=!1,s&&(c=`- peer dependency ${B(i.locator)} from parent ${B(n.locator)} was not hoisted to ${a}`))),A.delete(o)}if(!e)break}p=e}return null!==g&&g.size>0?{isHoistable:A.DEPENDS,dependsOn:g,reason:c}:{isHoistable:p?A.YES:A.NO,reason:c}},p=(e,t,r,n,o,i,s)=>{const a=t[t.length-1],u=new Set,p=(t,C,I,E)=>{if(u.has(I))return;const m=[...C,I.locator],w=new Map,Q=new Map;for(const e of l(I)){let g=null;if(g||(g=h(r,[a,...t,I],e,n,o,i,{outputReason:s.debugLevel>=c.REASONS})),Q.set(e,g),g.isHoistable===A.DEPENDS)for(const t of g.dependsOn){const r=w.get(t.name)||new Set;r.add(e.name),w.set(t.name,r)}}const D=new Set,b=(e,t,r)=>{if(!D.has(e)){D.add(e),e.ident!==I.ident&&Q.set(e,{isHoistable:A.NO,reason:r});for(const A of w.get(e.name)||[])b(I.dependencies.get(A),t,r)}};let v;s.debugLevel>=c.REASONS&&(v=""+Array.from(r).map(e=>B(e)).join("→"));for(const[e,t]of Q)t.isHoistable===A.NO&&b(e,t,`- peer dependency ${B(e.locator)} from parent ${B(I.locator)} was not hoisted to ${v}`);for(const e of Q.keys())if(!D.has(e)){I.dependencies.delete(e.name),I.hoistedDependencies.set(e.name,e),I.reasons.delete(e.name);const t=a.dependencies.get(e.name);if(t)for(const r of e.references)t.references.add(r);else a.ident!==e.ident&&(a.dependencies.set(e.name,e),E.add(e))}if(s.check){const r=d(e);if(r)throw new Error(`${r}, after hoisting dependencies of ${[a,...t,I].map(e=>B(e.locator)).join("→")}:\n${y(e)}`)}const S=l(I);for(const e of S)if(D.has(e)&&m.indexOf(e.locator)<0){const r=Q.get(e);if(r.isHoistable!==A.YES&&I.reasons.set(e.name,r.reason),!e.isHoistBorder){u.add(I);const r=g(I,e);p([...t,I],[...C,I.locator],r,f),u.delete(I)}}};let C,f=new Set(l(a));do{C=f,f=new Set;for(const e of C){if(e.locator===a.locator||e.isHoistBorder)continue;const t=g(a,e);p([],Array.from(r),t,f)}}while(f.size>0)},d=e=>{const t=[],r=new Set,A=new Set,n=(e,o)=>{if(r.has(e))return;if(r.add(e),A.has(e))return;const i=new Map(o);for(const t of e.dependencies.values())e.peerNames.has(t.name)||i.set(t.name,t);for(const r of e.originalDependencies.values()){const n=i.get(r.name),s=()=>""+Array.from(A).concat([e]).map(e=>B(e.locator)).join("→");if(e.peerNames.has(r.name)){const e=o.get(r.name);e===n&&e&&e.ident===r.ident||t.push(`${s()} - broken peer promise: expected ${r.ident} but found ${e?e.ident:e}`)}else n?n.ident!==r.ident&&t.push(`${s()} - broken require promise for ${r.name}: expected ${r.ident}, but found: ${n.ident}`):t.push(`${s()} - broken require promise: no required dependency ${r.locator} found`)}A.add(e);for(const t of e.dependencies.values())e.peerNames.has(t.name)||n(t,i);A.delete(e)};return n(e,e.dependencies),t.join("\n")},C=(e,t)=>{const{identName:r,name:A,reference:n,peerNames:o}=e,i={name:A,references:new Set([n]),locator:s(r,n),ident:a(r,n),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(o),reasons:new Map,decoupled:!0,isHoistBorder:!0},c=new Map([[e,i]]),g=(e,r)=>{let A=c.get(e);const n=!!A;if(!A){const{name:n,identName:o,reference:i,peerNames:g}=e,l=t.hoistingLimits.get(r.locator);A={name:n,references:new Set([i]),locator:s(o,i),ident:a(o,i),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(g),reasons:new Map,decoupled:!0,isHoistBorder:!!l&&l.has(n)},c.set(e,A)}if(r.dependencies.set(e.name,A),r.originalDependencies.set(e.name,A),n){const e=new Set,t=r=>{if(!e.has(r)){e.add(r),r.decoupled=!1;for(const e of r.dependencies.values())r.peerNames.has(e.name)||t(e)}};t(A)}else for(const t of e.dependencies)g(t,A)};for(const t of e.dependencies)g(t,i);return i},f=e=>e.substring(0,e.indexOf("@",1)),I=e=>{const t={name:e.name,identName:f(e.locator),references:new Set(e.references),dependencies:new Set},r=new Set([e]),A=(e,t,n)=>{const o=r.has(e);let i;if(t===e)i=n;else{const{name:t,references:r,locator:A}=e;i={name:t,identName:f(A),references:r,dependencies:new Set}}if(n.dependencies.add(i),!o){r.add(e);for(const t of e.dependencies.values())e.peerNames.has(t.name)||A(t,e,i);r.delete(e)}};for(const r of e.dependencies.values())A(r,e,t);return t},E=e=>{const t=new Map,r=new Set([e]),A=e=>{const r=(e=>`${e.name}@${e.ident}`)(e);let A=t.get(r);return A||(A={dependents:new Set,peerDependents:new Set},t.set(r,A)),A},n=(e,t)=>{const o=!!r.has(t);if(A(t).dependents.add(e.ident),!o){r.add(t);for(const e of t.dependencies.values())if(t.peerNames.has(e.name)){A(e).peerDependents.add(t.ident)}else n(t,e)}};for(const t of e.dependencies.values())e.peerNames.has(t.name)||n(e,t);return t},B=e=>{const t=e.indexOf("@",1),r=e.substring(0,t),A=e.substring(t+1);if("workspace:."===A)return".";if(A){const e=(A.indexOf("#")>0?A.split("#")[1]:A).replace("npm:","");return A.startsWith("virtual")?`v:${r}@${e}`:`${r}@${e}`}return""+r},y=e=>{let t=0;const r=(e,A,n="")=>{if(t>5e4||A.has(e))return"";t++;const o=Array.from(e.dependencies.values());let i="";A.add(e);for(let t=0;t":"")+(c!==s.name?`a:${s.name}:`:"")+B(s.locator)+(a?" "+a:"")}\n`,i+=r(s,A,`${n}${t5e4?"\nTree is too large, part of the tree has been dunped\n":"")};var m,w;!function(e){e.HARD="HARD",e.SOFT="SOFT"}(m||(m={})),function(e){e.WORKSPACES="workspaces",e.DEPENDENCIES="dependencies",e.NONE="none"}(w||(w={}));const Q=(e,t)=>{const{packageTree:r,hoistingLimits:A}=b(e,t),n=((e,t={})=>{const r=t.debugLevel||Number(process.env.NM_DEBUG_LEVEL||c.NONE),A={check:t.check||r>=c.INTENSIVE_CHECK,debugLevel:r,hoistingLimits:t.hoistingLimits||new Map};A.debugLevel>=c.PERF&&console.time("hoist");const n=C(e,A);if(u(n,[n],new Set([n.locator]),A),A.debugLevel>=c.PERF&&console.timeEnd("hoist"),A.debugLevel>=c.CHECK){const e=d(n);if(e)throw new Error(`${e}, after hoisting finished:\n${y(n)}`)}return A.debugLevel>=c.REASONS&&console.log(y(n)),I(n)})(r,{hoistingLimits:A});return v(e,n,t)},D=e=>`${e.name}@${e.reference}`;const b=(e,t)=>{const r=e.getDependencyTreeRoots(),A=new Map,n=new Map,s=e.getPackageInformation(e.topLevel);if(null===s)throw new Error("Assertion failed: Expected the top-level package to have been registered");const a=e.findPackageLocator(s.packageLocation);if(null===a)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");const c=o.cS.toPortablePath(s.packageLocation),g=D(a);if(t.project){const e={children:new Map},r=t.project.cwd.split(o.y1.sep);for(const[A,n]of t.project.workspacesByCwd){const t=A.split(o.y1.sep).slice(r.length);let s=e;for(const e of t){let t=s.children.get(e);t||(t={children:new Map},s.children.set(e,t)),s=t}s.workspaceLocator={name:i.stringifyIdent(n.anchoredLocator),reference:n.anchoredLocator.reference}}const A=(e,t)=>{if(e.workspaceLocator){const r=D(t);let A=n.get(r);A||(A=new Set,n.set(r,A)),A.add(e.workspaceLocator)}for(const r of e.children.values())A(r,e.workspaceLocator||t)};for(const t of e.children.values())A(t,e.workspaceLocator)}else for(const e of r)if(e.name!==a.name||e.reference!==a.reference){let t=n.get(g);t||(t=new Set,n.set(g,t)),t.add(e)}const l={name:a.name,identName:a.name,reference:a.reference,peerNames:s.packagePeers,dependencies:new Set},u=new Map,h=(r,s,g,p,d,C,f)=>{var I,E;const B=((e,t)=>`${D(t)}:${e}`)(r,g);let y=u.get(B);const m=!!y;if(m||g.name!==a.name||g.reference!==a.reference||(y=l,u.set(B,l)),y||(y={name:r,identName:g.name,reference:g.reference,dependencies:new Set,peerNames:s.packagePeers},u.set(B,y)),f){const e=D({name:p.identName,reference:p.reference}),t=A.get(e)||new Set;A.set(e,t),t.add(y.name)}const Q=new Map(s.packageDependencies);if(t.project){const e=t.project.workspacesByCwd.get(o.cS.toPortablePath(s.packageLocation.slice(0,-1)));if(e){const t=new Set([...Array.from(e.manifest.peerDependencies.values(),e=>i.stringifyIdent(e)),...Array.from(e.manifest.peerDependenciesMeta.keys())]);for(const e of t)Q.has(e)||(Q.set(e,d.get(e)||null),y.peerNames.add(e))}}const b=D(g),v=n.get(b);if(v)for(const e of v)Q.set(e.name+"$wsroot$",e.reference);p.dependencies.add(y);const S=t.pnpifyFs||!function(e){let t=i.parseDescriptor(e);return i.isVirtualDescriptor(t)&&(t=i.devirtualizeDescriptor(t)),t.range.startsWith("portal:")}(B);if(!m&&S)for(const[r,A]of Q)if(null!==A){const n=e.getLocator(r,A),i=e.getLocator(r.replace("$wsroot$",""),A),s=e.getPackageInformation(i);if(null===s)throw new Error("Assertion failed: Expected the package to have been registered");const a=null===(I=t.hoistingLimitsByCwd)||void 0===I?void 0:I.get(C),g=o.y1.relative(c,o.cS.toPortablePath(s.packageLocation))||o.LZ.dot,l=null===(E=t.hoistingLimitsByCwd)||void 0===E?void 0:E.get(g),u=a===w.DEPENDENCIES||l===w.DEPENDENCIES||l===w.WORKSPACES;h(r,s,n,y,Q,g,u)}};return h(a.name,s,a,l,s.packageDependencies,o.LZ.dot,!1),{packageTree:l,hoistingLimits:A}};const v=(e,t,r)=>{const A=new Map,n=(t,A)=>{const{linkType:n,target:i}=function(e,t,r){const A=t.getLocator(e.name.replace("$wsroot$",""),e.reference),n=t.getPackageInformation(A);if(null===n)throw new Error("Assertion failed: Expected the package to be registered");let i,s;if(r.pnpifyFs)s=o.cS.toPortablePath(n.packageLocation),i=m.SOFT;else{const r=t.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?t.resolveVirtual(n.packageLocation):n.packageLocation;s=o.cS.toPortablePath(r||n.packageLocation),i=n.linkType}return{linkType:i,target:s}}(t,e,r);return{locator:D(t),target:i,linkType:n,aliases:A}},s=e=>{const[t,r]=e.split("/");return r?{scope:(0,o.Zu)(t),name:(0,o.Zu)(r)}:{scope:null,name:(0,o.Zu)(t)}},a=new Set,c=(e,t)=>{if(!a.has(e)){a.add(e);for(const r of e.dependencies){if(r===e||e.identName.endsWith("$wsroot$")&&r.identName===e.identName.replace("$wsroot$",""))continue;const a=Array.from(r.references).sort(),g={name:r.identName,reference:a[0]},{name:l,scope:u}=s(r.name),h=u?[u,l]:[l],p=o.y1.join(t,"node_modules"),d=o.y1.join(p,...h),C=n(g,a.slice(1));if(!r.name.endsWith("$wsroot$")){const e=A.get(d);if(e){if(e.dirList)throw new Error(`Assertion failed: ${d} cannot merge dir node with leaf node`);{const t=i.parseLocator(e.locator),r=i.parseLocator(C.locator);if(e.linkType!==C.linkType)throw new Error(`Assertion failed: ${d} cannot merge nodes with different link types`);if(t.identHash!==r.identHash)throw new Error(`Assertion failed: ${d} cannot merge nodes with different idents ${i.stringifyLocator(t)} and ${i.stringifyLocator(r)}`);C.aliases=[...C.aliases,...e.aliases,i.parseLocator(e.locator).reference]}}A.set(d,C);const t=d.split("/"),r=t.indexOf("node_modules");let n=t.length-1;for(;r>=0&&n>r;){const e=o.cS.toPortablePath(t.slice(0,n).join(o.y1.sep)),r=(0,o.Zu)(t[n]),i=A.get(e);if(i){if(i.dirList){if(i.dirList.has(r))break;i.dirList.add(r)}}else A.set(e,{dirList:new Set([r])});n--}}c(r,C.linkType===m.SOFT?C.target:d)}}},g=n({name:t.name,reference:Array.from(t.references)[0]},[]),l=g.target;return A.set(l,g),c(t,l),A};var S=r(92659),k=r(32485),N=r(73632),F=r(46611),K=r(35691),M=r(43896),R=r(17674),x=r(53660),L=r(65281),P=r(11640),O=r(83228),U=r(58069),T=r.n(U),j=r(40822),Y=r(35747),G=r.n(Y);const H="node_modules";class J{constructor(e){this.opts=e,this.localStore=new Map,this.customData={store:new Map}}getCustomDataKey(){return JSON.stringify({name:"NodeModulesInstaller",version:1})}attachCustomData(e){this.customData=e}async installPackage(e,t){var r;const A=o.y1.resolve(t.packageFs.getRealPath(),t.prefixPath);let n=this.customData.store.get(e.locatorHash);if(void 0===n&&(n=await async function(e,t){var r;const A=null!==(r=await F.G.tryFind(t.prefixPath,{baseFs:t.packageFs}))&&void 0!==r?r:new F.G,n=new Set(["preinstall","install","postinstall"]);for(const e of A.scripts.keys())n.has(e)||A.scripts.delete(e);return{manifest:{bin:A.bin,os:A.os,cpu:A.cpu,scripts:A.scripts},misc:{extractHint:O.jsInstallUtils.getExtractHint(t),hasBindingGyp:O.jsInstallUtils.hasBindingGyp(t)}}}(0,t),e.linkType===k.Un.HARD&&this.customData.store.set(e.locatorHash,n)),!O.jsInstallUtils.checkAndReportManifestCompatibility(e,n,"link",{configuration:this.opts.project.configuration,report:this.opts.report}))return{packageLocation:null,buildDirective:null};const s=new Map,a=new Set;if(s.has(i.stringifyIdent(e))||s.set(i.stringifyIdent(e),e.reference),i.isVirtualLocator(e))for(const t of e.peerDependencies.values())s.set(i.stringifyIdent(t),null),a.add(i.stringifyIdent(t));const c={packageLocation:o.cS.fromPortablePath(A)+"/",packageDependencies:s,packagePeers:a,linkType:e.linkType,discardFromLookup:null!==(r=t.discardFromLookup)&&void 0!==r&&r};return this.localStore.set(e.locatorHash,{pkg:e,customPackageData:n,dependencyMeta:this.opts.project.getDependencyMeta(e,e.version),pnpNode:c}),{packageLocation:A,buildDirective:null}}async attachInternalDependencies(e,t){const r=this.localStore.get(e.locatorHash);if(void 0===r)throw new Error("Assertion failed: Expected information object to have been registered");for(const[e,A]of t){const t=i.areIdentsEqual(e,A)?A.reference:[i.requirableIdent(A),A.reference];r.pnpNode.packageDependencies.set(i.requirableIdent(e),t)}}async attachExternalDependents(e,t){throw new Error("External dependencies haven't been implemented for the node-modules linker")}async finalizeInstall(){if("node-modules"!==this.opts.project.configuration.get("nodeLinker"))return;const e=new R.p({baseFs:new x.A({libzip:await(0,L.getLibzipPromise)(),maxOpenFiles:80,readOnlyArchives:!0})});let t=await q(this.opts.project);if(null===t){const e=this.opts.project.configuration.get("bstatePath");await M.xfs.existsPromise(e)&&await M.xfs.unlinkPromise(e),t={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map}}const r=new Map(this.opts.project.workspaces.map(e=>{var t,r;let A=this.opts.project.configuration.get("nmHoistingLimits");try{A=N.validateEnum(w,null!==(r=null===(t=e.manifest.installConfig)||void 0===t?void 0:t.hoistingLimits)&&void 0!==r?r:A)}catch(t){const r=i.prettyWorkspace(this.opts.project.configuration,e);this.opts.report.reportWarning(S.b.INVALID_MANIFEST,`${r}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(w).join(", ")}, using default: "${A}"`)}return[e.relativeCwd,A]})),A=(e=>{const t=new Map;for(const[r,A]of e.entries())if(!A.dirList){let e=t.get(A.locator);e||(e={target:A.target,linkType:A.linkType,locations:[],aliases:A.aliases},t.set(A.locator,e)),e.locations.push(r)}for(const e of t.values())e.locations=e.locations.sort((e,t)=>{const r=e.split(o.y1.delimiter).length,A=t.split(o.y1.delimiter).length;return r!==A?A-r:t.localeCompare(e)});return t})(Q({VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(e,t)=>Array.isArray(t)?{name:t[0],reference:t[1]}:{name:e,reference:t},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(e=>{const t=e.anchoredLocator;return{name:i.stringifyIdent(e.locator),reference:t.reference}}),getPackageInformation:e=>{const t=null===e.reference?this.opts.project.topLevelWorkspace.anchoredLocator:i.makeLocator(i.parseIdent(e.name),e.reference),r=this.localStore.get(t.locatorHash);if(void 0===r)throw new Error("Assertion failed: Expected the package reference to have been registered");return r.pnpNode},findPackageLocator:e=>{const t=this.opts.project.tryWorkspaceByCwd(o.cS.toPortablePath(e));if(null!==t){const e=t.anchoredLocator;return{name:i.stringifyIdent(e),reference:e.reference}}throw new Error("Assertion failed: Unimplemented")},resolveToUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveRequest:()=>{throw new Error("Assertion failed: Unimplemented")},resolveVirtual:e=>o.cS.fromPortablePath(R.p.resolveVirtual(o.cS.toPortablePath(e)))},{pnpifyFs:!1,hoistingLimitsByCwd:r,project:this.opts.project}));await async function(e,t,{baseFs:r,project:A,report:n,loadManifest:s}){const a=o.y1.join(A.cwd,H),{locationTree:c,binSymlinks:g}=function(e,t){const r=new Map([...e]),A=new Map([...t]);for(const[t,r]of e){const e=o.y1.join(t,H);if(!M.xfs.existsSync(e)){r.children.delete(H);for(const t of A.keys())null!==o.y1.contains(e,t)&&A.delete(t)}}return{locationTree:r,binSymlinks:A}}(e.locationTree,e.binSymlinks),l=X(t,{skipPrefix:A.cwd}),u=[],h=async({srcDir:e,dstDir:t,linkType:A})=>{const n=(async()=>{try{A===k.Un.SOFT?(await M.xfs.mkdirPromise(o.y1.dirname(t),{recursive:!0}),await V(o.y1.resolve(e),t)):await _(t,e,{baseFs:r})}catch(r){throw r.message=`While persisting ${e} -> ${t} ${r.message}`,r}finally{I.tick()}})().then(()=>u.splice(u.indexOf(n),1));u.push(n),u.length>4&&await Promise.race(u)},p=async(e,t,r)=>{const A=(async()=>{const A=async(e,t,r)=>{try{r&&r.innerLoop||await M.xfs.mkdirPromise(t,{recursive:!0});const n=await M.xfs.readdirPromise(e,{withFileTypes:!0});for(const i of n){if(!(r&&r.innerLoop||".bin"!==i.name))continue;const n=o.y1.join(e,i.name),s=o.y1.join(t,i.name);i.isDirectory()?(i.name!==H||r&&r.innerLoop)&&(await M.xfs.mkdirPromise(s,{recursive:!0}),await A(n,s,{innerLoop:!0})):await M.xfs.copyFilePromise(n,s,G().constants.COPYFILE_FICLONE)}}catch(A){throw r&&r.innerLoop||(A.message=`While cloning ${e} -> ${t} ${A.message}`),A}finally{r&&r.innerLoop||I.tick()}};await A(e,t,r)})().then(()=>u.splice(u.indexOf(A),1));u.push(A),u.length>4&&await Promise.race(u)},d=async(e,t,r)=>{if(r)for(const[A,n]of t.children){const t=r.children.get(A);await d(o.y1.join(e,A),n,t)}else t.children.has(H)&&await z(o.y1.join(e,H),{contentsOnly:!1}),await z(e,{contentsOnly:e===a})};for(const[e,t]of c){const r=l.get(e);for(const[A,n]of t.children){if("."===A)continue;const t=r?r.children.get(A):r;await d(o.y1.join(e,A),n,t)}}const C=async(e,t,r)=>{if(r){$(t.locator,r.locator)||await z(e,{contentsOnly:t.linkType===k.Un.HARD});for(const[A,n]of t.children){const t=r.children.get(A);await C(o.y1.join(e,A),n,t)}}else t.children.has(H)&&await z(o.y1.join(e,H),{contentsOnly:!0}),await z(e,{contentsOnly:t.linkType===k.Un.HARD})};for(const[e,t]of l){const r=c.get(e);for(const[A,n]of t.children){if("."===A)continue;const t=r?r.children.get(A):r;await C(o.y1.join(e,A),n,t)}}const f=[];for(const[r,{locations:n}]of e.locatorMap.entries())for(const e of n){const{locationRoot:n,segments:i}=W(e,{skipPrefix:A.cwd});let s=l.get(n),a=n;if(s){for(const e of i)if(a=o.y1.join(a,e),s=s.children.get(e),!s)break;if(s&&!$(s.locator,r)){const e=t.get(s.locator),r=e.target,A=a,n=e.linkType;r!==A&&f.push({srcDir:r,dstDir:A,linkType:n})}}}for(const[e,{locations:r}]of t.entries())for(const n of r){const{locationRoot:r,segments:i}=W(n,{skipPrefix:A.cwd});let s=c.get(r),a=l.get(r),g=r;const u=t.get(e),h=u.target,p=n;if(h===p)continue;const d=u.linkType;for(const e of i)a=a.children.get(e);if(s){for(const e of i)if(g=o.y1.join(g,e),s=s.children.get(e),!s){f.push({srcDir:h,dstDir:p,linkType:d});break}}else f.push({srcDir:h,dstDir:p,linkType:d})}const I=K.yG.progressViaCounter(f.length),E=n.reportProgress(I);try{const e=new Map;for(const t of f)t.linkType!==k.Un.SOFT&&e.has(t.srcDir)||(e.set(t.srcDir,t.dstDir),await h({...t}));await Promise.all(u),u.length=0;for(const t of f){const r=e.get(t.srcDir);t.linkType!==k.Un.SOFT&&t.dstDir!==r&&await p(r,t.dstDir)}await Promise.all(u),await M.xfs.mkdirPromise(a,{recursive:!0});const r=await async function(e,t,r,{loadManifest:A}){const n=new Map;for(const[t,{locations:r}]of e){const e=Z(t)?null:await A(t,r[0]),i=new Map;if(e)for(const[t,A]of e.bin){const e=o.y1.join(r[0],A);""!==A&&M.xfs.existsSync(e)&&i.set(t,A)}n.set(t,i)}const i=new Map,s=(e,t,A)=>{const a=new Map,c=o.y1.contains(r,e);if(A.locator&&null!==c){const t=n.get(A.locator);for(const[r,A]of t){const t=o.y1.join(e,o.cS.toPortablePath(A));a.set((0,o.Zu)(r),t)}for(const[t,r]of A.children){const A=o.y1.join(e,t),n=s(A,A,r);n.size>0&&i.set(e,new Map([...i.get(e)||new Map,...n]))}}else for(const[r,n]of A.children){const A=s(o.y1.join(e,r),t,n);for(const[e,t]of A)a.set(e,t)}return a};for(const[e,r]of t){const t=s(e,e,r);t.size>0&&i.set(e,new Map([...i.get(e)||new Map,...t]))}return i}(t,l,A.cwd,{loadManifest:s});await async function(e,t){for(const r of e.keys())if(!t.has(r)){const e=o.y1.join(r,H,".bin");await M.xfs.removePromise(e)}for(const[r,A]of t){const t=o.y1.join(r,H,".bin"),n=e.get(r)||new Map;await M.xfs.mkdirPromise(t,{recursive:!0});for(const e of n.keys())A.has(e)||(await M.xfs.removePromise(o.y1.join(t,e)),"win32"===process.platform&&await M.xfs.removePromise(o.y1.join(t,(0,o.Zu)(e+".cmd"))));for(const[e,r]of A){const A=n.get(e),i=o.y1.join(t,e);A!==r&&("win32"===process.platform?await T()(o.cS.fromPortablePath(r),o.cS.fromPortablePath(i),{createPwshFile:!1}):(await M.xfs.removePromise(i),await V(r,i),await M.xfs.chmodPromise(r,493)))}}}(g,r),await async function(e,t,r){let A="";A+="# Warning: This file is automatically generated. Removing it is fine, but will\n",A+="# cause your node_modules installation to become invalidated.\n",A+="\n",A+="__metadata:\n",A+=" version: 1\n";const n=Array.from(t.keys()).sort(),s=i.stringifyLocator(e.topLevelWorkspace.anchoredLocator);for(const i of n){const n=t.get(i);A+="\n",A+=JSON.stringify(i)+":\n",A+=" locations:\n";for(const t of n.locations){const r=o.y1.contains(e.cwd,t);if(null===r)throw new Error(`Assertion failed: Expected the path to be within the project (${t})`);A+=` - ${JSON.stringify(r)}\n`}if(n.aliases.length>0){A+=" aliases:\n";for(const e of n.aliases)A+=` - ${JSON.stringify(e)}\n`}if(i===s&&r.size>0){A+=" bin:\n";for(const[t,n]of r){const r=o.y1.contains(e.cwd,t);if(null===r)throw new Error(`Assertion failed: Expected the path to be within the project (${t})`);A+=` ${JSON.stringify(r)}:\n`;for(const[e,r]of n){const n=o.y1.relative(o.y1.join(t,H),r);A+=` ${JSON.stringify(e)}: ${JSON.stringify(n)}\n`}}}}const a=e.cwd,c=o.y1.join(a,H,".yarn-state.yml");await M.xfs.changeFilePromise(c,A,{automaticNewlines:!0})}(A,t,r)}finally{E.stop()}}(t,A,{baseFs:e,project:this.opts.project,report:this.opts.report,loadManifest:async e=>{const t=i.parseLocator(e),r=this.localStore.get(t.locatorHash);if(void 0===r)throw new Error("Assertion failed: Expected the slot to exist");return r.customPackageData.manifest}});const n=[];for(const[e,t]of A.entries()){if(Z(e))continue;const r=i.parseLocator(e),A=this.localStore.get(r.locatorHash);if(void 0===A)throw new Error("Assertion failed: Expected the slot to exist");const o=O.jsInstallUtils.extractBuildScripts(A.pkg,A.customPackageData,A.dependencyMeta,{configuration:this.opts.project.configuration,report:this.opts.report});0!==o.length&&n.push({buildLocations:t.locations,locatorHash:r.locatorHash,buildDirective:o})}return{customData:this.customData,records:n}}}async function q(e,{unrollAliases:t=!1}={}){const r=e.cwd,A=o.y1.join(r,H,".yarn-state.yml");if(!M.xfs.existsSync(A))return null;const n=(0,P.parseSyml)(await M.xfs.readFilePromise(A,"utf8"));if(n.__metadata.version>1)return null;const s=new Map,a=new Map;delete n.__metadata;for(const[e,A]of Object.entries(n)){const n=A.locations.map(e=>o.y1.join(r,e)),c=A.bin;if(c)for(const[e,t]of Object.entries(c)){const A=o.y1.join(r,o.cS.toPortablePath(e)),n=N.getMapWithDefault(a,A);for(const[e,r]of Object.entries(t))n.set((0,o.Zu)(e),o.cS.toPortablePath([A,H,r].join(o.y1.delimiter)))}if(s.set(e,{target:o.LZ.dot,linkType:k.Un.HARD,locations:n,aliases:A.aliases||[]}),t&&A.aliases)for(const t of A.aliases){const{scope:r,name:A}=i.parseLocator(e),a=i.makeLocator(i.makeIdent(r,A),t),c=i.stringifyLocator(a);s.set(c,{target:o.LZ.dot,linkType:k.Un.HARD,locations:n,aliases:[]})}}return{locatorMap:s,binSymlinks:a,locationTree:X(s,{skipPrefix:e.cwd})}}const z=async(e,t)=>{if(e.split(o.y1.sep).indexOf(H)<0)throw new Error("Assertion failed: trying to remove dir that doesn't contain node_modules: "+e);try{if(!t.innerLoop){if((await M.xfs.lstatPromise(e)).isSymbolicLink())return void await M.xfs.unlinkPromise(e)}const r=await M.xfs.readdirPromise(e,{withFileTypes:!0});for(const A of r){const r=o.y1.join(e,(0,o.Zu)(A.name));A.isDirectory()?(A.name!==H||t&&t.innerLoop)&&await z(r,{innerLoop:!0,contentsOnly:!1}):await M.xfs.unlinkPromise(r)}t.contentsOnly||await M.xfs.rmdirPromise(e)}catch(e){if("ENOENT"!==e.code&&"ENOTEMPTY"!==e.code)throw e}},W=(e,{skipPrefix:t})=>{const r=o.y1.contains(t,e);if(null===r)throw new Error(`Assertion failed: Cannot process a path that isn't part of the requested prefix (${e} isn't within ${t})`);const A=r.split(o.y1.sep).filter(e=>""!==e),n=A.indexOf(H),i=A.slice(0,n).join(o.y1.sep);return{locationRoot:o.y1.join(t,i),segments:A.slice(n)}},X=(e,{skipPrefix:t})=>{const r=new Map;if(null===e)return r;const A=()=>({children:new Map,linkType:k.Un.HARD});for(const[n,i]of e.entries()){if(i.linkType===k.Un.SOFT){if(null!==o.y1.contains(t,i.target)){const e=N.getFactoryWithDefault(r,i.target,A);e.locator=n,e.linkType=i.linkType}}for(const e of i.locations){const{locationRoot:o,segments:s}=W(e,{skipPrefix:t});let a=N.getFactoryWithDefault(r,o,A);for(let e=0;e{let r;try{"win32"===process.platform&&(r=M.xfs.lstatSync(e))}catch(e){}"win32"!=process.platform||r&&!r.isDirectory()?M.xfs.symlinkPromise(o.y1.relative(o.y1.dirname(t),e),t):M.xfs.symlinkPromise(e,t,"junction")},_=async(e,t,{baseFs:r,innerLoop:A})=>{await M.xfs.mkdirPromise(e,{recursive:!0});const n=await r.readdirPromise(t,{withFileTypes:!0}),i=async(e,t,A)=>{if(A.isFile()){const A=await r.lstatPromise(t);await r.copyFilePromise(t,e);const n=511&A.mode;420!==n&&await M.xfs.chmodPromise(e,n)}else{if(!A.isSymbolicLink())throw new Error(`Unsupported file type (file: ${t}, mode: 0o${await M.xfs.statSync(t).mode.toString(8).padStart(6,"0")})`);{const A=await r.readlinkPromise(t);await V(o.y1.resolve(o.y1.dirname(e),A),e)}}};for(const s of n){const n=o.y1.join(t,(0,o.Zu)(s.name)),a=o.y1.join(e,(0,o.Zu)(s.name));s.isDirectory()?(s.name!==H||A)&&await _(a,n,{baseFs:r,innerLoop:!0}):await i(a,n,s)}};function Z(e){let t=i.parseDescriptor(e);return i.isVirtualDescriptor(t)&&(t=i.devirtualizeDescriptor(t)),t.range.startsWith("link:")}const $=(e,t)=>{if(!e||!t)return e===t;let r=i.parseLocator(e);i.isVirtualLocator(r)&&(r=i.devirtualizeLocator(r));let A=i.parseLocator(t);return i.isVirtualLocator(A)&&(A=i.devirtualizeLocator(A)),i.areLocatorsEqual(r,A)};var ee=r(34432);class te extends O.PnpLinker{constructor(){super(...arguments),this.mode="loose"}makeInstaller(e){return new re(e)}}class re extends O.PnpInstaller{constructor(){super(...arguments),this.mode="loose"}async finalizeInstallWithPnp(e){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;const t=new R.p({baseFs:new x.A({libzip:await(0,L.getLibzipPromise)(),maxOpenFiles:80,readOnlyArchives:!0})}),r=(0,ee.oC)(e,this.opts.project.cwd,t),A=Q(r,{pnpifyFs:!1,project:this.opts.project}),n=new Map;e.fallbackPool=n;const s=(e,t)=>{const r=i.parseLocator(t.locator),A=i.stringifyIdent(r);A===e?n.set(e,r.reference):n.set(e,[A,r.reference])},a=o.y1.join(this.opts.project.cwd,o.QS.nodeModules),c=A.get(a);if(void 0===c)throw new Error("Assertion failed: Expected a root junction point");if("target"in c)throw new Error("Assertion failed: Expected the root junction point to be a directory");for(const e of c.dirList){const t=o.y1.join(a,e),r=A.get(t);if(void 0===r)throw new Error("Assertion failed: Expected the child to have been registered");if("target"in r)s(e,r);else for(const n of r.dirList){const r=o.y1.join(t,n),i=A.get(r);if(void 0===i)throw new Error("Assertion failed: Expected the subchild to have been registered");if(!("target"in i))throw new Error("Assertion failed: Expected the leaf junction to be a package");s(`${e}/${n}`,i)}}return super.finalizeInstallWithPnp(e)}}const Ae=e=>o.y1.join(e.cwd,".pnp.js"),ne={configuration:{nmHoistingLimits:{description:"Prevent packages can be hoisted past specific levels",type:n.a2.STRING,values:[w.WORKSPACES,w.DEPENDENCIES,w.NONE],default:"none"}},linkers:[class{supportsPackage(e,t){return"node-modules"===t.project.configuration.get("nodeLinker")}async findPackageLocation(e,t){const r=t.project.tryWorkspaceByLocator(e);if(r)return r.cwd;const A=await q(t.project,{unrollAliases:!0});if(null===A)throw new j.UsageError("Couldn't find the node_modules state file - running an install might help (findPackageLocation)");const n=A.locatorMap.get(i.stringifyLocator(e));if(!n){const r=new j.UsageError(`Couldn't find ${i.prettyLocator(t.project.configuration,e)} in the currently installed node_modules map - running an install might help`);throw r.code="LOCATOR_NOT_INSTALLED",r}return n.locations[0]}async findPackageLocator(e,t){const r=await q(t.project,{unrollAliases:!0});if(null===r)return null;const{locationRoot:A,segments:n}=W(o.y1.resolve(e),{skipPrefix:t.project.cwd});let s=r.locationTree.get(A);if(!s)return null;let a=s.locator;for(const e of n){if(s=s.children.get(e),!s)break;a=s.locator||a}return i.parseLocator(a)}makeInstaller(e){return new J(e)}},te]}},8190:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>V});var A,n,o=r(39922),i=r(36370),s=r(25413),a=r(85824),c=r(62152),g=r(35691),l=r(92659),u=r(85875),h=r(15815),p=r(14224),d=r(40822);!function(e){e.All="all",e.Production="production",e.Development="development"}(A||(A={})),function(e){e.Info="info",e.Low="low",e.Moderate="moderate",e.High="high",e.Critical="critical"}(n||(n={}));var C=r(54143),f=r(73632),I=r(71643);const E=[n.Info,n.Low,n.Moderate,n.High,n.Critical];function B(e,t){const r=[],A=new Set,n=e=>{A.has(e)||(A.add(e),r.push(e))};for(const e of t)n(e);const o=new Set;for(;r.length>0;){const t=r.shift(),A=e.storedResolutions.get(t);if(void 0===A)throw new Error("Assertion failed: Expected the resolution to have been registered");const i=e.storedPackages.get(A);if(i){o.add(t);for(const e of i.dependencies.values())n(e.descriptorHash)}}return o}function y(e,t,{all:r}){const A=r?e.workspaces:[t],n=A.map(e=>e.manifest),o=new Set(n.map(e=>[...e.dependencies].map(([e,t])=>e)).flat()),i=new Set(n.map(e=>[...e.devDependencies].map(([e,t])=>e)).flat()),s=A.map(e=>[...e.dependencies.values()]).flat(),a=s.filter(e=>o.has(e.identHash)).map(e=>e.descriptorHash),c=s.filter(e=>i.has(e.identHash)).map(e=>e.descriptorHash),g=B(e,a),l=B(e,c);return u=l,h=g,new Set([...u].filter(e=>!h.has(e)));var u,h}function m(e){const t={};for(const r of e)t[C.stringifyIdent(r)]=C.parseRange(r.range).selector;return t}function w(e){if(void 0===e)return new Set;const t=E.indexOf(e),r=E.slice(t);return new Set(r)}function Q(e,t){var r;const A=function(e,t){const r=w(t),A={};for(const t of r)A[t]=e[t];return A}(e,t);for(const e of Object.keys(A))if(null!==(r=A[e])&&void 0!==r&&r)return!0;return!1}class D extends s.BaseCommand{constructor(){super(...arguments),this.all=!1,this.recursive=!1,this.environment=A.All,this.json=!1,this.severity=n.Info}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const n=function(e,t,{all:r,environment:n}){const o=r?e.workspaces:[t],i=[];if([A.All,A.Production].includes(n))for(const e of o)for(const t of e.manifest.dependencies.values())i.push(t);const s=[];if([A.All,A.Development].includes(n))for(const e of o)for(const t of e.manifest.devDependencies.values())s.push(t);return m([...i,...s].filter(e=>null===C.parseRange(e.range).protocol))}(t,r,{all:this.all,environment:this.environment}),i=function(e,t,{all:r}){var A;const n=y(e,t,{all:r}),o={};for(const t of e.storedPackages.values())o[C.stringifyIdent(t)]={version:null!==(A=t.version)&&void 0!==A?A:"0.0.0",integrity:t.identHash,requires:m(t.dependencies.values()),dev:n.has(C.convertLocatorToDescriptor(t).descriptorHash)};return o}(t,r,{all:this.all});if(!this.recursive)for(const e of Object.keys(i))Object.prototype.hasOwnProperty.call(n,e)?i[e].requires={}:delete i[e];const d={requires:n,dependencies:i},E=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e});let B;const D=await c.h.start({configuration:e,stdout:this.context.stdout},async()=>{try{B=await p.npmHttpUtils.post("/-/npm/v1/security/audits/quick",d,{authType:p.npmHttpUtils.AuthType.NO_AUTH,configuration:e,jsonResponse:!0,registry:E})}catch(e){throw"HTTPError"!==e.name?e:new g.lk(l.b.EXCEPTION,e.toString())}});if(D.hasErrors())return D.exitCode();const b=Q(B.metadata.vulnerabilities,this.severity);if(!this.json&&b)return u.emitTree(function(e,t){const r={},A={children:r};let n=Object.values(e.advisories);if(null!=t){const e=w(t);n=n.filter(t=>e.has(t.severity))}for(const e of f.sortMap(n,e=>e.module_name))r[e.module_name]={label:e.module_name,value:I.tuple(I.Type.RANGE,e.findings.map(e=>e.version).join(", ")),children:{Issue:{label:"Issue",value:I.tuple(I.Type.NO_HINT,e.title)},URL:{label:"URL",value:I.tuple(I.Type.URL,e.url)},Severity:{label:"Severity",value:I.tuple(I.Type.NO_HINT,e.severity)},"Vulnerable Versions":{label:"Vulnerable Versions",value:I.tuple(I.Type.RANGE,e.vulnerable_versions)},"Patched Versions":{label:"Patched Versions",value:I.tuple(I.Type.RANGE,e.patched_versions)},Via:{label:"Via",value:I.tuple(I.Type.NO_HINT,Array.from(new Set(e.findings.map(e=>e.paths).flat().map(e=>e.split(">")[0]))).join(", "))},Recommendation:{label:"Recommendation",value:I.tuple(I.Type.NO_HINT,e.recommendation.replace(/\n/g," "))}}};return A}(B,this.severity),{configuration:e,json:this.json,stdout:this.context.stdout,separators:2}),1;return(await h.Pk.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async e=>{e.reportJson(B),b||e.reportInfo(l.b.EXCEPTION,"No audit suggestions")})).exitCode()}}D.usage=d.Command.Usage({description:"perform a vulnerability audit against the installed packages",details:`\n This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).\n\n For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.\n\n Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${E.map(e=>`\`${e}\``).join(", ")}.\n\n If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.\n\n To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why \` to get more information as to who depends on them.\n `,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"]]}),(0,i.gn)([d.Command.Boolean("-A,--all")],D.prototype,"all",void 0),(0,i.gn)([d.Command.Boolean("-R,--recursive")],D.prototype,"recursive",void 0),(0,i.gn)([d.Command.String("--environment")],D.prototype,"environment",void 0),(0,i.gn)([d.Command.Boolean("--json")],D.prototype,"json",void 0),(0,i.gn)([d.Command.String("--severity")],D.prototype,"severity",void 0),(0,i.gn)([d.Command.Path("npm","audit")],D.prototype,"execute",null);var b=r(85622),v=r.n(b),S=r(53887),k=r.n(S),N=r(31669);class F extends s.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t}=await a.I.find(e,this.context.cwd),r=void 0!==this.fields?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,A=[];let n=!1;const i=await h.Pk.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async o=>{for(const i of this.packages){let s;if("."===i){const e=t.topLevelWorkspace;if(!e.manifest.name)throw new d.UsageError("Missing 'name' field in "+v().join(e.cwd,"package.json"));s=C.makeDescriptor(e.manifest.name,"unknown")}else s=C.parseDescriptor(i);const a=p.npmHttpUtils.getIdentUrl(s);let c;try{c=K(await p.npmHttpUtils.get(a,{configuration:e,ident:s,jsonResponse:!0}))}catch(e){throw"HTTPError"!==e.name?e:404===e.response.statusCode?new g.lk(l.b.EXCEPTION,"Package not found"):new g.lk(l.b.EXCEPTION,e.toString())}const u=Object.keys(c.versions).sort(k().compareLoose);let h=c["dist-tags"].latest||u[u.length-1];if(k().validRange(s.range)){const t=k().maxSatisfying(u,s.range);null!==t?h=t:(o.reportWarning(l.b.UNNAMED,`Unmet range ${C.prettyRange(e,s.range)}; falling back to the latest version`),n=!0)}else"unknown"!==s.range&&(o.reportWarning(l.b.UNNAMED,`Invalid range ${C.prettyRange(e,s.range)}; falling back to the latest version`),n=!0);const f=c.versions[h],I={...c,...f,version:h,versions:u};let E;if(null!==r){E={};for(const t of r){const r=I[t];void 0!==r?E[t]=r:(o.reportWarning(l.b.EXCEPTION,`The '${t}' field doesn't exist inside ${C.prettyIdent(e,s)}'s informations`),n=!0)}}else this.json||(delete I.dist,delete I.readme,delete I.users),E=I;o.reportJson(E),this.json||A.push(E)}});N.inspect.styles.name="cyan";for(const e of A)(e!==A[0]||n)&&this.context.stdout.write("\n"),this.context.stdout.write((0,N.inspect)(e,{depth:1/0,colors:!0,compact:!1})+"\n");return i.exitCode()}}function K(e){if(Array.isArray(e)){const t=[];for(let r of e)r=K(r),r&&t.push(r);return t}if("object"==typeof e&&null!==e){const t={};for(const r of Object.keys(e)){if(r.startsWith("_"))continue;const A=K(e[r]);A&&(t[r]=A)}return t}return e||null}F.usage=d.Command.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command will fetch information about a package from the npm registry, and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@` to the package argument to provide information specific to the latest version that satisfies the range. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package informations.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react 16.12.0","yarn npm info react@16.12.0"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]}),(0,i.gn)([d.Command.Rest()],F.prototype,"packages",void 0),(0,i.gn)([d.Command.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"})],F.prototype,"fields",void 0),(0,i.gn)([d.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],F.prototype,"json",void 0),(0,i.gn)([d.Command.Path("npm","info")],F.prototype,"execute",null);var M=r(61899);class R extends s.BaseCommand{constructor(){super(...arguments),this.publish=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),t=await x({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const A=await async function({registry:e,report:t,stdin:r,stdout:A}){if(process.env.TEST_ENV)return{name:process.env.TEST_NPM_USER||"",password:process.env.TEST_NPM_PASSWORD||""};t.reportInfo(l.b.UNNAMED,"Logging in to "+e);let n=!1;e.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(t.reportInfo(l.b.UNNAMED,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0);t.reportSeparator();const{username:o,password:i}=await(0,M.prompt)([{type:"input",name:"username",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:r,stdout:A},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:r,stdout:A}]);return t.reportSeparator(),{name:o,password:i}}({registry:t,report:r,stdin:this.context.stdin,stdout:this.context.stdout}),n="/-/user/org.couchdb.user:"+encodeURIComponent(A.name),i=await p.npmHttpUtils.put(n,A,{attemptedAs:A.name,configuration:e,registry:t,jsonResponse:!0,authType:p.npmHttpUtils.AuthType.NO_AUTH});return await async function(e,t,{configuration:r,scope:A}){const n=e=>r=>{const A=f.isIndexableObject(r)?r:{},n=A[e],o=f.isIndexableObject(n)?n:{};return{...A,[e]:{...o,npmAuthToken:t}}},i=A?{npmScopes:n(A)}:{npmRegistries:n(e)};return await o.VK.updateHomeConfiguration(i)}(t,i.token,{configuration:e,scope:this.scope}),r.reportInfo(l.b.UNNAMED,"Successfully logged in")})).exitCode()}}async function x({scope:e,publish:t,configuration:r,cwd:A}){return e&&t?p.npmConfigUtils.getScopeRegistry(e,{configuration:r,type:p.npmConfigUtils.RegistryType.PUBLISH_REGISTRY}):e?p.npmConfigUtils.getScopeRegistry(e,{configuration:r}):t?p.npmConfigUtils.getPublishRegistry((await(0,s.openWorkspace)(r,A)).manifest,{configuration:r}):p.npmConfigUtils.getDefaultRegistry({configuration:r})}R.usage=d.Command.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]}),(0,i.gn)([d.Command.String("-s,--scope",{description:"Login to the registry configured for a given scope"})],R.prototype,"scope",void 0),(0,i.gn)([d.Command.Boolean("--publish",{description:"Login to the publish registry"})],R.prototype,"publish",void 0),(0,i.gn)([d.Command.Path("npm","login")],R.prototype,"execute",null);const L=new Set(["npmAuthIdent","npmAuthToken"]);class P extends s.BaseCommand{constructor(){super(...arguments),this.publish=!1,this.all=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),t=async()=>{var t;const r=await x({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),A=await o.VK.find(this.context.cwd,this.context.plugins),n=C.makeIdent(null!==(t=this.scope)&&void 0!==t?t:null,"pkg");return!p.npmConfigUtils.getAuthConfiguration(r,{configuration:A,ident:n}).get("npmAuthToken")};return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{if(this.all&&(await async function(){const e=e=>{let t=!1;const r=f.isIndexableObject(e)?{...e}:{};r.npmAuthToken&&(delete r.npmAuthToken,t=!0);for(const e of Object.keys(r))O(r,e)&&(t=!0);if(0!==Object.keys(r).length)return t?r:e};return await o.VK.updateHomeConfiguration({npmRegistries:e,npmScopes:e})}(),r.reportInfo(l.b.UNNAMED,"Successfully logged out from everything")),this.scope)return await U("npmScopes",this.scope),void(await t()?r.reportInfo(l.b.UNNAMED,"Successfully logged out from "+this.scope):r.reportWarning(l.b.UNNAMED,"Scope authentication settings removed, but some other ones settings still apply to it"));const A=await x({configuration:e,cwd:this.context.cwd,publish:this.publish});await U("npmRegistries",A),await t()?r.reportInfo(l.b.UNNAMED,"Successfully logged out from "+A):r.reportWarning(l.b.UNNAMED,"Registry authentication settings removed, but some other ones settings still apply to it")})).exitCode()}}function O(e,t){const r=e[t];if(!f.isIndexableObject(r))return!1;const A=new Set(Object.keys(r));if([...L].every(e=>!A.has(e)))return!1;for(const e of L)A.delete(e);if(0===A.size)return e[t]=void 0,!0;const n={...r};for(const e of L)delete n[e];return e[t]=n,!0}async function U(e,t){return await o.VK.updateHomeConfiguration({[e]:e=>{const r=f.isIndexableObject(e)?e:{};if(!Object.prototype.hasOwnProperty.call(r,t))return e;const A=r[t],n=f.isIndexableObject(A)?A:{},o=new Set(Object.keys(n));if([...L].every(e=>!o.has(e)))return e;for(const e of L)o.delete(e);if(0===o.size){if(1===Object.keys(r).length)return;return{...r,[t]:void 0}}const i={};for(const e of L)i[e]=void 0;return{...r,[t]:{...n,...i}}}})}P.usage=d.Command.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\n\n Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n\n Adding the `-A,--all` flag will cause the deletion to be done against all registries and scopes.\n ",examples:[["Logout of the default registry","yarn npm logout"],["Logout of the @my-scope scope","yarn npm logout --scope my-scope"],["Logout of the publish registry for the current package","yarn npm logout --publish"],["Logout of all registries","yarn npm logout --all"]]}),(0,i.gn)([d.Command.String("-s,--scope",{description:"Logout of the registry configured for a given scope"})],P.prototype,"scope",void 0),(0,i.gn)([d.Command.Boolean("--publish",{description:"Logout of the publish registry"})],P.prototype,"publish",void 0),(0,i.gn)([d.Command.Boolean("-A,--all",{description:"Logout of all registries"})],P.prototype,"all",void 0),(0,i.gn)([d.Command.Path("npm","logout")],P.prototype,"execute",null);var T=r(63088),j=r(49881);class Y extends s.BaseCommand{constructor(){super(...arguments),this.tag="latest",this.tolerateRepublish=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);if(r.manifest.private)throw new d.UsageError("Private workspaces cannot be published");if(null===r.manifest.name||null===r.manifest.version)throw new d.UsageError("Workspaces must have valid names and versions to be published on an external registry");await t.restoreInstallState();const A=r.manifest.name,n=r.manifest.version,i=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e});return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{if(this.tolerateRepublish)try{const r=await p.npmHttpUtils.get(p.npmHttpUtils.getIdentUrl(A),{configuration:e,registry:i,ident:A,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(r,"versions"))throw new g.lk(l.b.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(Object.prototype.hasOwnProperty.call(r.versions,n))return void t.reportWarning(l.b.UNNAMED,`Registry already knows about version ${n}; skipping.`)}catch(e){if("HTTPError"!==e.name)throw e;if(404!==e.response.statusCode)throw new g.lk(l.b.NETWORK_ERROR,`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`)}await T.maybeExecuteWorkspaceLifecycleScript(r,"prepublish",{report:t}),await j.packUtils.prepareForPack(r,{report:t},async()=>{const n=await j.packUtils.genPackList(r);for(const e of n)t.reportInfo(null,e);const o=await j.packUtils.genPackStream(r,n),s=await f.bufferStream(o),a=await p.npmPublishUtils.makePublishBody(r,s,{access:this.access,tag:this.tag,registry:i});try{await p.npmHttpUtils.put(p.npmHttpUtils.getIdentUrl(A),a,{configuration:e,registry:i,ident:A,jsonResponse:!0})}catch(e){if("HTTPError"!==e.name)throw e;{const r=e.response.body&&e.response.body.error?e.response.body.error:`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`;t.reportError(l.b.NETWORK_ERROR,r)}}}),t.hasErrors()||t.reportInfo(l.b.UNNAMED,"Package archive published")})).exitCode()}}Y.usage=d.Command.Usage({category:"Npm-related commands",description:"publish the active workspace to the npm registry",details:'\n This command will pack the active workspace into a fresh archive and upload it to the npm registry.\n\n The package will by default be attached to the `latest` tag on the registry, but this behavior can be overriden by using the `--tag` option.\n\n Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka "private packages"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\n ',examples:[["Publish the active workspace","yarn npm publish"]]}),(0,i.gn)([d.Command.String("--access",{description:"The access for the published package (public or restricted)"})],Y.prototype,"access",void 0),(0,i.gn)([d.Command.String("--tag",{description:"The tag on the registry that the package should be attached to"})],Y.prototype,"tag",void 0),(0,i.gn)([d.Command.Boolean("--tolerate-republish",{description:"Warn and exit when republishing an already existing version of a package"})],Y.prototype,"tolerateRepublish",void 0),(0,i.gn)([d.Command.Path("npm","publish")],Y.prototype,"execute",null);var G=r(46009);class H extends s.BaseCommand{constructor(){super(...arguments),this.json=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);let A;if(void 0!==this.package)A=C.parseIdent(this.package);else{if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);if(!r.manifest.name)throw new d.UsageError("Missing 'name' field in "+G.y1.join(r.cwd,G.QS.manifest));A=r.manifest.name}const n=await J(A,e),i={children:f.sortMap(Object.entries(n),([e])=>e).map(([e,t])=>({value:I.tuple(I.Type.RESOLUTION,{descriptor:C.makeDescriptor(A,e),locator:C.makeLocator(A,t)})}))};return u.emitTree(i,{configuration:e,json:this.json,stdout:this.context.stdout})}}async function J(e,t){const r=`/-/package${p.npmHttpUtils.getIdentUrl(e)}/dist-tags`;return p.npmHttpUtils.get(r,{configuration:t,ident:e,jsonResponse:!0}).catch(e=>{throw"HTTPError"!==e.name?e:404===e.response.statusCode?new g.lk(l.b.EXCEPTION,"Package not found"):new g.lk(l.b.EXCEPTION,e.toString())})}H.usage=d.Command.Usage({category:"Npm-related commands",description:"list all dist-tags of a package",details:"\n This command will list all tags of a package from the npm registry.\n\n If the package is not specified, Yarn will default to the current workspace.\n ",examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]}),(0,i.gn)([d.Command.String({required:!1})],H.prototype,"package",void 0),(0,i.gn)([d.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],H.prototype,"json",void 0),(0,i.gn)([d.Command.Path("npm","tag","list")],H.prototype,"execute",null);class q extends s.BaseCommand{async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);const A=C.parseDescriptor(this.package,!0),n=A.range;if(!k().valid(n))throw new d.UsageError(`The range ${I.pretty(e,A.range,I.Type.RANGE)} must be a valid semver version`);const i=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e}),c=I.pretty(e,A,I.Type.IDENT),g=I.pretty(e,n,I.Type.RANGE),u=I.pretty(e,this.tag,I.Type.CODE);return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{const r=await J(A,e);Object.prototype.hasOwnProperty.call(r,this.tag)&&r[this.tag]===n&&t.reportWarning(l.b.UNNAMED,`Tag ${u} is already set to version ${g}`);try{const t=`/-/package${p.npmHttpUtils.getIdentUrl(A)}/dist-tags/${encodeURIComponent(this.tag)}`;await p.npmHttpUtils.put(t,n,{configuration:e,registry:i,ident:A,jsonRequest:!0,jsonResponse:!0})}catch(e){if("HTTPError"!==e.name)throw e;{const r=e.response.body&&e.response.body.error?e.response.body.error:`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`;t.reportError(l.b.NETWORK_ERROR,r)}}t.hasErrors()||t.reportInfo(l.b.UNNAMED,`Tag ${u} added to version ${g} of package ${c}`)})).exitCode()}}q.usage=d.Command.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:"\n This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.\n ",examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]}),(0,i.gn)([d.Command.String()],q.prototype,"package",void 0),(0,i.gn)([d.Command.String()],q.prototype,"tag",void 0),(0,i.gn)([d.Command.Path("npm","tag","add")],q.prototype,"execute",null);var z=r(15966);class W extends s.BaseCommand{async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await a.I.find(e,this.context.cwd);if(!r)throw new s.WorkspaceRequiredError(t.cwd,this.context.cwd);const A=C.parseIdent(this.package),n=p.npmConfigUtils.getPublishRegistry(r.manifest,{configuration:e}),i=I.pretty(e,this.tag,I.Type.CODE),c=I.pretty(e,A,I.Type.IDENT),g=await J(A,e);if(!Object.prototype.hasOwnProperty.call(g,this.tag))throw new d.UsageError(`${i} is not a tag of package ${c}`);return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async t=>{try{const t=`/-/package${p.npmHttpUtils.getIdentUrl(A)}/dist-tags/${encodeURIComponent(this.tag)}`;await p.npmHttpUtils.del(t,{configuration:e,registry:n,ident:A,jsonResponse:!0})}catch(e){if("HTTPError"!==e.name)throw e;{const r=e.response.body&&e.response.body.error?e.response.body.error:`The remote server answered with HTTP ${e.response.statusCode} ${e.response.statusMessage}`;t.reportError(l.b.NETWORK_ERROR,r)}}t.hasErrors()||t.reportInfo(l.b.UNNAMED,`Tag ${i} removed from package ${c}`)})).exitCode()}}W.schema=z.object().shape({tag:z.string().notOneOf(["latest"])}),W.usage=d.Command.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:"\n This command will remove a tag from a package from the npm registry.\n ",examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]}),(0,i.gn)([d.Command.String()],W.prototype,"package",void 0),(0,i.gn)([d.Command.String()],W.prototype,"tag",void 0),(0,i.gn)([d.Command.Path("npm","tag","remove")],W.prototype,"execute",null);class X extends s.BaseCommand{constructor(){super(...arguments),this.publish=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins);let t;t=this.scope&&this.publish?p.npmConfigUtils.getScopeRegistry(this.scope,{configuration:e,type:p.npmConfigUtils.RegistryType.PUBLISH_REGISTRY}):this.scope?p.npmConfigUtils.getScopeRegistry(this.scope,{configuration:e}):this.publish?p.npmConfigUtils.getPublishRegistry((await(0,s.openWorkspace)(e,this.context.cwd)).manifest,{configuration:e}):p.npmConfigUtils.getDefaultRegistry({configuration:e});return(await h.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{try{const A=await p.npmHttpUtils.get("/-/whoami",{configuration:e,registry:t,authType:p.npmHttpUtils.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?C.makeIdent(this.scope,""):void 0});r.reportInfo(l.b.UNNAMED,A.username)}catch(e){if("HTTPError"!==e.name)throw e;401===e.response.statusCode||403===e.response.statusCode?r.reportError(l.b.AUTHENTICATION_INVALID,"Authentication failed - your credentials may have expired"):r.reportError(l.b.AUTHENTICATION_INVALID,e.toString())}})).exitCode()}}X.usage=d.Command.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]}),(0,i.gn)([d.Command.String("-s,--scope",{description:"Print username for the registry configured for a given scope"})],X.prototype,"scope",void 0),(0,i.gn)([d.Command.Boolean("--publish",{description:"Print username for the publish registry"})],X.prototype,"publish",void 0),(0,i.gn)([d.Command.Path("npm","whoami")],X.prototype,"execute",null);const V={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:o.a2.STRING,default:null}},commands:[D,F,R,P,Y,q,H,W,X]}},14224:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>W,npmConfigUtils:()=>A,npmHttpUtils:()=>n,npmPublishUtils:()=>o});var A={};r.r(A),r.d(A,{RegistryType:()=>l,getAuthConfiguration:()=>Q,getDefaultRegistry:()=>y,getPublishRegistry:()=>E,getRegistryConfiguration:()=>m,getScopeConfiguration:()=>w,getScopeRegistry:()=>B,normalizeRegistry:()=>I});var n={};r.r(n),r.d(n,{AuthType:()=>u,del:()=>N,get:()=>v,getIdentUrl:()=>b,handleInvalidAuthenticationError:()=>D,post:()=>S,put:()=>k});var o={};r.r(o),r.d(o,{makePublishBody:()=>J});var i=r(39922),s=r(54143),a=r(72785),c=r(53887),g=r.n(c);var l,u,h=r(79669),p=r(35691),d=r(92659),C=r(61899),f=r(78835);function I(e){return e.replace(/\/$/,"")}function E(e,{configuration:t}){return e.publishConfig&&e.publishConfig.registry?I(e.publishConfig.registry):e.name?B(e.name.scope,{configuration:t,type:l.PUBLISH_REGISTRY}):y({configuration:t,type:l.PUBLISH_REGISTRY})}function B(e,{configuration:t,type:r=l.FETCH_REGISTRY}){const A=w(e,{configuration:t});if(null===A)return y({configuration:t,type:r});const n=A.get(r);return null===n?y({configuration:t,type:r}):I(n)}function y({configuration:e,type:t=l.FETCH_REGISTRY}){const r=e.get(t);return I(null!==r?r:e.get(l.FETCH_REGISTRY))}function m(e,{configuration:t}){const r=t.get("npmRegistries"),A=r.get(e);if(void 0!==A)return A;const n=r.get(e.replace(/^[a-z]+:/,""));return void 0!==n?n:null}function w(e,{configuration:t}){if(null===e)return null;const r=t.get("npmScopes").get(e);return r||null}function Q(e,{configuration:t,ident:r}){const A=r&&w(r.scope,{configuration:t});if((null==A?void 0:A.get("npmAuthIdent"))||(null==A?void 0:A.get("npmAuthToken")))return A;return m(e,{configuration:t})||t}async function D(e,{attemptedAs:t,registry:r,headers:A,configuration:n}){if("HTTPError"===e.name&&401===e.response.statusCode)throw new p.lk(d.b.AUTHENTICATION_INVALID,`Invalid authentication (${"string"!=typeof t?"as "+await async function(e,t,{configuration:r}){var A;if(void 0===t||void 0===t.authorization)return"an anonymous user";try{const n=await h.get(new f.URL(e+"/-/whoami").href,{configuration:r,headers:t,jsonResponse:!0});return null!==(A=n.username)&&void 0!==A?A:"an unknown user"}catch(e){return"an unknown user"}}(r,A,{configuration:n}):"attempted as "+t})`)}function b(e){return e.scope?`/@${e.scope}%2f${e.name}`:"/"+e.name}async function v(e,{configuration:t,headers:r,ident:A,authType:n,registry:o,...i}){if(A&&void 0===o&&(o=B(A.scope,{configuration:t})),A&&A.scope&&void 0===n&&(n=u.BEST_EFFORT),"string"!=typeof o)throw new Error("Assertion failed: The registry should be a string");const s=F(o,{authType:n,configuration:t,ident:A});let a;s&&(r={...r,authorization:s});try{a=new f.URL(e)}catch(t){a=new f.URL(o+e)}try{return await h.get(a.href,{configuration:t,headers:r,...i})}catch(e){throw await D(e,{registry:o,configuration:t,headers:r}),e}}async function S(e,t,{attemptedAs:r,configuration:A,headers:n,ident:o,authType:i=u.ALWAYS_AUTH,registry:s,...a}){if(o&&void 0===s&&(s=B(o.scope,{configuration:A})),"string"!=typeof s)throw new Error("Assertion failed: The registry should be a string");const c=F(s,{authType:i,configuration:A,ident:o});c&&(n={...n,authorization:c});try{return await h.post(s+e,t,{configuration:A,headers:n,...a})}catch(o){if(!M(o))throw await D(o,{attemptedAs:r,registry:s,configuration:A,headers:n}),o;const i=await K(),c={...n,...R(i)};try{return await h.post(`${s}${e}`,t,{configuration:A,headers:c,...a})}catch(e){throw await D(e,{attemptedAs:r,registry:s,configuration:A,headers:n}),e}}}async function k(e,t,{attemptedAs:r,configuration:A,headers:n,ident:o,authType:i=u.ALWAYS_AUTH,registry:s,...a}){if(o&&void 0===s&&(s=B(o.scope,{configuration:A})),"string"!=typeof s)throw new Error("Assertion failed: The registry should be a string");const c=F(s,{authType:i,configuration:A,ident:o});c&&(n={...n,authorization:c});try{return await h.put(s+e,t,{configuration:A,headers:n,...a})}catch(o){if(!M(o))throw await D(o,{attemptedAs:r,registry:s,configuration:A,headers:n}),o;const i=await K(),c={...n,...R(i)};try{return await h.put(`${s}${e}`,t,{configuration:A,headers:c,...a})}catch(e){throw await D(e,{attemptedAs:r,registry:s,configuration:A,headers:n}),e}}}async function N(e,{attemptedAs:t,configuration:r,headers:A,ident:n,authType:o=u.ALWAYS_AUTH,registry:i,...s}){if(n&&void 0===i&&(i=B(n.scope,{configuration:r})),"string"!=typeof i)throw new Error("Assertion failed: The registry should be a string");const a=F(i,{authType:o,configuration:r,ident:n});a&&(A={...A,authorization:a});try{return await h.del(i+e,{configuration:r,headers:A,...s})}catch(n){if(!M(n))throw await D(n,{attemptedAs:t,registry:i,configuration:r,headers:A}),n;const o=await K(),a={...A,...R(o)};try{return await h.del(`${i}${e}`,{configuration:r,headers:a,...s})}catch(e){throw await D(e,{attemptedAs:t,registry:i,configuration:r,headers:A}),e}}}function F(e,{authType:t=u.CONFIGURATION,configuration:r,ident:A}){const n=Q(e,{configuration:r,ident:A}),o=function(e,t){switch(t){case u.CONFIGURATION:return e.get("npmAlwaysAuth");case u.BEST_EFFORT:case u.ALWAYS_AUTH:return!0;case u.NO_AUTH:return!1;default:throw new Error("Unreachable")}}(n,t);if(!o)return null;if(n.get("npmAuthToken"))return"Bearer "+n.get("npmAuthToken");if(n.get("npmAuthIdent"))return"Basic "+n.get("npmAuthIdent");if(o&&t!==u.BEST_EFFORT)throw new p.lk(d.b.AUTHENTICATION_NOT_FOUND,"No authentication configured for request");return null}async function K(){if(process.env.TEST_ENV)return process.env.TEST_NPM_2FA_TOKEN||"";const{otp:e}=await(0,C.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return e}function M(e){if("HTTPError"!==e.name)return!1;try{return e.response.headers["www-authenticate"].split(/,\s*/).map(e=>e.toLowerCase()).includes("otp")}catch(e){return!1}}function R(e){return{"npm-otp":e}}!function(e){e.FETCH_REGISTRY="npmRegistryServer",e.PUBLISH_REGISTRY="npmPublishRegistry"}(l||(l={})),function(e){e[e.NO_AUTH=0]="NO_AUTH",e[e.BEST_EFFORT=1]="BEST_EFFORT",e[e.CONFIGURATION=2]="CONFIGURATION",e[e.ALWAYS_AUTH=3]="ALWAYS_AUTH"}(u||(u={}));class x{supports(e,t){if(!e.reference.startsWith("npm:"))return!1;const r=new f.URL(e.reference);return!!g().valid(r.pathname)&&!r.searchParams.has("__archiveUrl")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,n,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote registry"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:A,releaseFs:n,prefixPath:s.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){let r;try{r=await v(x.getLocatorUrl(e),{configuration:t.project.configuration,ident:e})}catch(A){r=await v(x.getLocatorUrl(e).replace(/%2f/g,"/"),{configuration:t.project.configuration,ident:e})}return await a.convertToZip(r,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:s.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,t,{configuration:r}){let A=B(e.scope,{configuration:r});const n=x.getLocatorUrl(e);return t=t.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),A=A.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),(t=t.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"))===A+n||t===A+n.replace(/%2f/g,"/")}static getLocatorUrl(e){const t=g().clean(e.reference.slice("npm:".length));if(null===t)throw new p.lk(d.b.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");return`${b(e)}/-/${e.name}-${t}.tgz`}}var L=r(46611),P=r(36545),O=r(32485);const U=s.makeIdent(null,"node-gyp"),T=/\b(node-gyp|prebuild-install)\b/;var j=r(52779);var Y=r(49881),G=r(76417),H=r(10129);async function J(e,t,{access:r,tag:A,registry:n}){const o=e.project.configuration,i=e.manifest.name,a=e.manifest.version,c=s.stringifyIdent(i),g=(0,G.createHash)("sha1").update(t).digest("hex"),l=H.Sd(t).toString();void 0===r&&(r=e.manifest.publishConfig&&"string"==typeof e.manifest.publishConfig.access?e.manifest.publishConfig.access:null!==o.get("npmPublishAccess")?o.get("npmPublishAccess"):i.scope?"restricted":"public");const u=await Y.packUtils.genPackageManifest(e),h=`${c}-${a}.tgz`,p=new f.URL(`${c}/-/${h}`,n);return{_id:c,_attachments:{[h]:{content_type:"application/octet-stream",data:t.toString("base64"),length:t.length}},name:c,access:r,"dist-tags":{[A]:a},versions:{[a]:{...u,_id:`${c}@${a}`,name:c,version:a,dist:{shasum:g,integrity:l,tarball:p.toString()}}}}}const q={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:i.a2.BOOLEAN,default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:i.a2.SECRET,default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:i.a2.SECRET,default:null}},z={npmPublishRegistry:{description:"Registry to push packages to",type:i.a2.STRING,default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:i.a2.STRING,default:"https://registry.yarnpkg.com"}},W={configuration:{...q,...z,npmScopes:{description:"Settings per package scope",type:i.a2.MAP,valueDefinition:{description:"",type:i.a2.SHAPE,properties:{...q,...z}}},npmRegistries:{description:"Settings per registry",type:i.a2.MAP,normalizeKeys:I,valueDefinition:{description:"",type:i.a2.SHAPE,properties:{...q}}}},fetchers:[class{supports(e,t){if(!e.reference.startsWith("npm:"))return!1;const{selector:r,params:A}=s.parseRange(e.reference);return!!g().valid(r)&&(null!==A&&"string"==typeof A.__archiveUrl)}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,n,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the remote server"),loader:()=>this.fetchFromNetwork(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:A,releaseFs:n,prefixPath:s.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,t){const{params:r}=s.parseRange(e.reference);if(null===r||"string"!=typeof r.__archiveUrl)throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");const A=await v(r.__archiveUrl,{configuration:t.project.configuration,ident:e});return await a.convertToZip(A,{compressionLevel:t.project.configuration.get("compressionLevel"),prefixPath:s.getIdentVendorPath(e),stripComponents:1})}},x],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!s.tryParseDescriptor(e.range.slice("npm:".length),!0)}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Unreachable")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){const r=s.parseDescriptor(e.range.slice("npm:".length),!0);return t.resolver.getResolutionDependencies(r,t)}async getCandidates(e,t,r){const A=s.parseDescriptor(e.range.slice("npm:".length),!0);return await r.resolver.getCandidates(A,t,r)}async getSatisfying(e,t,r){const A=s.parseDescriptor(e.range.slice("npm:".length),!0);return r.resolver.getSatisfying(A,t,r)}resolve(e,t){throw new Error("Unreachable")}},class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!P.validRange(e.range.slice("npm:".length))}supportsLocator(e,t){if(!e.reference.startsWith("npm:"))return!1;const{selector:r}=s.parseRange(e.reference);return!!g().valid(r)}shouldPersistResolution(e,t){return!0}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const A=P.validRange(e.range.slice("npm:".length));if(null===A)throw new Error("Expected a valid range, got "+e.range.slice("npm:".length));const n=await v(b(e),{configuration:r.project.configuration,ident:e,jsonResponse:!0}),o=Object.keys(n.versions).map(e=>new(g().SemVer)(e)).filter(e=>A.test(e)),i=o.filter(e=>!n.versions[e.raw].deprecated),a=i.length>0?i:o;return a.sort((e,t)=>-e.compare(t)),a.map(t=>{const A=s.makeLocator(e,"npm:"+t.raw),o=n.versions[t.raw].dist.tarball;return x.isConventionalTarballUrl(A,o,{configuration:r.project.configuration})?A:s.bindLocator(A,{__archiveUrl:o})})}async getSatisfying(e,t,r){const A=P.validRange(e.range.slice("npm:".length));if(null===A)throw new Error("Expected a valid range, got "+e.range.slice("npm:".length));return t.map(e=>{try{return new(g().SemVer)(e.slice("npm:".length))}catch(e){return null}}).filter(e=>null!==e).filter(e=>A.test(e)).sort((e,t)=>-e.compare(t)).map(t=>s.makeLocator(e,"npm:"+t.raw))}async resolve(e,t){const{selector:r}=s.parseRange(e.reference),A=g().clean(r);if(null===A)throw new p.lk(d.b.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");const n=await v(b(e),{configuration:t.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(n,"versions"))throw new p.lk(d.b.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(!Object.prototype.hasOwnProperty.call(n.versions,A))throw new p.lk(d.b.REMOTE_NOT_FOUND,`Registry failed to return reference "${A}"`);const o=new L.G;if(o.load(n.versions[A]),!o.dependencies.has(U.identHash)&&!o.peerDependencies.has(U.identHash))for(const r of o.scripts.values())if(r.match(T)){o.dependencies.set(U.identHash,s.makeDescriptor(U,"latest")),t.report.reportWarning(d.b.NODE_GYP_INJECTED,s.prettyLocator(t.project.configuration,e)+": Implicit dependencies on node-gyp are discouraged");break}return"string"==typeof o.raw.deprecated&&t.report.reportWarning(d.b.DEPRECATED_PACKAGE,`${s.prettyLocator(t.project.configuration,e)} is deprecated: ${o.raw.deprecated}`),{...e,version:A,languageName:"node",linkType:O.Un.HARD,dependencies:o.dependencies,peerDependencies:o.peerDependencies,dependenciesMeta:o.dependenciesMeta,peerDependenciesMeta:o.peerDependenciesMeta,bin:o.bin}}},class{supportsDescriptor(e,t){return!!e.range.startsWith("npm:")&&!!j.c.test(e.range.slice("npm:".length))}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Unreachable")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){const A=e.range.slice("npm:".length),n=await v(b(e),{configuration:r.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(n,"dist-tags"))throw new p.lk(d.b.REMOTE_INVALID,'Registry returned invalid data - missing "dist-tags" field');const o=n["dist-tags"];if(!Object.prototype.hasOwnProperty.call(o,A))throw new p.lk(d.b.REMOTE_NOT_FOUND,`Registry failed to return tag "${A}"`);const i=o[A],a=s.makeLocator(e,"npm:"+i),c=n.versions[i].dist.tarball;return x.isConventionalTarballUrl(a,c,{configuration:r.project.configuration})?[a]:[s.bindLocator(a,{__archiveUrl:c})]}async getSatisfying(e,t,r){return null}async resolve(e,t){throw new Error("Unreachable")}}]}},49881:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>T,packUtils:()=>A});var A={};r.r(A),r.d(A,{genPackList:()=>K,genPackStream:()=>N,genPackageManifest:()=>F,hasPackScripts:()=>S,prepareForPack:()=>k});var n=r(54143),o=r(35691),i=r(92659),s=r(36370),a=r(40822);class c extends a.Command{}(0,s.gn)([a.Command.String("--cwd",{hidden:!0})],c.prototype,"cwd",void 0);var g=r(46611),l=r(46009);class u extends a.UsageError{constructor(e,t){super(`This command can only be run from within a workspace of your project (${l.y1.relative(e,t)} isn't a workspace of ${l.y1.join(e,g.G.fileName)}).`)}}r(63129),r(5864),r(35747);new Map([["constraints",[["constraints","query"],["constraints","source"],["constraints"]]],["exec",[]],["interactive-tools",[["search"],["upgrade-interactive"]]],["stage",[["stage"]]],["typescript",[]],["version",[["version","apply"],["version","check"],["version"]]],["workspace-tools",[["workspaces","focus"],["workspaces","foreach"]]]]);var h=r(71643),p=r(39922);(0,s.gn)([a.Command.Path("--welcome")],class extends c{async execute(){const e=await p.VK.find(this.context.cwd,this.context.plugins);this.context.stdout.write((e=>`\n${h.pretty(e,"Welcome on Yarn 2!","bold")} 🎉 Thanks for helping us shape our vision of how projects\nshould be managed going forward.\n\nBeing still in RC, Yarn 2 isn't completely stable yet. Some features might be\nmissing, and some behaviors may have received major overhaul. In case of doubt,\nuse the following URLs to get some insight:\n\n - The changelog:\n ${h.pretty(e,"https://github.com/yarnpkg/berry/tree/CHANGELOG.md","cyan")}\n\n - Our issue tracker:\n ${h.pretty(e,"https://github.com/yarnpkg/berry","cyan")}\n\n - Our Discord server:\n ${h.pretty(e,"https://discord.gg/yarnpkg","cyan")}\n\nWe're hoping you will enjoy the experience. For now, a good start is to run\nthe two following commands:\n\n ${h.pretty(e,"find . -name node_modules -prune -exec rm -r {} \\;","magenta")}\n ${h.pretty(e,"yarn install","magenta")}\n\nOne last trick! If you need at some point to upgrade Yarn to a nightly build,\nthe following command will install the CLI straight from master:\n\n ${h.pretty(e,"yarn set version from sources","magenta")}\n\nSee you later 👋\n`)(e).trim()+"\n")}}.prototype,"execute",null);var d=r(85824),C=r(28148),f=r(33720),I=r(15815),E=r(43896),B=r(63088),y=r(10489),m=r(2401),w=r.n(m),Q=r(59938),D=r(78761);const b=["/package.json","/readme","/readme.*","/license","/license.*","/licence","/licence.*","/changelog","/changelog.*"],v=["/package.tgz",".github",".git",".hg","node_modules",".npmignore",".gitignore",".#*",".DS_Store"];async function S(e){return!!B.hasWorkspaceScript(e,"prepack")||!!B.hasWorkspaceScript(e,"postpack")}async function k(e,{report:t},r){await B.maybeExecuteWorkspaceLifecycleScript(e,"prepack",{report:t});try{await r()}finally{await B.maybeExecuteWorkspaceLifecycleScript(e,"postpack",{report:t})}}async function N(e,t){var r,A;void 0===t&&(t=await K(e));const n=new Set;for(const t of null!==(A=null===(r=e.manifest.publishConfig)||void 0===r?void 0:r.executableFiles)&&void 0!==A?A:new Set)n.add(l.y1.normalize(t));for(const t of e.manifest.bin.values())n.add(l.y1.normalize(t));const o=Q.pack();process.nextTick(async()=>{for(const r of t){const t=l.y1.normalize(r),A=l.y1.resolve(e.cwd,t),i=l.y1.join("package",t),s=await E.xfs.lstatPromise(A),a={name:i,mtime:new Date(3155328e5)},c=n.has(t)?493:420;let g,u;const h=new Promise((e,t)=>{g=e,u=t}),p=e=>{e?u(e):g()};if(s.isFile()){let r;r="package.json"===t?Buffer.from(JSON.stringify(await F(e),null,2)):await E.xfs.readFilePromise(A),o.entry({...a,mode:c,type:"file"},r,p)}else s.isSymbolicLink()?o.entry({...a,mode:c,type:"symlink",linkname:await E.xfs.readlinkPromise(A)},p):p(new Error(`Unsupported file type ${s.mode} for ${l.cS.fromPortablePath(t)}`));await h}o.finalize()});const i=(0,D.createGzip)();return o.pipe(i),i}async function F(e){const t=JSON.parse(JSON.stringify(e.manifest.raw));return await e.project.configuration.triggerHook(e=>e.beforeWorkspacePacking,e,t),t}async function K(e){var t,r,A,n,o,i,s,a;const c=e.project,g=c.configuration,u={accept:[],reject:[]};for(const e of v)u.reject.push(e);for(const e of b)u.accept.push(e);u.reject.push(g.get("rcFilename"));const h=t=>{if(null===t||!t.startsWith(e.cwd+"/"))return;const r=l.y1.relative(e.cwd,t),A=l.y1.resolve(l.LZ.root,r);u.reject.push(A)};h(l.y1.resolve(c.cwd,g.get("lockfileFilename"))),h(g.get("bstatePath")),h(g.get("cacheFolder")),h(g.get("globalFolder")),h(g.get("installStatePath")),h(g.get("virtualFolder")),h(g.get("yarnPath")),await g.triggerHook(e=>e.populateYarnPaths,c,e=>{h(e)});for(const t of c.workspaces){const r=l.y1.relative(e.cwd,t.cwd);""===r||r.match(/^(\.\.)?\//)||u.reject.push("/"+r)}const p={accept:[],reject:[]},d=null!==(r=null===(t=e.manifest.publishConfig)||void 0===t?void 0:t.main)&&void 0!==r?r:e.manifest.main,C=null!==(n=null===(A=e.manifest.publishConfig)||void 0===A?void 0:A.module)&&void 0!==n?n:e.manifest.module,f=null!==(i=null===(o=e.manifest.publishConfig)||void 0===o?void 0:o.browser)&&void 0!==i?i:e.manifest.browser,I=null!==(a=null===(s=e.manifest.publishConfig)||void 0===s?void 0:s.bin)&&void 0!==a?a:e.manifest.bin;null!=d&&p.accept.push(l.y1.resolve(l.LZ.root,d)),null!=C&&p.accept.push(l.y1.resolve(l.LZ.root,C)),"string"==typeof f&&p.accept.push(l.y1.resolve(l.LZ.root,f));for(const e of I.values())p.accept.push(l.y1.resolve(l.LZ.root,e));if(f instanceof Map)for(const[e,t]of f.entries())p.accept.push(l.y1.resolve(l.LZ.root,e)),"string"==typeof t&&p.accept.push(l.y1.resolve(l.LZ.root,t));const E=null!==e.manifest.files;if(E){p.reject.push("/*");for(const t of e.manifest.files)R(p.accept,t,{cwd:l.LZ.root})}return await async function(e,{hasExplicitFileList:t,globalList:r,ignoreList:A}){const n=[],o=new y.n(e),i=[[l.LZ.root,[A]]];for(;i.length>0;){const[e,A]=i.pop(),s=await o.lstatPromise(e);if(!x(e,{globalList:r,ignoreLists:s.isDirectory()?null:A}))if(s.isDirectory()){const n=await o.readdirPromise(e);let s=!1,a=!1;if(!t||e!==l.LZ.root)for(const e of n)s=s||".gitignore"===e,a=a||".npmignore"===e;const c=a?await M(o,e,".npmignore"):s?await M(o,e,".gitignore"):null;let g=null!==c?[c].concat(A):A;x(e,{globalList:r,ignoreLists:A})&&(g=[...A,{accept:[],reject:["**/*"]}]);for(const t of n)i.push([l.y1.resolve(e,t),g])}else(s.isFile()||s.isSymbolicLink())&&n.push(l.y1.relative(l.LZ.root,e))}return n.sort()}(e.cwd,{hasExplicitFileList:E,globalList:u,ignoreList:p})}async function M(e,t,r){const A={accept:[],reject:[]},n=await e.readFilePromise(l.y1.join(t,r),"utf8");for(const e of n.split(/\n/g))R(A.reject,e,{cwd:t});return A}function R(e,t,{cwd:r}){const A=t.trim();""!==A&&"#"!==A[0]&&e.push(function(e,{cwd:t}){const r="!"===e[0];return r&&(e=e.slice(1)),e.match(/\.{0,1}\//)&&(e=l.y1.resolve(t,e)),r&&(e="!"+e),e}(A,{cwd:r}))}function x(e,{globalList:t,ignoreLists:r}){if(L(e,t.accept))return!1;if(L(e,t.reject))return!0;if(null!==r)for(const t of r){if(L(e,t.accept))return!1;if(L(e,t.reject))return!0}return!1}function L(e,t){let r=t;const A=[];for(let e=0;e{await k(r,{report:t},async()=>{t.reportJson({base:r.cwd});const e=await K(r);for(const r of e)t.reportInfo(null,r),t.reportJson({location:r});if(!this.dryRun){const t=await N(r,e),n=E.xfs.createWriteStream(A);t.pipe(n),await new Promise(e=>{n.on("finish",e)})}}),this.dryRun||(t.reportInfo(i.b.UNNAMED,"Package archive generated in "+h.pretty(e,A,h.Type.PATH)),t.reportJson({output:A}))})).exitCode()}}O.usage=a.Command.Usage({description:"generate a tarball from the active workspace",details:"\n This command will turn the active workspace into a compressed archive suitable for publishing. The archive will by default be stored at the root of the workspace (`package.tgz`).\n\n If the `-o,---out` is set the archive will be created at the specified path. The `%s` and `%v` variables can be used within the path and will be respectively replaced by the package name and version.\n ",examples:[["Create an archive from the active workspace","yarn pack"],["List the files that would be made part of the workspace's archive","yarn pack --dry-run"],["Name and output the archive in a dedicated folder","yarn pack --out /artifacts/%s-%v.tgz"]]}),(0,s.gn)([a.Command.Boolean("--install-if-needed",{description:"Run a preliminary `yarn install` if the package contains build scripts"})],O.prototype,"installIfNeeded",void 0),(0,s.gn)([a.Command.Boolean("-n,--dry-run",{description:"Print the file paths without actually generating the package archive"})],O.prototype,"dryRun",void 0),(0,s.gn)([a.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],O.prototype,"json",void 0),(0,s.gn)([a.Command.String("--filename",{hidden:!1,description:"Create the archive at the specified path"}),a.Command.String("-o,--out",{description:"Create the archive at the specified path"})],O.prototype,"out",void 0),(0,s.gn)([a.Command.Path("pack")],O.prototype,"execute",null);const U=["dependencies","devDependencies","peerDependencies"],T={hooks:{beforeWorkspacePacking:(e,t)=>{t.publishConfig&&(t.publishConfig.main&&(t.main=t.publishConfig.main),t.publishConfig.browser&&(t.browser=t.publishConfig.browser),t.publishConfig.module&&(t.module=t.publishConfig.module),t.publishConfig.browser&&(t.browser=t.publishConfig.browser),t.publishConfig.bin&&(t.bin=t.publishConfig.bin));const r=e.project;for(const A of U)for(const s of e.manifest.getForScope(A).values()){const e=r.tryWorkspaceByDescriptor(s),a=n.parseRange(s.range);if("workspace:"===a.protocol)if(null===e){if(null===r.tryWorkspaceByIdent(s))throw new o.lk(i.b.WORKSPACE_NOT_FOUND,n.prettyDescriptor(r.configuration,s)+": No local workspace found for this range")}else{let r;r=n.areDescriptorsEqual(s,e.anchoredDescriptor)||"*"===a.selector?e.manifest.version:a.selector,t[A][n.stringifyIdent(s)]=r}}}},commands:[O]}},29936:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>re,patchUtils:()=>A});var A={};r.r(A),r.d(A,{applyPatchFile:()=>S,diffFolders:()=>H,extractPackageToDisk:()=>G,isParentRequired:()=>j,loadPatchFiles:()=>Y,makeDescriptor:()=>O,makeLocator:()=>U,parseDescriptor:()=>x,parseLocator:()=>L,parsePatchFile:()=>D});var n=r(39922),o=r(35691),i=r(92659),s=r(54143),a=r(73632),c=r(43896),g=r(46009),l=r(90739),u=r(75448),h=r(65281),p=r(33720),d=r(6220),C=r(36545),f=r(78420);class I extends Error{constructor(e,t){super("Cannot apply hunk #"+(e+1)),this.hunk=t}}const E=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function B(e){return g.y1.relative(g.LZ.root,g.y1.resolve(g.LZ.root,g.cS.toPortablePath(e)))}function y(e){const t=e.trim().match(E);if(!t)throw new Error(`Bad header line: '${e}'`);return{original:{start:Math.max(Number(t[1]),1),length:Number(t[3]||1)},patched:{start:Math.max(Number(t[4]),1),length:Number(t[6]||1)}}}var m;!function(e){e.Context="context",e.Insertion="insertion",e.Deletion="deletion"}(m||(m={}));const w={"@":"header","-":m.Deletion,"+":m.Insertion," ":m.Context,"\\":"pragma",undefined:m.Context};function Q(e){const t=511&parseInt(e,8);if(420!==t&&493!==t)throw new Error("Unexpected file mode string: "+e);return t}function D(e){const t=e.split(/\n/g);return""===t[t.length-1]&&t.pop(),function(e){const t=[];for(const r of e){const{semverExclusivity:e,diffLineFromPath:A,diffLineToPath:n,oldMode:o,newMode:i,deletedFileMode:s,newFileMode:c,renameFrom:g,renameTo:l,beforeHash:u,afterHash:h,fromPath:p,toPath:d,hunks:C}=r,f=g?"rename":s?"file deletion":c?"file creation":C&&C.length>0?"patch":"mode change";let I=null;switch(f){case"rename":if(!g||!l)throw new Error("Bad parser state: rename from & to not given");t.push({type:"rename",semverExclusivity:e,fromPath:B(g),toPath:B(l)}),I=l;break;case"file deletion":{const r=A||p;if(!r)throw new Error("Bad parse state: no path given for file deletion");t.push({type:"file deletion",semverExclusivity:e,hunk:C&&C[0]||null,path:B(r),mode:Q(s),hash:u})}break;case"file creation":{const r=n||d;if(!r)throw new Error("Bad parse state: no path given for file creation");t.push({type:"file creation",semverExclusivity:e,hunk:C&&C[0]||null,path:B(r),mode:Q(c),hash:h})}break;case"patch":case"mode change":I=d||n;break;default:a.assertNever(f)}I&&o&&i&&o!==i&&t.push({type:"mode change",semverExclusivity:e,path:B(I),oldMode:Q(o),newMode:Q(i)}),I&&C&&C.length&&t.push({type:"patch",semverExclusivity:e,path:B(I),hunks:C,beforeHash:u,afterHash:h})}return t}(function(e){const t=[];let r={semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null},A="parsing header",n=null,o=null;function i(){n&&(o&&(n.parts.push(o),o=null),r.hunks.push(n),n=null)}function s(){i(),t.push(r),r={semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}}for(let t=0;te<0?e:"+"+e;throw new Error(`hunk header integrity check failed (expected @@ ${A(e.header.original.length)} ${A(e.header.patched.length)} @@, got @@ ${A(t)} ${A(r)} @@)`)}}async function v(e,t,r){const A=await e.lstatPromise(t),n=await r();if(void 0!==n&&(t=n),e.lutimesPromise)await e.lutimesPromise(t,A.atime,A.mtime);else{if(A.isSymbolicLink())throw new Error("Cannot preserve the time values of a symlink");await e.utimesPromise(t,A.atime,A.mtime)}}async function S(e,{baseFs:t=new f.S,dryRun:r=!1,version:A=null}={}){for(const n of e)if(null===n.semverExclusivity||null===A||C.satisfiesWithPrereleases(A,n.semverExclusivity))switch(n.type){case"file deletion":if(r){if(!t.existsSync(n.path))throw new Error("Trying to delete a file that doesn't exist: "+n.path)}else await v(t,g.y1.dirname(n.path),async()=>{await t.unlinkPromise(n.path)});break;case"rename":if(r){if(!t.existsSync(n.fromPath))throw new Error("Trying to move a file that doesn't exist: "+n.fromPath)}else await v(t,g.y1.dirname(n.fromPath),async()=>{await v(t,g.y1.dirname(n.toPath),async()=>{await v(t,n.fromPath,async()=>(await t.movePromise(n.fromPath,n.toPath),n.toPath))})});break;case"file creation":if(r){if(t.existsSync(n.path))throw new Error("Trying to create a file that already exists: "+n.path)}else{const e=n.hunk?n.hunk.parts[0].lines.join("\n")+(n.hunk.parts[0].noNewlineAtEndOfFile?"":"\n"):"";await t.mkdirpPromise(g.y1.dirname(n.path),{chmod:493,utimes:[315532800,315532800]}),await t.writeFilePromise(n.path,e,{mode:n.mode}),await t.utimesPromise(n.path,315532800,315532800)}break;case"patch":await v(t,n.path,async()=>{await F(n,{baseFs:t,dryRun:r})});break;case"mode change":{const e=(await t.statPromise(n.path)).mode;if(k(n.newMode)!==k(e))continue;await v(t,n.path,async()=>{await t.chmodPromise(n.path,n.newMode)})}break;default:a.assertNever(n)}}function k(e){return(64&e)>0}function N(e){return e.replace(/\s+$/,"")}async function F({hunks:e,path:t},{baseFs:r,dryRun:A=!1}){const n=await r.statSync(t).mode,o=(await r.readFileSync(t,"utf8")).split(/\n/),i=[];let s=0,c=0;for(const t of e){const r=Math.max(c,t.header.patched.start+s),A=Math.max(0,r-c),n=Math.max(0,o.length-r-t.header.original.length),a=Math.max(A,n);let g=0,l=0,u=null;for(;g<=a;){if(g<=A&&(l=r-g,u=K(t,o,l),null!==u)){g=-g;break}if(g<=n&&(l=r+g,u=K(t,o,l),null!==u))break;g+=1}if(null===u)throw new I(e.indexOf(t),t);i.push(u),s+=g,c=l+t.header.original.length}if(A)return;let g=0;for(const e of i)for(const t of e)switch(t.type){case"splice":{const e=t.index+g;o.splice(e,t.numToDelete,...t.linesToInsert),g+=t.linesToInsert.length-t.numToDelete}break;case"pop":o.pop();break;case"push":o.push(t.line);break;default:a.assertNever(t)}await r.writeFilePromise(t,o.join("\n"),{mode:n})}function K(e,t,r){const A=[];for(const o of e.parts)switch(o.type){case m.Context:case m.Deletion:for(const e of o.lines){const A=t[r];if(null==A||(n=e,N(A)!==N(n)))return null;r+=1}o.type===m.Deletion&&(A.push({type:"splice",index:r-o.lines.length,numToDelete:o.lines.length,linesToInsert:[]}),o.noNewlineAtEndOfFile&&A.push({type:"push",line:""}));break;case m.Insertion:A.push({type:"splice",index:r,numToDelete:0,linesToInsert:o.lines}),o.noNewlineAtEndOfFile&&A.push({type:"pop"});break;default:a.assertNever(o.type)}var n;return A}const M=/^builtin<([^>]+)>$/;function R(e,t){const{source:r,selector:A,params:n}=s.parseRange(e);if(null===r)throw new Error("Patch locators must explicitly define their source");const o=A?A.split(/&/).map(e=>g.cS.toPortablePath(e)):[],i=n&&"string"==typeof n.locator?s.parseLocator(n.locator):null,a=n&&"string"==typeof n.version?n.version:null;return{parentLocator:i,sourceItem:t(r),patchPaths:o,sourceVersion:a}}function x(e){const{sourceItem:t,...r}=R(e.range,s.parseDescriptor);return{...r,sourceDescriptor:t}}function L(e){const{sourceItem:t,...r}=R(e.reference,s.parseLocator);return{...r,sourceLocator:t}}function P({parentLocator:e,sourceItem:t,patchPaths:r,sourceVersion:A,patchHash:n},o){const i=null!==e?{locator:s.stringifyLocator(e)}:{},a=void 0!==A?{version:A}:{},c=void 0!==n?{hash:n}:{};return s.makeRange({protocol:"patch:",source:o(t),selector:r.join("&"),params:{...a,...c,...i}})}function O(e,{parentLocator:t,sourceDescriptor:r,patchPaths:A}){return s.makeLocator(e,P({parentLocator:t,sourceItem:r,patchPaths:A},s.stringifyDescriptor))}function U(e,{parentLocator:t,sourcePackage:r,patchPaths:A,patchHash:n}){return s.makeLocator(e,P({parentLocator:t,sourceItem:r,sourceVersion:r.version,patchPaths:A,patchHash:n},s.stringifyLocator))}function T({onAbsolute:e,onRelative:t,onBuiltin:r},A){const n=A.match(M);return null!==n?r(n[1]):g.y1.isAbsolute(A)?e(A):t(A)}function j(e){return T({onAbsolute:()=>!1,onRelative:()=>!0,onBuiltin:()=>!1},e)}async function Y(e,t,r){const A=null!==e?await r.fetcher.fetch(e,r):null,n=A&&A.localPath?{packageFs:new u.M(g.LZ.root),prefixPath:g.y1.relative(g.LZ.root,A.localPath)}:A;A&&A!==n&&A.releaseFs&&A.releaseFs();return(await a.releaseAfterUseAsync(async()=>await Promise.all(t.map(async e=>T({onAbsolute:async()=>await c.xfs.readFilePromise(e,"utf8"),onRelative:async()=>{if(null===A)throw new Error("Assertion failed: The parent locator should have been fetched");return await A.packageFs.readFilePromise(e,"utf8")},onBuiltin:async e=>await r.project.configuration.firstHook(e=>e.getBuiltinPatch,r.project,e)},e))))).map(e=>"string"==typeof e?e.replace(/\r\n?/g,"\n"):e)}async function G(e,{cache:t,project:r}){const A=r.storedChecksums,n=new p.$,o=r.configuration.makeFetcher(),i=await o.fetch(e,{cache:t,project:r,fetcher:o,checksums:A,report:n}),a=await c.xfs.mktempPromise();return await c.xfs.copyPromise(a,i.prefixPath,{baseFs:i.packageFs}),await c.xfs.writeJsonPromise(g.y1.join(a,".yarn-patch.json"),{locator:s.stringifyLocator(e)}),c.xfs.detachTemp(a),a}async function H(e,t){const r=g.cS.fromPortablePath(e).replace(/\\/g,"/"),A=g.cS.fromPortablePath(t).replace(/\\/g,"/"),{stdout:n}=await d.execvp("git",["diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index",r,A],{cwd:g.cS.toPortablePath(process.cwd())}),o=r.startsWith("/")?e=>e.slice(1):e=>e;return n.replace(new RegExp(`(a|b)(${a.escapeRegExp(`/${o(r)}/`)})`,"g"),"$1/").replace(new RegExp("(a|b)"+a.escapeRegExp(`/${o(A)}/`),"g"),"$1/").replace(new RegExp(a.escapeRegExp(r+"/"),"g"),"").replace(new RegExp(a.escapeRegExp(A+"/"),"g"),"")}var J=r(71643);function q(e,{configuration:t,report:r}){for(const A of e.parts)for(const e of A.lines)switch(A.type){case m.Context:r.reportInfo(null," "+J.pretty(t,e,"grey"));break;case m.Deletion:r.reportError(i.b.FROZEN_LOCKFILE_EXCEPTION,"- "+J.pretty(t,e,J.Type.REMOVED));break;case m.Insertion:r.reportError(i.b.FROZEN_LOCKFILE_EXCEPTION,"+ "+J.pretty(t,e,J.Type.ADDED));break;default:a.assertNever(A.type)}}var z=r(20624);var W=r(36370),X=r(25413),V=r(85824),_=r(28148),Z=r(40822);class $ extends X.BaseCommand{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await V.I.find(e,this.context.cwd),A=await _.C.find(e);if(!r)throw new X.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();const o=g.y1.resolve(this.context.cwd,g.cS.toPortablePath(this.patchFolder)),i=g.y1.join(o,".yarn-patch.json");if(!c.xfs.existsSync(i))throw new Z.UsageError("The argument folder didn't get created by 'yarn patch'");const a=await c.xfs.readJsonPromise(i),l=s.parseLocator(a.locator,!0);if(!t.storedPackages.has(l.locatorHash))throw new Z.UsageError("No package found in the project for the given locator");const u=await G(l,{cache:A,project:t});this.context.stdout.write(await H(u,o))}}$.usage=Z.Command.Usage({description:"\n This will turn the folder passed in parameter into a patchfile suitable for consumption with the `patch:` protocol.\n\n Only folders generated through `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "}),(0,W.gn)([Z.Command.String()],$.prototype,"patchFolder",void 0),(0,W.gn)([Z.Command.Path("patch-commit")],$.prototype,"execute",null);var ee=r(15815);class te extends X.BaseCommand{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await V.I.find(e,this.context.cwd),A=await _.C.find(e);if(!r)throw new X.WorkspaceRequiredError(t.cwd,this.context.cwd);await t.restoreInstallState();let o=s.parseLocator(this.package);if("unknown"===o.reference){const r=a.mapAndFilter([...t.storedPackages.values()],e=>e.identHash!==o.identHash||s.isVirtualLocator(e)?a.mapAndFilter.skip:e);if(0===r.length)throw new Z.UsageError("No package found in the project for the given locator");if(r.length>1)throw new Z.UsageError("Multiple candidate packages found; explicitly choose one of them (use `yarn why ` to get more information as to who depends on them):\n"+r.map(t=>"\n- "+s.prettyLocator(e,t)).join(""));o=r[0]}if(!t.storedPackages.has(o.locatorHash))throw new Z.UsageError("No package found in the project for the given locator");await ee.Pk.start({configuration:e,stdout:this.context.stdout},async r=>{const n=await G(o,{cache:A,project:t});r.reportInfo(i.b.UNNAMED,`Package ${s.prettyLocator(e,o)} got extracted with success!`),r.reportInfo(i.b.UNNAMED,"You can now edit the following folder: "+J.pretty(e,g.cS.fromPortablePath(n),"magenta")),r.reportInfo(i.b.UNNAMED,`Once you are done run ${J.pretty(e,"yarn patch-commit "+g.cS.fromPortablePath(n),"cyan")} and Yarn will store a patchfile based on your changes.`)})}}te.usage=Z.Command.Usage({description:'\n This command will cause a package to be extracted in a temporary directory (under a folder named "patch-workdir"). This folder will be editable at will; running `yarn patch` inside it will then cause Yarn to generate a patchfile and register it into your top-level manifest (cf the `patch:` protocol).\n '}),(0,W.gn)([Z.Command.String()],te.prototype,"package",void 0),(0,W.gn)([Z.Command.Path("patch")],te.prototype,"execute",null);const re={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:n.a2.BOOLEAN,default:!1}},commands:[$,te],fetchers:[class{supports(e,t){return!!e.reference.startsWith("patch:")}getLocalPath(e,t){return null}async fetch(e,t){const r=t.checksums.get(e.locatorHash)||null,[A,n,o]=await t.cache.fetchPackageFromCache(e,r,{onHit:()=>t.report.reportCacheHit(e),onMiss:()=>t.report.reportCacheMiss(e,s.prettyLocator(t.project.configuration,e)+" can't be found in the cache and will be fetched from the disk"),loader:()=>this.patchPackage(e,t),skipIntegrityCheck:t.skipIntegrityCheck});return{packageFs:A,releaseFs:n,prefixPath:s.getIdentVendorPath(e),localPath:this.getLocalPath(e,t),checksum:o}}async patchPackage(e,t){const{parentLocator:r,sourceLocator:A,sourceVersion:n,patchPaths:p}=L(e),d=await Y(r,p,t),C=await c.xfs.mktempPromise(),f=g.y1.join(C,"patched.zip"),E=await t.fetcher.fetch(A,t),B=s.getIdentVendorPath(e),y=await(0,h.getLibzipPromise)(),m=new l.d(f,{libzip:y,create:!0,level:t.project.configuration.get("compressionLevel")});await m.mkdirpPromise(B),await a.releaseAfterUseAsync(async()=>{await m.copyPromise(B,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs);const w=new u.M(g.y1.resolve(g.LZ.root,B),{baseFs:m});for(const e of d)if(null!==e)try{await S(D(e),{baseFs:w,version:n})}catch(e){if(!(e instanceof I))throw e;const r=t.project.configuration.get("enableInlineHunks"),A=r?"":" (set enableInlineHunks for details)";throw new o.lk(i.b.PATCH_HUNK_FAILED,e.message+A,A=>{r&&q(e.hunk,{configuration:t.project.configuration,report:A})})}return m}}],resolvers:[class{supportsDescriptor(e,t){return!!e.range.startsWith("patch:")}supportsLocator(e,t){return!!e.reference.startsWith("patch:")}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){const{patchPaths:A}=x(e);return A.every(e=>!j(e))?e:s.bindDescriptor(e,{locator:s.stringifyLocator(t)})}getResolutionDependencies(e,t){const{sourceDescriptor:r}=x(e);return[r]}async getCandidates(e,t,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");const{parentLocator:A,sourceDescriptor:n,patchPaths:o}=x(e),i=await Y(A,o,r.fetchOptions),s=t.get(n.descriptorHash);if(void 0===s)throw new Error("Assertion failed: The dependency should have been resolved");return[U(e,{parentLocator:A,sourcePackage:s,patchPaths:o,patchHash:z.makeHash("2",...i).slice(0,6)})]}async getSatisfying(e,t,r){return null}async resolve(e,t){const{sourceLocator:r}=L(e);return{...await t.resolver.resolve(r,t),...e}}}]}},83228:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PnpInstaller:()=>k,PnpLinker:()=>S,default:()=>Y,getPnpPath:()=>T,jsInstallUtils:()=>A,pnpUtils:()=>n,quotePathIfNeeded:()=>j});var A={};r.r(A),r.d(A,{checkAndReportManifestCompatibility:()=>y,extractBuildScripts:()=>m,getExtractHint:()=>Q,hasBindingGyp:()=>D});var n={};r.r(n),r.d(n,{getUnpluggedPath:()=>b});var o=r(39922),i=r(43896),s=r(46009),a=r(53887),c=r.n(a),g=r(54143),l=r(71643),u=r(73632),h=r(32485),p=r(92659),d=r(46611),C=r(17674),f=r(75448),I=r(34432),E=r(40822),B=r(92409);function y(e,t,r,{configuration:A,report:n}){return d.G.isManifestFieldCompatible(t.manifest.os,process.platform)?!!d.G.isManifestFieldCompatible(t.manifest.cpu,process.arch)||(null==n||n.reportWarningOnce(p.b.INCOMPATIBLE_CPU,`${g.prettyLocator(A,e)} The CPU architecture ${process.arch} is incompatible with this module, ${r} skipped.`),!1):(null==n||n.reportWarningOnce(p.b.INCOMPATIBLE_OS,`${g.prettyLocator(A,e)} The platform ${process.platform} is incompatible with this module, ${r} skipped.`),!1)}function m(e,t,r,{configuration:A,report:n}){const o=[];for(const e of["preinstall","install","postinstall"])t.manifest.scripts.has(e)&&o.push([B.k.SCRIPT,e]);if(!t.manifest.scripts.has("install")&&t.misc.hasBindingGyp&&o.push([B.k.SHELLCODE,"node-gyp rebuild"]),0===o.length)return[];if(!A.get("enableScripts")&&!r.built)return null==n||n.reportWarningOnce(p.b.DISABLED_BUILD_SCRIPTS,g.prettyLocator(A,e)+" lists build scripts, but all build scripts have been disabled."),[];if(e.linkType!==h.Un.HARD)return null==n||n.reportWarningOnce(p.b.SOFT_LINK_BUILD,g.prettyLocator(A,e)+" lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored."),[];if(r&&!1===r.built)return null==n||n.reportInfoOnce(p.b.BUILD_DISABLED,g.prettyLocator(A,e)+" lists build scripts, but its build has been explicitly disabled through configuration."),[];return y(e,t,"build",{configuration:A,report:n})?o:[]}const w=new Set([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function Q(e){return e.packageFs.getExtractHint({relevantExtensions:w})}function D(e){const t=s.y1.join(e.prefixPath,"binding.gyp");return e.packageFs.existsSync(t)}function b(e,{configuration:t}){return s.y1.resolve(t.get("pnpUnpluggedFolder"),g.slugifyLocator(e))}const v=new Set([g.makeIdent(null,"nan").identHash,g.makeIdent(null,"node-gyp").identHash,g.makeIdent(null,"node-pre-gyp").identHash,g.makeIdent(null,"node-addon-api").identHash,g.makeIdent(null,"fsevents").identHash]);class S{constructor(){this.mode="strict"}supportsPackage(e,t){return"pnp"===t.project.configuration.get("nodeLinker")&&t.project.configuration.get("pnpMode")===this.mode}async findPackageLocation(e,t){const r=T(t.project).main;if(!i.xfs.existsSync(r))throw new E.UsageError(`The project in ${l.pretty(t.project.configuration,t.project.cwd+"/package.json",l.Type.PATH)} doesn't seem to have been installed - running an install there might help`);const A=u.dynamicRequireNoCache(r),n={name:g.requirableIdent(e),reference:e.reference},o=A.getPackageInformation(n);if(!o)throw new E.UsageError(`Couldn't find ${g.prettyLocator(t.project.configuration,e)} in the currently installed PnP map - running an install might help`);return s.cS.toPortablePath(o.packageLocation)}async findPackageLocator(e,t){const A=T(t.project).main;if(!i.xfs.existsSync(A))return null;const n=s.cS.fromPortablePath(A),o=u.dynamicRequire(n);delete r.c[n];const a=o.findPackageLocator(s.cS.fromPortablePath(e));return a?g.makeLocator(g.parseIdent(a.name),a.reference):null}makeInstaller(e){return new k(e)}}class k{constructor(e){this.opts=e,this.mode="strict",this.packageRegistry=new Map,this.virtualTemplates=new Map,this.customData={store:new Map},this.unpluggedPaths=new Set,this.opts=e}getCustomDataKey(){return JSON.stringify({name:"PnpInstaller",version:1})}attachCustomData(e){this.customData=e}async installPackage(e,t){const r=g.requirableIdent(e),A=e.reference,n=!!this.opts.project.tryWorkspaceByLocator(e),o=e.peerDependencies.size>0&&!g.isVirtualLocator(e),i=!o&&!n,a=!o&&e.linkType!==h.Un.SOFT;let c=this.customData.store.get(e.locatorHash);void 0===c&&(c=await async function(e,t){var r;const A=null!==(r=await d.G.tryFind(t.prefixPath,{baseFs:t.packageFs}))&&void 0!==r?r:new d.G,n=new Set(["preinstall","install","postinstall"]);for(const e of A.scripts.keys())n.has(e)||A.scripts.delete(e);return{manifest:{os:A.os,cpu:A.cpu,scripts:A.scripts,preferUnplugged:A.preferUnplugged},misc:{extractHint:Q(t),hasBindingGyp:D(t)}}}(0,t),e.linkType===h.Un.HARD&&this.customData.store.set(e.locatorHash,c));const l=this.opts.project.getDependencyMeta(e,e.version),p=i?m(e,c,l,{configuration:this.opts.project.configuration,report:this.opts.report}):[],f=a?await this.unplugPackageIfNeeded(e,c,t,l):t.packageFs;if(s.y1.isAbsolute(t.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${t.prefixPath}) to be relative to the parent`);const I=s.y1.resolve(f.getRealPath(),t.prefixPath),E=N(this.opts.project.cwd,I),B=new Map,y=new Set;if(g.isVirtualLocator(e)){for(const t of e.peerDependencies.values())B.set(g.requirableIdent(t),null),y.add(g.stringifyIdent(t));if(!this.opts.project.tryWorkspaceByLocator(e)){const t=g.devirtualizeLocator(e);this.virtualTemplates.set(t.locatorHash,{location:N(this.opts.project.cwd,C.p.resolveVirtual(I)),locator:t})}}return u.getMapWithDefault(this.packageRegistry,r).set(A,{packageLocation:E,packageDependencies:B,packagePeers:y,linkType:e.linkType,discardFromLookup:t.discardFromLookup||!1}),{packageLocation:I,buildDirective:p.length>0?p:null}}async attachInternalDependencies(e,t){const r=this.getPackageInformation(e);for(const[e,A]of t){const t=g.areIdentsEqual(e,A)?A.reference:[g.requirableIdent(A),A.reference];r.packageDependencies.set(g.requirableIdent(e),t)}}async attachExternalDependents(e,t){for(const r of t){this.getDiskInformation(r).packageDependencies.set(g.requirableIdent(e),e.reference)}}async finalizeInstall(){const e=new Set;for(const{locator:e,location:t}of this.virtualTemplates.values())u.getMapWithDefault(this.packageRegistry,g.stringifyIdent(e)).set(e.reference,{packageLocation:t,packageDependencies:new Map,packagePeers:new Set,linkType:h.Un.SOFT,discardFromLookup:!1});this.packageRegistry.set(null,new Map([[null,this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator)]]));const t=this.opts.project.configuration.get("pnpFallbackMode"),r=e,A=this.opts.project.workspaces.map(({anchoredLocator:e})=>({name:g.requirableIdent(e),reference:e.reference})),n="none"!==t,o=[],i=new Map,s=u.buildIgnorePattern([".yarn/sdks/**",...this.opts.project.configuration.get("pnpIgnorePatterns")]),a=this.packageRegistry,c=this.opts.project.configuration.get("pnpShebang");if("dependencies-only"===t)for(const e of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(e)&&o.push({name:g.requirableIdent(e),reference:e.reference});return await this.finalizeInstallWithPnp({blacklistedLocations:r,dependencyTreeRoots:A,enableTopLevelFallback:n,fallbackExclusionList:o,fallbackPool:i,ignorePattern:s,packageRegistry:a,shebang:c}),{customData:this.customData}}async finalizeInstallWithPnp(e){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;const t=T(this.opts.project),r=this.opts.project.configuration.get("pnpDataPath");if(await i.xfs.removePromise(t.other),"pnp"!==this.opts.project.configuration.get("nodeLinker"))return await i.xfs.removePromise(t.main),void await i.xfs.removePromise(r);const A=await this.locateNodeModules(e.ignorePattern);if(A.length>0){this.opts.report.reportWarning(p.b.DANGEROUS_NODE_MODULES,"One or more node_modules have been detected and will be removed. This operation may take some time.");for(const e of A)await i.xfs.removePromise(e)}if(this.opts.project.configuration.get("pnpEnableInlining")){const A=(0,I.gY)(e);await i.xfs.changeFilePromise(t.main,A,{automaticNewlines:!0}),await i.xfs.chmodPromise(t.main,493),await i.xfs.removePromise(r)}else{const A=s.y1.relative(s.y1.dirname(t.main),r),{dataFile:n,loaderFile:o}=(0,I.Q$)({...e,dataLocation:A});await i.xfs.changeFilePromise(t.main,o,{automaticNewlines:!0}),await i.xfs.chmodPromise(t.main,493),await i.xfs.changeFilePromise(r,n,{automaticNewlines:!0}),await i.xfs.chmodPromise(r,420)}const n=this.opts.project.configuration.get("pnpUnpluggedFolder");if(0===this.unpluggedPaths.size)await i.xfs.removePromise(n);else for(const e of await i.xfs.readdirPromise(n)){const t=s.y1.resolve(n,e);this.unpluggedPaths.has(t)||await i.xfs.removePromise(t)}}async locateNodeModules(e){const t=[],r=e?new RegExp(e):null;for(const e of this.opts.project.workspaces){const A=s.y1.join(e.cwd,"node_modules");if(r&&r.test(s.y1.relative(this.opts.project.cwd,e.cwd))||!i.xfs.existsSync(A))continue;const n=await i.xfs.readdirPromise(A,{withFileTypes:!0}),o=n.filter(e=>!e.isDirectory()||".bin"===e.name||!e.name.startsWith("."));if(o.length===n.length)t.push(A);else for(const e of o)t.push(s.y1.join(A,e.name))}return t}async unplugPackageIfNeeded(e,t,r,A){return this.shouldBeUnplugged(e,t,A)?this.unplugPackage(e,r):r.packageFs}shouldBeUnplugged(e,t,r){return void 0!==r.unplugged?r.unplugged:!!v.has(e.identHash)||(null!==t.manifest.preferUnplugged?t.manifest.preferUnplugged:!!(m(e,t,r,{configuration:this.opts.project.configuration}).length>0||t.misc.extractHint))}async unplugPackage(e,t){const r=b(e,{configuration:this.opts.project.configuration});this.unpluggedPaths.add(r);const A=s.y1.join(r,t.prefixPath,".ready");return await i.xfs.existsPromise(A)||(await i.xfs.mkdirPromise(r,{recursive:!0}),await i.xfs.copyPromise(r,s.LZ.dot,{baseFs:t.packageFs,overwrite:!1}),await i.xfs.writeFilePromise(A,"")),new f.M(r)}getPackageInformation(e){const t=g.requirableIdent(e),r=e.reference,A=this.packageRegistry.get(t);if(!A)throw new Error(`Assertion failed: The package information store should have been available (for ${g.prettyIdent(this.opts.project.configuration,e)})`);const n=A.get(r);if(!n)throw new Error(`Assertion failed: The package information should have been available (for ${g.prettyLocator(this.opts.project.configuration,e)})`);return n}getDiskInformation(e){const t=u.getMapWithDefault(this.packageRegistry,"@@disk"),r=N(this.opts.project.cwd,e);return u.getFactoryWithDefault(t,r,()=>({packageLocation:r,packageDependencies:new Map,packagePeers:new Set,linkType:h.Un.SOFT,discardFromLookup:!1}))}}function N(e,t){let r=s.y1.relative(e,t);return r.match(/^\.{0,2}\//)||(r="./"+r),r.replace(/\/?$/,"/")}var F=r(36370),K=r(25413),M=r(85824),R=r(28148),x=r(15815),L=r(36545),P=r(2401),O=r.n(P);class U extends K.BaseCommand{constructor(){super(...arguments),this.patterns=[],this.all=!1,this.recursive=!1,this.json=!1}async execute(){const e=await o.VK.find(this.context.cwd,this.context.plugins),{project:t,workspace:r}=await M.I.find(e,this.context.cwd),A=await R.C.find(e);if(!r)throw new K.WorkspaceRequiredError(t.cwd,this.context.cwd);if("pnp"!==e.get("nodeLinker"))throw new E.UsageError("This command can only be used if the `nodeLinker` option is set to `pnp`");await t.restoreInstallState();const n=new Set(this.patterns),i=this.patterns.map(t=>{const r=g.parseDescriptor(t),A="unknown"!==r.range?r:g.makeDescriptor(r,"*");if(!c().validRange(A.range))throw new E.UsageError(`The range of the descriptor patterns must be a valid semver range (${g.prettyDescriptor(e,A)})`);return e=>{const r=g.stringifyIdent(e);return!!O().isMatch(r,g.stringifyIdent(A))&&(!(e.version&&!L.satisfiesWithPrereleases(e.version,A.range))&&(n.delete(t),!0))}}),s=e=>{const r=new Set,A=[],n=(e,o)=>{if(!r.has(e.locatorHash)&&(r.add(e.locatorHash),!t.tryWorkspaceByLocator(e)&&i.some(t=>t(e))&&A.push(e),!(o>0)||this.recursive))for(const r of e.dependencies.values()){const e=t.storedResolutions.get(r.descriptorHash);if(!e)throw new Error("Assertion failed: The resolution should have been registered");const A=t.storedPackages.get(e);if(!A)throw new Error("Assertion failed: The package should have been registered");n(A,o+1)}};for(const r of e){const e=t.storedPackages.get(r.anchoredLocator.locatorHash);if(!e)throw new Error("Assertion failed: The package should have been registered");n(e,0)}return A};let a,h;if(this.all&&this.recursive?(a=(()=>{const e=[];for(const r of t.storedPackages.values())t.tryWorkspaceByLocator(r)||g.isVirtualLocator(r)||!i.some(e=>e(r))||e.push(r);return e})(),h="the project"):this.all?(a=s(t.workspaces),h="any workspace"):(a=s([r]),h="this workspace"),n.size>1)throw new E.UsageError(`Patterns ${l.prettyList(e,n,l.Type.CODE)} don't match any packages referenced by ${h}`);if(n.size>0)throw new E.UsageError(`Pattern ${l.prettyList(e,n,l.Type.CODE)} doesn't match any packages referenced by ${h}`);a=u.sortMap(a,e=>g.stringifyLocator(e));return(await x.Pk.start({configuration:e,stdout:this.context.stdout,json:this.json},async r=>{var n;for(const A of a){const o=null!==(n=A.version)&&void 0!==n?n:"unknown";t.topLevelWorkspace.manifest.ensureDependencyMeta(g.makeDescriptor(A,o)).unplugged=!0,r.reportInfo(p.b.UNNAMED,`Will unpack ${g.prettyLocator(e,A)} to ${l.pretty(e,b(A,{configuration:e}),l.Type.PATH)}`),r.reportJson({locator:g.stringifyLocator(A),version:o})}await t.topLevelWorkspace.persistManifest(),r.reportSeparator(),await t.install({cache:A,report:r})})).exitCode()}}U.usage=E.Command.Usage({description:"force the unpacking of a list of packages",details:"\n This command will add the selectors matching the specified patterns to the list of packages that must be unplugged when installed.\n\n A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `pnpUnpluggedFolder`. Note that unpacking packages this way is generally not recommended because it'll make it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\n\n Running the command will set a persistent flag inside your top-level `package.json`, in the `dependenciesMeta` field. As such, to undo its effects, you'll need to revert the changes made to the manifest and run `yarn install` to apply the modification.\n\n By default, only direct dependencies from the current workspace are affected. If `-A,--all` is set, direct dependencies from the entire project are affected. Using the `-R,--recursive` flag will affect transitive dependencies as well as direct ones.\n\n This command accepts glob patterns inside the scope and name components (not the range). Make sure to escape the patterns to prevent your own shell from trying to expand them.\n ",examples:[["Unplug the lodash dependency from the active workspace","yarn unplug lodash"],["Unplug all instances of lodash referenced by any workspace","yarn unplug lodash -A"],["Unplug all instances of lodash referenced by the active workspace and its dependencies","yarn unplug lodash -R"],["Unplug all instances of lodash, anywhere","yarn unplug lodash -AR"],["Unplug one specific version of lodash","yarn unplug lodash@1.2.3"],["Unplug all packages with the `@babel` scope","yarn unplug '@babel/*'"],["Unplug all packages (only for testing, not recommended)","yarn unplug -R '*'"]]}),(0,F.gn)([E.Command.Rest()],U.prototype,"patterns",void 0),(0,F.gn)([E.Command.Boolean("-A,--all",{description:"Unplug direct dependencies from the entire project"})],U.prototype,"all",void 0),(0,F.gn)([E.Command.Boolean("-R,--recursive",{description:"Unplug both direct and transitive dependencies"})],U.prototype,"recursive",void 0),(0,F.gn)([E.Command.Boolean("--json",{description:"Format the output as an NDJSON stream"})],U.prototype,"json",void 0),(0,F.gn)([E.Command.Path("unplug")],U.prototype,"execute",null);const T=e=>{let t,r;return"module"===e.topLevelWorkspace.manifest.type?(t=".pnp.cjs",r=".pnp.js"):(t=".pnp.js",r=".pnp.cjs"),{main:s.y1.join(e.cwd,t),other:s.y1.join(e.cwd,r)}},j=e=>/\s/.test(e)?JSON.stringify(e):e;const Y={hooks:{populateYarnPaths:async function(e,t){t(T(e).main),t(T(e).other),t(e.configuration.get("pnpDataPath")),t(e.configuration.get("pnpUnpluggedFolder"))},setupScriptEnvironment:async function(e,t,r){const A=T(e).main,n="--require "+j(s.cS.fromPortablePath(A));if(A.includes(" ")&&c().lt(process.versions.node,"12.0.0"))throw new Error(`Expected the build location to not include spaces when using Node < 12.0.0 (${process.versions.node})`);if(i.xfs.existsSync(A)){let e=t.NODE_OPTIONS||"";const r=/\s*--require\s+\S*\.pnp\.c?js\s*/g;e=e.replace(r," ").trim(),e=e?`${n} ${e}`:n,t.NODE_OPTIONS=e}}},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: "pnp", "node-modules"',type:o.a2.STRING,default:"pnp"},pnpMode:{description:"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.",type:o.a2.STRING,default:"strict"},pnpShebang:{description:"String to prepend to the generated PnP script",type:o.a2.STRING,default:"#!/usr/bin/env node"},pnpIgnorePatterns:{description:"Array of glob patterns; files matching them will use the classic resolution",type:o.a2.STRING,default:[],isArray:!0},pnpEnableInlining:{description:"If true, the PnP data will be inlined along with the generated loader",type:o.a2.BOOLEAN,default:!0},pnpFallbackMode:{description:"If true, the generated PnP loader will follow the top-level fallback rule",type:o.a2.STRING,default:"dependencies-only"},pnpUnpluggedFolder:{description:"Folder where the unplugged packages must be stored",type:o.a2.ABSOLUTE_PATH,default:"./.yarn/unplugged"},pnpDataPath:{description:"Path of the file where the PnP data (used by the loader) must be written",type:o.a2.ABSOLUTE_PATH,default:"./.pnp.data.json"}},linkers:[S],commands:[U]}},43418:(e,t,r)=>{"use strict";r.r(t);var A=r(50683),n=r.n(A);Object.fromEntries||(Object.fromEntries=n());var o=r(59355),i=r(10419),s=r(45330);(0,i.D)({binaryVersion:o.o||"",pluginConfiguration:(0,s.e)()})},25413:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseCommand:()=>A.F,WorkspaceRequiredError:()=>s,getDynamicLibs:()=>c,getPluginConfiguration:()=>g.e,main:()=>h.D,openWorkspace:()=>u,pluginCommands:()=>p.f});var A=r(56087),n=r(46611),o=r(46009),i=r(40822);class s extends i.UsageError{constructor(e,t){super(`This command can only be run from within a workspace of your project (${o.y1.relative(e,t)} isn't a workspace of ${o.y1.join(e,n.G.fileName)}).`)}}const a=["@yarnpkg/cli","@yarnpkg/core","@yarnpkg/fslib","@yarnpkg/libzip","@yarnpkg/parsers","@yarnpkg/shell","clipanion","semver","yup"],c=()=>new Map(a.map(e=>[e,r(98497)(e)]));var g=r(45330),l=r(85824);async function u(e,t){const{project:r,workspace:A}=await l.I.find(e,t);if(!A)throw new s(r.cwd,t);return A}var h=r(10419),p=r(15683)},10419:(e,t,r)=>{"use strict";r.d(t,{D:()=>f});var A=r(36545),n=r(39922),o=r(81832),i=r(43896),s=r(46009),a=r(63129),c=r(5864),g=r(40822),l=r(35747),u=r(15683),h=r(36370),p=r(71643),d=r(56087);class C extends d.F{async execute(){const e=await n.VK.find(this.context.cwd,this.context.plugins);this.context.stdout.write((e=>`\n${p.pretty(e,"Welcome on Yarn 2!","bold")} 🎉 Thanks for helping us shape our vision of how projects\nshould be managed going forward.\n\nBeing still in RC, Yarn 2 isn't completely stable yet. Some features might be\nmissing, and some behaviors may have received major overhaul. In case of doubt,\nuse the following URLs to get some insight:\n\n - The changelog:\n ${p.pretty(e,"https://github.com/yarnpkg/berry/tree/CHANGELOG.md","cyan")}\n\n - Our issue tracker:\n ${p.pretty(e,"https://github.com/yarnpkg/berry","cyan")}\n\n - Our Discord server:\n ${p.pretty(e,"https://discord.gg/yarnpkg","cyan")}\n\nWe're hoping you will enjoy the experience. For now, a good start is to run\nthe two following commands:\n\n ${p.pretty(e,"find . -name node_modules -prune -exec rm -r {} \\;","magenta")}\n ${p.pretty(e,"yarn install","magenta")}\n\nOne last trick! If you need at some point to upgrade Yarn to a nightly build,\nthe following command will install the CLI straight from master:\n\n ${p.pretty(e,"yarn set version from sources","magenta")}\n\nSee you later 👋\n`)(e).trim()+"\n")}}async function f({binaryVersion:e,pluginConfiguration:t}){async function r(){const h=new g.Cli({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:e});h.register(C);try{await async function h(p){var d,C,f,I,E;const B=process.versions.node,y=">=10.17 <14 || >14.1";if("1"!==process.env.YARN_IGNORE_NODE&&!A.satisfiesWithPrereleases(B,y))throw new g.UsageError(`This tool requires a Node version compatible with ${y} (got ${B}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);const m=await n.VK.find(s.cS.toPortablePath(process.cwd()),t,{usePath:!0,strict:!1}),w=m.get("yarnPath"),Q=m.get("ignorePath"),D=m.get("ignoreCwd");if(!Q&&!D&&w===s.cS.toPortablePath(s.cS.resolve(process.argv[1])))return process.env.YARN_IGNORE_PATH="1",process.env.YARN_IGNORE_CWD="1",void await h(p);if(null===w||Q){Q&&delete process.env.YARN_IGNORE_PATH;m.get("enableTelemetry")&&!c.isCI&&process.stdout.isTTY&&(n.VK.telemetry=new o.E(m,"puba9cdc10ec5790a2cf4969dd413a47270")),null===(d=n.VK.telemetry)||void 0===d||d.reportVersion(e);for(const[e,t]of m.plugins.entries()){u.f.has(null!==(f=null===(C=e.match(/^@yarnpkg\/plugin-(.*)$/))||void 0===C?void 0:C[1])&&void 0!==f?f:"")&&(null===(I=n.VK.telemetry)||void 0===I||I.reportPluginName(e));for(const e of t.commands||[])p.register(e)}const A=p.process(process.argv.slice(2));A.help||null===(E=n.VK.telemetry)||void 0===E||E.reportCommandName(A.path.join(" "));const i=A.cwd;if(void 0!==i&&!D){const e=(0,l.realpathSync)(process.cwd()),t=(0,l.realpathSync)(i);if(e!==t)return process.chdir(i),void await r()}await p.runExit(A,{cwd:s.cS.toPortablePath(process.cwd()),plugins:t,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr})}else if(i.xfs.existsSync(w))try{!function(e){const t=s.cS.fromPortablePath(e);process.on("SIGINT",()=>{}),t?(0,a.execFileSync)(process.execPath,[t,...process.argv.slice(2)],{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}}):(0,a.execFileSync)(t,process.argv.slice(2),{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}})}(w)}catch(e){process.exitCode=e.code||1}else process.stdout.write(p.error(new Error(`The "yarn-path" option has been set (in ${m.sources.get("yarnPath")}), but the specified location doesn't exist (${w}).`))),process.exitCode=1}(h)}catch(e){process.stdout.write(h.error(e)),process.exitCode=1}}return r().catch(e=>{process.stdout.write(e.stack||e.message),process.exitCode=1}).finally(()=>i.xfs.rmtempPromise())}(0,h.gn)([g.Command.Path("--welcome")],C.prototype,"execute",null)},15683:(e,t,r)=>{"use strict";r.d(t,{f:()=>A});const A=new Map([["constraints",[["constraints","query"],["constraints","source"],["constraints"]]],["exec",[]],["interactive-tools",[["search"],["upgrade-interactive"]]],["stage",[["stage"]]],["typescript",[]],["version",[["version","apply"],["version","check"],["version"]]],["workspace-tools",[["workspaces","focus"],["workspaces","foreach"]]]])},56087:(e,t,r)=>{"use strict";r.d(t,{F:()=>o});var A=r(36370),n=r(40822);class o extends n.Command{}(0,A.gn)([n.Command.String("--cwd",{hidden:!0})],o.prototype,"cwd",void 0)},28148:(e,t,r)=>{"use strict";r.d(t,{C:()=>I});var A=r(78420),n=r(15037),o=r(90739),i=r(14626),s=r(46009),a=r(43896),c=r(65281),g=r(35747),l=r.n(g),u=r(92659),h=r(35691),p=r(20624),d=r(73632),C=r(54143);const f=7;class I{constructor(e,{configuration:t,immutable:r=t.get("enableImmutableCache"),check:A=!1}){this.markedFiles=new Set,this.mutexes=new Map,this.configuration=t,this.cwd=e,this.immutable=r,this.check=A;const n=t.get("cacheKeyOverride");if(null!==n)this.cacheKey=""+n;else{const e=t.get("compressionLevel"),r=e!==o.k?"c"+e:"";this.cacheKey=[f,r].join("")}}static async find(e,{immutable:t,check:r}={}){const A=new I(e.get("cacheFolder"),{configuration:e,immutable:t,check:r});return await A.setup(),A}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;const e=this.configuration.get("globalFolder")+"/cache";return e!==this.cwd?e:null}getVersionFilename(e){return`${C.slugifyLocator(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,t){const r=function(e){const t=e.indexOf("/");return-1!==t?e.slice(t+1):e}(t).slice(0,10);return`${C.slugifyLocator(e)}-${r}.zip`}getLocatorPath(e,t){if(null===this.mirrorCwd)return s.y1.resolve(this.cwd,this.getVersionFilename(e));if(null===t)return null;return E(t)!==this.cacheKey?null:s.y1.resolve(this.cwd,this.getChecksumFilename(e,t))}getLocatorMirrorPath(e){const t=this.mirrorCwd;return null!==t?s.y1.resolve(t,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache")){await a.xfs.mkdirPromise(this.cwd,{recursive:!0});const e=s.y1.resolve(this.cwd,".gitignore");await a.xfs.changeFilePromise(e,"/.gitignore\n*.flock\n")}}async fetchPackageFromCache(e,t,{onHit:r,onMiss:g,loader:f,skipIntegrityCheck:I}){const B=this.getLocatorMirrorPath(e),y=new A.S,m=async(e,r=null)=>{const A=I&&t?t:`${this.cacheKey}/${await p.checksumFile(e)}`;if(null!==r){if(A!==(I&&t?t:`${this.cacheKey}/${await p.checksumFile(r)}`))throw new h.lk(u.b.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(null!==t&&A!==t){let e;switch(e=this.check?"throw":E(t)!==E(A)?"update":this.configuration.get("checksumBehavior"),e){case"ignore":return t;case"update":return A;default:case"throw":throw new h.lk(u.b.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the expected checksum")}}return A},w=async t=>{if(!f)throw new Error("Cache check required but no loader configured for "+C.prettyLocator(this.configuration,e));const r=await f(),A=r.getRealPath();return r.saveAndClose(),await a.xfs.chmodPromise(A,420),await m(t,A)},Q=async()=>{if(null===B||!await a.xfs.existsPromise(B)){const e=await f(),t=e.getRealPath();return e.saveAndClose(),t}const t=await a.xfs.mktempPromise(),r=s.y1.join(t,this.getVersionFilename(e));return await a.xfs.copyFilePromise(B,r,l().constants.COPYFILE_FICLONE),r},D=async()=>{if(!f)throw new Error("Cache entry required but missing for "+C.prettyLocator(this.configuration,e));if(this.immutable)throw new h.lk(u.b.IMMUTABLE_CACHE,"Cache entry required but missing for "+C.prettyLocator(this.configuration,e));const t=await Q();await a.xfs.chmodPromise(t,420);const r=await m(t),A=this.getLocatorPath(e,r);if(!A)throw new Error("Assertion failed: Expected the cache path to be available");return await this.writeFileWithLock(A,async()=>await this.writeFileWithLock(B,async()=>(await a.xfs.movePromise(t,A),null!==B&&await a.xfs.copyFilePromise(A,B,l().constants.COPYFILE_FICLONE),[A,r])))};for(let t;t=this.mutexes.get(e.locatorHash);)await t;const[b,v]=await(async()=>{const A=(async()=>{const A=this.getLocatorPath(e,t),n=null!==A&&await y.existsPromise(A),o=n?r:g;if(o&&o(),n){let e=null;const t=A;return e=this.check?await w(t):await m(t),[t,e]}return D()})();this.mutexes.set(e.locatorHash,A);try{return await A}finally{this.mutexes.delete(e.locatorHash)}})();this.markedFiles.add(b);let S=null;const k=await(0,c.getLibzipPromise)(),N=new n.v(()=>d.prettifySyncErrors(()=>S=new o.d(b,{baseFs:y,libzip:k,readOnly:!0}),t=>`Failed to open the cache entry for ${C.prettyLocator(this.configuration,e)}: ${t}`),s.y1);return[new i.K(b,{baseFs:N,pathUtils:s.y1}),()=>{null!==S&&S.discardAndClose()},v]}async writeFileWithLock(e,t){return null===e?await t():(await a.xfs.mkdirPromise(s.y1.dirname(e),{recursive:!0}),await a.xfs.lockPromise(e,async()=>await t()))}}function E(e){const t=e.indexOf("/");return-1!==t?e.slice(0,t):null}},39922:(e,t,r)=>{"use strict";r.d(t,{VK:()=>W,nh:()=>U,tr:()=>O,a5:()=>j,EW:()=>z,a2:()=>T});var A=r(43896),n=r(46009),o=r(90739),i=r(11640),s=r(54738),a=r.n(s),c=r(5864),g=r(40822),l=r(61578),u=r.n(l),h=r(53887),p=r.n(h),d=r(92413),C=r(92659),f=r(54143);const I={hooks:{reduceDependency:(e,t,r,A,{resolver:n,resolveOptions:o})=>{for(const{pattern:A,reference:i}of t.topLevelWorkspace.manifest.resolutions){if(A.from&&A.from.fullName!==f.requirableIdent(r))continue;if(A.from&&A.from.description&&A.from.description!==r.reference)continue;if(A.descriptor.fullName!==f.requirableIdent(e))continue;if(A.descriptor.description&&A.descriptor.description!==e.range)continue;return n.bindDescriptor(f.makeDescriptor(e,i),t.topLevelWorkspace.anchoredLocator,o)}return e},validateProject:async(e,t)=>{for(const r of e.workspaces){const A=f.prettyWorkspace(e.configuration,r);await e.configuration.triggerHook(e=>e.validateWorkspace,r,{reportWarning:(e,r)=>t.reportWarning(e,`${A}: ${r}`),reportError:(e,r)=>t.reportError(e,`${A}: ${r}`)})}},validateWorkspace:async(e,t)=>{const{manifest:r}=e;r.resolutions.length&&e.cwd!==e.project.cwd&&r.errors.push(new Error("Resolutions field will be ignored"));for(const e of r.errors)t.reportWarning(C.b.INVALID_MANIFEST,e.message)}}};var E=r(46611),B=r(35691);class y{constructor(e){this.fetchers=e}supports(e,t){return!!this.tryFetcher(e,t)}getLocalPath(e,t){return this.getFetcher(e,t).getLocalPath(e,t)}async fetch(e,t){const r=this.getFetcher(e,t);return await r.fetch(e,t)}tryFetcher(e,t){const r=this.fetchers.find(r=>r.supports(e,t));return r||null}getFetcher(e,t){const r=this.fetchers.find(r=>r.supports(e,t));if(!r)throw new B.lk(C.b.FETCHER_NOT_FOUND,f.prettyLocator(t.project.configuration,e)+" isn't supported by any available fetcher");return r}}var m=r(27092),w=r(52779),Q=r(60895);class D{static isVirtualDescriptor(e){return!!e.range.startsWith(D.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(D.protocol)}supportsDescriptor(e,t){return D.isVirtualDescriptor(e)}supportsLocator(e,t){return D.isVirtualLocator(e)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,t){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,t,r){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,t,r){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,t){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}}D.protocol="virtual:";var b=r(75448),v=r(94538);class S{supports(e){return!!e.reference.startsWith(v.d.protocol)}getLocalPath(e,t){return this.getWorkspace(e,t).cwd}async fetch(e,t){const r=this.getWorkspace(e,t).cwd;return{packageFs:new b.M(r),prefixPath:n.LZ.dot,localPath:r}}getWorkspace(e,t){return t.project.getWorkspaceByCwd(e.reference.slice(v.d.protocol.length))}}var k=r(81111),N=r(71643),F=r(73632),K=r(32282),M=r.n(K);function R(e){return("undefined"!=typeof require?require:r(32178))(e)}var x=r(36545),L=r(32485);const P=new Set(["binFolder","version","flags","profile","gpg","ignoreNode","wrapOutput"]),O=".yarnrc.yml",U="yarn.lock";var T;!function(e){e.ANY="ANY",e.BOOLEAN="BOOLEAN",e.ABSOLUTE_PATH="ABSOLUTE_PATH",e.LOCATOR="LOCATOR",e.LOCATOR_LOOSE="LOCATOR_LOOSE",e.NUMBER="NUMBER",e.STRING="STRING",e.SECRET="SECRET",e.SHAPE="SHAPE",e.MAP="MAP"}(T||(T={}));const j=N.Type,Y={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:T.STRING,default:null},yarnPath:{description:"Path to the local executable that must be used over the global one",type:T.ABSOLUTE_PATH,default:null},ignorePath:{description:"If true, the local executable will be ignored when using the global one",type:T.BOOLEAN,default:!1},ignoreCwd:{description:"If true, the `--cwd` flag will be ignored",type:T.BOOLEAN,default:!1},cacheKeyOverride:{description:"A global cache key override; used only for test purposes",type:T.STRING,default:null},globalFolder:{description:"Folder where are stored the system-wide settings",type:T.ABSOLUTE_PATH,default:k.getDefaultGlobalFolder()},cacheFolder:{description:"Folder where the cache files must be written",type:T.ABSOLUTE_PATH,default:"./.yarn/cache"},compressionLevel:{description:"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)",type:T.NUMBER,values:["mixed",0,1,2,3,4,5,6,7,8,9],default:o.k},virtualFolder:{description:"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named $$virtual)",type:T.ABSOLUTE_PATH,default:"./.yarn/$$virtual"},bstatePath:{description:"Path of the file where the current state of the built packages must be stored",type:T.ABSOLUTE_PATH,default:"./.yarn/build-state.yml"},lockfileFilename:{description:"Name of the files where the Yarn dependency tree entries must be stored",type:T.STRING,default:U},installStatePath:{description:"Path of the file where the install state will be persisted",type:T.ABSOLUTE_PATH,default:"./.yarn/install-state.gz"},immutablePatterns:{description:"Array of glob patterns; files matching them won't be allowed to change during immutable installs",type:T.STRING,default:[],isArray:!0},rcFilename:{description:"Name of the files where the configuration can be found",type:T.STRING,default:q()},enableGlobalCache:{description:"If true, the system-wide cache folder will be used regardless of `cache-folder`",type:T.BOOLEAN,default:!1},enableAbsoluteVirtuals:{description:"If true, the virtual symlinks will use absolute paths if required [non portable!!]",type:T.BOOLEAN,default:!1},enableColors:{description:"If true, the CLI is allowed to use colors in its output",type:T.BOOLEAN,default:N.supportsColor,defaultText:""},enableHyperlinks:{description:"If true, the CLI is allowed to use hyperlinks in its output",type:T.BOOLEAN,default:N.supportsHyperlinks,defaultText:""},enableInlineBuilds:{description:"If true, the CLI will print the build output on the command line",type:T.BOOLEAN,default:c.isCI,defaultText:""},enableProgressBars:{description:"If true, the CLI is allowed to show a progress bar for long-running events",type:T.BOOLEAN,default:!c.isCI&&process.stdout.isTTY&&process.stdout.columns>22,defaultText:""},enableTimers:{description:"If true, the CLI is allowed to print the time spent executing commands",type:T.BOOLEAN,default:!0},preferAggregateCacheInfo:{description:"If true, the CLI will only print a one-line report of any cache changes",type:T.BOOLEAN,default:c.isCI},preferInteractive:{description:"If true, the CLI will automatically use the interactive mode when called from a TTY",type:T.BOOLEAN,default:!1},preferTruncatedLines:{description:"If true, the CLI will truncate lines that would go beyond the size of the terminal",type:T.BOOLEAN,default:!1},progressBarStyle:{description:"Which style of progress bar should be used (only when progress bars are enabled)",type:T.STRING,default:void 0,defaultText:""},defaultLanguageName:{description:"Default language mode that should be used when a package doesn't offer any insight",type:T.STRING,default:"node"},defaultProtocol:{description:"Default resolution protocol used when resolving pure semver and tag ranges",type:T.STRING,default:"npm:"},enableTransparentWorkspaces:{description:"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol",type:T.BOOLEAN,default:!0},enableMirror:{description:"If true, the downloaded packages will be retrieved and stored in both the local and global folders",type:T.BOOLEAN,default:!0},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:T.BOOLEAN,default:!0},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:T.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:T.STRING,default:null},unsafeHttpWhitelist:{description:"List of the hostnames for which http queries are allowed (glob patterns are supported)",type:T.STRING,default:[],isArray:!0},httpTimeout:{description:"Timeout of each http request in milliseconds",type:T.NUMBER,default:6e4},httpRetry:{description:"Retry times on http failure",type:T.NUMBER,default:3},networkConcurrency:{description:"Maximal number of concurrent requests",type:T.NUMBER,default:1/0},networkSettings:{description:"Network settings per hostname (glob patterns are supported)",type:T.MAP,valueDefinition:{description:"",type:T.SHAPE,properties:{caFilePath:{description:"Path to file containing one or multiple Certificate Authority signing certificates",type:T.ABSOLUTE_PATH,default:null},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:T.BOOLEAN,default:null},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:T.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:T.STRING,default:null}}}},caFilePath:{description:"A path to a file containing one or multiple Certificate Authority signing certificates",type:T.ABSOLUTE_PATH,default:null},enableStrictSsl:{description:"If false, SSL certificate errors will be ignored",type:T.BOOLEAN,default:!0},logFilters:{description:"Overrides for log levels",type:T.SHAPE,isArray:!0,concatenateValues:!0,properties:{code:{description:"Code of the messages covered by this override",type:T.STRING,default:void 0},text:{description:"Code of the texts covered by this override",type:T.STRING,default:void 0},level:{description:"Log level override, set to null to remove override",type:T.STRING,values:Object.values(N.LogLevel),isNullable:!0,default:void 0}}},enableTelemetry:{description:"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry",type:T.BOOLEAN,default:!0},telemetryInterval:{description:"Minimal amount of time between two telemetry uploads, in days",type:T.NUMBER,default:7},telemetryUserId:{description:"If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.",type:T.STRING,default:null},enableScripts:{description:"If true, packages are allowed to have install scripts by default",type:T.BOOLEAN,default:!0},enableImmutableCache:{description:"If true, the cache is reputed immutable and actions that would modify it will throw",type:T.BOOLEAN,default:!1},checksumBehavior:{description:"Enumeration defining what to do when a checksum doesn't match expectations",type:T.STRING,default:"throw"},packageExtensions:{description:"Map of package corrections to apply on the dependency tree",type:T.MAP,valueDefinition:{description:"The extension that will be applied to any package whose version matches the specified range",type:T.SHAPE,properties:{dependencies:{description:"The set of dependencies that must be made available to the current package in order for it to work properly",type:T.MAP,valueDefinition:{description:"A range",type:T.STRING}},peerDependencies:{description:"Inherited dependencies - the consumer of the package will be tasked to provide them",type:T.MAP,valueDefinition:{description:"A semver range",type:T.STRING}},peerDependenciesMeta:{description:"Extra information related to the dependencies listed in the peerDependencies field",type:T.MAP,valueDefinition:{description:"The peerDependency meta",type:T.SHAPE,properties:{optional:{description:"If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error",type:T.BOOLEAN,default:!1}}}}}}}};function G(e,t,r,A,n){if(A.isArray)return Array.isArray(r)?r.map((r,o)=>H(e,`${t}[${o}]`,r,A,n)):String(r).split(/,/).map(r=>H(e,t,r,A,n));if(Array.isArray(r))throw new Error(`Non-array configuration settings "${t}" cannot be an array`);return H(e,t,r,A,n)}function H(e,t,r,A,o){var i;switch(A.type){case T.ANY:return r;case T.SHAPE:return function(e,t,r,A,n){if("object"!=typeof r||Array.isArray(r))throw new g.UsageError(`Object configuration settings "${t}" must be an object`);const o=J(e,A,{ignoreArrays:!0});if(null===r)return o;for(const[i,s]of Object.entries(r)){const r=`${t}.${i}`;if(!A.properties[i])throw new g.UsageError(`Unrecognized configuration settings found: ${t}.${i} - run "yarn config -v" to see the list of settings supported in Yarn`);o.set(i,G(e,r,s,A.properties[i],n))}return o}(e,t,r,A,o);case T.MAP:return function(e,t,r,A,n){const o=new Map;if("object"!=typeof r||Array.isArray(r))throw new g.UsageError(`Map configuration settings "${t}" must be an object`);if(null===r)return o;for(const[i,s]of Object.entries(r)){const r=A.normalizeKeys?A.normalizeKeys(i):i,a=`${t}['${r}']`,c=A.valueDefinition;o.set(r,G(e,a,s,c,n))}return o}(e,t,r,A,o)}if(null===r&&!A.isNullable&&null!==A.default)throw new Error(`Non-nullable configuration settings "${t}" cannot be set to null`);if(null===(i=A.values)||void 0===i?void 0:i.includes(r))return r;const s=(()=>{if(A.type===T.BOOLEAN)return F.parseBoolean(r);if("string"!=typeof r)throw new Error(`Expected value (${r}) to be a string`);const e=F.replaceEnvVariables(r,{env:process.env});switch(A.type){case T.ABSOLUTE_PATH:return n.y1.resolve(o,n.cS.toPortablePath(e));case T.LOCATOR_LOOSE:return f.parseLocator(e,!1);case T.NUMBER:return parseInt(e);case T.LOCATOR:return f.parseLocator(e);default:return e}})();if(A.values&&!A.values.includes(s))throw new Error("Invalid value, expected one of "+A.values.join(", "));return s}function J(e,t,{ignoreArrays:r=!1}={}){switch(t.type){case T.SHAPE:{if(t.isArray&&!r)return[];const A=new Map;for(const[r,n]of Object.entries(t.properties))A.set(r,J(e,n));return A}case T.MAP:return t.isArray&&!r?[]:new Map;case T.ABSOLUTE_PATH:return null===t.default?null:null===e.projectCwd?n.y1.isAbsolute(t.default)?n.y1.normalize(t.default):t.isNullable?null:void 0:Array.isArray(t.default)?t.default.map(t=>n.y1.resolve(e.projectCwd,t)):n.y1.resolve(e.projectCwd,t.default);default:return t.default}}function q(){for(const[e,t]of Object.entries(process.env))if("yarn_rc_filename"===e.toLowerCase()&&"string"==typeof t)return t;return O}var z;!function(e){e[e.LOCKFILE=0]="LOCKFILE",e[e.MANIFEST=1]="MANIFEST",e[e.NONE=2]="NONE"}(z||(z={}));class W{constructor(e){this.projectCwd=null,this.plugins=new Map,this.settings=new Map,this.values=new Map,this.sources=new Map,this.invalid=new Map,this.packageExtensions=new Map,this.limits=new Map,this.startingCwd=e}static create(e,t,r){const A=new W(e);void 0===t||t instanceof Map||(A.projectCwd=t),A.importSettings(Y);const n=void 0!==r?r:t instanceof Map?t:new Map;for(const[e,t]of n)A.activatePlugin(e,t);return A}static async find(e,t,{lookup:r=z.LOCKFILE,strict:o=!0,usePath:i=!1,useRc:s=!0}={}){const c=function(){const e={};for(let[t,r]of Object.entries(process.env))t=t.toLowerCase(),t.startsWith("yarn_")&&(t=a()(t.slice("yarn_".length)),e[t]=r);return e}();delete c.rcFilename;const l=await W.findRcFiles(e),u=await W.findHomeRcFile(),h=({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:A})=>({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:A}),p=({ignoreCwd:e,yarnPath:t,ignorePath:r,lockfileFilename:A,...n})=>n,d=new W(e);d.importSettings(h(Y)),d.useWithSource("",h(c),e,{strict:!1});for(const{path:e,cwd:t,data:r}of l)d.useWithSource(e,h(r),t,{strict:!1});if(u&&d.useWithSource(u.path,h(u.data),u.cwd,{strict:!1}),i){const e=d.get("yarnPath"),t=d.get("ignorePath");if(null!==e&&!t)return d}const C=d.get("lockfileFilename");let f;switch(r){case z.LOCKFILE:f=await W.findProjectCwd(e,C);break;case z.MANIFEST:f=await W.findProjectCwd(e,null);break;case z.NONE:f=A.xfs.existsSync(n.y1.join(e,"package.json"))?n.y1.resolve(e):null}d.startingCwd=e,d.projectCwd=f,d.importSettings(p(Y));const E=new Map([["@@core",I]]);if(null!==t){for(const e of t.plugins.keys())E.set(e,(B=t.modules.get(e)).__esModule?B.default:B);const r=new Map;for(const e of new Set(M().builtinModules||Object.keys(process.binding("natives"))))r.set(e,()=>R(e));for(const[e,A]of t.modules)r.set(e,()=>A);const A=new Set,o=e=>e.default||e,i=(e,t)=>{const{factory:i,name:s}=R(n.cS.fromPortablePath(e));if(A.has(s))return;const a=new Map(r),c=e=>{if(a.has(e))return a.get(e)();throw new g.UsageError(`This plugin cannot access the package referenced via ${e} which is neither a builtin, nor an exposed entry`)},l=F.prettifySyncErrors(()=>o(i(c)),e=>`${e} (when initializing ${s}, defined in ${t})`);r.set(s,()=>l),A.add(s),E.set(s,l)};if(c.plugins)for(const t of c.plugins.split(";")){i(n.y1.resolve(e,n.cS.toPortablePath(t)),"")}for(const{path:e,cwd:t,data:r}of l)if(s&&Array.isArray(r.plugins))for(const A of r.plugins){const r="string"!=typeof A?A.path:A;i(n.y1.resolve(t,n.cS.toPortablePath(r)),e)}}var B;for(const[e,t]of E)d.activatePlugin(e,t);d.useWithSource("",p(c),e,{strict:o});for(const{path:e,cwd:t,data:r}of l)d.useWithSource(e,p(r),t,{strict:o});return u&&d.useWithSource(u.path,p(u.data),u.cwd,{strict:!1}),d.get("enableGlobalCache")&&(d.values.set("cacheFolder",d.get("globalFolder")+"/cache"),d.sources.set("cacheFolder","")),await d.refreshPackageExtensions(),d}static async findRcFiles(e){const t=q(),r=[];let o=e,s=null;for(;o!==s;){s=o;const e=n.y1.join(s,t);if(A.xfs.existsSync(e)){const t=await A.xfs.readFilePromise(e,"utf8");let n;try{n=(0,i.parseSyml)(t)}catch(r){let A="";throw t.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(A=" (in particular, make sure you list the colons after each key name)"),new g.UsageError(`Parse error when loading ${e}; please check it's proper Yaml${A}`)}r.push({path:e,cwd:s,data:n})}o=n.y1.dirname(s)}return r}static async findHomeRcFile(){const e=q(),t=k.getHomeFolder(),r=n.y1.join(t,e);if(A.xfs.existsSync(r)){const e=await A.xfs.readFilePromise(r,"utf8");return{path:r,cwd:t,data:(0,i.parseSyml)(e)}}return null}static async findProjectCwd(e,t){let r=null,o=e,i=null;for(;o!==i;){if(i=o,A.xfs.existsSync(n.y1.join(i,"package.json"))&&(r=i),null!==t){if(A.xfs.existsSync(n.y1.join(i,t))){r=i;break}}else if(null!==r)break;o=n.y1.dirname(i)}return r}static async updateConfiguration(e,t){const r=q(),o=n.y1.join(e,r),s=A.xfs.existsSync(o)?(0,i.parseSyml)(await A.xfs.readFilePromise(o,"utf8")):{};let a,c=!1;if("function"==typeof t){try{a=t(s)}catch(e){a=t({})}if(a===s)return}else{a=s;for(const e of Object.keys(t)){const r=s[e],A=t[e];let n;if("function"==typeof A)try{n=A(r)}catch(e){n=A(void 0)}else n=A;r!==n&&(a[e]=n,c=!0)}if(!c)return}await A.xfs.changeFilePromise(o,(0,i.stringifySyml)(a),{automaticNewlines:!0})}static async updateHomeConfiguration(e){const t=k.getHomeFolder();return await W.updateConfiguration(t,e)}activatePlugin(e,t){this.plugins.set(e,t),void 0!==t.configuration&&this.importSettings(t.configuration)}importSettings(e){for(const[t,r]of Object.entries(e))if(null!=r){if(this.settings.has(t))throw new Error(`Cannot redefine settings "${t}"`);this.settings.set(t,r),this.values.set(t,J(this,r))}}useWithSource(e,t,r,A){try{this.use(e,t,r,A)}catch(t){throw t.message+=` (in ${N.pretty(this,e,N.Type.PATH)})`,t}}use(e,t,r,{strict:A=!0,overwrite:n=!1}={}){for(const o of Object.keys(t)){if(void 0===t[o])continue;if("plugins"===o)continue;if(""===e&&P.has(o))continue;if("rcFilename"===o)throw new g.UsageError(`The rcFilename settings can only be set via ${"yarn_RC_FILENAME".toUpperCase()}, not via a rc file`);const i=this.settings.get(o);if(!i){if(A)throw new g.UsageError(`Unrecognized or legacy configuration settings found: ${o} - run "yarn config -v" to see the list of settings supported in Yarn`);this.invalid.set(o,e);continue}if(this.sources.has(o)&&!(n||i.type===T.MAP||i.isArray&&i.concatenateValues))continue;let s;try{s=G(this,o,t[o],i,r)}catch(t){throw t.message+=" in "+N.pretty(this,e,N.Type.PATH),t}if(i.type===T.MAP){const t=this.values.get(o);this.values.set(o,new Map(n?[...t,...s]:[...s,...t])),this.sources.set(o,`${this.sources.get(o)}, ${e}`)}else if(i.isArray&&i.concatenateValues){const t=this.values.get(o);this.values.set(o,n?[...t,...s]:[...s,...t]),this.sources.set(o,`${this.sources.get(o)}, ${e}`)}else this.values.set(o,s),this.sources.set(o,e)}}get(e){if(!this.values.has(e))throw new Error(`Invalid configuration key "${e}"`);return this.values.get(e)}getSpecial(e,{hideSecrets:t=!1,getNativePaths:r=!1}){const A=this.get(e),o=this.settings.get(e);if(void 0===o)throw new g.UsageError(`Couldn't find a configuration settings named "${e}"`);return function e(t,r,A){if(r.type===T.SECRET&&"string"==typeof t&&A.hideSecrets)return"********";if(r.type===T.ABSOLUTE_PATH&&"string"==typeof t&&A.getNativePaths)return n.cS.fromPortablePath(t);if(r.isArray&&Array.isArray(t)){const n=[];for(const o of t)n.push(e(o,r,A));return n}if(r.type===T.MAP&&t instanceof Map){const n=new Map;for(const[o,i]of t.entries())n.set(o,e(i,r.valueDefinition,A));return n}if(r.type===T.SHAPE&&t instanceof Map){const n=new Map;for(const[o,i]of t.entries()){const t=r.properties[o];n.set(o,e(i,t,A))}return n}return t}(A,o,{hideSecrets:t,getNativePaths:r})}getSubprocessStreams(e,{header:t,prefix:r,report:n}){let o,i;const s=A.xfs.createWriteStream(e);if(this.get("enableInlineBuilds")){const e=n.createStreamReporter(`${r} ${N.pretty(this,"STDOUT","green")}`),t=n.createStreamReporter(`${r} ${N.pretty(this,"STDERR","red")}`);o=new d.PassThrough,o.pipe(e),o.pipe(s),i=new d.PassThrough,i.pipe(t),i.pipe(s)}else o=s,i=s,void 0!==t&&o.write(t+"\n");return{stdout:o,stderr:i}}makeResolver(){const e=[];for(const t of this.plugins.values())for(const r of t.resolvers||[])e.push(new r);return new m.B([new D,new v.d,new w.O,...e])}makeFetcher(){const e=[];for(const t of this.plugins.values())for(const r of t.fetchers||[])e.push(new r);return new y([new Q.N,new S,...e])}getLinkers(){const e=[];for(const t of this.plugins.values())for(const r of t.linkers||[])e.push(new r);return e}async refreshPackageExtensions(){this.packageExtensions=new Map;const e=this.packageExtensions,t=(t,r,{userProvided:A=!1}={})=>{if(!p().validRange(t.range))throw new Error("Only semver ranges are allowed as keys for the lockfileExtensions setting");const n=new E.G;n.load(r,{yamlCompatibilityMode:!0});const o=[];F.getArrayWithDefault(e,t.identHash).push([t.range,o]);const i={status:L._u.Inactive,userProvided:A,parentDescriptor:t};for(const e of n.dependencies.values())o.push({...i,type:L.HN.Dependency,descriptor:e,description:`${f.stringifyIdent(t)} > ${f.stringifyIdent(e)}`});for(const e of n.peerDependencies.values())o.push({...i,type:L.HN.PeerDependency,descriptor:e,description:`${f.stringifyIdent(t)} >> ${f.stringifyIdent(e)}`});for(const[e,r]of n.peerDependenciesMeta)for(const[A,n]of Object.entries(r))o.push({...i,type:L.HN.PeerDependencyMeta,selector:e,key:A,value:n,description:`${f.stringifyIdent(t)} >> ${e} / ${A}`})};await this.triggerHook(e=>e.registerPackageExtensions,this,t);for(const[e,r]of this.get("packageExtensions"))t(f.parseDescriptor(e,!0),F.convertMapsToIndexableObjects(r),{userProvided:!0})}normalizePackage(e){const t=f.copyPackage(e);if(null==this.packageExtensions)throw new Error("refreshPackageExtensions has to be called before normalizing packages");const r=this.packageExtensions.get(e.identHash);if(void 0!==r){const A=e.version;if(null!==A)for(const[e,n]of r)if(x.satisfiesWithPrereleases(A,e))for(const e of n)switch(e.status===L._u.Inactive&&(e.status=L._u.Redundant),e.type){case L.HN.Dependency:void 0===t.dependencies.get(e.descriptor.identHash)&&(e.status=L._u.Active,t.dependencies.set(e.descriptor.identHash,e.descriptor));break;case L.HN.PeerDependency:void 0===t.peerDependencies.get(e.descriptor.identHash)&&(e.status=L._u.Active,t.peerDependencies.set(e.descriptor.identHash,e.descriptor));break;case L.HN.PeerDependencyMeta:{const r=t.peerDependenciesMeta.get(e.selector);void 0!==r&&Object.prototype.hasOwnProperty.call(r,e.key)&&r[e.key]===e.value||(e.status=L._u.Active,F.getFactoryWithDefault(t.peerDependenciesMeta,e.selector,()=>({}))[e.key]=e.value)}break;default:F.assertNever(e)}}const A=e=>e.scope?`${e.scope}__${e.name}`:""+e.name;for(const e of t.peerDependencies.values()){if("@types"===e.scope)continue;const r=A(e),n=f.makeIdent("types",r);t.peerDependencies.has(n.identHash)||t.peerDependenciesMeta.has(n.identHash)||t.peerDependenciesMeta.set(f.stringifyIdent(n),{optional:!0})}for(const e of t.peerDependenciesMeta.keys()){const r=f.parseIdent(e);t.peerDependencies.has(r.identHash)||t.peerDependencies.set(r.identHash,f.makeDescriptor(r,"*"))}return t.dependencies=new Map(F.sortMap(t.dependencies,([,e])=>f.stringifyDescriptor(e))),t.peerDependencies=new Map(F.sortMap(t.peerDependencies,([,e])=>f.stringifyDescriptor(e))),t}getLimit(e){return F.getFactoryWithDefault(this.limits,e,()=>u()(this.get(e)))}async triggerHook(e,...t){for(const r of this.plugins.values()){const A=r.hooks;if(!A)continue;const n=e(A);n&&await n(...t)}}async triggerMultipleHooks(e,t){for(const r of t)await this.triggerHook(e,...r)}async reduceHook(e,t,...r){let A=t;for(const t of this.plugins.values()){const n=t.hooks;if(!n)continue;const o=e(n);o&&(A=await o(A,...r))}return A}async firstHook(e,...t){for(const r of this.plugins.values()){const A=r.hooks;if(!A)continue;const n=e(A);if(!n)continue;const o=await n(...t);if(void 0!==o)return o}return null}format(e,t){return N.pretty(this,e,t)}}W.telemetry=null},92409:(e,t,r)=>{"use strict";var A;r.d(t,{k:()=>A}),function(e){e[e.SCRIPT=0]="SCRIPT",e[e.SHELLCODE=1]="SHELLCODE"}(A||(A={}))},62152:(e,t,r)=>{"use strict";r.d(t,{h:()=>i});var A=r(35691),n=r(15815),o=r(71643);class i extends A.yG{constructor({configuration:e,stdout:t,suggestInstall:r=!0}){super(),this.errorCount=0,o.addLogFilterSupport(this,{configuration:e}),this.configuration=e,this.stdout=t,this.suggestInstall=r}static async start(e,t){const r=new this(e);try{await t(r)}catch(e){r.reportExceptionOnce(e)}finally{await r.finalize()}return r}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,t,r){return("function"==typeof t?t:r)()}async startTimerPromise(e,t,r){const A="function"==typeof t?t:r;return await A()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,t){}reportWarning(e,t){}reportError(e,t){this.errorCount+=1,this.stdout.write(`${o.pretty(this.configuration,"➤","redBright")} ${this.formatNameWithHyperlink(e)}: ${t}\n`)}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(const{}of e);}),stop:()=>{}}}reportJson(e){}async finalize(){this.errorCount>0&&(this.stdout.write(o.pretty(this.configuration,"➤","redBright")+" Errors happened when preparing the environment required to run this command.\n"),this.suggestInstall&&this.stdout.write(o.pretty(this.configuration,"➤","redBright")+' This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.\n'))}formatNameWithHyperlink(e){return(0,n.Qw)(e,{configuration:this.configuration,json:!1})}}},46611:(e,t,r)=>{"use strict";r.d(t,{G:()=>l});var A=r(78420),n=r(46009),o=r(11640),i=r(53887),s=r.n(i),a=r(73632),c=r(36545),g=r(54143);class l{constructor(){this.indent=" ",this.name=null,this.version=null,this.os=null,this.cpu=null,this.type=null,this.private=!1,this.license=null,this.main=null,this.module=null,this.browser=null,this.languageName=null,this.bin=new Map,this.scripts=new Map,this.dependencies=new Map,this.devDependencies=new Map,this.peerDependencies=new Map,this.workspaceDefinitions=[],this.dependenciesMeta=new Map,this.peerDependenciesMeta=new Map,this.resolutions=[],this.files=null,this.publishConfig=null,this.installConfig=null,this.preferUnplugged=null,this.raw={},this.errors=[]}static async tryFind(e,{baseFs:t=new A.S}={}){const r=n.y1.join(e,"package.json");return await t.existsPromise(r)?await l.fromFile(r,{baseFs:t}):null}static async find(e,{baseFs:t}={}){const r=await l.tryFind(e,{baseFs:t});if(null===r)throw new Error("Manifest not found");return r}static async fromFile(e,{baseFs:t=new A.S}={}){const r=new l;return await r.loadFile(e,{baseFs:t}),r}static fromText(e){const t=new l;return t.loadFromText(e),t}static isManifestFieldCompatible(e,t){if(null===e)return!0;let r=!0,A=!1;for(const n of e)if("!"===n[0]){if(A=!0,t===n.slice(1))return!1}else if(r=!1,n===t)return!0;return A&&r}loadFromText(e){let t;try{t=JSON.parse(h(e)||"{}")}catch(t){throw t.message+=` (when parsing ${e})`,t}this.load(t),this.indent=u(e)}async loadFile(e,{baseFs:t=new A.S}){const r=await t.readFilePromise(e,"utf8");let n;try{n=JSON.parse(h(r)||"{}")}catch(t){throw t.message+=` (when parsing ${e})`,t}this.load(n),this.indent=u(r)}load(e,{yamlCompatibilityMode:t=!1}={}){if("object"!=typeof e||null===e)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;const r=[];if("string"==typeof e.name)try{this.name=g.parseIdent(e.name)}catch(e){r.push(new Error("Parsing failed for the 'name' field"))}if("string"==typeof e.version&&(this.version=e.version),Array.isArray(e.os)){const t=[];this.os=t;for(const A of e.os)"string"!=typeof A?r.push(new Error("Parsing failed for the 'os' field")):t.push(A)}if(Array.isArray(e.cpu)){const t=[];this.cpu=t;for(const A of e.cpu)"string"!=typeof A?r.push(new Error("Parsing failed for the 'cpu' field")):t.push(A)}if("string"==typeof e.type&&(this.type=e.type),"boolean"==typeof e.private&&(this.private=e.private),"string"==typeof e.license&&(this.license=e.license),"string"==typeof e.languageName&&(this.languageName=e.languageName),"string"==typeof e.main&&(this.main=p(e.main)),"string"==typeof e.module&&(this.module=p(e.module)),null!=e.browser)if("string"==typeof e.browser)this.browser=p(e.browser);else{this.browser=new Map;for(const[t,r]of Object.entries(e.browser))this.browser.set(p(t),"string"==typeof r?p(r):r)}if("string"==typeof e.bin)null!==this.name?this.bin=new Map([[this.name.name,p(e.bin)]]):r.push(new Error("String bin field, but no attached package name"));else if("object"==typeof e.bin&&null!==e.bin)for(const[t,A]of Object.entries(e.bin))"string"==typeof A?this.bin.set(t,p(A)):r.push(new Error(`Invalid bin definition for '${t}'`));if("object"==typeof e.scripts&&null!==e.scripts)for(const[t,A]of Object.entries(e.scripts))"string"==typeof A?this.scripts.set(t,A):r.push(new Error(`Invalid script definition for '${t}'`));if("object"==typeof e.dependencies&&null!==e.dependencies)for(const[t,A]of Object.entries(e.dependencies)){if("string"!=typeof A){r.push(new Error(`Invalid dependency range for '${t}'`));continue}let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}const n=g.makeDescriptor(e,A);this.dependencies.set(n.identHash,n)}if("object"==typeof e.devDependencies&&null!==e.devDependencies)for(const[t,A]of Object.entries(e.devDependencies)){if("string"!=typeof A){r.push(new Error(`Invalid dependency range for '${t}'`));continue}let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}const n=g.makeDescriptor(e,A);this.devDependencies.set(n.identHash,n)}if("object"==typeof e.peerDependencies&&null!==e.peerDependencies)for(let[t,A]of Object.entries(e.peerDependencies)){let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}"string"==typeof A&&c.validRange(A)||(r.push(new Error(`Invalid dependency range for '${t}'`)),A="*");const n=g.makeDescriptor(e,A);this.peerDependencies.set(n.identHash,n)}"object"==typeof e.workspaces&&e.workspaces.nohoist&&r.push(new Error("'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead"));const A=Array.isArray(e.workspaces)?e.workspaces:"object"==typeof e.workspaces&&null!==e.workspaces&&Array.isArray(e.workspaces.packages)?e.workspaces.packages:[];for(const e of A)"string"==typeof e?this.workspaceDefinitions.push({pattern:e}):r.push(new Error(`Invalid workspace definition for '${e}'`));if("object"==typeof e.dependenciesMeta&&null!==e.dependenciesMeta)for(const[A,n]of Object.entries(e.dependenciesMeta)){if("object"!=typeof n||null===n){r.push(new Error("Invalid meta field for '"+A));continue}const e=g.parseDescriptor(A),o=this.ensureDependencyMeta(e),i=d(n.built,{yamlCompatibilityMode:t});if(null===i){r.push(new Error(`Invalid built meta field for '${A}'`));continue}const s=d(n.optional,{yamlCompatibilityMode:t});if(null===s){r.push(new Error(`Invalid optional meta field for '${A}'`));continue}const a=d(n.unplugged,{yamlCompatibilityMode:t});null!==a?Object.assign(o,{built:i,optional:s,unplugged:a}):r.push(new Error(`Invalid unplugged meta field for '${A}'`))}if("object"==typeof e.peerDependenciesMeta&&null!==e.peerDependenciesMeta)for(const[A,n]of Object.entries(e.peerDependenciesMeta)){if("object"!=typeof n||null===n){r.push(new Error(`Invalid meta field for '${A}'`));continue}const e=g.parseDescriptor(A),o=this.ensurePeerDependencyMeta(e),i=d(n.optional,{yamlCompatibilityMode:t});null!==i?Object.assign(o,{optional:i}):r.push(new Error(`Invalid optional meta field for '${A}'`))}if("object"==typeof e.resolutions&&null!==e.resolutions)for(const[t,A]of Object.entries(e.resolutions))if("string"==typeof A)try{this.resolutions.push({pattern:(0,o.parseResolution)(t),reference:A})}catch(e){r.push(e);continue}else r.push(new Error(`Invalid resolution entry for '${t}'`));if(Array.isArray(e.files)){this.files=new Set;for(const t of e.files)"string"==typeof t?this.files.add(t):r.push(new Error(`Invalid files entry for '${t}'`))}if("object"==typeof e.publishConfig&&null!==e.publishConfig){if(this.publishConfig={},"string"==typeof e.publishConfig.access&&(this.publishConfig.access=e.publishConfig.access),"string"==typeof e.publishConfig.main&&(this.publishConfig.main=p(e.publishConfig.main)),"string"==typeof e.publishConfig.module&&(this.publishConfig.module=p(e.publishConfig.module)),null!=e.publishConfig.browser)if("string"==typeof e.publishConfig.browser)this.publishConfig.browser=p(e.publishConfig.browser);else{this.publishConfig.browser=new Map;for(const[t,r]of Object.entries(e.publishConfig.browser))this.publishConfig.browser.set(p(t),"string"==typeof r?p(r):r)}if("string"==typeof e.publishConfig.registry&&(this.publishConfig.registry=e.publishConfig.registry),"string"==typeof e.publishConfig.bin)null!==this.name?this.publishConfig.bin=new Map([[this.name.name,p(e.publishConfig.bin)]]):r.push(new Error("String bin field, but no attached package name"));else if("object"==typeof e.publishConfig.bin&&null!==e.publishConfig.bin){this.publishConfig.bin=new Map;for(const[t,A]of Object.entries(e.publishConfig.bin))"string"==typeof A?this.publishConfig.bin.set(t,p(A)):r.push(new Error(`Invalid bin definition for '${t}'`))}if(Array.isArray(e.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(const t of e.publishConfig.executableFiles)"string"==typeof t?this.publishConfig.executableFiles.add(p(t)):r.push(new Error("Invalid executable file definition"))}}if("object"==typeof e.installConfig&&null!==e.installConfig){this.installConfig={};for(const t of Object.keys(e.installConfig))"hoistingLimits"===t?"string"==typeof e.installConfig.hoistingLimits?this.installConfig.hoistingLimits=e.installConfig.hoistingLimits:r.push(new Error("Invalid hoisting limits definition")):r.push(new Error("Unrecognized installConfig key: "+t))}if("object"==typeof e.optionalDependencies&&null!==e.optionalDependencies)for(const[t,A]of Object.entries(e.optionalDependencies)){if("string"!=typeof A){r.push(new Error(`Invalid dependency range for '${t}'`));continue}let e;try{e=g.parseIdent(t)}catch(e){r.push(new Error(`Parsing failed for the dependency name '${t}'`));continue}const n=g.makeDescriptor(e,A);this.dependencies.set(n.identHash,n);const o=g.makeDescriptor(e,"unknown"),i=this.ensureDependencyMeta(o);Object.assign(i,{optional:!0})}"boolean"==typeof e.preferUnplugged&&(this.preferUnplugged=e.preferUnplugged),this.errors=r}getForScope(e){switch(e){case"dependencies":return this.dependencies;case"devDependencies":return this.devDependencies;case"peerDependencies":return this.peerDependencies;default:throw new Error(`Unsupported value ("${e}")`)}}hasConsumerDependency(e){return!!this.dependencies.has(e.identHash)||!!this.peerDependencies.has(e.identHash)}hasHardDependency(e){return!!this.dependencies.has(e.identHash)||!!this.devDependencies.has(e.identHash)}hasSoftDependency(e){return!!this.peerDependencies.has(e.identHash)}hasDependency(e){return!!this.hasHardDependency(e)||!!this.hasSoftDependency(e)}isCompatibleWithOS(e){return l.isManifestFieldCompatible(this.os,e)}isCompatibleWithCPU(e){return l.isManifestFieldCompatible(this.cpu,e)}ensureDependencyMeta(e){if("unknown"!==e.range&&!s().valid(e.range))throw new Error(`Invalid meta field range for '${g.stringifyDescriptor(e)}'`);const t=g.stringifyIdent(e),r="unknown"!==e.range?e.range:null;let A=this.dependenciesMeta.get(t);A||this.dependenciesMeta.set(t,A=new Map);let n=A.get(r);return n||A.set(r,n={}),n}ensurePeerDependencyMeta(e){if("unknown"!==e.range)throw new Error(`Invalid meta field range for '${g.stringifyDescriptor(e)}'`);const t=g.stringifyIdent(e);let r=this.peerDependenciesMeta.get(t);return r||this.peerDependenciesMeta.set(t,r={}),r}setRawField(e,t,{after:r=[]}={}){const A=new Set(r.filter(e=>Object.prototype.hasOwnProperty.call(this.raw,e)));if(0===A.size||Object.prototype.hasOwnProperty.call(this.raw,e))this.raw[e]=t;else{const r=this.raw,n=this.raw={};let o=!1;for(const i of Object.keys(r))n[i]=r[i],o||(A.delete(i),0===A.size&&(n[e]=t,o=!0))}}exportTo(e,{compatibilityMode:t=!0}={}){if(Object.assign(e,this.raw),null!==this.name?e.name=g.stringifyIdent(this.name):delete e.name,null!==this.version?e.version=this.version:delete e.version,null!==this.os?e.os=this.os:delete e.os,null!==this.cpu?e.cpu=this.cpu:delete e.cpu,null!==this.type?e.type=this.type:delete e.type,this.private?e.private=!0:delete e.private,null!==this.license?e.license=this.license:delete e.license,null!==this.languageName?e.languageName=this.languageName:delete e.languageName,null!==this.main?e.main=this.main:delete e.main,null!==this.module?e.module=this.module:delete e.module,null!==this.browser){const t=this.browser;"string"==typeof t?e.browser=t:t instanceof Map&&(e.browser=Object.assign({},...Array.from(t.keys()).sort().map(e=>({[e]:t.get(e)}))))}else delete e.browser;1===this.bin.size&&null!==this.name&&this.bin.has(this.name.name)?e.bin=this.bin.get(this.name.name):this.bin.size>0?e.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(e=>({[e]:this.bin.get(e)}))):delete e.bin,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?e.workspaces={...this.raw.workspaces,packages:this.workspaceDefinitions.map(({pattern:e})=>e)}:e.workspaces=this.workspaceDefinitions.map(({pattern:e})=>e):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?e.workspaces=this.raw.workspaces:delete e.workspaces;const r=[],A=[];for(const e of this.dependencies.values()){const n=this.dependenciesMeta.get(g.stringifyIdent(e));let o=!1;if(t&&n){const e=n.get(null);e&&e.optional&&(o=!0)}o?A.push(e):r.push(e)}r.length>0?e.dependencies=Object.assign({},...g.sortDescriptors(r).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.dependencies,A.length>0?e.optionalDependencies=Object.assign({},...g.sortDescriptors(A).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...g.sortDescriptors(this.devDependencies.values()).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...g.sortDescriptors(this.peerDependencies.values()).map(e=>({[g.stringifyIdent(e)]:e.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(const[r,A]of a.sortMap(this.dependenciesMeta.entries(),([e,t])=>e))for(const[n,o]of a.sortMap(A.entries(),([e,t])=>null!==e?"0"+e:"1")){const A=null!==n?g.stringifyDescriptor(g.makeDescriptor(g.parseIdent(r),n)):r,i={...o};t&&null===n&&delete i.optional,0!==Object.keys(i).length&&(e.dependenciesMeta[A]=i)}return 0===Object.keys(e.dependenciesMeta).length&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...a.sortMap(this.peerDependenciesMeta.entries(),([e,t])=>e).map(([e,t])=>({[e]:t}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:e,reference:t})=>({[(0,o.stringifyResolution)(e)]:t}))):delete e.resolutions,null!==this.files?e.files=Array.from(this.files):delete e.files,null!==this.preferUnplugged?e.preferUnplugged=this.preferUnplugged:delete e.preferUnplugged,e}}function u(e){const t=e.match(/^[ \t]+/m);return t?t[0]:" "}function h(e){return 65279===e.charCodeAt(0)?e.slice(1):e}function p(e){return e.replace(/\\/g,"/")}function d(e,{yamlCompatibilityMode:t}){return t?a.tryParseOptionalBoolean(e):void 0===e||"boolean"==typeof e?e:null}l.fileName="package.json",l.allDependencies=["dependencies","devDependencies","peerDependencies"],l.hardDependencies=["dependencies","devDependencies"]},92659:(e,t,r)=>{"use strict";var A;function n(e){return"YN"+e.toString(10).padStart(4,"0")}r.d(t,{b:()=>A,i:()=>n}),function(e){e[e.UNNAMED=0]="UNNAMED",e[e.EXCEPTION=1]="EXCEPTION",e[e.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",e[e.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",e[e.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",e[e.BUILD_DISABLED=5]="BUILD_DISABLED",e[e.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",e[e.MUST_BUILD=7]="MUST_BUILD",e[e.MUST_REBUILD=8]="MUST_REBUILD",e[e.BUILD_FAILED=9]="BUILD_FAILED",e[e.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",e[e.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",e[e.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",e[e.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",e[e.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",e[e.REMOTE_INVALID=15]="REMOTE_INVALID",e[e.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",e[e.RESOLUTION_PACK=17]="RESOLUTION_PACK",e[e.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",e[e.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",e[e.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",e[e.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",e[e.TOO_MANY_MATCHING_WORKSPACES=22]="TOO_MANY_MATCHING_WORKSPACES",e[e.CONSTRAINTS_MISSING_DEPENDENCY=23]="CONSTRAINTS_MISSING_DEPENDENCY",e[e.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]="CONSTRAINTS_INCOMPATIBLE_DEPENDENCY",e[e.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]="CONSTRAINTS_EXTRANEOUS_DEPENDENCY",e[e.CONSTRAINTS_INVALID_DEPENDENCY=26]="CONSTRAINTS_INVALID_DEPENDENCY",e[e.CANT_SUGGEST_RESOLUTIONS=27]="CANT_SUGGEST_RESOLUTIONS",e[e.FROZEN_LOCKFILE_EXCEPTION=28]="FROZEN_LOCKFILE_EXCEPTION",e[e.CROSS_DRIVE_VIRTUAL_LOCAL=29]="CROSS_DRIVE_VIRTUAL_LOCAL",e[e.FETCH_FAILED=30]="FETCH_FAILED",e[e.DANGEROUS_NODE_MODULES=31]="DANGEROUS_NODE_MODULES",e[e.NODE_GYP_INJECTED=32]="NODE_GYP_INJECTED",e[e.AUTHENTICATION_NOT_FOUND=33]="AUTHENTICATION_NOT_FOUND",e[e.INVALID_CONFIGURATION_KEY=34]="INVALID_CONFIGURATION_KEY",e[e.NETWORK_ERROR=35]="NETWORK_ERROR",e[e.LIFECYCLE_SCRIPT=36]="LIFECYCLE_SCRIPT",e[e.CONSTRAINTS_MISSING_FIELD=37]="CONSTRAINTS_MISSING_FIELD",e[e.CONSTRAINTS_INCOMPATIBLE_FIELD=38]="CONSTRAINTS_INCOMPATIBLE_FIELD",e[e.CONSTRAINTS_EXTRANEOUS_FIELD=39]="CONSTRAINTS_EXTRANEOUS_FIELD",e[e.CONSTRAINTS_INVALID_FIELD=40]="CONSTRAINTS_INVALID_FIELD",e[e.AUTHENTICATION_INVALID=41]="AUTHENTICATION_INVALID",e[e.PROLOG_UNKNOWN_ERROR=42]="PROLOG_UNKNOWN_ERROR",e[e.PROLOG_SYNTAX_ERROR=43]="PROLOG_SYNTAX_ERROR",e[e.PROLOG_EXISTENCE_ERROR=44]="PROLOG_EXISTENCE_ERROR",e[e.STACK_OVERFLOW_RESOLUTION=45]="STACK_OVERFLOW_RESOLUTION",e[e.AUTOMERGE_FAILED_TO_PARSE=46]="AUTOMERGE_FAILED_TO_PARSE",e[e.AUTOMERGE_IMMUTABLE=47]="AUTOMERGE_IMMUTABLE",e[e.AUTOMERGE_SUCCESS=48]="AUTOMERGE_SUCCESS",e[e.AUTOMERGE_REQUIRED=49]="AUTOMERGE_REQUIRED",e[e.DEPRECATED_CLI_SETTINGS=50]="DEPRECATED_CLI_SETTINGS",e[e.PLUGIN_NAME_NOT_FOUND=51]="PLUGIN_NAME_NOT_FOUND",e[e.INVALID_PLUGIN_REFERENCE=52]="INVALID_PLUGIN_REFERENCE",e[e.CONSTRAINTS_AMBIGUITY=53]="CONSTRAINTS_AMBIGUITY",e[e.CACHE_OUTSIDE_PROJECT=54]="CACHE_OUTSIDE_PROJECT",e[e.IMMUTABLE_INSTALL=55]="IMMUTABLE_INSTALL",e[e.IMMUTABLE_CACHE=56]="IMMUTABLE_CACHE",e[e.INVALID_MANIFEST=57]="INVALID_MANIFEST",e[e.PACKAGE_PREPARATION_FAILED=58]="PACKAGE_PREPARATION_FAILED",e[e.INVALID_RANGE_PEER_DEPENDENCY=59]="INVALID_RANGE_PEER_DEPENDENCY",e[e.INCOMPATIBLE_PEER_DEPENDENCY=60]="INCOMPATIBLE_PEER_DEPENDENCY",e[e.DEPRECATED_PACKAGE=61]="DEPRECATED_PACKAGE",e[e.INCOMPATIBLE_OS=62]="INCOMPATIBLE_OS",e[e.INCOMPATIBLE_CPU=63]="INCOMPATIBLE_CPU",e[e.FROZEN_ARTIFACT_EXCEPTION=64]="FROZEN_ARTIFACT_EXCEPTION",e[e.TELEMETRY_NOTICE=65]="TELEMETRY_NOTICE",e[e.PATCH_HUNK_FAILED=66]="PATCH_HUNK_FAILED",e[e.INVALID_CONFIGURATION_VALUE=67]="INVALID_CONFIGURATION_VALUE",e[e.UNUSED_PACKAGE_EXTENSION=68]="UNUSED_PACKAGE_EXTENSION",e[e.REDUNDANT_PACKAGE_EXTENSION=69]="REDUNDANT_PACKAGE_EXTENSION"}(A||(A={}))},27092:(e,t,r)=>{"use strict";r.d(t,{B:()=>n});var A=r(54143);class n{constructor(e){this.resolvers=e.filter(e=>e)}supportsDescriptor(e,t){return!!this.tryResolverByDescriptor(e,t)}supportsLocator(e,t){return!!this.tryResolverByLocator(e,t)}shouldPersistResolution(e,t){return this.getResolverByLocator(e,t).shouldPersistResolution(e,t)}bindDescriptor(e,t,r){return this.getResolverByDescriptor(e,r).bindDescriptor(e,t,r)}getResolutionDependencies(e,t){return this.getResolverByDescriptor(e,t).getResolutionDependencies(e,t)}async getCandidates(e,t,r){const A=this.getResolverByDescriptor(e,r);return await A.getCandidates(e,t,r)}async getSatisfying(e,t,r){return this.getResolverByDescriptor(e,r).getSatisfying(e,t,r)}async resolve(e,t){const r=this.getResolverByLocator(e,t);return await r.resolve(e,t)}tryResolverByDescriptor(e,t){const r=this.resolvers.find(r=>r.supportsDescriptor(e,t));return r||null}getResolverByDescriptor(e,t){const r=this.resolvers.find(r=>r.supportsDescriptor(e,t));if(!r)throw new Error(A.prettyDescriptor(t.project.configuration,e)+" isn't supported by any available resolver");return r}tryResolverByLocator(e,t){const r=this.resolvers.find(r=>r.supportsLocator(e,t));return r||null}getResolverByLocator(e,t){const r=this.resolvers.find(r=>r.supportsLocator(e,t));if(!r)throw new Error(A.prettyLocator(t.project.configuration,e)+" isn't supported by any available resolver");return r}}},85824:(e,t,r)=>{"use strict";r.d(t,{I:()=>ie});var A=r(43896),n=r(46009),o=r(5944),i=r(11640),s=r(40822),a=r(76417);function c(){}function g(e,t,r,A,n){for(var o=0,i=t.length,s=0,a=0;oe.length?r:e})),c.value=e.join(l)}else c.value=e.join(r.slice(s,s+c.count));s+=c.count,c.added||(a+=c.count)}}var u=t[i-1];return i>1&&"string"==typeof u.value&&(u.added||u.removed)&&e.equals("",u.value)&&(t[i-2].value+=u.value,t.pop()),t}function l(e){return{newPos:e.newPos,components:e.components.slice(0)}}c.prototype={diff:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},A=r.callback;"function"==typeof r&&(A=r,r={}),this.options=r;var n=this;function o(e){return A?(setTimeout((function(){A(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var i=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,a=1,c=i+s,u=[{newPos:-1,components:[]}],h=this.extractCommon(u[0],t,e,0);if(u[0].newPos+1>=i&&h+1>=s)return o([{value:this.join(t),count:t.length}]);function p(){for(var r=-1*a;r<=a;r+=2){var A=void 0,c=u[r-1],h=u[r+1],p=(h?h.newPos:0)-r;c&&(u[r-1]=void 0);var d=c&&c.newPos+1=i&&p+1>=s)return o(g(n,A.components,t,e,n.useLongestToken));u[r]=A}else u[r]=void 0}a++}if(A)!function e(){setTimeout((function(){if(a>c)return A();p()||e()}),0)}();else for(;a<=c;){var d=p();if(d)return d}},pushComponent:function(e,t,r){var A=e[e.length-1];A&&A.added===t&&A.removed===r?e[e.length-1]={count:A.count+1,added:t,removed:r}:e.push({count:1,added:t,removed:r})},extractCommon:function(e,t,r,A){for(var n=t.length,o=r.length,i=e.newPos,s=i-A,a=0;i+10?a(d.lines.slice(-i.context)):[],g-=u.length,l-=u.length)}(o=u).push.apply(o,E(n.map((function(e){return(t.added?"+":"-")+e})))),t.added?p+=n.length:h+=n.length}else{if(g)if(n.length<=2*i.context&&e=s.length-2&&n.length<=i.context){var y=/\n$/.test(r),m=/\n$/.test(A),w=0==n.length&&u.length>B.oldLines;!y&&w&&u.splice(B.oldLines,0,"\\ No newline at end of file"),(y||w)&&m||u.push("\\ No newline at end of file")}c.push(B),g=0,l=0,u=[]}h+=n.length,p+=n.length}},f=0;f`${r}#commit=${A}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(e,t,r="",A,n)=>`https://${r}github.com/${A}.git#commit=${n}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(e,t,r="",A,n)=>`https://${r}github.com/${A}.git#commit=${n}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@[^/]+\/)?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,e=>"npm:"+e],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)$/,e=>"npm:"+e],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,e=>"npm:"+e],[/^[^/]+\.tgz#[0-9a-f]+$/,e=>"npm:"+e]];class T{constructor(){this.resolutions=null}async setup(e,{report:t}){const r=n.y1.join(e.cwd,e.configuration.get("lockfileFilename"));if(!A.xfs.existsSync(r))return;const o=await A.xfs.readFilePromise(r,"utf8"),s=(0,i.parseSyml)(o);if(Object.prototype.hasOwnProperty.call(s,"__metadata"))return;const a=this.resolutions=new Map;for(const r of Object.keys(s)){let A=O.tryParseDescriptor(r);if(!A){t.reportWarning(P.b.YARN_IMPORT_FAILED,`Failed to parse the string "${r}" into a proper descriptor`);continue}k().validRange(A.range)&&(A=O.makeDescriptor(A,"npm:"+A.range));const{version:n,resolved:o}=s[r];if(!o)continue;let i;for(const[e,t]of U){const r=o.match(e);if(r){i=t(n,...r);break}}if(!i){t.reportWarning(P.b.YARN_IMPORT_FAILED,`${O.prettyDescriptor(e.configuration,A)}: Only some patterns can be imported from legacy lockfiles (not "${o}")`);continue}const c=O.makeLocator(A,i);a.set(A.descriptorHash,c)}}supportsDescriptor(e,t){return!!this.resolutions&&this.resolutions.has(e.descriptorHash)}supportsLocator(e,t){return!1}shouldPersistResolution(e,t){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");const A=this.resolutions.get(e.descriptorHash);if(!A)throw new Error("Assertion failed: The resolution should have been registered");return[A]}async getSatisfying(e,t,r){return null}async resolve(e,t){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}}class j{supportsDescriptor(e,t){return!!t.project.storedResolutions.get(e.descriptorHash)||!!t.project.originalPackages.has(O.convertDescriptorToLocator(e).locatorHash)}supportsLocator(e,t){return!!t.project.originalPackages.has(e.locatorHash)}shouldPersistResolution(e,t){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){let A=r.project.originalPackages.get(O.convertDescriptorToLocator(e).locatorHash);if(A)return[A];const n=r.project.storedResolutions.get(e.descriptorHash);if(!n)throw new Error("Expected the resolution to have been successful - resolution not found");if(A=r.project.originalPackages.get(n),!A)throw new Error("Expected the resolution to have been successful - package not found");return[A]}async getSatisfying(e,t,r){return null}async resolve(e,t){const r=t.project.originalPackages.get(e.locatorHash);if(!r)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return r}}var Y=r(46611),G=r(27092),H=r(35691);class J{constructor(e){this.resolver=e}supportsDescriptor(e,t){return this.resolver.supportsDescriptor(e,t)}supportsLocator(e,t){return this.resolver.supportsLocator(e,t)}shouldPersistResolution(e,t){return this.resolver.shouldPersistResolution(e,t)}bindDescriptor(e,t,r){return this.resolver.bindDescriptor(e,t,r)}getResolutionDependencies(e,t){return this.resolver.getResolutionDependencies(e,t)}async getCandidates(e,t,r){throw new H.lk(P.b.MISSING_LOCKFILE_ENTRY,"This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions")}async getSatisfying(e,t,r){throw new H.lk(P.b.MISSING_LOCKFILE_ENTRY,"This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions")}async resolve(e,t){throw new H.lk(P.b.MISSING_LOCKFILE_ENTRY,"This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions")}}var q=r(33720),z=r(17722),W=r(81111),X=r(71643),V=r(20624),_=r(73632),Z=r(63088),$=r(36545),ee=r(32485);const te=/ *, */g,re=/\/$/,Ae=(0,N.promisify)(R().gzip),ne=(0,N.promisify)(R().gunzip),oe={restoreInstallersCustomData:["installersCustomData"],restoreResolutions:["accessibleLocators","optionalBuilds","storedDescriptors","storedResolutions","storedPackages","lockFileChecksum"]};class ie{constructor(e,{configuration:t}){this.resolutionAliases=new Map,this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map,this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.storedChecksums=new Map,this.accessibleLocators=new Set,this.originalPackages=new Map,this.optionalBuilds=new Set,this.peerRequirements=new Map,this.installersCustomData=new Map,this.lockFileChecksum=null,this.configuration=t,this.cwd=e}static async find(e,t){var r,o,i;if(!e.projectCwd)throw new s.UsageError("No project found in "+t);let a=e.projectCwd,c=t,g=null;for(;g!==e.projectCwd;){if(g=c,A.xfs.existsSync(n.y1.join(g,n.QS.manifest))){a=g;break}c=n.y1.dirname(g)}const l=new ie(e.projectCwd,{configuration:e});null===(r=x.VK.telemetry)||void 0===r||r.reportProject(l.cwd),await l.setupResolutions(),await l.setupWorkspaces(),null===(o=x.VK.telemetry)||void 0===o||o.reportWorkspaceCount(l.workspaces.length),null===(i=x.VK.telemetry)||void 0===i||i.reportDependencyCount(l.workspaces.reduce((e,t)=>e+t.manifest.dependencies.size+t.manifest.devDependencies.size,0));const u=l.tryWorkspaceByCwd(a);if(u)return{project:l,workspace:u,locator:u.anchoredLocator};const h=await l.findLocatorForLocation(a+"/",{strict:!0});if(h)return{project:l,locator:h,workspace:null};throw new s.UsageError(`The nearest package directory (${X.pretty(e,a,X.Type.PATH)}) doesn't seem to be part of the project declared in ${X.pretty(e,l.cwd,X.Type.PATH)}.\n\n- If the project directory is right, it might be that you forgot to list ${X.pretty(e,n.y1.relative(l.cwd,a),X.Type.PATH)} as a workspace.\n- If it isn't, it's likely because you have a yarn.lock or package.json file there, confusing the project root detection.`)}static generateBuildStateFile(e,t){let r="# Warning: This file is automatically generated. Removing it is fine, but will\n# cause all your builds to become invalidated.\n";const A=[...e].map(([e,r])=>{const A=t.get(e);if(void 0===A)throw new Error("Assertion failed: The locator should have been registered");return[O.stringifyLocator(A),A.locatorHash,r]});for(const[e,t,n]of _.sortMap(A,[e=>e[0],e=>e[1]]))r+="\n",r+=`# ${e}\n`,r+=JSON.stringify(t)+":\n",r+=` ${n}\n`;return r}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;const e=n.y1.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.configuration.get("defaultLanguageName");if(A.xfs.existsSync(e)){const r=await A.xfs.readFilePromise(e,"utf8");this.lockFileChecksum=V.makeHash("1",r);const n=(0,i.parseSyml)(r);if(n.__metadata){const e=n.__metadata.version,r=n.__metadata.cacheKey;for(const A of Object.keys(n)){if("__metadata"===A)continue;const o=n[A];if(void 0===o.resolution)throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);const i=O.parseLocator(o.resolution,!0),s=new Y.G;s.load(o,{yamlCompatibilityMode:!0});const a=s.version,c=s.languageName||t,g=o.linkType.toUpperCase(),l=s.dependencies,u=s.peerDependencies,h=s.dependenciesMeta,p=s.peerDependenciesMeta,d=s.bin;if(null!=o.checksum){const e=void 0===r||o.checksum.includes("/")?o.checksum:`${r}/${o.checksum}`;this.storedChecksums.set(i.locatorHash,e)}if(e>=4){const e={...i,version:a,languageName:c,linkType:g,dependencies:l,peerDependencies:u,dependenciesMeta:h,peerDependenciesMeta:p,bin:d};this.originalPackages.set(e.locatorHash,e)}for(const t of A.split(te)){const r=O.parseDescriptor(t);if(this.storedDescriptors.set(r.descriptorHash,r),e>=4)this.storedResolutions.set(r.descriptorHash,i.locatorHash);else{const e=O.convertLocatorToDescriptor(i);e.descriptorHash!==r.descriptorHash&&(this.storedDescriptors.set(e.descriptorHash,e),this.resolutionAliases.set(r.descriptorHash,e.descriptorHash))}}}}}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=[this.cwd];for(;e.length>0;){const t=e;e=[];for(const r of t){if(this.workspacesByCwd.has(r))continue;const t=await this.addWorkspace(r),A=this.storedPackages.get(t.anchoredLocator.locatorHash);A&&(t.dependencies=A.dependencies);for(const r of t.workspacesCwds)e.push(r)}}}async addWorkspace(e){const t=new z.j(e,{project:this});await t.setup();const r=this.workspacesByIdent.get(t.locator.identHash);if(void 0!==r)throw new Error(`Duplicate workspace name ${O.prettyIdent(this.configuration,t.locator)}: ${e} conflicts with ${r.cwd}`);return this.workspaces.push(t),this.workspacesByCwd.set(e,t),this.workspacesByIdent.set(t.locator.identHash,t),t}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){n.y1.isAbsolute(e)||(e=n.y1.resolve(this.cwd,e)),e=n.y1.normalize(e).replace(/\/+$/,"");const t=this.workspacesByCwd.get(e);return t||null}getWorkspaceByCwd(e){const t=this.tryWorkspaceByCwd(e);if(!t)throw new Error(`Workspace not found (${e})`);return t}tryWorkspaceByFilePath(e){let t=null;for(const r of this.workspaces){n.y1.relative(r.cwd,e).startsWith("../")||(t&&t.cwd.length>=r.cwd.length||(t=r))}return t||null}getWorkspaceByFilePath(e){const t=this.tryWorkspaceByFilePath(e);if(!t)throw new Error(`Workspace not found (${e})`);return t}tryWorkspaceByIdent(e){const t=this.workspacesByIdent.get(e.identHash);return void 0===t?null:t}getWorkspaceByIdent(e){const t=this.tryWorkspaceByIdent(e);if(!t)throw new Error(`Workspace not found (${O.prettyIdent(this.configuration,e)})`);return t}tryWorkspaceByDescriptor(e){const t=this.tryWorkspaceByIdent(e);return null!==t&&t.accepts(e.range)?t:null}getWorkspaceByDescriptor(e){const t=this.tryWorkspaceByDescriptor(e);if(null===t)throw new Error(`Workspace not found (${O.prettyDescriptor(this.configuration,e)})`);return t}tryWorkspaceByLocator(e){O.isVirtualLocator(e)&&(e=O.devirtualizeLocator(e));const t=this.tryWorkspaceByIdent(e);return null===t||t.locator.locatorHash!==e.locatorHash&&t.anchoredLocator.locatorHash!==e.locatorHash?null:t}getWorkspaceByLocator(e){const t=this.tryWorkspaceByLocator(e);if(!t)throw new Error(`Workspace not found (${O.prettyLocator(this.configuration,e)})`);return t}refreshWorkspaceDependencies(){for(const e of this.workspaces){const t=this.storedPackages.get(e.anchoredLocator.locatorHash);if(!t)throw new Error("Assertion failed: Expected workspace to have been resolved");e.dependencies=new Map(t.dependencies)}}forgetResolution(e){const t=e=>{this.storedResolutions.delete(e),this.storedDescriptors.delete(e)},r=e=>{this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)};if("descriptorHash"in e){const A=this.storedResolutions.get(e.descriptorHash);t(e.descriptorHash);const n=new Set(this.storedResolutions.values());void 0===A||n.has(A)||r(A)}if("locatorHash"in e){r(e.locatorHash);for(const[r,A]of this.storedResolutions)A===e.locatorHash&&t(r)}}forgetTransientResolutions(){const e=this.configuration.makeResolver();for(const t of this.originalPackages.values()){let r;try{r=e.shouldPersistResolution(t,{project:this,resolver:e})}catch(e){r=!1}r||this.forgetResolution(t)}}forgetVirtualResolutions(){for(const e of this.storedPackages.values())for(const[t,r]of e.dependencies)O.isVirtualDescriptor(r)&&e.dependencies.set(t,O.devirtualizeDescriptor(r))}getDependencyMeta(e,t){const r={},A=this.topLevelWorkspace.manifest.dependenciesMeta.get(O.stringifyIdent(e));if(!A)return r;const n=A.get(null);if(n&&Object.assign(r,n),null===t||!k().valid(t))return r;for(const[e,n]of A)null!==e&&e===t&&Object.assign(r,n);return r}async findLocatorForLocation(e,{strict:t=!1}={}){const r=new q.$,A=this.configuration.getLinkers(),n={project:this,report:r};for(const r of A){const A=await r.findPackageLocator(e,n);if(A){if(t){if((await r.findPackageLocation(A,n)).replace(re,"")!==e.replace(re,""))continue}return A}}return null}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error("Workspaces must have been setup before calling this function");this.forgetVirtualResolutions(),e.lockfileOnly||this.forgetTransientResolutions();const t=e.resolver||this.configuration.makeResolver(),r=new T;await r.setup(this,{report:e.report});const o=e.lockfileOnly?new G.B([new j,new J(t)]):new G.B([new j,r,t]),i=this.configuration.makeFetcher(),s=e.lockfileOnly?{project:this,report:e.report,resolver:o}:{project:this,report:e.report,resolver:o,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:i}},a=new Map,c=new Map,g=new Map,l=new Map,u=new Map,h=new Map,p=[],d=async e=>{const t=await _.prettifyAsyncErrors(async()=>await o.resolve(e,s),t=>`${O.prettyLocator(this.configuration,e)}: ${t}`);if(!O.areLocatorsEqual(e,t))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${O.prettyLocator(this.configuration,e)} to ${O.prettyLocator(this.configuration,t)})`);l.set(t.locatorHash,t);const r=this.configuration.normalizePackage(t);for(const[t,A]of r.dependencies){const n=await this.configuration.reduceHook(e=>e.reduceDependency,A,this,r,A,{resolver:o,resolveOptions:s});if(!O.areIdentsEqual(A,n))throw new Error("Assertion failed: The descriptor ident cannot be changed through aliases");const i=o.bindDescriptor(n,e,s);r.dependencies.set(t,i)}return p.push(Promise.all([...r.dependencies.values()].map(e=>f(e)))),c.set(r.locatorHash,r),r},C=async e=>{const t=this.resolutionAliases.get(e.descriptorHash);if(void 0!==t)return(async(e,t)=>{const r=await f(t);return a.set(e.descriptorHash,e),g.set(e.descriptorHash,r.locatorHash),r})(e,this.storedDescriptors.get(t));const r=o.getResolutionDependencies(e,s),A=new Map(await Promise.all(r.map(async e=>[e.descriptorHash,await f(e)]))),n=(await _.prettifyAsyncErrors(async()=>await o.getCandidates(e,A,s),t=>`${O.prettyDescriptor(this.configuration,e)}: ${t}`))[0];if(void 0===n)throw new Error(O.prettyDescriptor(this.configuration,e)+": No candidates found");return a.set(e.descriptorHash,e),g.set(e.descriptorHash,n.locatorHash),(async e=>{const t=u.get(e.locatorHash);if(void 0!==t)return t;const r=Promise.resolve().then(()=>d(e));return u.set(e.locatorHash,r),r})(n)},f=e=>{const t=h.get(e.descriptorHash);if(void 0!==t)return t;a.set(e.descriptorHash,e);const r=Promise.resolve().then(()=>C(e));return h.set(e.descriptorHash,r),r};for(const e of this.workspaces){const t=e.anchoredDescriptor;p.push(f(t))}for(;p.length>0;){const e=[...p];p.length=0,await Promise.all(e)}const I=new Set(this.resolutionAliases.values()),E=new Set(c.keys()),B=new Set,y=new Map;!function({project:e,allDescriptors:t,allResolutions:r,allPackages:o,accessibleLocators:i=new Set,optionalBuilds:s=new Set,volatileDescriptors:a=new Set,peerRequirements:c=new Map,report:g,tolerateMissingPackages:l=!1}){var u;const h=new Map,p=[],d=new Map,C=new Map,f=new Map,I=new Map,E=new Map,B=new Map(e.workspaces.map(e=>{const t=e.anchoredLocator.locatorHash,r=o.get(t);if(void 0===r){if(l)return[t,null];throw new Error("Assertion failed: The workspace should have an associated package")}return[t,O.copyPackage(r)]})),y=()=>{const e=A.xfs.mktempSync(),t=n.y1.join(e,"stacktrace.log"),r=String(p.length+1).length,o=p.map((e,t)=>`${(t+1+".").padStart(r," ")} ${O.stringifyLocator(e)}\n`).join("");throw A.xfs.writeFileSync(t,o),new H.lk(P.b.STACK_OVERFLOW_RESOLUTION,"Encountered a stack overflow when resolving peer dependencies; cf "+t)},m=e=>{const t=r.get(e.descriptorHash);if(void 0===t)throw new Error("Assertion failed: The resolution should have been registered");const A=o.get(t);if(!A)throw new Error("Assertion failed: The package could not be found");return A},w=(e,t,{first:r,optional:A})=>{p.length>1e3&&y(),p.push(e);const n=Q(e,t,{first:r,optional:A});return p.pop(),n},Q=(A,n,{first:c,optional:g})=>{if(i.has(A.locatorHash))return;i.add(A.locatorHash),g||s.delete(A.locatorHash);const u=o.get(A.locatorHash);if(!u){if(l)return;throw new Error(`Assertion failed: The package (${O.prettyLocator(e.configuration,A)}) should have been registered`)}const p=[],m=[],Q=[],D=[],b=[];for(const i of Array.from(u.dependencies.values())){if(u.peerDependencies.has(i.identHash)&&!c)continue;if(O.isVirtualDescriptor(i))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");a.delete(i.descriptorHash);let s=g;if(!s){const e=u.dependenciesMeta.get(O.stringifyIdent(i));if(void 0!==e){const t=e.get(null);void 0!==t&&t.optional&&(s=!0)}}const C=r.get(i.descriptorHash);if(!C){if(l)continue;throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(e.configuration,i)}) should have been registered`)}const v=B.get(C)||o.get(C);if(!v)throw new Error(`Assertion failed: The package (${C}, resolved from ${O.prettyDescriptor(e.configuration,i)}) should have been registered`);if(0===v.peerDependencies.size){w(v,new Map,{first:!1,optional:s});continue}const S=h.get(v.locatorHash);let k,N;"number"==typeof S&&S>=2&&y();const F=new Set;let K;m.push(()=>{k=O.virtualizeDescriptor(i,A.locatorHash),N=O.virtualizePackage(v,A.locatorHash),u.dependencies.delete(i.identHash),u.dependencies.set(k.identHash,k),r.set(k.descriptorHash,N.locatorHash),t.set(k.descriptorHash,k),o.set(N.locatorHash,N),p.push([v,k,N])}),Q.push(()=>{var e;K=new Map;for(const o of N.peerDependencies.values()){let i=u.dependencies.get(o.identHash);if(!i&&O.areIdentsEqual(A,o)&&(i=O.convertLocatorToDescriptor(A),t.set(i.descriptorHash,i),r.set(i.descriptorHash,A.locatorHash),a.delete(i.descriptorHash)),i||!N.dependencies.has(o.identHash)){if(i||(i=O.makeDescriptor(o,"missing:")),N.dependencies.set(i.identHash,i),O.isVirtualDescriptor(i)){_.getSetWithDefault(f,i.descriptorHash).add(N.locatorHash)}d.set(i.identHash,i),"missing:"===i.range&&F.add(i.identHash),K.set(o.identHash,null!==(e=n.get(o.identHash))&&void 0!==e?e:N.locatorHash)}else N.peerDependencies.delete(o.identHash)}N.dependencies=new Map(_.sortMap(N.dependencies,([e,t])=>O.stringifyIdent(t)))}),D.push(()=>{if(!o.has(N.locatorHash))return;const e=h.get(v.locatorHash),t=void 0!==e?e+1:1;h.set(v.locatorHash,t),w(N,K,{first:!1,optional:s}),h.set(v.locatorHash,t-1)}),b.push(()=>{const e=u.dependencies.get(i.identHash);if(void 0===e)throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");const t=r.get(e.descriptorHash);if(void 0===t)throw new Error("Assertion failed: Expected the descriptor to be registered");if(_.getSetWithDefault(E,t).add(A.locatorHash),o.has(N.locatorHash)){for(const e of N.peerDependencies.values()){const t=K.get(e.identHash);if(void 0===t)throw new Error("Assertion failed: Expected the peer dependency ident to be registered");_.getArrayWithDefault(_.getMapWithDefault(I,t),O.stringifyIdent(e)).push(N.locatorHash)}for(const e of F)N.dependencies.delete(e)}})}for(const e of[...m,...Q])e();let v;do{v=!0;for(const[A,n,s]of p){if(!o.has(s.locatorHash))continue;const a=_.getMapWithDefault(C,A.locatorHash),c=V.makeHash(...[...s.dependencies.values()].map(t=>{const A="missing:"!==t.range?r.get(t.descriptorHash):"missing:";if(void 0===A)throw new Error(`Assertion failed: Expected the resolution for ${O.prettyDescriptor(e.configuration,t)} to have been registered`);return A}),n.identHash),g=a.get(c);if(void 0===g){a.set(c,n);continue}if(g===n)continue;v=!1,o.delete(s.locatorHash),t.delete(n.descriptorHash),r.delete(n.descriptorHash),i.delete(s.locatorHash);const l=f.get(n.descriptorHash)||[],h=[u.locatorHash,...l];f.delete(n.descriptorHash);for(const e of h){const t=o.get(e);void 0!==t&&t.dependencies.set(n.identHash,g)}}}while(!v);for(const e of[...D,...b])e()};for(const t of e.workspaces)a.delete(t.anchoredDescriptor.descriptorHash),w(t.anchoredLocator,new Map,{first:!0,optional:!1});let D;!function(e){e[e.NotProvided=0]="NotProvided",e[e.NotCompatible=1]="NotCompatible"}(D||(D={}));const b=[];for(const[e,t]of E){const r=o.get(e);if(void 0===r)throw new Error("Assertion failed: Expected the root to be registered");const A=I.get(e);if(void 0!==A)for(const n of t){const t=o.get(n);if(void 0!==t)for(const[i,s]of A){const A=O.parseIdent(i);if(t.peerDependencies.has(A.identHash))continue;const a="p"+V.makeHash(n,i,e).slice(0,5);c.set(a,{subject:n,requested:A,rootRequester:e,allRequesters:s});const g=r.dependencies.get(A.identHash);if(void 0!==g){const e=m(g),n=null!==(u=e.version)&&void 0!==u?u:"0.0.0",i=new Set;for(const e of s){const t=o.get(e);if(void 0===t)throw new Error("Assertion failed: Expected the link to be registered");const r=t.peerDependencies.get(A.identHash);if(void 0===r)throw new Error("Assertion failed: Expected the ident to be registered");i.add(r.range)}[...i].every(e=>$.satisfiesWithPrereleases(n,e))||b.push({type:D.NotCompatible,subject:t,requested:A,requester:r,version:n,hash:a,requirementCount:s.length})}else{const e=r.peerDependenciesMeta.get(i);(null==e?void 0:e.optional)||b.push({type:D.NotProvided,subject:t,requested:A,requester:r,hash:a})}}}}const v=[e=>O.prettyLocatorNoColors(e.subject),e=>O.stringifyIdent(e.requested),e=>""+e.type];for(const t of _.sortMap(b,v))switch(t.type){case D.NotProvided:null==g||g.reportWarning(P.b.MISSING_PEER_DEPENDENCY,`${O.prettyLocator(e.configuration,t.subject)} doesn't provide ${O.prettyIdent(e.configuration,t.requested)} (${X.pretty(e.configuration,t.hash,X.Type.CODE)}), requested by ${O.prettyIdent(e.configuration,t.requester)}`);break;case D.NotCompatible:{const r=t.requirementCount>1?"and some of its descendants request":"requests";null==g||g.reportWarning(P.b.INCOMPATIBLE_PEER_DEPENDENCY,`${O.prettyLocator(e.configuration,t.subject)} provides ${O.prettyIdent(e.configuration,t.requested)} (${X.pretty(e.configuration,t.hash,X.Type.CODE)}) with version ${O.prettyReference(e.configuration,t.version)}, which doesn't satisfy what ${O.prettyIdent(e.configuration,t.requester)} ${r}`)}}b.length>0&&(null==g||g.reportWarning(P.b.UNNAMED,`Some peer dependencies are incorrectly met; run ${X.pretty(e.configuration,"yarn explain peer-requirements ",X.Type.CODE)} for details, where ${X.pretty(e.configuration,"",X.Type.CODE)} is the six-letter p-prefixed code`))}({project:this,report:e.report,accessibleLocators:B,volatileDescriptors:I,optionalBuilds:E,peerRequirements:y,allDescriptors:a,allResolutions:g,allPackages:c});for(const e of I)a.delete(e),g.delete(e);this.storedResolutions=g,this.storedDescriptors=a,this.storedPackages=c,this.accessibleLocators=B,this.originalPackages=l,this.optionalBuilds=E,this.peerRequirements=y,this.refreshWorkspaceDependencies()}async fetchEverything({cache:e,report:t,fetcher:r}){const A=r||this.configuration.makeFetcher(),n={checksums:this.storedChecksums,project:this,cache:e,fetcher:A,report:t},o=Array.from(new Set(_.sortMap(this.storedResolutions.values(),[e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");return O.stringifyLocator(t)}])));let i=!1;const s=H.yG.progressViaCounter(o.length);t.reportProgress(s);const a=v()(32);if(await t.startCacheReport(async()=>{await Promise.all(o.map(e=>a(async()=>{const r=this.storedPackages.get(e);if(!r)throw new Error("Assertion failed: The locator should have been registered");if(O.isVirtualLocator(r))return;let o;try{o=await A.fetch(r,n)}catch(e){return e.message=`${O.prettyLocator(this.configuration,r)}: ${e.message}`,t.reportExceptionOnce(e),void(i=e)}o.checksum?this.storedChecksums.set(r.locatorHash,o.checksum):this.storedChecksums.delete(r.locatorHash),o.releaseFs&&o.releaseFs()}).finally(()=>{s.tick()})))}),i)throw i}async linkEverything({cache:e,report:t,fetcher:r,skipBuild:o}){var s;const c=r||this.configuration.makeFetcher(),g={checksums:this.storedChecksums,project:this,cache:e,fetcher:c,report:t,skipIntegrityCheck:!0},l=this.configuration.getLinkers(),u={project:this,report:t},h=new Map(l.map(e=>{const t=e.makeInstaller(u),r=t.getCustomDataKey(),A=this.installersCustomData.get(r);return void 0!==A&&t.attachCustomData(A),[e,t]})),p=new Map,d=new Map,C=new Map,f=new Map(await Promise.all([...this.accessibleLocators].map(async e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");return[e,await c.fetch(t,g)]})));for(const e of this.accessibleLocators){const t=this.storedPackages.get(e);if(void 0===t)throw new Error("Assertion failed: The locator should have been registered");const r=f.get(t.locatorHash);if(void 0===r)throw new Error("Assertion failed: The fetch result should have been registered");const A=this.tryWorkspaceByLocator(t);if(null!==A){const e=[],{scripts:o}=A.manifest;for(const t of["preinstall","install","postinstall"])o.has(t)&&e.push([L.k.SCRIPT,t]);try{for(const e of h.values()){if(null!==(await e.installPackage(t,r)).buildDirective)throw new Error("Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core")}}finally{r.releaseFs&&r.releaseFs()}const i=n.y1.join(r.packageFs.getRealPath(),r.prefixPath);d.set(t.locatorHash,i),e.length>0&&C.set(t.locatorHash,{directives:e,buildLocations:[i]})}else{const e=l.find(e=>e.supportsPackage(t,u));if(!e)throw new H.lk(P.b.LINKER_NOT_FOUND,O.prettyLocator(this.configuration,t)+" isn't supported by any available linker");const A=h.get(e);if(!A)throw new Error("Assertion failed: The installer should have been registered");let n;try{n=await A.installPackage(t,r)}finally{r.releaseFs&&r.releaseFs()}p.set(t.locatorHash,e),d.set(t.locatorHash,n.packageLocation),n.buildDirective&&n.packageLocation&&C.set(t.locatorHash,{directives:n.buildDirective,buildLocations:[n.packageLocation]})}}const I=new Map;for(const e of this.accessibleLocators){const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The locator should have been registered");const r=null!==this.tryWorkspaceByLocator(t),A=async(e,A)=>{const n=d.get(t.locatorHash);if(void 0===n)throw new Error(`Assertion failed: The package (${O.prettyLocator(this.configuration,t)}) should have been registered`);const o=[];for(const A of t.dependencies.values()){const i=this.storedResolutions.get(A.descriptorHash);if(void 0===i)throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(this.configuration,A)}, from ${O.prettyLocator(this.configuration,t)})should have been registered`);const s=this.storedPackages.get(i);if(void 0===s)throw new Error(`Assertion failed: The package (${i}, resolved from ${O.prettyDescriptor(this.configuration,A)}) should have been registered`);const a=null===this.tryWorkspaceByLocator(s)?p.get(i):null;if(void 0===a)throw new Error(`Assertion failed: The package (${i}, resolved from ${O.prettyDescriptor(this.configuration,A)}) should have been registered`);const c=null===a;if(a===e||r||c)null!==d.get(s.locatorHash)&&o.push([A,s]);else if(null!==n){_.getArrayWithDefault(I,i).push(n)}}null!==n&&await A.attachInternalDependencies(t,o)};if(r)for(const[e,t]of h)await A(e,t);else{const e=p.get(t.locatorHash);if(!e)throw new Error("Assertion failed: The linker should have been found");const r=h.get(e);if(!r)throw new Error("Assertion failed: The installer should have been registered");await A(e,r)}}for(const[e,t]of I){const r=this.storedPackages.get(e);if(!r)throw new Error("Assertion failed: The package should have been registered");const A=p.get(r.locatorHash);if(!A)throw new Error("Assertion failed: The linker should have been found");const n=h.get(A);if(!n)throw new Error("Assertion failed: The installer should have been registered");await n.attachExternalDependents(r,t)}const E=new Map;for(const e of h.values()){const t=await e.finalizeInstall();for(const e of null!==(s=null==t?void 0:t.records)&&void 0!==s?s:[])C.set(e.locatorHash,{directives:e.buildDirective,buildLocations:e.buildLocations});void 0!==(null==t?void 0:t.customData)&&E.set(e.getCustomDataKey(),t.customData)}if(this.installersCustomData=E,await this.persistInstallStateFile(),o)return;const B=new Set(this.storedPackages.keys()),y=new Set(C.keys());for(const e of y)B.delete(e);const m=(0,a.createHash)("sha512");m.update(process.versions.node),this.configuration.triggerHook(e=>e.globalHashGeneration,this,e=>{m.update("\0"),m.update(e)});const w=m.digest("hex"),Q=new Map,D=e=>{let t=Q.get(e.locatorHash);if(void 0!==t)return t;const r=this.storedPackages.get(e.locatorHash);if(void 0===r)throw new Error("Assertion failed: The package should have been registered");const A=(0,a.createHash)("sha512");A.update(e.locatorHash),Q.set(e.locatorHash,"");for(const e of r.dependencies.values()){const t=this.storedResolutions.get(e.descriptorHash);if(void 0===t)throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(this.configuration,e)}) should have been registered`);const r=this.storedPackages.get(t);if(void 0===r)throw new Error("Assertion failed: The package should have been registered");A.update(D(r))}return t=A.digest("hex"),Q.set(e.locatorHash,t),t},b=(e,t)=>{const r=(0,a.createHash)("sha512");r.update(w),r.update(D(e));for(const e of t)r.update(e);return r.digest("hex")},v=this.configuration.get("bstatePath"),S=A.xfs.existsSync(v)?(0,i.parseSyml)(await A.xfs.readFilePromise(v,"utf8")):{},k=new Map;for(;y.size>0;){const e=y.size,r=[];for(const e of y){const o=this.storedPackages.get(e);if(!o)throw new Error("Assertion failed: The package should have been registered");let i=!0;for(const e of o.dependencies.values()){const t=this.storedResolutions.get(e.descriptorHash);if(!t)throw new Error(`Assertion failed: The resolution (${O.prettyDescriptor(this.configuration,e)}) should have been registered`);if(y.has(t)){i=!1;break}}if(!i)continue;y.delete(e);const s=C.get(o.locatorHash);if(!s)throw new Error("Assertion failed: The build directive should have been registered");const a=b(o,s.buildLocations);if(Object.prototype.hasOwnProperty.call(S,o.locatorHash)&&S[o.locatorHash]===a)k.set(o.locatorHash,a);else{Object.prototype.hasOwnProperty.call(S,o.locatorHash)?t.reportInfo(P.b.MUST_REBUILD,O.prettyLocator(this.configuration,o)+" must be rebuilt because its dependency tree changed"):t.reportInfo(P.b.MUST_BUILD,O.prettyLocator(this.configuration,o)+" must be built because it never did before or the last one failed");for(const e of s.buildLocations){if(!n.y1.isAbsolute(e))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${e})`);r.push((async()=>{for(const[r,i]of s.directives){let s=`# This file contains the result of Yarn building a package (${O.stringifyLocator(o)})\n`;switch(r){case L.k.SCRIPT:s+=`# Script name: ${i}\n`;break;case L.k.SHELLCODE:s+=`# Script code: ${i}\n`}const c=null;await A.xfs.mktempPromise(async g=>{const l=n.y1.join(g,"build.log"),{stdout:u,stderr:h}=this.configuration.getSubprocessStreams(l,{header:s,prefix:O.prettyLocator(this.configuration,o),report:t});let p;try{switch(r){case L.k.SCRIPT:p=await Z.executePackageScript(o,i,[],{cwd:e,project:this,stdin:c,stdout:u,stderr:h});break;case L.k.SHELLCODE:p=await Z.executePackageShellcode(o,i,[],{cwd:e,project:this,stdin:c,stdout:u,stderr:h})}}catch(e){h.write(e.stack),p=1}if(u.end(),h.end(),0===p)return k.set(o.locatorHash,a),!0;A.xfs.detachTemp(g);const d=`${O.prettyLocator(this.configuration,o)} couldn't be built successfully (exit code ${X.pretty(this.configuration,p,X.Type.NUMBER)}, logs can be found here: ${X.pretty(this.configuration,l,X.Type.PATH)})`;return t.reportInfo(P.b.BUILD_FAILED,d),this.optionalBuilds.has(o.locatorHash)?(k.set(o.locatorHash,a),!0):(t.reportError(P.b.BUILD_FAILED,d),!1)})}})())}}}if(await Promise.all(r),e===y.size){const e=Array.from(y).map(e=>{const t=this.storedPackages.get(e);if(!t)throw new Error("Assertion failed: The package should have been registered");return O.prettyLocator(this.configuration,t)}).join(", ");t.reportError(P.b.CYCLIC_DEPENDENCIES,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${e})`);break}}if(k.size>0){const e=this.configuration.get("bstatePath"),t=ie.generateBuildStateFile(k,this.storedPackages);await A.xfs.mkdirPromise(n.y1.dirname(e),{recursive:!0}),await A.xfs.changeFilePromise(e,t,{automaticNewlines:!0})}else await A.xfs.removePromise(v)}async install(e){var t,r;const i=this.configuration.get("nodeLinker");null===(t=x.VK.telemetry)||void 0===t||t.reportInstall(i),await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(e=>e.validateProject,this,{reportWarning:e.report.reportWarning.bind(e.report),reportError:e.report.reportError.bind(e.report)})});for(const e of this.configuration.packageExtensions.values())for(const[,t]of e)for(const e of t)e.status=ee._u.Inactive;const s=n.y1.join(this.cwd,this.configuration.get("lockfileFilename"));let a=null;if(e.immutable)try{a=await A.xfs.readFilePromise(s,"utf8")}catch(e){throw"ENOENT"===e.code?new H.lk(P.b.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been created by this install, which is explicitly forbidden."):e}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{for(const[,t]of this.configuration.packageExtensions)for(const[,r]of t)for(const t of r)if(t.userProvided){const r=X.pretty(this.configuration,t,X.Type.PACKAGE_EXTENSION);switch(t.status){case ee._u.Inactive:e.report.reportWarning(P.b.UNUSED_PACKAGE_EXTENSION,r+": No matching package in the dependency tree; you may not need this rule anymore.");break;case ee._u.Redundant:e.report.reportWarning(P.b.REDUNDANT_PACKAGE_EXTENSION,r+": This rule seems redundant when applied on the original package; the extension may have been applied upstream.")}}if(null!==a){const t=(0,o.qH)(a,this.generateLockfile());if(t!==a){const r=w(s,s,a,t);e.report.reportSeparator();for(const t of r.hunks){e.report.reportInfo(null,`@@ -${t.oldStart},${t.oldLines} +${t.newStart},${t.newLines} @@`);for(const r of t.lines)r.startsWith("+")?e.report.reportError(P.b.FROZEN_LOCKFILE_EXCEPTION,X.pretty(this.configuration,r,X.Type.ADDED)):r.startsWith("-")?e.report.reportError(P.b.FROZEN_LOCKFILE_EXCEPTION,X.pretty(this.configuration,r,X.Type.REMOVED)):e.report.reportInfo(null,X.pretty(this.configuration,r,"grey"))}throw e.report.reportSeparator(),new H.lk(P.b.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(const e of this.configuration.packageExtensions.values())for(const[,t]of e)for(const e of t)e.userProvided&&e.status===ee._u.Active&&(null===(r=x.VK.telemetry)||void 0===r||r.reportPackageExtension(X.json(e,X.Type.PACKAGE_EXTENSION)));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e),(void 0===e.persistProject||e.persistProject)&&await this.cacheCleanup(e)}),(void 0===e.persistProject||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{const t=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],r=await Promise.all(t.map(async e=>V.checksumPattern(e,{cwd:this.cwd})));await this.linkEverything(e);const A=await Promise.all(t.map(async e=>V.checksumPattern(e,{cwd:this.cwd})));for(let n=0;ne.afterAllInstalled,this,e)}generateLockfile(){const e=new Map;for(const[t,r]of this.storedResolutions.entries()){let A=e.get(r);A||e.set(r,A=new Set),A.add(t)}const t={__metadata:{version:4}};for(const[r,A]of e.entries()){const e=this.originalPackages.get(r);if(!e)continue;const n=[];for(const e of A){const t=this.storedDescriptors.get(e);if(!t)throw new Error("Assertion failed: The descriptor should have been registered");n.push(t)}const o=n.map(e=>O.stringifyDescriptor(e)).sort().join(", "),i=new Y.G;let s;i.version=e.linkType===ee.Un.HARD?e.version:"0.0.0-use.local",i.languageName=e.languageName,i.dependencies=new Map(e.dependencies),i.peerDependencies=new Map(e.peerDependencies),i.dependenciesMeta=new Map(e.dependenciesMeta),i.peerDependenciesMeta=new Map(e.peerDependenciesMeta),i.bin=new Map(e.bin);const a=this.storedChecksums.get(e.locatorHash);if(void 0!==a){const e=a.indexOf("/");if(-1===e)throw new Error("Assertion failed: Expecte the checksum to reference its cache key");const r=a.slice(0,e),A=a.slice(e+1);void 0===t.__metadata.cacheKey&&(t.__metadata.cacheKey=r),s=r===t.__metadata.cacheKey?A:a}t[o]={...i.exportTo({},{compatibilityMode:!1}),linkType:e.linkType.toLowerCase(),resolution:O.stringifyLocator(e),checksum:s}}return['# This file is generated by running "yarn install" inside your project.\n',"# Manual changes might be lost - proceed with caution!\n"].join("")+"\n"+(0,i.stringifySyml)(t)}async persistLockfile(){const e=n.y1.join(this.cwd,this.configuration.get("lockfileFilename")),t=this.generateLockfile();await A.xfs.changeFilePromise(e,t,{automaticNewlines:!0})}async persistInstallStateFile(){const e=[];for(const t of Object.values(oe))e.push(...t);const t=D()(this,e),r=await Ae(K().serialize(t)),o=this.configuration.get("installStatePath");await A.xfs.mkdirPromise(n.y1.dirname(o),{recursive:!0}),await A.xfs.changeFilePromise(o,r)}async restoreInstallState({restoreInstallersCustomData:e=!0,restoreResolutions:t=!0}={}){const r=this.configuration.get("installStatePath");if(!A.xfs.existsSync(r))return void(t&&await this.applyLightResolution());const n=await A.xfs.readFilePromise(r),o=K().deserialize(await ne(n));e&&void 0!==o.installersCustomData&&(this.installersCustomData=o.installersCustomData),t&&(o.lockFileChecksum===this.lockFileChecksum?(Object.assign(this,D()(o,oe.restoreResolutions)),this.refreshWorkspaceDependencies()):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new q.$}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile();for(const e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:t}){const r=new Set([".gitignore"]);if(A.xfs.existsSync(e.cwd)&&(0,W.isFolderInside)(e.cwd,this.cwd)){for(const o of await A.xfs.readdirPromise(e.cwd)){if(r.has(o))continue;const i=n.y1.resolve(e.cwd,o);e.markedFiles.has(i)||(e.immutable?t.reportError(P.b.IMMUTABLE_CACHE,X.pretty(this.configuration,n.y1.basename(i),"magenta")+" appears to be unused and would marked for deletion, but the cache is immutable"):(t.reportInfo(P.b.UNUSED_CACHE_ENTRY,X.pretty(this.configuration,n.y1.basename(i),"magenta")+" appears to be unused - removing"),await A.xfs.removePromise(i)))}e.markedFiles.clear()}}}},52779:(e,t,r)=>{"use strict";r.d(t,{c:()=>s,O:()=>a});var A=r(53887),n=r.n(A),o=r(36545),i=r(54143);const s=/^(?!v)[a-z0-9-.]+$/i;class a{supportsDescriptor(e,t){return!!o.validRange(e.range)||!!s.test(e.range)}supportsLocator(e,t){return!!n().valid(e.reference)||!!s.test(e.reference)}shouldPersistResolution(e,t){return t.resolver.shouldPersistResolution(this.forwardLocator(e,t),t)}bindDescriptor(e,t,r){return r.resolver.bindDescriptor(this.forwardDescriptor(e,r),t,r)}getResolutionDependencies(e,t){return t.resolver.getResolutionDependencies(this.forwardDescriptor(e,t),t)}async getCandidates(e,t,r){return await r.resolver.getCandidates(this.forwardDescriptor(e,r),t,r)}async getSatisfying(e,t,r){return await r.resolver.getSatisfying(this.forwardDescriptor(e,r),t,r)}async resolve(e,t){const r=await t.resolver.resolve(this.forwardLocator(e,t),t);return i.renamePackage(r,e)}forwardDescriptor(e,t){return i.makeDescriptor(e,`${t.project.configuration.get("defaultProtocol")}${e.range}`)}forwardLocator(e,t){return i.makeLocator(e,`${t.project.configuration.get("defaultProtocol")}${e.reference}`)}}},35691:(e,t,r)=>{"use strict";r.d(t,{lk:()=>i,yG:()=>s});var A=r(92413),n=r(24304),o=r(92659);class i extends Error{constructor(e,t,r){super(t),this.reportExtra=r,this.reportCode=e}}class s{constructor(){this.reportedInfos=new Set,this.reportedWarnings=new Set,this.reportedErrors=new Set}static progressViaCounter(e){let t,r=0,A=new Promise(e=>{t=e});const n=e=>{const n=t;A=new Promise(e=>{t=e}),r=e,n()},o=async function*(){for(;ro,set:n,tick:(e=0)=>{n(r+1)}}}reportInfoOnce(e,t,r){const A=r&&r.key?r.key:t;this.reportedInfos.has(A)||(this.reportedInfos.add(A),this.reportInfo(e,t))}reportWarningOnce(e,t,r){const A=r&&r.key?r.key:t;this.reportedWarnings.has(A)||(this.reportedWarnings.add(A),this.reportWarning(e,t))}reportErrorOnce(e,t,r){var A;const n=r&&r.key?r.key:t;this.reportedErrors.has(n)||(this.reportedErrors.add(n),this.reportError(e,t),null===(A=null==r?void 0:r.reportExtra)||void 0===A||A.call(r,this))}reportExceptionOnce(e){!function(e){return void 0!==e.reportCode}(e)?this.reportErrorOnce(o.b.EXCEPTION,e.stack||e.message,{key:e}):this.reportErrorOnce(e.reportCode,e.message,{key:e,reportExtra:e.reportExtra})}createStreamReporter(e=null){const t=new A.PassThrough,r=new n.StringDecoder;let o="";return t.on("data",t=>{let A,n=r.write(t);do{if(A=n.indexOf("\n"),-1!==A){const t=o+n.substr(0,A);n=n.substr(A+1),o="",null!==e?this.reportInfo(null,`${e} ${t}`):this.reportInfo(null,t)}}while(-1!==A);o+=n}),t.on("end",()=>{const t=r.end();""!==t&&(null!==e?this.reportInfo(null,`${e} ${t}`):this.reportInfo(null,t))}),t}}},15815:(e,t,r)=>{"use strict";r.d(t,{Qw:()=>C,Pk:()=>f});var A=r(29148),n=r.n(A),o=r(92659),i=r(35691),s=r(71643);const a=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"],c=new Set([o.b.FETCH_NOT_CACHED,o.b.UNUSED_CACHE_ENTRY]),g=process.env.GITHUB_ACTIONS?{start:e=>`::group::${e}\n`,end:e=>"::endgroup::\n"}:process.env.TRAVIS?{start:e=>`travis_fold:start:${e}\n`,end:e=>`travis_fold:end:${e}\n`}:process.env.GITLAB_CI?{start:e=>`section_start:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}\r${e}\n`,end:e=>`section_end:${Math.floor(Date.now()/1e3)}:${e.toLowerCase().replace(/\W+/g,"_")}\r`}:null,l=new Date,u=["iTerm.app","Apple_Terminal"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,h={patrick:{date:[17,3],chars:["🍀","🌱"],size:40},simba:{date:[19,7],chars:["🦁","🌴"],size:40},jack:{date:[31,10],chars:["🎃","🦇"],size:40},hogsfather:{date:[31,12],chars:["🎉","🎄"],size:40},default:{chars:["=","-"],size:80}},p=u&&Object.keys(h).find(e=>{const t=h[e];return!t.date||t.date[0]===l.getDate()&&t.date[1]===l.getMonth()+1})||"default";function d(e,{configuration:t,json:r}){const A=null===e?0:e,n=(0,o.i)(A);return r||null!==e?n:s.pretty(t,n,"grey")}function C(e,{configuration:t,json:r}){const A=d(e,{configuration:t,json:r});if(!t.get("enableHyperlinks"))return A;if(null===e||e===o.b.UNNAMED)return A;return`]8;;${`https://yarnpkg.com/advanced/error-codes#${A}---${o.b[e]}`.toLowerCase()}${A}]8;;`}class f extends i.yG{constructor({configuration:e,stdout:t,json:r=!1,includeFooter:A=!0,includeLogs:n=!r,includeInfos:o=n,includeWarnings:i=n,forgettableBufferSize:a=5,forgettableNames:g=new Set}){super(),this.uncommitted=new Set,this.cacheHitCount=0,this.cacheMissCount=0,this.warningCount=0,this.errorCount=0,this.startTime=Date.now(),this.indent=0,this.progress=new Map,this.progressTime=0,this.progressFrame=0,this.progressTimeout=null,this.forgettableLines=[],s.addLogFilterSupport(this,{configuration:e}),this.configuration=e,this.forgettableBufferSize=a,this.forgettableNames=new Set([...g,...c]),this.includeFooter=A,this.includeInfos=o,this.includeWarnings=i,this.json=r,this.stdout=t;const l=this.configuration.get("progressBarStyle")||p;if(!Object.prototype.hasOwnProperty.call(h,l))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=h[l];const u="➤ YN0000: ┌ ".length,d=Math.max(0,Math.min(process.stdout.columns-u,80));this.progressMaxScaledSize=Math.floor(this.progressStyle.size*d/80)}static async start(e,t){const r=new this(e),A=process.emitWarning;process.emitWarning=(e,t)=>{if("string"!=typeof e){const r=e;e=r.message,t=null!=t?t:r.name}const A=void 0!==t?`${t}: ${e}`:e;r.reportWarning(o.b.UNNAMED,A)};try{await t(r)}catch(e){r.reportExceptionOnce(e)}finally{await r.finalize(),process.emitWarning=A}return r}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){this.cacheHitCount+=1}reportCacheMiss(e,t){this.cacheMissCount+=1,void 0===t||this.configuration.get("preferAggregateCacheInfo")||this.reportInfo(o.b.FETCH_NOT_CACHED,t)}startTimerSync(e,t,r){const A="function"==typeof t?t:r,n={committed:!1,action:()=>{this.reportInfo(null,"┌ "+e),this.indent+=1,null!==g&&this.stdout.write(g.start(e))}};("function"==typeof t?{}:t).skipIfEmpty?this.uncommitted.add(n):(n.action(),n.committed=!0);const o=Date.now();try{return A()}catch(e){throw this.reportExceptionOnce(e),e}finally{const t=Date.now();this.uncommitted.delete(n),n.committed&&(this.indent-=1,null!==g&&this.stdout.write(g.end(e)),this.configuration.get("enableTimers")&&t-o>200?this.reportInfo(null,"└ Completed in "+s.pretty(this.configuration,t-o,s.Type.DURATION)):this.reportInfo(null,"└ Completed"))}}async startTimerPromise(e,t,r){const A="function"==typeof t?t:r,n={committed:!1,action:()=>{this.reportInfo(null,"┌ "+e),this.indent+=1,null!==g&&this.stdout.write(g.start(e))}};("function"==typeof t?{}:t).skipIfEmpty?this.uncommitted.add(n):(n.action(),n.committed=!0);const o=Date.now();try{return await A()}catch(e){throw this.reportExceptionOnce(e),e}finally{const t=Date.now();this.uncommitted.delete(n),n.committed&&(this.indent-=1,null!==g&&this.stdout.write(g.end(e)),this.configuration.get("enableTimers")&&t-o>200?this.reportInfo(null,"└ Completed in "+s.pretty(this.configuration,t-o,s.Type.DURATION)):this.reportInfo(null,"└ Completed"))}}async startCacheReport(e){const t=this.configuration.get("preferAggregateCacheInfo")?{cacheHitCount:this.cacheHitCount,cacheMissCount:this.cacheMissCount}:null;try{return await e()}catch(e){throw this.reportExceptionOnce(e),e}finally{null!==t&&this.reportCacheChanges(t)}}reportSeparator(){0===this.indent?this.writeLineWithForgettableReset(""):this.reportInfo(null,"")}reportInfo(e,t){if(!this.includeInfos)return;this.commit();const r=`${s.pretty(this.configuration,"➤","blueBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`;if(this.json)this.reportJson({type:"info",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t});else if(this.forgettableNames.has(e))if(this.forgettableLines.push(r),this.forgettableLines.length>this.forgettableBufferSize){for(;this.forgettableLines.length>this.forgettableBufferSize;)this.forgettableLines.shift();this.writeLines(this.forgettableLines,{truncate:!0})}else this.writeLine(r,{truncate:!0});else this.writeLineWithForgettableReset(r)}reportWarning(e,t){this.warningCount+=1,this.includeWarnings&&(this.commit(),this.json?this.reportJson({type:"warning",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${s.pretty(this.configuration,"➤","yellowBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`))}reportError(e,t){this.errorCount+=1,this.commit(),this.json?this.reportJson({type:"error",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:t}):this.writeLineWithForgettableReset(`${s.pretty(this.configuration,"➤","redBright")} ${this.formatNameWithHyperlink(e)}: ${this.formatIndent()}${t}`,{truncate:!1})}reportProgress(e){let t=!1;const r=Promise.resolve().then(async()=>{const r={progress:0,title:void 0};this.progress.set(e,{definition:r,lastScaledSize:-1}),this.refreshProgress(-1);for await(const{progress:A,title:n}of e)t||r.progress===A&&r.title===n||(r.progress=A,r.title=n,this.refreshProgress());A()}),A=()=>{t||(t=!0,this.progress.delete(e),this.refreshProgress(1))};return{...r,stop:A}}reportJson(e){this.json&&this.writeLineWithForgettableReset(""+JSON.stringify(e))}async finalize(){if(!this.includeFooter)return;let e="";e=this.errorCount>0?"Failed with errors":this.warningCount>0?"Done with warnings":"Done";const t=s.pretty(this.configuration,Date.now()-this.startTime,s.Type.DURATION),r=this.configuration.get("enableTimers")?`${e} in ${t}`:e;this.errorCount>0?this.reportError(o.b.UNNAMED,r):this.warningCount>0?this.reportWarning(o.b.UNNAMED,r):this.reportInfo(o.b.UNNAMED,r)}writeLine(e,{truncate:t}={}){this.clearProgress({clear:!0}),this.stdout.write(this.truncate(e,{truncate:t})+"\n"),this.writeProgress()}writeLineWithForgettableReset(e,{truncate:t}={}){this.forgettableLines=[],this.writeLine(e,{truncate:t})}writeLines(e,{truncate:t}={}){this.clearProgress({delta:e.length});for(const r of e)this.stdout.write(this.truncate(r,{truncate:t})+"\n");this.writeProgress()}reportCacheChanges({cacheHitCount:e,cacheMissCount:t}){const r=this.cacheHitCount-e,A=this.cacheMissCount-t;if(0===r&&0===A)return;let n="";this.cacheHitCount>1?n+=this.cacheHitCount+" packages were already cached":1===this.cacheHitCount?n+=" - one package was already cached":n+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?n+=`, ${this.cacheMissCount} had to be fetched`:1===this.cacheMissCount&&(n+=", one had to be fetched"):this.cacheMissCount>1?n+=` - ${this.cacheMissCount} packages had to be fetched`:1===this.cacheMissCount&&(n+=" - one package had to be fetched"),this.reportInfo(o.b.FETCH_NOT_CACHED,n)}commit(){const e=this.uncommitted;this.uncommitted=new Set;for(const t of e)t.committed=!0,t.action()}clearProgress({delta:e=0,clear:t=!1}){this.configuration.get("enableProgressBars")&&!this.json&&this.progress.size+e>0&&(this.stdout.write(`[${this.progress.size+e}A`),(e>0||t)&&this.stdout.write(""))}writeProgress(){if(!this.configuration.get("enableProgressBars")||this.json)return;if(null!==this.progressTimeout&&clearTimeout(this.progressTimeout),this.progressTimeout=null,0===this.progress.size)return;const e=Date.now();e-this.progressTime>80&&(this.progressFrame=(this.progressFrame+1)%a.length,this.progressTime=e);const t=a[this.progressFrame];for(const e of this.progress.values()){const r=this.progressStyle.chars[0].repeat(e.lastScaledSize),A=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-e.lastScaledSize);this.stdout.write(`${s.pretty(this.configuration,"➤","blueBright")} ${this.formatName(null)}: ${t} ${r}${A}\n`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress()},80)}refreshProgress(e=0){let t=!1;if(0===this.progress.size)t=!0;else for(const e of this.progress.values()){const r=Math.trunc(this.progressMaxScaledSize*e.definition.progress),A=e.lastScaledSize;if(e.lastScaledSize=r,r!==A){t=!0;break}}t&&(this.clearProgress({delta:e}),this.writeProgress())}truncate(e,{truncate:t}={}){return this.configuration.get("enableProgressBars")||(t=!1),void 0===t&&(t=this.configuration.get("preferTruncatedLines")),t&&(e=n()(e,0,process.stdout.columns-1)),e}formatName(e){return d(e,{configuration:this.configuration,json:this.json})}formatNameWithHyperlink(e){return C(e,{configuration:this.configuration,json:this.json})}formatIndent(){return"│ ".repeat(this.indent)}}},81832:(e,t,r)=>{"use strict";r.d(t,{E:()=>a});var A,n=r(43896),o=r(46009),i=r(79669),s=r(73632);!function(e){e.VERSION="version",e.COMMAND_NAME="commandName",e.PLUGIN_NAME="pluginName",e.INSTALL_COUNT="installCount",e.PROJECT_COUNT="projectCount",e.WORKSPACE_COUNT="workspaceCount",e.DEPENDENCY_COUNT="dependencyCount",e.EXTENSION="packageExtension"}(A||(A={}));class a{constructor(e,t){this.values=new Map,this.hits=new Map,this.enumerators=new Map,this.configuration=e;const r=this.getRegistryPath();this.isNew=!n.xfs.existsSync(r),this.sendReport(t),this.startBuffer()}reportVersion(e){this.reportValue(A.VERSION,e)}reportCommandName(e){this.reportValue(A.COMMAND_NAME,e||"")}reportPluginName(e){this.reportValue(A.PLUGIN_NAME,e)}reportProject(e){this.reportEnumerator(A.PROJECT_COUNT,e)}reportInstall(e){this.reportHit(A.INSTALL_COUNT,e)}reportPackageExtension(e){this.reportValue(A.EXTENSION,e)}reportWorkspaceCount(e){this.reportValue(A.WORKSPACE_COUNT,String(e))}reportDependencyCount(e){this.reportValue(A.DEPENDENCY_COUNT,String(e))}reportValue(e,t){s.getSetWithDefault(this.values,e).add(t)}reportEnumerator(e,t){s.getSetWithDefault(this.enumerators,e).add(t)}reportHit(e,t="*"){const r=s.getMapWithDefault(this.hits,e),A=s.getFactoryWithDefault(r,t,()=>0);r.set(t,A+1)}getRegistryPath(){const e=this.configuration.get("globalFolder");return o.y1.join(e,"telemetry.json")}sendReport(e){var t,r,A;const s=this.getRegistryPath();let a;try{a=n.xfs.readJsonSync(s)}catch(e){a={}}const c=Date.now(),g=24*this.configuration.get("telemetryInterval")*60*60*1e3,l=(null!==(t=a.lastUpdate)&&void 0!==t?t:c+g+Math.floor(g*Math.random()))+g;if(!(l>c&&null!=a.lastUpdate)){try{n.xfs.mkdirSync(o.y1.dirname(s),{recursive:!0}),n.xfs.writeJsonSync(s,{lastUpdate:c})}catch(e){return}if(!(l>c)&&a.blocks)for(const[t,n]of Object.entries(null!==(r=a.blocks)&&void 0!==r?r:{})){if(0===Object.keys(n).length)continue;const r=n;r.userId=t;for(const e of Object.keys(null!==(A=r.enumerators)&&void 0!==A?A:{}))r.enumerators[e]=r.enumerators[e].length;const o=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`;i.post(o,r,{configuration:this.configuration}).catch(()=>{})}}}applyChanges(){var e,t,r,A,i,s,a,c,g;const l=this.getRegistryPath();let u;try{u=n.xfs.readJsonSync(l)}catch(e){u={}}const h=null!==(e=this.configuration.get("telemetryUserId"))&&void 0!==e?e:"*",p=u.blocks=null!==(t=u.blocks)&&void 0!==t?t:{},d=p[h]=null!==(r=p[h])&&void 0!==r?r:{};for(const e of this.hits.keys()){const t=d.hits=null!==(A=d.hits)&&void 0!==A?A:{},r=t[e]=null!==(i=t[e])&&void 0!==i?i:{};for(const[t,A]of this.hits.get(e))r[t]=(null!==(s=r[t])&&void 0!==s?s:0)+A}for(const e of["values","enumerators"])for(const t of this[e].keys()){const r=d[e]=null!==(a=d[e])&&void 0!==a?a:{};r[t]=[...new Set([...null!==(c=r[t])&&void 0!==c?c:[],...null!==(g=this[e].get(t))&&void 0!==g?g:[]])]}n.xfs.mkdirSync(o.y1.dirname(l),{recursive:!0}),n.xfs.writeJsonSync(l,u)}startBuffer(){process.on("exit",()=>{try{this.applyChanges()}catch(e){}})}}},33720:(e,t,r)=>{"use strict";r.d(t,{$:()=>n});var A=r(35691);class n extends A.yG{reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,t,r){return("function"==typeof t?t:r)()}async startTimerPromise(e,t,r){const A="function"==typeof t?t:r;return await A()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,t){}reportWarning(e,t){}reportError(e,t){}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(const{}of e);}),stop:()=>{}}}reportJson(e){}async finalize(){}}},60895:(e,t,r)=>{"use strict";r.d(t,{N:()=>s});var A=r(17674),n=r(14626),o=r(46009),i=r(54143);class s{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,t){const r=e.reference.indexOf("#");if(-1===r)throw new Error("Invalid virtual package reference");const A=e.reference.slice(r+1),n=i.makeLocator(e,A);return t.fetcher.getLocalPath(n,t)}async fetch(e,t){const r=e.reference.indexOf("#");if(-1===r)throw new Error("Invalid virtual package reference");const A=e.reference.slice(r+1),n=i.makeLocator(e,A),o=await t.fetcher.fetch(n,t);return await this.ensureVirtualLink(e,o,t)}getLocatorFilename(e){return i.slugifyLocator(e)}async ensureVirtualLink(e,t,r){const i=t.packageFs.getRealPath(),s=r.project.configuration.get("virtualFolder"),a=this.getLocatorFilename(e),c=A.p.makeVirtualPath(s,a,i),g=new n.K(c,{baseFs:t.packageFs,pathUtils:o.y1});return{...t,packageFs:g}}}},17722:(e,t,r)=>{"use strict";r.d(t,{j:()=>h});var A=r(43896),n=r(46009),o=r(58592),i=r.n(o),s=r(53887),a=r.n(s),c=r(46611),g=r(94538),l=r(20624),u=r(54143);class h{constructor(e,{project:t}){this.workspacesCwds=new Set,this.dependencies=new Map,this.project=t,this.cwd=e}async setup(){this.manifest=A.xfs.existsSync(n.y1.join(this.cwd,c.G.fileName))?await c.G.find(this.cwd):new c.G,this.relativeCwd=n.y1.relative(this.project.cwd,this.cwd)||n.LZ.dot;const e=this.manifest.name?this.manifest.name:u.makeIdent(null,`${this.computeCandidateName()}-${l.makeHash(this.relativeCwd).substr(0,6)}`),t=this.manifest.version?this.manifest.version:"0.0.0";this.locator=u.makeLocator(e,t),this.anchoredDescriptor=u.makeDescriptor(this.locator,`${g.d.protocol}${this.relativeCwd}`),this.anchoredLocator=u.makeLocator(this.locator,`${g.d.protocol}${this.relativeCwd}`);const r=this.manifest.workspaceDefinitions.map(({pattern:e})=>e),o=await i()(r,{absolute:!0,cwd:n.cS.fromPortablePath(this.cwd),expandDirectories:!1,onlyDirectories:!0,onlyFiles:!1,ignore:["**/node_modules","**/.git","**/.yarn"]});o.sort();for(const e of o){const t=n.y1.resolve(this.cwd,n.cS.toPortablePath(e));A.xfs.existsSync(n.y1.join(t,"package.json"))&&this.workspacesCwds.add(t)}}accepts(e){const t=e.indexOf(":"),r=-1!==t?e.slice(0,t+1):null,A=-1!==t?e.slice(t+1):e;return r===g.d.protocol&&n.y1.normalize(A)===this.relativeCwd||(r===g.d.protocol&&"*"===A||!!a().validRange(A)&&(r===g.d.protocol?a().satisfies(null!==this.manifest.version?this.manifest.version:"0.0.0",A):!!this.project.configuration.get("enableTransparentWorkspaces")&&(null!==this.manifest.version&&a().satisfies(this.manifest.version,A))))}computeCandidateName(){return this.cwd===this.project.cwd?"root-workspace":""+n.y1.basename(this.cwd)||"unnamed-workspace"}async persistManifest(){const e={};this.manifest.exportTo(e);const t=n.y1.join(this.cwd,c.G.fileName),r=JSON.stringify(e,null,this.manifest.indent)+"\n";await A.xfs.changeFilePromise(t,r,{automaticNewlines:!0})}}},94538:(e,t,r)=>{"use strict";r.d(t,{d:()=>n});var A=r(32485);class n{supportsDescriptor(e,t){if(e.range.startsWith(n.protocol))return!0;return null!==t.project.tryWorkspaceByDescriptor(e)}supportsLocator(e,t){return!!e.reference.startsWith(n.protocol)}shouldPersistResolution(e,t){return!1}bindDescriptor(e,t,r){return e}getResolutionDependencies(e,t){return[]}async getCandidates(e,t,r){return[r.project.getWorkspaceByDescriptor(e).anchoredLocator]}async getSatisfying(e,t,r){return null}async resolve(e,t){const r=t.project.getWorkspaceByCwd(e.reference.slice(n.protocol.length));return{...e,version:r.manifest.version||"0.0.0",languageName:"unknown",linkType:A.Un.SOFT,dependencies:new Map([...r.manifest.dependencies,...r.manifest.devDependencies]),peerDependencies:new Map([...r.manifest.peerDependencies]),dependenciesMeta:r.manifest.dependenciesMeta,peerDependenciesMeta:r.manifest.peerDependenciesMeta,bin:r.manifest.bin}}}n.protocol="workspace:"},59355:(e,t,r)=>{"use strict";r.d(t,{o:()=>A});const A="2.4.0"},6220:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EndStrategy:()=>A,pipevp:()=>g,execvp:()=>l});var A,n=r(46009),o=r(67566),i=r.n(o);function s(e){return null!==e&&"number"==typeof e.fd}function a(){}!function(e){e[e.Never=0]="Never",e[e.ErrorCode=1]="ErrorCode",e[e.Always=2]="Always"}(A||(A={}));let c=0;async function g(e,t,{cwd:r,env:o=process.env,strict:g=!1,stdin:l=null,stdout:u,stderr:p,end:d=A.Always}){const C=["pipe","pipe","pipe"];null===l?C[0]="ignore":s(l)&&(C[0]=l),s(u)&&(C[1]=u),s(p)&&(C[2]=p),0==c++&&process.on("SIGINT",a);const f=i()(e,t,{cwd:n.cS.fromPortablePath(r),env:{...o,PWD:n.cS.fromPortablePath(r)},stdio:C});s(l)||null===l||l.pipe(f.stdin),s(u)||f.stdout.pipe(u,{end:!1}),s(p)||f.stderr.pipe(p,{end:!1});const I=()=>{for(const e of new Set([u,p]))s(e)||e.end()};return new Promise((t,r)=>{f.on("error",e=>{0==--c&&process.off("SIGINT",a),d!==A.Always&&d!==A.ErrorCode||I(),r(e)}),f.on("close",(n,o)=>{0==--c&&process.off("SIGINT",a),(d===A.Always||d===A.ErrorCode&&n>0)&&I(),0!==n&&g?r(null!==n?new Error(`Child "${e}" exited with exit code ${n}`):new Error(`Child "${e}" exited with signal ${o}`)):t({code:h(n,o)})})})}async function l(e,t,{cwd:r,env:A=process.env,encoding:o="utf8",strict:s=!1}){const a=["ignore","pipe","pipe"],c=[],g=[],l=n.cS.fromPortablePath(r);void 0!==A.PWD&&(A={...A,PWD:l});const u=i()(e,t,{cwd:l,env:A,stdio:a});return u.stdout.on("data",e=>{c.push(e)}),u.stderr.on("data",e=>{g.push(e)}),await new Promise((t,r)=>{u.on("error",r),u.on("close",(A,n)=>{const i="buffer"===o?Buffer.concat(c):Buffer.concat(c).toString(o),a="buffer"===o?Buffer.concat(g):Buffer.concat(g).toString(o);0!==A&&s?r(Object.assign(new Error(`Child "${e}" exited with exit code ${A}\n\n${a}`),{code:h(A,n),stdout:i,stderr:a})):t({code:h(A,n),stdout:i,stderr:a})})})}const u=new Map([["SIGINT",2],["SIGQUIT",3],["SIGKILL",9],["SIGTERM",15]]);function h(e,t){const r=u.get(t);return void 0!==r?128+r:null!=e?e:1}},81111:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getDefaultGlobalFolder:()=>o,getHomeFolder:()=>i,isFolderInside:()=>s});var A=r(46009),n=r(12087);function o(){if("win32"===process.platform){const e=A.cS.toPortablePath(process.env.LOCALAPPDATA||A.cS.join((0,n.homedir)(),"AppData","Local"));return A.y1.resolve(e,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){const e=A.cS.toPortablePath(process.env.XDG_DATA_HOME);return A.y1.resolve(e,"yarn/berry")}return A.y1.resolve(i(),".yarn/berry")}function i(){return A.cS.toPortablePath((0,n.homedir)()||"/usr/local/share")}function s(e,t){const r=A.y1.relative(t,e);return r&&!r.startsWith("..")&&!A.y1.isAbsolute(r)}},71643:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Type:()=>A,Style:()=>n,supportsColor:()=>h,supportsHyperlinks:()=>p,tuple:()=>I,applyStyle:()=>E,applyColor:()=>B,pretty:()=>y,prettyList:()=>m,json:()=>w,mark:()=>Q,LogLevel:()=>D,addLogFilterSupport:()=>b});var A,n,o=r(46009),i=r(95882),s=r.n(i),a=r(92659),c=r(73632),g=r(54143),l=r(32485);!function(e){e.NO_HINT="NO_HINT",e.NULL="NULL",e.SCOPE="SCOPE",e.NAME="NAME",e.RANGE="RANGE",e.REFERENCE="REFERENCE",e.NUMBER="NUMBER",e.PATH="PATH",e.URL="URL",e.ADDED="ADDED",e.REMOVED="REMOVED",e.CODE="CODE",e.DURATION="DURATION",e.SIZE="SIZE",e.IDENT="IDENT",e.DESCRIPTOR="DESCRIPTOR",e.LOCATOR="LOCATOR",e.RESOLUTION="RESOLUTION",e.DEPENDENT="DEPENDENT",e.PACKAGE_EXTENSION="PACKAGE_EXTENSION"}(A||(A={})),function(e){e[e.BOLD=2]="BOLD"}(n||(n={}));const u=process.env.GITHUB_ACTIONS?{level:2}:s().supportsColor?{level:s().supportsColor.level}:{level:0},h=0!==u.level,p=h&&!process.env.GITHUB_ACTIONS,d=new(s().Instance)(u),C=new Map([[A.NO_HINT,null],[A.NULL,["#a853b5",129]],[A.SCOPE,["#d75f00",166]],[A.NAME,["#d7875f",173]],[A.RANGE,["#00afaf",37]],[A.REFERENCE,["#87afff",111]],[A.NUMBER,["#ffd700",220]],[A.PATH,["#d75fd7",170]],[A.URL,["#d75fd7",170]],[A.ADDED,["#5faf00",70]],[A.REMOVED,["#d70000",160]],[A.CODE,["#87afff",111]],[A.SIZE,["#ffd700",220]]]),f={[A.NUMBER]:{pretty:(e,t)=>""+t,json:e=>e},[A.IDENT]:{pretty:(e,t)=>g.prettyIdent(e,t),json:e=>g.stringifyIdent(e)},[A.LOCATOR]:{pretty:(e,t)=>g.prettyLocator(e,t),json:e=>g.stringifyLocator(e)},[A.DESCRIPTOR]:{pretty:(e,t)=>g.prettyDescriptor(e,t),json:e=>g.stringifyDescriptor(e)},[A.RESOLUTION]:{pretty:(e,{descriptor:t,locator:r})=>g.prettyResolution(e,t,r),json:({descriptor:e,locator:t})=>({descriptor:g.stringifyDescriptor(e),locator:null!==t?g.stringifyLocator(t):null})},[A.DEPENDENT]:{pretty:(e,{locator:t,descriptor:r})=>g.prettyDependent(e,t,r),json:({locator:e,descriptor:t})=>({locator:g.stringifyLocator(e),descriptor:g.stringifyDescriptor(t)})},[A.PACKAGE_EXTENSION]:{pretty:(e,t)=>{switch(t.type){case l.HN.Dependency:return`${g.prettyIdent(e,t.parentDescriptor)} ➤ ${B(e,"dependencies",A.CODE)} ➤ ${g.prettyIdent(e,t.descriptor)}`;case l.HN.PeerDependency:return`${g.prettyIdent(e,t.parentDescriptor)} ➤ ${B(e,"peerDependencies",A.CODE)} ➤ ${g.prettyIdent(e,t.descriptor)}`;case l.HN.PeerDependencyMeta:return`${g.prettyIdent(e,t.parentDescriptor)} ➤ ${B(e,"peerDependenciesMeta",A.CODE)} ➤ ${g.prettyIdent(e,g.parseIdent(t.selector))} ➤ ${B(e,t.key,A.CODE)}`;default:throw new Error("Assertion failed: Unsupported package extension type: "+t.type)}},json:e=>{switch(e.type){case l.HN.Dependency:return`${g.stringifyIdent(e.parentDescriptor)} > ${g.stringifyIdent(e.descriptor)}`;case l.HN.PeerDependency:return`${g.stringifyIdent(e.parentDescriptor)} >> ${g.stringifyIdent(e.descriptor)}`;case l.HN.PeerDependencyMeta:return`${g.stringifyIdent(e.parentDescriptor)} >> ${e.selector} / ${e.key}`;default:throw new Error("Assertion failed: Unsupported package extension type: "+e.type)}}},[A.DURATION]:{pretty:(e,t)=>{if(t>6e4){const e=Math.floor(t/1e3/60),r=Math.ceil((t-60*e*1e3)/1e3);return 0===r?e+"m":`${e}m ${r}s`}{const e=Math.floor(t/1e3),r=t-1e3*e;return 0===r?e+"s":`${e}s ${r}ms`}},json:e=>e},[A.SIZE]:{pretty:(e,t)=>{const r=["KB","MB","GB","TB"];let n=r.length;for(;n>1&&t<1024**n;)n-=1;const o=1024**n;return B(e,`${Math.floor(100*t/o)/100} ${r[n-1]}`,A.NUMBER)},json:e=>e},[A.PATH]:{pretty:(e,t)=>B(e,o.cS.fromPortablePath(t),A.PATH),json:e=>o.cS.fromPortablePath(e)}};function I(e,t){return[t,e]}function E(e,t,r){return e.get("enableColors")?(r&n.BOLD&&(t=s().bold(t)),t):t}function B(e,t,r){if(!e.get("enableColors"))return t;const A=C.get(r);if(null===A)return t;const n=void 0===A?r:u.level>=3?A[0]:A[1],o="number"==typeof n?d.ansi256(n):n.startsWith("#")?d.hex(n):d[n];if("function"!=typeof o)throw new Error("Invalid format type "+n);return o(t)}function y(e,t,r){if(null===t)return B(e,"null",A.NULL);if(Object.prototype.hasOwnProperty.call(f,r)){return f[r].pretty(e,t)}if("string"!=typeof t)throw new Error("Assertion failed: Expected the value to be a string, got "+typeof t);return B(e,t,r)}function m(e,t,r,{separator:A=", "}={}){return[...t].map(t=>y(e,t,r)).join(A)}function w(e,t){if(null===e)return null;if(Object.prototype.hasOwnProperty.call(f,t))return c.overrideType(t),f[t].json(e);if("string"!=typeof e)throw new Error("Assertion failed: Expected the value to be a string, got "+typeof e);return e}function Q(e){return{Check:B(e,"✓","green"),Cross:B(e,"✘","red"),Question:B(e,"?","cyan")}}var D;function b(e,{configuration:t}){const r=t.get("logFilters"),A=new Map,n=new Map;for(const e of r){const t=e.get("level");if(void 0===t)continue;const r=e.get("code");void 0!==r&&A.set(r,t);const o=e.get("text");void 0!==o&&n.set(o,t)}const o=e.reportInfo,i=e.reportWarning,c=e.reportError,g=function(e,t,r,g){switch(((e,t,r)=>{if(null===e||e===a.b.UNNAMED)return r;if(n.size>0){const e=n.get(s().reset(t));if(void 0!==e)return null!=e?e:r}if(A.size>0){const t=A.get((0,a.i)(e));if(void 0!==t)return null!=t?t:r}return r})(t,r,g)){case D.Info:o.call(e,t,r);break;case D.Warning:i.call(e,null!=t?t:a.b.UNNAMED,r);break;case D.Error:c.call(e,null!=t?t:a.b.UNNAMED,r)}};e.reportInfo=function(...e){return g(this,...e,D.Info)},e.reportWarning=function(...e){return g(this,...e,D.Warning)},e.reportError=function(...e){return g(this,...e,D.Error)}}!function(e){e.Error="error",e.Warning="warning",e.Info="info",e.Discard="discard"}(D||(D={}))},20624:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeHash:()=>a,checksumFile:()=>c,checksumPattern:()=>g});var A=r(43896),n=r(46009),o=r(76417),i=r(58592),s=r.n(i);function a(...e){const t=(0,o.createHash)("sha512");for(const r of e)t.update(r||"");return t.digest("hex")}function c(e){return new Promise((t,r)=>{const n=(0,o.createHash)("sha512"),i=A.xfs.createReadStream(e);i.on("data",e=>{n.update(e)}),i.on("error",e=>{r(e)}),i.on("end",()=>{t(n.digest("hex"))})})}async function g(e,{cwd:t}){const r=(await s()(e,{cwd:n.cS.fromPortablePath(t),expandDirectories:!1,onlyDirectories:!0,unique:!0})).map(e=>e+"/**/*"),i=await s()([e,...r],{cwd:n.cS.fromPortablePath(t),expandDirectories:!1,onlyFiles:!1,unique:!0});i.sort();const a=await Promise.all(i.map(async e=>{const t=[Buffer.from(e)],r=n.cS.toPortablePath(e),o=await A.xfs.lstatPromise(r);return o.isSymbolicLink()?t.push(Buffer.from(await A.xfs.readlinkPromise(r))):o.isFile()&&t.push(await A.xfs.readFilePromise(r)),t.join("\0")})),c=(0,o.createHash)("sha512");for(const e of a)c.update(e);return c.digest("hex")}},79669:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getNetworkSettings:()=>d,Method:()=>C,request:()=>f,get:()=>I,put:()=>E,post:()=>B,del:()=>y});var A=r(43896),n=r(57211),o=r(98605),i=r(2401),s=r.n(i),a=r(98161),c=r(78835);const g=new Map,l=new Map,u=new o.Agent({keepAlive:!0}),h=new n.Agent({keepAlive:!0});function p(e){const t=new c.URL(e),r={host:t.hostname,headers:{}};return t.port&&(r.port=Number(t.port)),{proxy:r}}function d(e,t){const r=[...t.configuration.get("networkSettings")].sort(([e],[t])=>t.length-e.length),A={enableNetwork:void 0,caFilePath:void 0,httpProxy:void 0,httpsProxy:void 0},n=Object.keys(A),o=new c.URL(e);for(const[e,t]of r)if(s().isMatch(o.hostname,e))for(const e of n){const r=t.get(e);null!==r&&void 0===A[e]&&(A[e]=r)}for(const e of n)void 0===A[e]&&(A[e]=t.configuration.get(e));return A}var C;async function f(e,t,{configuration:n,headers:o,json:i,jsonRequest:g=i,jsonResponse:f=i,method:I=C.GET}){const E=d(e,{configuration:n});if(!1===E.enableNetwork)throw new Error(`Request to '${e}' has been blocked because of your configuration settings`);const B=new c.URL(e);if("http:"===B.protocol&&!s().isMatch(B.hostname,n.get("unsafeHttpWhitelist")))throw new Error(`Unsafe http requests must be explicitly whitelisted in your configuration (${B.hostname})`);const y={agent:{http:E.httpProxy?a.httpOverHttp(p(E.httpProxy)):u,https:E.httpsProxy?a.httpsOverHttp(p(E.httpsProxy)):h},headers:o,method:I};y.responseType=f?"json":"buffer",null!==t&&(Buffer.isBuffer(t)||!g&&"string"==typeof t?y.body=t:y.json=t);const m=n.get("httpTimeout"),w=n.get("httpRetry"),Q=n.get("enableStrictSsl"),D=E.caFilePath,{default:b}=await Promise.resolve().then(r.t.bind(r,48722,7)),v=D?await async function(e){let t=l.get(e);return t||(t=A.xfs.readFilePromise(e).then(t=>(l.set(e,t),t)),l.set(e,t)),t}(D):void 0,S=b.extend({timeout:{socket:m},retry:w,https:{rejectUnauthorized:Q,certificateAuthority:v},...y});return n.getLimit("networkConcurrency")(()=>S(e))}async function I(e,{configuration:t,json:r,jsonResponse:A=r,...n}){let o=g.get(e);return o||(o=f(e,null,{configuration:t,...n}).then(t=>(g.set(e,t.body),t.body)),g.set(e,o)),!1===Buffer.isBuffer(o)&&(o=await o),A?JSON.parse(o.toString()):o}async function E(e,t,r){return(await f(e,t,{...r,method:C.PUT})).body}async function B(e,t,r){return(await f(e,t,{...r,method:C.POST})).body}async function y(e,t){return(await f(e,null,{...t,method:C.DELETE})).body}!function(e){e.GET="GET",e.PUT="PUT",e.POST="POST",e.DELETE="DELETE"}(C||(C={}))},53836:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cache:()=>p.C,DEFAULT_RC_FILENAME:()=>d.tr,DEFAULT_LOCK_FILENAME:()=>d.nh,Configuration:()=>d.VK,FormatType:()=>d.a5,ProjectLookup:()=>d.EW,SettingsType:()=>d.a2,BuildType:()=>C.k,LightReport:()=>f.h,Manifest:()=>I.G,MessageName:()=>E.b,Project:()=>B.I,TAG_REGEXP:()=>y.c,ReportError:()=>m.lk,Report:()=>m.yG,StreamReport:()=>w.Pk,TelemetryManager:()=>Q.E,ThrowReport:()=>D.$,VirtualFetcher:()=>b.N,WorkspaceResolver:()=>v.d,Workspace:()=>S.j,YarnVersion:()=>k.o,LinkType:()=>N.Un,PackageExtensionType:()=>N.HN,PackageExtensionStatus:()=>N._u,hashUtils:()=>i,httpUtils:()=>s,execUtils:()=>A,folderUtils:()=>n,formatUtils:()=>o,miscUtils:()=>a,scriptUtils:()=>c,semverUtils:()=>g,structUtils:()=>l,tgzUtils:()=>u,treeUtils:()=>h});var A=r(6220),n=r(81111),o=r(71643),i=r(20624),s=r(79669),a=r(73632),c=r(63088),g=r(36545),l=r(54143),u=r(72785),h=r(85875),p=r(28148),d=r(39922),C=r(92409),f=r(62152),I=r(46611),E=r(92659),B=r(85824),y=r(52779),m=r(35691),w=r(15815),Q=r(81832),D=r(33720),b=r(60895),v=r(94538),S=r(17722),k=r(59355),N=r(32485)},73632:(e,t,r)=>{"use strict";r.r(t),r.d(t,{escapeRegExp:()=>a,overrideType:()=>c,assertNever:()=>g,validateEnum:()=>l,mapAndFilter:()=>u,mapAndFind:()=>p,isIndexableObject:()=>C,convertMapsToIndexableObjects:()=>f,getFactoryWithDefault:()=>I,getArrayWithDefault:()=>E,getSetWithDefault:()=>B,getMapWithDefault:()=>y,releaseAfterUseAsync:()=>m,prettifyAsyncErrors:()=>w,prettifySyncErrors:()=>Q,bufferStream:()=>D,BufferStream:()=>b,DefaultStream:()=>v,dynamicRequire:()=>S,dynamicRequireNoCache:()=>k,sortMap:()=>N,buildIgnorePattern:()=>F,replaceEnvVariables:()=>K,parseBoolean:()=>M,parseOptionalBoolean:()=>R,tryParseOptionalBoolean:()=>x});var A=r(46009),n=r(40822),o=r(2401),i=r.n(o),s=r(92413);function a(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function c(e){}function g(e){throw new Error(`Assertion failed: Unexpected object '${e}'`)}function l(e,t){if(!Object.values(e).includes(t))throw new Error("Assertion failed: Invalid value for enumeration");return t}function u(e,t){const r=[];for(const A of e){const e=t(A);e!==h&&r.push(e)}return r}e=r.hmd(e);const h=Symbol();function p(e,t){for(const r of e){const e=t(r);if(e!==d)return e}}u.skip=h;const d=Symbol();function C(e){return"object"==typeof e&&null!==e}function f(e){if(e instanceof Map&&(e=Object.fromEntries(e)),C(e))for(const t of Object.keys(e)){const r=e[t];C(r)&&(e[t]=f(r))}return e}function I(e,t,r){let A=e.get(t);return void 0===A&&e.set(t,A=r()),A}function E(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=[]),r}function B(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=new Set),r}function y(e,t){let r=e.get(t);return void 0===r&&e.set(t,r=new Map),r}async function m(e,t){if(null==t)return await e();try{return await e()}finally{await t()}}async function w(e,t){try{return await e()}catch(e){throw e.message=t(e.message),e}}function Q(e,t){try{return e()}catch(e){throw e.message=t(e.message),e}}async function D(e){return await new Promise((t,r)=>{const A=[];e.on("error",e=>{r(e)}),e.on("data",e=>{A.push(e)}),e.on("end",()=>{t(Buffer.concat(A))})})}p.skip=d;class b extends s.Transform{constructor(){super(...arguments),this.chunks=[]}_transform(e,t,r){if("buffer"!==t||!Buffer.isBuffer(e))throw new Error("Assertion failed: BufferStream only accept buffers");this.chunks.push(e),r(null,null)}_flush(e){e(null,Buffer.concat(this.chunks))}}class v extends s.Transform{constructor(e=Buffer.alloc(0)){super(),this.active=!0,this.ifEmpty=e}_transform(e,t,r){if("buffer"!==t||!Buffer.isBuffer(e))throw new Error("Assertion failed: DefaultStream only accept buffers");this.active=!1,r(null,e)}_flush(e){this.active&&this.ifEmpty.length>0&&e(null,this.ifEmpty)}}function S(e){return"undefined"!=typeof require?require(e):r(32178)(e)}function k(t){const n=A.cS.fromPortablePath(t),o=r.c[n];let i;delete r.c[n];try{i=S(n);const t=r.c[n],A=e.children.indexOf(t);-1!==A&&e.children.splice(A,1)}finally{r.c[n]=o}return i}function N(e,t){const r=Array.from(e);Array.isArray(t)||(t=[t]);const A=[];for(const e of t)A.push(r.map(t=>e(t)));const n=r.map((e,t)=>t);return n.sort((e,t)=>{for(const r of A){const A=r[e]r[t]?1:0;if(0!==A)return A}return 0}),n.map(e=>r[e])}function F(e){return 0===e.length?null:e.map(e=>`(${i().makeRe(e,{windows:!1}).source})`).join("|")}function K(e,{env:t}){return e.replace(/\${(?[\d\w_]+)(?:)?(?:-(?[^}]*))?}/g,(...e)=>{const{variableName:r,colon:A,fallback:o}=e[e.length-1],i=Object.prototype.hasOwnProperty.call(t,r),s=t[r];if(s)return s;if(i&&!A)return s;if(null!=o)return o;throw new n.UsageError(`Environment variable not found (${r})`)})}function M(e){switch(e){case"true":case"1":case 1:case!0:return!0;case"false":case"0":case 0:case!1:return!1;default:throw new Error(`Couldn't parse "${e}" as a boolean`)}}function R(e){return void 0===e?e:M(e)}function x(e){try{return R(e)}catch(e){return null}}},63088:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeScriptEnv:()=>b,prepareExternalProject:()=>S,hasPackageScript:()=>k,executePackageScript:()=>N,executePackageShellcode:()=>F,executeWorkspaceScript:()=>M,hasWorkspaceScript:()=>R,executeWorkspaceLifecycleScript:()=>x,maybeExecuteWorkspaceLifecycleScript:()=>L,getPackageAccessibleBinaries:()=>P,getWorkspaceAccessibleBinaries:()=>O,executePackageAccessibleBinary:()=>U,executeWorkspaceAccessibleBinary:()=>T});var A,n=r(46009),o=r(53660),i=r(75448),s=r(43896),a=r(65281),c=r(76756),g=r(50730),l=r(61814),u=r.n(l),h=r(61578),p=r.n(h),d=r(92413),C=r(46611),f=r(92659),I=r(35691),E=r(15815),B=r(59355),y=r(6220),m=r(71643),w=r(73632),Q=r(54143);async function D(e,t,r,A=[]){"win32"===process.platform&&await Promise.all([s.xfs.writeFilePromise(n.y1.format({dir:e,name:t,ext:".exe"}),(0,g.O9)()),s.xfs.writeFilePromise(n.y1.format({dir:e,name:t,ext:".exe.info"}),[r,...A].join("\n")),s.xfs.writeFilePromise(n.y1.format({dir:e,name:t,ext:".cmd"}),`@"${r}" ${A.map(e=>`"${e.replace('"','""')}"`).join(" ")} %*\n`)]),await s.xfs.writeFilePromise(n.y1.join(e,t),`#!/bin/sh\nexec "${r}" ${A.map(e=>`'${e.replace(/'/g,"'\"'\"'")}'`).join(" ")} "$@"\n`),await s.xfs.chmodPromise(n.y1.join(e,t),493)}async function b({project:e,binFolder:t,lifecycleScript:r}){const A={};for(const[e,t]of Object.entries(process.env))void 0!==t&&(A["path"!==e.toLowerCase()?e:"PATH"]=t);const o=n.cS.fromPortablePath(t);A.BERRY_BIN_FOLDER=n.cS.fromPortablePath(o),await D(t,"node",process.execPath),null!==B.o&&(await D(t,"run",process.execPath,[process.argv[1],"run"]),await D(t,"yarn",process.execPath,[process.argv[1]]),await D(t,"yarnpkg",process.execPath,[process.argv[1]]),await D(t,"node-gyp",process.execPath,[process.argv[1],"run","--top-level","node-gyp"])),e&&(A.INIT_CWD=n.cS.fromPortablePath(e.configuration.startingCwd)),A.PATH=A.PATH?`${o}${n.cS.delimiter}${A.PATH}`:""+o,A.npm_execpath=`${o}${n.cS.sep}yarn`,A.npm_node_execpath=`${o}${n.cS.sep}node`;const i=null!==B.o?"yarn/"+B.o:`yarn/${w.dynamicRequire("@yarnpkg/core").version}-core`;return A.npm_config_user_agent=`${i} npm/? node/${process.versions.node} ${process.platform} ${process.arch}`,r&&(A.npm_lifecycle_event=r),e&&await e.configuration.triggerHook(e=>e.setupScriptEnvironment,e,A,async(e,r,A)=>await D(t,(0,n.Zu)(e),r,A)),A}!function(e){e.Yarn1="Yarn Classic",e.Yarn2="Yarn",e.Npm="npm",e.Pnpm="pnpm"}(A||(A={}));const v=p()(2);async function S(e,t,{configuration:r,report:o,workspace:i=null}){await v(async()=>{await s.xfs.mktempPromise(async a=>{const c=n.y1.join(a,"pack.log"),{stdout:g,stderr:l}=r.getSubprocessStreams(c,{prefix:e,report:o}),u=await async function(e){let t=null;try{t=await s.xfs.readFilePromise(n.y1.join(e,n.QS.lockfile),"utf8")}catch(e){}return null!==t?t.match(/^__metadata:$/m)?A.Yarn2:A.Yarn1:s.xfs.existsSync(n.y1.join(e,"package-lock.json"))?A.Npm:s.xfs.existsSync(n.y1.join(e,"pnpm-lock.yaml"))?A.Pnpm:null}(e);let h;null!==u?(g.write(`Installing the project using ${u}\n\n`),h=u):(g.write("No package manager detected; defaulting to Yarn\n\n"),h=A.Yarn2),await s.xfs.mktempPromise(async r=>{const o=await b({binFolder:r}),u=new Map([[A.Yarn1,async()=>{const r=null!==i?["workspace",i]:[],A=await y.pipevp("yarn",["set","version","classic","--only-if-needed"],{cwd:e,env:o,stdin:null,stdout:g,stderr:l,end:y.EndStrategy.ErrorCode});if(0!==A.code)return A.code;await s.xfs.appendFilePromise(n.y1.join(e,".npmignore"),"/.yarn\n"),g.write("\n");const a=await y.pipevp("yarn",["install"],{cwd:e,env:o,stdin:null,stdout:g,stderr:l,end:y.EndStrategy.ErrorCode});if(0!==a.code)return a.code;g.write("\n");const c=await y.pipevp("yarn",[...r,"pack","--filename",n.cS.fromPortablePath(t)],{cwd:e,env:o,stdin:null,stdout:g,stderr:l});return 0!==c.code?c.code:0}],[A.Yarn2,async()=>{const r=null!==i?["workspace",i]:[];o.YARN_ENABLE_INLINE_BUILDS="1";const A=n.y1.join(e,n.QS.lockfile);await s.xfs.existsPromise(A)||await s.xfs.writeFilePromise(A,"");const a=await y.pipevp("yarn",[...r,"pack","--install-if-needed","--filename",n.cS.fromPortablePath(t)],{cwd:e,env:o,stdin:null,stdout:g,stderr:l});return 0!==a.code?a.code:0}],[A.Npm,async()=>{if(null!==i)throw new Error("Workspaces aren't supported by npm, which has been detected as the primary package manager for "+e);delete o.npm_config_user_agent;const r=await y.pipevp("npm",["install"],{cwd:e,env:o,stdin:null,stdout:g,stderr:l,end:y.EndStrategy.ErrorCode});if(0!==r.code)return r.code;const A=new d.PassThrough,a=w.bufferStream(A);A.pipe(g);const c=await y.pipevp("npm",["pack","--silent"],{cwd:e,env:o,stdin:null,stdout:A,stderr:l});if(0!==c.code)return c.code;const u=(await a).toString().trim(),h=n.y1.resolve(e,n.cS.toPortablePath(u));return await s.xfs.renamePromise(h,t),0}]]).get(h);if(void 0===u)throw new Error("Assertion failed: Unsupported workflow");const p=await u();if(0!==p&&void 0!==p)throw s.xfs.detachTemp(a),new I.lk(f.b.PACKAGE_PREPARATION_FAILED,`Packing the package failed (exit code ${p}, logs can be found here: ${c})`)})})})}async function k(e,t,{project:r}){const A=r.storedPackages.get(e.locatorHash);if(!A)throw new Error(`Package for ${Q.prettyLocator(r.configuration,e)} not found in the project`);return await o.A.openPromise(async e=>{const o=r.configuration,s=r.configuration.getLinkers(),a={project:r,report:new E.Pk({stdout:new d.PassThrough,configuration:o})},c=s.find(e=>e.supportsPackage(A,a));if(!c)throw new Error(`The package ${Q.prettyLocator(r.configuration,A)} isn't supported by any of the available linkers`);const g=await c.findPackageLocation(A,a),l=new i.M(g,{baseFs:e});return(await C.G.find(n.LZ.dot,{baseFs:l})).scripts.has(t)},{libzip:await(0,a.getLibzipPromise)()})}async function N(e,t,r,{cwd:A,project:n,stdin:o,stdout:i,stderr:a}){return await s.xfs.mktempPromise(async s=>{const{manifest:g,env:l,cwd:u}=await K(e,{project:n,binFolder:s,cwd:A,lifecycleScript:t}),h=g.scripts.get(t);if(void 0===h)return 1;const p=await n.configuration.reduceHook(e=>e.wrapScriptExecution,async()=>await(0,c.execute)(h,r,{cwd:u,env:l,stdin:o,stdout:i,stderr:a}),n,e,t,{script:h,args:r,cwd:u,env:l,stdin:o,stdout:i,stderr:a});return await p()})}async function F(e,t,r,{cwd:A,project:n,stdin:o,stdout:i,stderr:a}){return await s.xfs.mktempPromise(async s=>{const{env:g,cwd:l}=await K(e,{project:n,binFolder:s,cwd:A});return await(0,c.execute)(t,r,{cwd:l,env:g,stdin:o,stdout:i,stderr:a})})}async function K(e,{project:t,binFolder:r,cwd:A,lifecycleScript:s}){const c=t.storedPackages.get(e.locatorHash);if(!c)throw new Error(`Package for ${Q.prettyLocator(t.configuration,e)} not found in the project`);return await o.A.openPromise(async o=>{const a=t.configuration,g=t.configuration.getLinkers(),l={project:t,report:new E.Pk({stdout:new d.PassThrough,configuration:a})},u=g.find(e=>e.supportsPackage(c,l));if(!u)throw new Error(`The package ${Q.prettyLocator(t.configuration,c)} isn't supported by any of the available linkers`);const h=await b({project:t,binFolder:r,lifecycleScript:s});await Promise.all(Array.from(await P(e,{project:t}),([e,[,t]])=>D(r,(0,n.Zu)(e),process.execPath,[t])));const p=await u.findPackageLocation(c,l),f=new i.M(p,{baseFs:o}),I=await C.G.find(n.LZ.dot,{baseFs:f});return void 0===A&&(A=p),{manifest:I,binFolder:r,env:h,cwd:A}},{libzip:await(0,a.getLibzipPromise)()})}async function M(e,t,r,{cwd:A,stdin:n,stdout:o,stderr:i}){return await N(e.anchoredLocator,t,r,{cwd:A,project:e.project,stdin:n,stdout:o,stderr:i})}function R(e,t){return e.manifest.scripts.has(t)}async function x(e,t,{cwd:r,report:A}){const{configuration:o}=e.project;await s.xfs.mktempPromise(async i=>{const a=n.y1.join(i,t+".log"),c=`# This file contains the result of Yarn calling the "${t}" lifecycle script inside a workspace ("${e.cwd}")\n`,{stdout:g,stderr:l}=o.getSubprocessStreams(a,{report:A,prefix:Q.prettyLocator(o,e.anchoredLocator),header:c});A.reportInfo(f.b.LIFECYCLE_SCRIPT,`Calling the "${t}" lifecycle script`);const h=await M(e,t,[],{cwd:r,stdin:null,stdout:g,stderr:l});if(g.end(),l.end(),0!==h)throw s.xfs.detachTemp(i),new I.lk(f.b.LIFECYCLE_SCRIPT,`${u()(t)} script failed (exit code ${m.pretty(o,h,m.Type.NUMBER)}, logs can be found here: ${m.pretty(o,a,m.Type.PATH)}); run ${m.pretty(o,"yarn "+t,m.Type.CODE)} to investigate`)})}async function L(e,t,r){R(e,t)&&await x(e,t,r)}async function P(e,{project:t}){const r=t.configuration,A=new Map,o=t.storedPackages.get(e.locatorHash);if(!o)throw new Error(`Package for ${Q.prettyLocator(r,e)} not found in the project`);const i=new d.Writable,s=r.getLinkers(),a={project:t,report:new E.Pk({configuration:r,stdout:i})},c=new Set([e.locatorHash]);for(const e of o.dependencies.values()){const A=t.storedResolutions.get(e.descriptorHash);if(!A)throw new Error(`Assertion failed: The resolution (${Q.prettyDescriptor(r,e)}) should have been registered`);c.add(A)}for(const e of c){const r=t.storedPackages.get(e);if(!r)throw new Error(`Assertion failed: The package (${e}) should have been registered`);if(0===r.bin.size)continue;const o=s.find(e=>e.supportsPackage(r,a));if(!o)continue;let i=null;try{i=await o.findPackageLocation(r,a)}catch(e){if("LOCATOR_NOT_INSTALLED"===e.code)continue;throw e}for(const[e,t]of r.bin)A.set(e,[r,n.cS.fromPortablePath(n.y1.resolve(i,t))])}return A}async function O(e){return await P(e.anchoredLocator,{project:e.project})}async function U(e,t,r,{cwd:A,project:o,stdin:i,stdout:a,stderr:c,nodeArgs:g=[]}){const l=await P(e,{project:o}),u=l.get(t);if(!u)throw new Error(`Binary not found (${t}) for ${Q.prettyLocator(o.configuration,e)}`);return await s.xfs.mktempPromise(async e=>{const[,t]=u,h=await b({project:o,binFolder:e});let p;await Promise.all(Array.from(l,([e,[,t]])=>D(h.BERRY_BIN_FOLDER,(0,n.Zu)(e),process.execPath,[t])));try{p=await y.pipevp(process.execPath,[...g,t,...r],{cwd:A,env:h,stdin:i,stdout:a,stderr:c})}finally{await s.xfs.removePromise(h.BERRY_BIN_FOLDER)}return p.code})}async function T(e,t,r,{cwd:A,stdin:n,stdout:o,stderr:i}){return await U(e.anchoredLocator,t,r,{project:e.project,cwd:A,stdin:n,stdout:o,stderr:i})}},36545:(e,t,r)=>{"use strict";r.r(t),r.d(t,{satisfiesWithPrereleases:()=>o,validRange:()=>s});var A=r(53887),n=r.n(A);function o(e,t,r=!1){let A,o;try{A=new(n().Range)(t,{includePrerelease:!0,loose:r})}catch(e){return!1}if(!e)return!1;try{o=new(n().SemVer)(e,A),o.prerelease&&(o.prerelease=[])}catch(e){return!1}return A.set.some(e=>{for(const t of e)t.semver.prerelease&&(t.semver.prerelease=[]);return e.every(e=>e.test(o))})}const i=new Map;function s(e){if(-1!==e.indexOf(":"))return null;let t=i.get(e);if(void 0!==t)return t;try{t=new(n().Range)(e)}catch(e){t=null}return i.set(e,t),t}},54143:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeIdent:()=>u,makeDescriptor:()=>h,makeLocator:()=>p,convertToIdent:()=>d,convertDescriptorToLocator:()=>C,convertLocatorToDescriptor:()=>f,convertPackageToLocator:()=>I,renamePackage:()=>E,copyPackage:()=>B,virtualizeDescriptor:()=>y,virtualizePackage:()=>m,isVirtualDescriptor:()=>w,isVirtualLocator:()=>Q,devirtualizeDescriptor:()=>D,devirtualizeLocator:()=>b,bindDescriptor:()=>v,bindLocator:()=>S,areIdentsEqual:()=>k,areDescriptorsEqual:()=>N,areLocatorsEqual:()=>F,areVirtualPackagesEquivalent:()=>K,parseIdent:()=>M,tryParseIdent:()=>R,parseDescriptor:()=>x,tryParseDescriptor:()=>L,parseLocator:()=>P,tryParseLocator:()=>O,parseRange:()=>U,parseFileStyleRange:()=>T,makeRange:()=>Y,convertToManifestRange:()=>G,requirableIdent:()=>H,stringifyIdent:()=>J,stringifyDescriptor:()=>q,stringifyLocator:()=>z,slugifyIdent:()=>W,slugifyLocator:()=>X,prettyIdent:()=>V,prettyRange:()=>Z,prettyDescriptor:()=>$,prettyReference:()=>ee,prettyLocator:()=>te,prettyLocatorNoColors:()=>re,sortDescriptors:()=>Ae,prettyWorkspace:()=>ne,prettyResolution:()=>oe,prettyDependent:()=>ie,getIdentVendorPath:()=>se});var A=r(46009),n=r(71191),o=r.n(n),i=r(53887),s=r.n(i),a=r(71643),c=r(20624),g=r(73632),l=r(54143);function u(e,t){if(null==e?void 0:e.startsWith("@"))throw new Error("Invalid scope: don't prefix it with '@'");return{identHash:c.makeHash(e,t),scope:e,name:t}}function h(e,t){return{identHash:e.identHash,scope:e.scope,name:e.name,descriptorHash:c.makeHash(e.identHash,t),range:t}}function p(e,t){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:c.makeHash(e.identHash,t),reference:t}}function d(e){return{identHash:e.identHash,scope:e.scope,name:e.name}}function C(e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.descriptorHash,reference:e.range}}function f(e){return{identHash:e.identHash,scope:e.scope,name:e.name,descriptorHash:e.locatorHash,range:e.reference}}function I(e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference}}function E(e,t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference,version:e.version,languageName:e.languageName,linkType:e.linkType,dependencies:new Map(e.dependencies),peerDependencies:new Map(e.peerDependencies),dependenciesMeta:new Map(e.dependenciesMeta),peerDependenciesMeta:new Map(e.peerDependenciesMeta),bin:new Map(e.bin)}}function B(e){return E(e,e)}function y(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return h(e,`virtual:${t}#${e.range}`)}function m(e,t){if(t.includes("#"))throw new Error("Invalid entropy");return E(e,p(e,`virtual:${t}#${e.reference}`))}function w(e){return e.range.startsWith("virtual:")}function Q(e){return e.reference.startsWith("virtual:")}function D(e){if(!w(e))throw new Error("Not a virtual descriptor");return h(e,e.range.replace(/^[^#]*#/,""))}function b(e){if(!Q(e))throw new Error("Not a virtual descriptor");return p(e,e.reference.replace(/^[^#]*#/,""))}function v(e,t){return e.range.includes("::")?e:h(e,`${e.range}::${o().stringify(t)}`)}function S(e,t){return e.reference.includes("::")?e:p(e,`${e.reference}::${o().stringify(t)}`)}function k(e,t){return e.identHash===t.identHash}function N(e,t){return e.descriptorHash===t.descriptorHash}function F(e,t){return e.locatorHash===t.locatorHash}function K(e,t){if(!Q(e))throw new Error("Invalid package type");if(!Q(t))throw new Error("Invalid package type");if(!k(e,t))return!1;if(e.dependencies.size!==t.dependencies.size)return!1;for(const r of e.dependencies.values()){const e=t.dependencies.get(r.identHash);if(!e)return!1;if(!N(r,e))return!1}return!0}function M(e){const t=R(e);if(!t)throw new Error(`Invalid ident (${e})`);return t}function R(e){const t=e.match(/^(?:@([^/]+?)\/)?([^/]+)$/);if(!t)return null;const[,r,A]=t;return u(void 0!==r?r:null,A)}function x(e,t=!1){const r=L(e,t);if(!r)throw new Error(`Invalid descriptor (${e})`);return r}function L(e,t=!1){const r=t?e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!r)return null;const[,A,n,o]=r;if("unknown"===o)throw new Error(`Invalid range (${e})`);const i=void 0!==o?o:"unknown";return h(u(void 0!==A?A:null,n),i)}function P(e,t=!1){const r=O(e,t);if(!r)throw new Error(`Invalid locator (${e})`);return r}function O(e,t=!1){const r=t?e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):e.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!r)return null;const[,A,n,o]=r;if("unknown"===o)throw new Error(`Invalid reference (${e})`);const i=void 0!==o?o:"unknown";return p(u(void 0!==A?A:null,n),i)}function U(e,t){const r=e.match(/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/);if(null===r)throw new Error(`Invalid range (${e})`);const A=void 0!==r[1]?r[1]:null;if("string"==typeof(null==t?void 0:t.requireProtocol)&&A!==t.requireProtocol)throw new Error(`Invalid protocol (${A})`);if((null==t?void 0:t.requireProtocol)&&null===A)throw new Error(`Missing protocol (${A})`);const n=void 0!==r[3]?decodeURIComponent(r[2]):null;if((null==t?void 0:t.requireSource)&&null===n)throw new Error(`Missing source (${e})`);const i=void 0!==r[3]?decodeURIComponent(r[3]):decodeURIComponent(r[2]);return{protocol:A,source:n,selector:(null==t?void 0:t.parseSelector)?o().parse(i):i,params:void 0!==r[4]?o().parse(r[4]):null}}function T(e,{protocol:t}){const{selector:r,params:A}=U(e,{requireProtocol:t,requireBindings:!0});if("string"!=typeof A.locator)throw new Error("Assertion failed: Invalid bindings for "+e);return{parentLocator:P(A.locator,!0),path:r}}function j(e){return e=(e=(e=e.replace(/%/g,"%25")).replace(/:/g,"%3A")).replace(/#/g,"%23")}function Y({protocol:e,source:t,selector:r,params:A}){let n="";return null!==e&&(n+=""+e),null!==t&&(n+=j(t)+"#"),n+=j(r),function(e){return null!==e&&Object.entries(e).length>0}(A)&&(n+="::"+o().stringify(A)),n}function G(e){const{params:t,protocol:r,source:A,selector:n}=U(e);for(const e in t)e.startsWith("__")&&delete t[e];return Y({protocol:r,source:A,params:t,selector:n})}function H(e){return e.scope?`@${e.scope}/${e.name}`:""+e.name}function J(e){return e.scope?`@${e.scope}/${e.name}`:""+e.name}function q(e){return e.scope?`@${e.scope}/${e.name}@${e.range}`:`${e.name}@${e.range}`}function z(e){return e.scope?`@${e.scope}/${e.name}@${e.reference}`:`${e.name}@${e.reference}`}function W(e){return null!==e.scope?`@${e.scope}-${e.name}`:e.name}function X(e){const{protocol:t,selector:r}=U(e.reference),n=null!==t?t.replace(/:$/,""):"exotic",o=s().valid(r),i=null!==o?`${n}-${o}`:""+n,a=(e.scope,`${W(e)}-${i}-${e.locatorHash.slice(0,10)}`);return(0,A.Zu)(a)}function V(e,t){return t.scope?`${a.pretty(e,`@${t.scope}/`,a.Type.SCOPE)}${a.pretty(e,t.name,a.Type.NAME)}`:""+a.pretty(e,t.name,a.Type.NAME)}function _(e){if(e.startsWith("virtual:")){return`${_(e.substr(e.indexOf("#")+1))} [${e.substr("virtual:".length,5)}]`}return e.replace(/\?.*/,"?[...]")}function Z(e,t){return""+a.pretty(e,_(t),a.Type.RANGE)}function $(e,t){return`${V(e,t)}${a.pretty(e,"@",a.Type.RANGE)}${Z(e,t.range)}`}function ee(e,t){return""+a.pretty(e,_(t),a.Type.REFERENCE)}function te(e,t){return`${V(e,t)}${a.pretty(e,"@",a.Type.REFERENCE)}${ee(e,t.reference)}`}function re(e){return`${J(e)}@${_(e.reference)}`}function Ae(e){return g.sortMap(e,[e=>J(e),e=>e.range])}function ne(e,t){return V(e,t.locator)}function oe(e,t,r){const A=w(t)?D(t):t;return null===r?`${l.prettyDescriptor(e,A)} → ${a.mark(e).Cross}`:A.identHash===r.identHash?`${l.prettyDescriptor(e,A)} → ${ee(e,r.reference)}`:`${l.prettyDescriptor(e,A)} → ${te(e,r)}`}function ie(e,t,r){return null===r?""+te(e,t):`${te(e,t)} (via ${l.prettyRange(e,r.range)})`}function se(e){return"node_modules/"+H(e)}},72785:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makeArchiveFromDirectory:()=>h,convertToZip:()=>p,extractArchiveTo:()=>d});var A=r(78420),n=r(46009),o=r(90739),i=r(43896),s=r(65281),a=r(59938),c=r(31669),g=r(78761),l=r.n(g);const u=(0,c.promisify)(l().gunzip);async function h(e,{baseFs:t=new A.S,prefixPath:r=n.LZ.root,compressionLevel:a,inMemory:c=!1}={}){const g=await(0,s.getLibzipPromise)();let l;if(c)l=new o.d(null,{libzip:g,level:a});else{const e=await i.xfs.mktempPromise(),t=n.y1.join(e,"archive.zip");l=new o.d(t,{create:!0,libzip:g,level:a})}const u=n.y1.resolve(n.LZ.root,r);return await l.copyPromise(u,e,{baseFs:t,stableTime:!0,stableSort:!0}),l}async function p(e,t){const r=await i.xfs.mktempPromise(),A=n.y1.join(r,"archive.zip"),{compressionLevel:a,...c}=t;return await d(e,new o.d(A,{create:!0,libzip:await(0,s.getLibzipPromise)(),level:a}),c)}async function d(e,t,{stripComponents:r=0,prefixPath:A=n.LZ.dot}={}){const o=a.extract();o.on("entry",(e,o,i)=>{var s,a;if(function(e){if("/"===e.name[0])return!0;const t=e.name.split(/\//g);return!!t.some(e=>".."===e)||t.length<=r}(e))return void i();const c=n.y1.normalize(n.cS.toPortablePath(e.name)).replace(/\/$/,"").split(/\//g);if(c.length<=r)return o.resume(),void i();const g=c.slice(r).join("/"),l=n.y1.join(A,g);let u=420;switch("directory"!==e.type&&0==(73&(null!==(s=e.mode)&&void 0!==s?s:0))||(u|=73),e.type){case"directory":t.mkdirpSync(n.y1.dirname(l),{chmod:493,utimes:[315532800,315532800]}),t.mkdirSync(l),t.chmodSync(l,u),t.utimesSync(l,315532800,315532800),i();break;case"file":{t.mkdirpSync(n.y1.dirname(l),{chmod:493,utimes:[315532800,315532800]});const e=[];o.on("data",t=>e.push(t)),o.on("end",()=>{t.writeFileSync(l,Buffer.concat(e)),t.chmodSync(l,u),t.utimesSync(l,315532800,315532800),i()})}break;case"symlink":t.mkdirpSync(n.y1.dirname(l),{chmod:493,utimes:[315532800,315532800]}),t.symlinkSync(e.linkname,l),null===(a=t.lutimesSync)||void 0===a||a.call(t,l,315532800,315532800),i();break;default:o.resume(),i()}});const i=await u(e);return await new Promise((e,r)=>{o.on("error",e=>{r(e)}),o.on("finish",()=>{e(t)}),o.end(i)})}},85875:(e,t,r)=>{"use strict";r.r(t),r.d(t,{treeNodeToTreeify:()=>o,treeNodeToJson:()=>i,emitList:()=>s,emitTree:()=>a});var A=r(94682),n=r(71643);function o(e,{configuration:t}){const r={},A=(e,r)=>{const o=Array.isArray(e)?e.entries():Object.entries(e);for(const[e,{label:i,value:s,children:a}]of o){const o=[];void 0!==i&&o.push(n.applyStyle(t,i,n.Style.BOLD)),void 0!==s&&o.push(n.pretty(t,s[0],s[1])),0===o.length&&o.push(n.applyStyle(t,""+e,n.Style.BOLD));const c=r[o.join(": ")]={};void 0!==a&&A(a,c)}};if(void 0===e.children)throw new Error("The root node must only contain children");return A(e.children,r),r}function i(e){const t=e=>{var r;if(void 0===e.children){if(void 0===e.value)throw new Error("Assertion failed: Expected a value to be set if the children are missing");return n.json(e.value[0],e.value[1])}const A=Array.isArray(e.children)?e.children.entries():Object.entries(null!==(r=e.children)&&void 0!==r?r:{}),o=Array.isArray(e.children)?[]:{};for(const[e,r]of A)o[e]=t(r);return void 0===e.value?o:{value:n.json(e.value[0],e.value[1]),children:o}};return t(e)}function s(e,{configuration:t,stdout:r,json:A}){a({children:e.map(e=>({value:e}))},{configuration:t,stdout:r,json:A})}function a(e,{configuration:t,stdout:r,json:n,separators:s=0}){var a;if(n){const t=Array.isArray(e.children)?e.children.values():Object.values(null!==(a=e.children)&&void 0!==a?a:{});for(const e of t)r.write(JSON.stringify(i(e))+"\n");return}let c=(0,A.asTree)(o(e,{configuration:t}),!1,!1);if(s>=1&&(c=c.replace(/^([├└]─)/gm,"│\n$1").replace(/^│\n/,"")),s>=2)for(let e=0;e<2;++e)c=c.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,"$1$3 │\n$2").replace(/^│\n/,"");if(s>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(c)}},32485:(e,t,r)=>{"use strict";var A,n,o;r.d(t,{Un:()=>A,HN:()=>n,_u:()=>o}),function(e){e.HARD="HARD",e.SOFT="SOFT"}(A||(A={})),function(e){e.Dependency="Dependency",e.PeerDependency="PeerDependency",e.PeerDependencyMeta="PeerDependencyMeta"}(n||(n={})),function(e){e.Inactive="inactive",e.Redundant="redundant",e.Active="active"}(o||(o={}))},14626:(e,t,r)=>{"use strict";r.d(t,{K:()=>n});var A=r(42096);class n extends A.p{constructor(e,{baseFs:t,pathUtils:r}){super(r),this.target=e,this.baseFs=t}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(e){return e}mapToBase(e){return e}}},75448:(e,t,r)=>{"use strict";r.d(t,{M:()=>i});var A=r(78420),n=r(42096),o=r(46009);class i extends n.p{constructor(e,{baseFs:t=new A.S}={}){super(o.y1),this.target=this.pathUtils.normalize(e),this.baseFs=t}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(e){return this.pathUtils.isAbsolute(e)?o.y1.normalize(e):this.baseFs.resolve(o.y1.join(this.target,e))}mapFromBase(e){return e}mapToBase(e){return this.pathUtils.isAbsolute(e)?e:this.pathUtils.join(this.target,e)}}},5944:(e,t,r)=>{"use strict";r.d(t,{fS:()=>g,uY:()=>c,qH:()=>l});var A=r(12087),n=r(35747),o=r.n(n),i=r(46009);const s=new Date(3155328e5);async function a(e,t,r,A,n,c,g,l){var u,h;const p=await async function(e,t){try{return await e.lstatPromise(t)}catch(e){return null}}(A,n),d=await c.lstatPromise(g),C=l.stableTime?{mtime:s,atime:s}:d;let f;switch(!0){case d.isDirectory():f=await async function(e,t,r,A,n,o,i,s,c,g){if(null!==o&&!o.isDirectory()){if(!g.overwrite)return!1;e.push(async()=>A.removePromise(n)),o=null}let l=!1;null===o&&(e.push(async()=>A.mkdirPromise(n,{mode:c.mode})),l=!0);const u=await i.readdirPromise(s);if(g.stableSort)for(const o of u.sort())await a(e,t,r,A,A.pathUtils.join(n,o),i,i.pathUtils.join(s,o),g)&&(l=!0);else{(await Promise.all(u.map(async o=>{await a(e,t,r,A,A.pathUtils.join(n,o),i,i.pathUtils.join(s,o),g)}))).some(e=>e)&&(l=!0)}return l}(e,t,r,A,n,p,c,g,d,l);break;case d.isFile():f=await async function(e,t,r,A,n,i,s,a,c,g){if(null!==i){if(!g.overwrite)return!1;e.push(async()=>A.removePromise(n)),i=null}const l=A===s?async()=>A.copyFilePromise(a,n,o().constants.COPYFILE_FICLONE):async()=>A.writeFilePromise(n,await s.readFilePromise(a));return e.push(async()=>l()),!0}(e,0,0,A,n,p,c,g,0,l);break;case d.isSymbolicLink():f=await async function(e,t,r,A,n,o,s,a,c,g){if(null!==o){if(!g.overwrite)return!1;e.push(async()=>A.removePromise(n)),o=null}return e.push(async()=>{await A.symlinkPromise((0,i.CI)(A.pathUtils,await s.readlinkPromise(a)),n)}),!0}(e,0,0,A,n,p,c,g,0,l);break;default:throw new Error(`Unsupported file type (${d.mode})`)}return(f||(null===(u=null==p?void 0:p.mtime)||void 0===u?void 0:u.getTime())!==C.mtime.getTime()||(null===(h=null==p?void 0:p.atime)||void 0===h?void 0:h.getTime())!==C.atime.getTime())&&(t.push(()=>r(n,C.atime,C.mtime)),f=!0),null!==p&&(511&p.mode)==(511&d.mode)||(t.push(()=>A.chmodPromise(n,511&d.mode)),f=!0),f}class c{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:t=!1}={}){const r=[e];for(;r.length>0;){const e=r.shift();if((await this.lstatPromise(e)).isDirectory()){const A=await this.readdirPromise(e);if(!t)throw new Error("Not supported");for(const t of A.sort())r.push(this.pathUtils.join(e,t))}else yield e}}async removePromise(e,{recursive:t=!0,maxRetries:r=5}={}){let A;try{A=await this.lstatPromise(e)}catch(e){if("ENOENT"===e.code)return;throw e}if(A.isDirectory()){if(t)for(const t of await this.readdirPromise(e))await this.removePromise(this.pathUtils.resolve(e,t));let A=0;do{try{await this.rmdirPromise(e);break}catch(e){if("EBUSY"===e.code||"ENOTEMPTY"===e.code){if(0===r)break;await new Promise(e=>setTimeout(e,100*A));continue}throw e}}while(A++e()))}(this,e,r,t,{overwrite:A,stableSort:n,stableTime:o})}copySync(e,t,{baseFs:r=this,overwrite:A=!0}={}){const n=r.lstatSync(t),o=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);const n=r.readdirSync(t);for(const o of n)this.copySync(this.pathUtils.join(e,o),r.pathUtils.join(t,o),{baseFs:r,overwrite:A})}else if(n.isFile()){if(!o||A){o&&this.removeSync(e);const A=r.readFileSync(t);this.writeFileSync(e,A)}}else{if(!n.isSymbolicLink())throw new Error(`Unsupported file type (file: ${t}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);if(!o||A){o&&this.removeSync(e);const A=r.readlinkSync(t);this.symlinkSync((0,i.CI)(this.pathUtils,A),e)}}const s=511&n.mode;this.chmodSync(e,s)}async changeFilePromise(e,t,r={}){return Buffer.isBuffer(t)?this.changeFileBufferPromise(e,t):this.changeFileTextPromise(e,t,r)}async changeFileBufferPromise(e,t){let r=Buffer.alloc(0);try{r=await this.readFilePromise(e)}catch(e){}0!==Buffer.compare(r,t)&&await this.writeFilePromise(e,t)}async changeFileTextPromise(e,t,{automaticNewlines:r}={}){let A="";try{A=await this.readFilePromise(e,"utf8")}catch(e){}const n=r?l(A,t):t;A!==n&&await this.writeFilePromise(e,n)}changeFileSync(e,t,r={}){return Buffer.isBuffer(t)?this.changeFileBufferSync(e,t):this.changeFileTextSync(e,t,r)}changeFileBufferSync(e,t){let r=Buffer.alloc(0);try{r=this.readFileSync(e)}catch(e){}0!==Buffer.compare(r,t)&&this.writeFileSync(e,t)}changeFileTextSync(e,t,{automaticNewlines:r=!1}={}){let A="";try{A=this.readFileSync(e,"utf8")}catch(e){}const n=r?l(A,t):t;A!==n&&this.writeFileSync(e,n)}async movePromise(e,t){try{await this.renamePromise(e,t)}catch(r){if("EXDEV"!==r.code)throw r;await this.copyPromise(t,e),await this.removePromise(e)}}moveSync(e,t){try{this.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;this.copySync(t,e),this.removeSync(e)}}async lockPromise(e,t){const r=e+".flock",A=Date.now();let n=null;const o=async()=>{let e;try{[e]=await this.readJsonPromise(r)}catch(e){return Date.now()-A<500}try{return process.kill(e,0),!0}catch(e){return!1}};for(;null===n;)try{n=await this.openPromise(r,"wx")}catch(e){if("EEXIST"!==e.code)throw e;if(!await o())try{await this.unlinkPromise(r);continue}catch(e){}if(!(Date.now()-A<6e4))throw new Error(`Couldn't acquire a lock in a reasonable time (via ${r})`);await new Promise(e=>setTimeout(e,1e3/60))}await this.writePromise(n,JSON.stringify([process.pid]));try{return await t()}finally{try{await this.closePromise(n),await this.unlinkPromise(r)}catch(e){}}}async readJsonPromise(e){const t=await this.readFilePromise(e,"utf8");try{return JSON.parse(t)}catch(t){throw t.message+=` (in ${e})`,t}}readJsonSync(e){const t=this.readFileSync(e,"utf8");try{return JSON.parse(t)}catch(t){throw t.message+=` (in ${e})`,t}}async writeJsonPromise(e,t){return await this.writeFilePromise(e,JSON.stringify(t,null,2)+"\n")}writeJsonSync(e,t){return this.writeFileSync(e,JSON.stringify(t,null,2)+"\n")}async preserveTimePromise(e,t){const r=await this.lstatPromise(e),A=await t();void 0!==A&&(e=A),this.lutimesPromise?await this.lutimesPromise(e,r.atime,r.mtime):r.isSymbolicLink()||await this.utimesPromise(e,r.atime,r.mtime)}async preserveTimeSync(e,t){const r=this.lstatSync(e),A=t();void 0!==A&&(e=A),this.lutimesSync?this.lutimesSync(e,r.atime,r.mtime):r.isSymbolicLink()||this.utimesSync(e,r.atime,r.mtime)}}c.DEFAULT_TIME=315532800;class g extends c{constructor(){super(i.y1)}}function l(e,t){return t.replace(/\r?\n/g,function(e){const t=e.match(/\r?\n/g);if(null===t)return A.EOL;const r=t.filter(e=>"\r\n"===e).length;return r>t.length-r?"\r\n":"\n"}(e))}},10489:(e,t,r)=>{"use strict";r.d(t,{n:()=>s});var A=r(78420),n=r(42096),o=r(46009);const i=o.LZ.root;class s extends n.p{constructor(e,{baseFs:t=new A.S}={}){super(o.y1),this.target=this.pathUtils.resolve(o.LZ.root,e),this.baseFs=t}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(o.LZ.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(e){const t=this.pathUtils.normalize(e);if(this.pathUtils.isAbsolute(e))return this.pathUtils.resolve(this.target,this.pathUtils.relative(i,e));if(t.match(/^\.\.\/?/))throw new Error(`Resolving this path (${e}) would escape the jail`);return this.pathUtils.resolve(this.target,e)}mapFromBase(e){return this.pathUtils.resolve(i,this.pathUtils.relative(this.target,e))}}},15037:(e,t,r)=>{"use strict";r.d(t,{v:()=>n});var A=r(42096);class n extends A.p{constructor(e,t){super(t),this.instance=null,this.factory=e}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(e){this.instance=e}mapFromBase(e){return e}mapToBase(e){return e}}},78420:(e,t,r)=>{"use strict";r.d(t,{S:()=>a});var A=r(35747),n=r.n(A),o=r(5944),i=r(26984),s=r(46009);class a extends o.fS{constructor(e=n()){super(),this.realFs=e,void 0!==this.realFs.lutimes&&(this.lutimesPromise=this.lutimesPromiseImpl,this.lutimesSync=this.lutimesSyncImpl)}getExtractHint(){return!1}getRealPath(){return s.LZ.root}resolve(e){return s.y1.resolve(e)}async openPromise(e,t,r){return await new Promise((A,n)=>{this.realFs.open(s.cS.fromPortablePath(e),t,r,this.makeCallback(A,n))})}openSync(e,t,r){return this.realFs.openSync(s.cS.fromPortablePath(e),t,r)}async opendirPromise(e,t){return await new Promise((r,A)=>{void 0!==t?this.realFs.opendir(s.cS.fromPortablePath(e),t,this.makeCallback(r,A)):this.realFs.opendir(s.cS.fromPortablePath(e),this.makeCallback(r,A))}).then(t=>Object.defineProperty(t,"path",{value:e,configurable:!0,writable:!0}))}opendirSync(e,t){const r=void 0!==t?this.realFs.opendirSync(s.cS.fromPortablePath(e),t):this.realFs.opendirSync(s.cS.fromPortablePath(e));return Object.defineProperty(r,"path",{value:e,configurable:!0,writable:!0})}async readPromise(e,t,r=0,A=0,n=-1){return await new Promise((o,i)=>{this.realFs.read(e,t,r,A,n,(e,t)=>{e?i(e):o(t)})})}readSync(e,t,r,A,n){return this.realFs.readSync(e,t,r,A,n)}async writePromise(e,t,r,A,n){return await new Promise((o,i)=>"string"==typeof t?this.realFs.write(e,t,r,this.makeCallback(o,i)):this.realFs.write(e,t,r,A,n,this.makeCallback(o,i)))}writeSync(e,t,r,A,n){return"string"==typeof t?this.realFs.writeSync(e,t,r):this.realFs.writeSync(e,t,r,A,n)}async closePromise(e){await new Promise((t,r)=>{this.realFs.close(e,this.makeCallback(t,r))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,t){const r=null!==e?s.cS.fromPortablePath(e):e;return this.realFs.createReadStream(r,t)}createWriteStream(e,t){const r=null!==e?s.cS.fromPortablePath(e):e;return this.realFs.createWriteStream(r,t)}async realpathPromise(e){return await new Promise((t,r)=>{this.realFs.realpath(s.cS.fromPortablePath(e),{},this.makeCallback(t,r))}).then(e=>s.cS.toPortablePath(e))}realpathSync(e){return s.cS.toPortablePath(this.realFs.realpathSync(s.cS.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(t=>{this.realFs.exists(s.cS.fromPortablePath(e),t)})}accessSync(e,t){return this.realFs.accessSync(s.cS.fromPortablePath(e),t)}async accessPromise(e,t){return await new Promise((r,A)=>{this.realFs.access(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}existsSync(e){return this.realFs.existsSync(s.cS.fromPortablePath(e))}async statPromise(e){return await new Promise((t,r)=>{this.realFs.stat(s.cS.fromPortablePath(e),this.makeCallback(t,r))})}statSync(e){return this.realFs.statSync(s.cS.fromPortablePath(e))}async lstatPromise(e){return await new Promise((t,r)=>{this.realFs.lstat(s.cS.fromPortablePath(e),this.makeCallback(t,r))})}lstatSync(e){return this.realFs.lstatSync(s.cS.fromPortablePath(e))}async chmodPromise(e,t){return await new Promise((r,A)=>{this.realFs.chmod(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}chmodSync(e,t){return this.realFs.chmodSync(s.cS.fromPortablePath(e),t)}async chownPromise(e,t,r){return await new Promise((A,n)=>{this.realFs.chown(s.cS.fromPortablePath(e),t,r,this.makeCallback(A,n))})}chownSync(e,t,r){return this.realFs.chownSync(s.cS.fromPortablePath(e),t,r)}async renamePromise(e,t){return await new Promise((r,A)=>{this.realFs.rename(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),this.makeCallback(r,A))})}renameSync(e,t){return this.realFs.renameSync(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t))}async copyFilePromise(e,t,r=0){return await new Promise((A,n)=>{this.realFs.copyFile(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),r,this.makeCallback(A,n))})}copyFileSync(e,t,r=0){return this.realFs.copyFileSync(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),r)}async appendFilePromise(e,t,r){return await new Promise((A,n)=>{const o="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.appendFile(o,t,r,this.makeCallback(A,n)):this.realFs.appendFile(o,t,this.makeCallback(A,n))})}appendFileSync(e,t,r){const A="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.appendFileSync(A,t,r):this.realFs.appendFileSync(A,t)}async writeFilePromise(e,t,r){return await new Promise((A,n)=>{const o="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.writeFile(o,t,r,this.makeCallback(A,n)):this.realFs.writeFile(o,t,this.makeCallback(A,n))})}writeFileSync(e,t,r){const A="string"==typeof e?s.cS.fromPortablePath(e):e;r?this.realFs.writeFileSync(A,t,r):this.realFs.writeFileSync(A,t)}async unlinkPromise(e){return await new Promise((t,r)=>{this.realFs.unlink(s.cS.fromPortablePath(e),this.makeCallback(t,r))})}unlinkSync(e){return this.realFs.unlinkSync(s.cS.fromPortablePath(e))}async utimesPromise(e,t,r){return await new Promise((A,n)=>{this.realFs.utimes(s.cS.fromPortablePath(e),t,r,this.makeCallback(A,n))})}utimesSync(e,t,r){this.realFs.utimesSync(s.cS.fromPortablePath(e),t,r)}async lutimesPromiseImpl(e,t,r){const A=this.realFs.lutimes;if(void 0===A)throw(0,i.bk)("unavailable Node binding",`lutimes '${e}'`);return await new Promise((n,o)=>{A.call(this.realFs,s.cS.fromPortablePath(e),t,r,this.makeCallback(n,o))})}lutimesSyncImpl(e,t,r){const A=this.realFs.lutimesSync;if(void 0===A)throw(0,i.bk)("unavailable Node binding",`lutimes '${e}'`);A.call(this.realFs,s.cS.fromPortablePath(e),t,r)}async mkdirPromise(e,t){return await new Promise((r,A)=>{this.realFs.mkdir(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}mkdirSync(e,t){return this.realFs.mkdirSync(s.cS.fromPortablePath(e),t)}async rmdirPromise(e,t){return await new Promise((r,A)=>{t?this.realFs.rmdir(s.cS.fromPortablePath(e),t,this.makeCallback(r,A)):this.realFs.rmdir(s.cS.fromPortablePath(e),this.makeCallback(r,A))})}rmdirSync(e,t){return this.realFs.rmdirSync(s.cS.fromPortablePath(e),t)}async linkPromise(e,t){return await new Promise((r,A)=>{this.realFs.link(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t),this.makeCallback(r,A))})}linkSync(e,t){return this.realFs.linkSync(s.cS.fromPortablePath(e),s.cS.fromPortablePath(t))}async symlinkPromise(e,t,r){const A=r||(e.endsWith("/")?"dir":"file");return await new Promise((r,n)=>{this.realFs.symlink(s.cS.fromPortablePath(e.replace(/\/+$/,"")),s.cS.fromPortablePath(t),A,this.makeCallback(r,n))})}symlinkSync(e,t,r){const A=r||(e.endsWith("/")?"dir":"file");return this.realFs.symlinkSync(s.cS.fromPortablePath(e.replace(/\/+$/,"")),s.cS.fromPortablePath(t),A)}async readFilePromise(e,t){return await new Promise((r,A)=>{const n="string"==typeof e?s.cS.fromPortablePath(e):e;this.realFs.readFile(n,t,this.makeCallback(r,A))})}readFileSync(e,t){const r="string"==typeof e?s.cS.fromPortablePath(e):e;return this.realFs.readFileSync(r,t)}async readdirPromise(e,{withFileTypes:t}={}){return await new Promise((r,A)=>{t?this.realFs.readdir(s.cS.fromPortablePath(e),{withFileTypes:!0},this.makeCallback(r,A)):this.realFs.readdir(s.cS.fromPortablePath(e),this.makeCallback(e=>r(e),A))})}readdirSync(e,{withFileTypes:t}={}){return t?this.realFs.readdirSync(s.cS.fromPortablePath(e),{withFileTypes:!0}):this.realFs.readdirSync(s.cS.fromPortablePath(e))}async readlinkPromise(e){return await new Promise((t,r)=>{this.realFs.readlink(s.cS.fromPortablePath(e),this.makeCallback(t,r))}).then(e=>s.cS.toPortablePath(e))}readlinkSync(e){return s.cS.toPortablePath(this.realFs.readlinkSync(s.cS.fromPortablePath(e)))}async truncatePromise(e,t){return await new Promise((r,A)=>{this.realFs.truncate(s.cS.fromPortablePath(e),t,this.makeCallback(r,A))})}truncateSync(e,t){return this.realFs.truncateSync(s.cS.fromPortablePath(e),t)}watch(e,t,r){return this.realFs.watch(s.cS.fromPortablePath(e),t,r)}watchFile(e,t,r){return this.realFs.watchFile(s.cS.fromPortablePath(e),t,r)}unwatchFile(e,t){return this.realFs.unwatchFile(s.cS.fromPortablePath(e),t)}makeCallback(e,t){return(r,A)=>{r?t(r):e(A)}}}},39725:(e,t,r)=>{"use strict";r.d(t,{i:()=>o});var A=r(42096),n=r(46009);class o extends A.p{constructor(e){super(n.cS),this.baseFs=e}mapFromBase(e){return n.cS.fromPortablePath(e)}mapToBase(e){return n.cS.toPortablePath(e)}}},42096:(e,t,r)=>{"use strict";r.d(t,{p:()=>n});var A=r(5944);class n extends A.uY{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,t,r){return this.baseFs.openPromise(this.mapToBase(e),t,r)}openSync(e,t,r){return this.baseFs.openSync(this.mapToBase(e),t,r)}async opendirPromise(e,t){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),t),{path:e})}opendirSync(e,t){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),t),{path:e})}async readPromise(e,t,r,A,n){return await this.baseFs.readPromise(e,t,r,A,n)}readSync(e,t,r,A,n){return this.baseFs.readSync(e,t,r,A,n)}async writePromise(e,t,r,A,n){return"string"==typeof t?await this.baseFs.writePromise(e,t,r):await this.baseFs.writePromise(e,t,r,A,n)}writeSync(e,t,r,A,n){return"string"==typeof t?this.baseFs.writeSync(e,t,r):this.baseFs.writeSync(e,t,r,A,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,t){return this.baseFs.createReadStream(null!==e?this.mapToBase(e):e,t)}createWriteStream(e,t){return this.baseFs.createWriteStream(null!==e?this.mapToBase(e):e,t)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,t){return this.baseFs.accessSync(this.mapToBase(e),t)}async accessPromise(e,t){return this.baseFs.accessPromise(this.mapToBase(e),t)}async statPromise(e){return this.baseFs.statPromise(this.mapToBase(e))}statSync(e){return this.baseFs.statSync(this.mapToBase(e))}async lstatPromise(e){return this.baseFs.lstatPromise(this.mapToBase(e))}lstatSync(e){return this.baseFs.lstatSync(this.mapToBase(e))}async chmodPromise(e,t){return this.baseFs.chmodPromise(this.mapToBase(e),t)}chmodSync(e,t){return this.baseFs.chmodSync(this.mapToBase(e),t)}async chownPromise(e,t,r){return this.baseFs.chownPromise(this.mapToBase(e),t,r)}chownSync(e,t,r){return this.baseFs.chownSync(this.mapToBase(e),t,r)}async renamePromise(e,t){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(t))}renameSync(e,t){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(t))}async copyFilePromise(e,t,r=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(t),r)}copyFileSync(e,t,r=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(t),r)}async appendFilePromise(e,t,r){return this.baseFs.appendFilePromise(this.fsMapToBase(e),t,r)}appendFileSync(e,t,r){return this.baseFs.appendFileSync(this.fsMapToBase(e),t,r)}async writeFilePromise(e,t,r){return this.baseFs.writeFilePromise(this.fsMapToBase(e),t,r)}writeFileSync(e,t,r){return this.baseFs.writeFileSync(this.fsMapToBase(e),t,r)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,t,r){return this.baseFs.utimesPromise(this.mapToBase(e),t,r)}utimesSync(e,t,r){return this.baseFs.utimesSync(this.mapToBase(e),t,r)}async mkdirPromise(e,t){return this.baseFs.mkdirPromise(this.mapToBase(e),t)}mkdirSync(e,t){return this.baseFs.mkdirSync(this.mapToBase(e),t)}async rmdirPromise(e,t){return this.baseFs.rmdirPromise(this.mapToBase(e),t)}rmdirSync(e,t){return this.baseFs.rmdirSync(this.mapToBase(e),t)}async linkPromise(e,t){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(t))}linkSync(e,t){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(t))}async symlinkPromise(e,t,r){return this.baseFs.symlinkPromise(this.mapToBase(e),this.mapToBase(t),r)}symlinkSync(e,t,r){return this.baseFs.symlinkSync(this.mapToBase(e),this.mapToBase(t),r)}async readFilePromise(e,t){return this.baseFs.readFilePromise(this.fsMapToBase(e),t)}readFileSync(e,t){return this.baseFs.readFileSync(this.fsMapToBase(e),t)}async readdirPromise(e,{withFileTypes:t}={}){return this.baseFs.readdirPromise(this.mapToBase(e),{withFileTypes:t})}readdirSync(e,{withFileTypes:t}={}){return this.baseFs.readdirSync(this.mapToBase(e),{withFileTypes:t})}async readlinkPromise(e){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(e)))}readlinkSync(e){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(e)))}async truncatePromise(e,t){return this.baseFs.truncatePromise(this.mapToBase(e),t)}truncateSync(e,t){return this.baseFs.truncateSync(this.mapToBase(e),t)}watch(e,t,r){return this.baseFs.watch(this.mapToBase(e),t,r)}watchFile(e,t,r){return this.baseFs.watchFile(this.mapToBase(e),t,r)}unwatchFile(e,t){return this.baseFs.unwatchFile(this.mapToBase(e),t)}fsMapToBase(e){return"number"==typeof e?e:this.mapToBase(e)}}},17674:(e,t,r)=>{"use strict";r.d(t,{p:()=>c});var A=r(78420),n=r(42096),o=r(46009);const i=/^[0-9]+$/,s=/^(\/(?:[^/]+\/)*?\$\$virtual)((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/,a=/^([^/]+-)?[a-f0-9]+$/;class c extends n.p{constructor({baseFs:e=new A.S}={}){super(o.y1),this.baseFs=e}static makeVirtualPath(e,t,r){if("$$virtual"!==o.y1.basename(e))throw new Error('Assertion failed: Virtual folders must be named "$$virtual"');if(!o.y1.basename(t).match(a))throw new Error("Assertion failed: Virtual components must be ended by an hexadecimal hash");const A=o.y1.relative(o.y1.dirname(e),r).split("/");let n=0;for(;n{"use strict";r.d(t,{k:()=>C,d:()=>f});var A=r(35747),n=r(92413),o=r(31669),i=r(78761),s=r.n(i),a=r(5944),c=r(78420),g=r(19697),l=r(38783),u=r(22004),h=r(26984),p=r(46009),d=r(65760);const C="mixed";class f extends a.fS{constructor(e,t){super(),this.lzSource=null,this.listings=new Map,this.entries=new Map,this.fileSources=new Map,this.fds=new Map,this.nextFd=0,this.ready=!1,this.readOnly=!1,this.libzip=t.libzip;const r=t;if(this.level=void 0!==r.level?r.level:C,null===e&&(e=Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),"string"==typeof e){const{baseFs:t=new c.S}=r;this.baseFs=t,this.path=e}else this.path=null,this.baseFs=null;if(t.stats)this.stats=t.stats;else if("string"==typeof e)try{this.stats=this.baseFs.statSync(e)}catch(e){if("ENOENT"!==e.code||!r.create)throw e;this.stats=d.makeDefaultStats()}else this.stats=d.makeDefaultStats();const A=this.libzip.malloc(4);try{let n=0;if("string"==typeof e&&r.create&&(n|=this.libzip.ZIP_CREATE|this.libzip.ZIP_TRUNCATE),t.readOnly&&(n|=this.libzip.ZIP_RDONLY,this.readOnly=!0),"string"==typeof e)this.zip=this.libzip.open(p.cS.fromPortablePath(e),n,A);else{const t=this.allocateUnattachedSource(e);try{this.zip=this.libzip.openFromSource(t,n,A),this.lzSource=t}catch(e){throw this.libzip.source.free(t),e}}if(0===this.zip){const e=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(e,this.libzip.getValue(A,"i32")),this.makeLibzipError(e)}}finally{this.libzip.free(A)}this.listings.set(p.LZ.root,new Set);const n=this.libzip.getNumEntries(this.zip,0);for(let e=0;ee)throw new Error("Overread");const A=this.libzip.HEAPU8.subarray(t,t+e);return Buffer.from(A)}finally{this.libzip.free(t)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource),this.ready=!1}}prepareClose(){if(!this.ready)throw h.Vw("archive closed, close");(0,l.L)(this)}saveAndClose(){if(!this.path||!this.baseFs)throw new Error("ZipFS cannot be saved and must be discarded when loaded from a buffer");if(this.prepareClose(),this.readOnly)return void this.discardAndClose();const e=this.baseFs.existsSync(this.path)?511&this.baseFs.statSync(this.path).mode:null;if(-1===this.libzip.close(this.zip))throw this.makeLibzipError(this.libzip.getError(this.zip));null===e?this.baseFs.chmodSync(this.path,this.stats.mode):e!==(511&this.baseFs.statSync(this.path).mode)&&this.baseFs.chmodSync(this.path,e),this.ready=!1}discardAndClose(){this.prepareClose(),this.libzip.discard(this.zip),this.ready=!1}resolve(e){return p.y1.resolve(p.LZ.root,e)}async openPromise(e,t,r){return this.openSync(e,t,r)}openSync(e,t,r){const A=this.nextFd++;return this.fds.set(A,{cursor:0,p:e}),A}hasOpenFileHandles(){return!!this.fds.size}async opendirPromise(e,t){return this.opendirSync(e,t)}opendirSync(e,t={}){const r=this.resolveFilename(`opendir '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`opendir '${e}'`);const A=this.listings.get(r);if(!A)throw h.Ab(`opendir '${e}'`);const n=[...A],o=this.openSync(r,"r");return(0,g.a)(this,r,n,{onClose:()=>{this.closeSync(o)}})}async readPromise(e,t,r,A,n){return this.readSync(e,t,r,A,n)}readSync(e,t,r=0,A=0,n=-1){const o=this.fds.get(e);if(void 0===o)throw h.Ch("read");let i;i=-1===n||null===n?o.cursor:n;const s=this.readFileSync(o.p);s.copy(t,r,i,i+A);const a=Math.max(0,Math.min(s.length-i,A));return-1!==n&&null!==n||(o.cursor+=a),a}async writePromise(e,t,r,A,n){return"string"==typeof t?this.writeSync(e,t,n):this.writeSync(e,t,r,A,n)}writeSync(e,t,r,A,n){if(void 0===this.fds.get(e))throw h.Ch("read");throw new Error("Unimplemented")}async closePromise(e){return this.closeSync(e)}closeSync(e){if(void 0===this.fds.get(e))throw h.Ch("read");this.fds.delete(e)}createReadStream(e,{encoding:t}={}){if(null===e)throw new Error("Unimplemented");const r=this.openSync(e,"r"),A=Object.assign(new n.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(e,t)=>{clearImmediate(o),this.closeSync(r),t(e)}}),{close(){A.destroy()},bytesRead:0,path:e}),o=setImmediate(async()=>{try{const r=await this.readFilePromise(e,t);A.bytesRead=r.length,A.end(r)}catch(e){A.destroy(e)}});return A}createWriteStream(e,{encoding:t}={}){if(this.readOnly)throw h.YW(`open '${e}'`);if(null===e)throw new Error("Unimplemented");const r=[],A=this.openSync(e,"w"),o=Object.assign(new n.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(n,o)=>{try{n?o(n):(this.writeFileSync(e,Buffer.concat(r),t),o(null))}catch(e){o(e)}finally{this.closeSync(A)}}}),{bytesWritten:0,path:e,close(){o.destroy()}});return o.on("data",e=>{const t=Buffer.from(e);o.bytesWritten+=t.length,r.push(t)}),o}async realpathPromise(e){return this.realpathSync(e)}realpathSync(e){const t=this.resolveFilename(`lstat '${e}'`,e);if(!this.entries.has(t)&&!this.listings.has(t))throw h.z6(`lstat '${e}'`);return t}async existsPromise(e){return this.existsSync(e)}existsSync(e){if(!this.ready)throw h.Vw(`archive closed, existsSync '${e}'`);if(0===this.symlinkCount){const t=p.y1.resolve(p.LZ.root,e);return this.entries.has(t)||this.listings.has(t)}let t;try{t=this.resolveFilename(`stat '${e}'`,e)}catch(e){return!1}return this.entries.has(t)||this.listings.has(t)}async accessPromise(e,t){return this.accessSync(e,t)}accessSync(e,t=A.constants.F_OK){const r=this.resolveFilename(`access '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`access '${e}'`);if(this.readOnly&&t&A.constants.W_OK)throw h.YW(`access '${e}'`)}async statPromise(e){return this.statSync(e)}statSync(e){const t=this.resolveFilename(`stat '${e}'`,e);if(!this.entries.has(t)&&!this.listings.has(t))throw h.z6(`stat '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw h.Ab(`stat '${e}'`);return this.statImpl(`stat '${e}'`,t)}async lstatPromise(e){return this.lstatSync(e)}lstatSync(e){const t=this.resolveFilename(`lstat '${e}'`,e,!1);if(!this.entries.has(t)&&!this.listings.has(t))throw h.z6(`lstat '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw h.Ab(`lstat '${e}'`);return this.statImpl(`lstat '${e}'`,t)}statImpl(e,t){const r=this.entries.get(t);if(void 0!==r){const e=this.libzip.struct.statS();if(-1===this.libzip.statIndex(this.zip,r,0,0,e))throw this.makeLibzipError(this.libzip.getError(this.zip));const A=this.stats.uid,n=this.stats.gid,o=this.libzip.struct.statSize(e)>>>0,i=512,s=Math.ceil(o/i),a=1e3*(this.libzip.struct.statMtime(e)>>>0),c=a,g=a,l=a,h=new Date(c),p=new Date(g),C=new Date(l),f=new Date(a),I=this.listings.has(t)?u.QB:this.isSymbolicLink(r)?u.Zv:u.Pe,E=I===u.QB?493:420,B=I|511&this.getUnixMode(r,E);return Object.assign(new d.StatEntry,{uid:A,gid:n,size:o,blksize:i,blocks:s,atime:h,birthtime:p,ctime:C,mtime:f,atimeMs:c,birthtimeMs:g,ctimeMs:l,mtimeMs:a,mode:B})}if(this.listings.has(t)){const e=this.stats.uid,t=this.stats.gid,r=0,A=512,n=0,o=this.stats.mtimeMs,i=this.stats.mtimeMs,s=this.stats.mtimeMs,a=this.stats.mtimeMs,c=new Date(o),g=new Date(i),l=new Date(s),h=new Date(a),p=493|u.QB;return Object.assign(new d.StatEntry,{uid:e,gid:t,size:r,blksize:A,blocks:n,atime:c,birthtime:g,ctime:l,mtime:h,atimeMs:o,birthtimeMs:i,ctimeMs:s,mtimeMs:a,mode:p})}throw new Error("Unreachable")}getUnixMode(e,t){if(-1===this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S))throw this.makeLibzipError(this.libzip.getError(this.zip));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?t:this.libzip.getValue(this.libzip.uint32S,"i32")>>>16}registerListing(e){let t=this.listings.get(e);if(t)return t;const r=this.registerListing(p.y1.dirname(e));return t=new Set,r.add(p.y1.basename(e)),this.listings.set(e,t),t}registerEntry(e,t){this.registerListing(p.y1.dirname(e)).add(p.y1.basename(e)),this.entries.set(e,t)}unregisterListing(e){this.listings.delete(e);const t=this.listings.get(p.y1.dirname(e));null==t||t.delete(p.y1.basename(e))}unregisterEntry(e){this.unregisterListing(e);const t=this.entries.get(e);this.entries.delete(e),void 0!==t&&(this.fileSources.delete(t),this.isSymbolicLink(t)&&this.symlinkCount--)}deleteEntry(e,t){this.unregisterEntry(e);if(-1===this.libzip.delete(this.zip,t))throw this.makeLibzipError(this.libzip.getError(this.zip))}resolveFilename(e,t,r=!0){if(!this.ready)throw h.Vw("archive closed, "+e);let A=p.y1.resolve(p.LZ.root,t);if("/"===A)return p.LZ.root;const n=this.entries.get(A);if(r&&void 0!==n){if(0!==this.symlinkCount&&this.isSymbolicLink(n)){const t=this.getFileSource(n).toString();return this.resolveFilename(e,p.y1.resolve(p.y1.dirname(A),t),!0)}return A}for(;;){const t=this.resolveFilename(e,p.y1.dirname(A),!0),n=this.listings.has(t),o=this.entries.has(t);if(!n&&!o)throw h.z6(e);if(!n)throw h.Ab(e);if(A=p.y1.resolve(t,p.y1.basename(A)),!r||0===this.symlinkCount)break;const i=this.libzip.name.locate(this.zip,A.slice(1));if(-1===i)break;if(!this.isSymbolicLink(i))break;{const e=this.getFileSource(i).toString();A=p.y1.resolve(p.y1.dirname(A),e)}}return A}allocateBuffer(e){Buffer.isBuffer(e)||(e=Buffer.from(e));const t=this.libzip.malloc(e.byteLength);if(!t)throw new Error("Couldn't allocate enough memory");return new Uint8Array(this.libzip.HEAPU8.buffer,t,e.byteLength).set(e),{buffer:t,byteLength:e.byteLength}}allocateUnattachedSource(e){const t=this.libzip.struct.errorS(),{buffer:r,byteLength:A}=this.allocateBuffer(e),n=this.libzip.source.fromUnattachedBuffer(r,A,0,!0,t);if(0===n)throw this.libzip.free(t),this.makeLibzipError(t);return n}allocateSource(e){const{buffer:t,byteLength:r}=this.allocateBuffer(e),A=this.libzip.source.fromBuffer(this.zip,t,r,0,!0);if(0===A)throw this.libzip.free(t),this.makeLibzipError(this.libzip.getError(this.zip));return A}setFileSource(e,t){const r=Buffer.isBuffer(t)?t:Buffer.from(t),A=p.y1.relative(p.LZ.root,e),n=this.allocateSource(t);try{const e=this.libzip.file.add(this.zip,A,n,this.libzip.ZIP_FL_OVERWRITE);if(-1===e)throw this.makeLibzipError(this.libzip.getError(this.zip));if("mixed"!==this.level){let t;t=0===this.level?this.libzip.ZIP_CM_STORE:this.libzip.ZIP_CM_DEFLATE;if(-1===this.libzip.file.setCompression(this.zip,e,0,t,this.level))throw this.makeLibzipError(this.libzip.getError(this.zip))}return this.fileSources.set(e,r),e}catch(e){throw this.libzip.source.free(n),e}}isSymbolicLink(e){if(0===this.symlinkCount)return!1;if(-1===this.libzip.file.getExternalAttributes(this.zip,e,0,0,this.libzip.uint08S,this.libzip.uint32S))throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX)return!1;return(this.libzip.getValue(this.libzip.uint32S,"i32")>>>16&u.wK)===u.Zv}getFileSource(e,t={asyncDecompress:!1}){const r=this.fileSources.get(e);if(void 0!==r)return r;const A=this.libzip.struct.statS();if(-1===this.libzip.statIndex(this.zip,e,0,0,A))throw this.makeLibzipError(this.libzip.getError(this.zip));const n=this.libzip.struct.statCompSize(A),o=this.libzip.struct.statCompMethod(A),i=this.libzip.malloc(n);try{const r=this.libzip.fopenIndex(this.zip,e,0,this.libzip.ZIP_FL_COMPRESSED);if(0===r)throw this.makeLibzipError(this.libzip.getError(this.zip));try{const A=this.libzip.fread(r,i,n,0);if(-1===A)throw this.makeLibzipError(this.libzip.file.getError(r));if(An)throw new Error("Overread");const a=this.libzip.HEAPU8.subarray(i,i+n),c=Buffer.from(a);if(0===o)return this.fileSources.set(e,c),c;if(t.asyncDecompress)return new Promise((t,r)=>{s().inflateRaw(c,(A,n)=>{A?r(A):(this.fileSources.set(e,n),t(n))})});{const t=s().inflateRawSync(c);return this.fileSources.set(e,t),t}}finally{this.libzip.fclose(r)}}finally{this.libzip.free(i)}}async chmodPromise(e,t){return this.chmodSync(e,t)}chmodSync(e,t){if(this.readOnly)throw h.YW(`chmod '${e}'`);t&=493;const r=this.resolveFilename(`chmod '${e}'`,e,!1),A=this.entries.get(r);if(void 0===A)throw new Error(`Assertion failed: The entry should have been registered (${r})`);const n=-512&this.getUnixMode(A,0|u.Pe)|t;if(-1===this.libzip.file.setExternalAttributes(this.zip,A,0,0,this.libzip.ZIP_OPSYS_UNIX,n<<16))throw this.makeLibzipError(this.libzip.getError(this.zip))}async chownPromise(e,t,r){return this.chownSync(e,t,r)}chownSync(e,t,r){throw new Error("Unimplemented")}async renamePromise(e,t){return this.renameSync(e,t)}renameSync(e,t){throw new Error("Unimplemented")}async copyFilePromise(e,t,r){const{indexSource:A,indexDest:n,resolvedDestP:o}=this.prepareCopyFile(e,t,r),i=await this.getFileSource(A,{asyncDecompress:!0}),s=this.setFileSource(o,i);s!==n&&this.registerEntry(o,s)}copyFileSync(e,t,r=0){const{indexSource:A,indexDest:n,resolvedDestP:o}=this.prepareCopyFile(e,t,r),i=this.getFileSource(A),s=this.setFileSource(o,i);s!==n&&this.registerEntry(o,s)}prepareCopyFile(e,t,r=0){if(this.readOnly)throw h.YW(`copyfile '${e} -> '${t}'`);if(0!=(r&A.constants.COPYFILE_FICLONE_FORCE))throw h.bk("unsupported clone operation",`copyfile '${e}' -> ${t}'`);const n=this.resolveFilename(`copyfile '${e} -> ${t}'`,e),o=this.entries.get(n);if(void 0===o)throw h.hq(`copyfile '${e}' -> '${t}'`);const i=this.resolveFilename(`copyfile '${e}' -> ${t}'`,t),s=this.entries.get(i);if(0!=(r&(A.constants.COPYFILE_EXCL|A.constants.COPYFILE_FICLONE_FORCE))&&void 0!==s)throw h.cT(`copyfile '${e}' -> '${t}'`);return{indexSource:o,resolvedDestP:i,indexDest:s}}async appendFilePromise(e,t,r){if(this.readOnly)throw h.YW(`open '${e}'`);return void 0===r?r={flag:"a"}:"string"==typeof r?r={flag:"a",encoding:r}:void 0===r.flag&&(r={flag:"a",...r}),this.writeFilePromise(e,t,r)}appendFileSync(e,t,r={}){if(this.readOnly)throw h.YW(`open '${e}'`);return void 0===r?r={flag:"a"}:"string"==typeof r?r={flag:"a",encoding:r}:void 0===r.flag&&(r={flag:"a",...r}),this.writeFileSync(e,t,r)}async writeFilePromise(e,t,r){const{encoding:A,index:n,resolvedP:o}=this.prepareWriteFile(e,r);void 0!==n&&"object"==typeof r&&r.flag&&r.flag.includes("a")&&(t=Buffer.concat([await this.getFileSource(n,{asyncDecompress:!0}),Buffer.from(t)])),null!==A&&(t=t.toString(A));const i=this.setFileSource(o,t);i!==n&&this.registerEntry(o,i)}writeFileSync(e,t,r){const{encoding:A,index:n,resolvedP:o}=this.prepareWriteFile(e,r);void 0!==n&&"object"==typeof r&&r.flag&&r.flag.includes("a")&&(t=Buffer.concat([this.getFileSource(n),Buffer.from(t)])),null!==A&&(t=t.toString(A));const i=this.setFileSource(o,t);i!==n&&this.registerEntry(o,i)}prepareWriteFile(e,t){if("string"!=typeof e)throw h.Ch("read");if(this.readOnly)throw h.YW(`open '${e}'`);const r=this.resolveFilename(`open '${e}'`,e);if(this.listings.has(r))throw h.GA(`open '${e}'`);let A=null;"string"==typeof t?A=t:"object"==typeof t&&t.encoding&&(A=t.encoding);return{encoding:A,resolvedP:r,index:this.entries.get(r)}}async unlinkPromise(e){return this.unlinkSync(e)}unlinkSync(e){if(this.readOnly)throw h.YW(`unlink '${e}'`);const t=this.resolveFilename(`unlink '${e}'`,e);if(this.listings.has(t))throw h.GA(`unlink '${e}'`);const r=this.entries.get(t);if(void 0===r)throw h.hq(`unlink '${e}'`);this.deleteEntry(t,r)}async utimesPromise(e,t,r){return this.utimesSync(e,t,r)}utimesSync(e,t,r){if(this.readOnly)throw h.YW(`utimes '${e}'`);const A=this.resolveFilename(`utimes '${e}'`,e);this.utimesImpl(A,r)}async lutimesPromise(e,t,r){return this.lutimesSync(e,t,r)}lutimesSync(e,t,r){if(this.readOnly)throw h.YW(`lutimes '${e}'`);const A=this.resolveFilename(`utimes '${e}'`,e,!1);this.utimesImpl(A,r)}utimesImpl(e,t){this.listings.has(e)&&(this.entries.has(e)||this.hydrateDirectory(e));const r=this.entries.get(e);if(void 0===r)throw new Error("Unreachable");if(-1===this.libzip.file.setMtime(this.zip,r,0,function(e){if("string"==typeof e&&String(+e)===e)return+e;if(Number.isFinite(e))return e<0?Date.now()/1e3:e;if((0,o.isDate)(e))return e.getTime()/1e3;throw new Error("Invalid time")}(t),0))throw this.makeLibzipError(this.libzip.getError(this.zip))}async mkdirPromise(e,t){return this.mkdirSync(e,t)}mkdirSync(e,{mode:t=493,recursive:r=!1}={}){if(r)return void this.mkdirpSync(e,{chmod:t});if(this.readOnly)throw h.YW(`mkdir '${e}'`);const A=this.resolveFilename(`mkdir '${e}'`,e);if(this.entries.has(A)||this.listings.has(A))throw h.cT(`mkdir '${e}'`);this.hydrateDirectory(A),this.chmodSync(A,t)}async rmdirPromise(e,t){return this.rmdirSync(e,t)}rmdirSync(e,{recursive:t=!1}={}){if(this.readOnly)throw h.YW(`rmdir '${e}'`);if(t)return void this.removeSync(e);const r=this.resolveFilename(`rmdir '${e}'`,e),A=this.listings.get(r);if(!A)throw h.Ab(`rmdir '${e}'`);if(A.size>0)throw h.re(`rmdir '${e}'`);const n=this.entries.get(r);if(void 0===n)throw h.hq(`rmdir '${e}'`);this.deleteEntry(e,n)}hydrateDirectory(e){const t=this.libzip.dir.add(this.zip,p.y1.relative(p.LZ.root,e));if(-1===t)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.registerListing(e),this.registerEntry(e,t),t}async linkPromise(e,t){return this.linkSync(e,t)}linkSync(e,t){throw h.Hs(`link '${e}' -> '${t}'`)}async symlinkPromise(e,t){return this.symlinkSync(e,t)}symlinkSync(e,t){if(this.readOnly)throw h.YW(`symlink '${e}' -> '${t}'`);const r=this.resolveFilename(`symlink '${e}' -> '${t}'`,t);if(this.listings.has(r))throw h.GA(`symlink '${e}' -> '${t}'`);if(this.entries.has(r))throw h.cT(`symlink '${e}' -> '${t}'`);const A=this.setFileSource(r,e);this.registerEntry(r,A);if(-1===this.libzip.file.setExternalAttributes(this.zip,A,0,0,this.libzip.ZIP_OPSYS_UNIX,(511|u.Zv)<<16))throw this.makeLibzipError(this.libzip.getError(this.zip));this.symlinkCount+=1}async readFilePromise(e,t){"object"==typeof t&&(t=t?t.encoding:void 0);const r=await this.readFileBuffer(e,{asyncDecompress:!0});return t?r.toString(t):r}readFileSync(e,t){"object"==typeof t&&(t=t?t.encoding:void 0);const r=this.readFileBuffer(e);return t?r.toString(t):r}readFileBuffer(e,t={asyncDecompress:!1}){if("string"!=typeof e)throw h.Ch("read");const r=this.resolveFilename(`open '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`open '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(r))throw h.Ab(`open '${e}'`);if(this.listings.has(r))throw h.GA("read");const A=this.entries.get(r);if(void 0===A)throw new Error("Unreachable");return this.getFileSource(A,t)}async readdirPromise(e,{withFileTypes:t}={}){return this.readdirSync(e,{withFileTypes:t})}readdirSync(e,{withFileTypes:t}={}){const r=this.resolveFilename(`scandir '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw h.z6(`scandir '${e}'`);const A=this.listings.get(r);if(!A)throw h.Ab(`scandir '${e}'`);const n=[...A];return t?n.map(t=>Object.assign(this.statImpl("lstat",p.y1.join(e,t)),{name:t})):n}async readlinkPromise(e){const t=this.prepareReadlink(e);return(await this.getFileSource(t,{asyncDecompress:!0})).toString()}readlinkSync(e){const t=this.prepareReadlink(e);return this.getFileSource(t).toString()}prepareReadlink(e){const t=this.resolveFilename(`readlink '${e}'`,e,!1);if(!this.entries.has(t)&&!this.listings.has(t))throw h.z6(`readlink '${e}'`);if("/"===e[e.length-1]&&!this.listings.has(t))throw h.Ab(`open '${e}'`);if(this.listings.has(t))throw h.hq(`readlink '${e}'`);const r=this.entries.get(t);if(void 0===r)throw new Error("Unreachable");if(!this.isSymbolicLink(r))throw h.hq(`readlink '${e}'`);return r}async truncatePromise(e,t=0){const r=this.resolveFilename(`open '${e}'`,e),A=this.entries.get(r);if(void 0===A)throw h.hq(`open '${e}'`);const n=await this.getFileSource(A,{asyncDecompress:!0}),o=Buffer.alloc(t,0);return n.copy(o),await this.writeFilePromise(e,o)}truncateSync(e,t=0){const r=this.resolveFilename(`open '${e}'`,e),A=this.entries.get(r);if(void 0===A)throw h.hq(`open '${e}'`);const n=this.getFileSource(A),o=Buffer.alloc(t,0);return n.copy(o),this.writeFileSync(e,o)}watch(e,t,r){let A;switch(typeof t){case"function":case"string":case"undefined":A=!0;break;default:({persistent:A=!0}=t)}if(!A)return{on:()=>{},close:()=>{}};const n=setInterval(()=>{},864e5);return{on:()=>{},close:()=>{clearInterval(n)}}}watchFile(e,t,r){const A=this.resolveFilename(`open '${e}'`,e);return(0,l._x)(this,A,t,r)}unwatchFile(e,t){const r=this.resolveFilename(`open '${e}'`,e);return(0,l.nd)(this,r,t)}}},53660:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var A=r(35747),n=r(5944),o=r(78420),i=r(90739),s=r(38783),a=r(46009);const c=2147483648,g=/.*?(?await this.baseFs.openPromise(e,t,r),async(e,{subPath:A})=>this.remapFd(e,await e.openPromise(A,t,r)))}openSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.openSync(e,t,r),(e,{subPath:A})=>this.remapFd(e,e.openSync(A,t,r)))}async opendirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.opendirPromise(e,t),async(e,{subPath:r})=>await e.opendirPromise(r,t),{requireSubpath:!1})}opendirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.opendirSync(e,t),(e,{subPath:r})=>e.opendirSync(r,t),{requireSubpath:!1})}async readPromise(e,t,r,A,n){if(0==(e&c))return await this.baseFs.readPromise(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, read"),{code:"EBADF"});const[i,s]=o;return await i.readPromise(s,t,r,A,n)}readSync(e,t,r,A,n){if(0==(e&c))return this.baseFs.readSync(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, read"),{code:"EBADF"});const[i,s]=o;return i.readSync(s,t,r,A,n)}async writePromise(e,t,r,A,n){if(0==(e&c))return"string"==typeof t?await this.baseFs.writePromise(e,t,r):await this.baseFs.writePromise(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF"});const[i,s]=o;return"string"==typeof t?await i.writePromise(s,t,r):await i.writePromise(s,t,r,A,n)}writeSync(e,t,r,A,n){if(0==(e&c))return"string"==typeof t?this.baseFs.writeSync(e,t,r):this.baseFs.writeSync(e,t,r,A,n);const o=this.fdMap.get(e);if(void 0===o)throw Object.assign(new Error("EBADF: bad file descriptor, write"),{code:"EBADF"});const[i,s]=o;return"string"==typeof t?i.writeSync(s,t,r):i.writeSync(s,t,r,A,n)}async closePromise(e){if(0==(e&c))return await this.baseFs.closePromise(e);const t=this.fdMap.get(e);if(void 0===t)throw Object.assign(new Error("EBADF: bad file descriptor, close"),{code:"EBADF"});this.fdMap.delete(e);const[r,A]=t;return await r.closePromise(A)}closeSync(e){if(0==(e&c))return this.baseFs.closeSync(e);const t=this.fdMap.get(e);if(void 0===t)throw Object.assign(new Error("EBADF: bad file descriptor, close"),{code:"EBADF"});this.fdMap.delete(e);const[r,A]=t;return r.closeSync(A)}createReadStream(e,t){return null===e?this.baseFs.createReadStream(e,t):this.makeCallSync(e,()=>this.baseFs.createReadStream(e,t),(e,{subPath:r})=>e.createReadStream(r,t))}createWriteStream(e,t){return null===e?this.baseFs.createWriteStream(e,t):this.makeCallSync(e,()=>this.baseFs.createWriteStream(e,t),(e,{subPath:r})=>e.createWriteStream(r,t))}async realpathPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.realpathPromise(e),async(e,{archivePath:t,subPath:r})=>{let A=this.realPaths.get(t);return void 0===A&&(A=await this.baseFs.realpathPromise(t),this.realPaths.set(t,A)),this.pathUtils.join(A,this.pathUtils.relative(a.LZ.root,await e.realpathPromise(r)))})}realpathSync(e){return this.makeCallSync(e,()=>this.baseFs.realpathSync(e),(e,{archivePath:t,subPath:r})=>{let A=this.realPaths.get(t);return void 0===A&&(A=this.baseFs.realpathSync(t),this.realPaths.set(t,A)),this.pathUtils.join(A,this.pathUtils.relative(a.LZ.root,e.realpathSync(r)))})}async existsPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.existsPromise(e),async(e,{subPath:t})=>await e.existsPromise(t))}existsSync(e){return this.makeCallSync(e,()=>this.baseFs.existsSync(e),(e,{subPath:t})=>e.existsSync(t))}async accessPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.accessPromise(e,t),async(e,{subPath:r})=>await e.accessPromise(r,t))}accessSync(e,t){return this.makeCallSync(e,()=>this.baseFs.accessSync(e,t),(e,{subPath:r})=>e.accessSync(r,t))}async statPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.statPromise(e),async(e,{subPath:t})=>await e.statPromise(t))}statSync(e){return this.makeCallSync(e,()=>this.baseFs.statSync(e),(e,{subPath:t})=>e.statSync(t))}async lstatPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.lstatPromise(e),async(e,{subPath:t})=>await e.lstatPromise(t))}lstatSync(e){return this.makeCallSync(e,()=>this.baseFs.lstatSync(e),(e,{subPath:t})=>e.lstatSync(t))}async chmodPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.chmodPromise(e,t),async(e,{subPath:r})=>await e.chmodPromise(r,t))}chmodSync(e,t){return this.makeCallSync(e,()=>this.baseFs.chmodSync(e,t),(e,{subPath:r})=>e.chmodSync(r,t))}async chownPromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.chownPromise(e,t,r),async(e,{subPath:A})=>await e.chownPromise(A,t,r))}chownSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.chownSync(e,t,r),(e,{subPath:A})=>e.chownSync(A,t,r))}async renamePromise(e,t){return await this.makeCallPromise(e,async()=>await this.makeCallPromise(t,async()=>await this.baseFs.renamePromise(e,t),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),async(e,{subPath:r})=>await this.makeCallPromise(t,async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},async(t,{subPath:A})=>{if(e!==t)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return await e.renamePromise(r,A)}))}renameSync(e,t){return this.makeCallSync(e,()=>this.makeCallSync(t,()=>this.baseFs.renameSync(e,t),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),(e,{subPath:r})=>this.makeCallSync(t,()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},(t,{subPath:A})=>{if(e!==t)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return e.renameSync(r,A)}))}async copyFilePromise(e,t,r=0){const n=async(e,t,n,o)=>{if(0!=(r&A.constants.COPYFILE_FICLONE_FORCE))throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${t}' -> ${o}'`),{code:"EXDEV"});if(r&A.constants.COPYFILE_EXCL&&await this.existsPromise(t))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${t}' -> '${o}'`),{code:"EEXIST"});let i;try{i=await e.readFilePromise(t)}catch(e){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${t}' -> '${o}'`),{code:"EINVAL"})}await n.writeFilePromise(o,i)};return await this.makeCallPromise(e,async()=>await this.makeCallPromise(t,async()=>await this.baseFs.copyFilePromise(e,t,r),async(t,{subPath:r})=>await n(this.baseFs,e,t,r)),async(e,{subPath:A})=>await this.makeCallPromise(t,async()=>await n(e,A,this.baseFs,t),async(t,{subPath:o})=>e!==t?await n(e,A,t,o):await e.copyFilePromise(A,o,r)))}copyFileSync(e,t,r=0){const n=(e,t,n,o)=>{if(0!=(r&A.constants.COPYFILE_FICLONE_FORCE))throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${t}' -> ${o}'`),{code:"EXDEV"});if(r&A.constants.COPYFILE_EXCL&&this.existsSync(t))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${t}' -> '${o}'`),{code:"EEXIST"});let i;try{i=e.readFileSync(t)}catch(e){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${t}' -> '${o}'`),{code:"EINVAL"})}n.writeFileSync(o,i)};return this.makeCallSync(e,()=>this.makeCallSync(t,()=>this.baseFs.copyFileSync(e,t,r),(t,{subPath:r})=>n(this.baseFs,e,t,r)),(e,{subPath:A})=>this.makeCallSync(t,()=>n(e,A,this.baseFs,t),(t,{subPath:o})=>e!==t?n(e,A,t,o):e.copyFileSync(A,o,r)))}async appendFilePromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.appendFilePromise(e,t,r),async(e,{subPath:A})=>await e.appendFilePromise(A,t,r))}appendFileSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.appendFileSync(e,t,r),(e,{subPath:A})=>e.appendFileSync(A,t,r))}async writeFilePromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.writeFilePromise(e,t,r),async(e,{subPath:A})=>await e.writeFilePromise(A,t,r))}writeFileSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.writeFileSync(e,t,r),(e,{subPath:A})=>e.writeFileSync(A,t,r))}async unlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.unlinkPromise(e),async(e,{subPath:t})=>await e.unlinkPromise(t))}unlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.unlinkSync(e),(e,{subPath:t})=>e.unlinkSync(t))}async utimesPromise(e,t,r){return await this.makeCallPromise(e,async()=>await this.baseFs.utimesPromise(e,t,r),async(e,{subPath:A})=>await e.utimesPromise(A,t,r))}utimesSync(e,t,r){return this.makeCallSync(e,()=>this.baseFs.utimesSync(e,t,r),(e,{subPath:A})=>e.utimesSync(A,t,r))}async mkdirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.mkdirPromise(e,t),async(e,{subPath:r})=>await e.mkdirPromise(r,t))}mkdirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.mkdirSync(e,t),(e,{subPath:r})=>e.mkdirSync(r,t))}async rmdirPromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.rmdirPromise(e,t),async(e,{subPath:r})=>await e.rmdirPromise(r,t))}rmdirSync(e,t){return this.makeCallSync(e,()=>this.baseFs.rmdirSync(e,t),(e,{subPath:r})=>e.rmdirSync(r,t))}async linkPromise(e,t){return await this.makeCallPromise(t,async()=>await this.baseFs.linkPromise(e,t),async(t,{subPath:r})=>await t.linkPromise(e,r))}linkSync(e,t){return this.makeCallSync(t,()=>this.baseFs.linkSync(e,t),(t,{subPath:r})=>t.linkSync(e,r))}async symlinkPromise(e,t,r){return await this.makeCallPromise(t,async()=>await this.baseFs.symlinkPromise(e,t,r),async(t,{subPath:r})=>await t.symlinkPromise(e,r))}symlinkSync(e,t,r){return this.makeCallSync(t,()=>this.baseFs.symlinkSync(e,t,r),(t,{subPath:r})=>t.symlinkSync(e,r))}async readFilePromise(e,t){return this.makeCallPromise(e,async()=>{switch(t){case"utf8":default:return await this.baseFs.readFilePromise(e,t)}},async(e,{subPath:r})=>await e.readFilePromise(r,t))}readFileSync(e,t){return this.makeCallSync(e,()=>{switch(t){case"utf8":default:return this.baseFs.readFileSync(e,t)}},(e,{subPath:r})=>e.readFileSync(r,t))}async readdirPromise(e,{withFileTypes:t}={}){return await this.makeCallPromise(e,async()=>await this.baseFs.readdirPromise(e,{withFileTypes:t}),async(e,{subPath:r})=>await e.readdirPromise(r,{withFileTypes:t}),{requireSubpath:!1})}readdirSync(e,{withFileTypes:t}={}){return this.makeCallSync(e,()=>this.baseFs.readdirSync(e,{withFileTypes:t}),(e,{subPath:r})=>e.readdirSync(r,{withFileTypes:t}),{requireSubpath:!1})}async readlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.readlinkPromise(e),async(e,{subPath:t})=>await e.readlinkPromise(t))}readlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.readlinkSync(e),(e,{subPath:t})=>e.readlinkSync(t))}async truncatePromise(e,t){return await this.makeCallPromise(e,async()=>await this.baseFs.truncatePromise(e,t),async(e,{subPath:r})=>await e.truncatePromise(r,t))}truncateSync(e,t){return this.makeCallSync(e,()=>this.baseFs.truncateSync(e,t),(e,{subPath:r})=>e.truncateSync(r,t))}watch(e,t,r){return this.makeCallSync(e,()=>this.baseFs.watch(e,t,r),(e,{subPath:A})=>e.watch(A,t,r))}watchFile(e,t,r){return this.makeCallSync(e,()=>this.baseFs.watchFile(e,t,r),()=>(0,s._x)(this,e,t,r))}unwatchFile(e,t){return this.makeCallSync(e,()=>this.baseFs.unwatchFile(e,t),()=>(0,s.nd)(this,e,t))}async makeCallPromise(e,t,r,{requireSubpath:A=!0}={}){if("string"!=typeof e)return await t();const n=this.resolve(e),o=this.findZip(n);return o?A&&"/"===o.subPath?await t():await this.getZipPromise(o.archivePath,async e=>await r(e,o)):await t()}makeCallSync(e,t,r,{requireSubpath:A=!0}={}){if("string"!=typeof e)return t();const n=this.resolve(e),o=this.findZip(n);return o?A&&"/"===o.subPath?t():this.getZipSync(o.archivePath,e=>r(e,o)):t()}findZip(e){if(this.filter&&!this.filter.test(e))return null;let t="";for(;;){const r=g.exec(e.substr(t.length));if(!r)return null;if(t=this.pathUtils.join(t,r[0]),!1===this.isZip.has(t)){if(this.notZip.has(t))continue;try{if(!this.baseFs.lstatSync(t).isFile()){this.notZip.add(t);continue}}catch(e){return null}this.isZip.add(t)}return{archivePath:t,subPath:this.pathUtils.join(a.LZ.root,e.substr(t.length))}}}limitOpenFiles(e){if(null===this.zipInstances)return;const t=Date.now();let r=t+this.maxAge,A=null===e?0:this.zipInstances.size-e;for(const[n,{zipFs:o,expiresAt:i,refCount:s}]of this.zipInstances.entries())if(0===s&&!o.hasOpenFileHandles())if(t>=i)o.saveAndClose(),this.zipInstances.delete(n),A-=1;else{if(null===e||A<=0){r=i;break}o.saveAndClose(),this.zipInstances.delete(n),A-=1}null===this.limitOpenFilesTimeout&&(null===e&&this.zipInstances.size>0||null!==e)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},r-t).unref())}async getZipPromise(e,t){const r=async()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:await this.baseFs.statPromise(e)});if(this.zipInstances){let A=this.zipInstances.get(e);if(!A){const t=await r();A=this.zipInstances.get(e),A||(A={zipFs:new i.d(e,t),expiresAt:0,refCount:0})}this.zipInstances.delete(e),this.limitOpenFiles(this.maxOpenFiles-1),this.zipInstances.set(e,A),A.expiresAt=Date.now()+this.maxAge,A.refCount+=1;try{return await t(A.zipFs)}finally{A.refCount-=1}}else{const A=new i.d(e,await r());try{return await t(A)}finally{A.saveAndClose()}}}getZipSync(e,t){const r=()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:this.baseFs.statSync(e)});if(this.zipInstances){let A=this.zipInstances.get(e);return A||(A={zipFs:new i.d(e,r()),expiresAt:0,refCount:0}),this.zipInstances.delete(e),this.limitOpenFiles(this.maxOpenFiles-1),this.zipInstances.set(e,A),A.expiresAt=Date.now()+this.maxAge,t(A.zipFs)}{const A=new i.d(e,r());try{return t(A)}finally{A.saveAndClose()}}}}},19697:(e,t,r)=>{"use strict";r.d(t,{a:()=>o});var A=r(26984);class n{constructor(e,t,r={}){this.path=e,this.nextDirent=t,this.opts=r,this.closed=!1}throwIfClosed(){if(this.closed)throw A.Xh()}async*[Symbol.asyncIterator](){try{let e;for(;null!==(e=await this.read());)yield e}finally{await this.close()}}read(e){const t=this.readSync();return void 0!==e?e(null,t):Promise.resolve(t)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),void 0!==e?e(null):Promise.resolve()}closeSync(){var e,t;this.throwIfClosed(),null===(t=(e=this.opts).onClose)||void 0===t||t.call(e),this.closed=!0}}function o(e,t,r,A){return new n(t,()=>{const A=r.shift();return void 0===A?null:Object.assign(e.statSync(e.pathUtils.join(t,A)),{name:A})},A)}},38783:(e,t,r)=>{"use strict";r.d(t,{L:()=>u,nd:()=>l,_x:()=>g});var A,n,o=r(28614),i=r(65760);function s(e,t){if(e!==t)throw new Error(`Invalid StatWatcher status: expected '${t}', got '${e}'`)}!function(e){e.Change="change",e.Stop="stop"}(A||(A={})),function(e){e.Ready="ready",e.Running="running",e.Stopped="stopped"}(n||(n={}));class a extends o.EventEmitter{constructor(e,t,{bigint:r=!1}={}){super(),this.status=n.Ready,this.changeListeners=new Map,this.startTimeout=null,this.fakeFs=e,this.path=t,this.bigint=r,this.lastStats=this.stat()}static create(e,t,r){const A=new a(e,t,r);return A.start(),A}start(){s(this.status,n.Ready),this.status=n.Running,this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit(A.Change,this.lastStats,this.lastStats)},3)}stop(){s(this.status,n.Running),this.status=n.Stopped,null!==this.startTimeout&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit(A.Stop)}stat(){try{return this.fakeFs.statSync(this.path)}catch(e){if("ENOENT"===e.code)return i.makeEmptyStats();throw e}}makeInterval(e){const t=setInterval(()=>{const e=this.stat(),t=this.lastStats;i.areStatsEqual(e,t)||(this.lastStats=e,this.emit(A.Change,e,t))},e.interval);return e.persistent?t:t.unref()}registerChangeListener(e,t){this.addListener(A.Change,e),this.changeListeners.set(e,this.makeInterval(t))}unregisterChangeListener(e){this.removeListener(A.Change,e);const t=this.changeListeners.get(e);void 0!==t&&clearInterval(t),this.changeListeners.delete(e)}unregisterAllChangeListeners(){for(const e of this.changeListeners.keys())this.unregisterChangeListener(e)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(const e of this.changeListeners.values())e.ref();return this}unref(){for(const e of this.changeListeners.values())e.unref();return this}}const c=new WeakMap;function g(e,t,r,A){let n,o,i,s;switch(typeof r){case"function":n=!1,o=!0,i=5007,s=r;break;default:({bigint:n=!1,persistent:o=!0,interval:i=5007}=r),s=A}let g=c.get(e);void 0===g&&c.set(e,g=new Map);let l=g.get(t);return void 0===l&&(l=a.create(e,t,{bigint:n}),g.set(t,l)),l.registerChangeListener(s,{persistent:o,interval:i}),l}function l(e,t,r){const A=c.get(e);if(void 0===A)return;const n=A.get(t);void 0!==n&&(void 0===r?n.unregisterAllChangeListeners():n.unregisterChangeListener(r),n.hasChangeListeners()||(n.stop(),A.delete(t)))}function u(e){const t=c.get(e);if(void 0!==t)for(const r of t.keys())l(e,r)}},22004:(e,t,r)=>{"use strict";r.d(t,{wK:()=>A,QB:()=>n,Pe:()=>o,Zv:()=>i});const A=61440,n=16384,o=32768,i=40960},26984:(e,t,r)=>{"use strict";function A(e,t){return Object.assign(new Error(`${e}: ${t}`),{code:e})}function n(e){return A("EBUSY",e)}function o(e,t){return A("ENOSYS",`${e}, ${t}`)}function i(e){return A("EINVAL","invalid argument, "+e)}function s(e){return A("EBADF","bad file descriptor, "+e)}function a(e){return A("ENOENT","no such file or directory, "+e)}function c(e){return A("ENOTDIR","not a directory, "+e)}function g(e){return A("EISDIR","illegal operation on a directory, "+e)}function l(e){return A("EEXIST","file already exists, "+e)}function u(e){return A("EROFS","read-only filesystem, "+e)}function h(e){return A("ENOTEMPTY","directory not empty, "+e)}function p(e){return A("EOPNOTSUPP","operation not supported, "+e)}function d(){return A("ERR_DIR_CLOSED","Directory handle was closed")}r.d(t,{Vw:()=>n,bk:()=>o,hq:()=>i,Ch:()=>s,z6:()=>a,Ab:()=>c,GA:()=>g,cT:()=>l,YW:()=>u,re:()=>h,Hs:()=>p,Xh:()=>d,Yn:()=>C});class C extends Error{constructor(e,t){super(e),this.name="Libzip Error",this.code=t}}},43896:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AliasFS:()=>u.K,CwdFS:()=>h.M,DEFAULT_COMPRESSION_LEVEL:()=>l.k,FakeFS:()=>g.uY,Filename:()=>s.QS,JailFS:()=>p.n,LazyFS:()=>d.v,NoFS:()=>f,NodeFS:()=>i.S,PortablePath:()=>s.LZ,PosixFS:()=>I.i,ProxiedFS:()=>E.p,VirtualFS:()=>B.p,ZipFS:()=>l.d,ZipOpenFS:()=>y.A,extendFs:()=>Q,normalizeLineEndings:()=>g.qH,npath:()=>s.cS,opendir:()=>c.a,patchFs:()=>w,ppath:()=>s.y1,statUtils:()=>a,toFilename:()=>s.Zu,xfs:()=>S});var A=r(12087),n=r.n(A),o=r(31669),i=r(78420),s=r(46009),a=r(65760),c=r(19697),g=r(5944),l=r(90739),u=r(14626),h=r(75448),p=r(10489),d=r(15037);const C=()=>Object.assign(new Error("ENOSYS: unsupported filesystem access"),{code:"ENOSYS"});class f extends g.uY{constructor(){super(s.y1)}getExtractHint(){throw C()}getRealPath(){throw C()}resolve(){throw C()}async openPromise(){throw C()}openSync(){throw C()}async opendirPromise(){throw C()}opendirSync(){throw C()}async readPromise(){throw C()}readSync(){throw C()}async writePromise(){throw C()}writeSync(){throw C()}async closePromise(){throw C()}closeSync(){throw C()}createWriteStream(){throw C()}createReadStream(){throw C()}async realpathPromise(){throw C()}realpathSync(){throw C()}async readdirPromise(){throw C()}readdirSync(){throw C()}async existsPromise(e){throw C()}existsSync(e){throw C()}async accessPromise(){throw C()}accessSync(){throw C()}async statPromise(){throw C()}statSync(){throw C()}async lstatPromise(e){throw C()}lstatSync(e){throw C()}async chmodPromise(){throw C()}chmodSync(){throw C()}async chownPromise(){throw C()}chownSync(){throw C()}async mkdirPromise(){throw C()}mkdirSync(){throw C()}async rmdirPromise(){throw C()}rmdirSync(){throw C()}async linkPromise(){throw C()}linkSync(){throw C()}async symlinkPromise(){throw C()}symlinkSync(){throw C()}async renamePromise(){throw C()}renameSync(){throw C()}async copyFilePromise(){throw C()}copyFileSync(){throw C()}async appendFilePromise(){throw C()}appendFileSync(){throw C()}async writeFilePromise(){throw C()}writeFileSync(){throw C()}async unlinkPromise(){throw C()}unlinkSync(){throw C()}async utimesPromise(){throw C()}utimesSync(){throw C()}async readFilePromise(){throw C()}readFileSync(){throw C()}async readlinkPromise(){throw C()}readlinkSync(){throw C()}async truncatePromise(){throw C()}truncateSync(){throw C()}watch(){throw C()}watchFile(){throw C()}unwatchFile(){throw C()}}f.instance=new f;var I=r(39725),E=r(42096),B=r(17674),y=r(53660);function m(e){const t=s.cS.toPortablePath(n().tmpdir()),r=Math.ceil(4294967296*Math.random()).toString(16).padStart(8,"0");return s.y1.join(t,`${e}${r}`)}function w(e,t){const r=new Set(["accessSync","appendFileSync","createReadStream","chmodSync","chownSync","closeSync","copyFileSync","linkSync","lstatSync","lutimesSync","mkdirSync","openSync","opendirSync","readSync","readlinkSync","readFileSync","readdirSync","readlinkSync","realpathSync","renameSync","rmdirSync","statSync","symlinkSync","truncateSync","unlinkSync","unwatchFile","utimesSync","watch","watchFile","writeFileSync","writeSync"]),A=new Set(["accessPromise","appendFilePromise","chmodPromise","chownPromise","closePromise","copyFilePromise","linkPromise","lstatPromise","lutimesPromise","mkdirPromise","openPromise","opendirPromise","readdirPromise","realpathPromise","readFilePromise","readdirPromise","readlinkPromise","renamePromise","rmdirPromise","statPromise","symlinkPromise","truncatePromise","unlinkPromise","utimesPromise","writeFilePromise","writeSync"]),n=new Set(["appendFilePromise","chmodPromise","chownPromise","closePromise","readPromise","readFilePromise","statPromise","truncatePromise","utimesPromise","writePromise","writeFilePromise"]),i=(e,t,r)=>{const A=e[t];e[t]=r,void 0!==(null==A?void 0:A[o.promisify.custom])&&(r[o.promisify.custom]=A[o.promisify.custom])};i(e,"exists",(e,...r)=>{const A="function"==typeof r[r.length-1]?r.pop():()=>{};process.nextTick(()=>{t.existsPromise(e).then(e=>{A(e)},()=>{A(!1)})})}),i(e,"read",(e,r,...A)=>{const n="function"==typeof A[A.length-1]?A.pop():()=>{};process.nextTick(()=>{t.readPromise(e,r,...A).then(e=>{n(null,e,r)},e=>{n(e)})})});for(const r of A){const A=r.replace(/Promise$/,"");if(void 0===e[A])continue;const n=t[r];if(void 0===n)continue;i(e,A,(...e)=>{const r="function"==typeof e[e.length-1]?e.pop():()=>{};process.nextTick(()=>{n.apply(t,e).then(e=>{r(null,e)},e=>{r(e)})})})}e.realpath.native=e.realpath,i(e,"existsSync",e=>{try{return t.existsSync(e)}catch(e){return!1}});for(const A of r){const r=A;if(void 0===e[r])continue;const n=t[A];void 0!==n&&i(e,r,n.bind(t))}e.realpathSync.native=e.realpathSync;{const r=process.emitWarning;let o;process.emitWarning=()=>{};try{o=e.promises}finally{process.emitWarning=r}if(void 0!==o){for(const e of A){const r=e.replace(/Promise$/,"");if(void 0===o[r])continue;const A=t[e];void 0!==A&&("open"!==e&&i(o,r,A.bind(t)))}class e{constructor(e){this.fd=e}}for(const r of n){const A=r.replace(/Promise$/,""),n=t[r];void 0!==n&&i(e.prototype,A,(function(...e){return n.call(t,this.fd,...e)}))}i(o,"open",async(...r)=>{const A=await t.openPromise(...r);return new e(A)})}}e.read[o.promisify.custom]=async(e,r,...A)=>{const n=t.readPromise(e,r,...A);return{bytesRead:await n,buffer:r}}}function Q(e,t){const r=Object.create(e);return w(r,t),r}const D=new Set;let b=!1;function v(){b||(b=!0,process.once("exit",()=>{S.rmtempSync()}))}const S=Object.assign(new i.S,{detachTemp(e){D.delete(e)},mktempSync(e){for(v();;){const t=m("xfs-");try{this.mkdirSync(t)}catch(e){if("EEXIST"===e.code)continue;throw e}const r=this.realpathSync(t);if(D.add(r),void 0===e)return t;try{return e(r)}finally{if(D.has(r)){D.delete(r);try{this.removeSync(r)}catch(e){}}}}},async mktempPromise(e){for(v();;){const t=m("xfs-");try{await this.mkdirPromise(t)}catch(e){if("EEXIST"===e.code)continue;throw e}const r=await this.realpathPromise(t);if(D.add(r),void 0===e)return r;try{return await e(r)}finally{if(D.has(r)){D.delete(r);try{await this.removePromise(r)}catch(e){}}}}},async rmtempPromise(){await Promise.all(Array.from(D.values()).map(async e=>{try{await S.removePromise(e,{maxRetries:0}),D.delete(e)}catch(e){}}))},rmtempSync(){for(const e of D)try{S.removeSync(e),D.delete(e)}catch(e){}}})},46009:(e,t,r)=>{"use strict";r.d(t,{LZ:()=>i,QS:()=>s,cS:()=>a,y1:()=>c,CI:()=>f,Zu:()=>I});var A,n=r(85622),o=r.n(n);!function(e){e[e.File=0]="File",e[e.Portable=1]="Portable",e[e.Native=2]="Native"}(A||(A={}));const i={root:"/",dot:"."},s={nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",pnpJs:".pnp.js",rc:".yarnrc.yml"},a=Object.create(o()),c=Object.create(o().posix);a.cwd=()=>process.cwd(),c.cwd=()=>C(process.cwd()),c.resolve=(...e)=>e.length>0&&c.isAbsolute(e[0])?o().posix.resolve(...e):o().posix.resolve(c.cwd(),...e);const g=function(e,t,r){return(t=e.normalize(t))===(r=e.normalize(r))?".":(t.endsWith(e.sep)||(t+=e.sep),r.startsWith(t)?r.slice(t.length):null)};a.fromPortablePath=d,a.toPortablePath=C,a.contains=(e,t)=>g(a,e,t),c.contains=(e,t)=>g(c,e,t);const l=/^([a-zA-Z]:.*)$/,u=/^\\\\(\.\\)?(.*)$/,h=/^\/([a-zA-Z]:.*)$/,p=/^\/unc\/(\.dot\/)?(.*)$/;function d(e){if("win32"!==process.platform)return e;if(e.match(h))e=e.replace(h,"$1");else{if(!e.match(p))return e;e=e.replace(p,(e,t,r)=>`\\\\${t?".\\":""}${r}`)}return e.replace(/\//g,"\\")}function C(e){return"win32"!==process.platform?e:(e.match(l)?e=e.replace(l,"/$1"):e.match(u)&&(e=e.replace(u,(e,t,r)=>`/unc/${t?".dot/":""}${r}`)),e.replace(/\\/g,"/"))}function f(e,t){return e===a?d(t):C(t)}function I(e){if(""!==a.parse(e).dir||""!==c.parse(e).dir)throw new Error(`Invalid filename: "${e}"`);return e}},65760:(e,t,r)=>{"use strict";r.r(t),r.d(t,{DirEntry:()=>n,StatEntry:()=>o,makeDefaultStats:()=>i,makeEmptyStats:()=>s,areStatsEqual:()=>a});var A=r(22004);class n{constructor(){this.name="",this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&A.wK)===A.QB}isFIFO(){return!1}isFile(){return(this.mode&A.wK)===A.Pe}isSocket(){return!1}isSymbolicLink(){return(this.mode&A.wK)===A.Zv}}class o{constructor(){this.dev=0,this.ino=0,this.mode=0,this.nlink=1,this.rdev=0,this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&A.wK)===A.QB}isFIFO(){return!1}isFile(){return(this.mode&A.wK)===A.Pe}isSocket(){return!1}isSymbolicLink(){return(this.mode&A.wK)===A.Zv}}function i(){return Object.assign(new o,{uid:0,gid:0,size:0,blksize:0,atimeMs:0,mtimeMs:0,ctimeMs:0,birthtimeMs:0,atime:new Date(0),mtime:new Date(0),ctime:new Date(0),birthtime:new Date(0),mode:420|A.Pe})}function s(){return Object.assign(i(),{nlink:0,blocks:0,mode:0})}function a(e,t){return e.atimeMs===t.atimeMs&&(e.birthtimeMs===t.birthtimeMs&&(e.blksize===t.blksize&&(e.blocks===t.blocks&&(e.ctimeMs===t.ctimeMs&&(e.dev===t.dev&&(e.gid===t.gid&&(e.ino===t.ino&&(e.isBlockDevice()===t.isBlockDevice()&&(e.isCharacterDevice()===t.isCharacterDevice()&&(e.isDirectory()===t.isDirectory()&&(e.isFIFO()===t.isFIFO()&&(e.isFile()===t.isFile()&&(e.isSocket()===t.isSocket()&&(e.isSymbolicLink()===t.isSymbolicLink()&&(e.mode===t.mode&&(e.mtimeMs===t.mtimeMs&&(e.nlink===t.nlink&&(e.rdev===t.rdev&&(e.size===t.size&&e.uid===t.uid)))))))))))))))))))}},65281:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getLibzipPromise:()=>s,getLibzipSync:()=>i});const A=["number","number"];var n;!function(e){e[e.ZIP_ER_OK=0]="ZIP_ER_OK",e[e.ZIP_ER_MULTIDISK=1]="ZIP_ER_MULTIDISK",e[e.ZIP_ER_RENAME=2]="ZIP_ER_RENAME",e[e.ZIP_ER_CLOSE=3]="ZIP_ER_CLOSE",e[e.ZIP_ER_SEEK=4]="ZIP_ER_SEEK",e[e.ZIP_ER_READ=5]="ZIP_ER_READ",e[e.ZIP_ER_WRITE=6]="ZIP_ER_WRITE",e[e.ZIP_ER_CRC=7]="ZIP_ER_CRC",e[e.ZIP_ER_ZIPCLOSED=8]="ZIP_ER_ZIPCLOSED",e[e.ZIP_ER_NOENT=9]="ZIP_ER_NOENT",e[e.ZIP_ER_EXISTS=10]="ZIP_ER_EXISTS",e[e.ZIP_ER_OPEN=11]="ZIP_ER_OPEN",e[e.ZIP_ER_TMPOPEN=12]="ZIP_ER_TMPOPEN",e[e.ZIP_ER_ZLIB=13]="ZIP_ER_ZLIB",e[e.ZIP_ER_MEMORY=14]="ZIP_ER_MEMORY",e[e.ZIP_ER_CHANGED=15]="ZIP_ER_CHANGED",e[e.ZIP_ER_COMPNOTSUPP=16]="ZIP_ER_COMPNOTSUPP",e[e.ZIP_ER_EOF=17]="ZIP_ER_EOF",e[e.ZIP_ER_INVAL=18]="ZIP_ER_INVAL",e[e.ZIP_ER_NOZIP=19]="ZIP_ER_NOZIP",e[e.ZIP_ER_INTERNAL=20]="ZIP_ER_INTERNAL",e[e.ZIP_ER_INCONS=21]="ZIP_ER_INCONS",e[e.ZIP_ER_REMOVE=22]="ZIP_ER_REMOVE",e[e.ZIP_ER_DELETED=23]="ZIP_ER_DELETED",e[e.ZIP_ER_ENCRNOTSUPP=24]="ZIP_ER_ENCRNOTSUPP",e[e.ZIP_ER_RDONLY=25]="ZIP_ER_RDONLY",e[e.ZIP_ER_NOPASSWD=26]="ZIP_ER_NOPASSWD",e[e.ZIP_ER_WRONGPASSWD=27]="ZIP_ER_WRONGPASSWD",e[e.ZIP_ER_OPNOTSUPP=28]="ZIP_ER_OPNOTSUPP",e[e.ZIP_ER_INUSE=29]="ZIP_ER_INUSE",e[e.ZIP_ER_TELL=30]="ZIP_ER_TELL",e[e.ZIP_ER_COMPRESSED_DATA=31]="ZIP_ER_COMPRESSED_DATA"}(n||(n={}));let o=null;function i(){var e;return null===o&&(e=r(3368),o={get HEAP8(){return e.HEAP8},get HEAPU8(){return e.HEAPU8},errors:n,SEEK_SET:0,SEEK_CUR:1,SEEK_END:2,ZIP_CHECKCONS:4,ZIP_CREATE:1,ZIP_EXCL:2,ZIP_TRUNCATE:8,ZIP_RDONLY:16,ZIP_FL_OVERWRITE:8192,ZIP_FL_COMPRESSED:4,ZIP_OPSYS_DOS:0,ZIP_OPSYS_AMIGA:1,ZIP_OPSYS_OPENVMS:2,ZIP_OPSYS_UNIX:3,ZIP_OPSYS_VM_CMS:4,ZIP_OPSYS_ATARI_ST:5,ZIP_OPSYS_OS_2:6,ZIP_OPSYS_MACINTOSH:7,ZIP_OPSYS_Z_SYSTEM:8,ZIP_OPSYS_CPM:9,ZIP_OPSYS_WINDOWS_NTFS:10,ZIP_OPSYS_MVS:11,ZIP_OPSYS_VSE:12,ZIP_OPSYS_ACORN_RISC:13,ZIP_OPSYS_VFAT:14,ZIP_OPSYS_ALTERNATE_MVS:15,ZIP_OPSYS_BEOS:16,ZIP_OPSYS_TANDEM:17,ZIP_OPSYS_OS_400:18,ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:e._malloc(1),uint16S:e._malloc(2),uint32S:e._malloc(4),uint64S:e._malloc(8),malloc:e._malloc,free:e._free,getValue:e.getValue,open:e.cwrap("zip_open","number",["string","number","number"]),openFromSource:e.cwrap("zip_open_from_source","number",["number","number","number"]),close:e.cwrap("zip_close","number",["number"]),discard:e.cwrap("zip_discard",null,["number"]),getError:e.cwrap("zip_get_error","number",["number"]),getName:e.cwrap("zip_get_name","string",["number","number","number"]),getNumEntries:e.cwrap("zip_get_num_entries","number",["number","number"]),delete:e.cwrap("zip_delete","number",["number","number"]),stat:e.cwrap("zip_stat","number",["number","string","number","number"]),statIndex:e.cwrap("zip_stat_index","number",["number",...A,"number","number"]),fopen:e.cwrap("zip_fopen","number",["number","string","number"]),fopenIndex:e.cwrap("zip_fopen_index","number",["number",...A,"number"]),fread:e.cwrap("zip_fread","number",["number","number","number","number"]),fclose:e.cwrap("zip_fclose","number",["number"]),dir:{add:e.cwrap("zip_dir_add","number",["number","string"])},file:{add:e.cwrap("zip_file_add","number",["number","string","number","number"]),getError:e.cwrap("zip_file_get_error","number",["number"]),getExternalAttributes:e.cwrap("zip_file_get_external_attributes","number",["number",...A,"number","number","number"]),setExternalAttributes:e.cwrap("zip_file_set_external_attributes","number",["number",...A,"number","number","number"]),setMtime:e.cwrap("zip_file_set_mtime","number",["number",...A,"number","number"]),setCompression:e.cwrap("zip_set_file_compression","number",["number",...A,"number","number"])},ext:{countSymlinks:e.cwrap("zip_ext_count_symlinks","number",["number"])},error:{initWithCode:e.cwrap("zip_error_init_with_code",null,["number","number"]),strerror:e.cwrap("zip_error_strerror","string",["number"])},name:{locate:e.cwrap("zip_name_locate","number",["number","string","number"])},source:{fromUnattachedBuffer:e.cwrap("zip_source_buffer_create","number",["number","number","number","number"]),fromBuffer:e.cwrap("zip_source_buffer","number",["number","number",...A,"number"]),free:e.cwrap("zip_source_free",null,["number"]),keep:e.cwrap("zip_source_keep",null,["number"]),open:e.cwrap("zip_source_open","number",["number"]),close:e.cwrap("zip_source_close","number",["number"]),seek:e.cwrap("zip_source_seek","number",["number",...A,"number"]),tell:e.cwrap("zip_source_tell","number",["number"]),read:e.cwrap("zip_source_read","number",["number","number","number"]),error:e.cwrap("zip_source_error","number",["number"]),setMtime:e.cwrap("zip_source_set_mtime","number",["number","number"])},struct:{stat:e.cwrap("zipstruct_stat","number",[]),statS:e.cwrap("zipstruct_statS","number",[]),statName:e.cwrap("zipstruct_stat_name","string",["number"]),statIndex:e.cwrap("zipstruct_stat_index","number",["number"]),statSize:e.cwrap("zipstruct_stat_size","number",["number"]),statCompSize:e.cwrap("zipstruct_stat_comp_size","number",["number"]),statCompMethod:e.cwrap("zipstruct_stat_comp_method","number",["number"]),statMtime:e.cwrap("zipstruct_stat_mtime","number",["number"]),error:e.cwrap("zipstruct_error","number",[]),errorS:e.cwrap("zipstruct_errorS","number",[]),errorCodeZip:e.cwrap("zipstruct_error_code_zip","number",["number"])}}),o}async function s(){return i()}},11640:(e,t,r)=>{"use strict";r.r(t),r.d(t,{parseResolution:()=>i,parseShell:()=>n,parseSyml:()=>I,stringifyResolution:()=>s,stringifySyml:()=>d});var A=r(92962);function n(e,t={isGlobPattern:()=>!1}){try{return(0,A.parse)(e,t)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}var o=r(98261);function i(e){const t=e.match(/^\*{1,2}\/(.*)/);if(t)throw new Error(`The override for '${e}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${t[1]}' instead.`);try{return(0,o.parse)(e)}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function s(e){let t="";return e.from&&(t+=e.from.fullName,e.from.description&&(t+="@"+e.from.description),t+="/"),t+=e.descriptor.fullName,e.descriptor.description&&(t+="@"+e.descriptor.description),t}var a=r(21194),c=r(85443);const g=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,l=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"];class u{constructor(e){this.data=e}}function h(e){return e.match(g)?e:JSON.stringify(e)}function p(e,t,r){if(null===e)return"null\n";if("number"==typeof e||"boolean"==typeof e)return e.toString()+"\n";if("string"==typeof e)return h(e)+"\n";if(Array.isArray(e)){if(0===e.length)return"[]\n";const r=" ".repeat(t);return"\n"+e.map(e=>`${r}- ${p(e,t+1,!1)}`).join("")}if("object"==typeof e&&e){let A,n;e instanceof u?(A=e.data,n=!1):(A=e,n=!0);const o=" ".repeat(t),i=Object.keys(A);n&&i.sort((e,t)=>{const r=l.indexOf(e),A=l.indexOf(t);return-1===r&&-1===A?et?1:0:-1!==r&&-1===A?-1:-1===r&&-1!==A?1:r-A});const s=i.filter(e=>!function e(t){return void 0===t||"object"==typeof t&&null!==t&&Object.keys(t).every(r=>e(t[r]))}(A[e])).map((e,n)=>{const i=A[e],s=h(e),a=p(i,t+1,!0),c=n>0||r?o:"";return a.startsWith("\n")?`${c}${s}:${a}`:`${c}${s}: ${a}`}).join(0===t?"\n":"")||"\n";return r?"\n"+s:""+s}throw new Error(`Unsupported value type (${e})`)}function d(e){try{const t=p(e,0,!1);return"\n"!==t?t:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}d.PreserveOrdering=u;const C=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i;function f(e){if(C.test(e))return function(e){return e.endsWith("\n")||(e+="\n"),(0,c.parse)(e)}(e);const t=(0,a.safeLoad)(e,{schema:a.FAILSAFE_SCHEMA});if(null==t)return{};if("object"!=typeof t)throw new Error(`Expected an indexed object, got a ${typeof t} instead. Does your file follow Yaml's rules?`);if(Array.isArray(t))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return t}function I(e){return f(e)}},34432:(e,t,r)=>{"use strict";var A,n;r.d(t,{gY:()=>E,Q$:()=>B,oC:()=>F}),function(e){e.HARD="HARD",e.SOFT="SOFT"}(A||(A={})),function(e){e.DEFAULT="DEFAULT",e.TOP_LEVEL="TOP_LEVEL",e.FALLBACK_EXCLUSION_LIST="FALLBACK_EXCLUSION_LIST",e.FALLBACK_EXCLUSION_ENTRIES="FALLBACK_EXCLUSION_ENTRIES",e.FALLBACK_EXCLUSION_DATA="FALLBACK_EXCLUSION_DATA",e.PACKAGE_REGISTRY_DATA="PACKAGE_REGISTRY_DATA",e.PACKAGE_REGISTRY_ENTRIES="PACKAGE_REGISTRY_ENTRIES",e.PACKAGE_STORE_DATA="PACKAGE_STORE_DATA",e.PACKAGE_STORE_ENTRIES="PACKAGE_STORE_ENTRIES",e.PACKAGE_INFORMATION_DATA="PACKAGE_INFORMATION_DATA",e.PACKAGE_DEPENDENCIES="PACKAGE_DEPENDENCIES",e.PACKAGE_DEPENDENCY="PACKAGE_DEPENDENCY"}(n||(n={}));const o={[n.DEFAULT]:{collapsed:!1,next:{"*":n.DEFAULT}},[n.TOP_LEVEL]:{collapsed:!1,next:{fallbackExclusionList:n.FALLBACK_EXCLUSION_LIST,packageRegistryData:n.PACKAGE_REGISTRY_DATA,"*":n.DEFAULT}},[n.FALLBACK_EXCLUSION_LIST]:{collapsed:!1,next:{"*":n.FALLBACK_EXCLUSION_ENTRIES}},[n.FALLBACK_EXCLUSION_ENTRIES]:{collapsed:!0,next:{"*":n.FALLBACK_EXCLUSION_DATA}},[n.FALLBACK_EXCLUSION_DATA]:{collapsed:!0,next:{"*":n.DEFAULT}},[n.PACKAGE_REGISTRY_DATA]:{collapsed:!1,next:{"*":n.PACKAGE_REGISTRY_ENTRIES}},[n.PACKAGE_REGISTRY_ENTRIES]:{collapsed:!0,next:{"*":n.PACKAGE_STORE_DATA}},[n.PACKAGE_STORE_DATA]:{collapsed:!1,next:{"*":n.PACKAGE_STORE_ENTRIES}},[n.PACKAGE_STORE_ENTRIES]:{collapsed:!0,next:{"*":n.PACKAGE_INFORMATION_DATA}},[n.PACKAGE_INFORMATION_DATA]:{collapsed:!1,next:{packageDependencies:n.PACKAGE_DEPENDENCIES,"*":n.DEFAULT}},[n.PACKAGE_DEPENDENCIES]:{collapsed:!1,next:{"*":n.PACKAGE_DEPENDENCY}},[n.PACKAGE_DEPENDENCY]:{collapsed:!0,next:{"*":n.DEFAULT}}};function i(e,t,r,A){const{next:n}=o[r];return s(t,n[e]||n["*"],A)}function s(e,t,r){const{collapsed:A}=o[t];return Array.isArray(e)?A?function(e,t,r){let A="";A+="[";for(let n=0,o=e.length;ne(t)));const n=r.map((e,t)=>t);return n.sort((e,t)=>{for(const r of A){const A=r[e]r[t]?1:0;if(0!==A)return A}return 0}),n.map(e=>r[e])}function g(e){const t=new Map,r=c(e.fallbackExclusionList||[],[({name:e,reference:t})=>e,({name:e,reference:t})=>t]);for(const{name:e,reference:A}of r){let r=t.get(e);void 0===r&&t.set(e,r=new Set),r.add(A)}return Array.from(t).map(([e,t])=>[e,Array.from(t)])}function l(e){return c(e.fallbackPool||[],([e])=>e)}function u(e){const t=[];for(const[r,A]of c(e.packageRegistry,([e])=>null===e?"0":"1"+e)){const e=[];t.push([r,e]);for(const[t,{packageLocation:n,packageDependencies:o,packagePeers:i,linkType:s,discardFromLookup:a}]of c(A,([e])=>null===e?"0":"1"+e)){const A=[];null===r||null===t||o.has(r)||A.push([r,t]);for(const[e,t]of c(o.entries(),([e])=>e))A.push([e,t]);const g=i&&i.size>0?Array.from(i):void 0,l=a||void 0;e.push([t,{packageLocation:n,packageDependencies:A,packagePeers:g,linkType:s,discardFromLookup:l}])}}return t}function h(e){return c(e.blacklistedLocations||[],e=>e)}function p(e){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost. We also recommend you not to read","it either without using the @yarnpkg/pnp package, as the data layout","is entirely unspecified and WILL change from a version to another."],dependencyTreeRoots:e.dependencyTreeRoots,enableTopLevelFallback:e.enableTopLevelFallback||!1,ignorePatternData:e.ignorePattern||null,fallbackExclusionList:g(e),fallbackPool:l(e),locationBlacklistData:h(e),packageRegistryData:u(e)}}var d=r(20103),C=r.n(d);function f(e,t){return[e?e+"\n":"","/* eslint-disable */\n\n","try {\n"," Object.freeze({}).detectStrictMode = true;\n","} catch (error) {\n"," throw new Error(`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.`);\n","}\n","\n","var __non_webpack_module__ = module;\n","\n","function $$SETUP_STATE(hydrateRuntimeState, basePath) {\n",t.replace(/^/gm," "),"}\n","\n",C()()].join("")}function I(e){return JSON.stringify(e,null,2)}function E(e){const t=function(e){return[`return hydrateRuntimeState(${a(e)}, {basePath: basePath || __dirname});\n`].join("")}(p(e));return f(e.shebang,t)}function B(e){const t=p(e),r=(A=e.dataLocation,["var path = require('path');\n",`var dataLocation = path.resolve(__dirname, ${JSON.stringify(A)});\n`,"return hydrateRuntimeState(require(dataLocation), {basePath: basePath || path.dirname(dataLocation)});\n"].join(""));var A;const n=f(e.shebang,r);return{dataFile:I(t),loaderFile:n}}var y=r(35747),m=(r(85622),r(31669)),w=r(46009);var Q,D=r(17674),b=r(32282);!function(e){e.API_ERROR="API_ERROR",e.BLACKLISTED="BLACKLISTED",e.BUILTIN_NODE_RESOLUTION_FAILED="BUILTIN_NODE_RESOLUTION_FAILED",e.MISSING_DEPENDENCY="MISSING_DEPENDENCY",e.MISSING_PEER_DEPENDENCY="MISSING_PEER_DEPENDENCY",e.QUALIFIED_PATH_RESOLUTION_FAILED="QUALIFIED_PATH_RESOLUTION_FAILED",e.INTERNAL="INTERNAL",e.UNDECLARED_DEPENDENCY="UNDECLARED_DEPENDENCY",e.UNSUPPORTED="UNSUPPORTED"}(Q||(Q={}));const v=new Set([Q.BLACKLISTED,Q.BUILTIN_NODE_RESOLUTION_FAILED,Q.MISSING_DEPENDENCY,Q.MISSING_PEER_DEPENDENCY,Q.QUALIFIED_PATH_RESOLUTION_FAILED,Q.UNDECLARED_DEPENDENCY]);function S(e,t,r={}){const A=v.has(e)?"MODULE_NOT_FOUND":e,n={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(t),{code:{...n,value:A},pnpCode:{...n,value:e},data:{...n,value:r}})}function k(e){return w.cS.normalize(w.cS.fromPortablePath(e))}function N(e,t){const r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,A=Number(process.env.PNP_DEBUG_LEVEL),n=new Set(b.Module.builtinModules||Object.keys(process.binding("natives"))),o=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/,i=/^(\/|\.{1,2}(\/|$))/,s=/\/$/,a={name:null,reference:null},c=[],g=new Set;if(!0===e.enableTopLevelFallback&&c.push(a),!1!==t.compatibilityMode)for(const t of["react-scripts","gatsby"]){const r=e.packageRegistry.get(t);if(r)for(const e of r.keys()){if(null===e)throw new Error("Assertion failed: This reference shouldn't be null");c.push({name:t,reference:e})}}const{ignorePattern:l,packageRegistry:u,packageLocatorsByLocations:h,packageLocationLengths:p}=e;function d(e,t){return{fn:e,args:t,error:null,result:null}}function C(e,r){if(!1===t.allowDebug)return r;if(Number.isFinite(A)){if(A>=2)return(...t)=>{const A=d(e,t);try{return A.result=r(...t)}catch(e){throw A.error=e}finally{console.trace(A)}};if(A>=1)return(...t)=>{try{return r(...t)}catch(r){const A=d(e,t);throw A.error=r,console.trace(A),r}}}return r}function f(e){const t=y(e);if(!t)throw S(Q.INTERNAL,"Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return t}function I(t){if(null===t.name)return!0;for(const r of e.dependencyTreeRoots)if(r.name===t.name&&r.reference===t.reference)return!0;return!1}function E(e,t){return t.endsWith("/")&&(t=w.y1.join(t,"internal.js")),b.Module._resolveFilename(w.cS.fromPortablePath(e),function(e){const t=new b.Module(e,null);return t.filename=e,t.paths=b.Module._nodeModulePaths(e),t}(w.cS.fromPortablePath(t)),!1,{plugnplay:!1})}function B(t){if(null===l)return!1;const r=w.y1.contains(e.basePath,t);return null!==r&&!!l.test(r.replace(/\/$/,""))}function y({name:e,reference:t}){const r=u.get(e);if(!r)return null;const A=r.get(t);return A||null}function m(e,t){const r=new Map,A=new Set,n=t=>{const o=JSON.stringify(t.name);if(A.has(o))return;A.add(o);const i=function({name:e,reference:t}){const r=[];for(const[A,n]of u)if(null!==A)for(const[o,i]of n){if(null===o)continue;i.packageDependencies.get(e)===t&&(A===e&&o===t||r.push({name:A,reference:o}))}return r}(t);for(const t of i){if(f(t).packagePeers.has(e))n(t);else{let e=r.get(t.name);void 0===e&&r.set(t.name,e=new Set),e.add(t.reference)}}};n(t);const o=[];for(const e of[...r.keys()].sort())for(const t of[...r.get(e)].sort())o.push({name:e,reference:t});return o}function v(t){if(B(t))return null;let r=(A=w.y1.relative(e.basePath,t),w.cS.toPortablePath(A));var A;r.match(i)||(r="./"+r),t.match(s)&&!r.endsWith("/")&&(r+="/");let n=0;for(;nr.length;)n+=1;for(let e=n;eI(e))?S(Q.MISSING_PEER_DEPENDENCY,`${s.name} tried to access ${t} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n${e.map(e=>`Ancestor breaking the chain: ${e.name}@${e.reference}\n`).join("")}\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t,brokenAncestors:e}):S(Q.MISSING_PEER_DEPENDENCY,`${s.name} tried to access ${t} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n${e.map(e=>`Ancestor breaking the chain: ${e.name}@${e.reference}\n`).join("")}\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t,brokenAncestors:e})}else void 0===d&&(B=!a&&n.has(A)?I(s)?S(Q.UNDECLARED_DEPENDENCY,`Your application tried to access ${t}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${t} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${u}\n`,{request:l,issuer:u,dependencyName:t}):S(Q.UNDECLARED_DEPENDENCY,`${s.name} tried to access ${t}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${t} isn't otherwise declared in ${s.name}'s dependencies, this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${u}\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t}):I(s)?S(Q.UNDECLARED_DEPENDENCY,`Your application tried to access ${t}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${u}\n`,{request:l,issuer:u,dependencyName:t}):S(Q.UNDECLARED_DEPENDENCY,`${s.name} tried to access ${t}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.\n\nRequired package: ${t} (via "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n`,{request:l,issuer:u,issuerLocator:Object.assign({},s),dependencyName:t}));if(null==d){if(null===C||null===B)throw B||new Error("Assertion failed: Expected an error to have been set");d=C;const e=B.message.replace(/\n.*/g,"");B.message=e,g.has(e)||(g.add(e),process.emitWarning(B))}const y=Array.isArray(d)?{name:d[0],reference:d[1]}:{name:t,reference:d},D=f(y);if(!D.packageLocation)throw S(Q.MISSING_DEPENDENCY,`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.\n\nRequired package: ${y.name}@${y.reference} (via "${l}")\nRequired by: ${s.name}@${s.reference} (via ${u})\n`,{request:l,issuer:u,dependencyLocator:Object.assign({},y)});const b=D.packageLocation;h=o?w.y1.join(b,o):b}else{if(w.y1.isAbsolute(A))h=w.y1.normalize(A);else{if(!i)throw S(Q.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:l,issuer:u});const e=w.y1.resolve(i);h=i.match(s)?w.y1.normalize(w.y1.join(e,A)):w.y1.normalize(w.y1.join(w.y1.dirname(e),A))}v(h)}return w.y1.normalize(h)}function F(e,{extensions:r=Object.keys(b.Module._extensions)}={}){const A=[],n=function e(r,A,{extensions:n}){let o;try{A.push(r),o=t.fakeFs.statSync(r)}catch(e){}if(o&&!o.isDirectory())return t.fakeFs.realpathSync(r);if(o&&o.isDirectory()){let o,i;try{o=JSON.parse(t.fakeFs.readFileSync(w.y1.join(r,"package.json"),"utf8"))}catch(e){}if(o&&o.main&&(i=w.y1.resolve(r,o.main)),i&&i!==r){const t=e(i,A,{extensions:n});if(null!==t)return t}}for(let e=0,o=n.length;e`Rejected candidate: ${k(e)}\n`).join("")}`,{unqualifiedPath:t})}}return{VERSIONS:{std:3,resolveVirtual:1,getAllLocators:1},topLevel:a,getLocator:(e,t)=>Array.isArray(t)?{name:t[0],reference:t[1]}:{name:e,reference:t},getDependencyTreeRoots:()=>[...e.dependencyTreeRoots],getAllLocators(){const e=[];for(const[t,r]of u)for(const A of r.keys())null!==t&&null!==A&&e.push({name:t,reference:A});return e},getPackageInformation:e=>{const t=y(e);if(null===t)return null;const r=w.cS.fromPortablePath(t.packageLocation);return{...t,packageLocation:r}},findPackageLocator:e=>v(w.cS.toPortablePath(e)),resolveToUnqualified:C("resolveToUnqualified",(e,t,r)=>{const A=null!==t?w.cS.toPortablePath(t):null,n=N(w.cS.toPortablePath(e),A,r);return null===n?null:w.cS.fromPortablePath(n)}),resolveUnqualified:C("resolveUnqualified",(e,t)=>w.cS.fromPortablePath(F(w.cS.toPortablePath(e),t))),resolveRequest:C("resolveRequest",(e,t,r)=>{const A=null!==t?w.cS.toPortablePath(t):null,n=function(e,t,{considerBuiltins:r,extensions:A}={}){const n=N(e,t,{considerBuiltins:r});if(null===n)return null;try{return F(n,{extensions:A})}catch(r){throw"QUALIFIED_PATH_RESOLUTION_FAILED"===r.pnpCode&&Object.assign(r.data,{request:k(e),issuer:t&&k(t)}),r}}(w.cS.toPortablePath(e),A,r);return null===n?null:w.cS.fromPortablePath(n)}),resolveVirtual:C("resolveVirtual",e=>{const t=function(e){const t=w.y1.normalize(e),r=D.p.resolveVirtual(t);return r!==t?r:null}(w.cS.toPortablePath(e));return null!==t?w.cS.fromPortablePath(t):null})}}(0,m.promisify)(y.readFile);const F=(e,t,r)=>N(function(e,{basePath:t}){const r=w.cS.toPortablePath(t),A=w.y1.resolve(r),n=null!==e.ignorePatternData?new RegExp(e.ignorePatternData):null,o=new Map(e.packageRegistryData.map(([e,t])=>[e,new Map(t.map(([e,t])=>[e,{packageLocation:w.y1.join(A,t.packageLocation),packageDependencies:new Map(t.packageDependencies),packagePeers:new Set(t.packagePeers),linkType:t.linkType,discardFromLookup:t.discardFromLookup||!1}]))])),i=new Map,s=new Set;for(const[t,r]of e.packageRegistryData)for(const[e,A]of r){if(null===t!=(null===e))throw new Error("Assertion failed: The name and reference should be null, or neither should");if(A.discardFromLookup)continue;const r={name:t,reference:e};i.set(A.packageLocation,r),s.add(A.packageLocation.length)}for(const t of e.locationBlacklistData)i.set(t,null);const a=new Map(e.fallbackExclusionList.map(([e,t])=>[e,new Set(t)])),c=new Map(e.fallbackPool);return{basePath:r,dependencyTreeRoots:e.dependencyTreeRoots,enableTopLevelFallback:e.enableTopLevelFallback,fallbackExclusionList:a,fallbackPool:c,ignorePattern:n,packageLocationLengths:[...s].sort((e,t)=>t-e),packageLocatorsByLocations:i,packageRegistry:o}}(p(e),{basePath:t}),{fakeFs:r,pnpapiResolution:w.cS.join(t,".pnp.js")})},76756:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ShellError:()=>c,execute:()=>Z,globUtils:()=>A});var A={};r.r(A),r.d(A,{fastGlobOptions:()=>E,isBraceExpansion:()=>m,isGlobPattern:()=>B,match:()=>y,micromatchOptions:()=>I});var n=r(46009),o=r(78420),i=r(11640),s=r(12087),a=r(92413);class c extends Error{constructor(e){super(e),this.name="ShellError"}}var g=r(43896),l=r(39725),u=r(19347),h=r.n(u),p=r(35747),d=r.n(p),C=r(2401),f=r.n(C);const I={strictBrackets:!0},E={onlyDirectories:!1,onlyFiles:!1};function B(e){if(!f().scan(e,I).isGlob)return!1;try{f().parse(e,I)}catch(e){return!1}return!0}function y(e,{cwd:t,baseFs:r}){return h()(e,{...E,cwd:n.cS.fromPortablePath(t),fs:(0,g.extendFs)(d(),new l.i(r))})}function m(e){return f().scan(e,I).isBrace}var w,Q=r(67566),D=r.n(Q);function b(){}!function(e){e[e.STDIN=0]="STDIN",e[e.STDOUT=1]="STDOUT",e[e.STDERR=2]="STDERR"}(w||(w={}));let v=0;class S{constructor(e){this.stream=e}close(){}get(){return this.stream}}class k{constructor(){this.stream=null}close(){if(null===this.stream)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(null===this.stream)throw new Error("Assertion failed: No stream attached");return this.stream}}class N{constructor(e,t){this.stdin=null,this.stdout=null,this.stderr=null,this.pipe=null,this.ancestor=e,this.implementation=t}static start(e,{stdin:t,stdout:r,stderr:A}){const n=new N(null,e);return n.stdin=t,n.stdout=r,n.stderr=A,n}pipeTo(e,t=w.STDOUT){const r=new N(this,e),A=new k;return r.pipe=A,r.stdout=this.stdout,r.stderr=this.stderr,(t&w.STDOUT)===w.STDOUT?this.stdout=A:null!==this.ancestor&&(this.stderr=this.ancestor.stdout),(t&w.STDERR)===w.STDERR?this.stderr=A:null!==this.ancestor&&(this.stderr=this.ancestor.stderr),r}async exec(){const e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(null===this.stdin)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let t,r;if(null===this.stdout)throw new Error("Assertion failed: No output stream registered");if(t=this.stdout,e[1]=t.get(),null===this.stderr)throw new Error("Assertion failed: No error stream registered");r=this.stderr,e[2]=r.get();const A=this.implementation(e);return this.pipe&&this.pipe.attach(A.stdin),await A.promise.then(e=>(t.close(),r.close(),e))}async run(){const e=[];for(let t=this;t;t=t.ancestor)e.push(t.exec());return(await Promise.all(e))[0]}}function F(e,t){return N.start(e,t)}var K;function M(e,t,r){const A=new a.PassThrough({autoDestroy:!0});switch(e){case w.STDIN:(t&K.Readable)===K.Readable&&r.stdin.pipe(A,{end:!1}),(t&K.Writable)===K.Writable&&r.stdin instanceof a.Writable&&A.pipe(r.stdin,{end:!1});break;case w.STDOUT:(t&K.Readable)===K.Readable&&r.stdout.pipe(A,{end:!1}),(t&K.Writable)===K.Writable&&A.pipe(r.stdout,{end:!1});break;case w.STDERR:(t&K.Readable)===K.Readable&&r.stderr.pipe(A,{end:!1}),(t&K.Writable)===K.Writable&&A.pipe(r.stderr,{end:!1});break;default:throw new c(`Bad file descriptor: "${e}"`)}return A}function R(e,t={}){const r={...e,...t};return r.environment={...e.environment,...t.environment},r.variables={...e.variables,...t.variables},r}!function(e){e[e.Readable=1]="Readable",e[e.Writable=2]="Writable"}(K||(K={}));const x=new Map([["cd",async([e=(0,s.homedir)(),...t],r,A)=>{const o=n.y1.resolve(A.cwd,n.cS.toPortablePath(e));return(await r.baseFs.statPromise(o)).isDirectory()?(A.cwd=o,0):(A.stderr.write("cd: not a directory\n"),1)}],["pwd",async(e,t,r)=>(r.stdout.write(n.cS.fromPortablePath(r.cwd)+"\n"),0)],[":",async(e,t,r)=>0],["true",async(e,t,r)=>0],["false",async(e,t,r)=>1],["exit",async([e,...t],r,A)=>A.exitCode=parseInt(null!=e?e:A.variables["?"],10)],["echo",async(e,t,r)=>(r.stdout.write(e.join(" ")+"\n"),0)],["__ysh_run_procedure",async(e,t,r)=>{const A=r.procedures[e[0]];return await F(A,{stdin:new S(r.stdin),stdout:new S(r.stdout),stderr:new S(r.stderr)}).run()}],["__ysh_set_redirects",async(e,t,r)=>{let A=r.stdin,o=r.stdout;const i=r.stderr,s=[],c=[];let g=0;for(;"--"!==e[g];){const A=e[g++],o=Number(e[g++]),i=g+o;for(let o=g;ot.baseFs.createReadStream(n.y1.resolve(r.cwd,n.cS.toPortablePath(e[o]))));break;case"<<<":s.push(()=>{const t=new a.PassThrough;return process.nextTick(()=>{t.write(e[o]+"\n"),t.end()}),t});break;case"<&":s.push(()=>M(Number(e[o]),K.Readable,r));break;case">":case">>":{const i=n.y1.resolve(r.cwd,n.cS.toPortablePath(e[o]));"/dev/null"===i?c.push(new a.Writable({autoDestroy:!0,emitClose:!0,write(e,t,r){setImmediate(r)}})):c.push(t.baseFs.createWriteStream(i,">>"===A?{flags:"a"}:void 0))}break;case">&":c.push(M(Number(e[o]),K.Writable,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${A}"`)}}if(s.length>0){const e=new a.PassThrough;A=e;const t=r=>{if(r===s.length)e.end();else{const A=s[r]();A.pipe(e,{end:!1}),A.on("end",()=>{t(r+1)})}};t(0)}if(c.length>0){const e=new a.PassThrough;o=e;for(const t of c)e.pipe(t)}const l=await F(G(e.slice(g+1),t,r),{stdin:new S(A),stdout:new S(o),stderr:new S(i)}).run();return await Promise.all(c.map(e=>new Promise(t=>{e.on("close",()=>{t()}),e.end()}))),l}]]);async function L(e,t,r){const A=[],n=new a.PassThrough;return n.on("data",e=>A.push(e)),await W(e,t,R(r,{stdout:n})),Buffer.concat(A).toString().replace(/[\r\n]+$/,"")}async function P(e,t,r){const A=e.map(async e=>{const A=await Y(e.args,t,r);return{name:e.name,value:A.join(" ")}});return(await Promise.all(A)).reduce((e,t)=>(e[t.name]=t.value,e),{})}function O(e){return e.match(/[^ \r\n\t]+/g)||[]}async function U(e,t,r,A,n=A){switch(e.name){case"$":A(String(process.pid));break;case"#":A(String(t.args.length));break;case"@":if(e.quoted)for(const e of t.args)n(e);else for(const e of t.args){const t=O(e);for(let e=0;e=0&&ne+t,subtraction:(e,t)=>e-t,multiplication:(e,t)=>e*t,division:(e,t)=>Math.trunc(e/t)};async function j(e,t,r){if("number"===e.type){if(Number.isInteger(e.value))return e.value;throw new Error(`Invalid number: "${e.value}", only integers are allowed`)}if("variable"===e.type){const A=[];await U({...e,quoted:!0},t,r,e=>A.push(e));const n=Number(A.join(" "));return Number.isNaN(n)?j({type:"variable",name:A.join(" ")},t,r):j({type:"number",value:n},t,r)}return T[e.type](await j(e.left,t,r),await j(e.right,t,r))}async function Y(e,t,r){const A=new Map,n=[];let o=[];const i=e=>{o.push(e)},s=()=>{o.length>0&&n.push(o.join("")),o=[]},a=e=>{i(e),s()},g=(e,t)=>{let r=A.get(e);void 0===r&&A.set(e,r=[]),r.push(t)};for(const A of e){let e=!1;switch(A.type){case"redirection":{const e=await Y(A.args,t,r);for(const t of e)g(A.subtype,t)}break;case"argument":for(const n of A.segments)switch(n.type){case"text":i(n.text);break;case"glob":i(n.pattern),e=!0;break;case"shell":{const e=await L(n.shell,t,r);if(n.quoted)i(e);else{const t=O(e);for(let e=0;e0){const e=[];for(const[t,r]of A.entries())e.splice(e.length,0,t,String(r.length),...r);n.splice(0,0,"__ysh_set_redirects",...e,"--")}return n}function G(e,t,r){t.builtins.has(e[0])||(e=["command",...e]);const A=n.cS.fromPortablePath(r.cwd);let o=r.environment;void 0!==o.PWD&&(o={...o,PWD:A});const[i,...s]=e;if("command"===i)return function(e,t,r,A){return r=>{const n=r[0]instanceof a.Transform?"pipe":r[0],o=r[1]instanceof a.Transform?"pipe":r[1],i=r[2]instanceof a.Transform?"pipe":r[2],s=D()(e,t,{...A,stdio:[n,o,i]});return 0==v++&&process.on("SIGINT",b),r[0]instanceof a.Transform&&r[0].pipe(s.stdin),r[1]instanceof a.Transform&&s.stdout.pipe(r[1],{end:!1}),r[2]instanceof a.Transform&&s.stderr.pipe(r[2],{end:!1}),{stdin:s.stdin,promise:new Promise(t=>{s.on("error",A=>{switch(0==--v&&process.off("SIGINT",b),A.code){case"ENOENT":r[2].write(`command not found: ${e}\n`),t(127);break;case"EACCES":r[2].write(`permission denied: ${e}\n`),t(128);break;default:r[2].write(`uncaught error: ${A.message}\n`),t(1)}}),s.on("exit",e=>{0==--v&&process.off("SIGINT",b),t(null!==e?e:129)})})}}}(s[0],s.slice(1),0,{cwd:A,env:o});const c=t.builtins.get(i);if(void 0===c)throw new Error(`Assertion failed: A builtin should exist for "${i}"`);return function(e){return t=>{const r="pipe"===t[0]?new a.PassThrough:t[0];return{stdin:r,promise:Promise.resolve().then(()=>e({stdin:r,stdout:t[1],stderr:t[2]}))}}}(async({stdin:e,stdout:A,stderr:n})=>(r.stdin=e,r.stdout=A,r.stderr=n,await c(s,t,r)))}function H(e,t,r){return A=>{const n=new a.PassThrough;return{stdin:n,promise:W(e,t,R(r,{stdin:n}))}}}function J(e,t,r){return A=>({stdin:new a.PassThrough,promise:W(e,t,r)})}function q(e,t,r,A){if(0===t.length)return e;{let n;do{n=String(Math.random())}while(Object.prototype.hasOwnProperty.call(A.procedures,n));return A.procedures={...A.procedures},A.procedures[n]=e,G([...t,"__ysh_run_procedure",n],r,A)}}async function z(e,t,r){let A;const n=e=>{A=e,r.variables["?"]=String(e)},o=async e=>{try{return await async function(e,t,r){let A=e,n=null,o=null;for(;A;){const e=A.then?{...r}:r;let i;switch(A.type){case"command":{const n=await Y(A.args,t,r),o=await P(A.envs,t,r);i=A.envs.length?G(n,t,R(e,{environment:o})):G(n,t,e)}break;case"subshell":{const n=await Y(A.args,t,r);i=q(H(A.subshell,t,e),n,t,e)}break;case"group":{const n=await Y(A.args,t,r);i=q(J(A.group,t,e),n,t,e)}break;case"envs":{const n=await P(A.envs,t,r);e.environment={...e.environment,...n},i=G(["true"],t,e)}}if(void 0===i)throw new Error("Assertion failed: An action should have been generated");if(null===n)o=F(i,{stdin:new S(e.stdin),stdout:new S(e.stdout),stderr:new S(e.stderr)});else{if(null===o)throw new Error("Assertion failed: The execution pipeline should have been setup");switch(n){case"|":o=o.pipeTo(i,w.STDOUT);break;case"|&":o=o.pipeTo(i,w.STDOUT|w.STDERR)}}A.then?(n=A.then.type,A=A.then.chain):A=null}if(null===o)throw new Error("Assertion failed: The execution pipeline should have been setup");return await o.run()}(e,t,r)}catch(e){if(!(e instanceof c))throw e;return r.stderr.write(e.message+"\n"),1}};for(n(await o(e.chain));e.then;){if(null!==r.exitCode)return r.exitCode;switch(e.then.type){case"&&":0===A&&n(await o(e.then.line.chain));break;case"||":0!==A&&n(await o(e.then.line.chain));break;default:throw new Error(`Assertion failed: Unsupported command type: "${e.then.type}"`)}e=e.then.line}return A}async function W(e,t,r){let A=0;for(const n of e){if(A=await z(n,t,r),null!==r.exitCode)return r.exitCode;r.variables["?"]=String(A)}return A}function X(e){switch(e.type){case"variable":return"@"===e.name||"#"===e.name||"*"===e.name||Number.isFinite(parseInt(e.name,10))||"defaultValue"in e&&!!e.defaultValue&&e.defaultValue.some(e=>V(e));case"arithmetic":return function e(t){switch(t.type){case"variable":return X(t);case"number":return!1;default:return e(t.left)||e(t.right)}}(e.arithmetic);case"shell":return _(e.shell);default:return!1}}function V(e){switch(e.type){case"redirection":return e.args.some(e=>V(e));case"argument":return e.segments.some(e=>X(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${e.type}"`)}}function _(e){return e.some(e=>{for(;e;){let t=e.chain;for(;t;){let e;switch(t.type){case"subshell":e=_(t.subshell);break;case"command":e=t.envs.some(e=>e.args.some(e=>V(e)))||t.args.some(e=>V(e))}if(e)return!0;if(!t.then)break;t=t.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function Z(e,t=[],{baseFs:r=new o.S,builtins:s={},cwd:c=n.cS.toPortablePath(process.cwd()),env:g=process.env,stdin:l=process.stdin,stdout:u=process.stdout,stderr:h=process.stderr,variables:p={},glob:d=A}={}){const C={};for(const[e,t]of Object.entries(g))void 0!==t&&(C[e]=t);const f=new Map(x);for(const[e,t]of Object.entries(s))f.set(e,t);null===l&&(l=new a.PassThrough).end();const I=(0,i.parseShell)(e,d);if(!_(I)&&I.length>0&&t.length>0){let e=I[I.length-1];for(;e.then;)e=e.then.line;let r=e.chain;for(;r.then;)r=r.then.chain;"command"===r.type&&(r.args=r.args.concat(t.map(e=>({type:"argument",segments:[{type:"text",text:e}]}))))}return await W(I,{args:t,baseFs:r,builtins:f,initialStdin:l,initialStdout:u,initialStderr:h,glob:d},{cwd:c,environment:C,exitCode:null,procedures:{},stdin:l,stdout:u,stderr:h,variables:Object.assign({},p,{"?":0})})}},45330:(e,t,r)=>{t.e=()=>({modules:new Map([["@yarnpkg/cli",r(25413)],["@yarnpkg/core",r(53836)],["@yarnpkg/fslib",r(43896)],["@yarnpkg/libzip",r(65281)],["@yarnpkg/parsers",r(11640)],["@yarnpkg/shell",r(76756)],["clipanion",r(40822)],["semver",r(53887)],["yup",r(15966)],["@yarnpkg/plugin-essentials",r(34777)],["@yarnpkg/plugin-compat",r(44692)],["@yarnpkg/plugin-dlx",r(10189)],["@yarnpkg/plugin-file",r(68023)],["@yarnpkg/plugin-git",r(75641)],["@yarnpkg/plugin-github",r(68126)],["@yarnpkg/plugin-http",r(99148)],["@yarnpkg/plugin-init",r(64314)],["@yarnpkg/plugin-link",r(92994)],["@yarnpkg/plugin-node-modules",r(8375)],["@yarnpkg/plugin-npm",r(14224)],["@yarnpkg/plugin-npm-cli",r(8190)],["@yarnpkg/plugin-pack",r(49881)],["@yarnpkg/plugin-patch",r(29936)],["@yarnpkg/plugin-pnp",r(83228)]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-dlx","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-link","@yarnpkg/plugin-node-modules","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp"])})},29148:(e,t,r)=>{const A=r(74988),n=/^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/,o=new A;e.exports=(e,t=0,r=e.length)=>{if(t<0||r<0)throw new RangeError("Negative indices aren't supported by this implementation");const A=r-t;let i="",s=0,a=0;for(;e.length>0;){const r=e.match(n)||[e,e,void 0];let c=o.splitGraphemes(r[1]);const g=Math.min(t-s,c.length);c=c.slice(g);const l=Math.min(A-a,c.length);i+=c.slice(0,l).join(""),s+=g,a+=l,void 0!==r[2]&&(i+=r[2]),e=e.slice(r[0].length)}return i}},72912:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t{e.exports=function(e){return e&&e.__esModule?e:{default:e}}},19228:(e,t,r)=>{var A=r(54694);function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==A(e)&&"function"!=typeof e)return{default:e};var t=n();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}},74943:e=>{e.exports=function(e,t){if(null==e)return{};var r,A,n={},o=Object.keys(e);for(A=0;A=0||(n[r]=e[r]);return n}},62407:e=>{e.exports=function(e,t){return t||(t=e.slice(0)),e.raw=t,e}},54694:e=>{function t(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}e.exports=t},96117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(35747);t.FILE_SYSTEM_ADAPTER={lstat:A.lstat,stat:A.stat,lstatSync:A.lstatSync,statSync:A.statSync,readdir:A.readdir,readdirSync:A.readdirSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}},79774:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=process.versions.node.split("."),A=parseInt(r[0],10),n=parseInt(r[1],10),o=A>10,i=10===A&&n>=10;t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=o||i},85670:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(31020),n=r(35516),o=r(38844);function i(e={}){return e instanceof o.default?e:new o.default(e)}t.Settings=o.default,t.scandir=function(e,t,r){if("function"==typeof t)return A.read(e,i(),t);A.read(e,i(t),r)},t.scandirSync=function(e,t){const r=i(t);return n.read(e,r)}},31020:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(53403),n=r(69078),o=r(79774),i=r(65225);function s(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(A,o)=>{if(null!==A)return c(r,A);const s=o.map(r=>({dirent:r,name:r.name,path:`${e}${t.pathSegmentSeparator}${r.name}`}));if(!t.followSymbolicLinks)return g(r,s);const a=s.map(e=>function(e,t){return r=>{if(!e.dirent.isSymbolicLink())return r(null,e);t.fs.stat(e.path,(A,n)=>null!==A?t.throwErrorOnBrokenSymbolicLink?r(A):r(null,e):(e.dirent=i.fs.createDirentFromStats(e.name,n),r(null,e)))}}(e,t));n(a,(e,t)=>{if(null!==e)return c(r,e);g(r,t)})})}function a(e,t,r){t.fs.readdir(e,(o,s)=>{if(null!==o)return c(r,o);const a=s.map(r=>`${e}${t.pathSegmentSeparator}${r}`),l=a.map(e=>r=>A.stat(e,t.fsStatSettings,r));n(l,(e,A)=>{if(null!==e)return c(r,e);const n=[];s.forEach((e,r)=>{const o=A[r],s={name:e,path:a[r],dirent:i.fs.createDirentFromStats(e,o)};t.stats&&(s.stats=o),n.push(s)}),g(r,n)})})}function c(e,t){e(t)}function g(e,t){e(null,t)}t.read=function(e,t,r){return!t.stats&&o.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,r):a(e,t,r)},t.readdirWithFileTypes=s,t.readdir=a},35516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(53403),n=r(79774),o=r(65225);function i(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(r=>{const A={dirent:r,name:r.name,path:`${e}${t.pathSegmentSeparator}${r.name}`};if(A.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{const e=t.fs.statSync(A.path);A.dirent=o.fs.createDirentFromStats(A.name,e)}catch(e){if(t.throwErrorOnBrokenSymbolicLink)throw e}return A})}function s(e,t){return t.fs.readdirSync(e).map(r=>{const n=`${e}${t.pathSegmentSeparator}${r}`,i=A.statSync(n,t.fsStatSettings),s={name:r,path:n,dirent:o.fs.createDirentFromStats(r,i)};return t.stats&&(s.stats=i),s})}t.read=function(e,t){return!t.stats&&n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?i(e,t):s(e,t)},t.readdirWithFileTypes=i,t.readdir=s},38844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=r(53403),o=r(96117);t.default=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=o.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,A.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new n.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return void 0===e?t:e}}},72156:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}t.createDirentFromStats=function(e,t){return new r(e,t)}},65225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(72156);t.fs=A},71208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(35747);t.FILE_SYSTEM_ADAPTER={lstat:A.lstat,stat:A.stat,lstatSync:A.lstatSync,statSync:A.statSync},t.createFileSystemAdapter=function(e){return void 0===e?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),e)}},53403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(17790),n=r(34846),o=r(92687);function i(e={}){return e instanceof o.default?e:new o.default(e)}t.Settings=o.default,t.stat=function(e,t,r){if("function"==typeof t)return A.read(e,i(),t);A.read(e,i(t),r)},t.statSync=function(e,t){const r=i(t);return n.read(e,r)}},17790:(e,t)=>{"use strict";function r(e,t){e(t)}function A(e,t){e(null,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.read=function(e,t,n){t.fs.lstat(e,(o,i)=>null!==o?r(n,o):i.isSymbolicLink()&&t.followSymbolicLink?void t.fs.stat(e,(e,o)=>{if(null!==e)return t.throwErrorOnBrokenSymbolicLink?r(n,e):A(n,i);t.markSymbolicLink&&(o.isSymbolicLink=()=>!0),A(n,o)}):A(n,i))}},34846:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.read=function(e,t){const r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{const r=t.fs.statSync(e);return t.markSymbolicLink&&(r.isSymbolicLink=()=>!0),r}catch(e){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw e}}},92687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(71208);t.default=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=A.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,t){return void 0===e?t:e}}},72897:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(42369),n=r(27696),o=r(22111),i=r(14954);function s(e={}){return e instanceof i.default?e:new i.default(e)}t.Settings=i.default,t.walk=function(e,t,r){if("function"==typeof t)return new A.default(e,s()).read(t);new A.default(e,s(t)).read(r)},t.walkSync=function(e,t){const r=s(t);return new o.default(e,r).read()},t.walkStream=function(e,t){const r=s(t);return new n.default(e,r).read()}},42369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(98566);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new A.default(this._root,this._settings),this._storage=new Set}read(e){this._reader.onError(t=>{!function(e,t){e(t)}(e,t)}),this._reader.onEntry(e=>{this._storage.add(e)}),this._reader.onEnd(()=>{!function(e,t){e(null,t)}(e,[...this._storage])}),this._reader.read()}}},27696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(92413),n=r(98566);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new n.default(this._root,this._settings),this._stream=new A.Readable({objectMode:!0,read:()=>{},destroy:this._reader.destroy.bind(this._reader)})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}}},22111:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(97835);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._reader=new A.default(this._root,this._settings)}read(){return this._reader.read()}}},98566:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(28614),n=r(85670),o=r(98360),i=r(10750),s=r(75504);class a extends s.default{constructor(e,t){super(e,t),this._settings=t,this._scandir=n.scandir,this._emitter=new A.EventEmitter,this._queue=o(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,t){const r={directory:e,base:t};this._queue.push(r,e=>{null!==e&&this._handleError(e)})}_worker(e,t){this._scandir(e.directory,this._settings.fsScandirSettings,(r,A)=>{if(null!==r)return t(r,void 0);for(const t of A)this._handleEntry(t,e.base);t(null,void 0)})}_handleError(e){i.isFatalError(this._settings,e)&&(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,t){if(this._isDestroyed||this._isFatalError)return;const r=e.path;void 0!==t&&(e.path=i.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),i.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}t.default=a},10750:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},t.isAppliedFilter=function(e,t){return null===e||e(t)},t.replacePathSegmentSeparator=function(e,t){return e.split(/[\\/]/).join(t)},t.joinPathSegments=function(e,t,r){return""===e?t:e+r+t}},75504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(10750);t.default=class{constructor(e,t){this._root=e,this._settings=t,this._root=A.replacePathSegmentSeparator(e,t.pathSegmentSeparator)}}},97835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85670),n=r(10750),o=r(75504);class i extends o.default{constructor(){super(...arguments),this._scandir=A.scandirSync,this._storage=new Set,this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),[...this._storage]}_pushToQueue(e,t){this._queue.add({directory:e,base:t})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,t){try{const r=this._scandir(e,this._settings.fsScandirSettings);for(const e of r)this._handleEntry(e,t)}catch(e){this._handleError(e)}}_handleError(e){if(n.isFatalError(this._settings,e))throw e}_handleEntry(e,t){const r=e.path;void 0!==t&&(e.path=n.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(r,e.path)}_pushToStorage(e){this._storage.add(e)}}t.default=i},14954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=r(85670);t.default=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,1/0),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,A.sep),this.fsScandirSettings=new n.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,t){return void 0===e?t:e}}},7966:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];const A=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement",...r];const n=["null","undefined","string","number","bigint","boolean","symbol"];function o(e){return t=>typeof t===e}const{toString:i}=Object.prototype,s=e=>{const t=i.call(e).slice(8,-1);return/HTML\w+Element/.test(t)&&c.domElement(e)?"HTMLElement":(r=t,A.includes(r)?t:void 0);var r},a=e=>t=>s(t)===e;function c(e){if(null===e)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(c.observable(e))return"Observable";if(c.array(e))return"Array";if(c.buffer(e))return"Buffer";const t=s(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}c.undefined=o("undefined"),c.string=o("string");const g=o("number");c.number=e=>g(e)&&!c.nan(e),c.bigint=o("bigint"),c.function_=o("function"),c.null_=e=>null===e,c.class_=e=>c.function_(e)&&e.toString().startsWith("class "),c.boolean=e=>!0===e||!1===e,c.symbol=o("symbol"),c.numericString=e=>c.string(e)&&!c.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)),c.array=(e,t)=>!!Array.isArray(e)&&(!c.function_(t)||e.every(t)),c.buffer=e=>{var t,r,A,n;return null!==(n=null===(A=null===(r=null===(t=e)||void 0===t?void 0:t.constructor)||void 0===r?void 0:r.isBuffer)||void 0===A?void 0:A.call(r,e))&&void 0!==n&&n},c.nullOrUndefined=e=>c.null_(e)||c.undefined(e),c.object=e=>!c.null_(e)&&("object"==typeof e||c.function_(e)),c.iterable=e=>{var t;return c.function_(null===(t=e)||void 0===t?void 0:t[Symbol.iterator])},c.asyncIterable=e=>{var t;return c.function_(null===(t=e)||void 0===t?void 0:t[Symbol.asyncIterator])},c.generator=e=>c.iterable(e)&&c.function_(e.next)&&c.function_(e.throw),c.asyncGenerator=e=>c.asyncIterable(e)&&c.function_(e.next)&&c.function_(e.throw),c.nativePromise=e=>a("Promise")(e);c.promise=e=>c.nativePromise(e)||(e=>{var t,r;return c.function_(null===(t=e)||void 0===t?void 0:t.then)&&c.function_(null===(r=e)||void 0===r?void 0:r.catch)})(e),c.generatorFunction=a("GeneratorFunction"),c.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===s(e),c.asyncFunction=e=>"AsyncFunction"===s(e),c.boundFunction=e=>c.function_(e)&&!e.hasOwnProperty("prototype"),c.regExp=a("RegExp"),c.date=a("Date"),c.error=a("Error"),c.map=e=>a("Map")(e),c.set=e=>a("Set")(e),c.weakMap=e=>a("WeakMap")(e),c.weakSet=e=>a("WeakSet")(e),c.int8Array=a("Int8Array"),c.uint8Array=a("Uint8Array"),c.uint8ClampedArray=a("Uint8ClampedArray"),c.int16Array=a("Int16Array"),c.uint16Array=a("Uint16Array"),c.int32Array=a("Int32Array"),c.uint32Array=a("Uint32Array"),c.float32Array=a("Float32Array"),c.float64Array=a("Float64Array"),c.bigInt64Array=a("BigInt64Array"),c.bigUint64Array=a("BigUint64Array"),c.arrayBuffer=a("ArrayBuffer"),c.sharedArrayBuffer=a("SharedArrayBuffer"),c.dataView=a("DataView"),c.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype,c.urlInstance=e=>a("URL")(e),c.urlString=e=>{if(!c.string(e))return!1;try{return new URL(e),!0}catch(e){return!1}},c.truthy=e=>Boolean(e),c.falsy=e=>!e,c.nan=e=>Number.isNaN(e),c.primitive=e=>{return c.null_(e)||(t=typeof e,n.includes(t));var t},c.integer=e=>Number.isInteger(e),c.safeInteger=e=>Number.isSafeInteger(e),c.plainObject=e=>{if("[object Object]"!==i.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})},c.typedArray=e=>{return t=s(e),r.includes(t);var t};c.arrayLike=e=>!c.nullOrUndefined(e)&&!c.function_(e)&&(e=>c.safeInteger(e)&&e>=0)(e.length),c.inRange=(e,t)=>{if(c.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(c.array(t)&&2===t.length)return e>=Math.min(...t)&&e<=Math.max(...t);throw new TypeError("Invalid range: "+JSON.stringify(t))};const l=["innerHTML","ownerDocument","style","attributes","nodeValue"];c.domElement=e=>c.object(e)&&1===e.nodeType&&c.string(e.nodeName)&&!c.plainObject(e)&&l.every(t=>t in e),c.observable=e=>{var t,r,A,n;return!!e&&(e===(null===(r=(t=e)[Symbol.observable])||void 0===r?void 0:r.call(t))||e===(null===(n=(A=e)["@@observable"])||void 0===n?void 0:n.call(A)))},c.nodeStream=e=>c.object(e)&&c.function_(e.pipe)&&!c.observable(e),c.infinite=e=>e===1/0||e===-1/0;const u=e=>t=>c.integer(t)&&Math.abs(t%2)===e;c.evenInteger=u(0),c.oddInteger=u(1),c.emptyArray=e=>c.array(e)&&0===e.length,c.nonEmptyArray=e=>c.array(e)&&e.length>0,c.emptyString=e=>c.string(e)&&0===e.length,c.nonEmptyString=e=>c.string(e)&&e.length>0;c.emptyStringOrWhitespace=e=>c.emptyString(e)||(e=>c.string(e)&&!/\S/.test(e))(e),c.emptyObject=e=>c.object(e)&&!c.map(e)&&!c.set(e)&&0===Object.keys(e).length,c.nonEmptyObject=e=>c.object(e)&&!c.map(e)&&!c.set(e)&&Object.keys(e).length>0,c.emptySet=e=>c.set(e)&&0===e.size,c.nonEmptySet=e=>c.set(e)&&e.size>0,c.emptyMap=e=>c.map(e)&&0===e.size,c.nonEmptyMap=e=>c.map(e)&&e.size>0;const h=(e,t,r)=>{if(!c.function_(t))throw new TypeError("Invalid predicate: "+JSON.stringify(t));if(0===r.length)throw new TypeError("Invalid number of values");return e.call(r,t)};c.any=(e,...t)=>(c.array(e)?e:[e]).some(e=>h(Array.prototype.some,e,t)),c.all=(e,...t)=>h(Array.prototype.every,e,t);const p=(e,t,r)=>{if(!e)throw new TypeError(`Expected value which is \`${t}\`, received value of type \`${c(r)}\`.`)};t.assert={undefined:e=>p(c.undefined(e),"undefined",e),string:e=>p(c.string(e),"string",e),number:e=>p(c.number(e),"number",e),bigint:e=>p(c.bigint(e),"bigint",e),function_:e=>p(c.function_(e),"Function",e),null_:e=>p(c.null_(e),"null",e),class_:e=>p(c.class_(e),"Class",e),boolean:e=>p(c.boolean(e),"boolean",e),symbol:e=>p(c.symbol(e),"symbol",e),numericString:e=>p(c.numericString(e),"string with a number",e),array:(e,t)=>{p(c.array(e),"Array",e),t&&e.forEach(t)},buffer:e=>p(c.buffer(e),"Buffer",e),nullOrUndefined:e=>p(c.nullOrUndefined(e),"null or undefined",e),object:e=>p(c.object(e),"Object",e),iterable:e=>p(c.iterable(e),"Iterable",e),asyncIterable:e=>p(c.asyncIterable(e),"AsyncIterable",e),generator:e=>p(c.generator(e),"Generator",e),asyncGenerator:e=>p(c.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>p(c.nativePromise(e),"native Promise",e),promise:e=>p(c.promise(e),"Promise",e),generatorFunction:e=>p(c.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>p(c.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>p(c.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>p(c.boundFunction(e),"Function",e),regExp:e=>p(c.regExp(e),"RegExp",e),date:e=>p(c.date(e),"Date",e),error:e=>p(c.error(e),"Error",e),map:e=>p(c.map(e),"Map",e),set:e=>p(c.set(e),"Set",e),weakMap:e=>p(c.weakMap(e),"WeakMap",e),weakSet:e=>p(c.weakSet(e),"WeakSet",e),int8Array:e=>p(c.int8Array(e),"Int8Array",e),uint8Array:e=>p(c.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>p(c.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>p(c.int16Array(e),"Int16Array",e),uint16Array:e=>p(c.uint16Array(e),"Uint16Array",e),int32Array:e=>p(c.int32Array(e),"Int32Array",e),uint32Array:e=>p(c.uint32Array(e),"Uint32Array",e),float32Array:e=>p(c.float32Array(e),"Float32Array",e),float64Array:e=>p(c.float64Array(e),"Float64Array",e),bigInt64Array:e=>p(c.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>p(c.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>p(c.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>p(c.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>p(c.dataView(e),"DataView",e),urlInstance:e=>p(c.urlInstance(e),"URL",e),urlString:e=>p(c.urlString(e),"string with a URL",e),truthy:e=>p(c.truthy(e),"truthy",e),falsy:e=>p(c.falsy(e),"falsy",e),nan:e=>p(c.nan(e),"NaN",e),primitive:e=>p(c.primitive(e),"primitive",e),integer:e=>p(c.integer(e),"integer",e),safeInteger:e=>p(c.safeInteger(e),"integer",e),plainObject:e=>p(c.plainObject(e),"plain object",e),typedArray:e=>p(c.typedArray(e),"TypedArray",e),arrayLike:e=>p(c.arrayLike(e),"array-like",e),domElement:e=>p(c.domElement(e),"HTMLElement",e),observable:e=>p(c.observable(e),"Observable",e),nodeStream:e=>p(c.nodeStream(e),"Node.js Stream",e),infinite:e=>p(c.infinite(e),"infinite number",e),emptyArray:e=>p(c.emptyArray(e),"empty array",e),nonEmptyArray:e=>p(c.nonEmptyArray(e),"non-empty array",e),emptyString:e=>p(c.emptyString(e),"empty string",e),nonEmptyString:e=>p(c.nonEmptyString(e),"non-empty string",e),emptyStringOrWhitespace:e=>p(c.emptyStringOrWhitespace(e),"empty string or whitespace",e),emptyObject:e=>p(c.emptyObject(e),"empty object",e),nonEmptyObject:e=>p(c.nonEmptyObject(e),"non-empty object",e),emptySet:e=>p(c.emptySet(e),"empty set",e),nonEmptySet:e=>p(c.nonEmptySet(e),"non-empty set",e),emptyMap:e=>p(c.emptyMap(e),"empty map",e),nonEmptyMap:e=>p(c.nonEmptyMap(e),"non-empty map",e),evenInteger:e=>p(c.evenInteger(e),"even integer",e),oddInteger:e=>p(c.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>p(c.directInstanceOf(e,t),"T",e),inRange:(e,t)=>p(c.inRange(e,t),"in range",e),any:(e,...t)=>p(c.any(e,...t),"predicate returns truthy for any value",t),all:(e,...t)=>p(c.all(e,...t),"predicate returns truthy for all values",t)},Object.defineProperties(c,{class:{value:c.class_},function:{value:c.function_},null:{value:c.null_}}),Object.defineProperties(t.assert,{class:{value:t.assert.class_},function:{value:t.assert.function_},null:{value:t.assert.null_}}),t.default=c,e.exports=c,e.exports.default=c,e.exports.assert=t.assert},98298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(93121),n=Number(process.versions.node.split(".")[0]),o=e=>{const t={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};e.timings=t;const r=e=>{const r=e.emit.bind(e);e.emit=(A,...n)=>("error"===A&&(t.error=Date.now(),t.phases.total=t.error-t.start,e.emit=r),r(A,...n))};r(e),e.prependOnceListener("abort",()=>{t.abort=Date.now(),(!t.response||n>=13)&&(t.phases.total=Date.now()-t.start)});const o=e=>{t.socket=Date.now(),t.phases.wait=t.socket-t.start;const r=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",r),A.default(e,{connect:()=>{t.connect=Date.now(),void 0===t.lookup&&(e.removeListener("lookup",r),t.lookup=t.connect,t.phases.dns=t.lookup-t.socket),t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now(),t.phases.tls=t.secureConnect-t.connect}})};e.socket?o(e.socket):e.prependOnceListener("socket",o);const i=()=>{var e;t.upload=Date.now(),t.phases.request=t.upload-(null!=(e=t.secureConnect)?e:t.connect)};return("boolean"==typeof e.writableFinished?!e.writableFinished:!e.finished||0!==e.outputSize||e.socket&&0!==e.socket.writableLength)?e.prependOnceListener("finish",i):i(),e.prependOnceListener("response",e=>{t.response=Date.now(),t.phases.firstByte=t.response-t.upload,e.timings=t,r(e),e.prependOnceListener("end",()=>{t.end=Date.now(),t.phases.download=t.end-t.response,t.phases.total=t.end-t.start})}),t};t.default=o,e.exports=o,e.exports.default=o},58069:(e,t,r)=>{"use strict";l.ifExists=function(e,t,r){return l(e,t,r).catch(()=>{})};const A=r(31669),n=r(46227),o=r(85622),i=r(97369),s=/^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/,a={createPwshFile:!0,createCmdFile:i(),fs:r(35747)},c=new Map([[".js","node"],[".cmd","cmd"],[".bat","cmd"],[".ps1","pwsh"],[".sh","sh"]]);function g(e){const t={...a,...e},r=t.fs;return t.fs_={chmod:r.chmod?A.promisify(r.chmod):async()=>{},stat:A.promisify(r.stat),unlink:A.promisify(r.unlink),readFile:A.promisify(r.readFile),writeFile:A.promisify(r.writeFile)},t}async function l(e,t,r){const A=g(r);await A.fs_.stat(e),await async function(e,t,r){const A=await async function(e,t){const r=await t.fs_.readFile(e,"utf8"),A=r.trim().split(/\r*\n/)[0].match(s);if(!A){const t=o.extname(e).toLowerCase();return{program:c.get(t)||null,additionalArgs:""}}return{program:A[1],additionalArgs:A[2]}}(e,r);return await function(e,t){return n(o.dirname(e),{fs:t.fs})}(t,r),function(e,t,r,A){const n=g(A),o=[{generator:h,extension:""}];n.createCmdFile&&o.push({generator:u,extension:".cmd"});n.createPwshFile&&o.push({generator:p,extension:".ps1"});return Promise.all(o.map(A=>async function(e,t,r,A,n){const o=n.preserveSymlinks?"--preserve-symlinks":"",i=[r.additionalArgs,o].filter(e=>e).join(" ");return n=Object.assign({},n,{prog:r.program,args:i}),await function(e,t){return function(e,t){return t.fs_.unlink(e).catch(()=>{})}(e,t)}(t,n),await n.fs_.writeFile(t,A(e,t,n),"utf8"),function(e,t){return function(e,t){return t.fs_.chmod(e,493)}(e,t)}(t,n)}(e,t+A.extension,r,A.generator,n)))}(e,t,A,r)}(e,t,A)}function u(e,t,r){let A=o.relative(o.dirname(t),e).split("/").join("\\");const n=o.isAbsolute(A)?`"${A}"`:`"%~dp0\\${A}"`;let i,s=r.prog,a=r.args||"";const c=d(r.nodePath).win32;s?(i=`"%~dp0\\${s}.exe"`,A=n):(s=n,a="",A="");let g=r.progArgs?r.progArgs.join(" ")+" ":"",l=c?`@SET NODE_PATH=${c}\r\n`:"";return l+=i?`@IF EXIST ${i} (\r\n ${i} ${a} ${A} ${g}%*\r\n) ELSE (\r\n @SETLOCAL\r\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n ${s} ${a} ${A} ${g}%*\r\n)`:`@${s} ${a} ${A} ${g}%*\r\n`,l}function h(e,t,r){let A,n=o.relative(o.dirname(t),e),i=r.prog&&r.prog.split("\\").join("/");n=n.split("\\").join("/");const s=o.isAbsolute(n)?`"${n}"`:`"$basedir/${n}"`;let a=r.args||"";const c=d(r.nodePath).posix;i?(A=`"$basedir/${r.prog}"`,n=s):(i=s,a="",n="");let g=r.progArgs?r.progArgs.join(" ")+" ":"",l="#!/bin/sh\n";l+='basedir=$(dirname "$(echo "$0" | sed -e \'s,\\\\,/,g\')")\n\ncase `uname` in\n *CYGWIN*) basedir=`cygpath -w "$basedir"`;;\nesac\n\n';const u=r.nodePath?`export NODE_PATH="${c}"\n`:"";return l+=A?u+`if [ -x ${A} ]; then\n`+` exec ${A} ${a} ${n} ${g}"$@"\nelse \n`+` exec ${i} ${a} ${n} ${g}"$@"\nfi\n`:`${u}${i} ${a} ${n} ${g}"$@"\nexit $?\n`,l}function p(e,t,r){let A=o.relative(o.dirname(t),e);const n=r.prog&&r.prog.split("\\").join("/");let i,s=n&&`"${n}$exe"`;A=A.split("\\").join("/");const a=o.isAbsolute(A)?`"${A}"`:`"$basedir/${A}"`;let c=r.args||"",g=d(r.nodePath);const l=g.win32,u=g.posix;s?(i=`"$basedir/${r.prog}$exe"`,A=a):(s=a,c="",A="");let h=r.progArgs?r.progArgs.join(" ")+" ":"",p='#!/usr/bin/env pwsh\n$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent\n\n$exe=""\n'+(r.nodePath?`$env_node_path=$env:NODE_PATH\n$env:NODE_PATH="${l}"\n`:"")+'if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {\n # Fix case when both the Windows and Linux builds of Node\n # are installed in the same directory\n $exe=".exe"\n}';return r.nodePath&&(p=p+" else {\n"+` $env:NODE_PATH="${u}"\n}`),p+="\n",p=i?p+"$ret=0\n"+`if (Test-Path ${i}) {\n # Support pipeline input\n if ($MyInvocation.ExpectingInput) {\n`+` $input | & ${i} ${c} ${A} ${h}$args\n } else {\n`+` & ${i} ${c} ${A} ${h}$args\n }\n $ret=$LASTEXITCODE\n} else {\n # Support pipeline input\n if ($MyInvocation.ExpectingInput) {\n`+` $input | & ${s} ${c} ${A} ${h}$args\n } else {\n`+` & ${s} ${c} ${A} ${h}$args\n }\n $ret=$LASTEXITCODE\n}\n`+(r.nodePath?"$env:NODE_PATH=$env_node_path\n":"")+"exit $ret\n":p+"# Support pipeline input\nif ($MyInvocation.ExpectingInput) {\n"+` $input | & ${s} ${c} ${A} ${h}$args\n} else {\n`+` & ${s} ${c} ${A} ${h}$args\n}\n`+(r.nodePath?"$env:NODE_PATH=$env_node_path\n":"")+"exit $LASTEXITCODE\n",p}function d(e){if(!e)return{win32:"",posix:""};let t="string"==typeof e?e.split(o.delimiter):Array.from(e),r={};for(let e=0;e"/mnt/"+t.toLowerCase()):t[e];r.win32=r.win32?`${r.win32};${A}`:A,r.posix=r.posix?`${r.posix}:${n}`:n,r[e]={win32:A,posix:n}}return r}e.exports=l},97991:(e,t,r)=>{"use strict";const A=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,n=()=>{const e={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(e.enabled="0"!==process.env.FORCE_COLOR);const t=(e,t,r)=>"function"==typeof e?e(t):e.wrap(t,r),n=(r,A)=>{if(""===r||null==r)return"";if(!1===e.enabled)return r;if(!1===e.visible)return"";let n=""+r,o=n.includes("\n"),i=A.length;for(i>0&&A.includes("unstyle")&&(A=[...new Set(["unstyle",...A])].reverse());i-- >0;)n=t(e.styles[A[i]],n,o);return n},o=(t,r,A)=>{e.styles[t]=(e=>{let t=e.open=`[${e.codes[0]}m`,r=e.close=`[${e.codes[1]}m`,A=e.regex=new RegExp(`\\u001b\\[${e.codes[1]}m`,"g");return e.wrap=(e,n)=>{e.includes(r)&&(e=e.replace(A,r+t));let o=t+e+r;return n?o.replace(/\r*\n/g,`${r}$&${t}`):o},e})({name:t,codes:r}),(e.keys[A]||(e.keys[A]=[])).push(t),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,set(r){e.alias(t,r)},get(){let r=e=>n(e,r.stack);return Reflect.setPrototypeOf(r,e),r.stack=this.stack?this.stack.concat(t):[t],r}})};return o("reset",[0,0],"modifier"),o("bold",[1,22],"modifier"),o("dim",[2,22],"modifier"),o("italic",[3,23],"modifier"),o("underline",[4,24],"modifier"),o("inverse",[7,27],"modifier"),o("hidden",[8,28],"modifier"),o("strikethrough",[9,29],"modifier"),o("black",[30,39],"color"),o("red",[31,39],"color"),o("green",[32,39],"color"),o("yellow",[33,39],"color"),o("blue",[34,39],"color"),o("magenta",[35,39],"color"),o("cyan",[36,39],"color"),o("white",[37,39],"color"),o("gray",[90,39],"color"),o("grey",[90,39],"color"),o("bgBlack",[40,49],"bg"),o("bgRed",[41,49],"bg"),o("bgGreen",[42,49],"bg"),o("bgYellow",[43,49],"bg"),o("bgBlue",[44,49],"bg"),o("bgMagenta",[45,49],"bg"),o("bgCyan",[46,49],"bg"),o("bgWhite",[47,49],"bg"),o("blackBright",[90,39],"bright"),o("redBright",[91,39],"bright"),o("greenBright",[92,39],"bright"),o("yellowBright",[93,39],"bright"),o("blueBright",[94,39],"bright"),o("magentaBright",[95,39],"bright"),o("cyanBright",[96,39],"bright"),o("whiteBright",[97,39],"bright"),o("bgBlackBright",[100,49],"bgBright"),o("bgRedBright",[101,49],"bgBright"),o("bgGreenBright",[102,49],"bgBright"),o("bgYellowBright",[103,49],"bgBright"),o("bgBlueBright",[104,49],"bgBright"),o("bgMagentaBright",[105,49],"bgBright"),o("bgCyanBright",[106,49],"bgBright"),o("bgWhiteBright",[107,49],"bgBright"),e.ansiRegex=A,e.hasColor=e.hasAnsi=t=>(e.ansiRegex.lastIndex=0,"string"==typeof t&&""!==t&&e.ansiRegex.test(t)),e.alias=(t,r)=>{let A="string"==typeof r?e[r]:r;if("function"!=typeof A)throw new TypeError("Expected alias to be the name of an existing color (string) or a function");A.stack||(Reflect.defineProperty(A,"name",{value:t}),e.styles[t]=A,A.stack=[t]),Reflect.defineProperty(e,t,{configurable:!0,enumerable:!0,set(r){e.alias(t,r)},get(){let t=e=>n(e,t.stack);return Reflect.setPrototypeOf(t,e),t.stack=this.stack?this.stack.concat(A.stack):A.stack,t}})},e.theme=t=>{if(null===(r=t)||"object"!=typeof r||Array.isArray(r))throw new TypeError("Expected theme to be an object");var r;for(let r of Object.keys(t))e.alias(r,t[r]);return e},e.alias("unstyle",t=>"string"==typeof t&&""!==t?(e.ansiRegex.lastIndex=0,t.replace(e.ansiRegex,"")):""),e.alias("noop",e=>e),e.none=e.clear=e.noop,e.stripColor=e.unstyle,e.symbols=r(31283),e.define=o,e};e.exports=n(),e.exports.create=n},31283:e=>{"use strict";const t="Hyper"===process.env.TERM_PROGRAM,r="win32"===process.platform,A="linux"===process.platform,n={ballotDisabled:"☒",ballotOff:"☐",ballotOn:"☑",bullet:"•",bulletWhite:"◦",fullBlock:"█",heart:"❤",identicalTo:"≡",line:"─",mark:"※",middot:"·",minus:"-",multiplication:"×",obelus:"÷",pencilDownRight:"✎",pencilRight:"✏",pencilUpRight:"✐",percent:"%",pilcrow2:"❡",pilcrow:"¶",plusMinus:"±",section:"§",starsOff:"☆",starsOn:"★",upDownArrow:"↕"},o=Object.assign({},n,{check:"√",cross:"×",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"»",radioOff:"( )",radioOn:"(*)",warning:"‼"}),i=Object.assign({},n,{ballotCross:"✘",check:"✔",cross:"✖",ellipsisLarge:"⋯",ellipsis:"…",info:"ℹ",question:"?",questionFull:"?",questionSmall:"﹖",pointer:A?"▸":"❯",pointerSmall:A?"‣":"›",radioOff:"◯",radioOn:"◉",warning:"⚠"});e.exports=r&&!t?o:i,Reflect.defineProperty(e.exports,"common",{enumerable:!1,value:n}),Reflect.defineProperty(e.exports,"windows",{enumerable:!1,value:o}),Reflect.defineProperty(e.exports,"other",{enumerable:!1,value:i})},18483:(e,t,r)=>{"use strict";e=r.nmd(e);const A=(e,t)=>(...r)=>`[${e(...r)+t}m`,n=(e,t)=>(...r)=>{const A=e(...r);return`[${38+t};5;${A}m`},o=(e,t)=>(...r)=>{const A=e(...r);return`[${38+t};2;${A[0]};${A[1]};${A[2]}m`},i=e=>e,s=(e,t,r)=>[e,t,r],a=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const A=r();return Object.defineProperty(e,t,{value:A,enumerable:!0,configurable:!0}),A},enumerable:!0,configurable:!0})};let c;const g=(e,t,A,n)=>{void 0===c&&(c=r(2744));const o=n?10:0,i={};for(const[r,n]of Object.entries(c)){const s="ansi16"===r?"ansi":r;r===t?i[s]=e(A,o):"object"==typeof n&&(i[s]=e(n[t],o))}return i};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[r,A]of Object.entries(t)){for(const[r,n]of Object.entries(A))t[r]={open:`[${n[0]}m`,close:`[${n[1]}m`},A[r]=t[r],e.set(n[0],n[1]);Object.defineProperty(t,r,{value:A,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="",t.bgColor.close="",a(t.color,"ansi",()=>g(A,"ansi16",i,!1)),a(t.color,"ansi256",()=>g(n,"ansi256",i,!1)),a(t.color,"ansi16m",()=>g(o,"rgb",s,!1)),a(t.bgColor,"ansi",()=>g(A,"ansi16",i,!0)),a(t.bgColor,"ansi256",()=>g(n,"ansi256",i,!0)),a(t.bgColor,"ansi16m",()=>g(o,"rgb",s,!0)),t}})},39920:e=>{"use strict";e.exports=(...e)=>[...new Set([].concat(...e))]},67648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBinjumper=void 0;const A=r(78761);let n=null;t.getBinjumper=function(){return n||(n=A.gunzipSync(Buffer.from("H4sIAAAAAAAACu18DXgU1dXwzOwkLMmaWTUgYtQlXRRKCASwJRh0Q7IBJdHwE0BJCCHZhejmx91ZCELM4uxqpuPWaG1rW3wV0YqVT7GlCf4U80cSLNKIgAhUUWmdZdFGsCEhkP3OuXM32fBT+/Tp+3zv99bNc/f+nb977rnnnntnsjn31jE6hmF4SKEQw+xgtI+F+faPB1LcjW/GMduHvzdmB5v93piFq0pdpkpnxUpnUZmpuKi8vEI0rbCZnO5yU2m5KfPuBaayihJb8hVXxJgpjVwrw2Szw5lP214sDNM9xgi6WJYzMdOgsgQSxzCdV0FuRAQqnVFrR7lZKj/5dGqVxVNYMi6GMWmw+GXUQIyRg6hjmFHDIG8EVPafGPQFH34b4F+iffkTwOcf0EsWbVUi5OapVKBpkYOgNJjc5cklRWIRlOOxAccOY2amD4WzMJMbk50aYOYwgsgwekgzLoKzJNtWFdphdipjoaESkgHSrEvArXC5sFyFX55Lj8GDfEs1vkSHdZTvXZeQL2P+QiwTXT1Hx7HoEnCig/A14dc2CrfkUuN1OYsZOmeNFO7ei+EuLfl3n/BHOpmgZJpNCqMwM38CmhSvW5M983ooCN490L26JsoVCt2esk/q4dfc3J5pJibazptxmtWlyUCghxW8B6HmaxR8/ZCn7JM7pdaEZp7xizcxM58CWu61F2KO0TDd72IHG9Ghh443Q/AJvoHodTOjEP+VCHw0XPXTiZTzs4Sz+CPaEeokyIG18KXh/wzH4lsJ9QgamKvPaDTEdSC5NwsBtI4wjVvgq+5C+VZNJGWkoz4nUFkDMciuPmKAYRpf92t82QjZxyLfd0OBA0P7iEzDad8b/VT+BdLJUZu2FFlwkAkArSdMAItjBgQJdUonDVg2Whj1NaRwkldbohlmE59rYWTerHbHAe0rwR9uMnuQlPtO9W6AU0boEcCo/hW8gHS8S70NyK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FWs4b/MFZbhHTRYOldYUU5I/Z4rrNS6T3LITuP9A75oRYVTZG7jwfgIRysPOnZUFDPMfN5eTAyIKeDtFZW2csbG28FKS0DTdpfNdj9TzttFG4z/Ad6+BmYHIP+LL6PYL/JlK1xixZpimN3f8GW2suJK0OpWLJVVrLYxr/OVNs1ufsdXOkvLRTvDtPEgGN6kw4ro4F2lK8uLHAxzgAdFEz0fJCWkcxRLDhCJ6eHFCkfFGpjhEL/aHqY0LgoYixUgAqxQlNqGMwrCa8KhD/9vSnOt8++yZk+dQp4gwSe+TktlrtXFTlFrHVf3PztFyvqf9MFnS5Wj/5lffP3u87/xw26zMAmQ0jwWhn/uOzv4z/2w5G5q1EW/+MuSX8iZfIn24bx2Z76kkWEeYAd70m6vKht4gDwzMSV5cqLJVl5cUQJhxczEvIVZE6cnmlwiBC1FDtiqZyautbkSb78tJq3I5bKVrXCsNQF+uWtmottZPsNVvMpWVuSaWFZa7KxwVdjFicUVZTOKXGXJq1MSTRCwldptLnFRJLPbYkymNNHpdol3lNsr/kliUwkaILpsEMSUimu1KjQ4bQ+4gYWtJNdZuhqivJU2V7gvstdaBYgYfWXbVtscJgd+z0wsct1Rvrrifpsz0eQuTS/GMHJmor3I4bIlThrgMOmyLNImRYqTNmlgVKCtSWF13fYvzvj/BUaIzSoAXAAA","base64"))),n}},50730:(e,t,r)=>{"use strict";t.O9=void 0;const A=r(85622),n=r(35747),o=r(31669),i=r(67648);Object.defineProperty(t,"O9",{enumerable:!0,get:function(){return i.getBinjumper}})},73975:(e,t,r)=>{"use strict";var A=r(86897).Duplex;function n(e){if(!(this instanceof n))return new n(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",(function(e){e.on("error",t)})),this.on("unpipe",(function(e){e.removeListener("error",t)}))}else this.append(e);A.call(this)}r(31669).inherits(n,A),n.prototype._offset=function(e){var t,r=0,A=0;if(0===e)return[0,0];for(;Athis.length||e<0)){var t=this._offset(e);return this._bufs[t[0]][t[1]]}},n.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},n.prototype.copy=function(e,t,r,A){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof A||A>this.length)&&(A=this.length),r>=this.length)return e||Buffer.alloc(0);if(A<=0)return e||Buffer.alloc(0);var n,o,i=!!e,s=this._offset(r),a=A-r,c=a,g=i&&t||0,l=s[1];if(0===r&&A==this.length){if(!i)return 1===this._bufs.length?this._bufs[0]:Buffer.concat(this._bufs,this.length);for(o=0;o(n=this._bufs[o].length-l))){this._bufs[o].copy(e,g,l,l+c);break}this._bufs[o].copy(e,g,l),g+=n,c-=n,l&&(l=0)}return e},n.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return new n;var r=this._offset(e),A=this._offset(t),o=this._bufs.slice(r[0],A[0]+1);return 0==A[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,A[1]),0!=r[1]&&(o[0]=o[0].slice(r[1])),new n(o)},n.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},n.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},n.prototype.duplicate=function(){for(var e=0,t=new n;ethis.length?this.length:t;for(var A=this._offset(t),o=A[0],i=A[1];o=e.length){var a=s.indexOf(e,i);if(-1!==a)return this._reverseOffset([o,a]);i=s.length-e.length+1}else{var c=this._reverseOffset([o,i]);if(this._match(c,e))return c;i++}}i=0}return-1},n.prototype._match=function(e,t){if(this.length-e{"use strict";const A=r(54900),n=r(44617),o=r(1495),i=r(425),s=(e,t={})=>{let r=[];if(Array.isArray(e))for(let A of e){let e=s.create(A,t);Array.isArray(e)?r.push(...e):r.push(e)}else r=[].concat(s.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(r=[...new Set(r)]),r};s.parse=(e,t={})=>i(e,t),s.stringify=(e,t={})=>A("string"==typeof e?s.parse(e,t):e,t),s.compile=(e,t={})=>("string"==typeof e&&(e=s.parse(e,t)),n(e,t)),s.expand=(e,t={})=>{"string"==typeof e&&(e=s.parse(e,t));let r=o(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},s.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?s.compile(e,t):s.expand(e,t),e.exports=s},44617:(e,t,r)=>{"use strict";const A=r(52169),n=r(4542);e.exports=(e,t={})=>{let r=(e,o={})=>{let i=n.isInvalidBrace(o),s=!0===e.invalid&&!0===t.escapeInvalid,a=!0===i||!0===s,c=!0===t.escapeInvalid?"\\":"",g="";if(!0===e.isOpen)return c+e.value;if(!0===e.isClose)return c+e.value;if("open"===e.type)return a?c+e.value:"(";if("close"===e.type)return a?c+e.value:")";if("comma"===e.type)return"comma"===e.prev.type?"":a?e.value:"|";if(e.value)return e.value;if(e.nodes&&e.ranges>0){let r=n.reduce(e.nodes),o=A(...r,{...t,wrap:!1,toRegex:!0});if(0!==o.length)return r.length>1&&o.length>1?`(${o})`:o}if(e.nodes)for(let t of e.nodes)g+=r(t,e);return g};return r(e)}},5384:e=>{"use strict";e.exports={MAX_LENGTH:65536,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},1495:(e,t,r)=>{"use strict";const A=r(52169),n=r(54900),o=r(4542),i=(e="",t="",r=!1)=>{let A=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return r?o.flatten(t).map(e=>`{${e}}`):t;for(let n of e)if(Array.isArray(n))for(let e of n)A.push(i(e,t,r));else for(let e of t)!0===r&&"string"==typeof e&&(e=`{${e}}`),A.push(Array.isArray(e)?i(n,e,r):n+e);return o.flatten(A)};e.exports=(e,t={})=>{let r=void 0===t.rangeLimit?1e3:t.rangeLimit,s=(e,a={})=>{e.queue=[];let c=a,g=a.queue;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,g=c.queue;if(e.invalid||e.dollar)return void g.push(i(g.pop(),n(e,t)));if("brace"===e.type&&!0!==e.invalid&&2===e.nodes.length)return void g.push(i(g.pop(),["{}"]));if(e.nodes&&e.ranges>0){let s=o.reduce(e.nodes);if(o.exceedsLimit(...s,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let a=A(...s,t);return 0===a.length&&(a=n(e,t)),g.push(i(g.pop(),a)),void(e.nodes=[])}let l=o.encloseBrace(e),u=e.queue,h=e;for(;"brace"!==h.type&&"root"!==h.type&&h.parent;)h=h.parent,u=h.queue;for(let t=0;t{"use strict";const A=r(54900),{MAX_LENGTH:n,CHAR_BACKSLASH:o,CHAR_BACKTICK:i,CHAR_COMMA:s,CHAR_DOT:a,CHAR_LEFT_PARENTHESES:c,CHAR_RIGHT_PARENTHESES:g,CHAR_LEFT_CURLY_BRACE:l,CHAR_RIGHT_CURLY_BRACE:u,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:d,CHAR_SINGLE_QUOTE:C,CHAR_NO_BREAK_SPACE:f,CHAR_ZERO_WIDTH_NOBREAK_SPACE:I}=r(5384);e.exports=(e,t={})=>{if("string"!=typeof e)throw new TypeError("Expected a string");let r=t||{},E="number"==typeof r.maxLength?Math.min(n,r.maxLength):n;if(e.length>E)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${E})`);let B,y={type:"root",input:e,nodes:[]},m=[y],w=y,Q=y,D=0,b=e.length,v=0,S=0;const k=()=>e[v++],N=e=>{if("text"===e.type&&"dot"===Q.type&&(Q.type="text"),!Q||"text"!==Q.type||"text"!==e.type)return w.nodes.push(e),e.parent=w,e.prev=Q,Q=e,e;Q.value+=e.value};for(N({type:"bos"});v0){if(w.ranges>0){w.ranges=0;let e=w.nodes.shift();w.nodes=[e,{type:"text",value:A(w)}]}N({type:"comma",value:B}),w.commas++}else if(B===a&&S>0&&0===w.commas){let e=w.nodes;if(0===S||0===e.length){N({type:"text",value:B});continue}if("dot"===Q.type){if(w.range=[],Q.value+=B,Q.type="range",3!==w.nodes.length&&5!==w.nodes.length){w.invalid=!0,w.ranges=0,Q.type="text";continue}w.ranges++,w.args=[];continue}if("range"===Q.type){e.pop();let t=e[e.length-1];t.value+=Q.value+B,Q=t,w.ranges--;continue}N({type:"dot",value:B})}else N({type:"text",value:B});else{if("brace"!==w.type){N({type:"text",value:B});continue}let e="close";w=m.pop(),w.close=!0,N({type:e,value:B}),S--,w=m[m.length-1]}else{S++;let e=Q.value&&"$"===Q.value.slice(-1)||!0===w.dollar;w=N({type:"brace",open:!0,close:!1,dollar:e,depth:S,commas:0,ranges:0,nodes:[]}),m.push(w),N({type:"open",value:B})}else{let e,r=B;for(!0!==t.keepQuotes&&(B="");v{e.nodes||("open"===e.type&&(e.isOpen=!0),"close"===e.type&&(e.isClose=!0),e.nodes||(e.type="text"),e.invalid=!0)});let e=m[m.length-1],t=e.nodes.indexOf(w);e.nodes.splice(t,1,...w.nodes)}}while(m.length>0);return N({type:"eos"}),y}},54900:(e,t,r)=>{"use strict";const A=r(4542);e.exports=(e,t={})=>{let r=(e,n={})=>{let o=t.escapeInvalid&&A.isInvalidBrace(n),i=!0===e.invalid&&!0===t.escapeInvalid,s="";if(e.value)return(o||i)&&A.isOpenOrClose(e)?"\\"+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)s+=r(t);return s};return r(e)}},4542:(e,t)=>{"use strict";t.isInteger=e=>"number"==typeof e?Number.isInteger(e):"string"==typeof e&&""!==e.trim()&&Number.isInteger(Number(e)),t.find=(e,t)=>e.nodes.find(e=>e.type===t),t.exceedsLimit=(e,r,A=1,n)=>!1!==n&&(!(!t.isInteger(e)||!t.isInteger(r))&&(Number(r)-Number(e))/Number(A)>=n),t.escapeNode=(e,t=0,r)=>{let A=e.nodes[t];A&&(r&&A.type===r||"open"===A.type||"close"===A.type)&&!0!==A.escaped&&(A.value="\\"+A.value,A.escaped=!0)},t.encloseBrace=e=>"brace"===e.type&&(e.commas>>0+e.ranges>>0==0&&(e.invalid=!0,!0)),t.isInvalidBrace=e=>"brace"===e.type&&(!(!0!==e.invalid&&!e.dollar)||(e.commas>>0+e.ranges>>0==0||!0!==e.open||!0!==e.close)&&(e.invalid=!0,!0)),t.isOpenOrClose=e=>"open"===e.type||"close"===e.type||(!0===e.open||!0===e.close),t.reduce=e=>e.reduce((e,t)=>("text"===t.type&&e.push(t.value),"range"===t.type&&(t.type="text"),e),[]),t.flatten=(...e)=>{const t=[],r=e=>{for(let A=0;A{"use strict";const{V4MAPPED:A,ADDRCONFIG:n,ALL:o,promises:{Resolver:i},lookup:s}=r(40881),{promisify:a}=r(31669),c=r(12087),g=Symbol("cacheableLookupCreateConnection"),l=Symbol("cacheableLookupInstance"),u=Symbol("expires"),h="number"==typeof o,p=e=>{if(!e||"function"!=typeof e.createConnection)throw new Error("Expected an Agent instance as the first argument")},d=()=>{let e=!1,t=!1;for(const r of Object.values(c.networkInterfaces()))for(const A of r)if(!A.internal&&("IPv6"===A.family?t=!0:e=!0,e&&t))return{has4:e,has6:t};return{has4:e,has6:t}},C={ttl:!0},f={all:!0};class I{constructor({cache:e=new Map,maxTtl:t=1/0,fallbackDuration:r=3600,errorTtl:A=.15,resolver:n=new i,lookup:o=s}={}){if(this.maxTtl=t,this.errorTtl=A,this._cache=e,this._resolver=n,this._dnsLookup=a(o),this._resolver instanceof i?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=a(this._resolver.resolve4.bind(this._resolver)),this._resolve6=a(this._resolver.resolve6.bind(this._resolver))),this._iface=d(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,r<1)this._fallback=!1;else{this._fallback=!0;const e=setInterval(()=>{this._hostnamesToFallback.clear()},1e3*r);e.unref&&e.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,r){if("function"==typeof t?(r=t,t={}):"number"==typeof t&&(t={family:t}),!r)throw new Error("Callback must be a function.");this.lookupAsync(e,t).then(e=>{t.all?r(null,e):r(null,e.address,e.family,e.expires,e.ttl)},r)}async lookupAsync(e,t={}){"number"==typeof t&&(t={family:t});let r=await this.query(e);if(6===t.family){const e=r.filter(e=>6===e.family);t.hints&A&&(h&&t.hints&o||0===e.length)?(e=>{for(const t of e)6!==t.family&&(t.address="::ffff:"+t.address,t.family=6)})(r):r=e}else 4===t.family&&(r=r.filter(e=>4===e.family));if(t.hints&n){const{_iface:e}=this;r=r.filter(t=>6===t.family?e.has6:e.has4)}if(0===r.length){const t=new Error("cacheableLookup ENOTFOUND "+e);throw t.code="ENOTFOUND",t.hostname=e,t}return t.all?r:r[0]}async query(e){let t=await this._cache.get(e);if(!t){const r=this._pending[e];if(r)t=await r;else{const r=this.queryAndCache(e);this._pending[e]=r,t=await r}}return t=t.map(e=>({...e})),t}async _resolve(e){const[t,r]=await Promise.all([this._resolve4(e,C),this._resolve6(e,C)].map(e=>(async e=>{try{return await e}catch(e){if("ENODATA"===e.code||"ENOTFOUND"===e.code)return[];throw e}})(e)));let A=0,n=0,o=0;const i=Date.now();for(const e of t)e.family=4,e.expires=i+1e3*e.ttl,A=Math.max(A,e.ttl);for(const e of r)e.family=6,e.expires=i+1e3*e.ttl,n=Math.max(n,e.ttl);return o=t.length>0?r.length>0?Math.min(A,n):A:n,{entries:[...t,...r],cacheTtl:o}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch(e){return{entries:[],cacheTtl:0}}}async _set(e,t,r){if(this.maxTtl>0&&r>0){r=1e3*Math.min(r,this.maxTtl),t[u]=Date.now()+r;try{await this._cache.set(e,t,r)}catch(e){this.lookupAsync=async()=>{const t=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw t.cause=e,t}}A=this._cache,Symbol.iterator in A&&this._tick(r)}var A}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,f);try{let t=await this._resolve(e);0===t.entries.length&&this._fallback&&(t=await this._lookup(e),0!==t.entries.length&&this._hostnamesToFallback.add(e));const r=0===t.entries.length?this.errorTtl:t.cacheTtl;return await this._set(e,t.entries,r),delete this._pending[e],t.entries}catch(t){throw delete this._pending[e],t}}_tick(e){const t=this._nextRemovalTime;(!t||e{this._nextRemovalTime=!1;let e=1/0;const t=Date.now();for(const[r,A]of this._cache){const n=A[u];t>=n?this._cache.delete(r):n("lookup"in t||(t.lookup=this.lookup),e[g](t,r))}uninstall(e){if(p(e),e[g]){if(e[l]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[g],delete e[g],delete e[l]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=d(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){e?this._cache.delete(e):this._cache.clear()}}e.exports=I,e.exports.default=I},11200:(e,t,r)=>{"use strict";const A=r(28614),n=r(78835),o=r(19793),i=r(58764),s=r(86834),a=r(48491),c=r(55737),g=r(15751),l=r(72515);class u{constructor(e,t){if("function"!=typeof e)throw new TypeError("Parameter `request` must be a function");return this.cache=new l({uri:"string"==typeof t&&t,store:"string"!=typeof t&&t,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let l;if("string"==typeof t)l=p(n.parse(t)),t={};else if(t instanceof n.URL)l=p(n.parse(t.toString())),t={};else{const[e,...r]=(t.path||"").split("?"),A=r.length>0?"?"+r.join("?"):"";l=p({...t,pathname:e,search:A})}(t={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...t,...h(l)}).headers=c(t.headers);const d=new A,C=o(n.format(l),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),f=`${t.method}:${C}`;let I=!1,E=!1;const B=t=>{E=!0;let A,n=!1;const o=new Promise(e=>{A=()=>{n||(n=!0,e())}}),c=e=>{if(I&&!t.forceRefresh){e.status=e.statusCode;const r=s.fromObject(I.cachePolicy).revalidatedPolicy(t,e);if(!r.modified){const t=r.policy.responseHeaders();(e=new a(I.statusCode,t,I.body,I.url)).cachePolicy=r.policy,e.fromCache=!0}}let A;e.fromCache||(e.cachePolicy=new s(t,e,t),e.fromCache=!1),t.cache&&e.cachePolicy.storable()?(A=g(e),(async()=>{try{const r=i.buffer(e);if(await Promise.race([o,new Promise(t=>e.once("end",t))]),n)return;const A=await r,s={cachePolicy:e.cachePolicy.toObject(),url:e.url,statusCode:e.fromCache?I.statusCode:e.statusCode,body:A};let a=t.strictTtl?e.cachePolicy.timeToLive():void 0;t.maxTtl&&(a=a?Math.min(a,t.maxTtl):t.maxTtl),await this.cache.set(f,s,a)}catch(e){d.emit("error",new u.CacheError(e))}})()):t.cache&&I&&(async()=>{try{await this.cache.delete(f)}catch(e){d.emit("error",new u.CacheError(e))}})(),d.emit("response",A||e),"function"==typeof r&&r(A||e)};try{const r=e(t,c);r.once("error",A),r.once("abort",A),d.emit("request",r)}catch(e){d.emit("error",new u.RequestError(e))}};return(async()=>{const e=async e=>{await Promise.resolve();const t=e.cache?await this.cache.get(f):void 0;if(void 0===t)return B(e);const A=s.fromObject(t.cachePolicy);if(A.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=A.responseHeaders(),n=new a(t.statusCode,e,t.body,t.url);n.cachePolicy=A,n.fromCache=!0,d.emit("response",n),"function"==typeof r&&r(n)}else I=t,e.headers=A.revalidationHeaders(e),B(e)},A=e=>d.emit("error",new u.CacheError(e));this.cache.once("error",A),d.on("response",()=>this.cache.removeListener("error",A));try{await e(t)}catch(e){t.automaticFailover&&!E&&B(t),d.emit("error",new u.CacheError(e))}})(),d}}}function h(e){const t={...e};return t.path=`${e.pathname||"/"}${e.search||""}`,delete t.pathname,delete t.search,t}function p(e){return{protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}}u.RequestError=class extends Error{constructor(e){super(e.message),this.name="RequestError",Object.assign(this,e)}},u.CacheError=class extends Error{constructor(e){super(e.message),this.name="CacheError",Object.assign(this,e)}},e.exports=u},54738:e=>{"use strict";const t=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");t=Object.assign({pascalCase:!1},t);if(0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length)return"";if(1===e.length)return t.pascalCase?e.toUpperCase():e.toLowerCase();return e!==e.toLowerCase()&&(e=(e=>{let t=!1,r=!1,A=!1;for(let n=0;nt.toUpperCase()).replace(/\d+(\w|$)/g,e=>e.toUpperCase()),r=e,t.pascalCase?r.charAt(0).toUpperCase()+r.slice(1):r;var r};e.exports=t,e.exports.default=t},95882:(e,t,r)=>{"use strict";const A=r(18483),{stdout:n,stderr:o}=r(59428),{stringReplaceAll:i,stringEncaseCRLFWithFirstIndex:s}=r(73327),a=["ansi","ansi","ansi256","ansi16m"],c=Object.create(null);class g{constructor(e){return l(e)}}const l=e=>{const t={};return((e,t={})=>{if(t.level>3||t.level<0)throw new Error("The `level` option should be an integer from 0 to 3");const r=n?n.level:0;e.level=void 0===t.level?r:t.level})(t,e),t.template=(...e)=>E(t.template,...e),Object.setPrototypeOf(t,u.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=g,t.template};function u(e){return l(e)}for(const[e,t]of Object.entries(A))c[e]={get(){const r=C(this,d(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};c.visible={get(){const e=C(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const h=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of h)c[e]={get(){const{level:t}=this;return function(...r){const n=d(A.color[a[t]][e](...r),A.color.close,this._styler);return C(this,n,this._isEmpty)}}};for(const e of h){c["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const n=d(A.bgColor[a[t]][e](...r),A.bgColor.close,this._styler);return C(this,n,this._isEmpty)}}}}const p=Object.defineProperties(()=>{},{...c,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),d=(e,t,r)=>{let A,n;return void 0===r?(A=e,n=t):(A=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:A,closeAll:n,parent:r}},C=(e,t,r)=>{const A=(...e)=>f(A,1===e.length?""+e[0]:e.join(" "));return A.__proto__=p,A._generator=e,A._styler=t,A._isEmpty=r,A},f=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;const{openAll:A,closeAll:n}=r;if(-1!==t.indexOf(""))for(;void 0!==r;)t=i(t,r.close,r.open),r=r.parent;const o=t.indexOf("\n");return-1!==o&&(t=s(t,n,A,o)),A+t+n};let I;const E=(e,...t)=>{const[A]=t;if(!Array.isArray(A))return t.join(" ");const n=t.slice(1),o=[A.raw[0]];for(let e=1;e{"use strict";const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,A=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function i(e){const t="u"===e[0],r="{"===e[1];return t&&!r&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):o.get(e)||e}function s(e,t){const r=[],o=t.trim().split(/\s*,\s*/g);let s;for(const t of o){const o=Number(t);if(Number.isNaN(o)){if(!(s=t.match(A)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(s[2].replace(n,(e,t,r)=>t?i(t):r))}else r.push(o)}return r}function a(e){r.lastIndex=0;const t=[];let A;for(;null!==(A=r.exec(e));){const e=A[1];if(A[2]){const r=s(e,A[2]);t.push([e].concat(r))}else t.push([e])}return t}function c(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let A=e;for(const[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in A))throw new Error("Unknown Chalk style: "+e);A=t.length>0?A[e](...t):A[e]}return A}e.exports=(e,r)=>{const A=[],n=[];let o=[];if(r.replace(t,(t,r,s,g,l,u)=>{if(r)o.push(i(r));else if(g){const t=o.join("");o=[],n.push(0===A.length?t:c(e,A)(t)),A.push({inverse:s,styles:a(g)})}else if(l){if(0===A.length)throw new Error("Found extraneous } in Chalk template literal");n.push(c(e,A)(o.join(""))),o=[],A.pop()}else o.push(u)}),n.push(o.join("")),A.length>0){const e=`Chalk template literal is missing ${A.length} closing bracket${1===A.length?"":"s"} (\`}\`)`;throw new Error(e)}return n.join("")}},73327:e=>{"use strict";e.exports={stringReplaceAll:(e,t,r)=>{let A=e.indexOf(t);if(-1===A)return e;const n=t.length;let o=0,i="";do{i+=e.substr(o,A-o)+t+r,o=A+n,A=e.indexOf(t,o)}while(-1!==A);return i+=e.substr(o),i},stringEncaseCRLFWithFirstIndex:(e,t,r,A)=>{let n=0,o="";do{const i="\r"===e[A-1];o+=e.substr(n,(i?A-1:A)-n)+t+(i?"\r\n":"\n")+r,n=A+1,A=e.indexOf("\n",n)}while(-1!==A);return o+=e.substr(n),o}}},5864:(e,t,r)=>{"use strict";var A=r(85832),n=process.env;function o(e){return"string"==typeof e?!!n[e]:Object.keys(e).every((function(t){return n[t]===e[t]}))}Object.defineProperty(t,"_vendors",{value:A.map((function(e){return e.constant}))}),t.name=null,t.isPR=null,A.forEach((function(e){var r=(Array.isArray(e.env)?e.env:[e.env]).every((function(e){return o(e)}));if(t[e.constant]=r,r)switch(t.name=e.name,typeof e.pr){case"string":t.isPR=!!n[e.pr];break;case"object":"env"in e.pr?t.isPR=e.pr.env in n&&n[e.pr.env]!==e.pr.ne:"any"in e.pr?t.isPR=e.pr.any.some((function(e){return!!n[e]})):t.isPR=o(e.pr);break;default:t.isPR=null}})),t.isCI=!!(n.CI||n.CONTINUOUS_INTEGRATION||n.BUILD_NUMBER||n.RUN_ID||t.name)},85832:e=>{"use strict";e.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY_BUILD_BASE","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')},40822:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Cli:()=>Y,Command:()=>M,UsageError:()=>a});const A=/^(-h|--help)(?:=([0-9]+))?$/,n=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,o=/^-[a-zA-Z]{2,}$/,i=/^([^=]+)=([\s\S]*)$/,s="1"===process.env.DEBUG_CLI;class a extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}}class c extends Error{constructor(e,t){if(super(),this.input=e,this.candidates=t,this.clipanion={type:"none"},this.name="UnknownSyntaxError",0===this.candidates.length)this.message="Command not found, but we're not sure what's the alternative.";else if(1===this.candidates.length&&null!==this.candidates[0].reason){const[{usage:e,reason:t}]=this.candidates;this.message=`${t}\n\n$ ${e}`}else if(1===this.candidates.length){const[{usage:t}]=this.candidates;this.message=`Command not found; did you mean:\n\n$ ${t}\n${l(e)}`}else this.message=`Command not found; did you mean one of:\n\n${this.candidates.map(({usage:e},t)=>`${(t+".").padStart(4)} ${e}`).join("\n")}\n\n${l(e)}`}}class g extends Error{constructor(e,t){super(),this.input=e,this.usages=t,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find who to pick amongst the following alternatives:\n\n${this.usages.map((e,t)=>`${(t+".").padStart(4)} ${e}`).join("\n")}\n\n${l(e)}`}}const l=e=>"While running "+e.filter(e=>"\0"!==e).map(e=>{const t=JSON.stringify(e);return e.match(/\s/)||0===e.length||t!==`"${e}"`?t:e}).join(" ");function u(e){s&&console.log(e)}const h={candidateUsage:null,errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:-1};function p(e,t){return e.nodes.push(t),e.nodes.length-1}function d(e,t,r=!1){u("Running a vm on "+JSON.stringify(t));let A=[{node:0,state:{candidateUsage:null,errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null}}];!function(e,{prefix:t=""}={}){u(t+"Nodes are:");for(let r=0;r2!==e).map(({state:e})=>({usage:e.candidateUsage,reason:null})));if(s.every(({node:e})=>2===e))throw new c(t,s.map(({state:e})=>({usage:e.candidateUsage,reason:e.errorMessage})));A=I(s)}if(A.length>0){u(" Results:");for(const e of A)u(` - ${e.node} -> ${JSON.stringify(e.state)}`)}else u(" No results");return A}function C(e,t){if(null!==t.selectedIndex)return!0;if(Object.prototype.hasOwnProperty.call(e.statics,"\0"))for(const{to:t}of e.statics["\0"])if(1===t)return!0;return!1}function f(e,t){return function(e,t){const r=t.filter(e=>null!==e.selectedIndex);if(0===r.length)throw new Error;let A=0;for(const e of r)e.path.length>A&&(A=e.path.length);const n=r.filter(e=>e.path.length===A),o=e=>e.positionals.filter(({extra:e})=>!e).length+e.options.length,i=n.map(e=>({state:e,positionalCount:o(e)}));let s=0;for(const{positionalCount:e}of i)e>s&&(s=e);const a=function(e){const t=[],r=[];for(const A of e)-1===A.selectedIndex?r.push(A):t.push(A);r.length>0&&t.push(Object.assign(Object.assign({},h),{path:E(...r.map(e=>e.path)),options:r.reduce((e,t)=>e.concat(t.options),[])}));return t}(i.filter(({positionalCount:e})=>e===s).map(({state:e})=>e));if(a.length>1)throw new g(e,a.map(e=>e.candidateUsage));return a[0]}(t,d(e,[...t,"\0"]).map(({state:e})=>e))}function I(e){let t=0;for(const{state:r}of e)r.path.length>t&&(t=r.path.length);return e.filter(({state:e})=>e.path.length===t)}function E(e,t,...r){return void 0===t?Array.from(e):E(e.filter((e,r)=>e===t[r]),...r)}function B(e){return 1===e||2===e}function y(e,t=0){return{to:B(e.to)?e.to:e.to>2?e.to+t-2:e.to+t,reducer:e.reducer}}function m(e,t=0){const r={dynamics:[],shortcuts:[],statics:{}};for(const[A,n]of e.dynamics)r.dynamics.push([A,y(n,t)]);for(const A of e.shortcuts)r.shortcuts.push(y(A,t));for(const[A,n]of Object.entries(e.statics))r.statics[A]=n.map(e=>y(e,t));return r}function w(e,t,r,A,n){e.nodes[t].dynamics.push([r,{to:A,reducer:n}])}function Q(e,t,r,A){e.nodes[t].shortcuts.push({to:r,reducer:A})}function D(e,t,r,A,n){(Object.prototype.hasOwnProperty.call(e.nodes[t].statics,r)?e.nodes[t].statics[r]:e.nodes[t].statics[r]=[]).push({to:A,reducer:n})}function b(e,t,r,A){if(Array.isArray(t)){const[n,...o]=t;return e[n](r,A,...o)}return e[t](r,A)}function v(e,t){const r=Array.isArray(e)?S[e[0]]:S[e];if(void 0===r.suggest)return null;const A=Array.isArray(e)?e.slice(1):[];return r.suggest(t,...A)}const S={always:()=>!0,isOptionLike:(e,t)=>!e.ignoreOptions&&t.startsWith("-"),isNotOptionLike:(e,t)=>e.ignoreOptions||!t.startsWith("-"),isOption:(e,t,r,A)=>!e.ignoreOptions&&t===r,isBatchOption:(e,t,r)=>!e.ignoreOptions&&o.test(t)&&[...t.slice(1)].every(e=>r.includes("-"+e)),isBoundOption:(e,t,r,A)=>{const o=t.match(i);return!e.ignoreOptions&&!!o&&n.test(o[1])&&r.includes(o[1])&&A.filter(e=>e.names.includes(o[1])).every(e=>e.allowBinding)},isNegatedOption:(e,t,r)=>!e.ignoreOptions&&t==="--no-"+r.slice(2),isHelp:(e,t)=>!e.ignoreOptions&&A.test(t),isUnsupportedOption:(e,t,r)=>!e.ignoreOptions&&t.startsWith("-")&&n.test(t)&&!r.includes(t),isInvalidOption:(e,t)=>!e.ignoreOptions&&t.startsWith("-")&&!n.test(t)};S.isOption.suggest=(e,t,r=!0)=>r?null:[t];const k={setCandidateUsage:(e,t,r)=>Object.assign(Object.assign({},e),{candidateUsage:r}),setSelectedIndex:(e,t,r)=>Object.assign(Object.assign({},e),{selectedIndex:r}),pushBatch:(e,t)=>Object.assign(Object.assign({},e),{options:e.options.concat([...t.slice(1)].map(e=>({name:"-"+e,value:!0})))}),pushBound:(e,t)=>{const[,r,A]=t.match(i);return Object.assign(Object.assign({},e),{options:e.options.concat({name:r,value:A})})},pushPath:(e,t)=>Object.assign(Object.assign({},e),{path:e.path.concat(t)}),pushPositional:(e,t)=>Object.assign(Object.assign({},e),{positionals:e.positionals.concat({value:t,extra:!1})}),pushExtra:(e,t)=>Object.assign(Object.assign({},e),{positionals:e.positionals.concat({value:t,extra:!0})}),pushExtraNoLimits:(e,t)=>Object.assign(Object.assign({},e),{positionals:e.positionals.concat({value:t,extra:N})}),pushTrue:(e,t,r=t)=>Object.assign(Object.assign({},e),{options:e.options.concat({name:t,value:!0})}),pushFalse:(e,t,r=t)=>Object.assign(Object.assign({},e),{options:e.options.concat({name:r,value:!1})}),pushUndefined:(e,t)=>Object.assign(Object.assign({},e),{options:e.options.concat({name:t,value:void 0})}),pushStringValue:(e,t)=>{var r;const A=Object.assign(Object.assign({},e),{options:[...e.options]}),n=e.options[e.options.length-1];return n.value=(null!==(r=n.value)&&void 0!==r?r:[]).concat([t]),A},setStringValue:(e,t)=>{const r=Object.assign(Object.assign({},e),{options:[...e.options]});return e.options[e.options.length-1].value=t,r},inhibateOptions:e=>Object.assign(Object.assign({},e),{ignoreOptions:!0}),useHelp:(e,t,r)=>{const[,n,o]=t.match(A);return void 0!==o?Object.assign(Object.assign({},e),{options:[{name:"-c",value:String(r)},{name:"-i",value:o}]}):Object.assign(Object.assign({},e),{options:[{name:"-c",value:String(r)}]})},setError:(e,t,r)=>"\0"===t?Object.assign(Object.assign({},e),{errorMessage:r+"."}):Object.assign(Object.assign({},e),{errorMessage:`${r} ("${t}").`}),setOptionArityError:(e,t)=>{const r=e.options[e.options.length-1];return Object.assign(Object.assign({},e),{errorMessage:`Not enough arguments to option ${r.name}.`})}},N=Symbol();class F{constructor(e,t){this.allOptionNames=[],this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=t}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:t=this.arity.trailing,extra:r=this.arity.extra,proxy:A=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:t,extra:r,proxy:A})}addPositional({name:e="arg",required:t=!0}={}){if(!t&&this.arity.extra===N)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!t&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");t||this.arity.extra===N?this.arity.extra!==N&&0===this.arity.extra.length?this.arity.leading.push(e):this.arity.trailing.push(e):this.arity.extra.push(e)}addRest({name:e="arg",required:t=0}={}){if(this.arity.extra===N)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let r=0;r1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(r))throw new Error("The arity must be an integer, got "+r);if(r<0)throw new Error("The arity must be positive, got "+r);this.allOptionNames.push(...e),this.options.push({names:e,description:t,arity:r,hidden:A,allowBinding:n})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:t=!0}={}){const r=[this.cliOpts.binaryName],A=[];if(this.paths.length>0&&r.push(...this.paths[0]),e){for(const{names:e,arity:n,hidden:o,description:i}of this.options){if(o)continue;const s=[];for(let e=0;e`<${e}>`)),this.arity.extra===N?r.push("..."):r.push(...this.arity.extra.map(e=>`[${e}]`)),r.push(...this.arity.trailing.map(e=>`<${e}>`))}return{usage:r.join(" "),options:A}}compile(){if(void 0===this.context)throw new Error("Assertion failed: No context attached");const e={nodes:[{dynamics:[],shortcuts:[],statics:{}},{dynamics:[],shortcuts:[],statics:{}},{dynamics:[],shortcuts:[],statics:{}}]};let t=0;t=p(e,{dynamics:[],shortcuts:[],statics:{}}),D(e,0,"",t,["setCandidateUsage",this.usage().usage]);const r=this.arity.proxy?"always":"isNotOptionLike",A=this.paths.length>0?this.paths:[[]];for(const n of A){let A=t;if(n.length>0){const t=p(e,{dynamics:[],shortcuts:[],statics:{}});Q(e,A,t),this.registerOptions(e,t),A=t}for(let t=0;t0||!this.arity.proxy){const t=p(e,{dynamics:[],shortcuts:[],statics:{}});w(e,A,"isHelp",t,["useHelp",this.cliIndex]),D(e,t,"\0",1,["setSelectedIndex",-1]),this.registerOptions(e,A)}this.arity.leading.length>0&&D(e,A,"\0",2,["setError","Not enough positional arguments"]);let o=A;for(let t=0;t0||t+1!==this.arity.leading.length)&&D(e,r,"\0",2,["setError","Not enough positional arguments"]),w(e,o,"isNotOptionLike",r,"pushPositional"),o=r}let i=o;if(this.arity.extra===N||this.arity.extra.length>0){const t=p(e,{dynamics:[],shortcuts:[],statics:{}});if(Q(e,o,t),this.arity.extra===N){const A=p(e,{dynamics:[],shortcuts:[],statics:{}});this.arity.proxy||this.registerOptions(e,A),w(e,o,r,A,"pushExtraNoLimits"),w(e,A,r,A,"pushExtraNoLimits"),Q(e,A,t)}else for(let A=0;A0&&D(e,i,"\0",2,["setError","Not enough positional arguments"]);let s=i;for(let t=0;tt.length>e.length?t:e,"");if(0===r.arity)for(const n of r.names)w(e,t,["isOption",n,r.hidden||n!==A],t,"pushTrue"),n.startsWith("--")&&!n.startsWith("--no-")&&w(e,t,["isNegatedOption",n],t,["pushFalse",n]);else{let n=p(e,{dynamics:[],shortcuts:[],statics:{}});for(const o of r.names)w(e,t,["isOption",o,r.hidden||o!==A],n,"pushUndefined");for(let t=0;t=0&&e{if(t.has(A))return;t.add(A);const n=e.nodes[A];for(const e of Object.values(n.statics))for(const{to:t}of e)r(t);for(const[,{to:e}]of n.dynamics)r(e);for(const{to:e}of n.shortcuts)r(e);const o=new Set(n.shortcuts.map(({to:e})=>e));for(;n.shortcuts.length>0;){const{to:t}=n.shortcuts.shift(),r=e.nodes[t];for(const[e,t]of Object.entries(r.statics)){let r=Object.prototype.hasOwnProperty.call(n.statics,e)?n.statics[e]:n.statics[e]=[];for(const e of t)r.some(({to:t})=>e.to===t)||r.push(e)}for(const[e,t]of r.dynamics)n.dynamics.some(([r,{to:A}])=>e===r&&t.to===A)||n.dynamics.push([e,t]);for(const e of r.shortcuts)o.has(e.to)||(n.shortcuts.push(e),o.add(e.to))}};r(0)}(r),{machine:r,contexts:t,process:e=>f(r,e),suggest:(e,t)=>function(e,t,r){const A=r&&t.length>0?[""]:[],n=d(e,t,r),o=[],i=new Set,s=(t,r,A=!0)=>{let n=[r];for(;n.length>0;){const r=n;n=[];for(const o of r){const r=e.nodes[o],i=Object.keys(r.statics);for(const e of Object.keys(r.statics)){const e=i[0];for(const{to:o,reducer:i}of r.statics[e])"pushPath"===i&&(A||t.push(e),n.push(o))}}A=!1}const s=JSON.stringify(t);i.has(s)||(o.push(t),i.add(s))};for(const{node:t,state:r}of n){if(null!==r.remainder){s([r.remainder],t);continue}const n=e.nodes[t],o=C(n,r);for(const[e,r]of Object.entries(n.statics))(o&&"\0"!==e||!e.startsWith("-")&&r.some(({reducer:e})=>"pushPath"===e))&&s([...A,e],t);if(o)for(const[e,{to:o}]of n.dynamics){if(2===o)continue;const n=v(e,r);if(null!==n)for(const e of n)s([...A,e],t)}}return[...o].sort()}(r,e,t)}}}class M{constructor(){this.help=!1}static getMeta(e){const t=e.constructor;return t.meta=Object.prototype.hasOwnProperty.call(t,"meta")?t.meta:{definitions:[],transformers:[(e,t)=>{for(const{name:r,value:A}of e.options)"-h"!==r&&"--help"!==r||(t.help=A)}]}}static resolveMeta(e){const t=[],r=[];for(let A=e;A instanceof M;A=A.__proto__){const e=this.getMeta(A);for(const r of e.definitions)t.push(r);for(const t of e.transformers)r.push(t)}return{definitions:t,transformers:r}}static registerDefinition(e,t){this.getMeta(e).definitions.push(t)}static registerTransformer(e,t){this.getMeta(e).transformers.push(t)}static addPath(...e){this.Path(...e)(this.prototype,"execute")}static addOption(e,t){t(this.prototype,e)}static Path(...e){return(t,r)=>{this.registerDefinition(t,t=>{t.addPath(e)})}}static Boolean(e,{hidden:t=!1,description:r}={}){return(A,n)=>{const o=e.split(",");this.registerDefinition(A,e=>{e.addOption({names:o,arity:0,hidden:t,allowBinding:!1,description:r})}),this.registerTransformer(A,(e,t)=>{for(const{name:r,value:A}of e.options)o.includes(r)&&(t[n]=A)})}}static Counter(e,{hidden:t=!1,description:r}={}){return(A,n)=>{const o=e.split(",");this.registerDefinition(A,e=>{e.addOption({names:o,arity:0,hidden:t,allowBinding:!1,description:r})}),this.registerTransformer(A,(e,t)=>{var r;for(const{name:A,value:i}of e.options)o.includes(A)&&(null!==(r=t[n])&&void 0!==r||(t[n]=0),i?t[n]++:t[n]=0)})}}static String(e={},{arity:t=1,tolerateBoolean:r=!1,hidden:A=!1,description:n}={}){return(o,i)=>{if("string"==typeof e){const s=e.split(",");this.registerDefinition(o,e=>{e.addOption({names:s,arity:r?0:t,hidden:A,description:n})}),this.registerTransformer(o,(e,t)=>{for(const{name:r,value:A}of e.options)s.includes(r)&&(t[i]=A)})}else{const{name:t=i,required:r=!0}=e;this.registerDefinition(o,e=>{e.addPositional({name:t,required:r})}),this.registerTransformer(o,(e,t)=>{for(let A=0;A{if(0===t)throw new Error("Array options are expected to have at least an arity of 1");const i=e.split(",");this.registerDefinition(n,e=>{e.addOption({names:i,arity:t,hidden:r,description:A})}),this.registerTransformer(n,(e,t)=>{for(const{name:r,value:A}of e.options)i.includes(r)&&(t[o]=t[o]||[],t[o].push(A))})}}static Rest({required:e=0}={}){return(t,r)=>{this.registerDefinition(t,t=>{t.addRest({name:r,required:e})}),this.registerTransformer(t,(e,t,A)=>{const n=t=>{const r=e.positionals[t];return r.extra===N||!1===r.extra&&te)})}}static Proxy({required:e=0}={}){return(t,r)=>{this.registerDefinition(t,t=>{t.addProxy({required:e})}),this.registerTransformer(t,(e,t)=>{t[r]=e.positionals.map(({value:e})=>e)})}}static Usage(e){return e}static Schema(e){return e}async catch(e){throw e}async validateAndExecute(){const e=this.constructor.schema;if(void 0!==e)try{await e.validate(this)}catch(e){throw"ValidationError"===e.name&&(e.clipanion={type:"usage"}),e}const t=await this.execute();return void 0!==t?t:0}} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ function R(e,t,r,A){var n,o=arguments.length,i=o<3?t:null===A?A=Object.getOwnPropertyDescriptor(t,r):A;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,A);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(i=(o<3?n(i):o>3?n(t,r,i):n(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}M.Entries={};class x extends M{async execute(){this.context.stdout.write(this.cli.usage(null))}}R([M.Path("--help"),M.Path("-h")],x.prototype,"execute",null);class L extends M{async execute(){var e;this.context.stdout.write((null!==(e=this.cli.binaryVersion)&&void 0!==e?e:"")+"\n")}}R([M.Path("--version"),M.Path("-v")],L.prototype,"execute",null);const P={bold:e=>`${e}`,error:e=>`${e}`,code:e=>`${e}`},O={bold:e=>e,error:e=>e,code:e=>e};function U(e,{format:t,paragraphs:r}){return e=(e=(e=(e=(e=e.replace(/\r\n?/g,"\n")).replace(/^[\t ]+|[\t ]+$/gm,"")).replace(/^\n+|\n+$/g,"")).replace(/^-([^\n]*?)\n+/gm,"-$1\n\n")).replace(/\n(\n)?\n*/g,"$1"),r&&(e=e.split(/\n/).map((function(e){let t=e.match(/^[*-][\t ]+(.*)/);return t?t[1].match(/(.{1,78})(?: |$)/g).map((e,t)=>(0===t?"- ":" ")+e).join("\n"):e.match(/(.{1,80})(?: |$)/g).join("\n")})).join("\n\n")),(e=e.replace(/(`+)((?:.|[\n])*?)\1/g,(function(e,r,A){return t.code(r+A+r)})))?e+"\n":""}class T extends M{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,t){const r=new T(t);r.path=e.path;for(const t of e.options)switch(t.name){case"-c":r.commands.push(Number(t.value));break;case"-i":r.index=Number(t.value)}return r}async execute(){let e=this.commands;if(void 0!==this.index&&this.index>=0&&this.index1){this.context.stdout.write("Multiple commands match your selection:\n"),this.context.stdout.write("\n");let e=0;for(const t of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[t].commandClass,{prefix:(e+++". ").padStart(5)}));this.context.stdout.write("\n"),this.context.stdout.write("Run again with -h= to see the longer details of any of those commands.\n")}}}function j(){return"0"!==process.env.FORCE_COLOR&&("1"===process.env.FORCE_COLOR||!(void 0===process.stdout||!process.stdout.isTTY))}class Y{constructor({binaryLabel:e,binaryName:t="...",binaryVersion:r,enableColors:A=j()}={}){this.registrations=new Map,this.builder=new K({binaryName:t}),this.binaryLabel=e,this.binaryName=t,this.binaryVersion=r,this.enableColors=A}static from(e,t={}){const r=new Y(t);for(const t of e)r.register(t);return r}register(e){const t=this.builder.command();this.registrations.set(e,t.cliIndex);const{definitions:r}=e.resolveMeta(e.prototype);for(const e of r)e(t);t.setContext({commandClass:e})}process(e){const{contexts:t,process:r}=this.builder.compile(),A=r(e);switch(A.selectedIndex){case-1:return T.from(A,t);default:{const{commandClass:e}=t[A.selectedIndex],r=this.registrations.get(e);if(void 0===r)throw new Error("Assertion failed: Expected the command class to have been registered.");const n=this.builder.getBuilderByIndex(r),o=new e;o.path=A.path;const{transformers:i}=e.resolveMeta(e.prototype);for(const e of i)e(A,o,n);return o}}}async run(e,t){let r,A;if(Array.isArray(e))try{r=this.process(e)}catch(e){return t.stdout.write(this.error(e)),1}else r=e;if(r.help)return t.stdout.write(this.usage(r,{detailed:!0})),0;r.context=t,r.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(e,t)=>this.error(e,t),process:e=>this.process(e),run:(e,r)=>this.run(e,Object.assign(Object.assign({},t),r)),usage:(e,t)=>this.usage(e,t)};try{A=await r.validateAndExecute().catch(e=>r.catch(e).then(()=>0))}catch(e){return t.stdout.write(this.error(e,{command:r})),1}return A}async runExit(e,t){process.exitCode=await this.run(e,t)}suggest(e,t){const{contexts:r,process:A,suggest:n}=this.builder.compile();return n(e,t)}definitions({colored:e=!1}={}){const t=[];for(const[r,A]of this.registrations){if(void 0===r.usage)continue;const{usage:n}=this.getUsageByIndex(A,{detailed:!1}),{usage:o,options:i}=this.getUsageByIndex(A,{detailed:!0,inlineOptions:!1}),s=void 0!==r.usage.category?U(r.usage.category,{format:this.format(e),paragraphs:!1}):void 0,a=void 0!==r.usage.description?U(r.usage.description,{format:this.format(e),paragraphs:!1}):void 0,c=void 0!==r.usage.details?U(r.usage.details,{format:this.format(e),paragraphs:!0}):void 0,g=void 0!==r.usage.examples?r.usage.examples.map(([t,r])=>[U(t,{format:this.format(e),paragraphs:!1}),r.replace(/\$0/g,this.binaryName)]):void 0;t.push({path:n,usage:o,category:s,description:a,details:c,examples:g,options:i})}return t}usage(e=null,{colored:t,detailed:r=!1,prefix:A="$ "}={}){const n=null!==e&&void 0===e.getMeta?e.constructor:e;let o="";if(n)if(r){const{description:e="",details:r="",examples:i=[]}=n.usage||{};""!==e&&(o+=U(e,{format:this.format(t),paragraphs:!1}).replace(/^./,e=>e.toUpperCase()),o+="\n"),(""!==r||i.length>0)&&(o+=this.format(t).bold("Usage:")+"\n",o+="\n");const{usage:s,options:a}=this.getUsageByRegistration(n,{inlineOptions:!1});if(o+=`${this.format(t).bold(A)}${s}\n`,a.length>0){o+="\n",o+=P.bold("Options:")+"\n";const e=a.reduce((e,t)=>Math.max(e,t.definition.length),0);o+="\n";for(const{definition:r,description:A}of a)o+=` ${r.padEnd(e)} ${U(A,{format:this.format(t),paragraphs:!1})}`}if(""!==r&&(o+="\n",o+=this.format(t).bold("Details:")+"\n",o+="\n",o+=U(r,{format:this.format(t),paragraphs:!0})),i.length>0){o+="\n",o+=this.format(t).bold("Examples:")+"\n";for(let[e,r]of i)o+="\n",o+=U(e,{format:this.format(t),paragraphs:!1}),o+=r.replace(/^/m," "+this.format(t).bold(A)).replace(/\$0/g,this.binaryName)+"\n"}}else{const{usage:e}=this.getUsageByRegistration(n);o+=`${this.format(t).bold(A)}${e}\n`}else{const e=new Map;for(const[r,A]of this.registrations.entries()){if(void 0===r.usage)continue;const n=void 0!==r.usage.category?U(r.usage.category,{format:this.format(t),paragraphs:!1}):null;let o=e.get(n);void 0===o&&e.set(n,o=[]);const{usage:i}=this.getUsageByIndex(A);o.push({commandClass:r,usage:i})}const r=Array.from(e.keys()).sort((e,t)=>null===e?-1:null===t?1:e.localeCompare(t,"en",{usage:"sort",caseFirst:"upper"})),n=void 0!==this.binaryLabel,i=void 0!==this.binaryVersion;n||i?(o+=n&&i?this.format(t).bold(`${this.binaryLabel} - ${this.binaryVersion}`)+"\n\n":n?this.format(t).bold(""+this.binaryLabel)+"\n":this.format(t).bold(""+this.binaryVersion)+"\n",o+=` ${this.format(t).bold(A)}${this.binaryName} \n`):o+=`${this.format(t).bold(A)}${this.binaryName} \n`;for(let A of r){const r=e.get(A).slice().sort((e,t)=>e.usage.localeCompare(t.usage,"en",{usage:"sort",caseFirst:"upper"})),n=null!==A?A.trim():"Where is one of";o+="\n",o+=this.format(t).bold(n+":")+"\n";for(let{commandClass:e,usage:A}of r){const r=e.usage.description||"undocumented";o+="\n",o+=` ${this.format(t).bold(A)}\n`,o+=" "+U(r,{format:this.format(t),paragraphs:!1})}}o+="\n",o+=U("You can also print more details about any of these commands by calling them after adding the `-h,--help` flag right after the command name.",{format:this.format(t),paragraphs:!0})}return o}error(e,{colored:t,command:r=null}={}){e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let A="",n=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");"Error"===n&&(n="Internal Error"),A+=`${this.format(t).error(n)}: ${e.message}\n`;const o=e.clipanion;return void 0!==o?"usage"===o.type&&(A+="\n",A+=this.usage(r)):e.stack&&(A+=e.stack.replace(/^.*\n/,"")+"\n"),A}getUsageByRegistration(e,t){const r=this.registrations.get(e);if(void 0===r)throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(r,t)}getUsageByIndex(e,t){return this.builder.getBuilderByIndex(e).usage(t)}format(e=this.enableColors){return e?P:O}}Y.defaultContext={stdin:process.stdin,stdout:process.stdout,stderr:process.stderr},M.Entries.Help=x,M.Entries.Version=L},15751:(e,t,r)=>{"use strict";const A=r(92413).PassThrough,n=r(65007);e.exports=e=>{if(!e||!e.pipe)throw new TypeError("Parameter `response` must be a response stream.");const t=new A;return n(e,t),e.pipe(t)}},15311:(e,t,r)=>{const A=r(93300),n={};for(const e of Object.keys(A))n[A[e]]=e;const o={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=o;for(const e of Object.keys(o)){if(!("channels"in o[e]))throw new Error("missing channels property: "+e);if(!("labels"in o[e]))throw new Error("missing channel labels property: "+e);if(o[e].labels.length!==o[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=o[e];delete o[e].channels,delete o[e].labels,Object.defineProperty(o[e],"channels",{value:t}),Object.defineProperty(o[e],"labels",{value:r})}o.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,A=e[2]/255,n=Math.min(t,r,A),o=Math.max(t,r,A),i=o-n;let s,a;o===n?s=0:t===o?s=(r-A)/i:r===o?s=2+(A-t)/i:A===o&&(s=4+(t-r)/i),s=Math.min(60*s,360),s<0&&(s+=360);const c=(n+o)/2;return a=o===n?0:c<=.5?i/(o+n):i/(2-o-n),[s,100*a,100*c]},o.rgb.hsv=function(e){let t,r,A,n,o;const i=e[0]/255,s=e[1]/255,a=e[2]/255,c=Math.max(i,s,a),g=c-Math.min(i,s,a),l=function(e){return(c-e)/6/g+.5};return 0===g?(n=0,o=0):(o=g/c,t=l(i),r=l(s),A=l(a),i===c?n=A-r:s===c?n=1/3+t-A:a===c&&(n=2/3+r-t),n<0?n+=1:n>1&&(n-=1)),[360*n,100*o,100*c]},o.rgb.hwb=function(e){const t=e[0],r=e[1];let A=e[2];const n=o.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,A));return A=1-1/255*Math.max(t,Math.max(r,A)),[n,100*i,100*A]},o.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,A=e[2]/255,n=Math.min(1-t,1-r,1-A);return[100*((1-t-n)/(1-n)||0),100*((1-r-n)/(1-n)||0),100*((1-A-n)/(1-n)||0),100*n]},o.rgb.keyword=function(e){const t=n[e];if(t)return t;let r,o=1/0;for(const t of Object.keys(A)){const n=A[t],a=(s=n,((i=e)[0]-s[0])**2+(i[1]-s[1])**2+(i[2]-s[2])**2);a.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,A=A>.04045?((A+.055)/1.055)**2.4:A/12.92;return[100*(.4124*t+.3576*r+.1805*A),100*(.2126*t+.7152*r+.0722*A),100*(.0193*t+.1192*r+.9505*A)]},o.rgb.lab=function(e){const t=o.rgb.xyz(e);let r=t[0],A=t[1],n=t[2];r/=95.047,A/=100,n/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,A=A>.008856?A**(1/3):7.787*A+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*A-16,500*(r-A),200*(A-n)]},o.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,A=e[2]/100;let n,o,i;if(0===r)return i=255*A,[i,i,i];n=A<.5?A*(1+r):A+r-A*r;const s=2*A-n,a=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,i=6*o<1?s+6*(n-s)*o:2*o<1?n:3*o<2?s+(n-s)*(2/3-o)*6:s,a[e]=255*i;return a},o.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,A=e[2]/100,n=r;const o=Math.max(A,.01);A*=2,r*=A<=1?A:2-A,n*=o<=1?o:2-o;return[t,100*(0===A?2*n/(o+n):2*r/(A+r)),100*((A+r)/2)]},o.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let A=e[2]/100;const n=Math.floor(t)%6,o=t-Math.floor(t),i=255*A*(1-r),s=255*A*(1-r*o),a=255*A*(1-r*(1-o));switch(A*=255,n){case 0:return[A,a,i];case 1:return[s,A,i];case 2:return[i,A,a];case 3:return[i,s,A];case 4:return[a,i,A];case 5:return[A,i,s]}},o.hsv.hsl=function(e){const t=e[0],r=e[1]/100,A=e[2]/100,n=Math.max(A,.01);let o,i;i=(2-r)*A;const s=(2-r)*n;return o=r*n,o/=s<=1?s:2-s,o=o||0,i/=2,[t,100*o,100*i]},o.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,A=e[2]/100;const n=r+A;let o;n>1&&(r/=n,A/=n);const i=Math.floor(6*t),s=1-A;o=6*t-i,0!=(1&i)&&(o=1-o);const a=r+o*(s-r);let c,g,l;switch(i){default:case 6:case 0:c=s,g=a,l=r;break;case 1:c=a,g=s,l=r;break;case 2:c=r,g=s,l=a;break;case 3:c=r,g=a,l=s;break;case 4:c=a,g=r,l=s;break;case 5:c=s,g=r,l=a}return[255*c,255*g,255*l]},o.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,A=e[2]/100,n=e[3]/100;return[255*(1-Math.min(1,t*(1-n)+n)),255*(1-Math.min(1,r*(1-n)+n)),255*(1-Math.min(1,A*(1-n)+n))]},o.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,A=e[2]/100;let n,o,i;return n=3.2406*t+-1.5372*r+-.4986*A,o=-.9689*t+1.8758*r+.0415*A,i=.0557*t+-.204*r+1.057*A,n=n>.0031308?1.055*n**(1/2.4)-.055:12.92*n,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,n=Math.min(Math.max(0,n),1),o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),[255*n,255*o,255*i]},o.xyz.lab=function(e){let t=e[0],r=e[1],A=e[2];t/=95.047,r/=100,A/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,A=A>.008856?A**(1/3):7.787*A+16/116;return[116*r-16,500*(t-r),200*(r-A)]},o.lab.xyz=function(e){let t,r,A;r=(e[0]+16)/116,t=e[1]/500+r,A=r-e[2]/200;const n=r**3,o=t**3,i=A**3;return r=n>.008856?n:(r-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,A=i>.008856?i:(A-16/116)/7.787,t*=95.047,r*=100,A*=108.883,[t,r,A]},o.lab.lch=function(e){const t=e[0],r=e[1],A=e[2];let n;n=360*Math.atan2(A,r)/2/Math.PI,n<0&&(n+=360);return[t,Math.sqrt(r*r+A*A),n]},o.lch.lab=function(e){const t=e[0],r=e[1],A=e[2]/360*2*Math.PI;return[t,r*Math.cos(A),r*Math.sin(A)]},o.rgb.ansi16=function(e,t=null){const[r,A,n]=e;let i=null===t?o.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),0===i)return 30;let s=30+(Math.round(n/255)<<2|Math.round(A/255)<<1|Math.round(r/255));return 2===i&&(s+=60),s},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){const t=e[0],r=e[1],A=e[2];if(t===r&&r===A)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(A/255*5)},o.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},o.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},o.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map(e=>e+e).join(""));const A=parseInt(r,16);return[A>>16&255,A>>8&255,255&A]},o.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,A=e[2]/255,n=Math.max(Math.max(t,r),A),o=Math.min(Math.min(t,r),A),i=n-o;let s,a;return s=i<1?o/(1-i):0,a=i<=0?0:n===t?(r-A)/i%6:n===r?2+(A-t)/i:4+(t-r)/i,a/=6,a%=1,[360*a,100*i,100*s]},o.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,A=r<.5?2*t*r:2*t*(1-r);let n=0;return A<1&&(n=(r-.5*A)/(1-A)),[e[0],100*A,100*n]},o.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,A=t*r;let n=0;return A<1&&(n=(r-A)/(1-A)),[e[0],100*A,100*n]},o.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,A=e[2]/100;if(0===r)return[255*A,255*A,255*A];const n=[0,0,0],o=t%1*6,i=o%1,s=1-i;let a=0;switch(Math.floor(o)){case 0:n[0]=1,n[1]=i,n[2]=0;break;case 1:n[0]=s,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=i;break;case 3:n[0]=0,n[1]=s,n[2]=1;break;case 4:n[0]=i,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=s}return a=(1-r)*A,[255*(r*n[0]+a),255*(r*n[1]+a),255*(r*n[2]+a)]},o.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let A=0;return r>0&&(A=t/r),[e[0],100*A,100*r]},o.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let A=0;return r>0&&r<.5?A=t/(2*r):r>=.5&&r<1&&(A=t/(2*(1-r))),[e[0],100*A,100*r]},o.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},o.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,A=r-t;let n=0;return A<1&&(n=(r-A)/(1-A)),[e[0],100*A,100*n]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=function(e){return[0,0,e[0]]},o.gray.hsv=o.gray.hsl,o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},2744:(e,t,r)=>{const A=r(15311),n=r(78577),o={};Object.keys(A).forEach(e=>{o[e]={},Object.defineProperty(o[e],"channels",{value:A[e].channels}),Object.defineProperty(o[e],"labels",{value:A[e].labels});const t=n(e);Object.keys(t).forEach(r=>{const A=t[r];o[e][r]=function(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const A=e(t);if("object"==typeof A)for(let e=A.length,t=0;t1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(A)})}),e.exports=o},78577:(e,t,r)=>{const A=r(15311);function n(e){const t=function(){const e={},t=Object.keys(A);for(let r=t.length,A=0;A{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},67566:(e,t,r)=>{"use strict";const A=r(63129),n=r(14951),o=r(10779);function i(e,t,r){const i=n(e,t,r),s=A.spawn(i.command,i.args,i.options);return o.hookChildProcess(s,i),s}e.exports=i,e.exports.spawn=i,e.exports.sync=function(e,t,r){const i=n(e,t,r),s=A.spawnSync(i.command,i.args,i.options);return s.error=s.error||o.verifyENOENTSync(s.status,i),s},e.exports._parse=n,e.exports._enoent=o},10779:e=>{"use strict";const t="win32"===process.platform;function r(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function A(e,A){return t&&1===e&&!A.file?r(A.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;const n=e.emit;e.emit=function(t,o){if("exit"===t){const t=A(o,r);if(t)return n.call(e,"error",t)}return n.apply(e,arguments)}},verifyENOENT:A,verifyENOENTSync:function(e,A){return t&&1===e&&!A.file?r(A.original,"spawnSync"):null},notFoundError:r}},14951:(e,t,r)=>{"use strict";const A=r(85622),n=r(47447),o=r(27066),i=r(35187),s="win32"===process.platform,a=/\.(?:com|exe)$/i,c=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function g(e){if(!s)return e;const t=function(e){e.file=n(e);const t=e.file&&i(e.file);return t?(e.args.unshift(e.file),e.command=t,n(e)):e.file}(e),r=!a.test(t);if(e.options.forceShell||r){const r=c.test(t);e.command=A.normalize(e.command),e.command=o.command(e.command),e.args=e.args.map(e=>o.argument(e,r));const n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const A={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?A:g(A)}},27066:e=>{"use strict";const t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e=e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},35187:(e,t,r)=>{"use strict";const A=r(35747),n=r(91470);e.exports=function(e){const t=Buffer.alloc(150);let r;try{r=A.openSync(e,"r"),A.readSync(r,t,0,150,0),A.closeSync(r)}catch(e){}return n(t.toString())}},47447:(e,t,r)=>{"use strict";const A=r(85622),n=r(87945),o=r(37127);function i(e,t){const r=e.options.env||process.env,i=process.cwd(),s=null!=e.options.cwd,a=s&&void 0!==process.chdir&&!process.chdir.disabled;if(a)try{process.chdir(e.options.cwd)}catch(e){}let c;try{c=n.sync(e.command,{path:r[o({env:r})],pathExt:t?A.delimiter:void 0})}catch(e){}finally{a&&process.chdir(i)}return c&&(c=A.resolve(s?e.options.cwd:"",c)),c}e.exports=function(e){return i(e)||i(e,!0)}},93868:(e,t,r)=>{"use strict";const{Transform:A,PassThrough:n}=r(92413),o=r(78761),i=r(33527);e.exports=e=>{const t=(e.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(t))return e;const r="br"===t;if(r&&"function"!=typeof o.createBrotliDecompress)return e.destroy(new Error("Brotli is not supported on Node.js < 12")),e;let s=!0;const a=new A({transform(e,t,r){s=!1,r(null,e)},flush(e){e()}}),c=new n({autoDestroy:!1,destroy(t,r){e.destroy(),r(t)}}),g=r?o.createBrotliDecompress():o.createUnzip();return g.once("error",t=>{!s||e.readable?c.destroy(t):c.end()}),i(e,c),e.pipe(a).pipe(g).pipe(c),c}},93121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(4016),n=(e,t)=>{let r;if("function"==typeof t){r={connect:t}}else r=t;const n="function"==typeof r.connect,o="function"==typeof r.secureConnect,i="function"==typeof r.close,s=()=>{n&&r.connect(),e instanceof A.TLSSocket&&o&&(e.authorized?r.secureConnect():e.authorizationError||e.once("secureConnect",r.secureConnect)),i&&e.once("close",r.close)};e.writable&&!e.connecting?s():e.connecting?e.once("connect",s):e.destroyed&&i&&r.close(e._hadError)};t.default=n,e.exports=n,e.exports.default=n},66241:(e,t,r)=>{"use strict";const A=r(85622),n=r(5763),o=e=>e.length>1?`{${e.join(",")}}`:e[0],i=(e,t)=>{const r="!"===e[0]?e.slice(1):e;return A.isAbsolute(r)?r:A.join(t,r)},s=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>{return A.posix.join(e,(n=r,i=t.extensions,A.extname(n)?"**/"+n:`**/${n}.${o(i)}`));var n,i}):t.files?t.files.map(t=>A.posix.join(e,"**/"+t)):t.extensions?[A.posix.join(e,"**/*."+o(t.extensions))]:[A.posix.join(e,"**")]};e.exports=async(e,t)=>{if("string"!=typeof(t={cwd:process.cwd(),...t}).cwd)throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);const r=await Promise.all([].concat(e).map(async e=>await n.isDirectory(i(e,t.cwd))?s(e,t):e));return[].concat.apply([],r)},e.exports.sync=(e,t)=>{if("string"!=typeof(t={cwd:process.cwd(),...t}).cwd)throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);const r=[].concat(e).map(e=>n.isDirectorySync(i(e,t.cwd))?s(e,t):e);return[].concat.apply([],r)}},97681:(e,t,r)=>{var A=r(91162),n=function(){},o=function(e,t,r){if("function"==typeof t)return o(e,null,t);t||(t={}),r=A(r||n);var i=e._writableState,s=e._readableState,a=t.readable||!1!==t.readable&&e.readable,c=t.writable||!1!==t.writable&&e.writable,g=function(){e.writable||l()},l=function(){c=!1,a||r()},u=function(){a=!1,c||r()},h=function(e){r(e?new Error("exited with error code: "+e):null)},p=function(){return(!a||s&&s.ended)&&(!c||i&&i.ended)?void 0:r(new Error("premature close"))},d=function(){e.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?c&&!i&&(e.on("end",g),e.on("close",g)):(e.on("complete",l),e.on("abort",p),e.req?d():e.on("request",d)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",h),e.on("end",u),e.on("finish",l),!1!==t.error&&e.on("error",r),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",d),e.req&&e.req.removeListener("finish",l),e.removeListener("end",g),e.removeListener("close",g),e.removeListener("finish",l),e.removeListener("exit",h),e.removeListener("end",u),e.removeListener("error",r),e.removeListener("close",p)}};e.exports=o},17067:(e,t,r)=>{var A=r(27180),n=function(){},o=function(e,t,r){if("function"==typeof t)return o(e,null,t);t||(t={}),r=A(r||n);var i=e._writableState,s=e._readableState,a=t.readable||!1!==t.readable&&e.readable,c=t.writable||!1!==t.writable&&e.writable,g=function(){e.writable||l()},l=function(){c=!1,a||r.call(e)},u=function(){a=!1,c||r.call(e)},h=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},p=function(t){r.call(e,t)},d=function(){return(!a||s&&s.ended)&&(!c||i&&i.ended)?void 0:r.call(e,new Error("premature close"))},C=function(){e.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?c&&!i&&(e.on("end",g),e.on("close",g)):(e.on("complete",l),e.on("abort",d),e.req?C():e.on("request",C)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",h),e.on("end",u),e.on("finish",l),!1!==t.error&&e.on("error",p),e.on("close",d),function(){e.removeListener("complete",l),e.removeListener("abort",d),e.removeListener("request",C),e.req&&e.req.removeListener("finish",l),e.removeListener("end",g),e.removeListener("close",g),e.removeListener("finish",l),e.removeListener("exit",h),e.removeListener("end",u),e.removeListener("error",p),e.removeListener("close",d)}};e.exports=o},61899:(e,t,r)=>{"use strict";const A=r(42357),n=r(28614),o=r(10278);class i extends n{constructor(e,t){super(),this.options=o.merge({},e),this.answers={...t}}register(e,t){if(o.isObject(e)){for(let t of Object.keys(e))this.register(t,e[t]);return this}A.equal(typeof t,"function","expected a function");let r=e.toLowerCase();return t.prototype instanceof this.Prompt?this.prompts[r]=t:this.prompts[r]=t(this.Prompt,this),this}async prompt(e=[]){for(let t of[].concat(e))try{"function"==typeof t&&(t=await t.call(this)),await this.ask(o.merge({},this.options,t))}catch(e){return Promise.reject(e)}return this.answers}async ask(e){"function"==typeof e&&(e=await e.call(this));let t=o.merge({},this.options,e),{type:r,name:n}=e,{set:i,get:s}=o;if("function"==typeof r&&(r=await r.call(this,e,this.answers)),!r)return this.answers[n];A(this.prompts[r],`Prompt "${r}" is not registered`);let a=new this.prompts[r](t),c=s(this.answers,n);a.state.answers=this.answers,a.enquirer=this,n&&a.on("submit",e=>{this.emit("answer",n,e,a),i(this.answers,n,e)});let g=a.emit.bind(a);return a.emit=(...e)=>(this.emit.call(this,...e),g(...e)),this.emit("prompt",a,this),t.autofill&&null!=c?(a.value=a.input=c,"show"===t.autofill&&await a.submit()):c=a.value=await a.run(),c}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||r(58386)}static get prompts(){return r(53609)}static get types(){return r(13235)}static get prompt(){const e=(t,...r)=>{let A=new this(...r),n=A.emit.bind(A);return A.emit=(...t)=>(e.emit(...t),n(...t)),A.prompt(t)};return o.mixinEmitter(e,new n),e}}o.mixinEmitter(i,new n);const s=i.prompts;for(let e of Object.keys(s)){let t=e.toLowerCase(),r=t=>new s[e](t).run();i.prompt[t]=r,i[t]=r,i[e]||Reflect.defineProperty(i,e,{get:()=>s[e]})}const a=e=>{o.defineExport(i,e,()=>i.types[e])};a("ArrayPrompt"),a("AuthPrompt"),a("BooleanPrompt"),a("NumberPrompt"),a("StringPrompt"),e.exports=i},72380:(e,t,r)=>{"use strict";const A="Apple_Terminal"===process.env.TERM_PROGRAM,n=r(97991),o=r(10278),i=e.exports=t,s="[";let a=!1;const c=i.code={bell:"",beep:"",beginning:"",down:"",esc:s,getPosition:"",hide:"[?25l",line:"",lineEnd:"",lineStart:"",restorePosition:s+(A?"8":"u"),savePosition:s+(A?"7":"s"),screen:"",show:"[?25h",up:""},g=i.cursor={get hidden(){return a},hide:()=>(a=!0,c.hide),show:()=>(a=!1,c.show),forward:(e=1)=>`[${e}C`,backward:(e=1)=>`[${e}D`,nextLine:(e=1)=>"".repeat(e),prevLine:(e=1)=>"".repeat(e),up:(e=1)=>e?`[${e}A`:"",down:(e=1)=>e?`[${e}B`:"",right:(e=1)=>e?`[${e}C`:"",left:(e=1)=>e?`[${e}D`:"",to:(e,t)=>t?`[${t+1};${e+1}H`:`[${e+1}G`,move(e=0,t=0){let r="";return r+=e<0?g.left(-e):e>0?g.right(e):"",r+=t<0?g.up(-t):t>0?g.down(t):"",r},restore(e={}){let{after:t,cursor:r,initial:A,input:n,prompt:s,size:a,value:c}=e;if(A=o.isPrimitive(A)?String(A):"",n=o.isPrimitive(n)?String(n):"",c=o.isPrimitive(c)?String(c):"",a){let e=i.cursor.up(a)+i.cursor.to(s.length),t=n.length-r;return t>0&&(e+=i.cursor.left(t)),e}if(c||t){let e=!n&&A?-A.length:-n.length+r;return t&&(e-=t.length),""===n&&A&&!s.includes(A)&&(e+=A.length),i.cursor.move(e)}}},l=i.erase={screen:c.screen,up:c.up,down:c.down,line:c.line,lineEnd:c.lineEnd,lineStart:c.lineStart,lines(e){let t="";for(let r=0;r{if(!t)return l.line+g.to(0);let r=e.split(/\r?\n/),A=0;for(let e of r)A+=1+Math.floor(Math.max((o=e,[...n.unstyle(o)].length-1),0)/t);var o;return(l.line+g.prevLine()).repeat(A-1)+l.line+g.to(0)}},62475:(e,t)=>{"use strict";t.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"},t.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"},t.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"},t.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"},t.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}},64083:e=>{"use strict";const t=e=>(e=>e.filter((t,r)=>e.lastIndexOf(t)===r))(e).filter(Boolean);e.exports=(e,r={},A="")=>{let n,o,{past:i=[],present:s=""}=r;switch(e){case"prev":case"undo":return n=i.slice(0,i.length-1),o=i[i.length-1]||"",{past:t([A,...n]),present:o};case"next":case"redo":return n=i.slice(1),o=i[0]||"",{past:t([...n,A]),present:o};case"save":return{past:t([...i,A]),present:""};case"remove":return o=t(i.filter(e=>e!==A)),s="",o.length&&(s=o.pop()),{past:o,present:s};default:throw new Error(`Invalid action: "${e}"`)}}},84368:(e,t,r)=>{"use strict";const A=r(97991);class n{constructor(e){this.name=e.key,this.field=e.field||{},this.value=((e="")=>"string"==typeof e?e.replace(/^['"]|['"]$/g,""):"")(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}}function o(e,t,r,A){return(r,n,o,i)=>"function"==typeof o.field[e]?o.field[e].call(t,r,n,o,i):[A,r].find(e=>t.isValue(e))}e.exports=async e=>{let t=e.options,r=new Set(!0===t.required?[]:t.required||[]),i={...t.values,...t.initial},{tabstops:s,items:a,keys:c}=await(async(e={},t={},r=(e=>e))=>{let A=new Set,o=e.fields||[],i=e.template,s=[],a=[],c=[],g=1;"function"==typeof i&&(i=await i());let l=-1,u=()=>i[++l],h=()=>i[l+1],p=e=>{e.line=g,s.push(e)};for(p({type:"bos",value:""});le.name===s.key);s.field=o.find(e=>e.name===s.key),g||(g=new n(s),a.push(g)),g.lines.push(s.line-1);continue}let i=s[s.length-1];"text"===i.type&&i.line===g?i.value+=e:p({type:"text",value:e})}return p({type:"eos",value:""}),{input:i,tabstops:s,unique:A,keys:c,items:a}})(t,i),g=o("result",e,t),l=o("format",e,t),u=o("validate",e,t,!0),h=e.isValue.bind(e);return async(n={},o=!1)=>{let i=0;n.required=r,n.items=a,n.keys=c,n.output="";let p=async(e,t,r,A)=>{let n=await u(e,t,r,A);return!1===n?"Invalid field "+r.name:n};for(let r of s){let s=r.value,c=r.key;if("template"===r.type){if("template"===r.type){let u=a.find(e=>e.name===c);!0===t.required&&n.required.add(u.name);let d=[u.input,n.values[u.value],u.value,s].find(h),C=(u.field||{}).message||r.inner;if(o){let e=await p(n.values[c],n,u,i);if(e&&"string"==typeof e||!1===e){n.invalid.set(c,e);continue}n.invalid.delete(c);let t=await g(n.values[c],n,u,i);n.output+=A.unstyle(t);continue}u.placeholder=!1;let f=s;s=await l(s,n,u,i),d!==s?(n.values[c]=d,s=e.styles.typing(d),n.missing.delete(C)):(n.values[c]=void 0,d=`<${C}>`,s=e.styles.primary(d),u.placeholder=!0,n.required.has(c)&&n.missing.add(C)),n.missing.has(C)&&n.validating&&(s=e.styles.warning(d)),n.invalid.has(c)&&n.validating&&(s=e.styles.danger(d)),i===n.index&&(s=f!==s?e.styles.underline(s):e.styles.heading(A.unstyle(s))),i++}s&&(n.output+=s)}else s&&(n.output+=s)}let d=n.output.split("\n").map(e=>" "+e),C=a.length,f=0;for(let t of a)n.invalid.has(t.name)&&t.lines.forEach(e=>{" "===d[e][0]&&(d[e]=n.styles.danger(n.symbols.bullet)+d[e].slice(1))}),e.isValue(n.values[t.name])&&f++;return n.completed=(f/C*100).toFixed(0),n.output=d.join("\n"),n.output}}},30650:(e,t,r)=>{"use strict";const A=r(51058),n=r(62475),o=/^(?:\x1b)([a-zA-Z0-9])$/,i=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,s={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};const a=(e="",t={})=>{let r,A={name:t.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:e,raw:e,...t};if(Buffer.isBuffer(e)?e[0]>127&&void 0===e[1]?(e[0]-=128,e=""+String(e)):e=String(e):void 0!==e&&"string"!=typeof e?e=String(e):e||(e=A.sequence||""),A.sequence=A.sequence||e||A.name,"\r"===e)A.raw=void 0,A.name="return";else if("\n"===e)A.name="enter";else if("\t"===e)A.name="tab";else if("\b"===e||""===e||""===e||"\b"===e)A.name="backspace",A.meta=""===e.charAt(0);else if(""===e||""===e)A.name="escape",A.meta=2===e.length;else if(" "===e||" "===e)A.name="space",A.meta=2===e.length;else if(e<="")A.name=String.fromCharCode(e.charCodeAt(0)+"a".charCodeAt(0)-1),A.ctrl=!0;else if(1===e.length&&e>="0"&&e<="9")A.name="number";else if(1===e.length&&e>="a"&&e<="z")A.name=e;else if(1===e.length&&e>="A"&&e<="Z")A.name=e.toLowerCase(),A.shift=!0;else if(r=o.exec(e))A.meta=!0,A.shift=/^[A-Z]$/.test(r[1]);else if(r=i.exec(e)){let t=[...e];""===t[0]&&""===t[1]&&(A.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),o=(r[3]||r[5]||1)-1;A.ctrl=!!(4&o),A.meta=!!(10&o),A.shift=!!(1&o),A.code=n,A.name=s[n],A.shift=function(e){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(e)}(n)||A.shift,A.ctrl=function(e){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(e)}(n)||A.ctrl}return A};a.listen=(e={},t)=>{let{stdin:r}=e;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let n=A.createInterface({terminal:!0,input:r});A.emitKeypressEvents(r,n);let o=(e,r)=>t(e,a(e,r),n),i=r.isRaw;r.isTTY&&r.setRawMode(!0),r.on("keypress",o),n.resume();return()=>{r.isTTY&&r.setRawMode(i),r.removeListener("keypress",o),n.pause(),n.close()}},a.action=(e,t,r)=>{let A={...n,...r};return t.ctrl?(t.action=A.ctrl[t.name],t):t.option&&A.option?(t.action=A.option[t.name],t):t.shift?(t.action=A.shift[t.name],t):(t.action=A.keys[t.name],t)},e.exports=a},96496:(e,t,r)=>{"use strict";const A=r(10278);e.exports=(e,t={})=>{e.cursorHide();let{input:r="",initial:n="",pos:o,showCursor:i=!0,color:s}=t,a=s||e.styles.placeholder,c=A.inverse(e.styles.primary),g=t=>c(e.styles.black(t)),l=r,u=g(" ");if(e.blink&&!0===e.blink.off&&(g=e=>e,u=""),i&&0===o&&""===n&&""===r)return g(" ");if(i&&0===o&&(r===n||""===r))return g(n[0])+a(n.slice(1));n=A.isPrimitive(n)?""+n:"",r=A.isPrimitive(r)?""+r:"";let h=n&&n.startsWith(r)&&n!==r,p=h?g(n[r.length]):u;if(o!==r.length&&!0===i&&(l=r.slice(0,o)+g(r[o])+r.slice(o+1),p=""),!1===i&&(p=""),h){let t=e.styles.unstyle(l+p);return l+p+a(n.slice(t.length))}return l+p}},58386:(e,t,r)=>{"use strict";const A=r(28614),n=r(97991),o=r(30650),i=r(47159),s=r(61807),a=r(26205),c=r(10278),g=r(72380);class l extends A{constructor(e={}){super(),this.name=e.name,this.type=e.type,this.options=e,a(this),i(this),this.state=new s(this),this.initial=[e.initial,e.default].find(e=>null!=e),this.stdout=e.stdout||process.stdout,this.stdin=e.stdin||process.stdin,this.scale=e.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=function(e){"number"==typeof e&&(e=[e,e,e,e]);let t=[].concat(e||[]),r=e=>e%2==0?"\n":" ",A=[];for(let e=0;e<4;e++){let n=r(e);t[e]?A.push(n.repeat(t[e])):A.push("")}return A}(this.options.margin),this.setMaxListeners(0),function(e){let t=t=>void 0===e[t]||"function"==typeof e[t],r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],A=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let n of Object.keys(e.options)){if(r.includes(n))continue;if(/^on[A-Z]/.test(n))continue;let o=e.options[n];"function"==typeof o&&t(n)?A.includes(n)||(e[n]=o.bind(e)):"function"!=typeof e[n]&&(e[n]=o)}}(this)}async keypress(e,t={}){this.keypressed=!0;let r=o.action(e,o(e,t),this.options.actions);this.state.keypress=r,this.emit("keypress",e,r),this.emit("state",this.state.clone());let A=this.options[r.action]||this[r.action]||this.dispatch;if("function"==typeof A)return await A.call(this,e,r);this.alert()}alert(){delete this.state.alert,!1===this.options.show?this.emit("alert"):this.stdout.write(g.code.beep)}cursorHide(){this.stdout.write(g.cursor.hide()),c.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(g.cursor.show())}write(e){e&&(this.stdout&&!1!==this.state.show&&this.stdout.write(e),this.state.buffer+=e)}clear(e=0){let t=this.state.buffer;this.state.buffer="",(t||e)&&!1!==this.options.show&&this.stdout.write(g.cursor.down(e)+g.clear(t,this.width))}restore(){if(this.state.closed||!1===this.options.show)return;let{prompt:e,after:t,rest:r}=this.sections(),{cursor:A,initial:n="",input:o="",value:i=""}=this,s={after:t,cursor:A,initial:n,input:o,prompt:e,size:this.state.size=r.length,value:i},a=g.cursor.restore(s);a&&this.stdout.write(a)}sections(){let{buffer:e,input:t,prompt:r}=this.state;r=n.unstyle(r);let A=n.unstyle(e),o=A.indexOf(r),i=A.slice(0,o),s=A.slice(o).split("\n"),a=s[0],c=s[s.length-1],g=(r+(t?" "+t:"")).length,l=ge.call(this,this.value),this.result=()=>r.call(this,this.value),"function"==typeof t.initial&&(this.initial=await t.initial.call(this,this)),"function"==typeof t.onRun&&await t.onRun.call(this,this),"function"==typeof t.onSubmit){let e=t.onSubmit.bind(this),r=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await e(this.name,this.value,this),r())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,t)=>{if(this.once("submit",e),this.once("cancel",t),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,t,r){let{options:A,state:n,symbols:o,timers:i}=this,s=i&&i[e];n.timer=s;let a=A[e]||n[e]||o[e],c=t&&null!=t[e]?t[e]:await a;if(""===c)return c;let g=await this.resolve(c,n,t,r);return!g&&t&&t[e]?this.resolve(a,n,t,r):g}async prefix(){let e=await this.element("prefix")||this.symbols,t=this.timers&&this.timers.prefix,r=this.state;if(r.timer=t,c.isObject(e)&&(e=e[r.status]||e.pending),!c.hasColor(e)){return(this.styles[r.status]||this.styles.pending)(e)}return e}async message(){let e=await this.element("message");return c.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,t=this.timers&&this.timers.separator,r=this.state;r.timer=t;let A=e[r.status]||e.pending||r.separator,n=await this.resolve(A,r);return c.isObject(n)&&(n=n[r.status]||n.pending),c.hasColor(n)?n:this.styles.muted(n)}async pointer(e,t){let r=await this.element("pointer",e,t);if("string"==typeof r&&c.hasColor(r))return r;if(r){let e=this.styles,A=this.index===t,n=A?e.primary:e=>e,o=await this.resolve(r[A?"on":"off"]||r,this.state),i=c.hasColor(o)?o:n(o);return A?i:" ".repeat(o.length)}}async indicator(e,t){let r=await this.element("indicator",e,t);if("string"==typeof r&&c.hasColor(r))return r;if(r){let t=this.styles,A=!0===e.enabled,n=A?t.success:t.dark,o=r[A?"on":"off"]||r;return c.hasColor(o)?o:n(o)}return""}body(){return null}footer(){if("pending"===this.state.status)return this.element("footer")}header(){if("pending"===this.state.status)return this.element("header")}async hint(){if("pending"===this.state.status&&!this.isValue(this.state.input)){let e=await this.element("hint");return c.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return!0!==this.options.required||this.isValue(e)}isValue(e){return null!=e&&""!==e}resolve(e,...t){return c.resolve(this,e,...t)}get base(){return l.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||c.height(this.stdout,25)}get width(){return this.options.columns||c.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:t}=this.state,r=[t,e].find(this.isValue.bind(this));return this.isValue(r)?r:this.initial}static get prompt(){return e=>new this(e).run()}}e.exports=l},63310:(e,t,r)=>{"use strict";const A=r(31557);e.exports=class extends A{constructor(e){super(e),this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:t,input:r}=this.state;return this.input=r.slice(0,t)+e+r.slice(t),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:t}=this.state;return t?(this.input=t.slice(0,e-1)+t.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:t}=this.state;return void 0===t[e]?this.alert():(this.input=(""+t).slice(0,e)+(""+t).slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,t=this.state._choices){if("function"==typeof this.options.suggest)return this.options.suggest.call(this,e,t);let r=e.toLowerCase();return t.filter(e=>e.message.toLowerCase().includes(r))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if("pending"!==this.state.status)return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,t=((e,t)=>{let r=e.toLowerCase();return e=>{let A=e.toLowerCase().indexOf(r),n=t(e.slice(A,A+r.length));return A>=0?e.slice(0,A)+n+e.slice(A+r.length):e}})(this.input,e),r=this.choices;this.choices=r.map(e=>({...e,message:t(e.message)})),await super.render(),this.choices=r}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}}},52810:(e,t,r)=>{"use strict";const A=r(46614);function n(e,t){return e.username===this.options.username&&e.password===this.options.password}const o=(e=n)=>{const t=[{name:"username",message:"username"},{name:"password",message:"password",format(e){if(this.options.showPassword)return e;return(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length))}}];class r extends(A.create(e)){constructor(e){super({...e,choices:t})}static create(e){return o(e)}}return r};e.exports=o()},65742:(e,t,r)=>{"use strict";const A=r(82710);e.exports=class extends A{constructor(e){super(e),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}}},24570:(e,t,r)=>{"use strict";const A=r(31557),n=r(71447).prototype;e.exports=class extends A{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,"left"].find(e=>null!=e),this.emptyError="",this.values={}}dispatch(e,t){let r=this.focused,A=r.parent||{};return r.editable||A.editable||"a"!==e&&"i"!==e?n.dispatch.call(this,e,t):super[e]()}append(e,t){return n.append.call(this,e,t)}delete(e,t){return n.delete.call(this,e,t)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?n.next.call(this):super.next()}prev(){return this.focused.editable?n.prev.call(this):super.prev()}async indicator(e,t){let r=e.indicator||"",A=e.editable?r:super.indicator(e,t);return await this.resolve(A,this.state,e,t)||""}indent(e){return"heading"===e.role?"":e.editable?" ":" "}async renderChoice(e,t){return e.indent="",e.editable?n.renderChoice.call(this,e,t):super.renderChoice(e,t)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let t of this.choices){if("function"!=typeof t.validate)continue;if("heading"===t.role)continue;let r=t.parent?this.value[t.parent.name]:this.value;if(t.editable?r=t.value===t.name?t.initial||"":t.value:this.isDisabled(t)||(r=!0===t.enabled),e=await t.validate(r,this.state),!0!==e)break}return!0!==e&&(this.state.error="string"==typeof e?e:"Invalid Input"),e}submit(){if(!0===this.focused.newChoice)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let t=e.parent?this.value[e.parent.name]:this.value;"heading"!==e.role?e.editable?t[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(t[e.name]=!0===e.enabled):this.value[e.name]={}}return this.base.submit.call(this)}}},71447:(e,t,r)=>{"use strict";const A=r(97991),n=r(31557),o=r(96496);e.exports=class extends n{constructor(e){super({...e,multiple:!0}),this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(e=>null!=e),this.emptyError="",this.values={}}async reset(e){return await super.reset(),!0===e&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(e=>e.reset&&e.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let t=this.focused;if(!t)return this.alert();let{cursor:r,input:A}=t;return t.value=t.input=A.slice(0,r)+e+A.slice(r),t.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:t,input:r}=e;return e.value=e.input=r.slice(0,t-1)+r.slice(t),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:t,input:r}=e;if(void 0===r[t])return this.alert();let A=(""+r).slice(0,t)+(""+r).slice(t+1);return e.value=e.input=A,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,t){return this.dispatch(e,t)}number(e,t){return this.dispatch(e,t)}next(){let e=this.focused;if(!e)return this.alert();let{initial:t,input:r}=e;return t&&t.startsWith(r)&&r!==t?(e.value=e.input=t,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?0===e.cursor?super.prev():(e.value=e.input="",e.cursor=0,this.render()):this.alert()}separator(){return""}format(e){return this.state.submitted?"":super.format(e)}pointer(){return""}indicator(e){return e.input?"⦿":"⊙"}async choiceSeparator(e,t){let r=await this.resolve(e.separator,this.state,e,t)||":";return r?" "+this.styles.disabled(r):""}async renderChoice(e,t){await this.onChoice(e,t);let{state:r,styles:n}=this,{cursor:i,initial:s="",name:a,hint:c,input:g=""}=e,{muted:l,submitted:u,primary:h,danger:p}=n,d=c,C=this.index===t,f=e.validate||(()=>!0),I=await this.choiceSeparator(e,t),E=e.message;"right"===this.align&&(E=E.padStart(this.longest+1," ")),"left"===this.align&&(E=E.padEnd(this.longest+1," "));let B=this.values[a]=g||s,y=g?"success":"dark";!0!==await f.call(e,B,this.state)&&(y="danger");let m=(0,n[y])(await this.indicator(e,t))+(e.pad||""),w=this.indent(e),Q=()=>[w,m,E+I,g,d].filter(Boolean).join(" ");if(r.submitted)return E=A.unstyle(E),g=u(g),d="",Q();if(e.format)g=await e.format.call(this,g,e,t);else{let e=this.styles.muted;g=o(this,{input:g,initial:s,pos:i,showCursor:C,color:e})}return this.isValue(g)||(g=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[a]=await e.result.call(this,B,e,t)),C&&(E=h(E)),e.error?g+=(g?" ":"")+p(e.error.trim()):e.hint&&(g+=(g?" ":"")+l(e.hint.trim())),Q()}async submit(){return this.value=this.values,super.base.submit.call(this)}}},53609:(e,t,r)=>{"use strict";const A=r(10278),n=(e,r)=>{A.defineExport(t,e,r),A.defineExport(t,e.toLowerCase(),r)};n("AutoComplete",()=>r(63310)),n("BasicAuth",()=>r(52810)),n("Confirm",()=>r(65742)),n("Editable",()=>r(24570)),n("Form",()=>r(71447)),n("Input",()=>r(12372)),n("Invisible",()=>r(32684)),n("List",()=>r(40876)),n("MultiSelect",()=>r(42293)),n("Numeral",()=>r(42126)),n("Password",()=>r(84697)),n("Scale",()=>r(99580)),n("Select",()=>r(31557)),n("Snippet",()=>r(98094)),n("Sort",()=>r(60042)),n("Survey",()=>r(25223)),n("Text",()=>r(97298)),n("Toggle",()=>r(41817)),n("Quiz",()=>r(88677))},12372:(e,t,r)=>{"use strict";const A=r(45853),n=r(64083);e.exports=class extends A{constructor(e){super(e);let t=this.options.history;if(t&&t.store){let e=t.values||this.initial;this.autosave=!!t.autosave,this.store=t.store,this.data=this.store.get("values")||{past:[],present:e},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=n(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){this.store&&(this.data=n("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&!0===this.autosave&&this.save(),super.submit()}}},32684:(e,t,r)=>{"use strict";const A=r(45853);e.exports=class extends A{format(){return""}}},40876:(e,t,r)=>{"use strict";const A=r(45853);e.exports=class extends A{constructor(e={}){super(e),this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:e=>e;return this.list.map(e).join(", ")}async submit(e){let t=this.state.error||await this.validate(this.list,this.state);return!0!==t?(this.state.error=t,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}}},42293:(e,t,r)=>{"use strict";const A=r(31557);e.exports=class extends A{constructor(e){super({...e,multiple:!0})}}},42126:(e,t,r)=>{e.exports=r(64987)},84697:(e,t,r)=>{"use strict";const A=r(45853);e.exports=class extends A{constructor(e){super(e),this.cursorShow()}format(e=this.input){if(!this.keypressed)return"";return(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length))}}},88677:(e,t,r)=>{"use strict";const A=r(31557);e.exports=class extends A{constructor(e){if(super(e),"number"!=typeof this.options.correctChoice||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,t){let r=await super.toChoices(e,t);if(r.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>r.length)throw new Error("Please specify the index of the correct answer from the list of choices");return r}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}}},99580:(e,t,r)=>{"use strict";const A=r(97991),n=r(14723),o=r(10278);e.exports=class extends n{constructor(e={}){super(e),this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||"left"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||"\n ";let t=e.startNumber||1;"number"==typeof this.scale&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((e,r)=>({name:r+t})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(!0===this.tableized)return;this.tableized=!0;let e=0;for(let t of this.choices){e=Math.max(e,t.message.length),t.scaleIndex=t.initial||2,t.scale=[];for(let e=0;e=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){if(this.state.submitted){return this.choices.map(e=>this.styles.info(e.index)).join(", ")}return""}pointer(){return""}renderScaleKey(){if(!1===this.scaleKey)return"";if(this.state.submitted)return"";return["",...this.scale.map(e=>` ${e.name} - ${e.message}`)].map(e=>this.styles.muted(e)).join("\n")}renderScaleHeading(e){let t=this.scale.map(e=>e.name);"function"==typeof this.options.renderScaleHeading&&(t=this.options.renderScaleHeading.call(this,e));let r=this.scaleLength-t.join("").length,A=Math.round(r/(t.length-1)),n=t.map(e=>this.styles.strong(e)).join(" ".repeat(A)),o=" ".repeat(this.widths[0]);return this.margin[3]+o+this.margin[1]+n}scaleIndicator(e,t,r){if("function"==typeof this.options.scaleIndicator)return this.options.scaleIndicator.call(this,e,t,r);let A=e.scaleIndex===t.index;return t.disabled?this.styles.hint(this.symbols.radio.disabled):A?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,t){let r=e.scale.map(r=>this.scaleIndicator(e,r,t)),A="Hyper"===this.term?"":" ";return r.join(A+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,t){await this.onChoice(e,t);let r=this.index===t,n=await this.pointer(e,t),i=await e.hint;i&&!o.hasColor(i)&&(i=this.styles.muted(i));let s=e=>this.margin[3]+e.replace(/\s+$/,"").padEnd(this.widths[0]," "),a=this.newline,c=this.indent(e),g=await this.resolve(e.message,this.state,e,t),l=await this.renderScale(e,t),u=this.margin[1]+this.margin[3];this.scaleLength=A.unstyle(l).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-u.length);let h=o.wordWrap(g,{width:this.widths[0],newline:a}).split("\n").map(e=>s(e)+this.margin[1]);return r&&(l=this.styles.info(l),h=h.map(e=>this.styles.info(e))),h[0]+=l,this.linebreak&&h.push(""),[c+n,h.join("\n")].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(e,t)=>await this.renderChoice(e,t)),t=await Promise.all(e),r=await this.renderScaleHeading();return this.margin[0]+[r,...t.map(e=>e.join(" "))].join("\n")}async render(){let{submitted:e,size:t}=this.state,r=await this.prefix(),A=await this.separator(),n=await this.message(),o="";!1!==this.options.promptLine&&(o=[r,n,A,""].join(" "),this.state.prompt=o);let i=await this.header(),s=await this.format(),a=await this.renderScaleKey(),c=await this.error()||await this.hint(),g=await this.renderChoices(),l=await this.footer(),u=this.emptyError;s&&(o+=s),c&&!o.includes(c)&&(o+=" "+c),e&&!s&&!g.trim()&&this.multiple&&null!=u&&(o+=this.styles.danger(u)),this.clear(t),this.write([i,o,a,g,l].filter(Boolean).join("\n")),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}}},31557:(e,t,r)=>{"use strict";const A=r(14723),n=r(10278);e.exports=class extends A{constructor(e){super(e),this.emptyError=this.options.emptyError||"No items were selected"}async dispatch(e,t){if(this.multiple)return this[t.name]?await this[t.name](e,t):await super.dispatch(e,t);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,t){return!this.multiple||this.options.pointer?super.pointer(e,t):""}indicator(e,t){return this.multiple?super.indicator(e,t):""}choiceMessage(e,t){let r=this.resolve(e.message,this.state,e,t);return"heading"!==e.role||n.hasColor(r)||(r=this.styles.strong(r)),this.resolve(r,this.state,e,t)}choiceSeparator(){return":"}async renderChoice(e,t){await this.onChoice(e,t);let r=this.index===t,A=await this.pointer(e,t),o=await this.indicator(e,t)+(e.pad||""),i=await this.resolve(e.hint,this.state,e,t);i&&!n.hasColor(i)&&(i=this.styles.muted(i));let s=this.indent(e),a=await this.choiceMessage(e,t),c=()=>[this.margin[3],s+A+o,a,this.margin[1],i].filter(Boolean).join(" ");return"heading"===e.role?c():e.disabled?(n.hasColor(a)||(a=this.styles.disabled(a)),c()):(r&&(a=this.styles.em(a)),c())}async renderChoices(){if("choices"===this.state.loading)return this.styles.warning("Loading choices");if(this.state.submitted)return"";let e=this.visible.map(async(e,t)=>await this.renderChoice(e,t)),t=await Promise.all(e);t.length||t.push(this.styles.danger("No matching choices"));let r,A=this.margin[0]+t.join("\n");return this.options.choicesHeader&&(r=await this.resolve(this.options.choicesHeader,this.state)),[r,A].filter(Boolean).join("\n")}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:t}=this.state,r="",A=await this.header(),n=await this.prefix(),o=await this.separator(),i=await this.message();!1!==this.options.promptLine&&(r=[n,i,o,""].join(" "),this.state.prompt=r);let s=await this.format(),a=await this.error()||await this.hint(),c=await this.renderChoices(),g=await this.footer();s&&(r+=s),a&&!r.includes(a)&&(r+=" "+a),e&&!s&&!c.trim()&&this.multiple&&null!=this.emptyError&&(r+=this.styles.danger(this.emptyError)),this.clear(t),this.write([A,r,c,g].filter(Boolean).join("\n")),this.write(this.margin[2]),this.restore()}}},98094:(e,t,r)=>{"use strict";const A=r(97991),n=r(84368),o=r(58386);e.exports=class extends o{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await n(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},!0!==e&&(await this.initialize(),await this.render())}moveCursor(e){let t=this.getItem();this.cursor+=e,t.cursor+=e}dispatch(e,t){t.code||t.ctrl||null==e||!this.getItem()?this.alert():this.append(e,t)}append(e,t){let r=this.getItem(),A=r.input.slice(0,this.cursor),n=r.input.slice(this.cursor);this.input=r.input=`${A}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let t=e.input.slice(this.cursor),r=e.input.slice(0,this.cursor-1);this.input=e.input=`${r}${t}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let t=this.state.completed<100?this.styles.warning:this.styles.success;return!0===this.state.submitted&&100!==this.state.completed&&(t=this.styles.danger),t(this.state.completed+"% completed")}async render(){let{index:e,keys:t=[],submitted:r,size:A}=this.state,n=[this.options.newline,"\n"].find(e=>null!=e),o=await this.prefix(),i=await this.separator(),s=[o,await this.message(),i].filter(Boolean).join(" ");this.state.prompt=s;let a=await this.header(),c=await this.error()||"",g=await this.hint()||"",l=r?"":await this.interpolate(this.state),u=this.state.key=t[e]||"",h=await this.format(u),p=await this.footer();h&&(s+=" "+h),g&&!h&&0===this.state.completed&&(s+=" "+g),this.clear(A);let d=[a,s,l,p,c.trim()];this.write(d.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:t,keys:r,index:A}=this.state,n=t.find(e=>e.name===r[A]);return n&&null!=n.input&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){"function"!=typeof this.interpolate&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:t,output:r,values:n}=this.state;if(e.size){let t="";for(let[r,A]of e)t+=`Invalid ${r}: ${A}\n`;return this.state.error=t,super.submit()}if(t.size)return this.state.error="Required: "+[...t.keys()].join(", "),super.submit();let o=A.unstyle(r).split("\n").map(e=>e.slice(1)).join("\n");return this.value={values:n,result:o},super.submit()}}},60042:(e,t,r)=>{"use strict";const A="(Use + to sort)",n=r(31557);e.exports=class extends n{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,A].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,t){let r=await super.renderChoice(e,t),A=this.symbols.identicalTo+" ",n=this.index===t&&this.sorting?this.styles.muted(A):" ";return!1===this.options.drag&&(n=""),!0===this.options.numbered?n+(t+1+" - ")+r:n+r}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}}},25223:(e,t,r)=>{"use strict";const A=r(14723);function n(e,t={}){if(Array.isArray(t.scale))return t.scale.map(e=>({...e}));let r=[];for(let t=1;tthis.styles.muted(e)),this.state.header=e.join("\n ")}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let t=await super.toChoices(...e);for(let e of t)e.scale=n(5,this.options),e.scaleIdx=2;return t}dispatch(){this.alert()}space(){let e=this.focused,t=e.scale[e.scaleIdx],r=t.selected;return e.scale.forEach(e=>e.selected=!1),t.selected=!r,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,t){await this.onChoice(e,t);let r=this.index===t,A="Hyper"===this.term,n=A?9:8,o=A?"":" ",i=this.symbols.line.repeat(n),s=" ".repeat(n+(A?0:1)),a=e=>(e?this.styles.success("◉"):"◯")+o,c=t+1+".",g=r?this.styles.heading:this.styles.noop,l=await this.resolve(e.message,this.state,e,t),u=this.indent(e),h=u+e.scale.map((t,r)=>a(r===e.scaleIdx)).join(i),p=u+e.scale.map((t,r)=>(t=>t===e.scaleIdx?g(t):t)(r)).join(s);return r&&(h=this.styles.cyan(h),p=this.styles.cyan(p)),[[c,l].filter(Boolean).join(" "),h,p," "].filter(Boolean).join("\n")}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(e,t)=>await this.renderChoice(e,t)),t=await Promise.all(e);return t.length||t.push(this.styles.danger("No matching choices")),t.join("\n")}format(){if(this.state.submitted){return this.choices.map(e=>this.styles.info(e.scaleIdx)).join(", ")}return""}async render(){let{submitted:e,size:t}=this.state,r=await this.prefix(),A=await this.separator(),n=[r,await this.message(),A].filter(Boolean).join(" ");this.state.prompt=n;let o=await this.header(),i=await this.format(),s=await this.error()||await this.hint(),a=await this.renderChoices(),c=await this.footer();!i&&s||(n+=" "+i),s&&!n.includes(s)&&(n+=" "+s),e&&!i&&!a&&this.multiple&&"form"!==this.type&&(n+=this.styles.danger(this.emptyError)),this.clear(t),this.write([n,o,a,c].filter(Boolean).join("\n")),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}}},97298:(e,t,r)=>{e.exports=r(12372)},41817:(e,t,r)=>{"use strict";const A=r(82710);e.exports=class extends A{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(!0===this.value)return this.alert();this.value=!0,this.render()}disable(){if(!1===this.value)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",t){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=e=>this.styles.primary.underline(e);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,t=await this.header(),r=await this.prefix(),A=await this.separator(),n=await this.message(),o=await this.format(),i=await this.error()||await this.hint(),s=await this.footer(),a=[r,n,A,o].join(" ");this.state.prompt=a,i&&!a.includes(i)&&(a+=" "+i),this.clear(e),this.write([t,a,s].filter(Boolean).join("\n")),this.write(this.margin[2]),this.restore()}}},27011:(e,t,r)=>{"use strict";const A=r(10278),n={default:(e,t)=>t,checkbox(e,t){throw new Error("checkbox role is not implemented yet")},editable(e,t){throw new Error("editable role is not implemented yet")},expandable(e,t){throw new Error("expandable role is not implemented yet")},heading:(e,t)=>(t.disabled="",t.indicator=[t.indicator," "].find(e=>null!=e),t.message=t.message||"",t),input(e,t){throw new Error("input role is not implemented yet")},option:(e,t)=>n.default(e,t),radio(e,t){throw new Error("radio role is not implemented yet")},separator:(e,t)=>(t.disabled="",t.indicator=[t.indicator," "].find(e=>null!=e),t.message=t.message||e.symbols.line.repeat(5),t),spacer:(e,t)=>t};e.exports=(e,t={})=>{let r=A.merge({},n,t.roles);return r[e]||r.default}},61807:(e,t,r)=>{"use strict";const{define:A,width:n}=r(10278);e.exports=class{constructor(e){let t=e.options;A(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=n(t.stdout||process.stdout),Object.assign(this,t),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let t=this._color||e[this.status];return"function"==typeof t?t:e.pending}set loading(e){this._loading=e}get loading(){return"boolean"==typeof this._loading?this._loading:!!this.loadingChoices&&"choices"}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}}},64402:(e,t,r)=>{"use strict";const A=r(10278),n=r(97991),o={default:n.noop,noop:n.noop,set inverse(e){this._inverse=e},get inverse(){return this._inverse||A.inverse(this.primary)},set complement(e){this._complement=e},get complement(){return this._complement||A.complement(this.primary)},primary:n.cyan,success:n.green,danger:n.magenta,strong:n.bold,warning:n.yellow,muted:n.dim,disabled:n.gray,dark:n.dim.gray,underline:n.underline,set info(e){this._info=e},get info(){return this._info||this.primary},set em(e){this._em=e},get em(){return this._em||this.primary.underline},set heading(e){this._heading=e},get heading(){return this._heading||this.muted.underline},set pending(e){this._pending=e},get pending(){return this._pending||this.primary},set submitted(e){this._submitted=e},get submitted(){return this._submitted||this.success},set cancelled(e){this._cancelled=e},get cancelled(){return this._cancelled||this.danger},set typing(e){this._typing=e},get typing(){return this._typing||this.dim},set placeholder(e){this._placeholder=e},get placeholder(){return this._placeholder||this.primary.dim},set highlight(e){this._highlight=e},get highlight(){return this._highlight||this.inverse},merge:(e={})=>{e.styles&&"boolean"==typeof e.styles.enabled&&(n.enabled=e.styles.enabled),e.styles&&"boolean"==typeof e.styles.visible&&(n.visible=e.styles.visible);let t=A.merge({},o,e.styles);delete t.merge;for(let e of Object.keys(n))t.hasOwnProperty(e)||Reflect.defineProperty(t,e,{get:()=>n[e]});for(let e of Object.keys(n.styles))t.hasOwnProperty(e)||Reflect.defineProperty(t,e,{get:()=>n[e]});return t}};e.exports=o},50511:(e,t,r)=>{"use strict";const A="win32"===process.platform,n=r(97991),o=r(10278),i={...n.symbols,upDownDoubleArrow:"⇕",upDownDoubleArrow2:"⬍",upDownArrow:"↕",asterisk:"*",asterism:"⁂",bulletWhite:"◦",electricArrow:"⌁",ellipsisLarge:"⋯",ellipsisSmall:"…",fullBlock:"█",identicalTo:"≡",indicator:n.symbols.check,leftAngle:"‹",mark:"※",minus:"−",multiplication:"×",obelus:"÷",percent:"%",pilcrow:"¶",pilcrow2:"❡",pencilUpRight:"✐",pencilDownRight:"✎",pencilRight:"✏",plus:"+",plusMinus:"±",pointRight:"☞",rightAngle:"›",section:"§",hexagon:{off:"⬡",on:"⬢",disabled:"⬢"},ballot:{on:"☑",off:"☐",disabled:"☒"},stars:{on:"★",off:"☆",disabled:"☆"},folder:{on:"▼",off:"▶",disabled:"▶"},prefix:{pending:n.symbols.question,submitted:n.symbols.check,cancelled:n.symbols.cross},separator:{pending:n.symbols.pointerSmall,submitted:n.symbols.middot,cancelled:n.symbols.middot},radio:{off:A?"( )":"◯",on:A?"(*)":"◉",disabled:A?"(|)":"Ⓘ"},numbers:["⓪","①","②","③","④","⑤","⑥","⑦","⑧","⑨","⑩","⑪","⑫","⑬","⑭","⑮","⑯","⑰","⑱","⑲","⑳","㉑","㉒","㉓","㉔","㉕","㉖","㉗","㉘","㉙","㉚","㉛","㉜","㉝","㉞","㉟","㊱","㊲","㊳","㊴","㊵","㊶","㊷","㊸","㊹","㊺","㊻","㊼","㊽","㊾","㊿"]};i.merge=e=>{let t=o.merge({},n.symbols,i,e.symbols);return delete t.merge,t},e.exports=i},26205:(e,t,r)=>{"use strict";const A=r(64402),n=r(50511),o=r(10278);e.exports=e=>{e.options=o.merge({},e.options.theme,e.options),e.symbols=n.merge(e.options),e.styles=A.merge(e.options)}},47159:e=>{"use strict";function t(e,t,r={}){let A=e.timers[t]={name:t,start:Date.now(),ms:0,tick:0},n=r.interval||120;A.frames=r.frames||[],A.loading=!0;let o=setInterval(()=>{A.ms=Date.now()-A.start,A.tick++,e.render()},n);return A.stop=()=>{A.loading=!1,clearInterval(o)},Reflect.defineProperty(A,"interval",{value:o}),e.once("close",()=>A.stop()),A.stop}e.exports=e=>{e.timers=e.timers||{};let r=e.options.timers;if(r)for(let A of Object.keys(r)){let n=r[A];"number"==typeof n&&(n={interval:n}),t(e,A,n)}}},14723:(e,t,r)=>{"use strict";const A=r(97991),n=r(58386),o=r(27011),i=r(10278),{reorder:s,scrollUp:a,scrollDown:c,isObject:g,swap:l}=i;function u(e,t){if(t instanceof Promise)return t;if("function"==typeof t){if(i.isAsyncFn(t))return t;t=t.call(e,e)}for(let r of t){if(Array.isArray(r.choices)){let t=r.choices.filter(t=>!e.isDisabled(t));r.enabled=t.every(e=>!0===e.enabled)}!0===e.isDisabled(r)&&delete r.enabled}return t}e.exports=class extends n{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){"function"==typeof this.options.initial&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:t,autofocus:r,suggest:A}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(e=>e.enabled=!1),"function"!=typeof A&&0===this.selectable.length)throw new Error("At least one choice must be selectable");g(t)&&(t=Object.keys(t)),Array.isArray(t)?(null!=r&&(this.index=this.findIndex(r)),t.forEach(e=>this.enable(this.find(e))),await this.render()):(null!=r&&(t=r),"string"==typeof t&&(t=this.findIndex(t)),"number"==typeof t&&t>-1&&(this.index=Math.max(0,Math.min(t,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,t){this.state.loadingChoices=!0;let r=[],A=0,n=async(e,t)=>{"function"==typeof e&&(e=await e.call(this)),e instanceof Promise&&(e=await e);for(let o=0;o(this.state.loadingChoices=!1,e))}async toChoice(e,t,r){if("function"==typeof e&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),"string"==typeof e&&(e={name:e}),e.normalized)return e;e.normalized=!0;let n=e.value,s=o(e.role,this.options);if("string"!=typeof(e=s(this,e)).disabled||e.hint||(e.hint=e.disabled,e.disabled=!0),!0===e.disabled&&null==e.hint&&(e.hint="(disabled)"),null!=e.index)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=t,e.cursor=0,i.define(e,"parent",r),e.level=r?r.level+1:1,null==e.indent&&(e.indent=r?r.indent+" ":e.indent||""),e.path=r?r.path+"."+e.name:e.name,e.enabled=!(!this.multiple||this.isDisabled(e)||!e.enabled&&!this.isSelected(e)),this.isDisabled(e)||(this.longest=Math.max(this.longest,A.unstyle(e.message).length));let a={...e};return e.reset=(t=a.input,r=a.value)=>{for(let t of Object.keys(a))e[t]=a[t];e.input=t,e.value=r},null==n&&"function"==typeof e.initial&&(e.input=await e.initial.call(this,this.state,e,t)),e}async onChoice(e,t){this.emit("choice",e,t,this),"function"==typeof e.onChoice&&await e.onChoice.call(this,this.state,e,t)}async addChoice(e,t,r){let A=await this.toChoice(e,t,r);return this.choices.push(A),this.index=this.choices.length-1,this.limit=this.choices.length,A}async newItem(e,t,r){let A={name:"New choice name?",editable:!0,newChoice:!0,...e},n=await this.addChoice(A,t,r);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(e){return null==e.indent?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,t){if(this.multiple&&this[t.name])return this[t.name]();this.alert()}focus(e,t){return"boolean"!=typeof t&&(t=e.enabled),t&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=t&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelectede.enabled);return this.choices.forEach(t=>t.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(e=>!!e.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,t){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();"boolean"!=typeof t&&(t=!e.enabled),e.enabled=t,e.choices&&e.choices.forEach(e=>this.toggle(e,t));let r=e.parent;for(;r;){let e=r.choices.filter(e=>this.isDisabled(e));r.enabled=e.every(e=>!0===e.enabled),r=r.parent}return u(this,this.choices),this.emit("toggle",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let t=e=>{let t=Number(e);if(t>this.choices.length-1)return this.alert();let r=this.focused,A=this.choices.find(e=>t===e.index);if(!A.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(-1===this.visible.indexOf(A)){let e=s(this.choices),t=e.indexOf(A);if(r.index>t){let r=e.slice(t,t+this.limit),A=e.filter(e=>!r.includes(e));this.choices=r.concat(A)}else{let r=t-this.limit+1;this.choices=e.slice(r).concat(e.slice(0,r))}}return this.index=this.choices.indexOf(A),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(e=>{let r=this.choices.length,A=this.num,n=(r=!1,n)=>{clearTimeout(this.numberTimeout),r&&(n=t(A)),this.num="",e(n)};return"0"===A||1===A.length&&Number(A+"0")>r?n(!0):Number(A)>r?n(!1,this.alert()):void(this.numberTimeout=setTimeout(()=>n(!0),this.delay))})}home(){return this.choices=s(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,t=s(this.choices);return this.choices=t.slice(e).concat(t.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,t=this.visible.length,r=this.index;return!1===this.options.scroll&&0===r?this.alert():e>t&&0===r?this.scrollUp():(this.index=(r-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,t=this.visible.length,r=this.index;return!1===this.options.scroll&&r===t-1?this.alert():e>t&&r===t-1?this.scrollDown():(this.index=(r+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=a(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=c(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){return!0===this.options.sort?(this.sorting=!0,this.swap(this.index-1),await this.up(),void(this.sorting=!1)):this.scrollUp(this.index)}async shiftDown(){return!0===this.options.sort?(this.sorting=!0,this.swap(this.index+1),await this.down(),void(this.sorting=!1)):this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){l(this.choices,this.index,e)}isDisabled(e=this.focused){return!(!e||!["disabled","collapsed","hidden","completing","readonly"].some(t=>!0===e[t]))||e&&"heading"===e.role}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(e=>this.isEnabled(e));if(e.choices){let t=e.choices.filter(e=>!this.isDisabled(e));return e.enabled&&t.every(e=>this.isEnabled(e))}return e.enabled&&!this.isDisabled(e)}isChoice(e,t){return e.name===t||e.index===Number(t)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(t=>this.isChoice(e,t)):this.isChoice(e,this.initial)}map(e=[],t="value"){return[].concat(e||[]).reduce((e,r)=>(e[r]=this.find(r,t),e),{})}filter(e,t){let r="function"==typeof e?e:(t,r)=>[t.name,r].includes(e),A=(this.options.multiple?this.state._choices:this.choices).filter(r);return t?A.map(e=>e[t]):A}find(e,t){if(g(e))return t?e[t]:e;let r="function"==typeof e?e:(t,r)=>[t.name,r].includes(e),A=this.choices.find(r);return A?t?A[t]:A:void 0}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(e=>e.newChoice))return this.alert();let{reorder:t,sort:r}=this.options,A=!0===this.multiple,n=this.selected;return void 0===n?this.alert():(Array.isArray(n)&&!1!==t&&!0!==r&&(n=i.reorder(n)),this.value=A?n.map(e=>e.name):n.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let t of e)this.state._choices.some(e=>e.name===t.name)||this.state._choices.push(t);if(!this._initial&&this.options.initial){this._initial=!0;let e=this.initial;if("string"==typeof e||"number"==typeof e){let t=this.find(e);t&&(this.initial=t.index,this.focus(t,!0))}}}get choices(){return u(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:t,choices:r}=this,A=e.limit||this._limit||t.limit||r.length;return Math.min(A,this.height)}set value(e){super.value=e}get value(){return"string"!=typeof super.value&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&!0!==this.multiple&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}}},46614:(e,t,r)=>{"use strict";const A=r(71447),n=()=>{throw new Error("expected prompt to have a custom authenticate method")},o=(e=n)=>class extends A{constructor(e){super(e)}async submit(){this.value=await e.call(this,this.values,this.state),super.base.submit.call(this)}static create(e){return o(e)}};e.exports=o()},82710:(e,t,r)=>{"use strict";const A=r(58386),{isPrimitive:n,hasColor:o}=r(10278);e.exports=class extends A{constructor(e){super(e),this.cursorHide()}async initialize(){let e=await this.resolve(this.initial,this.state);this.input=await this.cast(e),await super.initialize()}dispatch(e){return this.isValue(e)?(this.input=e,this.submit()):this.alert()}format(e){let{styles:t,state:r}=this;return r.submitted?t.success(e):t.primary(e)}cast(e){return this.isTrue(e)}isTrue(e){return/^[ty1]/i.test(e)}isFalse(e){return/^[fn0]/i.test(e)}isValue(e){return n(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if("pending"===this.state.status){let e=await this.element("hint");return o(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:t}=this.state,r=await this.prefix(),A=await this.separator(),n=[r,await this.message(),this.styles.muted(this.default),A].filter(Boolean).join(" ");this.state.prompt=n;let o=await this.header(),i=this.value=this.cast(e),s=await this.format(i),a=await this.error()||await this.hint(),c=await this.footer();a&&!n.includes(a)&&(s+=" "+a),n+=" "+s,this.clear(t),this.write([o,n,c].filter(Boolean).join("\n")),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}}},13235:(e,t,r)=>{e.exports={ArrayPrompt:r(14723),AuthPrompt:r(46614),BooleanPrompt:r(82710),NumberPrompt:r(64987),StringPrompt:r(45853)}},64987:(e,t,r)=>{"use strict";const A=r(45853);e.exports=class extends A{constructor(e={}){super({style:"number",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=null!=e.delay?e.delay:1e3,this.float=!1!==e.float,this.round=!0===e.round||!1===e.float,this.major=e.major||10,this.minor=e.minor||1,this.initial=null!=e.initial?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||"."===e&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let t=e||this.minor,r=this.toNumber(this.input);return r>this.max+t?this.alert():(this.input=""+(r+t),this.render())}down(e){let t=e||this.minor,r=this.toNumber(this.input);return rthis.isValue(e));return this.value=this.toNumber(e||0),super.submit()}}},45853:(e,t,r)=>{"use strict";const A=r(58386),n=r(96496),{isPrimitive:o}=r(10278);e.exports=class extends A{constructor(e){super(e),this.initial=o(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,t={}){let r=this.state.prevKeypress;return this.state.prevKeypress=t,!0!==this.options.multiline||"return"!==t.name||r&&"return"===r.name?super.keypress(e,t):this.append("\n",t)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,t){if(!e||t.ctrl||t.code)return this.alert();this.append(e)}append(e){let{cursor:t,input:r}=this.state;this.input=(""+r).slice(0,t)+e+(""+r).slice(t),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:t}=this.state;if(e<=0)return this.alert();this.input=(""+t).slice(0,e-1)+(""+t).slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:t}=this.state;if(void 0===t[e])return this.alert();this.input=(""+t).slice(0,e)+(""+t).slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(0===e)return this.alert();let t=this.input.slice(0,e),r=this.input.slice(e),A=t.split(" ");this.state.clipboard.push(A.pop()),this.input=A.join(" "),this.cursor=this.input.length,this.input+=r,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=null!=this.initial?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let t=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||t):n(this,{input:e,initial:t,pos:this.cursor})}async render(){let e=this.state.size,t=await this.prefix(),r=await this.separator(),A=[t,await this.message(),r].filter(Boolean).join(" ");this.state.prompt=A;let n=await this.header(),o=await this.format(),i=await this.error()||await this.hint(),s=await this.footer();i&&!o.includes(i)&&(o+=" "+i),A+=" "+o,this.clear(e),this.write([n,A,s].filter(Boolean).join("\n")),this.restore()}}},10278:(e,t,r)=>{"use strict";const A=Object.prototype.toString,n=r(97991);let o=!1,i=[];const s={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};t.longest=(e,t)=>e.reduce((e,r)=>Math.max(e,t?r[t].length:r.length),0),t.hasColor=e=>!!e&&n.hasColor(e);const a=t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);t.nativeType=e=>A.call(e).slice(8,-1).toLowerCase().replace(/\s/g,""),t.isAsyncFn=e=>"asyncfunction"===t.nativeType(e),t.isPrimitive=e=>null!=e&&"object"!=typeof e&&"function"!=typeof e,t.resolve=(e,t,...r)=>"function"==typeof t?t.call(e,...r):t,t.scrollDown=(e=[])=>[...e.slice(1),e[0]],t.scrollUp=(e=[])=>[e.pop(),...e],t.reorder=(e=[])=>{let t=e.slice();return t.sort((e,t)=>e.index>t.index?1:e.index{let A=e.length,n=r===A?0:r<0?A-1:r,o=e[t];e[t]=e[n],e[n]=o},t.width=(e,t=80)=>{let r=e&&e.columns?e.columns:t;return e&&"function"==typeof e.getWindowSize&&(r=e.getWindowSize()[0]),"win32"===process.platform?r-1:r},t.height=(e,t=20)=>{let r=e&&e.rows?e.rows:t;return e&&"function"==typeof e.getWindowSize&&(r=e.getWindowSize()[1]),r},t.wordWrap=(e,t={})=>{if(!e)return e;"number"==typeof t&&(t={width:t});let{indent:r="",newline:A="\n"+r,width:n=80}=t,o=(A+r).match(/[^\S\n]/g)||[];n-=o.length;let i=`.{1,${n}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,s=e.trim(),a=new RegExp(i,"g"),c=s.match(a)||[];return c=c.map(e=>e.replace(/\n$/,"")),t.padEnd&&(c=c.map(e=>e.padEnd(n," "))),t.padStart&&(c=c.map(e=>e.padStart(n," "))),r+c.join(A)},t.unmute=e=>{let t=e.stack.find(e=>n.keys.color.includes(e));return t?n[t]:e.stack.find(e=>"bg"===e.slice(2))?n[t.slice(2)]:e=>e},t.pascal=e=>e?e[0].toUpperCase()+e.slice(1):"",t.inverse=e=>{if(!e||!e.stack)return e;let r=e.stack.find(e=>n.keys.color.includes(e));if(r){let A=n["bg"+t.pascal(r)];return A?A.black:e}let A=e.stack.find(e=>"bg"===e.slice(0,2));return A?n[A.slice(2).toLowerCase()]||e:n.none},t.complement=e=>{if(!e||!e.stack)return e;let r=e.stack.find(e=>n.keys.color.includes(e)),A=e.stack.find(e=>"bg"===e.slice(0,2));if(r&&!A)return n[s[r]||r];if(A){let r=A.slice(2).toLowerCase(),o=s[r];return o&&n["bg"+t.pascal(o)]||e}return n.none},t.meridiem=e=>{let t=e.getHours(),r=e.getMinutes(),A=t>=12?"pm":"am";return t%=12,(0===t?12:t)+":"+(r<10?"0"+r:r)+" "+A},t.set=(e={},r="",A)=>r.split(".").reduce((e,r,n,o)=>{let i=o.length-1>n?e[r]||{}:A;return!t.isObject(i)&&n{let A=null==e[t]?t.split(".").reduce((e,t)=>e&&e[t],e):e[t];return null==A?r:A},t.mixin=(e,r)=>{if(!a(e))return r;if(!a(r))return e;for(let A of Object.keys(r)){let n=Object.getOwnPropertyDescriptor(r,A);if(n.hasOwnProperty("value"))if(e.hasOwnProperty(A)&&a(n.value)){let o=Object.getOwnPropertyDescriptor(e,A);a(o.value)?e[A]=t.merge({},e[A],r[A]):Reflect.defineProperty(e,A,n)}else Reflect.defineProperty(e,A,n);else Reflect.defineProperty(e,A,n)}return e},t.merge=(...e)=>{let r={};for(let A of e)t.mixin(r,A);return r},t.mixinEmitter=(e,r)=>{let A=r.constructor.prototype;for(let n of Object.keys(A)){let o=A[n];"function"==typeof o?t.define(e,n,o.bind(r)):t.define(e,n,o)}},t.onExit=e=>{const t=(e,t)=>{o||(o=!0,i.forEach(e=>e()),!0===e&&process.exit(128+t))};0===i.length&&(process.once("SIGTERM",t.bind(null,!0,15)),process.once("SIGINT",t.bind(null,!0,2)),process.once("exit",t)),i.push(e)},t.define=(e,t,r)=>{Reflect.defineProperty(e,t,{value:r})},t.defineExport=(e,t,r)=>{let A;Reflect.defineProperty(e,t,{enumerable:!0,configurable:!0,set(e){A=e},get:()=>A?A():r()})}},19347:(e,t,r)=>{"use strict";const A=r(80598),n=r(58182),o=r(67652),i=r(81340),s=r(43754),a=r(16777);async function c(e,t){l(e);const r=g(e,n.default,t),A=await Promise.all(r);return a.array.flatten(A)}function g(e,t,r){const n=[].concat(e),o=new s.default(r),i=A.generate(n,o),a=new t(o);return i.map(a.read,a)}function l(e){if(![].concat(e).every(e=>a.string.isString(e)&&!a.string.isEmpty(e)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}!function(e){e.sync=function(e,t){l(e);const r=g(e,i.default,t);return a.array.flatten(r)},e.stream=function(e,t){l(e);const r=g(e,o.default,t);return a.stream.merge(r)},e.generateTasks=function(e,t){l(e);const r=[].concat(e),n=new s.default(t);return A.generate(r,n)},e.isDynamicPattern=function(e,t){l(e);const r=new s.default(t);return a.pattern.isDynamicPattern(e,r)},e.escapePath=function(e){return l(e),a.path.escape(e)}}(c||(c={})),e.exports=c},80598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(16777);function n(e,t,r){const A=s(e);if("."in A){return[c(".",e,t,r)]}return a(A,t,r)}function o(e){return A.pattern.getPositivePatterns(e)}function i(e,t){return A.pattern.getNegativePatterns(e).concat(t).map(A.pattern.convertToPositivePattern)}function s(e){return e.reduce((e,t)=>{const r=A.pattern.getBaseDirectory(t);return r in e?e[r].push(t):e[r]=[t],e},{})}function a(e,t,r){return Object.keys(e).map(A=>c(A,e[A],t,r))}function c(e,t,r,n){return{dynamic:n,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(A.pattern.convertToNegativePattern))}}t.generate=function(e,t){const r=o(e),s=i(e,t.ignore),a=r.filter(e=>A.pattern.isStaticPattern(e,t)),c=r.filter(e=>A.pattern.isDynamicPattern(e,t)),g=n(a,s,!1),l=n(c,s,!0);return g.concat(l)},t.convertPatternsToTasks=n,t.getPositivePatterns=o,t.getNegativePatternsAsPositive=i,t.groupPatternsByBaseDirectory=s,t.convertPatternGroupsToTasks=a,t.convertPatternGroupToTask=c},58182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(82774),n=r(40545);class o extends n.default{constructor(){super(...arguments),this._reader=new A.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e),A=[];return new Promise((n,o)=>{const i=this.api(t,e,r);i.once("error",o),i.on("data",e=>A.push(r.transform(e))),i.once("end",()=>n(A))})}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}t.default=o},65989:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(16777),n=r(42585);t.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,r){const A=this._getMatcher(t),n=this._getNegativePatternsRe(r);return t=>this._filter(e,t,A,n)}_getMatcher(e){return new n.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){const t=e.filter(A.pattern.isAffectDepthOfReadingPattern);return A.pattern.convertPatternsToRe(t,this._micromatchOptions)}_filter(e,t,r,n){const o=this._getEntryLevel(e,t.path);if(this._isSkippedByDeep(o))return!1;if(this._isSkippedSymbolicLink(t))return!1;const i=A.path.removeLeadingDotSegment(t.path);return!this._isSkippedByPositivePatterns(i,r)&&this._isSkippedByNegativePatterns(i,n)}_isSkippedByDeep(e){return e>=this._settings.deep}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_getEntryLevel(e,t){const r=e.split("/").length;return t.split("/").length-(""===e?0:r)}_isSkippedByPositivePatterns(e,t){return!this._settings.baseNameMatch&&!t.match(e)}_isSkippedByNegativePatterns(e,t){return!A.pattern.matchAny(e,t)}}},37338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(16777);t.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(e,t){const r=A.pattern.convertPatternsToRe(e,this._micromatchOptions),n=A.pattern.convertPatternsToRe(t,this._micromatchOptions);return e=>this._filter(e,r,n)}_filter(e,t,r){if(this._settings.unique){if(this._isDuplicateEntry(e))return!1;this._createIndexRecord(e)}if(this._onlyFileFilter(e)||this._onlyDirectoryFilter(e))return!1;if(this._isSkippedByAbsoluteNegativePatterns(e,r))return!1;const A=this._settings.baseNameMatch?e.name:e.path;return this._isMatchToPatterns(A,t)&&!this._isMatchToPatterns(e.path,r)}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,t){if(!this._settings.absolute)return!1;const r=A.path.makeAbsolute(this._settings.cwd,e.path);return this._isMatchToPatterns(r,t)}_isMatchToPatterns(e,t){const r=A.path.removeLeadingDotSegment(e);return A.pattern.matchAny(r,t)}}},54345:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(16777);t.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return A.errno.isEnoentCodeError(e)||this._settings.suppressErrors}}},34789:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(16777);t.default=class{constructor(e,t,r){this._patterns=e,this._settings=t,this._micromatchOptions=r,this._storage=[],this._fillStorage()}_fillStorage(){const e=A.pattern.expandPatternsWithBraceExpansion(this._patterns);for(const t of e){const e=this._getPatternSegments(t),r=this._splitSegmentsIntoSections(e);this._storage.push({complete:r.length<=1,pattern:t,segments:e,sections:r})}}_getPatternSegments(e){return A.pattern.getPatternParts(e,this._micromatchOptions).map(e=>A.pattern.isDynamicPattern(e,this._settings)?{dynamic:!0,pattern:e,patternRe:A.pattern.makeRe(e,this._micromatchOptions)}:{dynamic:!1,pattern:e})}_splitSegmentsIntoSections(e){return A.array.splitWhen(e,e=>e.dynamic&&A.pattern.hasGlobStar(e.pattern))}}},42585:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(34789);class n extends A.default{match(e){const t=e.split("/"),r=t.length,A=this._storage.filter(e=>!e.complete||e.segments.length>r);for(const e of A){const A=e.sections[0];if(!e.complete&&r>A.length)return!0;if(t.every((t,r)=>{const A=e.segments[r];return!(!A.dynamic||!A.patternRe.test(t))||!A.dynamic&&A.pattern===t}))return!0}return!1}}t.default=n},40545:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=r(65989),o=r(37338),i=r(54345),s=r(77541);t.default=class{constructor(e){this._settings=e,this.errorFilter=new i.default(this._settings),this.entryFilter=new o.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new n.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new s.default(this._settings)}_getRootDirectory(e){return A.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){const t="."===e.base?"":e.base;return{basePath:t,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(t,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}}},67652:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(92413),n=r(82774),o=r(40545);class i extends o.default{constructor(){super(...arguments),this._reader=new n.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e),n=this.api(t,e,r),o=new A.Readable({objectMode:!0,read:()=>{}});return n.once("error",e=>o.emit("error",e)).on("data",e=>o.emit("data",r.transform(e))).once("end",()=>o.emit("end")),o.once("close",()=>n.destroy()),o}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}t.default=i},81340:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(29543),n=r(40545);class o extends n.default{constructor(){super(...arguments),this._reader=new A.default(this._settings)}read(e){const t=this._getRootDirectory(e),r=this._getReaderOptions(e);return this.api(t,e,r).map(r.transform)}api(e,t,r){return t.dynamic?this._reader.dynamic(e,r):this._reader.static(t.patterns,r)}}t.default=o},77541:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(16777);t.default=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let t=e.path;return this._settings.absolute&&(t=A.path.makeAbsolute(this._settings.cwd,t),t=A.path.unixify(t)),this._settings.markDirectories&&e.dirent.isDirectory()&&(t+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:t}):t}}},99458:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=r(53403),o=r(16777);t.default=class{constructor(e){this._settings=e,this._fsStatSettings=new n.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return A.resolve(this._settings.cwd,e)}_makeEntry(e,t){const r={name:t,path:t,dirent:o.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!o.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}}},82774:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(92413),n=r(53403),o=r(72897),i=r(99458);class s extends i.default{constructor(){super(...arguments),this._walkStream=o.walkStream,this._stat=n.stat}dynamic(e,t){return this._walkStream(e,t)}static(e,t){const r=e.map(this._getFullEntryPath,this),n=new A.PassThrough({objectMode:!0});n._write=(A,o,i)=>this._getEntry(r[A],e[A],t).then(e=>{null!==e&&t.entryFilter(e)&&n.push(e),A===r.length-1&&n.end(),i()}).catch(i);for(let e=0;ethis._makeEntry(e,t)).catch(e=>{if(r.errorFilter(e))return null;throw e})}_getStat(e){return new Promise((t,r)=>{this._stat(e,this._fsStatSettings,(e,A)=>null===e?t(A):r(e))})}}t.default=s},29543:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(53403),n=r(72897),o=r(99458);class i extends o.default{constructor(){super(...arguments),this._walkSync=n.walkSync,this._statSync=A.statSync}dynamic(e,t){return this._walkSync(e,t)}static(e,t){const r=[];for(const A of e){const e=this._getFullEntryPath(A),n=this._getEntry(e,A,t);null!==n&&t.entryFilter(n)&&r.push(n)}return r}_getEntry(e,t,r){try{const r=this._getStat(e);return this._makeEntry(r,t)}catch(e){if(r.errorFilter(e))return null;throw e}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}t.default=i},43754:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(35747),n=r(12087).cpus().length;t.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:A.lstat,lstatSync:A.lstatSync,stat:A.stat,statSync:A.statSync,readdir:A.readdir,readdirSync:A.readdirSync};t.default=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,n),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(e,t){return void 0===e?t:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},t.DEFAULT_FILE_SYSTEM_ADAPTER),e)}}},60919:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatten=function(e){return e.reduce((e,t)=>[].concat(e,t),[])},t.splitWhen=function(e,t){const r=[[]];let A=0;for(const n of e)t(n)?(A++,r[A]=[]):r[A].push(n);return r}},35525:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEnoentCodeError=function(e){return"ENOENT"===e.code}},62524:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.name=e,this.isBlockDevice=t.isBlockDevice.bind(t),this.isCharacterDevice=t.isCharacterDevice.bind(t),this.isDirectory=t.isDirectory.bind(t),this.isFIFO=t.isFIFO.bind(t),this.isFile=t.isFile.bind(t),this.isSocket=t.isSocket.bind(t),this.isSymbolicLink=t.isSymbolicLink.bind(t)}}t.createDirentFromStats=function(e,t){return new r(e,t)}},16777:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(60919);t.array=A;const n=r(35525);t.errno=n;const o=r(62524);t.fs=o;const i=r(71462);t.path=i;const s=r(14659);t.pattern=s;const a=r(2042);t.stream=a;const c=r(10217);t.string=c},71462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;t.unixify=function(e){return e.replace(/\\/g,"/")},t.makeAbsolute=function(e,t){return A.resolve(e,t)},t.escape=function(e){return e.replace(n,"\\$2")},t.removeLeadingDotSegment=function(e){if("."===e.charAt(0)){const t=e.charAt(1);if("/"===t||"\\"===t)return e.slice(2)}return e}},14659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(85622),n=r(97098),o=r(2401),i=r(54722),s=/[*?]|^!/,a=/\[.*]/,c=/(?:^|[^!*+?@])\(.*\|.*\)/,g=/[!*+?@]\(.*\)/,l=/{.*(?:,|\.\.).*}/;function u(e,t={}){return!h(e,t)}function h(e,t={}){return!(!1!==t.caseSensitiveMatch&&!e.includes("\\"))||(!!(s.test(e)||a.test(e)||c.test(e))||(!(!1===t.extglob||!g.test(e))||!(!1===t.braceExpansion||!l.test(e))))}function p(e){return e.startsWith("!")&&"("!==e[1]}function d(e){return!p(e)}function C(e){return e.endsWith("/**")}function f(e){return o.braces(e,{expand:!0,nodupes:!0})}function I(e,t){return o.makeRe(e,t)}t.isStaticPattern=u,t.isDynamicPattern=h,t.convertToPositivePattern=function(e){return p(e)?e.slice(1):e},t.convertToNegativePattern=function(e){return"!"+e},t.isNegativePattern=p,t.isPositivePattern=d,t.getNegativePatterns=function(e){return e.filter(p)},t.getPositivePatterns=function(e){return e.filter(d)},t.getBaseDirectory=function(e){return n(e,{flipBackslashes:!1})},t.hasGlobStar=function(e){return e.includes("**")},t.endsWithSlashGlobStar=C,t.isAffectDepthOfReadingPattern=function(e){const t=A.basename(e);return C(e)||u(t)},t.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(f(t)),[])},t.expandBraceExpansion=f,t.getPatternParts=function(e,t){const r=i.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return 0===r.parts.length?[e]:r.parts},t.makeRe=I,t.convertPatternsToRe=function(e,t){return e.map(e=>I(e,t))},t.matchAny=function(e,t){return t.some(t=>t.test(e))}},2042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(55598);function n(e){e.forEach(e=>e.emit("close"))}t.merge=function(e){const t=A(e);return e.forEach(e=>{e.once("error",e=>t.emit("error",e))}),t.once("close",()=>n(e)),t.once("end",()=>n(e)),t}},10217:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isString=function(e){return"string"==typeof e},t.isEmpty=function(e){return""===e}},98360:(e,t,r)=>{"use strict";var A=r(2383);function n(){}function o(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null;var e=this;this.worked=function(t,r){var A=e.callback;e.value=null,e.callback=n,A.call(e.context,t,r),e.release(e)}}e.exports=function(e,t,r){"function"==typeof e&&(r=t,t=e,e=null);var i=A(o),s=null,a=null,c=0,g={push:function(r,A){var o=i.get();o.context=e,o.release=l,o.value=r,o.callback=A||n,c===g.concurrency||g.paused?a?(a.next=o,a=o):(s=o,a=o,g.saturated()):(c++,t.call(e,o.value,o.worked))},drain:n,saturated:n,pause:function(){g.paused=!0},paused:!1,concurrency:r,running:function(){return c},resume:function(){if(!g.paused)return;g.paused=!1;for(var e=0;e{"use strict";class A{constructor(e,t,r){this.__specs=e||{},Object.keys(this.__specs).forEach(e=>{if("string"==typeof this.__specs[e]){const t=this.__specs[e],r=this.__specs[t];if(!r)throw new Error(`Alias refers to invalid key: ${t} -> ${e}`);{const A=r.aliases||[];A.push(e,t),r.aliases=[...new Set(A)],this.__specs[e]=r}}}),this.__opts=t||{},this.__providers=s(r.filter(e=>null!=e&&"object"==typeof e)),this.__isFiggyPudding=!0}get(e){return n(this,e,!0)}get[Symbol.toStringTag](){return"FiggyPudding"}forEach(e,t=this){for(let[r,A]of this.entries())e.call(t,A,r,this)}toJSON(){const e={};return this.forEach((t,r)=>{e[r]=t}),e}*entries(e){for(let e of Object.keys(this.__specs))yield[e,this.get(e)];const t=e||this.__opts.other;if(t){const e=new Set;for(let r of this.__providers){const A=r.entries?r.entries(t):a(r);for(let[r,n]of A)t(r)&&!e.has(r)&&(e.add(r),yield[r,n])}}}*[Symbol.iterator](){for(let[e,t]of this.entries())yield[e,t]}*keys(){for(let[e]of this.entries())yield e}*values(){for(let[,e]of this.entries())yield e}concat(...e){return new Proxy(new A(this.__specs,this.__opts,s(this.__providers).concat(e)),i)}}try{const e=r(31669);A.prototype[e.inspect.custom]=function(t,r){return this[Symbol.toStringTag]+" "+e.inspect(this.toJSON(),r)}}catch(e){}function n(e,t,r){let A=e.__specs[t];if(!r||A||e.__opts.other&&e.__opts.other(t)){let r;A||(A={});for(let n of e.__providers){if(r=o(t,n),void 0===r&&A.aliases&&A.aliases.length)for(let e of A.aliases)if(e!==t&&(r=o(e,n),void 0!==r))break;if(void 0!==r)break}return void 0===r&&void 0!==A.default?"function"==typeof A.default?A.default(e):A.default:r}!function(e){throw Object.assign(new Error("invalid config key requested: "+e),{code:"EBADKEY"})}(t)}function o(e,t){let r;return r=t.__isFiggyPudding?n(t,e,!1):"function"==typeof t.get?t.get(e):t[e],r}const i={has:(e,t)=>t in e.__specs&&void 0!==n(e,t,!1),ownKeys:e=>Object.keys(e.__specs),get:(e,t)=>"symbol"==typeof t||"__"===t.slice(0,2)||t in A.prototype?e[t]:e.get(t),set(e,t,r){if("symbol"==typeof t||"__"===t.slice(0,2))return e[t]=r,!0;throw new Error("figgyPudding options cannot be modified. Use .concat() instead.")},deleteProperty(){throw new Error("figgyPudding options cannot be deleted. Use .concat() and shadow them instead.")}};function s(e){const t=[];return e.forEach(e=>t.unshift(e)),t}function a(e){return Object.keys(e).map(t=>[t,e[t]])}e.exports=function(e,t){return function(...r){return new Proxy(new A(e,t,r),i)}}},52169:(e,t,r)=>{"use strict"; /*! * fill-range * * Copyright (c) 2014-present, Jon Schlinkert. * Licensed under the MIT License. */const A=r(31669),n=r(84615),o=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),i=e=>"number"==typeof e||"string"==typeof e&&""!==e,s=e=>Number.isInteger(+e),a=e=>{let t=""+e,r=-1;if("-"===t[0]&&(t=t.slice(1)),"0"===t)return!1;for(;"0"===t[++r];);return r>0},c=(e,t,r)=>{if(t>0){let r="-"===e[0]?"-":"";r&&(e=e.slice(1)),e=r+e.padStart(r?t-1:t,"0")}return!1===r?String(e):e},g=(e,t)=>{let r="-"===e[0]?"-":"";for(r&&(e=e.slice(1),t--);e.length{if(r)return n(e,t,{wrap:!1,...A});let o=String.fromCharCode(e);return e===t?o:`[${o}-${String.fromCharCode(t)}]`},u=(e,t,r)=>{if(Array.isArray(e)){let t=!0===r.wrap,A=r.capture?"":"?:";return t?`(${A}${e.join("|")})`:e.join("|")}return n(e,t,r)},h=(...e)=>new RangeError("Invalid range arguments: "+A.inspect(...e)),p=(e,t,r)=>{if(!0===r.strictRanges)throw h([e,t]);return[]},d=(e,t,r=1,A={})=>{let n=Number(e),o=Number(t);if(!Number.isInteger(n)||!Number.isInteger(o)){if(!0===A.strictRanges)throw h([e,t]);return[]}0===n&&(n=0),0===o&&(o=0);let i=n>o,s=String(e),p=String(t),d=String(r);r=Math.max(Math.abs(r),1);let C=a(s)||a(p)||a(d),f=C?Math.max(s.length,p.length,d.length):0,I=!1===C&&!1===((e,t,r)=>"string"==typeof e||"string"==typeof t||!0===r.stringify)(e,t,A),E=A.transform||(e=>t=>!0===e?Number(t):String(t))(I);if(A.toRegex&&1===r)return l(g(e,f),g(t,f),!0,A);let B={negatives:[],positives:[]},y=[],m=0;for(;i?n>=o:n<=o;)!0===A.toRegex&&r>1?B[(w=n)<0?"negatives":"positives"].push(Math.abs(w)):y.push(c(E(n,m),f,I)),n=i?n-r:n+r,m++;var w;return!0===A.toRegex?r>1?((e,t)=>{e.negatives.sort((e,t)=>et?1:0),e.positives.sort((e,t)=>et?1:0);let r,A=t.capture?"":"?:",n="",o="";return e.positives.length&&(n=e.positives.join("|")),e.negatives.length&&(o=`-(${A}${e.negatives.join("|")})`),r=n&&o?`${n}|${o}`:n||o,t.wrap?`(${A}${r})`:r})(B,A):u(y,null,{wrap:!1,...A}):y},C=(e,t,r,A={})=>{if(null==t&&i(e))return[e];if(!i(e)||!i(t))return p(e,t,A);if("function"==typeof r)return C(e,t,1,{transform:r});if(o(r))return C(e,t,0,r);let n={...A};return!0===n.capture&&(n.wrap=!0),r=r||n.step||1,s(r)?s(e)&&s(t)?d(e,t,r,n):((e,t,r=1,A={})=>{if(!s(e)&&e.length>1||!s(t)&&t.length>1)return p(e,t,A);let n=A.transform||(e=>String.fromCharCode(e)),o=(""+e).charCodeAt(0),i=(""+t).charCodeAt(0),a=o>i,c=Math.min(o,i),g=Math.max(o,i);if(A.toRegex&&1===r)return l(c,g,!1,A);let h=[],d=0;for(;a?o>=i:o<=i;)h.push(n(o,d)),o=a?o-r:o+r,d++;return!0===A.toRegex?u(h,null,{wrap:!1,options:A}):h})(e,t,Math.max(Math.abs(r),1),n):null==r||o(r)?C(e,t,1,r):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(r,n)};e.exports=C},50683:e=>{e.exports=function(e){return[...e].reduce((e,[t,r])=>(e[t]=r,e),{})}},13302:(e,t,r)=>{e.exports=r(35747).constants||r(27619)},72137:(e,t,r)=>{"use strict";const{PassThrough:A}=r(92413);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const n="buffer"===r;let o=!1;t?o=!(r||n):r=r||"utf8",n&&(r=null);const i=new A({objectMode:o});r&&i.setEncoding(r);let s=0;const a=[];return i.on("data",e=>{a.push(e),o?s=a.length:s+=e.length}),i.getBufferedValue=()=>t?a:n?Buffer.concat(a,s):a.join(""),i.getBufferedLength=()=>s,i}},58764:(e,t,r)=>{"use strict";const A=r(50372),n=r(72137);class o extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function i(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t={maxBuffer:1/0,...t};const{maxBuffer:r}=t;let i;return await new Promise((s,a)=>{const c=e=>{e&&(e.bufferedData=i.getBufferedValue()),a(e)};i=A(e,n(t),e=>{e?c(e):s()}),i.on("data",()=>{i.getBufferedLength()>r&&c(new o)})}),i.getBufferedValue()}e.exports=i,e.exports.default=i,e.exports.buffer=(e,t)=>i(e,{...t,encoding:"buffer"}),e.exports.array=(e,t)=>i(e,{...t,array:!0}),e.exports.MaxBufferError=o},97098:(e,t,r)=>{"use strict";var A=r(18193),n=r(85622).posix.dirname,o="win32"===r(12087).platform(),i=/\\/g,s=/[\{\[].*[\/]*.*[\}\]]$/,a=/(^|[^\\])([\{\[]|\([^\)]+$)/,c=/\\([\*\?\|\[\]\(\)\{\}])/g;e.exports=function(e,t){Object.assign({flipBackslashes:!0},t).flipBackslashes&&o&&e.indexOf("/")<0&&(e=e.replace(i,"/")),s.test(e)&&(e+="/"),e+="a";do{e=n(e)}while(A(e)||a.test(e));return e.replace(c,"$1")}},90734:(e,t,r)=>{"use strict";const{promisify:A}=r(31669),n=r(35747),o=r(85622),i=r(19347),s=r(46458),a=r(17234),c=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],g=A(n.readFile),l=(e,t)=>{const r=a(o.relative(t.cwd,o.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(e=>!e.startsWith("#")).map((e=>t=>t.startsWith("!")?"!"+o.posix.join(e,t.slice(1)):o.posix.join(e,t))(r))},u=e=>e.reduce((e,t)=>(e.add(l(t.content,{cwd:t.cwd,fileName:t.filePath})),e),s()),h=(e,t)=>r=>e.ignores(a(o.relative(t,((e,t)=>{if(e=a(e),o.isAbsolute(t)){if(t.startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return o.join(e,t)})(t,r)))),p=({ignore:e=[],cwd:t=a(process.cwd())}={})=>({ignore:e,cwd:t});e.exports=async e=>{e=p(e);const t=await i("**/.gitignore",{ignore:c.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(t=>(async(e,t)=>{const r=o.join(t,e);return{cwd:t,filePath:r,content:await g(r,"utf8")}})(t,e.cwd))),A=u(r);return h(A,e.cwd)},e.exports.sync=e=>{e=p(e);const t=i.sync("**/.gitignore",{ignore:c.concat(e.ignore),cwd:e.cwd}).map(t=>((e,t)=>{const r=o.join(t,e);return{cwd:t,filePath:r,content:n.readFileSync(r,"utf8")}})(t,e.cwd)),r=u(t);return h(r,e.cwd)}},58592:(e,t,r)=>{"use strict";const A=r(35747),n=r(39920),o=r(55598),i=r(19347),s=r(66241),a=r(90734),{FilterStream:c,UniqueStream:g}=r(66160),l=()=>!1,u=e=>"!"===e[0],h=(e,t)=>{(e=>{if(!e.every(e=>"string"==typeof e))throw new TypeError("Patterns must be a string or an array of strings")})(e=n([].concat(e))),((e={})=>{if(!e.cwd)return;let t;try{t=A.statSync(e.cwd)}catch(e){return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")})(t);const r=[];t={ignore:[],expandDirectories:!0,...t};for(const[A,n]of e.entries()){if(u(n))continue;const o=e.slice(A).filter(u).map(e=>e.slice(1)),i={...t,ignore:t.ignore.concat(o)};r.push({pattern:n,options:i})}return r},p=(e,t)=>e.options.expandDirectories?((e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:"object"==typeof e.options.expandDirectories&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)})(e,t):[e.pattern],d=e=>e&&e.gitignore?a.sync({cwd:e.cwd,ignore:e.ignore}):l,C=e=>t=>{const{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=s.sync(r.ignore)),{pattern:t,options:r}};e.exports=async(e,t)=>{const r=h(e,t),[o,c]=await Promise.all([(async()=>t&&t.gitignore?a({cwd:t.cwd,ignore:t.ignore}):l)(),(async()=>{const e=await Promise.all(r.map(async e=>{const t=await p(e,s);return Promise.all(t.map(C(e)))}));return n(...e)})()]),g=await Promise.all(c.map(e=>i(e.pattern,e.options)));return n(...g).filter(e=>{return!o((t=e,t.stats instanceof A.Stats?t.path:t));var t})},e.exports.sync=(e,t)=>{const r=h(e,t).reduce((e,t)=>{const r=p(t,s.sync).map(C(t));return e.concat(r)},[]),A=d(t);return r.reduce((e,t)=>n(e,i.sync(t.pattern,t.options)),[]).filter(e=>!A(e))},e.exports.stream=(e,t)=>{const r=h(e,t).reduce((e,t)=>{const r=p(t,s.sync).map(C(t));return e.concat(r)},[]),A=d(t),n=new c(e=>!A(e)),a=new g;return o(r.map(e=>i.stream(e.pattern,e.options))).pipe(n).pipe(a)},e.exports.generateGlobTasks=h,e.exports.hasMagic=(e,t)=>[].concat(e).some(e=>i.isDynamicPattern(e,t)),e.exports.gitignore=a},66160:(e,t,r)=>{"use strict";const{Transform:A}=r(92413);class n extends A{constructor(){super({objectMode:!0})}}e.exports={FilterStream:class extends n{constructor(e){super(),this._filter=e}_transform(e,t,r){this._filter(e)&&this.push(e),r()}},UniqueStream:class extends n{constructor(){super(),this._pushed=new Set}_transform(e,t,r){this._pushed.has(e)||(this.push(e),this._pushed.add(e)),r()}}}},93576:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(14756);t.default=function(e,...t){const r=(async()=>{if(e instanceof A.RequestError)try{for(const r of t)if(r)for(const t of r)e=await t(e)}catch(t){e=t}throw e})(),n=()=>r;return r.json=n,r.text=n,r.buffer=n,r.on=n,r}},81588:function(e,t,r){"use strict";var A=this&&this.__createBinding||(Object.create?function(e,t,r,A){void 0===A&&(A=r),Object.defineProperty(e,A,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,A){void 0===A&&(A=r),e[A]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||A(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});const o=r(28614),i=r(7966),s=r(59351),a=r(14756),c=r(54718),g=r(9048),l=r(51743),u=r(57854),h=r(38206),p=["request","response","redirect","uploadProgress","downloadProgress"];t.default=function e(t){let r,A;const n=new o.EventEmitter,d=new s((o,s,C)=>{const f=I=>{const E=new g.default(void 0,t);E.retryCount=I,E._noPipe=!0,C(()=>E.destroy()),C.shouldReject=!1,C(()=>s(new a.CancelError(E))),r=E,E.once("response",async t=>{var r;if(t.retryCount=I,t.request.aborted)return;let n;try{n=await u.default(E),t.rawBody=n}catch(e){return}if(E._isAboutToError)return;const i=(null!==(r=t.headers["content-encoding"])&&void 0!==r?r:"").toLowerCase(),s=["gzip","deflate","br"].includes(i),{options:l}=E;if(s&&!l.decompress)t.body=n;else try{t.body=c.default(t,l.responseType,l.parseJson,l.encoding)}catch(e){if(t.body=n.toString(),h.isResponseOk(t))return void E._beforeError(e)}try{for(const[r,A]of l.hooks.afterResponse.entries())t=await A(t,async t=>{const A=g.default.normalizeArguments(void 0,{...t,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},l);A.hooks.afterResponse=A.hooks.afterResponse.slice(0,r);for(const e of A.hooks.beforeRetry)await e(A);const n=e(A);return C(()=>{n.catch(()=>{}),n.cancel()}),n})}catch(e){return void E._beforeError(new a.RequestError(e.message,e,E))}h.isResponseOk(t)?(A=t,o(E.options.resolveBodyOnly?t.body:t)):E._beforeError(new a.HTTPError(t))});const B=e=>{if(d.isCanceled)return;const{options:t}=E;if(e instanceof a.HTTPError&&!t.throwHttpErrors){const{response:t}=e;o(E.options.resolveBodyOnly?t.body:t)}else s(e)};E.once("error",B),E.once("retry",(e,t)=>{var r;i.default.nodeStream(null===(r=t.request)||void 0===r?void 0:r.options.body)?B(t):f(e)}),l.default(E,n,p)};f(0)});d.on=(e,t)=>(n.on(e,t),d);const C=e=>{const t=(async()=>{await d;const{options:t}=A.request;return c.default(A,e,t.parseJson,t.encoding)})();return Object.defineProperties(t,Object.getOwnPropertyDescriptors(d)),t};return d.json=()=>{const{headers:e}=r.options;return r.writableFinished||void 0!==e.accept||(e.accept="application/json"),C("json")},d.buffer=()=>C("buffer"),d.text=()=>C("text"),d},n(r(14756),t)},41514:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(7966);t.default=(e,t)=>{if(A.default.null_(e.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");A.assert.any([A.default.string,A.default.undefined],e.encoding),A.assert.any([A.default.boolean,A.default.undefined],e.resolveBodyOnly),A.assert.any([A.default.boolean,A.default.undefined],e.methodRewriting),A.assert.any([A.default.boolean,A.default.undefined],e.isStream),A.assert.any([A.default.string,A.default.undefined],e.responseType),void 0===e.responseType&&(e.responseType="text");const{retry:r}=e;if(e.retry=t?{...t.retry}:{calculateDelay:e=>e.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},A.default.object(r)?(e.retry={...e.retry,...r},e.retry.methods=[...new Set(e.retry.methods.map(e=>e.toUpperCase()))],e.retry.statusCodes=[...new Set(e.retry.statusCodes)],e.retry.errorCodes=[...new Set(e.retry.errorCodes)]):A.default.number(r)&&(e.retry.limit=r),A.default.undefined(e.retry.maxRetryAfter)&&(e.retry.maxRetryAfter=Math.min(...[e.timeout.request,e.timeout.connect].filter(A.default.number))),A.default.object(e.pagination)){t&&(e.pagination={...t.pagination,...e.pagination});const{pagination:r}=e;if(!A.default.function_(r.transform))throw new Error("`options.pagination.transform` must be implemented");if(!A.default.function_(r.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!A.default.function_(r.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!A.default.function_(r.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return"json"===e.responseType&&void 0===e.headers.accept&&(e.headers.accept="application/json"),e}},54718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(14756);t.default=(e,t,r,n)=>{const{rawBody:o}=e;try{if("text"===t)return o.toString(n);if("json"===t)return 0===o.length?"":r(o.toString());if("buffer"===t)return o;throw new A.ParseError({message:`Unknown body type '${t}'`,name:"Error"},e)}catch(t){throw new A.ParseError(t,e)}}},14756:function(e,t,r){"use strict";var A=this&&this.__createBinding||(Object.create?function(e,t,r,A){void 0===A&&(A=r),Object.defineProperty(e,A,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,A){void 0===A&&(A=r),e[A]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||A(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.CancelError=t.ParseError=void 0;const o=r(9048);class i extends o.RequestError{constructor(e,t){const{options:r}=t.request;super(`${e.message} in "${r.url.toString()}"`,e,t.request),this.name="ParseError"}}t.ParseError=i;class s extends o.RequestError{constructor(e){super("Promise was canceled",{},e),this.name="CancelError"}get isCanceled(){return!0}}t.CancelError=s,n(r(9048),t)},53843:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryAfterStatusCodes=void 0,t.retryAfterStatusCodes=new Set([413,429,503]);t.default=({attemptCount:e,retryOptions:t,error:r,retryAfter:A})=>{if(e>t.limit)return 0;const n=t.methods.includes(r.options.method),o=t.errorCodes.includes(r.code),i=r.response&&t.statusCodes.includes(r.response.statusCode);if(!n||!o&&!i)return 0;if(r.response){if(A)return void 0===t.maxRetryAfter||A>t.maxRetryAfter?0:A;if(413===r.response.statusCode)return 0}return 2**(e-1)*1e3+100*Math.random()}},9048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedProtocolError=t.ReadError=t.TimeoutError=t.UploadError=t.CacheError=t.HTTPError=t.MaxRedirectsError=t.RequestError=t.setNonEnumerableProperties=t.knownHookEvents=t.withoutBody=t.kIsNormalizedAlready=void 0;const A=r(31669),n=r(92413),o=r(35747),i=r(78835),s=r(98605),a=r(98605),c=r(57211),g=r(98298),l=r(30093),u=r(11200),h=r(93868),p=r(92353),d=r(55737),C=r(7966),f=r(78586),I=r(2920),E=r(51743),B=r(44947),y=r(50116),m=r(82524),w=r(85551),Q=r(57854),D=r(11338),b=r(38206),v=r(54595),S=r(41514),k=r(53843),N=new l.default,F=Symbol("request"),K=Symbol("response"),M=Symbol("responseSize"),R=Symbol("downloadedSize"),x=Symbol("bodySize"),L=Symbol("uploadedSize"),P=Symbol("serverResponsesPiped"),O=Symbol("unproxyEvents"),U=Symbol("isFromCache"),T=Symbol("cancelTimeouts"),j=Symbol("startedReading"),Y=Symbol("stopReading"),G=Symbol("triggerRead"),H=Symbol("body"),J=Symbol("jobs"),q=Symbol("originalResponse"),z=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const W=C.default.string(process.versions.brotli);t.withoutBody=new Set(["GET","HEAD"]),t.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];const X=new w.default,V=new Set([300,301,302,303,304,307,308]),_=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e)if(t)for(const e of _)e in t&&(r[e]={writable:!0,configurable:!0,enumerable:!1,value:t[e]});Object.defineProperties(t,r)};class Z extends Error{constructor(e,t,r){var A;if(super(e),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=t.code,r instanceof se?(Object.defineProperty(this,"request",{enumerable:!1,value:r}),Object.defineProperty(this,"response",{enumerable:!1,value:r[K]}),Object.defineProperty(this,"options",{enumerable:!1,value:r.options})):Object.defineProperty(this,"options",{enumerable:!1,value:r}),this.timings=null===(A=this.request)||void 0===A?void 0:A.timings,!C.default.undefined(t.stack)){const e=this.stack.indexOf(this.message)+this.message.length,r=this.stack.slice(e).split("\n").reverse(),A=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split("\n").reverse();for(;0!==A.length&&A[0]===r[0];)r.shift();this.stack=`${this.stack.slice(0,e)}${r.reverse().join("\n")}${A.reverse().join("\n")}`}}}t.RequestError=Z;class $ extends Z{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError"}}t.MaxRedirectsError=$;class ee extends Z{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError"}}t.HTTPError=ee;class te extends Z{constructor(e,t){super(e.message,e,t),this.name="CacheError"}}t.CacheError=te;class re extends Z{constructor(e,t){super(e.message,e,t),this.name="UploadError"}}t.UploadError=re;class Ae extends Z{constructor(e,t,r){super(e.message,e,r),this.name="TimeoutError",this.event=e.event,this.timings=t}}t.TimeoutError=Ae;class ne extends Z{constructor(e,t){super(e.message,e,t),this.name="ReadError"}}t.ReadError=ne;class oe extends Z{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError"}}t.UnsupportedProtocolError=oe;const ie=["socket","connect","continue","information","upgrade","timeout"];class se extends n.Duplex{constructor(e,r={},A){super({autoDestroy:!1,highWaterMark:0}),this[R]=0,this[L]=0,this.requestInitialized=!1,this[P]=new Set,this.redirects=[],this[Y]=!1,this[G]=!1,this[J]=[],this.retryCount=0,this._progressCallbacks=[];const n=()=>this._unlockWrite(),i=()=>this._lockWrite();this.on("pipe",e=>{e.prependListener("data",n),e.on("data",i),e.prependListener("end",n),e.on("end",i)}),this.on("unpipe",e=>{e.off("data",n),e.off("data",i),e.off("end",n),e.off("end",i)}),this.on("pipe",e=>{e instanceof a.IncomingMessage&&(this.options.headers={...e.headers,...this.options.headers})});const{json:s,body:c,form:g}=r;if((s||c||g)&&this._lockWrite(),t.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,A)}catch(e){return C.default.nodeStream(r.body)&&r.body.destroy(),void this.destroy(e)}(async()=>{var e;try{this.options.body instanceof o.ReadStream&&await(async e=>new Promise((t,r)=>{const A=e=>{r(e)};e.pending||t(),e.once("error",A),e.once("ready",()=>{e.off("error",A),t()})}))(this.options.body);const{url:t}=this.options;if(!t)throw new TypeError("Missing `url` property");if(this.requestUrl=t.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed)return void(null===(e=this[F])||void 0===e||e.destroy());for(const e of this[J])e();this[J].length=0,this.requestInitialized=!0}catch(e){if(e instanceof Z)return void this._beforeError(e);this.destroyed||this.destroy(e)}})()}static normalizeArguments(e,r,n){var o,s,a,c,g;const l=r;if(C.default.object(e)&&!C.default.urlInstance(e))r={...n,...e,...r};else{if(e&&r&&void 0!==r.url)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...n,...r},void 0!==e&&(r.url=e),C.default.urlInstance(r.url)&&(r.url=new i.URL(r.url.toString()))}if(!1===r.cache&&(r.cache=void 0),!1===r.dnsCache&&(r.dnsCache=void 0),C.assert.any([C.default.string,C.default.undefined],r.method),C.assert.any([C.default.object,C.default.undefined],r.headers),C.assert.any([C.default.string,C.default.urlInstance,C.default.undefined],r.prefixUrl),C.assert.any([C.default.object,C.default.undefined],r.cookieJar),C.assert.any([C.default.object,C.default.string,C.default.undefined],r.searchParams),C.assert.any([C.default.object,C.default.string,C.default.undefined],r.cache),C.assert.any([C.default.object,C.default.number,C.default.undefined],r.timeout),C.assert.any([C.default.object,C.default.undefined],r.context),C.assert.any([C.default.object,C.default.undefined],r.hooks),C.assert.any([C.default.boolean,C.default.undefined],r.decompress),C.assert.any([C.default.boolean,C.default.undefined],r.ignoreInvalidCookies),C.assert.any([C.default.boolean,C.default.undefined],r.followRedirect),C.assert.any([C.default.number,C.default.undefined],r.maxRedirects),C.assert.any([C.default.boolean,C.default.undefined],r.throwHttpErrors),C.assert.any([C.default.boolean,C.default.undefined],r.http2),C.assert.any([C.default.boolean,C.default.undefined],r.allowGetBody),C.assert.any([C.default.string,C.default.undefined],r.localAddress),C.assert.any([D.isDnsLookupIpVersion,C.default.undefined],r.dnsLookupIpVersion),C.assert.any([C.default.object,C.default.undefined],r.https),C.assert.any([C.default.boolean,C.default.undefined],r.rejectUnauthorized),r.https&&(C.assert.any([C.default.boolean,C.default.undefined],r.https.rejectUnauthorized),C.assert.any([C.default.function_,C.default.undefined],r.https.checkServerIdentity),C.assert.any([C.default.string,C.default.object,C.default.array,C.default.undefined],r.https.certificateAuthority),C.assert.any([C.default.string,C.default.object,C.default.array,C.default.undefined],r.https.key),C.assert.any([C.default.string,C.default.object,C.default.array,C.default.undefined],r.https.certificate),C.assert.any([C.default.string,C.default.undefined],r.https.passphrase),C.assert.any([C.default.string,C.default.buffer,C.default.array,C.default.undefined],r.https.pfx)),C.assert.any([C.default.object,C.default.undefined],r.cacheOptions),C.default.string(r.method)?r.method=r.method.toUpperCase():r.method="GET",r.headers===(null==n?void 0:n.headers)?r.headers={...r.headers}:r.headers=d({...null==n?void 0:n.headers,...r.headers}),"slashes"in r)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in r)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in r&&r.searchParams&&r.searchParams!==(null==n?void 0:n.searchParams)){let e;if(C.default.string(r.searchParams)||r.searchParams instanceof i.URLSearchParams)e=new i.URLSearchParams(r.searchParams);else{!function(e){for(const t in e){const r=e[t];if(!(C.default.string(r)||C.default.number(r)||C.default.boolean(r)||C.default.null_(r)||C.default.undefined(r)))throw new TypeError(`The \`searchParams\` value '${String(r)}' must be a string, number, boolean or null`)}}(r.searchParams),e=new i.URLSearchParams;for(const t in r.searchParams){const A=r.searchParams[t];null===A?e.append(t,""):void 0!==A&&e.append(t,A)}}null===(o=null==n?void 0:n.searchParams)||void 0===o||o.forEach((t,r)=>{e.has(r)||e.append(r,t)}),r.searchParams=e}if(r.username=null!==(s=r.username)&&void 0!==s?s:"",r.password=null!==(a=r.password)&&void 0!==a?a:"",C.default.undefined(r.prefixUrl)?r.prefixUrl=null!==(c=null==n?void 0:n.prefixUrl)&&void 0!==c?c:"":(r.prefixUrl=r.prefixUrl.toString(),""===r.prefixUrl||r.prefixUrl.endsWith("/")||(r.prefixUrl+="/")),C.default.string(r.url)){if(r.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");r.url=m.default(r.prefixUrl+r.url,r)}else(C.default.undefined(r.url)&&""!==r.prefixUrl||r.protocol)&&(r.url=m.default(r.prefixUrl,r));if(r.url){"port"in r&&delete r.port;let{prefixUrl:e}=r;Object.defineProperty(r,"prefixUrl",{set:t=>{const A=r.url;if(!A.href.startsWith(t))throw new Error(`Cannot change \`prefixUrl\` from ${e} to ${t}: ${A.href}`);r.url=new i.URL(t+A.href.slice(e.length)),e=t},get:()=>e});let{protocol:t}=r.url;if("unix:"===t&&(t="http:",r.url=new i.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),"http:"!==t&&"https:"!==t)throw new oe(r);""===r.username?r.username=r.url.username:r.url.username=r.username,""===r.password?r.password=r.url.password:r.url.password=r.password}const{cookieJar:h}=r;if(h){let{setCookie:e,getCookieString:t}=h;C.assert.function_(e),C.assert.function_(t),4===e.length&&0===t.length&&(e=A.promisify(e.bind(r.cookieJar)),t=A.promisify(t.bind(r.cookieJar)),r.cookieJar={setCookie:e,getCookieString:t})}const{cache:p}=r;if(p&&(X.has(p)||X.set(p,new u((e,t)=>{const r=e[F](e,t);return C.default.promise(r)&&(r.once=(e,t)=>{if("error"===e)r.catch(t);else{if("abort"!==e)throw new Error("Unknown HTTP2 promise event: "+e);(async()=>{try{(await r).once("abort",t)}catch(e){}})()}return r}),r},p))),r.cacheOptions={...r.cacheOptions},!0===r.dnsCache)r.dnsCache=N;else if(!C.default.undefined(r.dnsCache)&&!r.dnsCache.lookup)throw new TypeError("Parameter `dnsCache` must be a CacheableLookup instance or a boolean, got "+C.default(r.dnsCache));C.default.number(r.timeout)?r.timeout={request:r.timeout}:n&&r.timeout!==n.timeout?r.timeout={...n.timeout,...r.timeout}:r.timeout={...r.timeout},r.context||(r.context={});const f=r.hooks===(null==n?void 0:n.hooks);r.hooks={...r.hooks};for(const e of t.knownHookEvents)if(e in r.hooks){if(!C.default.array(r.hooks[e]))throw new TypeError(`Parameter \`${e}\` must be an Array, got ${C.default(r.hooks[e])}`);r.hooks[e]=[...r.hooks[e]]}else r.hooks[e]=[];if(n&&!f)for(const e of t.knownHookEvents){0!==n.hooks[e].length&&(r.hooks[e]=[...n.hooks[e],...r.hooks[e]])}if("family"in r&&v.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),(null==n?void 0:n.https)&&(r.https={...n.https,...r.https}),"rejectUnauthorized"in r&&v.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in r&&v.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in r&&v.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in r&&v.default('"options.key" was never documented, please use "options.https.key"'),"cert"in r&&v.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in r&&v.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in r&&v.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in r)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(r.agent)for(const e in r.agent)if("http"!==e&&"https"!==e&&"http2"!==e)throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${e}\``);return r.maxRedirects=null!==(g=r.maxRedirects)&&void 0!==g?g:0,t.setNonEnumerableProperties([n,l],r),S.default(r,n)}_lockWrite(){const e=()=>{throw new TypeError("The payload has been already provided")};this.write=e,this.end=e}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){const{options:e}=this,{headers:r}=e,A=!C.default.undefined(e.form),o=!C.default.undefined(e.json),s=!C.default.undefined(e.body),a=A||o||s,c=t.withoutBody.has(e.method)&&!("GET"===e.method&&e.allowGetBody);if(this._cannotHaveBody=c,a){if(c)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);if([s,A,o].filter(e=>e).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(s&&!(e.body instanceof n.Readable)&&!C.default.string(e.body)&&!C.default.buffer(e.body)&&!I.default(e.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(A&&!C.default.object(e.form))throw new TypeError("The `form` option must be an Object");{const t=!C.default.string(r["content-type"]);s?(I.default(e.body)&&t&&(r["content-type"]="multipart/form-data; boundary="+e.body.getBoundary()),this[H]=e.body):A?(t&&(r["content-type"]="application/x-www-form-urlencoded"),this[H]=new i.URLSearchParams(e.form).toString()):(t&&(r["content-type"]="application/json"),this[H]=e.stringifyJson(e.json));const n=await f.default(this[H],e.headers);C.default.undefined(r["content-length"])&&C.default.undefined(r["transfer-encoding"])&&(c||C.default.undefined(n)||(r["content-length"]=String(n)))}}else c?this._lockWrite():this._unlockWrite();this[x]=Number(r["content-length"])||void 0}async _onResponseBase(e){const{options:t}=this,{url:r}=t;this[q]=e,t.decompress&&(e=h(e));const A=e.statusCode,n=e;n.statusMessage=n.statusMessage?n.statusMessage:s.STATUS_CODES[A],n.url=t.url.toString(),n.requestUrl=this.requestUrl,n.redirectUrls=this.redirects,n.request=this,n.isFromCache=e.fromCache||!1,n.ip=this.ip,n.retryCount=this.retryCount,this[U]=n.isFromCache,this[M]=Number(e.headers["content-length"])||void 0,this[K]=e,e.once("end",()=>{this[M]=this[R],this.emit("downloadProgress",this.downloadProgress)}),e.once("error",t=>{e.destroy(),this._beforeError(new ne(t,this))}),e.once("aborted",()=>{this._beforeError(new ne({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);const o=e.headers["set-cookie"];if(C.default.object(t.cookieJar)&&o){let e=o.map(async e=>t.cookieJar.setCookie(e,r.toString()));t.ignoreInvalidCookies&&(e=e.map(async e=>e.catch(()=>{})));try{await Promise.all(e)}catch(e){return void this._beforeError(e)}}if(t.followRedirect&&e.headers.location&&V.has(A)){e.resume(),this[F]&&(this[T](),delete this[F],this[O]());if(!(303===A&&"GET"!==t.method&&"HEAD"!==t.method)&&t.methodRewriting||(t.method="GET","body"in t&&delete t.body,"json"in t&&delete t.json,"form"in t&&delete t.form,this[H]=void 0,delete t.headers["content-length"]),this.redirects.length>=t.maxRedirects)return void this._beforeError(new $(this));try{const A=Buffer.from(e.headers.location,"binary").toString(),o=new i.URL(A,r),s=o.toString();decodeURI(s),o.hostname!==r.hostname||o.port!==r.port?("host"in t.headers&&delete t.headers.host,"cookie"in t.headers&&delete t.headers.cookie,"authorization"in t.headers&&delete t.headers.authorization,(t.username||t.password)&&(t.username="",t.password="")):(o.username=t.username,o.password=t.password),this.redirects.push(s),t.url=o;for(const e of t.hooks.beforeRedirect)await e(t,n);this.emit("redirect",n,t),await this._makeRequest()}catch(e){return void this._beforeError(e)}}else if(t.isStream&&t.throwHttpErrors&&!b.isResponseOk(n))this._beforeError(new ee(n));else{e.on("readable",()=>{this[G]&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this.emit("response",e);for(const r of this[P])if(!r.headersSent){for(const A in e.headers){const n=!t.decompress||"content-encoding"!==A,o=e.headers[A];n&&r.setHeader(A,o)}r.statusCode=A}}}async _onResponse(e){try{await this._onResponseBase(e)}catch(e){this._beforeError(e)}}_onRequest(e){const{options:t}=this,{timeout:r,url:A}=t;g.default(e),this[T]=B.default(e,r,A);const n=t.cache?"cacheableResponse":"response";e.once(n,e=>{this._onResponse(e)}),e.once("error",t=>{var r;e.destroy(),null===(r=e.res)||void 0===r||r.removeAllListeners("end"),t=t instanceof B.TimeoutError?new Ae(t,this.timings,this):new Z(t.message,t,this),this._beforeError(t)}),this[O]=E.default(e,this,ie),this[F]=e,this.emit("uploadProgress",this.uploadProgress);const o=this[H],i=0===this.redirects.length?this:e;C.default.nodeStream(o)?(o.pipe(i),o.once("error",e=>{this._beforeError(new re(e,this))})):(this._unlockWrite(),C.default.undefined(o)?(this._cannotHaveBody||this._noPipe)&&(i.end(),this._lockWrite()):(this._writeRequest(o,void 0,()=>{}),i.end(),this._lockWrite())),this.emit("request",e)}async _createCacheableRequest(e,t){return new Promise((r,A)=>{let n;Object.assign(t,y.default(e)),delete t.url;const o=X.get(t.cache)(t,async e=>{e._readableState.autoDestroy=!1,n&&(await n).emit("cacheableResponse",e),r(e)});t.url=e,o.once("error",A),o.once("request",async e=>{n=e,r(n)})})}async _makeRequest(){var e,t,r,A,n;const{options:o}=this,{headers:i}=o;for(const e in i)if(C.default.undefined(i[e]))delete i[e];else if(C.default.null_(i[e]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${e}\` header`);if(o.decompress&&C.default.undefined(i["accept-encoding"])&&(i["accept-encoding"]=W?"gzip, deflate, br":"gzip, deflate"),o.cookieJar){const e=await o.cookieJar.getCookieString(o.url.toString());C.default.nonEmptyString(e)&&(o.headers.cookie=e)}for(const e of o.hooks.beforeRequest){const t=await e(o);if(!C.default.undefined(t)){o.request=()=>t;break}}o.body&&this[H]!==o.body&&(this[H]=o.body);const{agent:a,request:g,timeout:l,url:h}=o;if(o.dnsCache&&!("lookup"in o)&&(o.lookup=o.dnsCache.lookup),"unix"===h.hostname){const e=/(?.+?):(?.+)/.exec(`${h.pathname}${h.search}`);if(null==e?void 0:e.groups){const{socketPath:t,path:r}=e.groups;Object.assign(o,{socketPath:t,path:r,host:""})}}const d="https:"===h.protocol;let f;f=o.http2?p.auto:d?c.request:s.request;const I=null!==(e=o.request)&&void 0!==e?e:f,E=o.cache?this._createCacheableRequest:I;a&&!o.http2&&(o.agent=a[d?"https":"http"]),o[F]=I,delete o.request,delete o.timeout;const B=o;if(B.shared=null===(t=o.cacheOptions)||void 0===t?void 0:t.shared,B.cacheHeuristic=null===(r=o.cacheOptions)||void 0===r?void 0:r.cacheHeuristic,B.immutableMinTimeToLive=null===(A=o.cacheOptions)||void 0===A?void 0:A.immutableMinTimeToLive,B.ignoreCargoCult=null===(n=o.cacheOptions)||void 0===n?void 0:n.ignoreCargoCult,void 0!==o.dnsLookupIpVersion)try{B.family=D.dnsLookupIpVersionToFamily(o.dnsLookupIpVersion)}catch(e){throw new Error("Invalid `dnsLookupIpVersion` option value")}o.https&&("rejectUnauthorized"in o.https&&(B.rejectUnauthorized=o.https.rejectUnauthorized),o.https.checkServerIdentity&&(B.checkServerIdentity=o.https.checkServerIdentity),o.https.certificateAuthority&&(B.ca=o.https.certificateAuthority),o.https.certificate&&(B.cert=o.https.certificate),o.https.key&&(B.key=o.https.key),o.https.passphrase&&(B.passphrase=o.https.passphrase),o.https.pfx&&(B.pfx=o.https.pfx));try{let e=await E(h,B);C.default.undefined(e)&&(e=f(h,B)),o.request=g,o.timeout=l,o.agent=a,o.https&&("rejectUnauthorized"in o.https&&delete B.rejectUnauthorized,o.https.checkServerIdentity&&delete B.checkServerIdentity,o.https.certificateAuthority&&delete B.ca,o.https.certificate&&delete B.cert,o.https.key&&delete B.key,o.https.passphrase&&delete B.passphrase,o.https.pfx&&delete B.pfx),y=e,C.default.object(y)&&!("statusCode"in y)?this._onRequest(e):this.writable?(this.once("finish",()=>{this._onResponse(e)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(e)}catch(e){if(e instanceof u.CacheError)throw new te(e,this);throw new Z(e.message,e,this)}var y}async _error(e){try{for(const t of this.options.hooks.beforeError)e=await t(e)}catch(t){e=new Z(t.message,t,this)}this.destroy(e)}_beforeError(e){if(this[Y])return;const{options:t}=this,r=this.retryCount+1;this[Y]=!0,e instanceof Z||(e=new Z(e.message,e,this));const A=e,{response:n}=A;(async()=>{if(n&&!n.body){n.setEncoding(this._readableState.encoding);try{n.rawBody=await Q.default(n),n.body=n.rawBody.toString()}catch(e){}}if(0!==this.listenerCount("retry")){let o;try{let e;n&&"retry-after"in n.headers&&(e=Number(n.headers["retry-after"]),Number.isNaN(e)?(e=Date.parse(n.headers["retry-after"])-Date.now(),e<=0&&(e=1)):e*=1e3),o=await t.retry.calculateDelay({attemptCount:r,retryOptions:t.retry,error:A,retryAfter:e,computedValue:k.default({attemptCount:r,retryOptions:t.retry,error:A,retryAfter:e,computedValue:0})})}catch(e){return void this._error(new Z(e.message,e,this))}if(o){const t=async()=>{try{for(const e of this.options.hooks.beforeRetry)await e(this.options,A,r)}catch(t){return void this._error(new Z(t.message,e,this))}this.destroyed||(this.destroy(),this.emit("retry",r,e))};return void(this[z]=setTimeout(t,o))}}this._error(A)})()}_read(){this[G]=!0;const e=this[K];if(e&&!this[Y]){let t;for(e.readableLength&&(this[G]=!1);null!==(t=e.read());){this[R]+=t.length,this[j]=!0;const e=this.downloadProgress;e.percent<1&&this.emit("downloadProgress",e),this.push(t)}}}_write(e,t,r){const A=()=>{this._writeRequest(e,t,r)};this.requestInitialized?A():this[J].push(A)}_writeRequest(e,t,r){this[F].destroyed||(this._progressCallbacks.push(()=>{this[L]+=Buffer.byteLength(e,t);const r=this.uploadProgress;r.percent<1&&this.emit("uploadProgress",r)}),this[F].write(e,t,e=>{e||0===this._progressCallbacks.length||this._progressCallbacks.shift()(),r(e)}))}_final(e){const t=()=>{for(;0!==this._progressCallbacks.length;)this._progressCallbacks.shift()();F in this?this[F].destroyed?e():this[F].end(t=>{t||(this[x]=this[L],this.emit("uploadProgress",this.uploadProgress),this[F].emit("upload-complete")),e(t)}):e()};this.requestInitialized?t():this[J].push(t)}_destroy(e,t){var r;this[Y]=!0,clearTimeout(this[z]),F in this&&(this[T](),(null===(r=this[K])||void 0===r?void 0:r.complete)||this[F].destroy()),null===e||C.default.undefined(e)||e instanceof Z||(e=new Z(e.message,e,this)),t(e)}get _isAboutToError(){return this[Y]}get ip(){var e;return null===(e=this[F])||void 0===e?void 0:e.socket.remoteAddress}get aborted(){var e,t,r;return(null!==(t=null===(e=this[F])||void 0===e?void 0:e.destroyed)&&void 0!==t?t:this.destroyed)&&!(null===(r=this[q])||void 0===r?void 0:r.complete)}get socket(){var e;return null===(e=this[F])||void 0===e?void 0:e.socket}get downloadProgress(){let e;return e=this[M]?this[R]/this[M]:this[M]===this[R]?1:0,{percent:e,transferred:this[R],total:this[M]}}get uploadProgress(){let e;return e=this[x]?this[L]/this[x]:this[x]===this[L]?1:0,{percent:e,transferred:this[L],total:this[x]}}get timings(){var e;return null===(e=this[F])||void 0===e?void 0:e.timings}get isFromCache(){return this[U]}pipe(e,t){if(this[j])throw new Error("Failed to pipe. The response has been emitted already.");return e instanceof a.ServerResponse&&this[P].add(e),super.pipe(e,t)}unpipe(e){return e instanceof a.ServerResponse&&this[P].delete(e),super.unpipe(e),this}}t.default=se},11338:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dnsLookupIpVersionToFamily=t.isDnsLookupIpVersion=void 0;const r={auto:0,ipv4:4,ipv6:6};t.isDnsLookupIpVersion=e=>e in r,t.dnsLookupIpVersionToFamily=e=>{if(t.isDnsLookupIpVersion(e))return r[e];throw new Error("Invalid DNS lookup IP version")}},78586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(35747),n=r(31669),o=r(7966),i=r(2920),s=n.promisify(A.stat);t.default=async(e,t)=>{if(t&&"content-length"in t)return Number(t["content-length"]);if(!e)return 0;if(o.default.string(e))return Buffer.byteLength(e);if(o.default.buffer(e))return e.length;if(i.default(e))return n.promisify(e.getLength.bind(e))();if(e instanceof A.ReadStream){const{size:t}=await s(e.path);return t}}},57854:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=async e=>{const t=[];let r=0;for await(const A of e)t.push(A),r+=Buffer.byteLength(A);return Buffer.isBuffer(t[0])?Buffer.concat(t,r):Buffer.from(t.join(""))}},2920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(7966);t.default=e=>A.default.nodeStream(e)&&A.default.function_(e.getBoundary)},38206:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isResponseOk=void 0,t.isResponseOk=e=>{const{statusCode:t}=e,r=e.request.options.followRedirect?299:399;return t>=200&&t<=r||304===t}},82524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(78835),n=["protocol","host","hostname","port","pathname","search"];t.default=(e,t)=>{var r,o;if(t.path){if(t.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(t.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(t.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(t.search&&t.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!e){if(!t.protocol)throw new TypeError("No URL protocol specified");e=`${t.protocol}//${null!==(o=null!==(r=t.hostname)&&void 0!==r?r:t.host)&&void 0!==o?o:""}`}const i=new A.URL(e);if(t.path){const e=t.path.indexOf("?");-1===e?t.pathname=t.path:(t.pathname=t.path.slice(0,e),t.search=t.path.slice(e+1)),delete t.path}for(const e of n)t[e]&&(i[e]=t[e].toString());return i}},51743:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){const A={};for(const n of r)A[n]=(...e)=>{t.emit(n,...e)},e.on(n,A[n]);return()=>{for(const t of r)e.off(t,A[t])}}},44947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=void 0;const A=r(11631),n=r(70148),o=Symbol("reentry"),i=()=>{};class s extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`),this.event=t,this.name="TimeoutError",this.code="ETIMEDOUT"}}t.TimeoutError=s,t.default=(e,t,r)=>{if(o in e)return i;e[o]=!0;const a=[],{once:c,unhandleAll:g}=n.default(),l=(e,t,r)=>{var A;const n=setTimeout(t,e,e,r);null===(A=n.unref)||void 0===A||A.call(n);const o=()=>{clearTimeout(n)};return a.push(o),o},{host:u,hostname:h}=r,p=(t,r)=>{e.destroy(new s(t,r))},d=()=>{for(const e of a)e();g()};if(e.once("error",t=>{if(d(),0===e.listenerCount("error"))throw t}),e.once("close",d),c(e,"response",e=>{c(e,"end",d)}),void 0!==t.request&&l(t.request,p,"request"),void 0!==t.socket){const r=()=>{p(t.socket,"socket")};e.setTimeout(t.socket,r),a.push(()=>{e.removeListener("timeout",r)})}return c(e,"socket",n=>{var o;const{socketPath:i}=e;if(n.connecting){const e=Boolean(null!=i?i:0!==A.isIP(null!==(o=null!=h?h:u)&&void 0!==o?o:""));if(void 0!==t.lookup&&!e&&void 0===n.address().address){const e=l(t.lookup,p,"lookup");c(n,"lookup",e)}if(void 0!==t.connect){const r=()=>l(t.connect,p,"connect");e?c(n,"connect",r()):c(n,"lookup",e=>{null===e&&c(n,"connect",r())})}void 0!==t.secureConnect&&"https:"===r.protocol&&c(n,"connect",()=>{const e=l(t.secureConnect,p,"secureConnect");c(n,"secureConnect",e)})}if(void 0!==t.send){const r=()=>l(t.send,p,"send");n.connecting?c(n,"connect",()=>{c(e,"upload-complete",r())}):c(e,"upload-complete",r())}}),void 0!==t.response&&c(e,"upload-complete",()=>{const r=l(t.response,p,"response");c(e,"response",r)}),d}},70148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=()=>{const e=[];return{once(t,r,A){t.once(r,A),e.push({origin:t,event:r,fn:A})},unhandleAll(){for(const t of e){const{origin:e,event:r,fn:A}=t;e.removeListener(r,A)}e.length=0}}}},50116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(7966);t.default=e=>{const t={protocol:(e=e).protocol,hostname:A.default.string(e.hostname)&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};return A.default.string(e.port)&&0!==e.port.length&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||""}:${e.password||""}`),t}},85551:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,t){"object"==typeof e?this.weakMap.set(e,t):this.map.set(e,t)}get(e){return"object"==typeof e?this.weakMap.get(e):this.map.get(e)}has(e){return"object"==typeof e?this.weakMap.has(e):this.map.has(e)}}},39226:function(e,t,r){"use strict";var A=this&&this.__createBinding||(Object.create?function(e,t,r,A){void 0===A&&(A=r),Object.defineProperty(e,A,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,A){void 0===A&&(A=r),e[A]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||A(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultHandler=void 0;const o=r(7966),i=r(81588),s=r(93576),a=r(9048),c=r(9743),g={RequestError:i.RequestError,CacheError:i.CacheError,ReadError:i.ReadError,HTTPError:i.HTTPError,MaxRedirectsError:i.MaxRedirectsError,TimeoutError:i.TimeoutError,ParseError:i.ParseError,CancelError:i.CancelError,UnsupportedProtocolError:i.UnsupportedProtocolError,UploadError:i.UploadError},l=async e=>new Promise(t=>{setTimeout(t,e)}),{normalizeArguments:u}=a.default,h=(...e)=>{let t;for(const r of e)t=u(void 0,r,t);return t},p=e=>e.isStream?new a.default(void 0,e):i.default(e),d=e=>"defaults"in e&&"options"in e.defaults,C=["get","post","put","patch","head","delete"];t.defaultHandler=(e,t)=>t(e);const f=(e,t)=>{if(e)for(const r of e)r(t)},I=e=>{e._rawHandlers=e.handlers,e.handlers=e.handlers.map(e=>(t,r)=>{let A;const n=e(t,e=>(A=r(e),A));if(n!==A&&!t.isStream&&A){const e=n,{then:t,catch:r,finally:o}=e;Object.setPrototypeOf(e,Object.getPrototypeOf(A)),Object.defineProperties(e,Object.getOwnPropertyDescriptors(A)),e.then=t,e.catch=r,e.finally=o}return n});const r=(t,r,A)=>{var n,c;let g=0;const l=t=>e.handlers[g++](t,g===e.handlers.length?p:l);if(o.default.plainObject(t)){const e={...t,...r};a.setNonEnumerableProperties([t,r],e),r=e,t=void 0}try{let o;try{f(e.options.hooks.init,r),f(null===(n=null==r?void 0:r.hooks)||void 0===n?void 0:n.init,r)}catch(e){o=e}const s=u(t,r,null!=A?A:e.options);if(s[a.kIsNormalizedAlready]=!0,o)throw new i.RequestError(o.message,o,s);return l(s)}catch(t){if(null==r?void 0:r.isStream)throw t;return s.default(t,e.options.hooks.beforeError,null===(c=null==r?void 0:r.hooks)||void 0===c?void 0:c.beforeError)}};r.extend=(...r)=>{const A=[e.options];let n,o=[...e._rawHandlers];for(const e of r)d(e)?(A.push(e.defaults.options),o.push(...e.defaults._rawHandlers),n=e.defaults.mutableDefaults):(A.push(e),"handlers"in e&&o.push(...e.handlers),n=e.mutableDefaults);return o=o.filter(e=>e!==t.defaultHandler),0===o.length&&o.push(t.defaultHandler),I({options:h(...A),handlers:o,mutableDefaults:Boolean(n)})};const A=async function*(t,A){let n=u(t,A,e.options);n.resolveBodyOnly=!1;const i=n.pagination;if(!o.default.object(i))throw new TypeError("`options.pagination` must be implemented");const s=[];let{countLimit:a}=i,c=0;for(;c{const r=[];for await(const n of A(e,t))r.push(n);return r},r.paginate.each=A,r.stream=(e,t)=>r(e,{...t,isStream:!0});for(const e of C)r[e]=(t,A)=>r(t,{...A,method:e}),r.stream[e]=(t,A)=>r(t,{...A,method:e,isStream:!0});return Object.assign(r,g),Object.defineProperty(r,"defaults",{value:e.mutableDefaults?e:c.default(e),writable:e.mutableDefaults,configurable:e.mutableDefaults,enumerable:!0}),r.mergeOptions=h,r};t.default=I,n(r(69022),t)},48722:function(e,t,r){"use strict";var A=this&&this.__createBinding||(Object.create?function(e,t,r,A){void 0===A&&(A=r),Object.defineProperty(e,A,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,A){void 0===A&&(A=r),e[A]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||A(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});const o=r(78835),i=r(39226),s={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:e})=>e},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:e=>"json"===e.request.options.responseType?e.body:JSON.parse(e.body),paginate:e=>{if(!Reflect.has(e.headers,"link"))return!1;const t=e.headers.link.split(",");let r;for(const e of t){const t=e.split(";");if(t[1].includes("next")){r=t[0].trimStart().trim(),r=r.slice(1,-1);break}}if(r){return{url:new o.URL(r)}}return!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:e=>JSON.parse(e),stringifyJson:e=>JSON.stringify(e),cacheOptions:{}},handlers:[i.defaultHandler],mutableDefaults:!1},a=i.default(s);t.default=a,e.exports=a,e.exports.default=a,e.exports.__esModule=!0,n(r(39226),t),n(r(81588),t)},69022:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9743:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const A=r(7966);t.default=function e(t){for(const r of Object.values(t))(A.default.plainObject(r)||A.default.array(r))&&e(r);return Object.freeze(t)}},54595:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=new Set;t.default=e=>{r.has(e)||(r.add(e),process.emitWarning("Got: "+e,{type:"DeprecationWarning"}))}},74988:e=>{e.exports&&(e.exports=function(){var e=3,t=4,r=12,A=13,n=16,o=17;function i(e,t){void 0===t&&(t=0);var r=e.charCodeAt(t);if(55296<=r&&r<=56319&&t=1){var n=r;return 55296<=(A=e.charCodeAt(t-1))&&A<=56319?1024*(A-55296)+(n-56320)+65536:n}return r}function s(i,s,a){var c=[i].concat(s).concat([a]),g=c[c.length-2],l=a,u=c.lastIndexOf(14);if(u>1&&c.slice(1,u).every((function(t){return t==e}))&&-1==[e,A,o].indexOf(i))return 2;var h=c.lastIndexOf(t);if(h>0&&c.slice(1,h).every((function(e){return e==t}))&&-1==[r,t].indexOf(g))return c.filter((function(e){return e==t})).length%2==1?3:4;if(0==g&&1==l)return 0;if(2==g||0==g||1==g)return 14==l&&s.every((function(t){return t==e}))?2:1;if(2==l||0==l||1==l)return 1;if(6==g&&(6==l||7==l||9==l||10==l))return 0;if(!(9!=g&&7!=g||7!=l&&8!=l))return 0;if((10==g||8==g)&&8==l)return 0;if(l==e||15==l)return 0;if(5==l)return 0;if(g==r)return 0;var p=-1!=c.indexOf(e)?c.lastIndexOf(e)-1:c.length-2;return-1!=[A,o].indexOf(c[p])&&c.slice(p+1,-1).every((function(t){return t==e}))&&14==l||15==g&&-1!=[n,o].indexOf(l)?0:-1!=s.indexOf(t)?2:g==t&&l==t?0:1}function a(i){return 1536<=i&&i<=1541||1757==i||1807==i||2274==i||3406==i||69821==i||70082<=i&&i<=70083||72250==i||72326<=i&&i<=72329||73030==i?r:13==i?0:10==i?1:0<=i&&i<=9||11<=i&&i<=12||14<=i&&i<=31||127<=i&&i<=159||173==i||1564==i||6158==i||8203==i||8206<=i&&i<=8207||8232==i||8233==i||8234<=i&&i<=8238||8288<=i&&i<=8292||8293==i||8294<=i&&i<=8303||55296<=i&&i<=57343||65279==i||65520<=i&&i<=65528||65529<=i&&i<=65531||113824<=i&&i<=113827||119155<=i&&i<=119162||917504==i||917505==i||917506<=i&&i<=917535||917632<=i&&i<=917759||918e3<=i&&i<=921599?2:768<=i&&i<=879||1155<=i&&i<=1159||1160<=i&&i<=1161||1425<=i&&i<=1469||1471==i||1473<=i&&i<=1474||1476<=i&&i<=1477||1479==i||1552<=i&&i<=1562||1611<=i&&i<=1631||1648==i||1750<=i&&i<=1756||1759<=i&&i<=1764||1767<=i&&i<=1768||1770<=i&&i<=1773||1809==i||1840<=i&&i<=1866||1958<=i&&i<=1968||2027<=i&&i<=2035||2070<=i&&i<=2073||2075<=i&&i<=2083||2085<=i&&i<=2087||2089<=i&&i<=2093||2137<=i&&i<=2139||2260<=i&&i<=2273||2275<=i&&i<=2306||2362==i||2364==i||2369<=i&&i<=2376||2381==i||2385<=i&&i<=2391||2402<=i&&i<=2403||2433==i||2492==i||2494==i||2497<=i&&i<=2500||2509==i||2519==i||2530<=i&&i<=2531||2561<=i&&i<=2562||2620==i||2625<=i&&i<=2626||2631<=i&&i<=2632||2635<=i&&i<=2637||2641==i||2672<=i&&i<=2673||2677==i||2689<=i&&i<=2690||2748==i||2753<=i&&i<=2757||2759<=i&&i<=2760||2765==i||2786<=i&&i<=2787||2810<=i&&i<=2815||2817==i||2876==i||2878==i||2879==i||2881<=i&&i<=2884||2893==i||2902==i||2903==i||2914<=i&&i<=2915||2946==i||3006==i||3008==i||3021==i||3031==i||3072==i||3134<=i&&i<=3136||3142<=i&&i<=3144||3146<=i&&i<=3149||3157<=i&&i<=3158||3170<=i&&i<=3171||3201==i||3260==i||3263==i||3266==i||3270==i||3276<=i&&i<=3277||3285<=i&&i<=3286||3298<=i&&i<=3299||3328<=i&&i<=3329||3387<=i&&i<=3388||3390==i||3393<=i&&i<=3396||3405==i||3415==i||3426<=i&&i<=3427||3530==i||3535==i||3538<=i&&i<=3540||3542==i||3551==i||3633==i||3636<=i&&i<=3642||3655<=i&&i<=3662||3761==i||3764<=i&&i<=3769||3771<=i&&i<=3772||3784<=i&&i<=3789||3864<=i&&i<=3865||3893==i||3895==i||3897==i||3953<=i&&i<=3966||3968<=i&&i<=3972||3974<=i&&i<=3975||3981<=i&&i<=3991||3993<=i&&i<=4028||4038==i||4141<=i&&i<=4144||4146<=i&&i<=4151||4153<=i&&i<=4154||4157<=i&&i<=4158||4184<=i&&i<=4185||4190<=i&&i<=4192||4209<=i&&i<=4212||4226==i||4229<=i&&i<=4230||4237==i||4253==i||4957<=i&&i<=4959||5906<=i&&i<=5908||5938<=i&&i<=5940||5970<=i&&i<=5971||6002<=i&&i<=6003||6068<=i&&i<=6069||6071<=i&&i<=6077||6086==i||6089<=i&&i<=6099||6109==i||6155<=i&&i<=6157||6277<=i&&i<=6278||6313==i||6432<=i&&i<=6434||6439<=i&&i<=6440||6450==i||6457<=i&&i<=6459||6679<=i&&i<=6680||6683==i||6742==i||6744<=i&&i<=6750||6752==i||6754==i||6757<=i&&i<=6764||6771<=i&&i<=6780||6783==i||6832<=i&&i<=6845||6846==i||6912<=i&&i<=6915||6964==i||6966<=i&&i<=6970||6972==i||6978==i||7019<=i&&i<=7027||7040<=i&&i<=7041||7074<=i&&i<=7077||7080<=i&&i<=7081||7083<=i&&i<=7085||7142==i||7144<=i&&i<=7145||7149==i||7151<=i&&i<=7153||7212<=i&&i<=7219||7222<=i&&i<=7223||7376<=i&&i<=7378||7380<=i&&i<=7392||7394<=i&&i<=7400||7405==i||7412==i||7416<=i&&i<=7417||7616<=i&&i<=7673||7675<=i&&i<=7679||8204==i||8400<=i&&i<=8412||8413<=i&&i<=8416||8417==i||8418<=i&&i<=8420||8421<=i&&i<=8432||11503<=i&&i<=11505||11647==i||11744<=i&&i<=11775||12330<=i&&i<=12333||12334<=i&&i<=12335||12441<=i&&i<=12442||42607==i||42608<=i&&i<=42610||42612<=i&&i<=42621||42654<=i&&i<=42655||42736<=i&&i<=42737||43010==i||43014==i||43019==i||43045<=i&&i<=43046||43204<=i&&i<=43205||43232<=i&&i<=43249||43302<=i&&i<=43309||43335<=i&&i<=43345||43392<=i&&i<=43394||43443==i||43446<=i&&i<=43449||43452==i||43493==i||43561<=i&&i<=43566||43569<=i&&i<=43570||43573<=i&&i<=43574||43587==i||43596==i||43644==i||43696==i||43698<=i&&i<=43700||43703<=i&&i<=43704||43710<=i&&i<=43711||43713==i||43756<=i&&i<=43757||43766==i||44005==i||44008==i||44013==i||64286==i||65024<=i&&i<=65039||65056<=i&&i<=65071||65438<=i&&i<=65439||66045==i||66272==i||66422<=i&&i<=66426||68097<=i&&i<=68099||68101<=i&&i<=68102||68108<=i&&i<=68111||68152<=i&&i<=68154||68159==i||68325<=i&&i<=68326||69633==i||69688<=i&&i<=69702||69759<=i&&i<=69761||69811<=i&&i<=69814||69817<=i&&i<=69818||69888<=i&&i<=69890||69927<=i&&i<=69931||69933<=i&&i<=69940||70003==i||70016<=i&&i<=70017||70070<=i&&i<=70078||70090<=i&&i<=70092||70191<=i&&i<=70193||70196==i||70198<=i&&i<=70199||70206==i||70367==i||70371<=i&&i<=70378||70400<=i&&i<=70401||70460==i||70462==i||70464==i||70487==i||70502<=i&&i<=70508||70512<=i&&i<=70516||70712<=i&&i<=70719||70722<=i&&i<=70724||70726==i||70832==i||70835<=i&&i<=70840||70842==i||70845==i||70847<=i&&i<=70848||70850<=i&&i<=70851||71087==i||71090<=i&&i<=71093||71100<=i&&i<=71101||71103<=i&&i<=71104||71132<=i&&i<=71133||71219<=i&&i<=71226||71229==i||71231<=i&&i<=71232||71339==i||71341==i||71344<=i&&i<=71349||71351==i||71453<=i&&i<=71455||71458<=i&&i<=71461||71463<=i&&i<=71467||72193<=i&&i<=72198||72201<=i&&i<=72202||72243<=i&&i<=72248||72251<=i&&i<=72254||72263==i||72273<=i&&i<=72278||72281<=i&&i<=72283||72330<=i&&i<=72342||72344<=i&&i<=72345||72752<=i&&i<=72758||72760<=i&&i<=72765||72767==i||72850<=i&&i<=72871||72874<=i&&i<=72880||72882<=i&&i<=72883||72885<=i&&i<=72886||73009<=i&&i<=73014||73018==i||73020<=i&&i<=73021||73023<=i&&i<=73029||73031==i||92912<=i&&i<=92916||92976<=i&&i<=92982||94095<=i&&i<=94098||113821<=i&&i<=113822||119141==i||119143<=i&&i<=119145||119150<=i&&i<=119154||119163<=i&&i<=119170||119173<=i&&i<=119179||119210<=i&&i<=119213||119362<=i&&i<=119364||121344<=i&&i<=121398||121403<=i&&i<=121452||121461==i||121476==i||121499<=i&&i<=121503||121505<=i&&i<=121519||122880<=i&&i<=122886||122888<=i&&i<=122904||122907<=i&&i<=122913||122915<=i&&i<=122916||122918<=i&&i<=122922||125136<=i&&i<=125142||125252<=i&&i<=125258||917536<=i&&i<=917631||917760<=i&&i<=917999?e:127462<=i&&i<=127487?t:2307==i||2363==i||2366<=i&&i<=2368||2377<=i&&i<=2380||2382<=i&&i<=2383||2434<=i&&i<=2435||2495<=i&&i<=2496||2503<=i&&i<=2504||2507<=i&&i<=2508||2563==i||2622<=i&&i<=2624||2691==i||2750<=i&&i<=2752||2761==i||2763<=i&&i<=2764||2818<=i&&i<=2819||2880==i||2887<=i&&i<=2888||2891<=i&&i<=2892||3007==i||3009<=i&&i<=3010||3014<=i&&i<=3016||3018<=i&&i<=3020||3073<=i&&i<=3075||3137<=i&&i<=3140||3202<=i&&i<=3203||3262==i||3264<=i&&i<=3265||3267<=i&&i<=3268||3271<=i&&i<=3272||3274<=i&&i<=3275||3330<=i&&i<=3331||3391<=i&&i<=3392||3398<=i&&i<=3400||3402<=i&&i<=3404||3458<=i&&i<=3459||3536<=i&&i<=3537||3544<=i&&i<=3550||3570<=i&&i<=3571||3635==i||3763==i||3902<=i&&i<=3903||3967==i||4145==i||4155<=i&&i<=4156||4182<=i&&i<=4183||4228==i||6070==i||6078<=i&&i<=6085||6087<=i&&i<=6088||6435<=i&&i<=6438||6441<=i&&i<=6443||6448<=i&&i<=6449||6451<=i&&i<=6456||6681<=i&&i<=6682||6741==i||6743==i||6765<=i&&i<=6770||6916==i||6965==i||6971==i||6973<=i&&i<=6977||6979<=i&&i<=6980||7042==i||7073==i||7078<=i&&i<=7079||7082==i||7143==i||7146<=i&&i<=7148||7150==i||7154<=i&&i<=7155||7204<=i&&i<=7211||7220<=i&&i<=7221||7393==i||7410<=i&&i<=7411||7415==i||43043<=i&&i<=43044||43047==i||43136<=i&&i<=43137||43188<=i&&i<=43203||43346<=i&&i<=43347||43395==i||43444<=i&&i<=43445||43450<=i&&i<=43451||43453<=i&&i<=43456||43567<=i&&i<=43568||43571<=i&&i<=43572||43597==i||43755==i||43758<=i&&i<=43759||43765==i||44003<=i&&i<=44004||44006<=i&&i<=44007||44009<=i&&i<=44010||44012==i||69632==i||69634==i||69762==i||69808<=i&&i<=69810||69815<=i&&i<=69816||69932==i||70018==i||70067<=i&&i<=70069||70079<=i&&i<=70080||70188<=i&&i<=70190||70194<=i&&i<=70195||70197==i||70368<=i&&i<=70370||70402<=i&&i<=70403||70463==i||70465<=i&&i<=70468||70471<=i&&i<=70472||70475<=i&&i<=70477||70498<=i&&i<=70499||70709<=i&&i<=70711||70720<=i&&i<=70721||70725==i||70833<=i&&i<=70834||70841==i||70843<=i&&i<=70844||70846==i||70849==i||71088<=i&&i<=71089||71096<=i&&i<=71099||71102==i||71216<=i&&i<=71218||71227<=i&&i<=71228||71230==i||71340==i||71342<=i&&i<=71343||71350==i||71456<=i&&i<=71457||71462==i||72199<=i&&i<=72200||72249==i||72279<=i&&i<=72280||72343==i||72751==i||72766==i||72873==i||72881==i||72884==i||94033<=i&&i<=94078||119142==i||119149==i?5:4352<=i&&i<=4447||43360<=i&&i<=43388?6:4448<=i&&i<=4519||55216<=i&&i<=55238?7:4520<=i&&i<=4607||55243<=i&&i<=55291?8:44032==i||44060==i||44088==i||44116==i||44144==i||44172==i||44200==i||44228==i||44256==i||44284==i||44312==i||44340==i||44368==i||44396==i||44424==i||44452==i||44480==i||44508==i||44536==i||44564==i||44592==i||44620==i||44648==i||44676==i||44704==i||44732==i||44760==i||44788==i||44816==i||44844==i||44872==i||44900==i||44928==i||44956==i||44984==i||45012==i||45040==i||45068==i||45096==i||45124==i||45152==i||45180==i||45208==i||45236==i||45264==i||45292==i||45320==i||45348==i||45376==i||45404==i||45432==i||45460==i||45488==i||45516==i||45544==i||45572==i||45600==i||45628==i||45656==i||45684==i||45712==i||45740==i||45768==i||45796==i||45824==i||45852==i||45880==i||45908==i||45936==i||45964==i||45992==i||46020==i||46048==i||46076==i||46104==i||46132==i||46160==i||46188==i||46216==i||46244==i||46272==i||46300==i||46328==i||46356==i||46384==i||46412==i||46440==i||46468==i||46496==i||46524==i||46552==i||46580==i||46608==i||46636==i||46664==i||46692==i||46720==i||46748==i||46776==i||46804==i||46832==i||46860==i||46888==i||46916==i||46944==i||46972==i||47e3==i||47028==i||47056==i||47084==i||47112==i||47140==i||47168==i||47196==i||47224==i||47252==i||47280==i||47308==i||47336==i||47364==i||47392==i||47420==i||47448==i||47476==i||47504==i||47532==i||47560==i||47588==i||47616==i||47644==i||47672==i||47700==i||47728==i||47756==i||47784==i||47812==i||47840==i||47868==i||47896==i||47924==i||47952==i||47980==i||48008==i||48036==i||48064==i||48092==i||48120==i||48148==i||48176==i||48204==i||48232==i||48260==i||48288==i||48316==i||48344==i||48372==i||48400==i||48428==i||48456==i||48484==i||48512==i||48540==i||48568==i||48596==i||48624==i||48652==i||48680==i||48708==i||48736==i||48764==i||48792==i||48820==i||48848==i||48876==i||48904==i||48932==i||48960==i||48988==i||49016==i||49044==i||49072==i||49100==i||49128==i||49156==i||49184==i||49212==i||49240==i||49268==i||49296==i||49324==i||49352==i||49380==i||49408==i||49436==i||49464==i||49492==i||49520==i||49548==i||49576==i||49604==i||49632==i||49660==i||49688==i||49716==i||49744==i||49772==i||49800==i||49828==i||49856==i||49884==i||49912==i||49940==i||49968==i||49996==i||50024==i||50052==i||50080==i||50108==i||50136==i||50164==i||50192==i||50220==i||50248==i||50276==i||50304==i||50332==i||50360==i||50388==i||50416==i||50444==i||50472==i||50500==i||50528==i||50556==i||50584==i||50612==i||50640==i||50668==i||50696==i||50724==i||50752==i||50780==i||50808==i||50836==i||50864==i||50892==i||50920==i||50948==i||50976==i||51004==i||51032==i||51060==i||51088==i||51116==i||51144==i||51172==i||51200==i||51228==i||51256==i||51284==i||51312==i||51340==i||51368==i||51396==i||51424==i||51452==i||51480==i||51508==i||51536==i||51564==i||51592==i||51620==i||51648==i||51676==i||51704==i||51732==i||51760==i||51788==i||51816==i||51844==i||51872==i||51900==i||51928==i||51956==i||51984==i||52012==i||52040==i||52068==i||52096==i||52124==i||52152==i||52180==i||52208==i||52236==i||52264==i||52292==i||52320==i||52348==i||52376==i||52404==i||52432==i||52460==i||52488==i||52516==i||52544==i||52572==i||52600==i||52628==i||52656==i||52684==i||52712==i||52740==i||52768==i||52796==i||52824==i||52852==i||52880==i||52908==i||52936==i||52964==i||52992==i||53020==i||53048==i||53076==i||53104==i||53132==i||53160==i||53188==i||53216==i||53244==i||53272==i||53300==i||53328==i||53356==i||53384==i||53412==i||53440==i||53468==i||53496==i||53524==i||53552==i||53580==i||53608==i||53636==i||53664==i||53692==i||53720==i||53748==i||53776==i||53804==i||53832==i||53860==i||53888==i||53916==i||53944==i||53972==i||54e3==i||54028==i||54056==i||54084==i||54112==i||54140==i||54168==i||54196==i||54224==i||54252==i||54280==i||54308==i||54336==i||54364==i||54392==i||54420==i||54448==i||54476==i||54504==i||54532==i||54560==i||54588==i||54616==i||54644==i||54672==i||54700==i||54728==i||54756==i||54784==i||54812==i||54840==i||54868==i||54896==i||54924==i||54952==i||54980==i||55008==i||55036==i||55064==i||55092==i||55120==i||55148==i||55176==i?9:44033<=i&&i<=44059||44061<=i&&i<=44087||44089<=i&&i<=44115||44117<=i&&i<=44143||44145<=i&&i<=44171||44173<=i&&i<=44199||44201<=i&&i<=44227||44229<=i&&i<=44255||44257<=i&&i<=44283||44285<=i&&i<=44311||44313<=i&&i<=44339||44341<=i&&i<=44367||44369<=i&&i<=44395||44397<=i&&i<=44423||44425<=i&&i<=44451||44453<=i&&i<=44479||44481<=i&&i<=44507||44509<=i&&i<=44535||44537<=i&&i<=44563||44565<=i&&i<=44591||44593<=i&&i<=44619||44621<=i&&i<=44647||44649<=i&&i<=44675||44677<=i&&i<=44703||44705<=i&&i<=44731||44733<=i&&i<=44759||44761<=i&&i<=44787||44789<=i&&i<=44815||44817<=i&&i<=44843||44845<=i&&i<=44871||44873<=i&&i<=44899||44901<=i&&i<=44927||44929<=i&&i<=44955||44957<=i&&i<=44983||44985<=i&&i<=45011||45013<=i&&i<=45039||45041<=i&&i<=45067||45069<=i&&i<=45095||45097<=i&&i<=45123||45125<=i&&i<=45151||45153<=i&&i<=45179||45181<=i&&i<=45207||45209<=i&&i<=45235||45237<=i&&i<=45263||45265<=i&&i<=45291||45293<=i&&i<=45319||45321<=i&&i<=45347||45349<=i&&i<=45375||45377<=i&&i<=45403||45405<=i&&i<=45431||45433<=i&&i<=45459||45461<=i&&i<=45487||45489<=i&&i<=45515||45517<=i&&i<=45543||45545<=i&&i<=45571||45573<=i&&i<=45599||45601<=i&&i<=45627||45629<=i&&i<=45655||45657<=i&&i<=45683||45685<=i&&i<=45711||45713<=i&&i<=45739||45741<=i&&i<=45767||45769<=i&&i<=45795||45797<=i&&i<=45823||45825<=i&&i<=45851||45853<=i&&i<=45879||45881<=i&&i<=45907||45909<=i&&i<=45935||45937<=i&&i<=45963||45965<=i&&i<=45991||45993<=i&&i<=46019||46021<=i&&i<=46047||46049<=i&&i<=46075||46077<=i&&i<=46103||46105<=i&&i<=46131||46133<=i&&i<=46159||46161<=i&&i<=46187||46189<=i&&i<=46215||46217<=i&&i<=46243||46245<=i&&i<=46271||46273<=i&&i<=46299||46301<=i&&i<=46327||46329<=i&&i<=46355||46357<=i&&i<=46383||46385<=i&&i<=46411||46413<=i&&i<=46439||46441<=i&&i<=46467||46469<=i&&i<=46495||46497<=i&&i<=46523||46525<=i&&i<=46551||46553<=i&&i<=46579||46581<=i&&i<=46607||46609<=i&&i<=46635||46637<=i&&i<=46663||46665<=i&&i<=46691||46693<=i&&i<=46719||46721<=i&&i<=46747||46749<=i&&i<=46775||46777<=i&&i<=46803||46805<=i&&i<=46831||46833<=i&&i<=46859||46861<=i&&i<=46887||46889<=i&&i<=46915||46917<=i&&i<=46943||46945<=i&&i<=46971||46973<=i&&i<=46999||47001<=i&&i<=47027||47029<=i&&i<=47055||47057<=i&&i<=47083||47085<=i&&i<=47111||47113<=i&&i<=47139||47141<=i&&i<=47167||47169<=i&&i<=47195||47197<=i&&i<=47223||47225<=i&&i<=47251||47253<=i&&i<=47279||47281<=i&&i<=47307||47309<=i&&i<=47335||47337<=i&&i<=47363||47365<=i&&i<=47391||47393<=i&&i<=47419||47421<=i&&i<=47447||47449<=i&&i<=47475||47477<=i&&i<=47503||47505<=i&&i<=47531||47533<=i&&i<=47559||47561<=i&&i<=47587||47589<=i&&i<=47615||47617<=i&&i<=47643||47645<=i&&i<=47671||47673<=i&&i<=47699||47701<=i&&i<=47727||47729<=i&&i<=47755||47757<=i&&i<=47783||47785<=i&&i<=47811||47813<=i&&i<=47839||47841<=i&&i<=47867||47869<=i&&i<=47895||47897<=i&&i<=47923||47925<=i&&i<=47951||47953<=i&&i<=47979||47981<=i&&i<=48007||48009<=i&&i<=48035||48037<=i&&i<=48063||48065<=i&&i<=48091||48093<=i&&i<=48119||48121<=i&&i<=48147||48149<=i&&i<=48175||48177<=i&&i<=48203||48205<=i&&i<=48231||48233<=i&&i<=48259||48261<=i&&i<=48287||48289<=i&&i<=48315||48317<=i&&i<=48343||48345<=i&&i<=48371||48373<=i&&i<=48399||48401<=i&&i<=48427||48429<=i&&i<=48455||48457<=i&&i<=48483||48485<=i&&i<=48511||48513<=i&&i<=48539||48541<=i&&i<=48567||48569<=i&&i<=48595||48597<=i&&i<=48623||48625<=i&&i<=48651||48653<=i&&i<=48679||48681<=i&&i<=48707||48709<=i&&i<=48735||48737<=i&&i<=48763||48765<=i&&i<=48791||48793<=i&&i<=48819||48821<=i&&i<=48847||48849<=i&&i<=48875||48877<=i&&i<=48903||48905<=i&&i<=48931||48933<=i&&i<=48959||48961<=i&&i<=48987||48989<=i&&i<=49015||49017<=i&&i<=49043||49045<=i&&i<=49071||49073<=i&&i<=49099||49101<=i&&i<=49127||49129<=i&&i<=49155||49157<=i&&i<=49183||49185<=i&&i<=49211||49213<=i&&i<=49239||49241<=i&&i<=49267||49269<=i&&i<=49295||49297<=i&&i<=49323||49325<=i&&i<=49351||49353<=i&&i<=49379||49381<=i&&i<=49407||49409<=i&&i<=49435||49437<=i&&i<=49463||49465<=i&&i<=49491||49493<=i&&i<=49519||49521<=i&&i<=49547||49549<=i&&i<=49575||49577<=i&&i<=49603||49605<=i&&i<=49631||49633<=i&&i<=49659||49661<=i&&i<=49687||49689<=i&&i<=49715||49717<=i&&i<=49743||49745<=i&&i<=49771||49773<=i&&i<=49799||49801<=i&&i<=49827||49829<=i&&i<=49855||49857<=i&&i<=49883||49885<=i&&i<=49911||49913<=i&&i<=49939||49941<=i&&i<=49967||49969<=i&&i<=49995||49997<=i&&i<=50023||50025<=i&&i<=50051||50053<=i&&i<=50079||50081<=i&&i<=50107||50109<=i&&i<=50135||50137<=i&&i<=50163||50165<=i&&i<=50191||50193<=i&&i<=50219||50221<=i&&i<=50247||50249<=i&&i<=50275||50277<=i&&i<=50303||50305<=i&&i<=50331||50333<=i&&i<=50359||50361<=i&&i<=50387||50389<=i&&i<=50415||50417<=i&&i<=50443||50445<=i&&i<=50471||50473<=i&&i<=50499||50501<=i&&i<=50527||50529<=i&&i<=50555||50557<=i&&i<=50583||50585<=i&&i<=50611||50613<=i&&i<=50639||50641<=i&&i<=50667||50669<=i&&i<=50695||50697<=i&&i<=50723||50725<=i&&i<=50751||50753<=i&&i<=50779||50781<=i&&i<=50807||50809<=i&&i<=50835||50837<=i&&i<=50863||50865<=i&&i<=50891||50893<=i&&i<=50919||50921<=i&&i<=50947||50949<=i&&i<=50975||50977<=i&&i<=51003||51005<=i&&i<=51031||51033<=i&&i<=51059||51061<=i&&i<=51087||51089<=i&&i<=51115||51117<=i&&i<=51143||51145<=i&&i<=51171||51173<=i&&i<=51199||51201<=i&&i<=51227||51229<=i&&i<=51255||51257<=i&&i<=51283||51285<=i&&i<=51311||51313<=i&&i<=51339||51341<=i&&i<=51367||51369<=i&&i<=51395||51397<=i&&i<=51423||51425<=i&&i<=51451||51453<=i&&i<=51479||51481<=i&&i<=51507||51509<=i&&i<=51535||51537<=i&&i<=51563||51565<=i&&i<=51591||51593<=i&&i<=51619||51621<=i&&i<=51647||51649<=i&&i<=51675||51677<=i&&i<=51703||51705<=i&&i<=51731||51733<=i&&i<=51759||51761<=i&&i<=51787||51789<=i&&i<=51815||51817<=i&&i<=51843||51845<=i&&i<=51871||51873<=i&&i<=51899||51901<=i&&i<=51927||51929<=i&&i<=51955||51957<=i&&i<=51983||51985<=i&&i<=52011||52013<=i&&i<=52039||52041<=i&&i<=52067||52069<=i&&i<=52095||52097<=i&&i<=52123||52125<=i&&i<=52151||52153<=i&&i<=52179||52181<=i&&i<=52207||52209<=i&&i<=52235||52237<=i&&i<=52263||52265<=i&&i<=52291||52293<=i&&i<=52319||52321<=i&&i<=52347||52349<=i&&i<=52375||52377<=i&&i<=52403||52405<=i&&i<=52431||52433<=i&&i<=52459||52461<=i&&i<=52487||52489<=i&&i<=52515||52517<=i&&i<=52543||52545<=i&&i<=52571||52573<=i&&i<=52599||52601<=i&&i<=52627||52629<=i&&i<=52655||52657<=i&&i<=52683||52685<=i&&i<=52711||52713<=i&&i<=52739||52741<=i&&i<=52767||52769<=i&&i<=52795||52797<=i&&i<=52823||52825<=i&&i<=52851||52853<=i&&i<=52879||52881<=i&&i<=52907||52909<=i&&i<=52935||52937<=i&&i<=52963||52965<=i&&i<=52991||52993<=i&&i<=53019||53021<=i&&i<=53047||53049<=i&&i<=53075||53077<=i&&i<=53103||53105<=i&&i<=53131||53133<=i&&i<=53159||53161<=i&&i<=53187||53189<=i&&i<=53215||53217<=i&&i<=53243||53245<=i&&i<=53271||53273<=i&&i<=53299||53301<=i&&i<=53327||53329<=i&&i<=53355||53357<=i&&i<=53383||53385<=i&&i<=53411||53413<=i&&i<=53439||53441<=i&&i<=53467||53469<=i&&i<=53495||53497<=i&&i<=53523||53525<=i&&i<=53551||53553<=i&&i<=53579||53581<=i&&i<=53607||53609<=i&&i<=53635||53637<=i&&i<=53663||53665<=i&&i<=53691||53693<=i&&i<=53719||53721<=i&&i<=53747||53749<=i&&i<=53775||53777<=i&&i<=53803||53805<=i&&i<=53831||53833<=i&&i<=53859||53861<=i&&i<=53887||53889<=i&&i<=53915||53917<=i&&i<=53943||53945<=i&&i<=53971||53973<=i&&i<=53999||54001<=i&&i<=54027||54029<=i&&i<=54055||54057<=i&&i<=54083||54085<=i&&i<=54111||54113<=i&&i<=54139||54141<=i&&i<=54167||54169<=i&&i<=54195||54197<=i&&i<=54223||54225<=i&&i<=54251||54253<=i&&i<=54279||54281<=i&&i<=54307||54309<=i&&i<=54335||54337<=i&&i<=54363||54365<=i&&i<=54391||54393<=i&&i<=54419||54421<=i&&i<=54447||54449<=i&&i<=54475||54477<=i&&i<=54503||54505<=i&&i<=54531||54533<=i&&i<=54559||54561<=i&&i<=54587||54589<=i&&i<=54615||54617<=i&&i<=54643||54645<=i&&i<=54671||54673<=i&&i<=54699||54701<=i&&i<=54727||54729<=i&&i<=54755||54757<=i&&i<=54783||54785<=i&&i<=54811||54813<=i&&i<=54839||54841<=i&&i<=54867||54869<=i&&i<=54895||54897<=i&&i<=54923||54925<=i&&i<=54951||54953<=i&&i<=54979||54981<=i&&i<=55007||55009<=i&&i<=55035||55037<=i&&i<=55063||55065<=i&&i<=55091||55093<=i&&i<=55119||55121<=i&&i<=55147||55149<=i&&i<=55175||55177<=i&&i<=55203?10:9757==i||9977==i||9994<=i&&i<=9997||127877==i||127938<=i&&i<=127940||127943==i||127946<=i&&i<=127948||128066<=i&&i<=128067||128070<=i&&i<=128080||128110==i||128112<=i&&i<=128120||128124==i||128129<=i&&i<=128131||128133<=i&&i<=128135||128170==i||128372<=i&&i<=128373||128378==i||128400==i||128405<=i&&i<=128406||128581<=i&&i<=128583||128587<=i&&i<=128591||128675==i||128692<=i&&i<=128694||128704==i||128716==i||129304<=i&&i<=129308||129310<=i&&i<=129311||129318==i||129328<=i&&i<=129337||129341<=i&&i<=129342||129489<=i&&i<=129501?A:127995<=i&&i<=127999?14:8205==i?15:9792==i||9794==i||9877<=i&&i<=9878||9992==i||10084==i||127752==i||127806==i||127859==i||127891==i||127908==i||127912==i||127979==i||127981==i||128139==i||128187<=i&&i<=128188||128295==i||128300==i||128488==i||128640==i||128658==i?n:128102<=i&&i<=128105?o:11}return this.nextBreak=function(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(var r,A,n=a(i(e,t)),o=[],c=t+1;c{"use strict";e.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",A=t.indexOf(r+e),n=t.indexOf("--");return-1!==A&&(-1===n||A{"use strict";const t=[200,203,204,206,300,301,404,405,410,414,501],r=[200,203,204,300,301,302,303,307,308,404,405,410,414,501],A={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},n={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function o(e){const t={};if(!e)return t;const r=e.trim().split(/\s*,\s*/);for(const e of r){const[r,A]=e.split(/\s*=\s*/,2);t[r]=void 0===A||A.replace(/^"|"$/g,"")}return t}function i(e){let t=[];for(const r in e){const A=e[r];t.push(!0===A?r:r+"="+A)}if(t.length)return t.join(", ")}e.exports=class{constructor(e,t,{shared:r,cacheHeuristic:A,immutableMinTimeToLive:n,ignoreCargoCult:s,trustServerDate:a,_fromObject:c}={}){if(c)this._fromObject(c);else{if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=!1!==r,this._trustServerDate=void 0===a||a,this._cacheHeuristic=void 0!==A?A:.1,this._immutableMinTtl=void 0!==n?n:864e5,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=o(t.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=o(e.headers["cache-control"]),s&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":i(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),!t.headers["cache-control"]&&/no-cache/.test(t.headers.pragma)&&(this._rescc["no-cache"]=!0)}}now(){return Date.now()}storable(){return!(this._reqcc["no-store"]||!("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())||-1===r.indexOf(this._status)||this._rescc["no-store"]||this._isShared&&this._rescc.private||this._isShared&&!this._noAuthorization&&!this._allowsStoringAuthenticated()||!(this._resHeaders.expires||this._rescc.public||this._rescc["max-age"]||this._rescc["s-maxage"]||-1!==t.indexOf(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const t=o(e.headers["cache-control"]);if(t["no-cache"]||/no-cache/.test(e.headers.pragma))return!1;if(t["max-age"]&&this.age()>t["max-age"])return!1;if(t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"])return!1;if(this.stale()){if(!(t["max-stale"]&&!this._rescc["must-revalidate"]&&(!0===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge())))return!1}return this._requestMatches(e,!1)}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&"HEAD"===e.method)&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if("*"===this._resHeaders.vary)return!1;const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const r of t)if(e.headers[r]!==this._reqHeaders[r])return!1;return!0}_copyWithoutHopByHopHeaders(e){const t={};for(const r in e)A[r]||(t[r]=e[r]);if(e.connection){const r=e.connection.trim().split(/\s*,\s*/);for(const e of r)delete t[e]}if(t.warning){const e=t.warning.split(/,/).filter(e=>!/^\s*1[0-9][0-9]/.test(e));e.length?t.warning=e.join(",").trim():delete t.warning}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>86400&&!this._hasExplicitExpiration()&&this.maxAge()>86400&&(e.warning=(e.warning?e.warning+", ":"")+'113 - "rfc7234 5.5.4"'),e.age=""+Math.round(t),e.date=new Date(this.now()).toUTCString(),e}date(){return this._trustServerDate?this._serverDate():this._responseTime}_serverDate(){const e=Date.parse(this._resHeaders.date);if(isFinite(e)){const t=288e5;if(Math.abs(this._responseTime-e)e&&(e=t)}return e+(this.now()-this._responseTime)/1e3}_ageValue(){const e=parseInt(this._resHeaders.age);return isFinite(e)?e:0}maxAge(){if(!this.storable()||this._rescc["no-cache"])return 0;if(this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)return 0;if("*"===this._resHeaders.vary)return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return parseInt(this._rescc["s-maxage"],10)}if(this._rescc["max-age"])return parseInt(this._rescc["max-age"],10);const e=this._rescc.immutable?this._immutableMinTtl:0,t=this._serverDate();if(this._resHeaders.expires){const r=Date.parse(this._resHeaders.expires);return Number.isNaN(r)||rr)return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}return e}timeToLive(){return 1e3*Math.max(0,this.maxAge()-this.age())}stale(){return this.maxAge()<=this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||1!==e.v)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=void 0!==e.imm?e.imm:864e5,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete t["if-none-match"],delete t["if-modified-since"],t;this._resHeaders.etag&&(t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag);if(t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&"GET"!=this._method){if(delete t["if-modified-since"],t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter(e=>!/^\s*W\//.test(e));e.length?t["if-none-match"]=e.join(",").trim():delete t["if-none-match"]}}else this._resHeaders["last-modified"]&&!t["if-modified-since"]&&(t["if-modified-since"]=this._resHeaders["last-modified"]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),!t||!t.headers)throw Error("Response headers missing");let r=!1;if(void 0!==t.status&&304!=t.status?r=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?r=this._resHeaders["last-modified"]===t.headers["last-modified"]:this._resHeaders.etag||this._resHeaders["last-modified"]||t.headers.etag||t.headers["last-modified"]||(r=!0),!r)return{policy:new this.constructor(e,t),modified:304!=t.status,matches:!1};const A={};for(const e in this._resHeaders)A[e]=e in t.headers&&!n[e]?t.headers[e]:this._resHeaders[e];const o=Object.assign({},t,{status:this._status,method:this._method,headers:A});return{policy:new this.constructor(e,o,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,trustServerDate:this._trustServerDate}),modified:!1,matches:!0}}}},94935:(e,t,r)=>{"use strict";const A=r(28614),n=r(4016),o=r(97565),i=r(49601),s=Symbol("currentStreamsCount"),a=Symbol("request"),c=Symbol("cachedOriginSet"),g=Symbol("gracefullyClosing"),l=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],u=(e,t)=>e.remoteSettings.maxConcurrentStreams>t.remoteSettings.maxConcurrentStreams,h=(e,t)=>{for(const r of e)r[c].lengtht[c].includes(e))&&r[s]+t[s]<=t.remoteSettings.maxConcurrentStreams&&d(r)},p=({agent:e,isFree:t})=>{const r={};for(const A in e.sessions){const n=e.sessions[A].filter(e=>{const r=e[C.kCurrentStreamsCount]{e[g]=!0,0===e[s]&&e.close()};class C extends A{constructor({timeout:e=6e4,maxSessions:t=1/0,maxFreeSessions:r=10,maxCachedTlsSessions:A=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=t,this.maxFreeSessions=r,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new i({maxSize:A})}static normalizeOrigin(e,t){return"string"==typeof e&&(e=new URL(e)),t&&e.hostname!==t&&(e.hostname=t),e.origin}normalizeOptions(e){let t="";if(e)for(const r of l)e[r]&&(t+=":"+e[r]);return t}_tryToCreateNewSession(e,t){if(!(e in this.queue)||!(t in this.queue[e]))return;const r=this.queue[e][t];this._sessionsCount{Array.isArray(r)?(r=[...r],A()):r=[{resolve:A,reject:n}];const i=this.normalizeOptions(t),l=C.normalizeOrigin(e,t&&t.servername);if(void 0===l){for(const{reject:e}of r)e(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(i in this.sessions){const e=this.sessions[i];let t,A=-1,n=-1;for(const r of e){const e=r.remoteSettings.maxConcurrentStreams;if(e=e||r[g]||r.destroyed)continue;t||(A=e),o>n&&(t=r,n=o)}}if(t){if(1!==r.length){for(const{reject:e}of r){e(new Error(`Expected the length of listeners to be 1, got ${r.length}.\nPlease report this to https://github.com/szmarczak/http2-wrapper/`))}return}return void r[0].resolve(t)}}if(i in this.queue){if(l in this.queue[i])return this.queue[i][l].listeners.push(...r),void this._tryToCreateNewSession(i,l)}else this.queue[i]={};const p=()=>{i in this.queue&&this.queue[i][l]===f&&(delete this.queue[i][l],0===Object.keys(this.queue[i]).length&&delete this.queue[i])},f=()=>{const A=`${l}:${i}`;let n=!1;try{const C=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(A),...t});C[s]=0,C[g]=!1;const I=()=>C[s]{this.tlsSessionCache.set(A,e)}),C.once("error",e=>{for(const{reject:t}of r)t(e);this.tlsSessionCache.delete(A)}),C.setTimeout(this.timeout,()=>{C.destroy()}),C.once("close",()=>{if(n){E&&this._freeSessionsCount--,this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(C),1),0===e.length&&delete this.sessions[i]}else{const e=new Error("Session closed without receiving a SETTINGS frame");e.code="HTTP2WRAPPER_NOSETTINGS";for(const{reject:t}of r)t(e);p()}this._tryToCreateNewSession(i,l)});const B=()=>{if(i in this.queue&&I())for(const e of C[c])if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];for(;0!==t.length&&I();)t.shift().resolve(C);const r=this.queue[i];if(0===r[e].listeners.length&&(delete r[e],0===Object.keys(r).length)){delete this.queue[i];break}if(!I())break}};C.on("origin",()=>{C[c]=C.originSet,I()&&(B(),h(this.sessions[i],C))}),C.once("remoteSettings",()=>{if(C.ref(),C.unref(),this._sessionsCount++,f.destroyed){const e=new Error("Agent has been destroyed");for(const t of r)t.reject(e);C.destroy()}else{C[c]=C.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(((e,t,r)=>{let A=0,n=e.length;for(;A>>1;r(e[o],t)?A=o+1:n=o}return A})(t,C,u),0,C)}else e[i]=[C]}this._freeSessionsCount+=1,n=!0,this.emit("session",C),B(),p(),0===C[s]&&this._freeSessionsCount>this.maxFreeSessions&&C.close(),0!==r.length&&(this.getSession(l,t,r),r.length=0),C.on("remoteSettings",()=>{B(),h(this.sessions[i],C)})}}),C[a]=C.request,C.request=(e,t)=>{if(C[g])throw new Error("The session is gracefully closing. No new streams are allowed.");const r=C[a](e,t);return C.ref(),++C[s],C[s]===C.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,r.once("close",()=>{if(E=I(),--C[s],!C.destroyed&&!C.closed&&(((e,t)=>{for(const r of e)t[c].lengthr[c].includes(e))&&t[s]+r[s]<=r.remoteSettings.maxConcurrentStreams&&d(t)})(this.sessions[i],C),I()&&!C.closed)){E||(this._freeSessionsCount++,E=!0);const e=0===C[s];e&&C.unref(),e&&(this._freeSessionsCount>this.maxFreeSessions||C[g])?C.close():(h(this.sessions[i],C),B())}}),r}}catch(e){for(const t of r)t.reject(e);p()}};f.listeners=r,f.completed=!1,f.destroyed=!1,this.queue[i][l]=f,this._tryToCreateNewSession(i,l)})}request(e,t,r,A){return new Promise((n,o)=>{this.getSession(e,t,[{reject:o,resolve:e=>{try{n(e.request(r,A))}catch(e){o(e)}}}])})}createConnection(e,t){return C.connect(e,t)}static connect(e,t){t.ALPNProtocols=["h2"];const r=e.port||443,A=e.hostname||e.host;return void 0===t.servername&&(t.servername=A),n.connect(r,A,t)}closeFreeSessions(){for(const e of Object.values(this.sessions))for(const t of e)0===t[s]&&t.close()}destroy(e){for(const t of Object.values(this.sessions))for(const r of t)r.destroy(e);for(const e of Object.values(this.queue))for(const t of Object.values(e))t.destroyed=!0;this.queue={}}get freeSessions(){return p({agent:this,isFree:!0})}get busySessions(){return p({agent:this,isFree:!1})}}C.kCurrentStreamsCount=s,C.kGracefullyClosing=g,e.exports={Agent:C,globalAgent:new C}},2398:(e,t,r)=>{"use strict";const A=r(98605),n=r(57211),o=r(19476),i=r(49601),s=r(33134),a=r(5209),c=r(50075),g=new i({maxSize:100}),l=new Map,u=(e,t,r)=>{t._httpMessage={shouldKeepAlive:!0};const A=()=>{e.emit("free",t,r)};t.on("free",A);const n=()=>{e.removeSocket(t,r)};t.on("close",n);const o=()=>{e.removeSocket(t,r),t.off("close",n),t.off("free",A),t.off("agentRemove",o)};t.on("agentRemove",o),e.emit("free",t,r)};e.exports=async(e,t,r)=>{if(("string"==typeof e||e instanceof URL)&&(e=c(new URL(e))),"function"==typeof t&&(r=t,t=void 0),t={ALPNProtocols:["h2","http/1.1"],...e,...t,resolveSocket:!0},!Array.isArray(t.ALPNProtocols)||0===t.ALPNProtocols.length)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");t.protocol=t.protocol||"https:";const i="https:"===t.protocol;t.host=t.hostname||t.host||"localhost",t.session=t.tlsSession,t.servername=t.servername||a(t),t.port=t.port||(i?443:80),t._defaultAgent=i?n.globalAgent:A.globalAgent;const h=t.agent;if(h){if(h.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");t.agent=h[i?"https":"http"]}if(i){if("h2"===await(async e=>{const t=`${e.host}:${e.port}:${e.ALPNProtocols.sort()}`;if(!g.has(t)){if(l.has(t)){return(await l.get(t)).alpnProtocol}const{path:r,agent:A}=e;e.path=e.socketPath;const i=o(e);l.set(t,i);try{const{socket:o,alpnProtocol:s}=await i;if(g.set(t,s),e.path=r,"h2"===s)o.destroy();else{const{globalAgent:t}=n,r=n.Agent.prototype.createConnection;A?A.createConnection===r?u(A,o,e):o.destroy():t.createConnection===r?u(t,o,e):o.destroy()}return l.delete(t),s}catch(e){throw l.delete(t),e}}return g.get(t)})(t))return h&&(t.agent=h.http2),new s(t,r)}return A.request(t,r)},e.exports.protocolCache=g},33134:(e,t,r)=>{"use strict";const A=r(97565),{Writable:n}=r(92413),{Agent:o,globalAgent:i}=r(94935),s=r(53433),a=r(50075),c=r(66192),g=r(50978),{ERR_INVALID_ARG_TYPE:l,ERR_INVALID_PROTOCOL:u,ERR_HTTP_HEADERS_SENT:h,ERR_INVALID_HTTP_TOKEN:p,ERR_HTTP_INVALID_HEADER_VALUE:d,ERR_INVALID_CHAR:C}=r(64080),{HTTP2_HEADER_STATUS:f,HTTP2_HEADER_METHOD:I,HTTP2_HEADER_PATH:E,HTTP2_METHOD_CONNECT:B}=A.constants,y=Symbol("headers"),m=Symbol("origin"),w=Symbol("session"),Q=Symbol("options"),D=Symbol("flushedHeaders"),b=Symbol("jobs"),v=/^[\^`\-\w!#$%&*+.|~]+$/,S=/[^\t\u0020-\u007E\u0080-\u00FF]/;e.exports=class extends n{constructor(e,t,r){super({autoDestroy:!1});const A="string"==typeof e||e instanceof URL;if(A&&(e=a(e instanceof URL?e:new URL(e))),"function"==typeof t||void 0===t?(r=t,t=A?e:{...e}):t={...e,...t},t.h2session)this[w]=t.h2session;else if(!1===t.agent)this.agent=new o({maxFreeSessions:0});else if(void 0===t.agent||null===t.agent)"function"==typeof t.createConnection?(this.agent=new o({maxFreeSessions:0}),this.agent.createConnection=t.createConnection):this.agent=i;else{if("function"!=typeof t.agent.request)throw new l("options.agent",["Agent-like Object","undefined","false"],t.agent);this.agent=t.agent}if(t.protocol&&"https:"!==t.protocol)throw new u(t.protocol,"https:");const n=t.port||t.defaultPort||this.agent&&this.agent.defaultPort||443,s=t.hostname||t.host||"localhost";delete t.hostname,delete t.host,delete t.port;const{timeout:c}=t;if(t.timeout=void 0,this[y]=Object.create(null),this[b]=[],this.socket=null,this.connection=null,this.method=t.method||"GET",this.path=t.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,t.headers)for(const[e,r]of Object.entries(t.headers))this.setHeader(e,r);t.auth&&!("authorization"in this[y])&&(this[y].authorization="Basic "+Buffer.from(t.auth).toString("base64")),t.session=t.tlsSession,t.path=t.socketPath,this[Q]=t,443===n?(this[m]="https://"+s,":authority"in this[y]||(this[y][":authority"]=s)):(this[m]=`https://${s}:${n}`,":authority"in this[y]||(this[y][":authority"]=`${s}:${n}`)),c&&this.setTimeout(c),r&&this.once("response",r),this[D]=!1}get method(){return this[y][I]}set method(e){e&&(this[y][I]=e.toUpperCase())}get path(){return this[y][E]}set path(e){e&&(this[y][E]=e)}get _mustNotHaveABody(){return"GET"===this.method||"HEAD"===this.method||"DELETE"===this.method}_write(e,t,r){if(this._mustNotHaveABody)return void r(new Error("The GET, HEAD and DELETE methods must NOT have a body"));this.flushHeaders();const A=()=>this._request.write(e,t,r);this._request?A():this[b].push(A)}_final(e){if(this.destroyed)return;this.flushHeaders();const t=()=>{this._mustNotHaveABody?e():this._request.end(e)};this._request?t():this[b].push(t)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(e,t){this.res&&this.res._dump(),this._request&&this._request.destroy(),t(e)}async flushHeaders(){if(this[D]||this.destroyed)return;this[D]=!0;const e=this.method===B,t=t=>{if(this._request=t,this.destroyed)return void t.destroy();e||c(t,this,["timeout","continue","close","error"]);const r=e=>(...t)=>{this.writable||this.destroyed?this.once("finish",()=>{e(...t)}):e(...t)};t.once("response",r((r,A,n)=>{const o=new s(this.socket,t.readableHighWaterMark);this.res=o,o.req=this,o.statusCode=r[f],o.headers=r,o.rawHeaders=n,o.once("end",()=>{this.aborted?(o.aborted=!0,o.emit("aborted")):(o.complete=!0,o.socket=null,o.connection=null)}),e?(o.upgrade=!0,this.emit("connect",o,t,Buffer.alloc(0))?this.emit("close"):t.destroy()):(t.on("data",e=>{o._dumped||o.push(e)||t.pause()}),t.once("end",()=>{o.push(null)}),this.emit("response",o)||o._dump())})),t.once("headers",r(e=>this.emit("information",{statusCode:e[f]}))),t.once("trailers",r((e,t,r)=>{const{res:A}=this;A.trailers=e,A.rawTrailers=r}));const{socket:A}=t.session;this.socket=A,this.connection=A;for(const e of this[b])e();this.emit("socket",this.socket)};if(this[w])try{t(this[w].request(this[y]))}catch(e){this.emit("error",e)}else{this.reusedSocket=!0;try{t(await this.agent.request(this[m],this[Q],this[y]))}catch(e){this.emit("error",e)}}}getHeader(e){if("string"!=typeof e)throw new l("name","string",e);return this[y][e.toLowerCase()]}get headersSent(){return this[D]}removeHeader(e){if("string"!=typeof e)throw new l("name","string",e);if(this.headersSent)throw new h("remove");delete this[y][e.toLowerCase()]}setHeader(e,t){if(this.headersSent)throw new h("set");if("string"!=typeof e||!v.test(e)&&!g(e))throw new p("Header name",e);if(void 0===t)throw new d(t,e);if(S.test(t))throw new C("header content",e);this[y][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const r=()=>this._request.setTimeout(e,t);return this._request?r():this[b].push(r),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}}},53433:(e,t,r)=>{"use strict";const{Readable:A}=r(92413);e.exports=class extends A{constructor(e,t){super({highWaterMark:t,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,t){return this.req.setTimeout(e,t),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}}},92353:(e,t,r)=>{"use strict";const A=r(97565),n=r(94935),o=r(33134),i=r(53433),s=r(2398);e.exports={...A,ClientRequest:o,IncomingMessage:i,...n,request:(e,t,r)=>new o(e,t,r),get:(e,t,r)=>{const A=new o(e,t,r);return A.end(),A},auto:s}},5209:(e,t,r)=>{"use strict";const A=r(11631);e.exports=e=>{let t=e.host;const r=e.headers&&e.headers.host;if(r)if(r.startsWith("[")){t=-1===r.indexOf("]")?r:r.slice(1,-1)}else t=r.split(":",1)[0];return A.isIP(t)?"":t}},64080:e=>{"use strict";const t=(t,r,A)=>{e.exports[r]=class extends t{constructor(...e){super("string"==typeof A?A:A(e)),this.name=`${super.name} [${r}]`,this.code=r}}};t(TypeError,"ERR_INVALID_ARG_TYPE",e=>{const t=e[0].includes(".")?"property":"argument";let r=e[1];const A=Array.isArray(r);return A&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${e[0]}" ${t} must be ${A?"one of":"of"} type ${r}. Received ${typeof e[2]}`}),t(TypeError,"ERR_INVALID_PROTOCOL",e=>`Protocol "${e[0]}" not supported. Expected "${e[1]}"`),t(Error,"ERR_HTTP_HEADERS_SENT",e=>`Cannot ${e[0]} headers after they are sent to the client`),t(TypeError,"ERR_INVALID_HTTP_TOKEN",e=>`${e[0]} must be a valid HTTP token [${e[1]}]`),t(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",e=>`Invalid value "${e[0]} for header "${e[1]}"`),t(TypeError,"ERR_INVALID_CHAR",e=>`Invalid character in ${e[0]} [${e[1]}]`)},50978:e=>{"use strict";e.exports=e=>{switch(e){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}},66192:e=>{"use strict";e.exports=(e,t,r)=>{for(const A of r)e.on(A,(...e)=>t.emit(A,...e))}},50075:e=>{"use strict";e.exports=e=>{const t={protocol:e.protocol,hostname:"string"==typeof e.hostname&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};return"string"==typeof e.port&&0!==e.port.length&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||""}:${e.password||""}`),t}},46458:e=>{function t(e){return Array.isArray(e)?e:[e]}const r=/^\s+$/,A=/^\\!/,n=/^\\#/,o=/\r?\n/g,i=/^\.*\/|^\.+$/,s="undefined"!=typeof Symbol?Symbol.for("node-ignore"):"node-ignore",a=/([0-z])-([0-z])/g,c=[[/\\?\s+$/,e=>0===e.indexOf("\\")?" ":""],[/\\\s/g,()=>" "],[/[\\^$.|*+(){]/g,e=>"\\"+e],[/\[([^\]/]*)($|\])/g,(e,t,r)=>{return"]"===r?`[${A=t,A.replace(a,(e,t,r)=>t.charCodeAt(0)<=r.charCodeAt(0)?e:"")}]`:"\\"+e;var A}],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/(?:[^*])$/,e=>/\/$/.test(e)?e+"$":e+"(?=$|\\/$)"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6t+"[^\\/]*"],[/(\^|\\\/)?\\\*$/,(e,t)=>(t?t+"[^/]+":"[^/]*")+"(?=$|\\/$)"],[/\\\\\\/g,()=>"\\"]],g=Object.create(null),l=e=>"string"==typeof e;class u{constructor(e,t,r,A){this.origin=e,this.pattern=t,this.negative=r,this.regex=A}}const h=(e,t)=>{const r=e;let o=!1;0===e.indexOf("!")&&(o=!0,e=e.substr(1));const i=((e,t,r)=>{const A=g[e];if(A)return A;const n=c.reduce((t,r)=>t.replace(r[0],r[1].bind(e)),e);return g[e]=r?new RegExp(n,"i"):new RegExp(n)})(e=e.replace(A,"!").replace(n,"#"),0,t);return new u(r,e,o,i)},p=(e,t)=>{throw new t(e)},d=(e,t,r)=>{if(!l(e))return r(`path must be a string, but got \`${t}\``,TypeError);if(!e)return r("path must not be empty",TypeError);if(d.isNotRelative(e)){return r(`path should be a ${"`path.relative()`d"} string, but got "${t}"`,RangeError)}return!0},C=e=>i.test(e);d.isNotRelative=C,d.convert=e=>e;class f{constructor({ignorecase:e=!0}={}){var t,r,A;this._rules=[],this._ignorecase=e,t=this,r=s,A=!0,Object.defineProperty(t,r,{value:A}),this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[s])return this._rules=this._rules.concat(e._rules),void(this._added=!0);if((e=>e&&l(e)&&!r.test(e)&&0!==e.indexOf("#"))(e)){const t=h(e,this._ignorecase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,t(l(e)?(e=>e.split(o))(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let r=!1,A=!1;return this._rules.forEach(n=>{const{negative:o}=n;if(A===o&&r!==A||o&&!r&&!A&&!t)return;n.regex.test(e)&&(r=!o,A=o)}),{ignored:r,unignored:A}}_test(e,t,r,A){const n=e&&d.convert(e);return d(n,e,p),this._t(n,t,r,A)}_t(e,t,r,A){if(e in t)return t[e];if(A||(A=e.split("/")),A.pop(),!A.length)return t[e]=this._testOne(e,r);const n=this._t(A.join("/")+"/",t,r,A);return t[e]=n.ignored?n:this._testOne(e,r)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return t(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}}const I=e=>new f(e),E=()=>!1;if(I.isPathValid=e=>d(e&&d.convert(e),e,E),I.default=I,e.exports=I,"undefined"!=typeof process&&(process.env&&process.env.IGNORE_TEST_WIN32||"win32"===process.platform)){const e=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");d.convert=e;const t=/^[a-z]:\//i;d.isNotRelative=e=>t.test(e)||C(e)}},85870:(e,t,r)=>{try{var A=r(31669);if("function"!=typeof A.inherits)throw"";e.exports=A.inherits}catch(t){e.exports=r(48145)}},48145:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},44486:e=>{ /*! * is-extglob * * Copyright (c) 2014-2016, Jon Schlinkert. * Licensed under the MIT License. */ e.exports=function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}},18193:(e,t,r)=>{ /*! * is-glob * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ var A=r(44486),n={"{":"}","(":")","[":"]"},o=/\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/,i=/\\(.)|(^!|[*?{}()[\]]|\(\?)/;e.exports=function(e,t){if("string"!=typeof e||""===e)return!1;if(A(e))return!0;var r,s=o;for(t&&!1===t.strict&&(s=i);r=s.exec(e);){if(r[2])return!0;var a=r.index+r[0].length,c=r[1],g=c?n[c]:null;if(c&&g){var l=e.indexOf(g,a);-1!==l&&(a=l+1)}e=e.slice(a)}return!1}},59235:e=>{"use strict"; /*! * is-number * * Copyright (c) 2014-present, Jon Schlinkert. * Released under the MIT License. */e.exports=function(e){return"number"==typeof e?e-e==0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}},97369:(e,t)=>{var r,A,n,o; /*! * is-windows * * Copyright © 2015-2018, Jon Schlinkert. * Released under the MIT License. */o=function(){"use strict";return function(){return process&&("win32"===process.platform||/^(msys|cygwin)$/.test(process.env.OSTYPE))}},t&&"object"==typeof t?e.exports=o():(A=[],void 0===(n="function"==typeof(r=o)?r.apply(t,A):r)||(e.exports=n))},64151:(e,t,r)=>{var A;r(35747);function n(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,A){n(e,t||{},(function(e,t){e?A(e):r(t)}))}))}A(e,t||{},(function(e,A){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,A=!1),r(e,A)}))}A="win32"===process.platform||global.TESTING_WINDOWS?r(3202):r(2151),e.exports=n,n.sync=function(e,t){try{return A.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},2151:(e,t,r)=>{e.exports=n,n.sync=function(e,t){return o(A.statSync(e),t)};var A=r(35747);function n(e,t,r){A.stat(e,(function(e,A){r(e,!e&&o(A,t))}))}function o(e,t){return e.isFile()&&function(e,t){var r=e.mode,A=e.uid,n=e.gid,o=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),i=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),s=parseInt("100",8),a=parseInt("010",8),c=parseInt("001",8),g=s|a;return r&c||r&a&&n===i||r&s&&A===o||r&g&&0===o}(e,t)}},3202:(e,t,r)=>{e.exports=o,o.sync=function(e,t){return n(A.statSync(e),e,t)};var A=r(35747);function n(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var A=0;A{"use strict";var A=r(40744);e.exports=A},40744:(e,t,r)=>{"use strict";var A=r(55384),n=r(24129);function o(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=r(81704),e.exports.Schema=r(8212),e.exports.FAILSAFE_SCHEMA=r(44413),e.exports.JSON_SCHEMA=r(45247),e.exports.CORE_SCHEMA=r(8769),e.exports.DEFAULT_SAFE_SCHEMA=r(65483),e.exports.DEFAULT_FULL_SCHEMA=r(5235),e.exports.load=A.load,e.exports.loadAll=A.loadAll,e.exports.safeLoad=A.safeLoad,e.exports.safeLoadAll=A.safeLoadAll,e.exports.dump=n.dump,e.exports.safeDump=n.safeDump,e.exports.YAMLException=r(17345),e.exports.MINIMAL_SCHEMA=r(44413),e.exports.SAFE_SCHEMA=r(65483),e.exports.DEFAULT_SCHEMA=r(5235),e.exports.scan=o("scan"),e.exports.parse=o("parse"),e.exports.compose=o("compose"),e.exports.addConstructor=o("addConstructor")},28149:e=>{"use strict";function t(e){return null==e}e.exports.isNothing=t,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:t(e)?[]:[e]},e.exports.repeat=function(e,t){var r,A="";for(r=0;r{"use strict";var A=r(28149),n=r(17345),o=r(5235),i=r(65483),s=Object.prototype.toString,a=Object.prototype.hasOwnProperty,c={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},g=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function l(e){var t,r,o;if(t=e.toString(16).toUpperCase(),e<=255)r="x",o=2;else if(e<=65535)r="u",o=4;else{if(!(e<=4294967295))throw new n("code point within a string may not be greater than 0xFFFFFFFF");r="U",o=8}return"\\"+r+A.repeat("0",o-t.length)+t}function u(e){this.schema=e.schema||o,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=A.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var r,A,n,o,i,s,c;if(null===t)return{};for(r={},n=0,o=(A=Object.keys(t)).length;nA&&" "!==e[l+1],l=o);else if(!C(i))return 5;u=u&&f(i)}c=c||g&&o-l-1>A&&" "!==e[l+1]}return a||c?r>9&&I(e)?5:c?4:3:u&&!n(e)?1:2}function B(e,t,r,A){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==g.indexOf(t))return"'"+t+"'";var o=e.indent*Math.max(1,r),i=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=A||e.flowLevel>-1&&r>=e.flowLevel;switch(E(t,s,e.indent,i,(function(t){return function(e,t){var r,A;for(r=0,A=e.implicitTypes.length;r"+y(t,e.indent)+m(h(function(e,t){var r,A,n=/(\n+)([^\n]*)/g,o=(s=e.indexOf("\n"),s=-1!==s?s:e.length,n.lastIndex=s,w(e.slice(0,s),t)),i="\n"===e[0]||" "===e[0];var s;for(;A=n.exec(e);){var a=A[1],c=A[2];r=" "===c[0],o+=a+(i||r||""===c?"":"\n")+w(c,t),i=r}return o}(t,i),o));case 5:return'"'+function(e){for(var t,r,A,n="",o=0;o=55296&&t<=56319&&(r=e.charCodeAt(o+1))>=56320&&r<=57343?(n+=l(1024*(t-55296)+r-56320+65536),o++):(A=c[t],n+=!A&&C(t)?e[o]:A||l(t));return n}(t)+'"';default:throw new n("impossible error: invalid scalar style")}}()}function y(e,t){var r=I(e)?String(t):"",A="\n"===e[e.length-1];return r+(A&&("\n"===e[e.length-2]||"\n"===e)?"+":A?"":"-")+"\n"}function m(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function w(e,t){if(""===e||" "===e[0])return e;for(var r,A,n=/ [^ ]/g,o=0,i=0,s=0,a="";r=n.exec(e);)(s=r.index)-o>t&&(A=i>o?i:s,a+="\n"+e.slice(o,A),o=A+1),i=s;return a+="\n",e.length-o>t&&i>o?a+=e.slice(o,i)+"\n"+e.slice(i+1):a+=e.slice(o),a.slice(1)}function Q(e,t,r){var A,o,i,c,g,l;for(i=0,c=(o=r?e.explicitTypes:e.implicitTypes).length;i tag resolver accepts not "'+l+'" style');A=g.represent[l](t,l)}e.dump=A}return!0}return!1}function D(e,t,r,A,o,i){e.tag=null,e.dump=r,Q(e,r,!1)||Q(e,r,!0);var a=s.call(e.dump);A&&(A=e.flowLevel<0||e.flowLevel>t);var c,g,l="[object Object]"===a||"[object Array]"===a;if(l&&(g=-1!==(c=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||g||2!==e.indent&&t>0)&&(o=!1),g&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(l&&g&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),"[object Object]"===a)A&&0!==Object.keys(e.dump).length?(!function(e,t,r,A){var o,i,s,a,c,g,l="",u=e.tag,h=Object.keys(r);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new n("sortKeys must be a boolean or a function");for(o=0,i=h.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?g+="?":g+="? "),g+=e.dump,c&&(g+=p(e,t)),D(e,t+1,a,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?g+=":":g+=": ",l+=g+=e.dump));e.tag=u,e.dump=l||"{}"}(e,t,e.dump,o),g&&(e.dump="&ref_"+c+e.dump)):(!function(e,t,r){var A,n,o,i,s,a="",c=e.tag,g=Object.keys(r);for(A=0,n=g.length;A1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),D(e,t,i,!1,!1)&&(a+=s+=e.dump));e.tag=c,e.dump="{"+a+"}"}(e,t,e.dump),g&&(e.dump="&ref_"+c+" "+e.dump));else if("[object Array]"===a){var u=e.noArrayIndent&&t>0?t-1:t;A&&0!==e.dump.length?(!function(e,t,r,A){var n,o,i="",s=e.tag;for(n=0,o=r.length;n "+e.dump)}return!0}function b(e,t){var r,A,n=[],o=[];for(function e(t,r,A){var n,o,i;if(null!==t&&"object"==typeof t)if(-1!==(o=r.indexOf(t)))-1===A.indexOf(o)&&A.push(o);else if(r.push(t),Array.isArray(t))for(o=0,i=t.length;o{"use strict";function t(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=t},55384:(e,t,r)=>{"use strict";var A=r(28149),n=r(17345),o=r(30399),i=r(65483),s=r(5235),a=Object.prototype.hasOwnProperty,c=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/[\x85\u2028\u2029]/,l=/[,\[\]\{\}]/,u=/^(?:!|!!|![a-z\-]+!)$/i,h=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function p(e){return 10===e||13===e}function d(e){return 9===e||32===e}function C(e){return 9===e||32===e||10===e||13===e}function f(e){return 44===e||91===e||93===e||123===e||125===e}function I(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function E(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function B(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var y=new Array(256),m=new Array(256),w=0;w<256;w++)y[w]=E(w)?1:0,m[w]=E(w);function Q(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function D(e,t){return new n(t,new o(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function b(e,t){throw D(e,t)}function v(e,t){e.onWarning&&e.onWarning.call(null,D(e,t))}var S={YAML:function(e,t,r){var A,n,o;null!==e.version&&b(e,"duplication of %YAML directive"),1!==r.length&&b(e,"YAML directive accepts exactly one argument"),null===(A=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&b(e,"ill-formed argument of the YAML directive"),n=parseInt(A[1],10),o=parseInt(A[2],10),1!==n&&b(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&v(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var A,n;2!==r.length&&b(e,"TAG directive accepts exactly two arguments"),A=r[0],n=r[1],u.test(A)||b(e,"ill-formed tag handle (first argument) of the TAG directive"),a.call(e.tagMap,A)&&b(e,'there is a previously declared suffix for "'+A+'" tag handle'),h.test(n)||b(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[A]=n}};function k(e,t,r,A){var n,o,i,s;if(t1&&(e.result+=A.repeat("\n",t-1))}function L(e,t){var r,A,n=e.tag,o=e.anchor,i=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),A=e.input.charCodeAt(e.position);0!==A&&45===A&&C(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,M(e,!0,-1)&&e.lineIndent<=t)i.push(null),A=e.input.charCodeAt(e.position);else if(r=e.line,U(e,t,3,!1,!0),i.push(e.result),M(e,!0,-1),A=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==A)b(e,"bad indentation of a sequence entry");else if(e.lineIndentt?w=1:e.lineIndent===t?w=0:e.lineIndentt?w=1:e.lineIndent===t?w=0:e.lineIndentt)&&(U(e,t,4,!0,n)&&(f?h=e.result:p=e.result),f||(F(e,g,l,u,h,p,o,i),u=h=p=null),M(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)b(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?b(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):g?b(e,"repeat of an indentation width identifier"):(l=t+o-1,g=!0)}if(d(i)){do{i=e.input.charCodeAt(++e.position)}while(d(i));if(35===i)do{i=e.input.charCodeAt(++e.position)}while(!p(i)&&0!==i)}for(;0!==i;){for(K(e),e.lineIndent=0,i=e.input.charCodeAt(e.position);(!g||e.lineIndentl&&(l=e.lineIndent),p(i))u++;else{if(e.lineIndent0){for(n=i,o=0;n>0;n--)(i=I(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+i:b(e,"expected hexadecimal character");e.result+=B(o),e.position++}else b(e,"unknown escape sequence");r=A=e.position}else p(s)?(k(e,r,A,!0),x(e,M(e,!1,t)),r=A=e.position):e.position===e.lineStart&&R(e)?b(e,"unexpected end of the document within a double quoted scalar"):(e.position++,A=e.position)}b(e,"unexpected end of the stream within a double quoted scalar")}(e,h)?D=!0:!function(e){var t,r,A;if(42!==(A=e.input.charCodeAt(e.position)))return!1;for(A=e.input.charCodeAt(++e.position),t=e.position;0!==A&&!C(A)&&!f(A);)A=e.input.charCodeAt(++e.position);return e.position===t&&b(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(r)||b(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],M(e,!0,-1),!0}(e)?function(e,t,r){var A,n,o,i,s,a,c,g,l=e.kind,u=e.result;if(C(g=e.input.charCodeAt(e.position))||f(g)||35===g||38===g||42===g||33===g||124===g||62===g||39===g||34===g||37===g||64===g||96===g)return!1;if((63===g||45===g)&&(C(A=e.input.charCodeAt(e.position+1))||r&&f(A)))return!1;for(e.kind="scalar",e.result="",n=o=e.position,i=!1;0!==g;){if(58===g){if(C(A=e.input.charCodeAt(e.position+1))||r&&f(A))break}else if(35===g){if(C(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&R(e)||r&&f(g))break;if(p(g)){if(s=e.line,a=e.lineStart,c=e.lineIndent,M(e,!1,-1),e.lineIndent>=t){i=!0,g=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=a,e.lineIndent=c;break}}i&&(k(e,n,o,!1),x(e,e.line-s),n=o=e.position,i=!1),d(g)||(o=e.position+1),g=e.input.charCodeAt(++e.position)}return k(e,n,o,!1),!!e.result||(e.kind=l,e.result=u,!1)}(e,h,1===r)&&(D=!0,null===e.tag&&(e.tag="?")):(D=!0,null===e.tag&&null===e.anchor||b(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===w&&(D=c&&L(e,E))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(g=0,l=e.implicitTypes.length;g tag; it should be "'+u.kind+'", not "'+e.kind+'"'),u.resolve(e.result)?(e.result=u.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):b(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):b(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||D}function T(e){var t,r,A,n,o=e.position,i=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(n=e.input.charCodeAt(e.position))&&(M(e,!0,-1),n=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==n));){for(i=!0,n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!C(n);)n=e.input.charCodeAt(++e.position);for(A=[],(r=e.input.slice(t,e.position)).length<1&&b(e,"directive name must not be less than one character in length");0!==n;){for(;d(n);)n=e.input.charCodeAt(++e.position);if(35===n){do{n=e.input.charCodeAt(++e.position)}while(0!==n&&!p(n));break}if(p(n))break;for(t=e.position;0!==n&&!C(n);)n=e.input.charCodeAt(++e.position);A.push(e.input.slice(t,e.position))}0!==n&&K(e),a.call(S,r)?S[r](e,r,A):v(e,'unknown document directive "'+r+'"')}M(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,M(e,!0,-1)):i&&b(e,"directives end mark is expected"),U(e,e.lineIndent-1,4,!1,!0),M(e,!0,-1),e.checkLineBreaks&&g.test(e.input.slice(o,e.position))&&v(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&R(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,M(e,!0,-1)):e.position{"use strict";var A=r(28149);function n(e,t,r,A,n){this.name=e,this.buffer=t,this.position=r,this.line=A,this.column=n}n.prototype.getSnippet=function(e,t){var r,n,o,i,s;if(!this.buffer)return null;for(e=e||4,t=t||75,r="",n=this.position;n>0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(n-1));)if(n-=1,this.position-n>t/2-1){r=" ... ",n+=5;break}for(o="",i=this.position;it/2-1){o=" ... ",i-=5;break}return s=this.buffer.slice(n,i),A.repeat(" ",e)+r+s+o+"\n"+A.repeat(" ",e+this.position-n+r.length)+"^"},n.prototype.toString=function(e){var t,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(r+=":\n"+t),r},e.exports=n},8212:(e,t,r)=>{"use strict";var A=r(28149),n=r(17345),o=r(81704);function i(e,t,r){var A=[];return e.include.forEach((function(e){r=i(e,t,r)})),e[t].forEach((function(e){r.forEach((function(t,r){t.tag===e.tag&&t.kind===e.kind&&A.push(r)})),r.push(e)})),r.filter((function(e,t){return-1===A.indexOf(t)}))}function s(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new n("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=i(this,"implicit",[]),this.compiledExplicit=i(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{}};function A(e){r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e{"use strict";var A=r(8212);e.exports=new A({include:[r(45247)]})},5235:(e,t,r)=>{"use strict";var A=r(8212);e.exports=A.DEFAULT=new A({include:[r(65483)],explicit:[r(61425),r(61872),r(79982)]})},65483:(e,t,r)=>{"use strict";var A=r(8212);e.exports=new A({include:[r(8769)],implicit:[r(83516),r(95441)],explicit:[r(34836),r(6847),r(65173),r(92025)]})},44413:(e,t,r)=>{"use strict";var A=r(8212);e.exports=new A({explicit:[r(19952),r(46557),r(90173)]})},45247:(e,t,r)=>{"use strict";var A=r(8212);e.exports=new A({include:[r(44413)],implicit:[r(40188),r(58357),r(82106),r(71945)]})},81704:(e,t,r)=>{"use strict";var A=r(17345),n=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,t){var r,i;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===n.indexOf(t))throw new A('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(r=t.styleAliases||null,i={},null!==r&&Object.keys(r).forEach((function(e){r[e].forEach((function(t){i[String(t)]=e}))})),i),-1===o.indexOf(this.kind))throw new A('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},34836:(e,t,r)=>{"use strict";var A;try{A=r(64293).Buffer}catch(e){}var n=r(81704),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new n("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,A=0,n=e.length,i=o;for(r=0;r64)){if(t<0)return!1;A+=6}return A%8==0},construct:function(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,s=o,a=0,c=[];for(t=0;t>16&255),c.push(a>>8&255),c.push(255&a)),a=a<<6|s.indexOf(n.charAt(t));return 0===(r=i%4*6)?(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)):18===r?(c.push(a>>10&255),c.push(a>>2&255)):12===r&&c.push(a>>4&255),A?A.from?A.from(c):new A(c):c},predicate:function(e){return A&&A.isBuffer(e)},represent:function(e){var t,r,A="",n=0,i=e.length,s=o;for(t=0;t>18&63],A+=s[n>>12&63],A+=s[n>>6&63],A+=s[63&n]),n=(n<<8)+e[t];return 0===(r=i%3)?(A+=s[n>>18&63],A+=s[n>>12&63],A+=s[n>>6&63],A+=s[63&n]):2===r?(A+=s[n>>10&63],A+=s[n>>4&63],A+=s[n<<2&63],A+=s[64]):1===r&&(A+=s[n>>2&63],A+=s[n<<4&63],A+=s[64],A+=s[64]),A}})},58357:(e,t,r)=>{"use strict";var A=r(81704);e.exports=new A("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},71945:(e,t,r)=>{"use strict";var A=r(28149),n=r(81704),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var i=/^[-+]?[0-9]+e/;e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r,A,n;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,n=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){n.unshift(parseFloat(e,10))})),t=0,A=1,n.forEach((function(e){t+=e*A,A*=60})),r*t):r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||A.isNegativeZero(e))},represent:function(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(A.isNegativeZero(e))return"-0.0";return r=e.toString(10),i.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"})},82106:(e,t,r)=>{"use strict";var A=r(28149),n=r(81704);function o(e){return 48<=e&&e<=55}function i(e){return 48<=e&&e<=57}e.exports=new n("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,A=e.length,n=0,s=!1;if(!A)return!1;if("-"!==(t=e[n])&&"+"!==t||(t=e[++n]),"0"===t){if(n+1===A)return!0;if("b"===(t=e[++n])){for(n++;n=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},79982:(e,t,r)=>{"use strict";var A;try{A=r(Object(function(){var e=new Error("Cannot find module 'esprima'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){"undefined"!=typeof window&&(A=window.esprima)}var n=r(81704);e.exports=new n("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",r=A.parse(t,{range:!0});return"Program"===r.type&&1===r.body.length&&"ExpressionStatement"===r.body[0].type&&("ArrowFunctionExpression"===r.body[0].expression.type||"FunctionExpression"===r.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,r="("+e+")",n=A.parse(r,{range:!0}),o=[];if("Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"ArrowFunctionExpression"!==n.body[0].expression.type&&"FunctionExpression"!==n.body[0].expression.type)throw new Error("Failed to resolve function");return n.body[0].expression.params.forEach((function(e){o.push(e.name)})),t=n.body[0].expression.body.range,"BlockStatement"===n.body[0].expression.body.type?new Function(o,r.slice(t[0]+1,t[1]-1)):new Function(o,"return "+r.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},61872:(e,t,r)=>{"use strict";var A=r(81704);e.exports=new A("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,r=/\/([gim]*)$/.exec(e),A="";if("/"===t[0]){if(r&&(A=r[1]),A.length>3)return!1;if("/"!==t[t.length-A.length-1])return!1}return!0},construct:function(e){var t=e,r=/\/([gim]*)$/.exec(e),A="";return"/"===t[0]&&(r&&(A=r[1]),t=t.slice(1,t.length-A.length-1)),new RegExp(t,A)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},61425:(e,t,r)=>{"use strict";var A=r(81704);e.exports=new A("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},90173:(e,t,r)=>{"use strict";var A=r(81704);e.exports=new A("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},95441:(e,t,r)=>{"use strict";var A=r(81704);e.exports=new A("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},40188:(e,t,r)=>{"use strict";var A=r(81704);e.exports=new A("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},6847:(e,t,r)=>{"use strict";var A=r(81704),n=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new A("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,A,i,s,a=[],c=e;for(t=0,r=c.length;t{"use strict";var A=r(81704),n=Object.prototype.toString;e.exports=new A("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,A,o,i,s=e;for(i=new Array(s.length),t=0,r=s.length;t{"use strict";var A=r(81704);e.exports=new A("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},92025:(e,t,r)=>{"use strict";var A=r(81704),n=Object.prototype.hasOwnProperty;e.exports=new A("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,r=e;for(t in r)if(n.call(r,t)&&null!==r[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},19952:(e,t,r)=>{"use strict";var A=r(81704);e.exports=new A("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},83516:(e,t,r)=>{"use strict";var A=r(81704),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new A("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==n.exec(e)||null!==o.exec(e))},construct:function(e){var t,r,A,i,s,a,c,g,l=0,u=null;if(null===(t=n.exec(e))&&(t=o.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],A=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,A,i));if(s=+t[4],a=+t[5],c=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),g=new Date(Date.UTC(r,A,i,s,a,c,l)),u&&g.setTime(g.getTime()-u),g},instanceOf:Date,represent:function(e){return e.toISOString()}})},7427:(e,t)=>{t.stringify=function e(t){if(void 0===t)return t;if(t&&Buffer.isBuffer(t))return JSON.stringify(":base64:"+t.toString("base64"));if(t&&t.toJSON&&(t=t.toJSON()),t&&"object"==typeof t){var r="",A=Array.isArray(t);r=A?"[":"{";var n=!0;for(var o in t){var i="function"==typeof t[o]||!A&&void 0===t[o];Object.hasOwnProperty.call(t,o)&&!i&&(n||(r+=","),n=!1,A?null==t[o]?r+="null":r+=e(t[o]):void 0!==t[o]&&(r+=e(o)+":"+e(t[o])))}return r+=A?"]":"}"}return"string"==typeof t?JSON.stringify(/^:/.test(t)?":"+t:t):void 0===t?"null":JSON.stringify(t)},t.parse=function(e){return JSON.parse(e,(function(e,t){return"string"==typeof t?/^:base64:/.test(t)?Buffer.from(t.substring(8),"base64"):/^:/.test(t)?t.substring(1):t:t}))}},72515:(e,t,r)=>{"use strict";const A=r(28614),n=r(7427);e.exports=class extends A{constructor(e,t){if(super(),this.opts=Object.assign({namespace:"keyv",serialize:n.stringify,deserialize:n.parse},"string"==typeof e?{uri:e}:e,t),!this.opts.store){const e=Object.assign({},this.opts);this.opts.store=(e=>{const t={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(e.adapter||e.uri){const A=e.adapter||/^[^:]*/.exec(e.uri)[0];return new(r(89112)(t[A]))(e)}return new Map})(e)}"function"==typeof this.opts.store.on&&this.opts.store.on("error",e=>this.emit("error",e)),this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}get(e,t){e=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then(()=>r.get(e)).then(e=>"string"==typeof e?this.opts.deserialize(e):e).then(r=>{if(void 0!==r){if(!("number"==typeof r.expires&&Date.now()>r.expires))return t&&t.raw?r:r.value;this.delete(e)}})}set(e,t,r){e=this._getKeyPrefix(e),void 0===r&&(r=this.opts.ttl),0===r&&(r=void 0);const{store:A}=this.opts;return Promise.resolve().then(()=>{const e="number"==typeof r?Date.now()+r:null;return t={value:t,expires:e},this.opts.serialize(t)}).then(t=>A.set(e,t,r)).then(()=>!0)}delete(e){e=this._getKeyPrefix(e);const{store:t}=this.opts;return Promise.resolve().then(()=>t.delete(e))}clear(){const{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}}},89112:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=89112,e.exports=t},78962:(e,t,r)=>{var A=r(99513)(r(76169),"DataView");e.exports=A},72574:(e,t,r)=>{var A=r(31713),n=r(86688),o=r(45937),i=r(5017),s=r(79457);function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var A=r(14620),n=r(73682),o=r(43112),i=r(90640),s=r(9380);function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var A=r(99513)(r(76169),"Map");e.exports=A},75009:(e,t,r)=>{var A=r(18209),n=r(89706),o=r(43786),i=r(17926),s=r(87345);function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var A=r(99513)(r(76169),"Promise");e.exports=A},43231:(e,t,r)=>{var A=r(99513)(r(76169),"Set");e.exports=A},46235:(e,t,r)=>{var A=r(75009),n=r(74785),o=r(87760);function i(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new A;++t{var A=r(29197),n=r(35678),o=r(33336),i=r(97163),s=r(43737),a=r(48548);function c(e){var t=this.__data__=new A(e);this.size=t.size}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=s,c.prototype.set=a,e.exports=c},69976:(e,t,r)=>{var A=r(76169).Symbol;e.exports=A},2740:(e,t,r)=>{var A=r(76169).Uint8Array;e.exports=A},47063:(e,t,r)=>{var A=r(99513)(r(76169),"WeakMap");e.exports=A},66636:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},33326:e=>{e.exports=function(e,t){for(var r=-1,A=null==e?0:e.length;++r{e.exports=function(e,t){for(var r=-1,A=null==e?0:e.length,n=0,o=[];++r{var A=r(7089),n=r(61771),o=r(82664),i=r(10667),s=r(98041),a=r(32565),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),g=!r&&n(e),l=!r&&!g&&i(e),u=!r&&!g&&!l&&a(e),h=r||g||l||u,p=h?A(e.length,String):[],d=p.length;for(var C in e)!t&&!c.call(e,C)||h&&("length"==C||l&&("offset"==C||"parent"==C)||u&&("buffer"==C||"byteLength"==C||"byteOffset"==C)||s(C,d))||p.push(C);return p}},60783:e=>{e.exports=function(e,t){for(var r=-1,A=null==e?0:e.length,n=Array(A);++r{e.exports=function(e,t){for(var r=-1,A=t.length,n=e.length;++r{e.exports=function(e,t,r,A){var n=-1,o=null==e?0:e.length;for(A&&o&&(r=e[++n]);++n{e.exports=function(e,t){for(var r=-1,A=null==e?0:e.length;++r{e.exports=function(e){return e.split("")}},11852:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},26943:(e,t,r)=>{var A=r(91198),n=r(71074);e.exports=function(e,t,r){(void 0!==r&&!n(e[t],r)||void 0===r&&!(t in e))&&A(e,t,r)}},65759:(e,t,r)=>{var A=r(91198),n=r(71074),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var i=e[t];o.call(e,t)&&n(i,r)&&(void 0!==r||t in e)||A(e,t,r)}},39836:(e,t,r)=>{var A=r(71074);e.exports=function(e,t){for(var r=e.length;r--;)if(A(e[r][0],t))return r;return-1}},28628:(e,t,r)=>{var A=r(75182),n=r(42185);e.exports=function(e,t){return e&&A(t,n(t),e)}},78707:(e,t,r)=>{var A=r(75182),n=r(24887);e.exports=function(e,t){return e&&A(t,n(t),e)}},91198:(e,t,r)=>{var A=r(65);e.exports=function(e,t,r){"__proto__"==t&&A?A(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},41076:(e,t,r)=>{var A=r(22851),n=r(33326),o=r(65759),i=r(28628),s=r(78707),a=r(64266),c=r(87229),g=r(23105),l=r(60741),u=r(60753),h=r(64420),p=r(79435),d=r(27908),C=r(37836),f=r(88438),I=r(82664),E=r(10667),B=r(13349),y=r(46778),m=r(33931),w=r(42185),Q={};Q["[object Arguments]"]=Q["[object Array]"]=Q["[object ArrayBuffer]"]=Q["[object DataView]"]=Q["[object Boolean]"]=Q["[object Date]"]=Q["[object Float32Array]"]=Q["[object Float64Array]"]=Q["[object Int8Array]"]=Q["[object Int16Array]"]=Q["[object Int32Array]"]=Q["[object Map]"]=Q["[object Number]"]=Q["[object Object]"]=Q["[object RegExp]"]=Q["[object Set]"]=Q["[object String]"]=Q["[object Symbol]"]=Q["[object Uint8Array]"]=Q["[object Uint8ClampedArray]"]=Q["[object Uint16Array]"]=Q["[object Uint32Array]"]=!0,Q["[object Error]"]=Q["[object Function]"]=Q["[object WeakMap]"]=!1,e.exports=function e(t,r,D,b,v,S){var k,N=1&r,F=2&r,K=4&r;if(D&&(k=v?D(t,b,v,S):D(t)),void 0!==k)return k;if(!y(t))return t;var M=I(t);if(M){if(k=d(t),!N)return c(t,k)}else{var R=p(t),x="[object Function]"==R||"[object GeneratorFunction]"==R;if(E(t))return a(t,N);if("[object Object]"==R||"[object Arguments]"==R||x&&!v){if(k=F||x?{}:f(t),!N)return F?l(t,s(k,t)):g(t,i(k,t))}else{if(!Q[R])return v?t:{};k=C(t,R,N)}}S||(S=new A);var L=S.get(t);if(L)return L;S.set(t,k),m(t)?t.forEach((function(A){k.add(e(A,r,D,A,t,S))})):B(t)&&t.forEach((function(A,n){k.set(n,e(A,r,D,n,t,S))}));var P=K?F?h:u:F?keysIn:w,O=M?void 0:P(t);return n(O||t,(function(A,n){O&&(A=t[n=A]),o(k,n,e(A,r,D,n,t,S))})),k}},15178:(e,t,r)=>{var A=r(46778),n=Object.create,o=function(){function e(){}return function(t){if(!A(t))return{};if(n)return n(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},93274:(e,t,r)=>{var A=r(40945),n=r(958);e.exports=function e(t,r,o,i,s){var a=-1,c=t.length;for(o||(o=n),s||(s=[]);++a0&&o(g)?r>1?e(g,r-1,o,i,s):A(s,g):i||(s[s.length]=g)}return s}},31689:(e,t,r)=>{var A=r(59907)();e.exports=A},62164:(e,t,r)=>{var A=r(31689),n=r(42185);e.exports=function(e,t){return e&&A(e,t,n)}},84173:(e,t,r)=>{var A=r(56725),n=r(49874);e.exports=function(e,t){for(var r=0,o=(t=A(t,e)).length;null!=e&&r{var A=r(40945),n=r(82664);e.exports=function(e,t,r){var o=t(e);return n(e)?o:A(o,r(e))}},52502:(e,t,r)=>{var A=r(69976),n=r(2854),o=r(87427),i=A?A.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?n(e):o(e)}},95325:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,r){return null!=e&&t.call(e,r)}},3881:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},76357:(e,t,r)=>{var A=r(52502),n=r(38496);e.exports=function(e){return n(e)&&"[object Arguments]"==A(e)}},74195:(e,t,r)=>{var A=r(48957),n=r(38496);e.exports=function e(t,r,o,i,s){return t===r||(null==t||null==r||!n(t)&&!n(r)?t!=t&&r!=r:A(t,r,o,i,e,s))}},48957:(e,t,r)=>{var A=r(22851),n=r(75500),o=r(28475),i=r(50245),s=r(79435),a=r(82664),c=r(10667),g=r(32565),l="[object Object]",u=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,h,p,d){var C=a(e),f=a(t),I=C?"[object Array]":s(e),E=f?"[object Array]":s(t),B=(I="[object Arguments]"==I?l:I)==l,y=(E="[object Arguments]"==E?l:E)==l,m=I==E;if(m&&c(e)){if(!c(t))return!1;C=!0,B=!1}if(m&&!B)return d||(d=new A),C||g(e)?n(e,t,r,h,p,d):o(e,t,I,r,h,p,d);if(!(1&r)){var w=B&&u.call(e,"__wrapped__"),Q=y&&u.call(t,"__wrapped__");if(w||Q){var D=w?e.value():e,b=Q?t.value():t;return d||(d=new A),p(D,b,r,h,d)}}return!!m&&(d||(d=new A),i(e,t,r,h,p,d))}},55994:(e,t,r)=>{var A=r(79435),n=r(38496);e.exports=function(e){return n(e)&&"[object Map]"==A(e)}},66470:(e,t,r)=>{var A=r(22851),n=r(74195);e.exports=function(e,t,r,o){var i=r.length,s=i,a=!o;if(null==e)return!s;for(e=Object(e);i--;){var c=r[i];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i{var A=r(92533),n=r(15061),o=r(46778),i=r(76384),s=/^\[object .+?Constructor\]$/,a=Function.prototype,c=Object.prototype,g=a.toString,l=c.hasOwnProperty,u=RegExp("^"+g.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||n(e))&&(A(e)?u:s).test(i(e))}},28612:(e,t,r)=>{var A=r(79435),n=r(38496);e.exports=function(e){return n(e)&&"[object Set]"==A(e)}},98998:(e,t,r)=>{var A=r(52502),n=r(46369),o=r(38496),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&n(e.length)&&!!i[A(e)]}},42208:(e,t,r)=>{var A=r(96962),n=r(90348),o=r(61977),i=r(82664),s=r(7430);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?i(e)?n(e[0],e[1]):A(e):s(e)}},50994:(e,t,r)=>{var A=r(89513),n=r(60657),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!A(e))return n(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},8372:(e,t,r)=>{var A=r(46778),n=r(89513),o=r(95632),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!A(e))return o(e);var t=n(e),r=[];for(var s in e)("constructor"!=s||!t&&i.call(e,s))&&r.push(s);return r}},96962:(e,t,r)=>{var A=r(66470),n=r(98705),o=r(12757);e.exports=function(e){var t=n(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(r){return r===e||A(r,e,t)}}},90348:(e,t,r)=>{var A=r(74195),n=r(44674),o=r(34878),i=r(70474),s=r(20925),a=r(12757),c=r(49874);e.exports=function(e,t){return i(e)&&s(t)?a(c(e),t):function(r){var i=n(r,e);return void 0===i&&i===t?o(r,e):A(t,i,3)}}},51264:(e,t,r)=>{var A=r(22851),n=r(26943),o=r(31689),i=r(16834),s=r(46778),a=r(24887),c=r(36883);e.exports=function e(t,r,g,l,u){t!==r&&o(r,(function(o,a){if(u||(u=new A),s(o))i(t,r,a,g,e,l,u);else{var h=l?l(c(t,a),o,a+"",t,r,u):void 0;void 0===h&&(h=o),n(t,a,h)}}),a)}},16834:(e,t,r)=>{var A=r(26943),n=r(64266),o=r(58042),i=r(87229),s=r(88438),a=r(61771),c=r(82664),g=r(16064),l=r(10667),u=r(92533),h=r(46778),p=r(11672),d=r(32565),C=r(36883),f=r(36506);e.exports=function(e,t,r,I,E,B,y){var m=C(e,r),w=C(t,r),Q=y.get(w);if(Q)A(e,r,Q);else{var D=B?B(m,w,r+"",e,t,y):void 0,b=void 0===D;if(b){var v=c(w),S=!v&&l(w),k=!v&&!S&&d(w);D=w,v||S||k?c(m)?D=m:g(m)?D=i(m):S?(b=!1,D=n(w,!0)):k?(b=!1,D=o(w,!0)):D=[]:p(w)||a(w)?(D=m,a(m)?D=f(m):h(m)&&!u(m)||(D=s(w))):b=!1}b&&(y.set(w,D),E(D,w,I,B,y),y.delete(w)),A(e,r,D)}}},72204:(e,t,r)=>{var A=r(35314),n=r(34878);e.exports=function(e,t){return A(e,t,(function(t,r){return n(e,r)}))}},35314:(e,t,r)=>{var A=r(84173),n=r(10624),o=r(56725);e.exports=function(e,t,r){for(var i=-1,s=t.length,a={};++i{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},43018:(e,t,r)=>{var A=r(84173);e.exports=function(e){return function(t){return A(t,e)}}},51587:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},30383:(e,t,r)=>{var A=r(61977),n=r(44322),o=r(3111);e.exports=function(e,t){return o(n(e,t,A),e+"")}},10624:(e,t,r)=>{var A=r(65759),n=r(56725),o=r(98041),i=r(46778),s=r(49874);e.exports=function(e,t,r,a){if(!i(e))return e;for(var c=-1,g=(t=n(t,e)).length,l=g-1,u=e;null!=u&&++c{var A=r(4967),n=r(65),o=r(61977),i=n?function(e,t){return n(e,"toString",{configurable:!0,enumerable:!1,value:A(t),writable:!0})}:o;e.exports=i},27708:e=>{e.exports=function(e,t,r){var A=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(r=r>n?n:r)<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(n);++A{e.exports=function(e,t){for(var r=-1,A=Array(e);++r{var A=r(69976),n=r(60783),o=r(82664),i=r(65558),s=A?A.prototype:void 0,a=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return n(t,e)+"";if(i(t))return a?a.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},73635:e=>{e.exports=function(e){return function(t){return e(t)}}},18290:(e,t,r)=>{var A=r(60783);e.exports=function(e,t){return A(t,(function(t){return e[t]}))}},93022:e=>{e.exports=function(e,t){return e.has(t)}},56725:(e,t,r)=>{var A=r(82664),n=r(70474),o=r(8689),i=r(33580);e.exports=function(e,t){return A(e)?e:n(e,t)?[e]:o(i(e))}},92568:(e,t,r)=>{var A=r(27708);e.exports=function(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:A(e,t,r)}},76255:(e,t,r)=>{var A=r(2740);e.exports=function(e){var t=new e.constructor(e.byteLength);return new A(t).set(new A(e)),t}},64266:(e,t,r)=>{e=r.nmd(e);var A=r(76169),n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,i=o&&o.exports===n?A.Buffer:void 0,s=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,A=s?s(r):new e.constructor(r);return e.copy(A),A}},63749:(e,t,r)=>{var A=r(76255);e.exports=function(e,t){var r=t?A(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},41705:e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},25791:(e,t,r)=>{var A=r(69976),n=A?A.prototype:void 0,o=n?n.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},58042:(e,t,r)=>{var A=r(76255);e.exports=function(e,t){var r=t?A(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},87229:e=>{e.exports=function(e,t){var r=-1,A=e.length;for(t||(t=Array(A));++r{var A=r(65759),n=r(91198);e.exports=function(e,t,r,o){var i=!r;r||(r={});for(var s=-1,a=t.length;++s{var A=r(75182),n=r(68727);e.exports=function(e,t){return A(e,n(e),t)}},60741:(e,t,r)=>{var A=r(75182),n=r(35368);e.exports=function(e,t){return A(e,n(e),t)}},14429:(e,t,r)=>{var A=r(76169)["__core-js_shared__"];e.exports=A},27913:(e,t,r)=>{var A=r(30383),n=r(33193);e.exports=function(e){return A((function(t,r){var A=-1,o=r.length,i=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,s&&n(r[0],r[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++A{e.exports=function(e){return function(t,r,A){for(var n=-1,o=Object(t),i=A(t),s=i.length;s--;){var a=i[e?s:++n];if(!1===r(o[a],a,o))break}return t}}},56989:(e,t,r)=>{var A=r(92568),n=r(93024),o=r(30475),i=r(33580);e.exports=function(e){return function(t){t=i(t);var r=n(t)?o(t):void 0,s=r?r[0]:t.charAt(0),a=r?A(r,1).join(""):t.slice(1);return s[e]()+a}}},30369:(e,t,r)=>{var A=r(66054),n=r(68968),o=r(97684),i=RegExp("['’]","g");e.exports=function(e){return function(t){return A(o(n(t).replace(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:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"});e.exports=A},65:(e,t,r)=>{var A=r(99513),n=function(){try{var e=A(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=n},75500:(e,t,r)=>{var A=r(46235),n=r(17765),o=r(93022);e.exports=function(e,t,r,i,s,a){var c=1&r,g=e.length,l=t.length;if(g!=l&&!(c&&l>g))return!1;var u=a.get(e);if(u&&a.get(t))return u==t;var h=-1,p=!0,d=2&r?new A:void 0;for(a.set(e,t),a.set(t,e);++h{var A=r(69976),n=r(2740),o=r(71074),i=r(75500),s=r(7877),a=r(7442),c=A?A.prototype:void 0,g=c?c.valueOf:void 0;e.exports=function(e,t,r,A,c,l,u){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!l(new n(e),new n(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=s;case"[object Set]":var p=1&A;if(h||(h=a),e.size!=t.size&&!p)return!1;var d=u.get(e);if(d)return d==t;A|=2,u.set(e,t);var C=i(h(e),h(t),A,c,l,u);return u.delete(e),C;case"[object Symbol]":if(g)return g.call(e)==g.call(t)}return!1}},50245:(e,t,r)=>{var A=r(60753),n=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,o,i,s){var a=1&r,c=A(e),g=c.length;if(g!=A(t).length&&!a)return!1;for(var l=g;l--;){var u=c[l];if(!(a?u in t:n.call(t,u)))return!1}var h=s.get(e);if(h&&s.get(t))return h==t;var p=!0;s.set(e,t),s.set(t,e);for(var d=a;++l{var A=r(54690),n=r(44322),o=r(3111);e.exports=function(e){return o(n(e,void 0,A),e+"")}},68399:e=>{var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},60753:(e,t,r)=>{var A=r(40104),n=r(68727),o=r(42185);e.exports=function(e){return A(e,o,n)}},64420:(e,t,r)=>{var A=r(40104),n=r(35368),o=r(24887);e.exports=function(e){return A(e,o,n)}},59253:(e,t,r)=>{var A=r(69448);e.exports=function(e,t){var r=e.__data__;return A(t)?r["string"==typeof t?"string":"hash"]:r.map}},98705:(e,t,r)=>{var A=r(20925),n=r(42185);e.exports=function(e){for(var t=n(e),r=t.length;r--;){var o=t[r],i=e[o];t[r]=[o,i,A(i)]}return t}},99513:(e,t,r)=>{var A=r(91686),n=r(98054);e.exports=function(e,t){var r=n(e,t);return A(r)?r:void 0}},41181:(e,t,r)=>{var A=r(64309)(Object.getPrototypeOf,Object);e.exports=A},2854:(e,t,r)=>{var A=r(69976),n=Object.prototype,o=n.hasOwnProperty,i=n.toString,s=A?A.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var A=!0}catch(e){}var n=i.call(e);return A&&(t?e[s]=r:delete e[s]),n}},68727:(e,t,r)=>{var A=r(9073),n=r(62162),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(e){return null==e?[]:(e=Object(e),A(i(e),(function(t){return o.call(e,t)})))}:n;e.exports=s},35368:(e,t,r)=>{var A=r(40945),n=r(41181),o=r(68727),i=r(62162),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)A(t,o(e)),e=n(e);return t}:i;e.exports=s},79435:(e,t,r)=>{var A=r(78962),n=r(63603),o=r(5825),i=r(43231),s=r(47063),a=r(52502),c=r(76384),g=c(A),l=c(n),u=c(o),h=c(i),p=c(s),d=a;(A&&"[object DataView]"!=d(new A(new ArrayBuffer(1)))||n&&"[object Map]"!=d(new n)||o&&"[object Promise]"!=d(o.resolve())||i&&"[object Set]"!=d(new i)||s&&"[object WeakMap]"!=d(new s))&&(d=function(e){var t=a(e),r="[object Object]"==t?e.constructor:void 0,A=r?c(r):"";if(A)switch(A){case g:return"[object DataView]";case l:return"[object Map]";case u:return"[object Promise]";case h:return"[object Set]";case p:return"[object WeakMap]"}return t}),e.exports=d},98054:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},71507:(e,t,r)=>{var A=r(56725),n=r(61771),o=r(82664),i=r(98041),s=r(46369),a=r(49874);e.exports=function(e,t,r){for(var c=-1,g=(t=A(t,e)).length,l=!1;++c{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},60466:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},31713:(e,t,r)=>{var A=r(52437);e.exports=function(){this.__data__=A?A(null):{},this.size=0}},86688:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},45937:(e,t,r)=>{var A=r(52437),n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(A){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return n.call(t,e)?t[e]:void 0}},5017:(e,t,r)=>{var A=r(52437),n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return A?void 0!==t[e]:n.call(t,e)}},79457:(e,t,r)=>{var A=r(52437);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=A&&void 0===t?"__lodash_hash_undefined__":t,this}},27908:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,A=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(A.index=e.index,A.input=e.input),A}},37836:(e,t,r)=>{var A=r(76255),n=r(63749),o=r(41705),i=r(25791),s=r(58042);e.exports=function(e,t,r){var a=e.constructor;switch(t){case"[object ArrayBuffer]":return A(e);case"[object Boolean]":case"[object Date]":return new a(+e);case"[object DataView]":return n(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,r);case"[object Map]":return new a;case"[object Number]":case"[object String]":return new a(e);case"[object RegExp]":return o(e);case"[object Set]":return new a;case"[object Symbol]":return i(e)}}},88438:(e,t,r)=>{var A=r(15178),n=r(41181),o=r(89513);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:A(n(e))}},958:(e,t,r)=>{var A=r(69976),n=r(61771),o=r(82664),i=A?A.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||n(e)||!!(i&&e&&e[i])}},98041:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var A=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==A||"symbol"!=A&&t.test(e))&&e>-1&&e%1==0&&e{var A=r(71074),n=r(41929),o=r(98041),i=r(46778);e.exports=function(e,t,r){if(!i(r))return!1;var s=typeof t;return!!("number"==s?n(r)&&o(t,r.length):"string"==s&&t in r)&&A(r[t],e)}},70474:(e,t,r)=>{var A=r(82664),n=r(65558),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(A(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!n(e))||(i.test(e)||!o.test(e)||null!=t&&e in Object(t))}},69448:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},15061:(e,t,r)=>{var A,n=r(14429),o=(A=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"";e.exports=function(e){return!!o&&o in e}},89513:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},20925:(e,t,r)=>{var A=r(46778);e.exports=function(e){return e==e&&!A(e)}},82262:e=>{e.exports=function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}},14620:e=>{e.exports=function(){this.__data__=[],this.size=0}},73682:(e,t,r)=>{var A=r(39836),n=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=A(t,e);return!(r<0)&&(r==t.length-1?t.pop():n.call(t,r,1),--this.size,!0)}},43112:(e,t,r)=>{var A=r(39836);e.exports=function(e){var t=this.__data__,r=A(t,e);return r<0?void 0:t[r][1]}},90640:(e,t,r)=>{var A=r(39836);e.exports=function(e){return A(this.__data__,e)>-1}},9380:(e,t,r)=>{var A=r(39836);e.exports=function(e,t){var r=this.__data__,n=A(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}},18209:(e,t,r)=>{var A=r(72574),n=r(29197),o=r(63603);e.exports=function(){this.size=0,this.__data__={hash:new A,map:new(o||n),string:new A}}},89706:(e,t,r)=>{var A=r(59253);e.exports=function(e){var t=A(this,e).delete(e);return this.size-=t?1:0,t}},43786:(e,t,r)=>{var A=r(59253);e.exports=function(e){return A(this,e).get(e)}},17926:(e,t,r)=>{var A=r(59253);e.exports=function(e){return A(this,e).has(e)}},87345:(e,t,r)=>{var A=r(59253);e.exports=function(e,t){var r=A(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}},7877:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,A){r[++t]=[A,e]})),r}},12757:e=>{e.exports=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},31948:(e,t,r)=>{var A=r(74499);e.exports=function(e){var t=A(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},52437:(e,t,r)=>{var A=r(99513)(Object,"create");e.exports=A},60657:(e,t,r)=>{var A=r(64309)(Object.keys,Object);e.exports=A},95632:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},26391:(e,t,r)=>{e=r.nmd(e);var A=r(68399),n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,i=o&&o.exports===n&&A.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s},87427:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},64309:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},44322:(e,t,r)=>{var A=r(66636),n=Math.max;e.exports=function(e,t,r){return t=n(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,s=n(o.length-t,0),a=Array(s);++i{var A=r(68399),n="object"==typeof self&&self&&self.Object===Object&&self,o=A||n||Function("return this")();e.exports=o},36883:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},74785:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},87760:e=>{e.exports=function(e){return this.__data__.has(e)}},7442:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},3111:(e,t,r)=>{var A=r(4899),n=r(19908)(A);e.exports=n},19908:e=>{var t=Date.now;e.exports=function(e){var r=0,A=0;return function(){var n=t(),o=16-(n-A);if(A=n,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},35678:(e,t,r)=>{var A=r(29197);e.exports=function(){this.__data__=new A,this.size=0}},33336:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},97163:e=>{e.exports=function(e){return this.__data__.get(e)}},43737:e=>{e.exports=function(e){return this.__data__.has(e)}},48548:(e,t,r)=>{var A=r(29197),n=r(63603),o=r(75009);e.exports=function(e,t){var r=this.__data__;if(r instanceof A){var i=r.__data__;if(!n||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(i)}return r.set(e,t),this.size=r.size,this}},30475:(e,t,r)=>{var A=r(1051),n=r(93024),o=r(297);e.exports=function(e){return n(e)?o(e):A(e)}},8689:(e,t,r)=>{var A=r(31948),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,i=A((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(n,(function(e,r,A,n){t.push(A?n.replace(o,"$1"):r||e)})),t}));e.exports=i},49874:(e,t,r)=>{var A=r(65558);e.exports=function(e){if("string"==typeof e||A(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},76384:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},297:e=>{var t="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",A="\\ud83c[\\udffb-\\udfff]",n="[^\\ud800-\\udfff]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+r+"|"+A+")"+"?",a="[\\ufe0e\\ufe0f]?"+s+("(?:\\u200d(?:"+[n,o,i].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*"),c="(?:"+[n+r+"?",r,o,i,t].join("|")+")",g=RegExp(A+"(?="+A+")|"+c+a,"g");e.exports=function(e){return e.match(g)||[]}},89887:e=>{var t="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",r="["+t+"]",A="\\d+",n="[\\u2700-\\u27bf]",o="[a-z\\xdf-\\xf6\\xf8-\\xff]",i="[^\\ud800-\\udfff"+t+A+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",c="[A-Z\\xc0-\\xd6\\xd8-\\xde]",g="(?:"+o+"|"+i+")",l="(?:"+c+"|"+i+")",u="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",h="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",s,a].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),p="(?:"+[n,s,a].join("|")+")"+h,d=RegExp([c+"?"+o+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[r,c,"$"].join("|")+")",l+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[r,c+g,"$"].join("|")+")",c+"?"+g+"+(?:['’](?:d|ll|m|re|s|t|ve))?",c+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",A,p].join("|"),"g");e.exports=function(e){return e.match(d)||[]}},89170:(e,t,r)=>{var A=r(61814),n=r(30369)((function(e,t,r){return t=t.toLowerCase(),e+(r?A(t):t)}));e.exports=n},61814:(e,t,r)=>{var A=r(33580),n=r(72609);e.exports=function(e){return n(A(e).toLowerCase())}},82558:(e,t,r)=>{var A=r(41076);e.exports=function(e){return A(e,5)}},26052:(e,t,r)=>{var A=r(41076);e.exports=function(e,t){return A(e,5,t="function"==typeof t?t:void 0)}},4967:e=>{e.exports=function(e){return function(){return e}}},68968:(e,t,r)=>{var A=r(69922),n=r(33580),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=n(e))&&e.replace(o,A).replace(i,"")}},71074:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},54690:(e,t,r)=>{var A=r(93274);e.exports=function(e){return(null==e?0:e.length)?A(e,1):[]}},44674:(e,t,r)=>{var A=r(84173);e.exports=function(e,t,r){var n=null==e?void 0:A(e,t);return void 0===n?r:n}},15215:(e,t,r)=>{var A=r(95325),n=r(71507);e.exports=function(e,t){return null!=e&&n(e,t,A)}},34878:(e,t,r)=>{var A=r(3881),n=r(71507);e.exports=function(e,t){return null!=e&&n(e,t,A)}},61977:e=>{e.exports=function(e){return e}},61771:(e,t,r)=>{var A=r(76357),n=r(38496),o=Object.prototype,i=o.hasOwnProperty,s=o.propertyIsEnumerable,a=A(function(){return arguments}())?A:function(e){return n(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=a},82664:e=>{var t=Array.isArray;e.exports=t},41929:(e,t,r)=>{var A=r(92533),n=r(46369);e.exports=function(e){return null!=e&&n(e.length)&&!A(e)}},16064:(e,t,r)=>{var A=r(41929),n=r(38496);e.exports=function(e){return n(e)&&A(e)}},10667:(e,t,r)=>{e=r.nmd(e);var A=r(76169),n=r(88988),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o?A.Buffer:void 0,a=(s?s.isBuffer:void 0)||n;e.exports=a},92533:(e,t,r)=>{var A=r(52502),n=r(46778);e.exports=function(e){if(!n(e))return!1;var t=A(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},46369:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},13349:(e,t,r)=>{var A=r(55994),n=r(73635),o=r(26391),i=o&&o.isMap,s=i?n(i):A;e.exports=s},46778:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},38496:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},11672:(e,t,r)=>{var A=r(52502),n=r(41181),o=r(38496),i=Function.prototype,s=Object.prototype,a=i.toString,c=s.hasOwnProperty,g=a.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=A(e))return!1;var t=n(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&a.call(r)==g}},33931:(e,t,r)=>{var A=r(28612),n=r(73635),o=r(26391),i=o&&o.isSet,s=i?n(i):A;e.exports=s},221:(e,t,r)=>{var A=r(52502),n=r(82664),o=r(38496);e.exports=function(e){return"string"==typeof e||!n(e)&&o(e)&&"[object String]"==A(e)}},65558:(e,t,r)=>{var A=r(52502),n=r(38496);e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==A(e)}},32565:(e,t,r)=>{var A=r(98998),n=r(73635),o=r(26391),i=o&&o.isTypedArray,s=i?n(i):A;e.exports=s},42185:(e,t,r)=>{var A=r(11886),n=r(50994),o=r(41929);e.exports=function(e){return o(e)?A(e):n(e)}},24887:(e,t,r)=>{var A=r(11886),n=r(8372),o=r(41929);e.exports=function(e){return o(e)?A(e,!0):n(e)}},5253:(e,t,r)=>{var A=r(91198),n=r(62164),o=r(42208);e.exports=function(e,t){var r={};return t=o(t,3),n(e,(function(e,n,o){A(r,t(e,n,o),e)})),r}},89612:(e,t,r)=>{var A=r(91198),n=r(62164),o=r(42208);e.exports=function(e,t){var r={};return t=o(t,3),n(e,(function(e,n,o){A(r,n,t(e,n,o))})),r}},74499:(e,t,r)=>{var A=r(75009);function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var A=arguments,n=t?t.apply(this,A):A[0],o=r.cache;if(o.has(n))return o.get(n);var i=e.apply(this,A);return r.cache=o.set(n,i)||o,i};return r.cache=new(n.Cache||A),r}n.Cache=A,e.exports=n},80305:(e,t,r)=>{var A=r(51264),n=r(27913)((function(e,t,r){A(e,t,r)}));e.exports=n},75130:(e,t,r)=>{var A=r(72204),n=r(87298)((function(e,t){return null==e?{}:A(e,t)}));e.exports=n},7430:(e,t,r)=>{var A=r(35400),n=r(43018),o=r(70474),i=r(49874);e.exports=function(e){return o(e)?A(i(e)):n(e)}},81534:(e,t,r)=>{var A=r(10624);e.exports=function(e,t,r){return null==e?e:A(e,t,r)}},36494:(e,t,r)=>{var A=r(30369)((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));e.exports=A},62162:e=>{e.exports=function(){return[]}},88988:e=>{e.exports=function(){return!1}},78700:(e,t,r)=>{var A=r(69976),n=r(87229),o=r(79435),i=r(41929),s=r(221),a=r(82262),c=r(7877),g=r(7442),l=r(30475),u=r(24448),h=A?A.iterator:void 0;e.exports=function(e){if(!e)return[];if(i(e))return s(e)?l(e):n(e);if(h&&e[h])return a(e[h]());var t=o(e);return("[object Map]"==t?c:"[object Set]"==t?g:u)(e)}},36506:(e,t,r)=>{var A=r(75182),n=r(24887);e.exports=function(e){return A(e,n(e))}},33580:(e,t,r)=>{var A=r(35);e.exports=function(e){return null==e?"":A(e)}},72609:(e,t,r)=>{var A=r(56989)("toUpperCase");e.exports=A},24448:(e,t,r)=>{var A=r(18290),n=r(42185);e.exports=function(e){return null==e?[]:A(e,n(e))}},97684:(e,t,r)=>{var A=r(11852),n=r(60466),o=r(33580),i=r(89887);e.exports=function(e,t,r){return e=o(e),void 0===(t=r?void 0:t)?n(e)?i(e):A(e):e.match(t)||[]}},55737:e=>{"use strict";e.exports=e=>{const t={};for(const[r,A]of Object.entries(e))t[r.toLowerCase()]=A;return t}},46227:(e,t,r)=>{"use strict";const A=r(35747),n=r(85622),{promisify:o}=r(31669),i=r(95584).satisfies(process.version,">=10.12.0"),s=e=>{if("win32"===process.platform){if(/[<>:"|?*]/.test(e.replace(n.parse(e).root,""))){const t=new Error("Path contains invalid characters: "+e);throw t.code="EINVAL",t}}},a=e=>({...{mode:511,fs:A},...e}),c=e=>{const t=new Error(`operation not permitted, mkdir '${e}'`);return t.code="EPERM",t.errno=-4048,t.path=e,t.syscall="mkdir",t};e.exports=async(e,t)=>{s(e),t=a(t);const r=o(t.fs.mkdir),g=o(t.fs.stat);if(i&&t.fs.mkdir===A.mkdir){const A=n.resolve(e);return await r(A,{mode:t.mode,recursive:!0}),A}const l=async e=>{try{return await r(e,t.mode),e}catch(t){if("EPERM"===t.code)throw t;if("ENOENT"===t.code){if(n.dirname(e)===e)throw c(e);if(t.message.includes("null bytes"))throw t;return await l(n.dirname(e)),l(e)}try{if(!(await g(e)).isDirectory())throw new Error("The path is not a directory")}catch(e){throw t}return e}};return l(n.resolve(e))},e.exports.sync=(e,t)=>{if(s(e),t=a(t),i&&t.fs.mkdirSync===A.mkdirSync){const r=n.resolve(e);return A.mkdirSync(r,{mode:t.mode,recursive:!0}),r}const r=e=>{try{t.fs.mkdirSync(e,t.mode)}catch(A){if("EPERM"===A.code)throw A;if("ENOENT"===A.code){if(n.dirname(e)===e)throw c(e);if(A.message.includes("null bytes"))throw A;return r(n.dirname(e)),r(e)}try{if(!t.fs.statSync(e).isDirectory())throw new Error("The path is not a directory")}catch(e){throw A}}return e};return r(n.resolve(e))}},55598:(e,t,r)=>{"use strict";const A=r(92413).PassThrough,n=Array.prototype.slice;function o(e,t){if(Array.isArray(e))for(let r=0,A=e.length;r0||(t=!1,g())}function o(e){function t(){e.removeListener("merge2UnpipeEnd",t),e.removeListener("end",t),n()}if(e._readableState.endEmitted)return n();e.on("merge2UnpipeEnd",t),e.on("end",t),e.pipe(a,{end:!1}),e.resume()}for(let e=0;e{"use strict";const A=r(31669),n=r(12235),o=r(54722),i=r(3598),s=e=>"string"==typeof e&&(""===e||"./"===e),a=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let A=new Set,n=new Set,i=new Set,s=0,a=e=>{i.add(e.output),r&&r.onResult&&r.onResult(e)};for(let i=0;i!A.has(e));if(r&&0===c.length){if(!0===r.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?t.map(e=>e.replace(/\\/g,"")):t}return c};a.match=a,a.matcher=(e,t)=>o(e,t),a.any=a.isMatch=(e,t,r)=>o(t,r)(e),a.not=(e,t,r={})=>{t=[].concat(t).map(String);let A=new Set,n=[],o=a(e,t,{...r,onResult:e=>{r.onResult&&r.onResult(e),n.push(e.output)}});for(let e of n)o.includes(e)||A.add(e);return[...A]},a.contains=(e,t,r)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${A.inspect(e)}"`);if(Array.isArray(t))return t.some(t=>a.contains(e,t,r));if("string"==typeof t){if(s(e)||s(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return a.isMatch(e,t,{...r,contains:!0})},a.matchKeys=(e,t,r)=>{if(!i.isObject(e))throw new TypeError("Expected the first argument to be an object");let A=a(Object.keys(e),t,r),n={};for(let t of A)n[t]=e[t];return n},a.some=(e,t,r)=>{let A=[].concat(e);for(let e of[].concat(t)){let t=o(String(e),r);if(A.some(e=>t(e)))return!0}return!1},a.every=(e,t,r)=>{let A=[].concat(e);for(let e of[].concat(t)){let t=o(String(e),r);if(!A.every(e=>t(e)))return!1}return!0},a.all=(e,t,r)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${A.inspect(e)}"`);return[].concat(t).every(t=>o(t,r)(e))},a.capture=(e,t,r)=>{let A=i.isWindows(r),n=o.makeRe(String(e),{...r,capture:!0}).exec(A?i.toPosixSlashes(t):t);if(n)return n.slice(1).map(e=>void 0===e?"":e)},a.makeRe=(...e)=>o.makeRe(...e),a.scan=(...e)=>o.scan(...e),a.parse=(e,t)=>{let r=[];for(let A of[].concat(e||[]))for(let e of n(String(A),t))r.push(o.parse(e,t));return r},a.braces=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return t&&!0===t.nobrace||!/\{.*\}/.test(e)?[e]:n(e,t)},a.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return a.braces(e,{...t,expand:!0})},e.exports=a},65007:e=>{"use strict";const t=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];e.exports=(e,r)=>{const A=new Set(Object.keys(e).concat(t));for(const t of A)t in r||(r[t]="function"==typeof e[t]?e[t].bind(e):e[t])}},33527:e=>{"use strict";const t=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];e.exports=(e,r)=>{if(r._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const A=new Set(Object.keys(e).concat(t)),n={};for(const t of A)t in r||(n[t]={get(){const r=e[t];return"function"==typeof r?r.bind(e):r},set(r){e[t]=r},enumerable:!0,configurable:!1});return Object.defineProperties(r,n),e.once("aborted",()=>{r.destroy(),r.emit("aborted")}),e.once("close",()=>{e.complete&&r.readable?r.once("end",()=>{r.emit("close")}):r.emit("close")}),r}},19793:(e,t,r)=>{"use strict";const A="undefined"==typeof URL?r(78835).URL:URL,n=(e,t)=>t.some(t=>t instanceof RegExp?t.test(e):t===e),o=(e,t)=>{if(t={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...t},Reflect.has(t,"normalizeHttps"))throw new Error("options.normalizeHttps is renamed to options.forceHttp");if(Reflect.has(t,"normalizeHttp"))throw new Error("options.normalizeHttp is renamed to options.forceHttps");if(Reflect.has(t,"stripFragment"))throw new Error("options.stripFragment is renamed to options.stripHash");if(e=e.trim(),/^data:/i.test(e))return((e,{stripHash:t})=>{const r=e.match(/^data:(.*?),(.*?)(?:#(.*))?$/);if(!r)throw new Error("Invalid URL: "+e);const A=r[1].split(";"),n=r[2],o=t?"":r[3];let i=!1;"base64"===A[A.length-1]&&(A.pop(),i=!0);const s=(A.shift()||"").toLowerCase(),a=[...A.map(e=>{let[t,r=""]=e.split("=").map(e=>e.trim());return"charset"===t&&(r=r.toLowerCase(),"us-ascii"===r)?"":`${t}${r?"="+r:""}`}).filter(Boolean)];return i&&a.push("base64"),(0!==a.length||s&&"text/plain"!==s)&&a.unshift(s),`data:${a.join(";")},${i?n.trim():n}${o?"#"+o:""}`})(e,t);const r=e.startsWith("//");!r&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const o=new A(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&"https:"===o.protocol&&(o.protocol="http:"),t.forceHttps&&"http:"===o.protocol&&(o.protocol="https:"),t.stripAuthentication&&(o.username="",o.password=""),t.stripHash&&(o.hash=""),o.pathname&&(o.pathname=o.pathname.replace(/((?!:).|^)\/{2,}/g,(e,t)=>/^(?!\/)/g.test(t)?t+"/":"/")),o.pathname&&(o.pathname=decodeURI(o.pathname)),!0===t.removeDirectoryIndex&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=o.pathname.split("/");const r=e[e.length-1];n(r,t.removeDirectoryIndex)&&(e=e.slice(0,e.length-1),o.pathname=e.slice(1).join("/")+"/")}if(o.hostname&&(o.hostname=o.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(o.hostname)&&(o.hostname=o.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const e of[...o.searchParams.keys()])n(e,t.removeQueryParameters)&&o.searchParams.delete(e);return t.sortQueryParameters&&o.searchParams.sort(),t.removeTrailingSlash&&(o.pathname=o.pathname.replace(/\/$/,"")),e=o.toString(),!t.removeTrailingSlash&&"/"!==o.pathname||""!==o.hash||(e=e.replace(/\/$/,"")),r&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e};e.exports=o,e.exports.default=o},91162:(e,t,r)=>{var A=r(98984);function n(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}e.exports=A(n),n.proto=n((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return n(this)},configurable:!0})}))},27180:(e,t,r)=>{var A=r(98984);function n(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}e.exports=A(n),e.exports.strict=A(o),n.proto=n((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return n(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},59351:e=>{"use strict";class t extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}}class r{static fn(e){return(...t)=>new r((r,A,n)=>{t.push(n),e(...t).then(r,A)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((t,r)=>{this._reject=r;const A=e=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(e)};return Object.defineProperties(A,{shouldReject:{get:()=>this._rejectOnCancel,set:e=>{this._rejectOnCancel=e}}}),e(e=>{this._isPending=!1,t(e)},e=>{this._isPending=!1,r(e)},A)})}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(this._isPending&&!this._isCanceled){if(this._cancelHandlers.length>0)try{for(const e of this._cancelHandlers)e()}catch(e){this._reject(e)}this._isCanceled=!0,this._rejectOnCancel&&this._reject(new t(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(r.prototype,Promise.prototype),e.exports=r,e.exports.CancelError=t},61578:(e,t,r)=>{"use strict";const A=r(60550),n=e=>{if(e<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");const t=[];let r=0;const n=()=>{r--,t.length>0&&t.shift()()},o=(e,t,...o)=>{r++;const i=A(e,...o);t(i),i.then(n,n)},i=(A,...n)=>new Promise(i=>((A,n,...i)=>{rr},pendingCount:{get:()=>t.length}}),i};e.exports=n,e.exports.default=n},60550:e=>{"use strict";e.exports=(e,...t)=>new Promise(r=>{r(e(...t))})},37127:e=>{"use strict";const t=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};e.exports=t,e.exports.default=t},5763:(e,t,r)=>{"use strict";const{promisify:A}=r(31669),n=r(35747);async function o(e,t,r){if("string"!=typeof r)throw new TypeError("Expected a string, got "+typeof r);try{return(await A(n[e])(r))[t]()}catch(e){if("ENOENT"===e.code)return!1;throw e}}function i(e,t,r){if("string"!=typeof r)throw new TypeError("Expected a string, got "+typeof r);try{return n[e](r)[t]()}catch(e){if("ENOENT"===e.code)return!1;throw e}}t.isFile=o.bind(null,"stat","isFile"),t.isDirectory=o.bind(null,"stat","isDirectory"),t.isSymlink=o.bind(null,"lstat","isSymbolicLink"),t.isFileSync=i.bind(null,"statSync","isFile"),t.isDirectorySync=i.bind(null,"statSync","isDirectory"),t.isSymlinkSync=i.bind(null,"lstatSync","isSymbolicLink")},54722:(e,t,r)=>{"use strict";e.exports=r(18828)},71086:(e,t,r)=>{"use strict";const A=r(85622),n={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:"[^/]",END_ANCHOR:"(?:\\/|$)",DOTS_SLASH:"\\.{1,2}(?:\\/|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|\\/)\\.{1,2}(?:\\/|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:\\/|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:\\/|$))",QMARK_NO_DOT:"[^.\\/]",STAR:"[^/]*?",START_ANCHOR:"(?:^|\\/)"},o={...n,SLASH_LITERAL:"[\\\\/]",QMARK:"[^\\\\/]",STAR:"[^\\\\/]*?",DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)"};e.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:A.sep,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?o:n}},47974:(e,t,r)=>{"use strict";const A=r(71086),n=r(3598),{MAX_LENGTH:o,POSIX_REGEX_SOURCE:i,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:a,REPLACEMENTS:c}=A,g=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map(e=>n.escapeRegex(e)).join("..")}return r},l=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,u=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");e=c[e]||e;const r={...t},u="number"==typeof r.maxLength?Math.min(o,r.maxLength):o;let h=e.length;if(h>u)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${u}`);const p={type:"bos",value:"",output:r.prepend||""},d=[p],C=r.capture?"":"?:",f=n.isWindows(t),I=A.globChars(f),E=A.extglobChars(I),{DOT_LITERAL:B,PLUS_LITERAL:y,SLASH_LITERAL:m,ONE_CHAR:w,DOTS_SLASH:Q,NO_DOT:D,NO_DOT_SLASH:b,NO_DOTS_SLASH:v,QMARK:S,QMARK_NO_DOT:k,STAR:N,START_ANCHOR:F}=I,K=e=>`(${C}(?:(?!${F}${e.dot?Q:B}).)*?)`,M=r.dot?"":D,R=r.dot?S:k;let x=!0===r.bash?K(r):N;r.capture&&(x=`(${x})`),"boolean"==typeof r.noext&&(r.noextglob=r.noext);const L={input:e,index:-1,start:0,dot:!0===r.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:d};e=n.removePrefix(e,L),h=e.length;const P=[],O=[],U=[];let T,j=p;const Y=()=>L.index===h-1,G=L.peek=(t=1)=>e[L.index+t],H=L.advance=()=>e[++L.index],J=()=>e.slice(L.index+1),q=(e="",t=0)=>{L.consumed+=e,L.index+=t},z=e=>{L.output+=null!=e.output?e.output:e.value,q(e.value)},W=()=>{let e=1;for(;"!"===G()&&("("!==G(2)||"?"===G(3));)H(),L.start++,e++;return e%2!=0&&(L.negated=!0,L.start++,!0)},X=e=>{L[e]++,U.push(e)},V=e=>{L[e]--,U.pop()},_=e=>{if("globstar"===j.type){const t=L.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||P.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(L.output=L.output.slice(0,-j.output.length),j.type="star",j.value="*",j.output=x,L.output+=j.output)}if(P.length&&"paren"!==e.type&&!E[e.value]&&(P[P.length-1].inner+=e.value),(e.value||e.output)&&z(e),j&&"text"===j.type&&"text"===e.type)return j.value+=e.value,void(j.output=(j.output||"")+e.value);e.prev=j,d.push(e),j=e},Z=(e,t)=>{const A={...E[t],conditions:1,inner:""};A.prev=j,A.parens=L.parens,A.output=L.output;const n=(r.capture?"(":"")+A.open;X("parens"),_({type:e,value:t,output:L.output?"":w}),_({type:"paren",extglob:!0,value:H(),output:n}),P.push(A)},$=e=>{let t=e.close+(r.capture?")":"");if("negate"===e.type){let A=x;e.inner&&e.inner.length>1&&e.inner.includes("/")&&(A=K(r)),(A!==x||Y()||/^\)+$/.test(J()))&&(t=e.close=")$))"+A),"bos"===e.prev.type&&Y()&&(L.negatedExtglob=!0)}_({type:"paren",extglob:!0,value:T,output:t}),V("parens")};if(!1!==r.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let A=!1,o=e.replace(a,(e,t,r,n,o,i)=>"\\"===n?(A=!0,e):"?"===n?t?t+n+(o?S.repeat(o.length):""):0===i?R+(o?S.repeat(o.length):""):S.repeat(r.length):"."===n?B.repeat(r.length):"*"===n?t?t+n+(o?x:""):x:t?e:"\\"+e);return!0===A&&(o=!0===r.unescape?o.replace(/\\/g,""):o.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),o===e&&!0===r.contains?(L.output=e,L):(L.output=n.wrapOutput(o,L,t),L)}for(;!Y();){if(T=H(),"\0"===T)continue;if("\\"===T){const e=G();if("/"===e&&!0!==r.bash)continue;if("."===e||";"===e)continue;if(!e){T+="\\",_({type:"text",value:T});continue}const t=/^\\+/.exec(J());let A=0;if(t&&t[0].length>2&&(A=t[0].length,L.index+=A,A%2!=0&&(T+="\\")),!0===r.unescape?T=H()||"":T+=H()||"",0===L.brackets){_({type:"text",value:T});continue}}if(L.brackets>0&&("]"!==T||"["===j.value||"[^"===j.value)){if(!1!==r.posix&&":"===T){const e=j.value.slice(1);if(e.includes("[")&&(j.posix=!0,e.includes(":"))){const e=j.value.lastIndexOf("["),t=j.value.slice(0,e),r=j.value.slice(e+2),A=i[r];if(A){j.value=t+A,L.backtrack=!0,H(),p.output||1!==d.indexOf(j)||(p.output=w);continue}}}("["===T&&":"!==G()||"-"===T&&"]"===G())&&(T="\\"+T),"]"!==T||"["!==j.value&&"[^"!==j.value||(T="\\"+T),!0===r.posix&&"!"===T&&"["===j.value&&(T="^"),j.value+=T,z({value:T});continue}if(1===L.quotes&&'"'!==T){T=n.escapeRegex(T),j.value+=T,z({value:T});continue}if('"'===T){L.quotes=1===L.quotes?0:1,!0===r.keepQuotes&&_({type:"text",value:T});continue}if("("===T){X("parens"),_({type:"paren",value:T});continue}if(")"===T){if(0===L.parens&&!0===r.strictBrackets)throw new SyntaxError(l("opening","("));const e=P[P.length-1];if(e&&L.parens===e.parens+1){$(P.pop());continue}_({type:"paren",value:T,output:L.parens?")":"\\)"}),V("parens");continue}if("["===T){if(!0!==r.nobracket&&J().includes("]"))X("brackets");else{if(!0!==r.nobracket&&!0===r.strictBrackets)throw new SyntaxError(l("closing","]"));T="\\"+T}_({type:"bracket",value:T});continue}if("]"===T){if(!0===r.nobracket||j&&"bracket"===j.type&&1===j.value.length){_({type:"text",value:T,output:"\\"+T});continue}if(0===L.brackets){if(!0===r.strictBrackets)throw new SyntaxError(l("opening","["));_({type:"text",value:T,output:"\\"+T});continue}V("brackets");const e=j.value.slice(1);if(!0===j.posix||"^"!==e[0]||e.includes("/")||(T="/"+T),j.value+=T,z({value:T}),!1===r.literalBrackets||n.hasRegexChars(e))continue;const t=n.escapeRegex(j.value);if(L.output=L.output.slice(0,-j.value.length),!0===r.literalBrackets){L.output+=t,j.value=t;continue}j.value=`(${C}${t}|${j.value})`,L.output+=j.value;continue}if("{"===T&&!0!==r.nobrace){X("braces");const e={type:"brace",value:T,output:"(",outputIndex:L.output.length,tokensIndex:L.tokens.length};O.push(e),_(e);continue}if("}"===T){const e=O[O.length-1];if(!0===r.nobrace||!e){_({type:"text",value:T,output:T});continue}let t=")";if(!0===e.dots){const e=d.slice(),A=[];for(let t=e.length-1;t>=0&&(d.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&A.unshift(e[t].value);t=g(A,r),L.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const r=L.output.slice(0,e.outputIndex),A=L.tokens.slice(e.tokensIndex);e.value=e.output="\\{",T=t="\\}",L.output=r;for(const e of A)L.output+=e.output||e.value}_({type:"brace",value:T,output:t}),V("braces"),O.pop();continue}if("|"===T){P.length>0&&P[P.length-1].conditions++,_({type:"text",value:T});continue}if(","===T){let e=T;const t=O[O.length-1];t&&"braces"===U[U.length-1]&&(t.comma=!0,e="|"),_({type:"comma",value:T,output:e});continue}if("/"===T){if("dot"===j.type&&L.index===L.start+1){L.start=L.index+1,L.consumed="",L.output="",d.pop(),j=p;continue}_({type:"slash",value:T,output:m});continue}if("."===T){if(L.braces>0&&"dot"===j.type){"."===j.value&&(j.output=B);const e=O[O.length-1];j.type="dots",j.output+=T,j.value+=T,e.dots=!0;continue}if(L.braces+L.parens===0&&"bos"!==j.type&&"slash"!==j.type){_({type:"text",value:T,output:B});continue}_({type:"dot",value:T,output:B});continue}if("?"===T){if(!(j&&"("===j.value)&&!0!==r.noextglob&&"("===G()&&"?"!==G(2)){Z("qmark",T);continue}if(j&&"paren"===j.type){const e=G();let t=T;if("<"===e&&!n.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===j.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(J()))&&(t="\\"+T),_({type:"text",value:T,output:t});continue}if(!0!==r.dot&&("slash"===j.type||"bos"===j.type)){_({type:"qmark",value:T,output:k});continue}_({type:"qmark",value:T,output:S});continue}if("!"===T){if(!0!==r.noextglob&&"("===G()&&("?"!==G(2)||!/[!=<:]/.test(G(3)))){Z("negate",T);continue}if(!0!==r.nonegate&&0===L.index){W();continue}}if("+"===T){if(!0!==r.noextglob&&"("===G()&&"?"!==G(2)){Z("plus",T);continue}if(j&&"("===j.value||!1===r.regex){_({type:"plus",value:T,output:y});continue}if(j&&("bracket"===j.type||"paren"===j.type||"brace"===j.type)||L.parens>0){_({type:"plus",value:T});continue}_({type:"plus",value:y});continue}if("@"===T){if(!0!==r.noextglob&&"("===G()&&"?"!==G(2)){_({type:"at",extglob:!0,value:T,output:""});continue}_({type:"text",value:T});continue}if("*"!==T){"$"!==T&&"^"!==T||(T="\\"+T);const e=s.exec(J());e&&(T+=e[0],L.index+=e[0].length),_({type:"text",value:T});continue}if(j&&("globstar"===j.type||!0===j.star)){j.type="star",j.star=!0,j.value+=T,j.output=x,L.backtrack=!0,L.globstar=!0,q(T);continue}let t=J();if(!0!==r.noextglob&&/^\([^?]/.test(t)){Z("star",T);continue}if("star"===j.type){if(!0===r.noglobstar){q(T);continue}const A=j.prev,n=A.prev,o="slash"===A.type||"bos"===A.type,i=n&&("star"===n.type||"globstar"===n.type);if(!0===r.bash&&(!o||t[0]&&"/"!==t[0])){_({type:"star",value:T,output:""});continue}const s=L.braces>0&&("comma"===A.type||"brace"===A.type),a=P.length&&("pipe"===A.type||"paren"===A.type);if(!o&&"paren"!==A.type&&!s&&!a){_({type:"star",value:T,output:""});continue}for(;"/**"===t.slice(0,3);){const r=e[L.index+4];if(r&&"/"!==r)break;t=t.slice(3),q("/**",3)}if("bos"===A.type&&Y()){j.type="globstar",j.value+=T,j.output=K(r),L.output=j.output,L.globstar=!0,q(T);continue}if("slash"===A.type&&"bos"!==A.prev.type&&!i&&Y()){L.output=L.output.slice(0,-(A.output+j.output).length),A.output="(?:"+A.output,j.type="globstar",j.output=K(r)+(r.strictSlashes?")":"|$)"),j.value+=T,L.globstar=!0,L.output+=A.output+j.output,q(T);continue}if("slash"===A.type&&"bos"!==A.prev.type&&"/"===t[0]){const e=void 0!==t[1]?"|$":"";L.output=L.output.slice(0,-(A.output+j.output).length),A.output="(?:"+A.output,j.type="globstar",j.output=`${K(r)}${m}|${m}${e})`,j.value+=T,L.output+=A.output+j.output,L.globstar=!0,q(T+H()),_({type:"slash",value:"/",output:""});continue}if("bos"===A.type&&"/"===t[0]){j.type="globstar",j.value+=T,j.output=`(?:^|${m}|${K(r)}${m})`,L.output=j.output,L.globstar=!0,q(T+H()),_({type:"slash",value:"/",output:""});continue}L.output=L.output.slice(0,-j.output.length),j.type="globstar",j.output=K(r),j.value+=T,L.output+=j.output,L.globstar=!0,q(T);continue}const A={type:"star",value:T,output:x};!0!==r.bash?!j||"bracket"!==j.type&&"paren"!==j.type||!0!==r.regex?(L.index!==L.start&&"slash"!==j.type&&"dot"!==j.type||("dot"===j.type?(L.output+=b,j.output+=b):!0===r.dot?(L.output+=v,j.output+=v):(L.output+=M,j.output+=M),"*"!==G()&&(L.output+=w,j.output+=w)),_(A)):(A.output=T,_(A)):(A.output=".*?","bos"!==j.type&&"slash"!==j.type||(A.output=M+A.output),_(A))}for(;L.brackets>0;){if(!0===r.strictBrackets)throw new SyntaxError(l("closing","]"));L.output=n.escapeLast(L.output,"["),V("brackets")}for(;L.parens>0;){if(!0===r.strictBrackets)throw new SyntaxError(l("closing",")"));L.output=n.escapeLast(L.output,"("),V("parens")}for(;L.braces>0;){if(!0===r.strictBrackets)throw new SyntaxError(l("closing","}"));L.output=n.escapeLast(L.output,"{"),V("braces")}if(!0===r.strictSlashes||"star"!==j.type&&"bracket"!==j.type||_({type:"maybe_slash",value:"",output:m+"?"}),!0===L.backtrack){L.output="";for(const e of L.tokens)L.output+=null!=e.output?e.output:e.value,e.suffix&&(L.output+=e.suffix)}return L};u.fastpaths=(e,t)=>{const r={...t},i="number"==typeof r.maxLength?Math.min(o,r.maxLength):o,s=e.length;if(s>i)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${i}`);e=c[e]||e;const a=n.isWindows(t),{DOT_LITERAL:g,SLASH_LITERAL:l,ONE_CHAR:u,DOTS_SLASH:h,NO_DOT:p,NO_DOTS:d,NO_DOTS_SLASH:C,STAR:f,START_ANCHOR:I}=A.globChars(a),E=r.dot?d:p,B=r.dot?C:p,y=r.capture?"":"?:";let m=!0===r.bash?".*?":f;r.capture&&(m=`(${m})`);const w=e=>!0===e.noglobstar?m:`(${y}(?:(?!${I}${e.dot?h:g}).)*?)`,Q=e=>{switch(e){case"*":return`${E}${u}${m}`;case".*":return`${g}${u}${m}`;case"*.*":return`${E}${m}${g}${u}${m}`;case"*/*":return`${E}${m}${l}${u}${B}${m}`;case"**":return E+w(r);case"**/*":return`(?:${E}${w(r)}${l})?${B}${u}${m}`;case"**/*.*":return`(?:${E}${w(r)}${l})?${B}${m}${g}${u}${m}`;case"**/.*":return`(?:${E}${w(r)}${l})?${g}${u}${m}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const r=Q(t[1]);if(!r)return;return r+g+t[2]}}},D=n.removePrefix(e,{negated:!1,prefix:""});let b=Q(D);return b&&!0!==r.strictSlashes&&(b+=l+"?"),b},e.exports=u},18828:(e,t,r)=>{"use strict";const A=r(85622),n=r(95321),o=r(47974),i=r(3598),s=r(71086),a=(e,t,r=!1)=>{if(Array.isArray(e)){const A=e.map(e=>a(e,t,r));return e=>{for(const t of A){const r=t(e);if(r)return r}return!1}}const A=(n=e)&&"object"==typeof n&&!Array.isArray(n)&&e.tokens&&e.input;var n;if(""===e||"string"!=typeof e&&!A)throw new TypeError("Expected pattern to be a non-empty string");const o=t||{},s=i.isWindows(t),c=A?a.compileRe(e,t):a.makeRe(e,t,!1,!0),g=c.state;delete c.state;let l=()=>!1;if(o.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};l=a(o.ignore,e,r)}const u=(r,A=!1)=>{const{isMatch:n,match:i,output:u}=a.test(r,c,t,{glob:e,posix:s}),h={glob:e,state:g,regex:c,posix:s,input:r,output:u,match:i,isMatch:n};return"function"==typeof o.onResult&&o.onResult(h),!1===n?(h.isMatch=!1,!!A&&h):l(r)?("function"==typeof o.onIgnore&&o.onIgnore(h),h.isMatch=!1,!!A&&h):("function"==typeof o.onMatch&&o.onMatch(h),!A||h)};return r&&(u.state=g),u};a.test=(e,t,r,{glob:A,posix:n}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const o=r||{},s=o.format||(n?i.toPosixSlashes:null);let c=e===A,g=c&&s?s(e):e;return!1===c&&(g=s?s(e):e,c=g===A),!1!==c&&!0!==o.capture||(c=!0===o.matchBase||!0===o.basename?a.matchBase(e,t,r,n):t.exec(g)),{isMatch:Boolean(c),match:c,output:g}},a.matchBase=(e,t,r,n=i.isWindows(r))=>(t instanceof RegExp?t:a.makeRe(t,r)).test(A.basename(e)),a.isMatch=(e,t,r)=>a(t,r)(e),a.parse=(e,t)=>Array.isArray(e)?e.map(e=>a.parse(e,t)):o(e,{...t,fastpaths:!1}),a.scan=(e,t)=>n(e,t),a.compileRe=(e,t,r=!1,A=!1)=>{if(!0===r)return e.output;const n=t||{},o=n.contains?"":"^",i=n.contains?"":"$";let s=`${o}(?:${e.output})${i}`;e&&!0===e.negated&&(s=`^(?!${s}).*$`);const c=a.toRegex(s,t);return!0===A&&(c.state=e),c},a.makeRe=(e,t,r=!1,A=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");const n=t||{};let i,s={negated:!1,fastpaths:!0},c="";return e.startsWith("./")&&(e=e.slice(2),c=s.prefix="./"),!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(i=o.fastpaths(e,t)),void 0===i?(s=o(e,t),s.prefix=c+(s.prefix||"")):s.output=i,a.compileRe(s,t,r,A)},a.toRegex=(e,t)=>{try{const r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},a.constants=s,e.exports=a},95321:(e,t,r)=>{"use strict";const A=r(3598),{CHAR_ASTERISK:n,CHAR_AT:o,CHAR_BACKWARD_SLASH:i,CHAR_COMMA:s,CHAR_DOT:a,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:g,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:p,CHAR_QUESTION_MARK:d,CHAR_RIGHT_CURLY_BRACE:C,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:I}=r(71086),E=e=>e===g||e===i,B=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};e.exports=(e,t)=>{const r=t||{},y=e.length-1,m=!0===r.parts||!0===r.scanToEnd,w=[],Q=[],D=[];let b,v,S=e,k=-1,N=0,F=0,K=!1,M=!1,R=!1,x=!1,L=!1,P=!1,O=!1,U=!1,T=!1,j=0,Y={value:"",depth:0,isGlob:!1};const G=()=>k>=y,H=()=>(b=v,S.charCodeAt(++k));for(;k0&&(q=S.slice(0,N),S=S.slice(N),F-=N),J&&!0===R&&F>0?(J=S.slice(0,F),z=S.slice(F)):!0===R?(J="",z=S):J=S,J&&""!==J&&"/"!==J&&J!==S&&E(J.charCodeAt(J.length-1))&&(J=J.slice(0,-1)),!0===r.unescape&&(z&&(z=A.removeBackslashes(z)),J&&!0===O&&(J=A.removeBackslashes(J)));const W={prefix:q,input:e,start:N,base:J,glob:z,isBrace:K,isBracket:M,isGlob:R,isExtglob:x,isGlobstar:L,negated:U};if(!0===r.tokens&&(W.maxDepth=0,E(v)||Q.push(Y),W.tokens=Q),!0===r.parts||!0===r.tokens){let t;for(let A=0;A{"use strict";const A=r(85622),n="win32"===process.platform,{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:a}=r(71086);t.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),t.hasRegexChars=e=>s.test(e),t.isRegexChar=e=>1===e.length&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(a,"\\$1"),t.toPosixSlashes=e=>e.replace(o,"/"),t.removeBackslashes=e=>e.replace(i,e=>"\\"===e?"":e),t.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);return 3===e.length&&e[0]>=9||8===e[0]&&e[1]>=10},t.isWindows=e=>e&&"boolean"==typeof e.windows?e.windows:!0===n||"\\"===A.sep,t.escapeLast=(e,r,A)=>{const n=e.lastIndexOf(r,A);return-1===n?e:"\\"===e[n-1]?t.escapeLast(e,r,n-1):`${e.slice(0,n)}\\${e.slice(n)}`},t.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},t.wrapOutput=(e,t={},r={})=>{let A=`${r.contains?"":"^"}(?:${e})${r.contains?"":"$"}`;return!0===t.negated&&(A=`(?:^(?!${A}).*$)`),A}},79588:e=>{"use strict";function t(e){this._maxSize=e,this.clear()}t.prototype.clear=function(){this._size=0,this._values={}},t.prototype.get=function(e){return this._values[e]},t.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),this._values.hasOwnProperty(e)||this._size++,this._values[e]=t};var r=/[^.^\]^[]+|(?=\[\]|\.\.)/g,A=/^\d+$/,n=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,s=!1,a=new t(512),c=new t(512),g=new t(512);try{new Function("")}catch(e){s=!0}function l(e){return a.get(e)||a.set(e,u(e).map((function(e){return e.replace(i,"$2")})))}function u(e){return e.match(r)}function h(e,t,r){return"string"==typeof t&&(r=t,t=!1),r=r||"data",(e=e||"")&&"["!==e.charAt(0)&&(e="."+e),t?function(e,t){var r,A=t,n=u(e);return p(n,(function(e,t,n,o,i){r=o===i.length-1,A+=(e=t||n?"["+e+"]":"."+e)+(r?")":" || {})")})),new Array(n.length+1).join("(")+A}(e,r):r+e}function p(e,t,r){var A,n,o,i,s=e.length;for(n=0;n{var A=r(91162),n=r(97681),o=r(35747),i=function(){},s=/^v?\.0/.test(process.version),a=function(e){return"function"==typeof e},c=function(e,t,r,c){c=A(c);var g=!1;e.on("close",(function(){g=!0})),n(e,{readable:t,writable:r},(function(e){if(e)return c(e);g=!0,c()}));var l=!1;return function(t){if(!g&&!l)return l=!0,function(e){return!!s&&(!!o&&((e instanceof(o.ReadStream||i)||e instanceof(o.WriteStream||i))&&a(e.close)))}(e)?e.close(i):function(e){return e.setHeader&&a(e.abort)}(e)?e.abort():a(e.destroy)?e.destroy():void c(t||new Error("stream was destroyed"))}},g=function(e){e()},l=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=a(t[t.length-1]||i)&&t.pop()||i;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var A=t.map((function(n,o){var i=o0,(function(t){e||(e=t),t&&A.forEach(g),i||(A.forEach(g),r(e))}))}));return t.reduce(l)}},49601:e=>{"use strict";class t{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){if(this.cache.set(e,t),this._size++,this._size>=this.maxSize){if(this._size=0,"function"==typeof this.onEviction)for(const[e,t]of this.oldCache.entries())this.onEviction(e,t);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}}e.exports=t},20663:e=>{"use strict";const t={};function r(e,r,A){A||(A=Error);class n extends A{constructor(e,t,A){super(function(e,t,A){return"string"==typeof r?r:r(e,t,A)}(e,t,A))}}n.prototype.name=A.name,n.prototype.code=e,t[e]=n}function A(e,t){if(Array.isArray(e)){const r=e.length;return e=e.map(e=>String(e)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){let n;var o,i;let s;if("string"==typeof t&&(o="not ",t.substr(!i||i<0?0:+i,o.length)===o)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s=`The ${e} ${n} ${A(t,"type")}`;else{s=`The "${e}" ${function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument"} ${n} ${A(t,"type")}`}return s+=". Received type "+typeof r,s}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},39138:e=>{"use strict";var t=new Set;e.exports.emitExperimentalWarning=process.emitWarning?function(e){if(!t.has(e)){var r=e+" is an experimental feature. This feature could change at any time";t.add(e),process.emitWarning(r,"ExperimentalWarning")}}:function(){}},72434:(e,t,r)=>{"use strict";var A=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var n=r(58020),o=r(6729);r(85870)(c,n);for(var i=A(o.prototype),s=0;s{"use strict";e.exports=n;var A=r(54801);function n(e){if(!(this instanceof n))return new n(e);A.call(this,e)}r(85870)(n,A),n.prototype._transform=function(e,t,r){r(null,e)}},58020:(e,t,r)=>{"use strict";var A;e.exports=w,w.ReadableState=m;r(28614).EventEmitter;var n=function(e,t){return e.listeners(t).length},o=r(49298),i=r(64293).Buffer,s=global.Uint8Array||function(){};var a,c=r(31669);a=c&&c.debuglog?c.debuglog("stream"):function(){};var g,l,u=r(43117),h=r(32340),p=r(77433).getHighWaterMark,d=r(20663).q,C=d.ERR_INVALID_ARG_TYPE,f=d.ERR_STREAM_PUSH_AFTER_EOF,I=d.ERR_METHOD_NOT_IMPLEMENTED,E=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,B=r(39138).emitExperimentalWarning;r(85870)(w,o);var y=["error","close","destroy","pause","resume"];function m(e,t,n){A=A||r(72434),e=e||{},"boolean"!=typeof n&&(n=t instanceof A),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,"readableHighWaterMark",n),this.buffer=new u,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(g||(g=r(69538).s),this.decoder=new g(e.encoding),this.encoding=e.encoding)}function w(e){if(A=A||r(72434),!(this instanceof w))return new w(e);var t=this instanceof A;this._readableState=new m(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function Q(e,t,r,A,n){a("readableAddChunk",t);var o,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?v(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,S(e)))}(e,c);else if(n||(o=function(e,t){var r;A=t,i.isBuffer(A)||A instanceof s||"string"==typeof t||void 0===t||e.objectMode||(r=new C("chunk",["string","Buffer","Uint8Array"],t));var A;return r}(c,t)),o)e.emit("error",o);else if(c.objectMode||t&&t.length>0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===i.prototype||(t=function(e){return i.from(e)}(t)),A)c.endEmitted?e.emit("error",new E):D(e,c,t,!0);else if(c.ended)e.emit("error",new f);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?D(e,c,t,!1):k(e,c)):D(e,c,t,!1)}else A||(c.reading=!1,k(e,c));return!c.ended&&(c.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function v(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(S,e))}function S(e){var t=e._readableState;a("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||e.emit("readable"),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,R(e)}function k(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(N,e,t))}function N(e,t){for(var r=t.length;!t.reading&&!t.ended&&t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function K(e){a("readable nexttick read 0"),e.read(0)}function M(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),R(e),t.flowing&&!t.reading&&e.read(0)}function R(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function x(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function L(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(P,t,e))}function P(e,t){a("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function O(e,t){for(var r=0,A=e.length;r=t.highWaterMark:t.length>0)||t.ended))return a("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):v(this),null;if(0===(e=b(e,t))&&t.ended)return 0===t.length&&L(this),null;var A,n=t.needReadable;return a("need readable",n),(0===t.length||t.length-e0?x(e,t):null)?(t.needReadable=!0,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==A&&this.emit("data",A),A},w.prototype._read=function(e){this.emit("error",new I("_read()"))},w.prototype.pipe=function(e,t){var r=this,A=this._readableState;switch(A.pipesCount){case 0:A.pipes=e;break;case 1:A.pipes=[A.pipes,e];break;default:A.pipes.push(e)}A.pipesCount+=1,a("pipe count=%d opts=%j",A.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?s:d;function i(t,n){a("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,a("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",u),e.removeListener("unpipe",i),r.removeListener("end",s),r.removeListener("end",d),r.removeListener("data",l),g=!0,!A.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function s(){a("onend"),e.end()}A.endEmitted?process.nextTick(o):r.once("end",o),e.on("unpipe",i);var c=function(e){return function(){var t=e._readableState;a("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&n(e,"data")&&(t.flowing=!0,R(e))}}(r);e.on("drain",c);var g=!1;function l(t){a("ondata");var n=e.write(t);a("dest.write",n),!1===n&&((1===A.pipesCount&&A.pipes===e||A.pipesCount>1&&-1!==O(A.pipes,e))&&!g&&(a("false write response, pause",A.awaitDrain),A.awaitDrain++),r.pause())}function u(t){a("onerror",t),d(),e.removeListener("error",u),0===n(e,"error")&&e.emit("error",t)}function h(){e.removeListener("finish",p),d()}function p(){a("onfinish"),e.removeListener("close",h),d()}function d(){a("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",u),e.once("close",h),e.once("finish",p),e.emit("pipe",r),A.flowing||(a("pipe resume"),r.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var A=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==A.flowing&&this.resume()):"readable"===e&&(A.endEmitted||A.readableListening||(A.readableListening=A.needReadable=!0,A.flowing=!1,A.emittedReadable=!1,a("on readable",A.length,A.reading),A.length?v(this):A.reading||process.nextTick(K,this))),r},w.prototype.addListener=w.prototype.on,w.prototype.removeListener=function(e,t){var r=o.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(F,this),r},w.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(F,this),t},w.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(M,e,t))}(this,e)),e.paused=!1,this},w.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},w.prototype.wrap=function(e){var t=this,r=this._readableState,A=!1;for(var n in e.on("end",(function(){if(a("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(a("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(t.push(n)||(A=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var o=0;o{"use strict";e.exports=g;var A=r(20663).q,n=A.ERR_METHOD_NOT_IMPLEMENTED,o=A.ERR_MULTIPLE_CALLBACK,i=A.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=A.ERR_TRANSFORM_WITH_LENGTH_0,a=r(72434);function c(e,t){var r=this._transformState;r.transforming=!1;var A=r.writecb;if(null===A)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),A(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length{"use strict";function A(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var A=e.entry;e.entry=null;for(;A;){var n=A.callback;t.pendingcb--,n(r),A=A.next}t.corkedRequestsFree.next=e}(t,e)}}var n;e.exports=w,w.WritableState=m;var o={deprecate:r(73212)},i=r(49298),s=r(64293).Buffer,a=global.Uint8Array||function(){};var c,g=r(32340),l=r(77433).getHighWaterMark,u=r(20663).q,h=u.ERR_INVALID_ARG_TYPE,p=u.ERR_METHOD_NOT_IMPLEMENTED,d=u.ERR_MULTIPLE_CALLBACK,C=u.ERR_STREAM_CANNOT_PIPE,f=u.ERR_STREAM_DESTROYED,I=u.ERR_STREAM_NULL_VALUES,E=u.ERR_STREAM_WRITE_AFTER_END,B=u.ERR_UNKNOWN_ENCODING;function y(){}function m(e,t,o){n=n||r(72434),e=e||{},"boolean"!=typeof o&&(o=t instanceof n),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=l(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,A=r.sync,n=r.writecb;if("function"!=typeof n)throw new d;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,A,n){--t.pendingcb,r?(process.nextTick(n,A),process.nextTick(k,e,t),e._writableState.errorEmitted=!0,e.emit("error",A)):(n(A),e._writableState.errorEmitted=!0,e.emit("error",A),k(e,t))}(e,r,A,t,n);else{var o=v(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||b(e,r),A?process.nextTick(D,e,r,o,n):D(e,r,o,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.bufferedRequestCount=0,this.corkedRequestsFree=new A(this)}function w(e){var t=this instanceof(n=n||r(72434));if(!t&&!c.call(w,this))return new w(e);this._writableState=new m(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),i.call(this)}function Q(e,t,r,A,n,o,i){t.writelen=A,t.writecb=i,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new f("write")):r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function D(e,t,r,A){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,A(),k(e,t)}function b(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),i=t.corkedRequestsFree;i.entry=r;for(var s=0,a=!0;r;)o[s]=r,r.isBuf||(a=!1),r=r.next,s+=1;o.allBuffers=a,Q(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new A(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,g=r.encoding,l=r.callback;if(Q(e,t,!1,t.objectMode?1:c.length,c,g,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),k(e,t)}))}function k(e,t){var r=v(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(S,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}r(85870)(w,i),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===w&&(e&&e._writableState instanceof m)}})):c=function(e){return e instanceof this},w.prototype.pipe=function(){this.emit("error",new C)},w.prototype.write=function(e,t,r){var A,n=this._writableState,o=!1,i=!n.objectMode&&(A=e,s.isBuffer(A)||A instanceof a);return i&&!s.isBuffer(e)&&(e=function(e){return s.from(e)}(e)),"function"==typeof t&&(r=t,t=null),i?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=y),n.ending?function(e,t){var r=new E;e.emit("error",r),process.nextTick(t,r)}(this,r):(i||function(e,t,r,A){var n;return null===r?n=new I:"string"==typeof r||t.objectMode||(n=new h("chunk",["string","Buffer"],r)),!n||(e.emit("error",n),process.nextTick(A,n),!1)}(this,n,e,r))&&(n.pendingcb++,o=function(e,t,r,A,n,o){if(!r){var i=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=s.from(t,r));return t}(t,A,n);A!==i&&(r=!0,n="buffer",A=i)}var a=t.objectMode?1:A.length;t.length+=a;var c=t.length-1))throw new B(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(w.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,r){r(new p("_write()"))},w.prototype._writev=null,w.prototype.end=function(e,t,r){var A=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),A.corked&&(A.corked=1,this.uncork()),A.ending||function(e,t,r){t.ending=!0,k(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,A,r),this},Object.defineProperty(w.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(w.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=g.destroy,w.prototype._undestroy=g.undestroy,w.prototype._destroy=function(e,t){t(e)}},4245:(e,t,r)=>{"use strict";var A;function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(91327),i=Symbol("lastResolve"),s=Symbol("lastReject"),a=Symbol("error"),c=Symbol("ended"),g=Symbol("lastPromise"),l=Symbol("handlePromise"),u=Symbol("stream");function h(e,t){return{value:e,done:t}}function p(e){var t=e[i];if(null!==t){var r=e[u].read();null!==r&&(e[g]=null,e[i]=null,e[s]=null,t(h(r,!1)))}}function d(e){process.nextTick(p,e)}var C=Object.getPrototypeOf((function(){})),f=Object.setPrototypeOf((n(A={get stream(){return this[u]},next:function(){var e=this,t=this[a];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(h(null,!0));if(this[u].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[a]?r(e[a]):t(h(null,!0))}))}));var r,A=this[g];if(A)r=new Promise(function(e,t){return function(r,A){e.then((function(){t[l](r,A)}),A)}}(A,this));else{var n=this[u].read();if(null!==n)return Promise.resolve(h(n,!1));r=new Promise(this[l])}return this[g]=r,r}},Symbol.asyncIterator,(function(){return this})),n(A,"return",(function(){var e=this;return new Promise((function(t,r){e[u].destroy(null,(function(e){e?r(e):t(h(null,!0))}))}))})),A),C);e.exports=function(e){var t,r=Object.create(f,(n(t={},u,{value:e,writable:!0}),n(t,i,{value:null,writable:!0}),n(t,s,{value:null,writable:!0}),n(t,a,{value:null,writable:!0}),n(t,c,{value:e._readableState.endEmitted,writable:!0}),n(t,g,{value:null,writable:!0}),n(t,l,{value:function(e,t){var A=r[u].read();A?(r[g]=null,r[i]=null,r[s]=null,e(h(A,!1))):(r[i]=e,r[s]=t)},writable:!0}),t));return o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[g]=null,r[i]=null,r[s]=null,t(e)),void(r[a]=e)}var A=r[i];null!==A&&(r[g]=null,r[i]=null,r[s]=null,A(h(null,!0))),r[c]=!0})),e.on("readable",d.bind(null,r)),r}},43117:(e,t,r)=>{"use strict";function A(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var n=r(64293).Buffer,o=r(31669).inspect,i=o&&o.custom||"inspect";e.exports=function(){function e(){this.head=null,this.tail=null,this.length=0}var t=e.prototype;return t.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},t.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},t.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},t.clear=function(){this.head=this.tail=null,this.length=0},t.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},t.concat=function(e){if(0===this.length)return n.alloc(0);for(var t,r,A,o=n.allocUnsafe(e>>>0),i=this.head,s=0;i;)t=i.data,r=o,A=s,n.prototype.copy.call(t,r,A),s+=i.data.length,i=i.next;return o},t.consume=function(e,t){var r;return en.length?n.length:e;if(o===n.length?A+=n:A+=n.slice(0,e),0===(e-=o)){o===n.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(o));break}++r}return this.length-=r,A},t._getBuffer=function(e){var t=n.allocUnsafe(e),r=this.head,A=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,i=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,i),0===(e-=i)){i===o.length?(++A,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(i));break}++A}return this.length-=A,t},t[i]=function(e,t){return o(this,function(e){for(var t=1;t{"use strict";function t(e,t){A(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function A(e,t){e.emit("error",t)}e.exports={destroy:function(e,n){var o=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?(n?n(e):!e||this._writableState&&this._writableState.errorEmitted||process.nextTick(A,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!n&&e?(process.nextTick(t,o,e),o._writableState&&(o._writableState.errorEmitted=!0)):n?(process.nextTick(r,o),n(e)):process.nextTick(r,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},91327:(e,t,r)=>{"use strict";var A=r(20663).q.ERR_STREAM_PREMATURE_CLOSE;function n(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(r){t||(t=!0,e.call(this,r))}}(o||n);var i=t._writableState,s=t._readableState,a=r.readable||!1!==r.readable&&t.readable,c=r.writable||!1!==r.writable&&t.writable,g=function(){t.writable||l()},l=function(){c=!1,a||o.call(t)},u=function(){a=!1,c||o.call(t)},h=function(e){o.call(t,e)},p=function(){return(!a||s&&s.ended)&&(!c||i&&i.ended)?void 0:o.call(t,new A)},d=function(){t.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?c&&!i&&(t.on("end",g),t.on("close",g)):(t.on("complete",l),t.on("abort",p),t.req?d():t.on("request",d)),t.on("end",u),t.on("finish",l),!1!==r.error&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",d),t.req&&t.req.removeListener("finish",l),t.removeListener("end",g),t.removeListener("close",g),t.removeListener("finish",l),t.removeListener("end",u),t.removeListener("error",h),t.removeListener("close",p)}}},4939:(e,t,r)=>{"use strict";var A;var n=r(20663).q,o=n.ERR_MISSING_ARGS,i=n.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function a(e,t,n,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",(function(){s=!0})),void 0===A&&(A=r(91327)),A(e,{readable:t,writable:n},(function(e){if(e)return o(e);s=!0,o()}));var a=!1;return function(t){if(!s&&!a)return a=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new i("pipe"))}}function c(e){e()}function g(e,t){return e.pipe(t)}function l(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r0,(function(e){A||(A=e),e&&i.forEach(c),o||(i.forEach(c),n(A))}))}));return t.reduce(g)}},77433:(e,t,r)=>{"use strict";var A=r(20663).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,n){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,n,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new A(n?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},49298:(e,t,r)=>{e.exports=r(92413)},86897:(e,t,r)=>{var A=r(92413);"disable"===process.env.READABLE_STREAM&&A?(e.exports=A.Readable,Object.assign(e.exports,A),e.exports.Stream=A):((t=e.exports=r(58020)).Stream=A||t,t.Readable=t,t.Writable=r(6729),t.Duplex=r(72434),t.Transform=r(54801),t.PassThrough=r(52444),t.finished=r(91327),t.pipeline=r(4939))},19476:(e,t,r)=>{"use strict";const A=r(4016);e.exports=(e={})=>new Promise((t,r)=>{const n=A.connect(e,()=>{e.resolveSocket?(n.off("error",r),t({alpnProtocol:n.alpnProtocol,socket:n})):(n.destroy(),t({alpnProtocol:n.alpnProtocol}))});n.on("error",r)})},48491:(e,t,r)=>{"use strict";const A=r(92413).Readable,n=r(55737);e.exports=class extends A{constructor(e,t,r,A){if("number"!=typeof e)throw new TypeError("Argument `statusCode` should be a number");if("object"!=typeof t)throw new TypeError("Argument `headers` should be an object");if(!(r instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if("string"!=typeof A)throw new TypeError("Argument `url` should be a string");super(),this.statusCode=e,this.headers=n(t),this.body=r,this.url=A}_read(){this.push(this.body),this.push(null)}}},2383:e=>{"use strict";e.exports=function(e){var t=new e,r=t;return{get:function(){var A=t;return A.next?t=A.next:(t=new e,r=t),A.next=null,A},release:function(e){r.next=e,r=e}}}},69078:e=>{e.exports=function(e,t){var r,A,n,o=!0;Array.isArray(e)?(r=[],A=e.length):(n=Object.keys(e),r={},A=n.length);function i(e){function A(){t&&t(e,r),t=null}o?process.nextTick(A):A()}function s(e,t,n){r[e]=n,(0==--A||t)&&i(t)}A?n?n.forEach((function(t){e[t]((function(e,r){s(t,e,r)}))})):e.forEach((function(e,t){e((function(e,r){s(t,e,r)}))})):i(null);o=!1}},13499:(e,t,r)=>{var A=r(64293),n=A.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function i(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=A:(o(A,t),t.Buffer=i),o(n,i),i.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var A=n(e);return void 0!==t?"string"==typeof r?A.fill(t,r):A.fill(t):A.fill(0),A},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return A.SlowBuffer(e)}},95584:(e,t)=>{var r;t=e.exports=l,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var A=Number.MAX_SAFE_INTEGER||9007199254740991,n=t.re=[],o=t.src=[],i=t.tokens={},s=0;function a(e){i[e]=s++}a("NUMERICIDENTIFIER"),o[i.NUMERICIDENTIFIER]="0|[1-9]\\d*",a("NUMERICIDENTIFIERLOOSE"),o[i.NUMERICIDENTIFIERLOOSE]="[0-9]+",a("NONNUMERICIDENTIFIER"),o[i.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",a("MAINVERSION"),o[i.MAINVERSION]="("+o[i.NUMERICIDENTIFIER]+")\\.("+o[i.NUMERICIDENTIFIER]+")\\.("+o[i.NUMERICIDENTIFIER]+")",a("MAINVERSIONLOOSE"),o[i.MAINVERSIONLOOSE]="("+o[i.NUMERICIDENTIFIERLOOSE]+")\\.("+o[i.NUMERICIDENTIFIERLOOSE]+")\\.("+o[i.NUMERICIDENTIFIERLOOSE]+")",a("PRERELEASEIDENTIFIER"),o[i.PRERELEASEIDENTIFIER]="(?:"+o[i.NUMERICIDENTIFIER]+"|"+o[i.NONNUMERICIDENTIFIER]+")",a("PRERELEASEIDENTIFIERLOOSE"),o[i.PRERELEASEIDENTIFIERLOOSE]="(?:"+o[i.NUMERICIDENTIFIERLOOSE]+"|"+o[i.NONNUMERICIDENTIFIER]+")",a("PRERELEASE"),o[i.PRERELEASE]="(?:-("+o[i.PRERELEASEIDENTIFIER]+"(?:\\."+o[i.PRERELEASEIDENTIFIER]+")*))",a("PRERELEASELOOSE"),o[i.PRERELEASELOOSE]="(?:-?("+o[i.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+o[i.PRERELEASEIDENTIFIERLOOSE]+")*))",a("BUILDIDENTIFIER"),o[i.BUILDIDENTIFIER]="[0-9A-Za-z-]+",a("BUILD"),o[i.BUILD]="(?:\\+("+o[i.BUILDIDENTIFIER]+"(?:\\."+o[i.BUILDIDENTIFIER]+")*))",a("FULL"),a("FULLPLAIN"),o[i.FULLPLAIN]="v?"+o[i.MAINVERSION]+o[i.PRERELEASE]+"?"+o[i.BUILD]+"?",o[i.FULL]="^"+o[i.FULLPLAIN]+"$",a("LOOSEPLAIN"),o[i.LOOSEPLAIN]="[v=\\s]*"+o[i.MAINVERSIONLOOSE]+o[i.PRERELEASELOOSE]+"?"+o[i.BUILD]+"?",a("LOOSE"),o[i.LOOSE]="^"+o[i.LOOSEPLAIN]+"$",a("GTLT"),o[i.GTLT]="((?:<|>)?=?)",a("XRANGEIDENTIFIERLOOSE"),o[i.XRANGEIDENTIFIERLOOSE]=o[i.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",a("XRANGEIDENTIFIER"),o[i.XRANGEIDENTIFIER]=o[i.NUMERICIDENTIFIER]+"|x|X|\\*",a("XRANGEPLAIN"),o[i.XRANGEPLAIN]="[v=\\s]*("+o[i.XRANGEIDENTIFIER]+")(?:\\.("+o[i.XRANGEIDENTIFIER]+")(?:\\.("+o[i.XRANGEIDENTIFIER]+")(?:"+o[i.PRERELEASE]+")?"+o[i.BUILD]+"?)?)?",a("XRANGEPLAINLOOSE"),o[i.XRANGEPLAINLOOSE]="[v=\\s]*("+o[i.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+o[i.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+o[i.XRANGEIDENTIFIERLOOSE]+")(?:"+o[i.PRERELEASELOOSE]+")?"+o[i.BUILD]+"?)?)?",a("XRANGE"),o[i.XRANGE]="^"+o[i.GTLT]+"\\s*"+o[i.XRANGEPLAIN]+"$",a("XRANGELOOSE"),o[i.XRANGELOOSE]="^"+o[i.GTLT]+"\\s*"+o[i.XRANGEPLAINLOOSE]+"$",a("COERCE"),o[i.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",a("COERCERTL"),n[i.COERCERTL]=new RegExp(o[i.COERCE],"g"),a("LONETILDE"),o[i.LONETILDE]="(?:~>?)",a("TILDETRIM"),o[i.TILDETRIM]="(\\s*)"+o[i.LONETILDE]+"\\s+",n[i.TILDETRIM]=new RegExp(o[i.TILDETRIM],"g");a("TILDE"),o[i.TILDE]="^"+o[i.LONETILDE]+o[i.XRANGEPLAIN]+"$",a("TILDELOOSE"),o[i.TILDELOOSE]="^"+o[i.LONETILDE]+o[i.XRANGEPLAINLOOSE]+"$",a("LONECARET"),o[i.LONECARET]="(?:\\^)",a("CARETTRIM"),o[i.CARETTRIM]="(\\s*)"+o[i.LONECARET]+"\\s+",n[i.CARETTRIM]=new RegExp(o[i.CARETTRIM],"g");a("CARET"),o[i.CARET]="^"+o[i.LONECARET]+o[i.XRANGEPLAIN]+"$",a("CARETLOOSE"),o[i.CARETLOOSE]="^"+o[i.LONECARET]+o[i.XRANGEPLAINLOOSE]+"$",a("COMPARATORLOOSE"),o[i.COMPARATORLOOSE]="^"+o[i.GTLT]+"\\s*("+o[i.LOOSEPLAIN]+")$|^$",a("COMPARATOR"),o[i.COMPARATOR]="^"+o[i.GTLT]+"\\s*("+o[i.FULLPLAIN]+")$|^$",a("COMPARATORTRIM"),o[i.COMPARATORTRIM]="(\\s*)"+o[i.GTLT]+"\\s*("+o[i.LOOSEPLAIN]+"|"+o[i.XRANGEPLAIN]+")",n[i.COMPARATORTRIM]=new RegExp(o[i.COMPARATORTRIM],"g");a("HYPHENRANGE"),o[i.HYPHENRANGE]="^\\s*("+o[i.XRANGEPLAIN]+")\\s+-\\s+("+o[i.XRANGEPLAIN]+")\\s*$",a("HYPHENRANGELOOSE"),o[i.HYPHENRANGELOOSE]="^\\s*("+o[i.XRANGEPLAINLOOSE]+")\\s+-\\s+("+o[i.XRANGEPLAINLOOSE]+")\\s*$",a("STAR"),o[i.STAR]="(<|>)?=?\\s*\\*";for(var c=0;c256)return null;if(!(t.loose?n[i.LOOSE]:n[i.FULL]).test(e))return null;try{return new l(e,t)}catch(e){return null}}function l(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof l){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof l))return new l(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?n[i.LOOSE]:n[i.FULL]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>A||this.major<0)throw new TypeError("Invalid major version");if(this.minor>A||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>A||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,A){"string"==typeof r&&(A=r,r=void 0);try{return new l(e,r).inc(t,A).version}catch(e){return null}},t.diff=function(e,t){if(f(e,t))return null;var r=g(e),A=g(t),n="";if(r.prerelease.length||A.prerelease.length){n="pre";var o="prerelease"}for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==A[i])return n+i;return o},t.compareIdentifiers=h;var u=/^[0-9]+$/;function h(e,t){var r=u.test(e),A=u.test(t);return r&&A&&(e=+e,t=+t),e===t?0:r&&!A?-1:A&&!r?1:e0}function C(e,t,r){return p(e,t,r)<0}function f(e,t,r){return 0===p(e,t,r)}function I(e,t,r){return 0!==p(e,t,r)}function E(e,t,r){return p(e,t,r)>=0}function B(e,t,r){return p(e,t,r)<=0}function y(e,t,r,A){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return f(e,r,A);case"!=":return I(e,r,A);case">":return d(e,r,A);case">=":return E(e,r,A);case"<":return C(e,r,A);case"<=":return B(e,r,A);default:throw new TypeError("Invalid operator: "+t)}}function m(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof m){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof m))return new m(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===w?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return h(t,e)},t.major=function(e,t){return new l(e,t).major},t.minor=function(e,t){return new l(e,t).minor},t.patch=function(e,t){return new l(e,t).patch},t.compare=p,t.compareLoose=function(e,t){return p(e,t,!0)},t.compareBuild=function(e,t,r){var A=new l(e,r),n=new l(t,r);return A.compare(n)||A.compareBuild(n)},t.rcompare=function(e,t,r){return p(t,e,r)},t.sort=function(e,r){return e.sort((function(e,A){return t.compareBuild(e,A,r)}))},t.rsort=function(e,r){return e.sort((function(e,A){return t.compareBuild(A,e,r)}))},t.gt=d,t.lt=C,t.eq=f,t.neq=I,t.gte=E,t.lte=B,t.cmp=y,t.Comparator=m;var w={};function Q(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Q)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Q(e.raw,t);if(e instanceof m)return new Q(e.value,t);if(!(this instanceof Q))return new Q(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function D(e,t){for(var r=!0,A=e.slice(),n=A.pop();r&&A.length;)r=A.every((function(e){return n.intersects(e,t)})),n=A.pop();return r}function b(e){return!e||"x"===e.toLowerCase()||"*"===e}function v(e,t,r,A,n,o,i,s,a,c,g,l,u){return((t=b(r)?"":b(A)?">="+r+".0.0":b(n)?">="+r+"."+A+".0":">="+t)+" "+(s=b(a)?"":b(c)?"<"+(+a+1)+".0.0":b(g)?"<"+a+"."+(+c+1)+".0":l?"<="+a+"."+c+"."+g+"-"+l:"<="+s)).trim()}function S(e,t,A){for(var n=0;n0){var o=e[n].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function k(e,t,r){try{t=new Q(t,r)}catch(e){return!1}return t.test(e)}function N(e,t,r,A){var n,o,i,s,a;switch(e=new l(e,A),t=new Q(t,A),r){case">":n=d,o=B,i=C,s=">",a=">=";break;case"<":n=C,o=E,i=d,s="<",a="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(k(e,t,A))return!1;for(var c=0;c=0.0.0")),u=u||e,h=h||e,n(e.semver,u.semver,A)?u=e:i(e.semver,h.semver,A)&&(h=e)})),u.operator===s||u.operator===a)return!1;if((!h.operator||h.operator===s)&&o(e,h.semver))return!1;if(h.operator===a&&i(e,h.semver))return!1}return!0}m.prototype.parse=function(e){var t=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=w},m.prototype.toString=function(){return this.value},m.prototype.test=function(e){if(r("Comparator.test",e,this.options.loose),this.semver===w||e===w)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return y(e,this.operator,this.semver,this.options)},m.prototype.intersects=function(e,t){if(!(e instanceof m))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(r=new Q(e.value,t),k(this.value,r,t));if(""===e.operator)return""===e.value||(r=new Q(this.value,t),k(e.semver,r,t));var A=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,i=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=y(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),a=y(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return A||n||o&&i||s||a},t.Range=Q,Q.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},Q.prototype.toString=function(){return this.range},Q.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var A=t?n[i.HYPHENRANGELOOSE]:n[i.HYPHENRANGE];e=e.replace(A,v),r("hyphen replace",e),e=e.replace(n[i.COMPARATORTRIM],"$1$2$3"),r("comparator trim",e,n[i.COMPARATORTRIM]),e=(e=(e=e.replace(n[i.TILDETRIM],"$1~")).replace(n[i.CARETTRIM],"$1^")).split(/\s+/).join(" ");var o=t?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var A=t.loose?n[i.CARETLOOSE]:n[i.CARET];return e.replace(A,(function(t,A,n,o,i){var s;return r("caret",e,t,A,n,o,i),b(A)?s="":b(n)?s=">="+A+".0.0 <"+(+A+1)+".0.0":b(o)?s="0"===A?">="+A+"."+n+".0 <"+A+"."+(+n+1)+".0":">="+A+"."+n+".0 <"+(+A+1)+".0.0":i?(r("replaceCaret pr",i),s="0"===A?"0"===n?">="+A+"."+n+"."+o+"-"+i+" <"+A+"."+n+"."+(+o+1):">="+A+"."+n+"."+o+"-"+i+" <"+A+"."+(+n+1)+".0":">="+A+"."+n+"."+o+"-"+i+" <"+(+A+1)+".0.0"):(r("no pr"),s="0"===A?"0"===n?">="+A+"."+n+"."+o+" <"+A+"."+n+"."+(+o+1):">="+A+"."+n+"."+o+" <"+A+"."+(+n+1)+".0":">="+A+"."+n+"."+o+" <"+(+A+1)+".0.0"),r("caret return",s),s}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var A=t.loose?n[i.TILDELOOSE]:n[i.TILDE];return e.replace(A,(function(t,A,n,o,i){var s;return r("tilde",e,t,A,n,o,i),b(A)?s="":b(n)?s=">="+A+".0.0 <"+(+A+1)+".0.0":b(o)?s=">="+A+"."+n+".0 <"+A+"."+(+n+1)+".0":i?(r("replaceTilde pr",i),s=">="+A+"."+n+"."+o+"-"+i+" <"+A+"."+(+n+1)+".0"):s=">="+A+"."+n+"."+o+" <"+A+"."+(+n+1)+".0",r("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var A=t.loose?n[i.XRANGELOOSE]:n[i.XRANGE];return e.replace(A,(function(A,n,o,i,s,a){r("xRange",e,A,n,o,i,s,a);var c=b(o),g=c||b(i),l=g||b(s),u=l;return"="===n&&u&&(n=""),a=t.includePrerelease?"-0":"",c?A=">"===n||"<"===n?"<0.0.0-0":"*":n&&u?(g&&(i=0),s=0,">"===n?(n=">=",g?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",g?o=+o+1:i=+i+1),A=n+o+"."+i+"."+s+a):g?A=">="+o+".0.0"+a+" <"+(+o+1)+".0.0"+a:l&&(A=">="+o+"."+i+".0"+a+" <"+o+"."+(+i+1)+".0"+a),r("xRange return",A),A}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(n[i.STAR],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s=s.map((function(e){return new m(e,this.options)}),this)},Q.prototype.intersects=function(e,t){if(!(e instanceof Q))throw new TypeError("a Range is required");return this.set.some((function(r){return D(r,t)&&e.set.some((function(e){return D(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new Q(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},Q.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!d(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r))return r;return null},t.validRange=function(e,t){try{return new Q(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return N(e,t,"<",r)},t.gtr=function(e,t,r){return N(e,t,">",r)},t.outside=N,t.prerelease=function(e,t){var r=g(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new Q(e,r),t=new Q(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof l)return e;"number"==typeof e&&(e=String(e));if("string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var A;(A=n[i.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&A.index+A[0].length===r.index+r[0].length||(r=A),n[i.COERCERTL].lastIndex=A.index+A[1].length+A[2].length;n[i.COERCERTL].lastIndex=-1}else r=e.match(n[i.COERCE]);if(null===r)return null;return g(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}},29069:(e,t,r)=>{const A=Symbol("SemVer ANY");class n{static get ANY(){return A}constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof n){if(e.loose===!!t.loose)return e;e=e.value}a("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===A?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(e){const t=this.options.loose?o[i.COMPARATORLOOSE]:o[i.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=A}toString(){return this.value}test(e){if(a("Comparator.test",e,this.options.loose),this.semver===A||e===A)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return s(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new g(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new g(this.value,t).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),A=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,i=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=s(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=s(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||A||o&&i||a||c}}e.exports=n;const{re:o,t:i}=r(49439),s=r(38754),a=r(6029),c=r(14772),g=r(73004)},73004:(e,t,r)=>{class A{constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof A)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new A(e.raw,t);if(e instanceof n)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=this.options.loose;e=e.trim();const r=t?s[a.HYPHENRANGELOOSE]:s[a.HYPHENRANGE];e=e.replace(r,w(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(s[a.COMPARATORTRIM],c),o("comparator trim",e,s[a.COMPARATORTRIM]),e=(e=(e=e.replace(s[a.TILDETRIM],g)).replace(s[a.CARETTRIM],l)).split(/\s+/).join(" ");const A=t?s[a.COMPARATORLOOSE]:s[a.COMPARATOR];return e.split(" ").map(e=>h(e,this.options)).join(" ").split(/\s+/).map(e=>m(e,this.options)).filter(this.options.loose?e=>!!e.match(A):()=>!0).map(e=>new n(e,this.options))}intersects(e,t){if(!(e instanceof A))throw new TypeError("a Range is required");return this.set.some(r=>u(r,t)&&e.set.some(e=>u(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new i(e,this.options)}catch(e){return!1}for(let t=0;t{let r=!0;const A=e.slice();let n=A.pop();for(;r&&A.length;)r=A.every(e=>n.intersects(e,t)),n=A.pop();return r},h=(e,t)=>(o("comp",e,t),e=f(e,t),o("caret",e),e=d(e,t),o("tildes",e),e=E(e,t),o("xrange",e),e=y(e,t),o("stars",e),e),p=e=>!e||"x"===e.toLowerCase()||"*"===e,d=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(" "),C=(e,t)=>{const r=t.loose?s[a.TILDELOOSE]:s[a.TILDE];return e.replace(r,(t,r,A,n,i)=>{let s;return o("tilde",e,t,r,A,n,i),p(r)?s="":p(A)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:p(n)?s=`>=${r}.${A}.0 <${r}.${+A+1}.0-0`:i?(o("replaceTilde pr",i),s=`>=${r}.${A}.${n}-${i} <${r}.${+A+1}.0-0`):s=`>=${r}.${A}.${n} <${r}.${+A+1}.0-0`,o("tilde return",s),s})},f=(e,t)=>e.trim().split(/\s+/).map(e=>I(e,t)).join(" "),I=(e,t)=>{o("caret",e,t);const r=t.loose?s[a.CARETLOOSE]:s[a.CARET],A=t.includePrerelease?"-0":"";return e.replace(r,(t,r,n,i,s)=>{let a;return o("caret",e,t,r,n,i,s),p(r)?a="":p(n)?a=`>=${r}.0.0${A} <${+r+1}.0.0-0`:p(i)?a="0"===r?`>=${r}.${n}.0${A} <${r}.${+n+1}.0-0`:`>=${r}.${n}.0${A} <${+r+1}.0.0-0`:s?(o("replaceCaret pr",s),a="0"===r?"0"===n?`>=${r}.${n}.${i}-${s} <${r}.${n}.${+i+1}-0`:`>=${r}.${n}.${i}-${s} <${r}.${+n+1}.0-0`:`>=${r}.${n}.${i}-${s} <${+r+1}.0.0-0`):(o("no pr"),a="0"===r?"0"===n?`>=${r}.${n}.${i}${A} <${r}.${n}.${+i+1}-0`:`>=${r}.${n}.${i}${A} <${r}.${+n+1}.0-0`:`>=${r}.${n}.${i} <${+r+1}.0.0-0`),o("caret return",a),a})},E=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map(e=>B(e,t)).join(" ")),B=(e,t)=>{e=e.trim();const r=t.loose?s[a.XRANGELOOSE]:s[a.XRANGE];return e.replace(r,(r,A,n,i,s,a)=>{o("xRange",e,r,A,n,i,s,a);const c=p(n),g=c||p(i),l=g||p(s),u=l;return"="===A&&u&&(A=""),a=t.includePrerelease?"-0":"",c?r=">"===A||"<"===A?"<0.0.0-0":"*":A&&u?(g&&(i=0),s=0,">"===A?(A=">=",g?(n=+n+1,i=0,s=0):(i=+i+1,s=0)):"<="===A&&(A="<",g?n=+n+1:i=+i+1),"<"===A&&(a="-0"),r=`${A+n}.${i}.${s}${a}`):g?r=`>=${n}.0.0${a} <${+n+1}.0.0-0`:l&&(r=`>=${n}.${i}.0${a} <${n}.${+i+1}.0-0`),o("xRange return",r),r})},y=(e,t)=>(o("replaceStars",e,t),e.trim().replace(s[a.STAR],"")),m=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?a.GTE0PRE:a.GTE0],"")),w=e=>(t,r,A,n,o,i,s,a,c,g,l,u,h)=>`${r=p(A)?"":p(n)?`>=${A}.0.0${e?"-0":""}`:p(o)?`>=${A}.${n}.0${e?"-0":""}`:i?">="+r:`>=${r}${e?"-0":""}`} ${a=p(c)?"":p(g)?`<${+c+1}.0.0-0`:p(l)?`<${c}.${+g+1}.0-0`:u?`<=${c}.${g}.${l}-${u}`:e?`<${c}.${g}.${+l+1}-0`:"<="+a}`.trim(),Q=(e,t,r)=>{for(let r=0;r0){const A=e[r].semver;if(A.major===t.major&&A.minor===t.minor&&A.patch===t.patch)return!0}return!1}return!0}},14772:(e,t,r)=>{const A=r(6029),{MAX_LENGTH:n,MAX_SAFE_INTEGER:o}=r(76483),{re:i,t:s}=r(49439),{compareIdentifiers:a}=r(99297);class c{constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof c){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>n)throw new TypeError(`version is longer than ${n} characters`);A("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[s.LOOSE]:i[s.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}e.exports=c},31192:(e,t,r)=>{const A=r(21883);e.exports=(e,t)=>{const r=A(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},38754:(e,t,r)=>{const A=r(78760),n=r(83286),o=r(26544),i=r(44984),s=r(65069),a=r(93845);e.exports=(e,t,r,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return A(e,r,c);case"!=":return n(e,r,c);case">":return o(e,r,c);case">=":return i(e,r,c);case"<":return s(e,r,c);case"<=":return a(e,r,c);default:throw new TypeError("Invalid operator: "+t)}}},38113:(e,t,r)=>{const A=r(14772),n=r(21883),{re:o,t:i}=r(49439);e.exports=(e,t)=>{if(e instanceof A)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=o[i.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),o[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[i.COERCERTL].lastIndex=-1}else r=e.match(o[i.COERCE]);return null===r?null:n(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},63353:(e,t,r)=>{const A=r(14772);e.exports=(e,t,r)=>{const n=new A(e,r),o=new A(t,r);return n.compare(o)||n.compareBuild(o)}},58566:(e,t,r)=>{const A=r(17340);e.exports=(e,t)=>A(e,t,!0)},17340:(e,t,r)=>{const A=r(14772);e.exports=(e,t,r)=>new A(e,r).compare(new A(t,r))},29301:(e,t,r)=>{const A=r(21883),n=r(78760);e.exports=(e,t)=>{if(n(e,t))return null;{const r=A(e),n=A(t),o=r.prerelease.length||n.prerelease.length,i=o?"pre":"",s=o?"prerelease":"";for(const e in r)if(("major"===e||"minor"===e||"patch"===e)&&r[e]!==n[e])return i+e;return s}}},78760:(e,t,r)=>{const A=r(17340);e.exports=(e,t,r)=>0===A(e,t,r)},26544:(e,t,r)=>{const A=r(17340);e.exports=(e,t,r)=>A(e,t,r)>0},44984:(e,t,r)=>{const A=r(17340);e.exports=(e,t,r)=>A(e,t,r)>=0},24063:(e,t,r)=>{const A=r(14772);e.exports=(e,t,r,n)=>{"string"==typeof r&&(n=r,r=void 0);try{return new A(e,r).inc(t,n).version}catch(e){return null}}},65069:(e,t,r)=>{const A=r(17340);e.exports=(e,t,r)=>A(e,t,r)<0},93845:(e,t,r)=>{const A=r(17340);e.exports=(e,t,r)=>A(e,t,r)<=0},75157:(e,t,r)=>{const A=r(14772);e.exports=(e,t)=>new A(e,t).major},5195:(e,t,r)=>{const A=r(14772);e.exports=(e,t)=>new A(e,t).minor},83286:(e,t,r)=>{const A=r(17340);e.exports=(e,t,r)=>0!==A(e,t,r)},21883:(e,t,r)=>{const{MAX_LENGTH:A}=r(76483),{re:n,t:o}=r(49439),i=r(14772);e.exports=(e,t)=>{if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>A)return null;if(!(t.loose?n[o.LOOSE]:n[o.FULL]).test(e))return null;try{return new i(e,t)}catch(e){return null}}},39592:(e,t,r)=>{const A=r(14772);e.exports=(e,t)=>new A(e,t).patch},27050:(e,t,r)=>{const A=r(21883);e.exports=(e,t)=>{const r=A(e,t);return r&&r.prerelease.length?r.prerelease:null}},93788:(e,t,r)=>{const A=r(17340);e.exports=(e,t,r)=>A(t,e,r)},15213:(e,t,r)=>{const A=r(63353);e.exports=(e,t)=>e.sort((e,r)=>A(r,e,t))},73011:(e,t,r)=>{const A=r(73004);e.exports=(e,t,r)=>{try{t=new A(t,r)}catch(e){return!1}return t.test(e)}},71102:(e,t,r)=>{const A=r(63353);e.exports=(e,t)=>e.sort((e,r)=>A(e,r,t))},99589:(e,t,r)=>{const A=r(21883);e.exports=(e,t)=>{const r=A(e,t);return r?r.version:null}},53887:(e,t,r)=>{const A=r(49439);e.exports={re:A.re,src:A.src,tokens:A.t,SEMVER_SPEC_VERSION:r(76483).SEMVER_SPEC_VERSION,SemVer:r(14772),compareIdentifiers:r(99297).compareIdentifiers,rcompareIdentifiers:r(99297).rcompareIdentifiers,parse:r(21883),valid:r(99589),clean:r(31192),inc:r(24063),diff:r(29301),major:r(75157),minor:r(5195),patch:r(39592),prerelease:r(27050),compare:r(17340),rcompare:r(93788),compareLoose:r(58566),compareBuild:r(63353),sort:r(71102),rsort:r(15213),gt:r(26544),lt:r(65069),eq:r(78760),neq:r(83286),gte:r(44984),lte:r(93845),cmp:r(38754),coerce:r(38113),Comparator:r(29069),Range:r(73004),satisfies:r(73011),toComparators:r(47753),maxSatisfying:r(1895),minSatisfying:r(33252),minVersion:r(4224),validRange:r(44315),outside:r(842),gtr:r(69258),ltr:r(36928),intersects:r(87395),simplifyRange:r(3530),subset:r(74264)}},76483:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},6029:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},99297:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const A=t.test(e),n=t.test(r);return A&&n&&(e=+e,r=+r),e===r?0:A&&!n?-1:n&&!A?1:er(t,e)}},49439:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:A}=r(76483),n=r(6029),o=(t=e.exports={}).re=[],i=t.src=[],s=t.t={};let a=0;const c=(e,t,r)=>{const A=a++;n(A,t),s[e]=A,i[A]=t,o[A]=new RegExp(t,r?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),c("FULL",`^${i[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),c("LOOSE",`^${i[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",i[s.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),c("XRANGEIDENTIFIER",i[s.NUMERICIDENTIFIER]+"|x|X|\\*"),c("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),c("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${A}})(?:\\.(\\d{1,${A}}))?(?:\\.(\\d{1,${A}}))?(?:$|[^\\d])`),c("COERCERTL",i[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},69258:(e,t,r)=>{const A=r(842);e.exports=(e,t,r)=>A(e,t,">",r)},87395:(e,t,r)=>{const A=r(73004);e.exports=(e,t,r)=>(e=new A(e,r),t=new A(t,r),e.intersects(t))},36928:(e,t,r)=>{const A=r(842);e.exports=(e,t,r)=>A(e,t,"<",r)},1895:(e,t,r)=>{const A=r(14772),n=r(73004);e.exports=(e,t,r)=>{let o=null,i=null,s=null;try{s=new n(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(o&&-1!==i.compare(e)||(o=e,i=new A(o,r)))}),o}},33252:(e,t,r)=>{const A=r(14772),n=r(73004);e.exports=(e,t,r)=>{let o=null,i=null,s=null;try{s=new n(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(o&&1!==i.compare(e)||(o=e,i=new A(o,r)))}),o}},4224:(e,t,r)=>{const A=r(14772),n=r(73004),o=r(26544);e.exports=(e,t)=>{e=new n(e,t);let r=new A("0.0.0");if(e.test(r))return r;if(r=new A("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t{const t=new A(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!o(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}return r&&e.test(r)?r:null}},842:(e,t,r)=>{const A=r(14772),n=r(29069),{ANY:o}=n,i=r(73004),s=r(73011),a=r(26544),c=r(65069),g=r(93845),l=r(44984);e.exports=(e,t,r,u)=>{let h,p,d,C,f;switch(e=new A(e,u),t=new i(t,u),r){case">":h=a,p=g,d=c,C=">",f=">=";break;case"<":h=c,p=l,d=a,C="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,u))return!1;for(let r=0;r{e.semver===o&&(e=new n(">=0.0.0")),i=i||e,s=s||e,h(e.semver,i.semver,u)?i=e:d(e.semver,s.semver,u)&&(s=e)}),i.operator===C||i.operator===f)return!1;if((!s.operator||s.operator===C)&&p(e,s.semver))return!1;if(s.operator===f&&d(e,s.semver))return!1}return!0}},3530:(e,t,r)=>{const A=r(73011),n=r(17340);e.exports=(e,t,r)=>{const o=[];let i=null,s=null;const a=e.sort((e,t)=>n(e,t,r));for(const e of a){A(e,t,r)?(s=e,i||(i=e)):(s&&o.push([i,s]),s=null,i=null)}i&&o.push([i,null]);const c=[];for(const[e,t]of o)e===t?c.push(e):t||e!==a[0]?t?e===a[0]?c.push("<="+t):c.push(`${e} - ${t}`):c.push(">="+e):c.push("*");const g=c.join(" || "),l="string"==typeof t.raw?t.raw:String(t);return g.length{const A=r(73004),{ANY:n}=r(29069),o=r(73011),i=r(17340),s=(e,t,r)=>{if(1===e.length&&e[0].semver===n)return 1===t.length&&t[0].semver===n;const A=new Set;let s,g,l,u,h,p,d;for(const t of e)">"===t.operator||">="===t.operator?s=a(s,t,r):"<"===t.operator||"<="===t.operator?g=c(g,t,r):A.add(t.semver);if(A.size>1)return null;if(s&&g){if(l=i(s.semver,g.semver,r),l>0)return null;if(0===l&&(">="!==s.operator||"<="!==g.operator))return null}for(const e of A){if(s&&!o(e,String(s),r))return null;if(g&&!o(e,String(g),r))return null;for(const A of t)if(!o(e,String(A),r))return!1;return!0}for(const e of t){if(d=d||">"===e.operator||">="===e.operator,p=p||"<"===e.operator||"<="===e.operator,s)if(">"===e.operator||">="===e.operator){if(u=a(s,e,r),u===e)return!1}else if(">="===s.operator&&!o(s.semver,String(e),r))return!1;if(g)if("<"===e.operator||"<="===e.operator){if(h=c(g,e,r),h===e)return!1}else if("<="===g.operator&&!o(g.semver,String(e),r))return!1;if(!e.operator&&(g||s)&&0!==l)return!1}return!(s&&p&&!g&&0!==l)&&!(g&&d&&!s&&0!==l)},a=(e,t,r)=>{if(!e)return t;const A=i(e.semver,t.semver,r);return A>0?e:A<0||">"===t.operator&&">="===e.operator?t:e},c=(e,t,r)=>{if(!e)return t;const A=i(e.semver,t.semver,r);return A<0?e:A>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r)=>{e=new A(e,r),t=new A(t,r);let n=!1;e:for(const A of e.set){for(const e of t.set){const t=s(A,e,r);if(n=n||null!==t,t)continue e}if(n)return!1}return!0}},47753:(e,t,r)=>{const A=r(73004);e.exports=(e,t)=>new A(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},44315:(e,t,r)=>{const A=r(73004);e.exports=(e,t)=>{try{return new A(e,t).range||"*"}catch(e){return null}}},91470:(e,t,r)=>{"use strict";const A=r(67719);e.exports=(e="")=>{const t=e.match(A);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o}},67719:e=>{"use strict";e.exports=/^#!(.*)/},17234:e=>{"use strict";e.exports=e=>{const t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},10129:(e,t,r)=>{"use strict";const A=r(76417),n=r(19184),o=r(92413).Transform,i=["sha256","sha384","sha512"],s=/^[a-z0-9+/]+(?:=?=?)$/i,a=/^([^-]+)-([^?]+)([?\S*]*)$/,c=/^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/,g=/^[\x21-\x7E]+$/,l=n({algorithms:{default:["sha512"]},error:{default:!1},integrity:{},options:{default:[]},pickAlgorithm:{default:()=>B},Promise:{default:()=>Promise},sep:{default:" "},single:{default:!1},size:{},strict:{default:!1}});class u{get isHash(){return!0}constructor(e,t){const r=!!(t=l(t)).strict;this.source=e.trim();const A=this.source.match(r?c:a);if(!A)return;if(r&&!i.some(e=>e===A[1]))return;this.algorithm=A[1],this.digest=A[2];const n=A[3];this.options=n?n.slice(1).split("?"):[]}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}toString(e){if((e=l(e)).strict&&!(i.some(e=>e===this.algorithm)&&this.digest.match(s)&&(this.options||[]).every(e=>e.match(g))))return"";const t=this.options&&this.options.length?"?"+this.options.join("?"):"";return`${this.algorithm}-${this.digest}${t}`}}class h{get isIntegrity(){return!0}toJSON(){return this.toString()}toString(e){let t=(e=l(e)).sep||" ";return e.strict&&(t=t.replace(/\S+/g," ")),Object.keys(this).map(r=>this[r].map(t=>u.prototype.toString.call(t,e)).filter(e=>e.length).join(t)).filter(e=>e.length).join(t)}concat(e,t){t=l(t);const r="string"==typeof e?e:C(e,t);return p(`${this.toString(t)} ${r}`,t)}hexDigest(){return p(this,{single:!0}).hexDigest()}match(e,t){const r=p(e,t=l(t)),A=r.pickAlgorithm(t);return this[A]&&r[A]&&this[A].find(e=>r[A].find(t=>e.digest===t.digest))||!1}pickAlgorithm(e){const t=(e=l(e)).pickAlgorithm,r=Object.keys(this);if(!r.length)throw new Error("No algorithms available for "+JSON.stringify(this.toString()));return r.reduce((e,r)=>t(e,r)||e)}}function p(e,t){if(t=l(t),"string"==typeof e)return d(e,t);if(e.algorithm&&e.digest){const r=new h;return r[e.algorithm]=[e],d(C(r,t),t)}return d(C(e,t),t)}function d(e,t){return t.single?new u(e,t):e.trim().split(/\s+/).reduce((e,r)=>{const A=new u(r,t);if(A.algorithm&&A.digest){const t=A.algorithm;e[t]||(e[t]=[]),e[t].push(A)}return e},new h)}function C(e,t){return t=l(t),e.algorithm&&e.digest?u.prototype.toString.call(e,t):"string"==typeof e?C(p(e,t),t):h.prototype.toString.call(e,t)}function f(e){const t=(e=l(e)).integrity&&p(e.integrity,e),r=t&&Object.keys(t).length,n=r&&t.pickAlgorithm(e),i=r&&t[n],s=Array.from(new Set(e.algorithms.concat(n?[n]:[]))),a=s.map(A.createHash);let c=0;const g=new o({transform(e,t,r){c+=e.length,a.forEach(r=>r.update(e,t)),r(null,e,t)}}).on("end",()=>{const A=e.options&&e.options.length?"?"+e.options.join("?"):"",o=p(a.map((e,t)=>`${s[t]}-${e.digest("base64")}${A}`).join(" "),e),l=r&&o.match(t,e);if("number"==typeof e.size&&c!==e.size){const r=new Error(`stream size mismatch when checking ${t}.\n Wanted: ${e.size}\n Found: ${c}`);r.code="EBADSIZE",r.found=c,r.expected=e.size,r.sri=t,g.emit("error",r)}else if(e.integrity&&!l){const e=new Error(`${t} integrity checksum failed when using ${n}: wanted ${i} but got ${o}. (${c} bytes)`);e.code="EINTEGRITY",e.found=o,e.expected=i,e.algorithm=n,e.sri=t,g.emit("error",e)}else g.emit("size",c),g.emit("integrity",o),l&&g.emit("verified",l)});return g}e.exports.Sd=function(e,t){const r=(t=l(t)).algorithms,n=t.options&&t.options.length?"?"+t.options.join("?"):"";return r.reduce((r,o)=>{const i=A.createHash(o).update(e).digest("base64"),s=new u(`${o}-${i}${n}`,t);if(s.algorithm&&s.digest){const e=s.algorithm;r[e]||(r[e]=[]),r[e].push(s)}return r},new h)};const I=new Set(A.getHashes()),E=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(e=>I.has(e));function B(e,t){return E.indexOf(e.toLowerCase())>=E.indexOf(t.toLowerCase())?e:t}},69538:(e,t,r)=>{"use strict";var A=r(13499).Buffer,n=A.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(A.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=a,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=g,this.end=l,t=3;break;default:return this.write=u,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=A.allocUnsafe(t)}function i(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function a(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var A=r.charCodeAt(r.length-1);if(A>=55296&&A<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function g(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return n>0&&(e.lastNeed=n-1),n;if(--A=0)return n>0&&(e.lastNeed=n-2),n;if(--A=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var A=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,A),e.toString("utf8",t,A)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},59428:(e,t,r)=>{"use strict";const A=r(12087),n=r(33867),o=r(72918),{env:i}=process;let s;function a(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function c(e,t){if(0===s)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(e&&!t&&void 0===s)return 0;const r=s||0;if("dumb"===i.TERM)return r;if("win32"===process.platform){const e=A.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in i)||"codeship"===i.CI_NAME?1:r;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in i)return 1;if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){const e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:r}o("no-color")||o("no-colors")||o("color=false")||o("color=never")?s=0:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(s=1),"FORCE_COLOR"in i&&(s="true"===i.FORCE_COLOR?1:"false"===i.FORCE_COLOR?0:0===i.FORCE_COLOR.length?1:Math.min(parseInt(i.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return a(c(e,e&&e.isTTY))},stdout:a(c(!0,n.isatty(1))),stderr:a(c(!0,n.isatty(2)))}},93255:e=>{"use strict";function t(e){return Array.prototype.slice.apply(e)}function r(e){this.status="pending",this._continuations=[],this._parent=null,this._paused=!1,e&&e.call(this,this._continueWith.bind(this),this._failWith.bind(this))}function A(e){return e&&"function"==typeof e.then}function n(e){return e}if(r.prototype={then:function(e,t){var n=r.unresolved()._setParent(this);if(this._isRejected()){if(this._paused)return this._continuations.push({promise:n,nextFn:e,catchFn:t}),n;if(t)try{var o=t(this._error);return A(o)?(this._chainPromiseData(o,n),n):r.resolve(o)._setParent(this)}catch(e){return r.reject(e)._setParent(this)}return r.reject(this._error)._setParent(this)}return this._continuations.push({promise:n,nextFn:e,catchFn:t}),this._runResolutions(),n},catch:function(e){if(this._isResolved())return r.resolve(this._data)._setParent(this);var t=r.unresolved()._setParent(this);return this._continuations.push({promise:t,catchFn:e}),this._runRejections(),t},finally:function(e){var t=!1;function r(r,o){if(!t){t=!0,e||(e=n);var i=e(r);return A(i)?i.then((function(){if(o)throw o;return r})):r}}return this.then((function(e){return r(e)})).catch((function(e){return r(null,e)}))},pause:function(){return this._paused=!0,this},resume:function(){var e=this._findFirstPaused();return e&&(e._paused=!1,e._runResolutions(),e._runRejections()),this},_findAncestry:function(){return this._continuations.reduce((function(e,t){if(t.promise){var r={promise:t.promise,children:t.promise._findAncestry()};e.push(r)}return e}),[])},_setParent:function(e){if(this._parent)throw new Error("parent already set");return this._parent=e,this},_continueWith:function(e){var t=this._findFirstPending();t&&(t._data=e,t._setResolved())},_findFirstPending:function(){return this._findFirstAncestor((function(e){return e._isPending&&e._isPending()}))},_findFirstPaused:function(){return this._findFirstAncestor((function(e){return e._paused}))},_findFirstAncestor:function(e){for(var t,r=this;r;)e(r)&&(t=r),r=r._parent;return t},_failWith:function(e){var t=this._findFirstPending();t&&(t._error=e,t._setRejected())},_takeContinuations:function(){return this._continuations.splice(0,this._continuations.length)},_runRejections:function(){if(!this._paused&&this._isRejected()){var e=this._error,t=this._takeContinuations(),r=this;t.forEach((function(t){if(t.catchFn)try{var A=t.catchFn(e);r._handleUserFunctionResult(A,t.promise)}catch(e){t.promise.reject(e)}else t.promise.reject(e)}))}},_runResolutions:function(){if(!this._paused&&this._isResolved()&&!this._isPending()){var e=this._takeContinuations();if(A(this._data))return this._handleWhenResolvedDataIsPromise(this._data);var t=this._data,r=this;e.forEach((function(e){if(e.nextFn)try{var A=e.nextFn(t);r._handleUserFunctionResult(A,e.promise)}catch(t){r._handleResolutionError(t,e)}else e.promise&&e.promise.resolve(t)}))}},_handleResolutionError:function(e,t){if(this._setRejected(),t.catchFn)try{return void t.catchFn(e)}catch(t){e=t}t.promise&&t.promise.reject(e)},_handleWhenResolvedDataIsPromise:function(e){var t=this;return e.then((function(e){t._data=e,t._runResolutions()})).catch((function(e){t._error=e,t._setRejected(),t._runRejections()}))},_handleUserFunctionResult:function(e,t){A(e)?this._chainPromiseData(e,t):t.resolve(e)},_chainPromiseData:function(e,t){e.then((function(e){t.resolve(e)})).catch((function(e){t.reject(e)}))},_setResolved:function(){this.status="resolved",this._paused||this._runResolutions()},_setRejected:function(){this.status="rejected",this._paused||this._runRejections()},_isPending:function(){return"pending"===this.status},_isResolved:function(){return"resolved"===this.status},_isRejected:function(){return"rejected"===this.status}},r.resolve=function(e){return new r((function(t,r){A(e)?e.then((function(e){t(e)})).catch((function(e){r(e)})):t(e)}))},r.reject=function(e){return new r((function(t,r){r(e)}))},r.unresolved=function(){return new r((function(e,t){this.resolve=e,this.reject=t}))},r.all=function(){var e=t(arguments);return Array.isArray(e[0])&&(e=e[0]),e.length?new r((function(t,A){var n=[],o=0,i=!1;e.forEach((function(s,a){r.resolve(s).then((function(r){n[a]=r,(o+=1)===e.length&&t(n)})).catch((function(e){!function(e){i||(i=!0,A(e))}(e)}))}))})):r.resolve([])},Promise===r)throw new Error("Please use SynchronousPromise.installGlobally() to install globally");var o=Promise;r.installGlobally=function(e){if(Promise===r)return e;var A=function(e){if(void 0===e||e.__patched)return e;var r=e;return(e=function(){r.apply(this,t(arguments))}).__patched=!0,e}(e);return Promise=r,A},r.uninstallGlobally=function(){Promise===r&&(Promise=o)},e.exports={SynchronousPromise:r}},75799:(e,t,r)=>{var A=r(31669),n=r(73975),o=r(77686),i=r(86897).Writable,s=r(86897).PassThrough,a=function(){},c=function(e){return(e&=511)&&512-e},g=function(e,t){this._parent=e,this.offset=t,s.call(this)};A.inherits(g,s),g.prototype.destroy=function(e){this._parent.destroy(e)};var l=function(e){if(!(this instanceof l))return new l(e);i.call(this,e),e=e||{},this._offset=0,this._buffer=n(),this._missing=0,this._partial=!1,this._onparse=a,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,r=t._buffer,A=function(){t._continue()},s=function(e){if(t._locked=!1,e)return t.destroy(e);t._stream||A()},u=function(){t._stream=null;var e=c(t._header.size);e?t._parse(e,h):t._parse(512,I),t._locked||A()},h=function(){t._buffer.consume(c(t._header.size)),t._parse(512,I),A()},p=function(){var e=t._header.size;t._paxGlobal=o.decodePax(r.slice(0,e)),r.consume(e),u()},d=function(){var e=t._header.size;t._pax=o.decodePax(r.slice(0,e)),t._paxGlobal&&(t._pax=Object.assign({},t._paxGlobal,t._pax)),r.consume(e),u()},C=function(){var A=t._header.size;this._gnuLongPath=o.decodeLongPath(r.slice(0,A),e.filenameEncoding),r.consume(A),u()},f=function(){var A=t._header.size;this._gnuLongLinkPath=o.decodeLongPath(r.slice(0,A),e.filenameEncoding),r.consume(A),u()},I=function(){var n,i=t._offset;try{n=t._header=o.decode(r.slice(0,512),e.filenameEncoding)}catch(e){t.emit("error",e)}return r.consume(512),n?"gnu-long-path"===n.type?(t._parse(n.size,C),void A()):"gnu-long-link-path"===n.type?(t._parse(n.size,f),void A()):"pax-global-header"===n.type?(t._parse(n.size,p),void A()):"pax-header"===n.type?(t._parse(n.size,d),void A()):(t._gnuLongPath&&(n.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(n.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=n=function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e}(n,t._pax),t._pax=null),t._locked=!0,n.size&&"directory"!==n.type?(t._stream=new g(t,i),t.emit("entry",n,t._stream,s),t._parse(n.size,u),void A()):(t._parse(512,I),void t.emit("entry",n,function(e,t){var r=new g(e,t);return r.end(),r}(t,i),s))):(t._parse(512,I),void A())};this._onheader=I,this._parse(512,I)};A.inherits(l,i),l.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))},l.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)},l.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=a,this._overflow?this._write(this._overflow,void 0,e):e()}},l.prototype._write=function(e,t,r){if(!this._destroyed){var A=this._stream,n=this._buffer,o=this._missing;if(e.length&&(this._partial=!0),e.lengtho&&(i=e.slice(o),e=e.slice(0,o)),A?A.end(e):n.append(e),this._overflow=i,this._onparse()}},l.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()},e.exports=l},77686:(e,t)=>{var r=Buffer.alloc,A="0".charCodeAt(0),n=parseInt("7777",8),o=function(e,t,r,A){for(;rt?"7777777777777777777".slice(0,t)+" ":"0000000000000000000".slice(0,t-e.length)+e+" "};var a=function(e,t,r){if(128&(e=e.slice(t,t+r))[t=0])return function(e){var t;if(128===e[0])t=!0;else{if(255!==e[0])return null;t=!1}for(var r=!1,A=[],n=e.length-1;n>0;n--){var o=e[n];t?A.push(o):r&&0===o?A.push(0):r?(r=!1,A.push(256-o)):A.push(255-o)}var i=0,s=A.length;for(n=0;n=i?i:n>=0||(n+=i)>=0?n:0);t=Math.pow(10,r)&&r++,t+r+e};t.decodeLongPath=function(e,t){return c(e,0,e.length,t)},t.encodePax=function(e){var t="";e.name&&(t+=g(" path="+e.name+"\n")),e.linkname&&(t+=g(" linkpath="+e.linkname+"\n"));var r=e.pax;if(r)for(var A in r)t+=g(" "+A+"="+r[A]+"\n");return Buffer.from(t)},t.decodePax=function(e){for(var t={};e.length;){for(var r=0;r100;){var c=o.indexOf("/");if(-1===c)return null;a+=a?"/"+o.slice(0,c):o.slice(0,c),o=o.slice(c+1)}return Buffer.byteLength(o)>100||Buffer.byteLength(a)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(o),t.write(s(e.mode&n,6),100),t.write(s(e.uid,6),108),t.write(s(e.gid,6),116),t.write(s(e.size,11),124),t.write(s(e.mtime.getTime()/1e3|0,11),136),t[156]=A+function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}(e.type),e.linkname&&t.write(e.linkname,157),t.write("ustar\x0000",257),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(s(e.devmajor||0,6),329),t.write(s(e.devminor||0,6),337),a&&t.write(a,345),t.write(s(i(t),6),148),t)},t.decode=function(e,t){var r=0===e[156]?0:e[156]-A,n=c(e,0,100,t),o=a(e,100,8),s=a(e,108,8),g=a(e,116,8),l=a(e,124,12),u=a(e,136,12),h=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}(r),p=0===e[157]?null:c(e,157,100,t),d=c(e,265,32),C=c(e,297,32),f=a(e,329,8),I=a(e,337,8);e[345]&&(n=c(e,345,155,t)+"/"+n),0===r&&n&&"/"===n[n.length-1]&&(r=5);var E=i(e);if(256===E)return null;if(E!==a(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");return{name:n,mode:o,uid:s,gid:g,size:l,mtime:new Date(1e3*u),type:h,linkname:p,uname:d,gname:C,devmajor:f,devminor:I}}},59938:(e,t,r)=>{t.extract=r(75799),t.pack=r(72203)},72203:(e,t,r)=>{var A=r(13302),n=r(17067),o=r(85870),i=Buffer.alloc,s=r(86897).Readable,a=r(86897).Writable,c=r(24304).StringDecoder,g=r(77686),l=parseInt("755",8),u=parseInt("644",8),h=i(1024),p=function(){},d=function(e,t){(t&=511)&&e.push(h.slice(0,512-t))};var C=function(e){a.call(this),this.written=0,this._to=e,this._destroyed=!1};o(C,a),C.prototype._write=function(e,t,r){if(this.written+=e.length,this._to.push(e))return r();this._to._drain=r},C.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var f=function(){a.call(this),this.linkname="",this._decoder=new c("utf-8"),this._destroyed=!1};o(f,a),f.prototype._write=function(e,t,r){this.linkname+=this._decoder.write(e),r()},f.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var I=function(){a.call(this),this._destroyed=!1};o(I,a),I.prototype._write=function(e,t,r){r(new Error("No body allowed for this entry"))},I.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var E=function(e){if(!(this instanceof E))return new E(e);s.call(this,e),this._drain=p,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};o(E,s),E.prototype.entry=function(e,t,r){if(this._stream)throw new Error("already piping an entry");if(!this._finalized&&!this._destroyed){"function"==typeof t&&(r=t,t=null),r||(r=p);var o=this;if(e.size&&"symlink"!==e.type||(e.size=0),e.type||(e.type=function(e){switch(e&A.S_IFMT){case A.S_IFBLK:return"block-device";case A.S_IFCHR:return"character-device";case A.S_IFDIR:return"directory";case A.S_IFIFO:return"fifo";case A.S_IFLNK:return"symlink"}return"file"}(e.mode)),e.mode||(e.mode="directory"===e.type?l:u),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),"string"==typeof t&&(t=Buffer.from(t)),Buffer.isBuffer(t))return e.size=t.length,this._encode(e),this.push(t),d(o,e.size),process.nextTick(r),new I;if("symlink"===e.type&&!e.linkname){var i=new f;return n(i,(function(t){if(t)return o.destroy(),r(t);e.linkname=i.linkname,o._encode(e),r()})),i}if(this._encode(e),"file"!==e.type&&"contiguous-file"!==e.type)return process.nextTick(r),new I;var s=new C(this);return this._stream=s,n(s,(function(t){return o._stream=null,t?(o.destroy(),r(t)):s.written!==e.size?(o.destroy(),r(new Error("size mismatch"))):(d(o,e.size),o._finalizing&&o.finalize(),void r())})),s}},E.prototype.finalize=function(){this._stream?this._finalizing=!0:this._finalized||(this._finalized=!0,this.push(h),this.push(null))},E.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())},E.prototype._encode=function(e){if(!e.pax){var t=g.encode(e);if(t)return void this.push(t)}this._encodePax(e)},E.prototype._encodePax=function(e){var t=g.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(g.encode(r)),this.push(t),d(this,t.length),r.size=e.size,r.type=e.type,this.push(g.encode(r))},E.prototype._read=function(e){var t=this._drain;this._drain=p,t()},e.exports=E},84615:(e,t,r)=>{"use strict"; /*! * to-regex-range * * Copyright (c) 2015-present, Jon Schlinkert. * Released under the MIT License. */const A=r(59235),n=(e,t,r)=>{if(!1===A(e))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===t||e===t)return String(e);if(!1===A(t))throw new TypeError("toRegexRange: expected the second argument to be a number.");let o={relaxZeros:!0,...r};"boolean"==typeof o.strictZeros&&(o.relaxZeros=!1===o.strictZeros);let a=e+":"+t+"="+String(o.relaxZeros)+String(o.shorthand)+String(o.capture)+String(o.wrap);if(n.cache.hasOwnProperty(a))return n.cache[a].result;let c=Math.min(e,t),g=Math.max(e,t);if(1===Math.abs(c-g)){let r=e+"|"+t;return o.capture?`(${r})`:!1===o.wrap?r:`(?:${r})`}let l=p(e)||p(t),u={min:e,max:t,a:c,b:g},h=[],d=[];if(l&&(u.isPadded=l,u.maxLen=String(u.max).length),c<0){d=i(g<0?Math.abs(g):1,Math.abs(c),u,o),c=u.a=0}return g>=0&&(h=i(c,g,u,o)),u.negatives=d,u.positives=h,u.result=function(e,t,r){let A=s(e,t,"-",!1,r)||[],n=s(t,e,"",!1,r)||[],o=s(e,t,"-?",!0,r)||[];return A.concat(o).concat(n).join("|")}(d,h,o),!0===o.capture?u.result=`(${u.result})`:!1!==o.wrap&&h.length+d.length>1&&(u.result=`(?:${u.result})`),n.cache[a]=u,u.result};function o(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let A=function(e,t){let r=[];for(let A=0;A1&&n.count.pop(),n.count.push(a.count[0]),n.string=n.pattern+u(n.count),c=t+1)}return s}function s(e,t,r,A,n){let o=[];for(let n of e){let{string:e}=n;A||c(t,"string",e)||o.push(r+e),A&&c(t,"string",e)&&o.push(r+e)}return o}function a(e,t){return e>t?1:t>e?-1:0}function c(e,t,r){return e.some(e=>e[t]===r)}function g(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function l(e,t){return e-e%Math.pow(10,t)}function u(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function h(e,t,r){return`[${e}${t-e==1?"":"-"}${t}]`}function p(e){return/^-?(0+)\d/.test(e)}function d(e,t,r){if(!t.isPadded)return e;let A=Math.abs(t.maxLen-String(e).length),n=!1!==r.relaxZeros;switch(A){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${A}}`:`0{${A}}`}}n.cache={},n.clearCache=()=>n.cache={},e.exports=n},75158:e=>{function t(e,t){var r=e.length,A=new Array(r),n={},o=r,i=function(e){for(var t=new Map,r=0,A=e.length;r0&&(n.forEach((function(e,t){t>0&&(g+=(e[1]?" ":"│")+" "),c||e[0]!==r||(c=!0)})),g+=function(e,t){var r=t?"└":"├";return r+=e?"─ ":"──┐"}(t,A)+t,o&&("object"!=typeof r||r instanceof Date)&&(g+=": "+r),c&&(g+=" (circular ref.)"),s(g)),!c&&"object"==typeof r){var h=function(e,t){var r=[];for(var A in e)e.hasOwnProperty(A)&&(t&&"function"==typeof e[A]||r.push(A));return r}(r,i);h.forEach((function(t){a=++l===h.length,e(t,r[t],a,u,o,i,s)}))}}var t={asLines:function(t,r,A,n){e(".",t,!1,[],r,"function"!=typeof A&&A,n||A)},asTree:function(t,r,A){var n="";return e(".",t,!1,[],r,A,(function(e){n+=e+"\n"})),n}};return t}()},36370:(e,t,r)=>{"use strict";r.d(t,{gn:()=>A});function A(e,t,r,A){var n,o=arguments.length,i=o<3?t:null===A?A=Object.getOwnPropertyDescriptor(t,r):A;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,A);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(i=(o<3?n(i):o>3?n(t,r,i):n(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}},98161:(e,t,r)=>{e.exports=r(69876)},69876:(e,t,r)=>{"use strict";r(11631);var A,n=r(4016),o=r(98605),i=r(57211),s=r(28614),a=(r(42357),r(31669));function c(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,r,A,n){for(var o=l(r,A,n),i=0,s=t.requests.length;i=this.maxSockets?n.requests.push(o):n.createSocket(o,(function(t){function r(){n.emit("free",t,o)}function A(e){n.removeSocket(t),t.removeListener("free",r),t.removeListener("close",A),t.removeListener("agentRemove",A)}t.on("free",r),t.on("close",A),t.on("agentRemove",A),e.onSocket(t)}))},c.prototype.createSocket=function(e,t){var r=this,n={};r.sockets.push(n);var o=u({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(o.localAddress=e.localAddress),o.proxyAuth&&(o.headers=o.headers||{},o.headers["Proxy-Authorization"]="Basic "+new Buffer(o.proxyAuth).toString("base64")),A("making CONNECT request");var i=r.request(o);function s(o,s,a){var c;return i.removeAllListeners(),s.removeAllListeners(),200!==o.statusCode?(A("tunneling socket could not be established, statusCode=%d",o.statusCode),s.destroy(),(c=new Error("tunneling socket could not be established, statusCode="+o.statusCode)).code="ECONNRESET",e.request.emit("error",c),void r.removeSocket(n)):a.length>0?(A("got illegal response body from proxy"),s.destroy(),(c=new Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",c),void r.removeSocket(n)):(A("tunneling connection has established"),r.sockets[r.sockets.indexOf(n)]=s,t(s))}i.useChunkedEncodingByDefault=!1,i.once("response",(function(e){e.upgrade=!0})),i.once("upgrade",(function(e,t,r){process.nextTick((function(){s(e,t,r)}))})),i.once("connect",s),i.once("error",(function(t){i.removeAllListeners(),A("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var o=new Error("tunneling socket could not be established, cause="+t.message);o.code="ECONNRESET",e.request.emit("error",o),r.removeSocket(n)})),i.end()},c.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,(function(e){r.request.onSocket(e)}))}},A=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){}},73212:(e,t,r)=>{e.exports=r(31669).deprecate},87945:(e,t,r)=>{const A="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,n=r(85622),o=A?";":":",i=r(64151),s=e=>Object.assign(new Error("not found: "+e),{code:"ENOENT"}),a=(e,t)=>{const r=t.colon||o,n=e.match(/\//)||A&&e.match(/\\/)?[""]:[...A?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=A?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=A?i.split(r):[""];return A&&-1!==e.indexOf(".")&&""!==s[0]&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:i}},c=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:A,pathExt:o,pathExtExe:c}=a(e,t),g=[],l=r=>new Promise((o,i)=>{if(r===A.length)return t.all&&g.length?o(g):i(s(e));const a=A[r],c=/^".*"$/.test(a)?a.slice(1,-1):a,l=n.join(c,e),h=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;o(u(h,r,0))}),u=(e,r,A)=>new Promise((n,s)=>{if(A===o.length)return n(l(r+1));const a=o[A];i(e+a,{pathExt:c},(o,i)=>{if(!o&&i){if(!t.all)return n(e+a);g.push(e+a)}return n(u(e,r,A+1))})});return r?l(0).then(e=>r(null,e),r):l(0)};e.exports=c,c.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:A,pathExtExe:o}=a(e,t),c=[];for(let s=0;s{e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){A[e]=t[e]})),A;function A(){for(var e=new Array(arguments.length),r=0;r{"use strict";var A=r(60087);t.__esModule=!0,t.default=void 0;var n=A(r(15215)),o=A(r(11050)),i=function(){function e(e,t){if(this.refs=e,"function"!=typeof t){if(!(0,n.default)(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");var r=t.is,A=t.then,o=t.otherwise,i="function"==typeof r?r:function(){for(var e=arguments.length,t=new Array(e),A=0;A{"use strict";var A=r(60087);t.__esModule=!0,t.default=void 0;var n=A(r(11050)),o=function(){function e(e){this._resolve=function(t,r){var A=e(t,r);if(!(0,n.default)(A))throw new TypeError("lazy() functions must return a valid schema");return A.resolve(r)}}var t=e.prototype;return t.resolve=function(e){return this._resolve(e.value,e)},t.cast=function(e,t){return this._resolve(e,t).cast(e,t)},t.validate=function(e,t){return this._resolve(e,t).validate(e,t)},t.validateSync=function(e,t){return this._resolve(e,t).validateSync(e,t)},t.validateAt=function(e,t,r){return this._resolve(t,r).validateAt(e,t,r)},t.validateSyncAt=function(e,t,r){return this._resolve(t,r).validateSyncAt(e,t,r)},e}();o.prototype.__isYupSchema__=!0;var i=o;t.default=i,e.exports=t.default},95814:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.default=void 0;var n=A(r(72912)),o=r(79588),i="$",s=".",a=function(){function e(e,t){if(void 0===t&&(t={}),"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===i,this.isValue=this.key[0]===s,this.isSibling=!this.isContext&&!this.isValue;var r=this.isContext?i:this.isValue?s:"";this.path=this.key.slice(r.length),this.getter=this.path&&(0,o.getter)(this.path,!0),this.map=t.map}var t=e.prototype;return t.getValue=function(e){var t=this.isContext?e.context:this.isValue?e.value:e.parent;return this.getter&&(t=this.getter(t||{})),this.map&&(t=this.map(t)),t},t.cast=function(e,t){return this.getValue((0,n.default)({},t,{value:e}))},t.resolve=function(){return this},t.describe=function(){return{type:"ref",key:this.key}},t.toString=function(){return"Ref("+this.key+")"},e.isRef=function(e){return e&&e.__isYupRef},e}();t.default=a,a.prototype.__isYupRef=!0,e.exports=t.default},40828:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.default=s;var n=A(r(21043)),o=/\$\{\s*(\w+)\s*\}/g,i=function(e){return function(t){return e.replace(o,(function(e,r){return(0,n.default)(t[r])}))}};function s(e,t,r,A){var n=this;this.name="ValidationError",this.value=t,this.path=r,this.type=A,this.errors=[],this.inner=[],e&&[].concat(e).forEach((function(e){n.errors=n.errors.concat(e.errors||e),e.inner&&(n.inner=n.inner.concat(e.inner.length?e.inner:e))})),this.message=this.errors.length>1?this.errors.length+" errors occurred":this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,s)}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.isError=function(e){return e&&"ValidationError"===e.name},s.formatError=function(e,t){"string"==typeof e&&(e=i(e));var r=function(t){return t.path=t.label||t.path||"this","function"==typeof e?e(t):e};return 1===arguments.length?r:r(t)},e.exports=t.default},18830:(e,t,r)=>{"use strict";var A=r(19228),n=r(60087);t.__esModule=!0,t.default=void 0;var o=n(r(72912)),i=n(r(62407)),s=n(r(31490)),a=n(r(71665)),c=n(r(11050)),g=n(r(7045)),l=n(r(21043)),u=n(r(16434)),h=r(63802),p=A(r(80180));function d(){var e=(0,i.default)(["","[","]"]);return d=function(){return e},e}var C=f;function f(e){var t=this;if(!(this instanceof f))return new f(e);u.default.call(this,{type:"array"}),this._subType=void 0,this.withMutation((function(){t.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})),e&&t.of(e)}))}t.default=C,(0,s.default)(f,u.default,{_typeCheck:function(e){return Array.isArray(e)},_cast:function(e,t){var r=this,A=u.default.prototype._cast.call(this,e,t);if(!this._typeCheck(A)||!this._subType)return A;var n=!1,o=A.map((function(e){var A=r._subType.cast(e,t);return A!==e&&(n=!0),A}));return n?o:A},_validate:function(e,t){var r=this;void 0===t&&(t={});var A=[],n=t.sync,i=t.path,s=this._subType,a=this._option("abortEarly",t),c=this._option("recursive",t),l=null!=t.originalValue?t.originalValue:e;return u.default.prototype._validate.call(this,e,t).catch((0,p.propagateErrors)(a,A)).then((function(e){if(!c||!s||!r._typeCheck(e)){if(A.length)throw A[0];return e}l=l||e;var u=e.map((function(r,A){var n=(0,g.default)(d(),t.path,A),i=(0,o.default)({},t,{path:n,strict:!0,parent:e,originalValue:l[A]});return!s.validate||s.validate(r,i)}));return(0,p.default)({sync:n,path:i,value:e,errors:A,endEarly:a,validations:u})}))},_isPresent:function(e){return u.default.prototype._cast.call(this,e)&&e.length>0},of:function(e){var t=this.clone();if(!1!==e&&!(0,c.default)(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema, or `false` to negate a current sub-schema. not: "+(0,l.default)(e));return t._subType=e,t},min:function(e,t){return t=t||h.array.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return(0,a.default)(t)||t.length>=this.resolve(e)}})},max:function(e,t){return t=t||h.array.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return(0,a.default)(t)||t.length<=this.resolve(e)}})},ensure:function(){var e=this;return this.default((function(){return[]})).transform((function(t){return e.isType(t)?t:null===t?[]:[].concat(t)}))},compact:function(e){var t=e?function(t,r,A){return!e(t,r,A)}:function(e){return!!e};return this.transform((function(e){return null!=e?e.filter(t):e}))},describe:function(){var e=u.default.prototype.describe.call(this);return this._subType&&(e.innerType=this._subType.describe()),e}}),e.exports=t.default},76595:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.default=void 0;var n=A(r(31490)),o=A(r(16434)),i=s;function s(){var e=this;if(!(this instanceof s))return new s;o.default.call(this,{type:"boolean"}),this.withMutation((function(){e.transform((function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(e))return!0;if(/^(false|0)$/i.test(e))return!1}return e}))}))}t.default=i,(0,n.default)(s,o.default,{_typeCheck:function(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e}}),e.exports=t.default},41755:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.default=void 0;var n=A(r(16434)),o=A(r(31490)),i=A(r(76813)),s=r(63802),a=A(r(71665)),c=A(r(95814)),g=new Date(""),l=u;function u(){var e=this;if(!(this instanceof u))return new u;n.default.call(this,{type:"date"}),this.withMutation((function(){e.transform((function(e){return this.isType(e)?e:(e=(0,i.default)(e))?new Date(e):g}))}))}t.default=l,(0,o.default)(u,n.default,{_typeCheck:function(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t},min:function(e,t){void 0===t&&(t=s.date.min);var r=e;if(!c.default.isRef(r)&&(r=this.cast(e),!this._typeCheck(r)))throw new TypeError("`min` must be a Date or a value that can be `cast()` to a Date");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(e){return(0,a.default)(e)||e>=this.resolve(r)}})},max:function(e,t){void 0===t&&(t=s.date.max);var r=e;if(!c.default.isRef(r)&&(r=this.cast(e),!this._typeCheck(r)))throw new TypeError("`max` must be a Date or a value that can be `cast()` to a Date");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(e){return(0,a.default)(e)||e<=this.resolve(r)}})}}),e.exports=t.default},15966:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.addMethod=function(e,t,r){if(!e||!(0,d.default)(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if("string"!=typeof t)throw new TypeError("A Method name must be provided");if("function"!=typeof r)throw new TypeError("Method function must be provided");e.prototype[t]=r},t.lazy=t.ref=t.boolean=void 0;var n=A(r(16434));t.mixed=n.default;var o=A(r(76595));t.bool=o.default;var i=A(r(45167));t.string=i.default;var s=A(r(72068));t.number=s.default;var a=A(r(41755));t.date=a.default;var c=A(r(51727));t.object=c.default;var g=A(r(18830));t.array=g.default;var l=A(r(95814)),u=A(r(6856)),h=A(r(40828));t.ValidationError=h.default;var p=A(r(43910));t.reach=p.default;var d=A(r(11050));t.isSchema=d.default;var C=A(r(24280));t.setLocale=C.default;var f=o.default;t.boolean=f;t.ref=function(e,t){return new l.default(e,t)};t.lazy=function(e){return new u.default(e)}},63802:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.default=t.array=t.object=t.boolean=t.date=t.number=t.string=t.mixed=void 0;var n=A(r(21043)),o={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:function(e){var t=e.path,r=e.type,A=e.value,o=e.originalValue,i=null!=o&&o!==A,s=t+" must be a `"+r+"` type, but the final value was: `"+(0,n.default)(A,!0)+"`"+(i?" (cast from the value `"+(0,n.default)(o,!0)+"`).":".");return null===A&&(s+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),s}};t.mixed=o;var i={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"};t.string=i;var s={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",notEqual:"${path} must be not equal to ${notEqual}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"};t.number=s;var a={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"};t.date=a;var c={};t.boolean=c;var g={noUnknown:"${path} field cannot have keys not specified in the object shape"};t.object=g;var l={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items"};t.array=l;var u={mixed:o,string:i,number:s,date:a,object:g,array:l,boolean:c};t.default=u},16434:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.default=I;var n=A(r(72912)),o=A(r(15215)),i=A(r(26052)),s=A(r(78700)),a=r(63802),c=A(r(94916)),g=A(r(80180)),l=A(r(22808)),u=A(r(11050)),h=A(r(54107)),p=A(r(21043)),d=A(r(95814)),C=r(43910),f=function(){function e(){this.list=new Set,this.refs=new Map}var t=e.prototype;return t.toArray=function(){return(0,s.default)(this.list).concat((0,s.default)(this.refs.values()))},t.add=function(e){d.default.isRef(e)?this.refs.set(e.key,e):this.list.add(e)},t.delete=function(e){d.default.isRef(e)?this.refs.delete(e.key,e):this.list.delete(e)},t.has=function(e,t){if(this.list.has(e))return!0;for(var r,A=this.refs.values();!(r=A.next()).done;)if(t(r.value)===e)return!0;return!1},e}();function I(e){var t=this;if(void 0===e&&(e={}),!(this instanceof I))return new I;this._deps=[],this._conditions=[],this._options={abortEarly:!0,recursive:!0},this._exclusive=Object.create(null),this._whitelist=new f,this._blacklist=new f,this.tests=[],this.transforms=[],this.withMutation((function(){t.typeError(a.mixed.notType)})),(0,o.default)(e,"default")&&(this._defaultDefault=e.default),this._type=e.type||"mixed"}for(var E=I.prototype={__isYupSchema__:!0,constructor:I,clone:function(){var e=this;return this._mutate?this:(0,i.default)(this,(function(t){if((0,u.default)(t)&&t!==e)return t}))},label:function(e){var t=this.clone();return t._label=e,t},meta:function(e){if(0===arguments.length)return this._meta;var t=this.clone();return t._meta=(0,n.default)(t._meta||{},e),t},withMutation:function(e){var t=this._mutate;this._mutate=!0;var r=e(this);return this._mutate=t,r},concat:function(e){if(!e||e===this)return this;if(e._type!==this._type&&"mixed"!==this._type)throw new TypeError("You cannot `concat()` schema's of different types: "+this._type+" and "+e._type);var t=(0,l.default)(e.clone(),this);return(0,o.default)(e,"_default")&&(t._default=e._default),t.tests=this.tests,t._exclusive=this._exclusive,t.withMutation((function(t){e.tests.forEach((function(e){t.test(e.OPTIONS)}))})),t},isType:function(e){return!(!this._nullable||null!==e)||(!this._typeCheck||this._typeCheck(e))},resolve:function(e){var t=this;if(t._conditions.length){var r=t._conditions;(t=t.clone())._conditions=[],t=(t=r.reduce((function(t,r){return r.resolve(t,e)}),t)).resolve(e)}return t},cast:function(e,t){void 0===t&&(t={});var r=this.resolve((0,n.default)({},t,{value:e})),A=r._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==r.isType(A)){var o=(0,p.default)(e),i=(0,p.default)(A);throw new TypeError("The value of "+(t.path||"field")+' could not be cast to a value that satisfies the schema type: "'+r._type+'". \n\nattempted value: '+o+" \n"+(i!==o?"result of cast: "+i:""))}return A},_cast:function(e){var t=this,r=void 0===e?e:this.transforms.reduce((function(r,A){return A.call(t,r,e)}),e);return void 0===r&&(0,o.default)(this,"_default")&&(r=this.default()),r},_validate:function(e,t){var r=this;void 0===t&&(t={});var A=e,o=null!=t.originalValue?t.originalValue:e,i=this._option("strict",t),s=this._option("abortEarly",t),a=t.sync,c=t.path,l=this._label;i||(A=this._cast(A,(0,n.default)({assert:!1},t)));var u={value:A,path:c,schema:this,options:t,label:l,originalValue:o,sync:a},h=[];return this._typeError&&h.push(this._typeError(u)),this._whitelistError&&h.push(this._whitelistError(u)),this._blacklistError&&h.push(this._blacklistError(u)),(0,g.default)({validations:h,endEarly:s,value:A,path:c,sync:a}).then((function(e){return(0,g.default)({path:c,sync:a,value:e,endEarly:s,validations:r.tests.map((function(e){return e(u)}))})}))},validate:function(e,t){return void 0===t&&(t={}),this.resolve((0,n.default)({},t,{value:e}))._validate(e,t)},validateSync:function(e,t){var r,A;if(void 0===t&&(t={}),this.resolve((0,n.default)({},t,{value:e}))._validate(e,(0,n.default)({},t,{sync:!0})).then((function(e){return r=e})).catch((function(e){return A=e})),A)throw A;return r},isValid:function(e,t){return this.validate(e,t).then((function(){return!0})).catch((function(e){if("ValidationError"===e.name)return!1;throw e}))},isValidSync:function(e,t){try{return this.validateSync(e,t),!0}catch(e){if("ValidationError"===e.name)return!1;throw e}},getDefault:function(e){return void 0===e&&(e={}),this.resolve(e).default()},default:function(e){if(0===arguments.length){var t=(0,o.default)(this,"_default")?this._default:this._defaultDefault;return"function"==typeof t?t.call(this):(0,i.default)(t)}var r=this.clone();return r._default=e,r},strict:function(e){void 0===e&&(e=!0);var t=this.clone();return t._options.strict=e,t},_isPresent:function(e){return null!=e},required:function(e){return void 0===e&&(e=a.mixed.required),this.test({message:e,name:"required",exclusive:!0,test:function(e){return this.schema._isPresent(e)}})},notRequired:function(){var e=this.clone();return e.tests=e.tests.filter((function(e){return"required"!==e.OPTIONS.name})),e},nullable:function(e){void 0===e&&(e=!0);var t=this.clone();return t._nullable=e,t},transform:function(e){var t=this.clone();return t.transforms.push(e),t},test:function(){var e;if(void 0===(e=1===arguments.length?"function"==typeof(arguments.length<=0?void 0:arguments[0])?{test:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]:2===arguments.length?{name:arguments.length<=0?void 0:arguments[0],test:arguments.length<=1?void 0:arguments[1]}:{name:arguments.length<=0?void 0:arguments[0],message:arguments.length<=1?void 0:arguments[1],test:arguments.length<=2?void 0:arguments[2]}).message&&(e.message=a.mixed.default),"function"!=typeof e.test)throw new TypeError("`test` is a required parameters");var t=this.clone(),r=(0,h.default)(e),A=e.exclusive||e.name&&!0===t._exclusive[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t._exclusive[e.name]=!!e.exclusive,t.tests=t.tests.filter((function(t){if(t.OPTIONS.name===e.name){if(A)return!1;if(t.OPTIONS.test===r.OPTIONS.test)return!1}return!0})),t.tests.push(r),t},when:function(e,t){1===arguments.length&&(t=e,e=".");var r=this.clone(),A=[].concat(e).map((function(e){return new d.default(e)}));return A.forEach((function(e){e.isSibling&&r._deps.push(e.key)})),r._conditions.push(new c.default(A,t)),r},typeError:function(e){var t=this.clone();return t._typeError=(0,h.default)({message:e,name:"typeError",test:function(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t},oneOf:function(e,t){void 0===t&&(t=a.mixed.oneOf);var r=this.clone();return e.forEach((function(e){r._whitelist.add(e),r._blacklist.delete(e)})),r._whitelistError=(0,h.default)({message:t,name:"oneOf",test:function(e){if(void 0===e)return!0;var t=this.schema._whitelist;return!!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),r},notOneOf:function(e,t){void 0===t&&(t=a.mixed.notOneOf);var r=this.clone();return e.forEach((function(e){r._blacklist.add(e),r._whitelist.delete(e)})),r._blacklistError=(0,h.default)({message:t,name:"notOneOf",test:function(e){var t=this.schema._blacklist;return!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),r},strip:function(e){void 0===e&&(e=!0);var t=this.clone();return t._strip=e,t},_option:function(e,t){return(0,o.default)(t,e)?t[e]:this._options[e]},describe:function(){var e=this.clone();return{type:e._type,meta:e._meta,label:e._label,tests:e.tests.map((function(e){return{name:e.OPTIONS.name,params:e.OPTIONS.params}})).filter((function(e,t,r){return r.findIndex((function(t){return t.name===e.name}))===t}))}}},B=["validate","validateSync"],y=function(){var e=B[m];E[e+"At"]=function(t,r,A){void 0===A&&(A={});var o=(0,C.getIn)(this,t,r,A.context),i=o.parent,s=o.parentPath;return o.schema[e](i&&i[s],(0,n.default)({},A,{parent:i,path:t}))}},m=0;m{"use strict";var A=r(60087);t.__esModule=!0,t.default=c;var n=A(r(31490)),o=A(r(16434)),i=r(63802),s=A(r(71665)),a=function(e){return(0,s.default)(e)||e===(0|e)};function c(){var e=this;if(!(this instanceof c))return new c;o.default.call(this,{type:"number"}),this.withMutation((function(){e.transform((function(e){var t=e;if("string"==typeof t){if(""===(t=t.replace(/\s/g,"")))return NaN;t=+t}return this.isType(t)?t:parseFloat(t)}))}))}(0,n.default)(c,o.default,{_typeCheck:function(e){return e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!function(e){return e!=+e}(e)},min:function(e,t){return void 0===t&&(t=i.number.min),this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return(0,s.default)(t)||t>=this.resolve(e)}})},max:function(e,t){return void 0===t&&(t=i.number.max),this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return(0,s.default)(t)||t<=this.resolve(e)}})},lessThan:function(e,t){return void 0===t&&(t=i.number.lessThan),this.test({message:t,name:"max",exclusive:!0,params:{less:e},test:function(t){return(0,s.default)(t)||tthis.resolve(e)}})},positive:function(e){return void 0===e&&(e=i.number.positive),this.moreThan(0,e)},negative:function(e){return void 0===e&&(e=i.number.negative),this.lessThan(0,e)},integer:function(e){return void 0===e&&(e=i.number.integer),this.test({name:"integer",message:e,test:a})},truncate:function(){return this.transform((function(e){return(0,s.default)(e)?e:0|e}))},round:function(e){var t=["ceil","floor","round","trunc"];if("trunc"===(e=e&&e.toLowerCase()||"round"))return this.truncate();if(-1===t.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+t.join(", "));return this.transform((function(t){return(0,s.default)(t)?t:Math[e](t)}))}}),e.exports=t.default},51727:(e,t,r)=>{"use strict";var A=r(19228),n=r(60087);t.__esModule=!0,t.default=w;var o=n(r(62407)),i=n(r(72912)),s=n(r(15215)),a=n(r(36494)),c=n(r(89170)),g=n(r(5253)),l=n(r(89612)),u=r(79588),h=n(r(16434)),p=r(63802),d=n(r(18417)),C=n(r(23316)),f=n(r(31490)),I=n(r(7045)),E=A(r(80180));function B(){var e=(0,o.default)(["",".",""]);return B=function(){return e},e}function y(){var e=(0,o.default)(["",".",""]);return y=function(){return e},e}var m=function(e){return"[object Object]"===Object.prototype.toString.call(e)};function w(e){var t=this;if(!(this instanceof w))return new w(e);h.default.call(this,{type:"object",default:function(){var e=this;if(this._nodes.length){var t={};return this._nodes.forEach((function(r){t[r]=e.fields[r].default?e.fields[r].default():void 0})),t}}}),this.fields=Object.create(null),this._nodes=[],this._excludedEdges=[],this.withMutation((function(){t.transform((function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})),e&&t.shape(e)}))}(0,f.default)(w,h.default,{_typeCheck:function(e){return m(e)||"function"==typeof e},_cast:function(e,t){var r=this;void 0===t&&(t={});var A=h.default.prototype._cast.call(this,e,t);if(void 0===A)return this.default();if(!this._typeCheck(A))return A;var n=this.fields,o=!0===this._option("stripUnknown",t),a=this._nodes.concat(Object.keys(A).filter((function(e){return-1===r._nodes.indexOf(e)}))),c={},g=(0,i.default)({},t,{parent:c,__validating:!1}),l=!1;return a.forEach((function(e){var r=n[e],i=(0,s.default)(A,e);if(r){var a,u=r._options&&r._options.strict;if(g.path=(0,I.default)(y(),t.path,e),g.value=A[e],!0===(r=r.resolve(g))._strip)return void(l=l||e in A);void 0!==(a=t.__validating&&u?A[e]:r.cast(A[e],g))&&(c[e]=a)}else i&&!o&&(c[e]=A[e]);c[e]!==A[e]&&(l=!0)})),l?c:A},_validate:function(e,t){var r,A,n=this;void 0===t&&(t={});var o=t.sync,s=[],a=null!=t.originalValue?t.originalValue:e;return r=this._option("abortEarly",t),A=this._option("recursive",t),t=(0,i.default)({},t,{__validating:!0,originalValue:a}),h.default.prototype._validate.call(this,e,t).catch((0,E.propagateErrors)(r,s)).then((function(e){if(!A||!m(e)){if(s.length)throw s[0];return e}a=a||e;var c=n._nodes.map((function(r){var A=(0,I.default)(B(),t.path,r),o=n.fields[r],s=(0,i.default)({},t,{path:A,parent:e,originalValue:a[r]});return o&&o.validate?(s.strict=!0,o.validate(e[r],s)):Promise.resolve(!0)}));return(0,E.default)({sync:o,validations:c,value:e,errors:s,endEarly:r,path:t.path,sort:(0,C.default)(n.fields)})}))},concat:function(e){var t=h.default.prototype.concat.call(this,e);return t._nodes=(0,d.default)(t.fields,t._excludedEdges),t},shape:function(e,t){void 0===t&&(t=[]);var r=this.clone(),A=(0,i.default)(r.fields,e);if(r.fields=A,t.length){Array.isArray(t[0])||(t=[t]);var n=t.map((function(e){return e[0]+"-"+e[1]}));r._excludedEdges=r._excludedEdges.concat(n)}return r._nodes=(0,d.default)(A,r._excludedEdges),r},from:function(e,t,r){var A=(0,u.getter)(e,!0);return this.transform((function(n){if(null==n)return n;var o=n;return(0,s.default)(n,e)&&(o=(0,i.default)({},n),r||delete o[e],o[t]=A(n)),o}))},noUnknown:function(e,t){void 0===e&&(e=!0),void 0===t&&(t=p.object.noUnknown),"string"==typeof e&&(t=e,e=!0);var r=this.test({name:"noUnknown",exclusive:!0,message:t,test:function(t){return null==t||!e||0===function(e,t){var r=Object.keys(e.fields);return Object.keys(t).filter((function(e){return-1===r.indexOf(e)}))}(this.schema,t).length}});return r._options.stripUnknown=e,r},unknown:function(e,t){return void 0===e&&(e=!0),void 0===t&&(t=p.object.noUnknown),this.noUnknown(!e,t)},transformKeys:function(e){return this.transform((function(t){return t&&(0,g.default)(t,(function(t,r){return e(r)}))}))},camelCase:function(){return this.transformKeys(c.default)},snakeCase:function(){return this.transformKeys(a.default)},constantCase:function(){return this.transformKeys((function(e){return(0,a.default)(e).toUpperCase()}))},describe:function(){var e=h.default.prototype.describe.call(this);return e.fields=(0,l.default)(this.fields,(function(e){return e.describe()})),e}}),e.exports=t.default},24280:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.default=function(e){Object.keys(e).forEach((function(t){Object.keys(e[t]).forEach((function(r){n.default[t][r]=e[t][r]}))}))};var n=A(r(63802));e.exports=t.default},45167:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.default=l;var n=A(r(31490)),o=A(r(16434)),i=r(63802),s=A(r(71665)),a=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,c=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,g=function(e){return(0,s.default)(e)||e===e.trim()};function l(){var e=this;if(!(this instanceof l))return new l;o.default.call(this,{type:"string"}),this.withMutation((function(){e.transform((function(e){return this.isType(e)?e:null!=e&&e.toString?e.toString():e}))}))}(0,n.default)(l,o.default,{_typeCheck:function(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e},_isPresent:function(e){return o.default.prototype._cast.call(this,e)&&e.length>0},length:function(e,t){return void 0===t&&(t=i.string.length),this.test({message:t,name:"length",exclusive:!0,params:{length:e},test:function(t){return(0,s.default)(t)||t.length===this.resolve(e)}})},min:function(e,t){return void 0===t&&(t=i.string.min),this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return(0,s.default)(t)||t.length>=this.resolve(e)}})},max:function(e,t){return void 0===t&&(t=i.string.max),this.test({name:"max",exclusive:!0,message:t,params:{max:e},test:function(t){return(0,s.default)(t)||t.length<=this.resolve(e)}})},matches:function(e,t){var r,A=!1;return t&&(t.message||t.hasOwnProperty("excludeEmptyString")?(A=t.excludeEmptyString,r=t.message):r=t),this.test({message:r||i.string.matches,params:{regex:e},test:function(t){return(0,s.default)(t)||""===t&&A||e.test(t)}})},email:function(e){return void 0===e&&(e=i.string.email),this.matches(a,{message:e,excludeEmptyString:!0})},url:function(e){return void 0===e&&(e=i.string.url),this.matches(c,{message:e,excludeEmptyString:!0})},ensure:function(){return this.default("").transform((function(e){return null===e?"":e}))},trim:function(e){return void 0===e&&(e=i.string.trim),this.transform((function(e){return null!=e?e.trim():e})).test({message:e,name:"trim",test:g})},lowercase:function(e){return void 0===e&&(e=i.string.lowercase),this.transform((function(e){return(0,s.default)(e)?e:e.toLowerCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return(0,s.default)(e)||e===e.toLowerCase()}})},uppercase:function(e){return void 0===e&&(e=i.string.uppercase),this.transform((function(e){return(0,s.default)(e)?e:e.toUpperCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return(0,s.default)(e)||e===e.toUpperCase()}})}}),e.exports=t.default},54107:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.createErrorFactory=l,t.default=function(e){var t=e.name,r=e.message,A=e.test,i=e.params;function g(e){var g=e.value,u=e.path,h=e.label,p=e.options,d=e.originalValue,C=e.sync,f=(0,n.default)(e,["value","path","label","options","originalValue","sync"]),I=p.parent,E=function(e){return a.default.isRef(e)?e.getValue({value:g,parent:I,context:p.context}):e},B=l({message:r,path:u,value:g,originalValue:d,params:i,label:h,resolve:E,name:t}),y=(0,o.default)({path:u,parent:I,type:t,createError:B,resolve:E,options:p},f);return function(e,t,r,A){var n=e.call(t,r);if(!A)return Promise.resolve(n);if(o=n,o&&"function"==typeof o.then&&"function"==typeof o.catch)throw new Error('Validation test of type: "'+t.type+'" returned a Promise during a synchronous validate. This test will finish after the validate call has returned');var o;return c.SynchronousPromise.resolve(n)}(A,y,g,C).then((function(e){if(s.default.isError(e))throw e;if(!e)throw B()}))}return g.OPTIONS=e,g};var n=A(r(74943)),o=A(r(72912)),i=A(r(89612)),s=A(r(40828)),a=A(r(95814)),c=r(93255),g=s.default.formatError;function l(e){var t=e.value,r=e.label,A=e.resolve,a=e.originalValue,c=(0,n.default)(e,["value","label","resolve","originalValue"]);return function(e){var n=void 0===e?{}:e,l=n.path,u=void 0===l?c.path:l,h=n.message,p=void 0===h?c.message:h,d=n.type,C=void 0===d?c.name:d,f=n.params;return f=(0,o.default)({path:u,value:t,originalValue:a,label:r},function(e,t,r){return(0,i.default)((0,o.default)({},e,t),r)}(c.params,f,A)),(0,o.default)(new s.default(g(p,f),t,u,C),{params:f})}}},31490:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.default=function(e,t,r){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),(0,n.default)(e.prototype,r)};var n=A(r(72912));e.exports=t.default},71665:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0;t.default=function(e){return null==e},e.exports=t.default},11050:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0;t.default=function(e){return e&&e.__isYupSchema__},e.exports=t.default},76813:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){var t,A,n=[1,4,5,6,7,10,11],o=0;if(A=r.exec(e)){for(var i,s=0;i=n[s];++s)A[i]=+A[i]||0;A[2]=(+A[2]||1)-1,A[3]=+A[3]||1,A[7]=A[7]?String(A[7]).substr(0,3):0,void 0!==A[8]&&""!==A[8]||void 0!==A[9]&&""!==A[9]?("Z"!==A[8]&&void 0!==A[9]&&(o=60*A[10]+A[11],"+"===A[9]&&(o=0-o)),t=Date.UTC(A[1],A[2],A[3],A[4],A[5]+o,A[6],A[7])):t=+new Date(A[1],A[2],A[3],A[4],A[5],A[6],A[7])}else t=Date.parse?Date.parse(e):NaN;return t};var r=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;e.exports=t.default},7045:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),A=1;A{"use strict";var A=r(60087);t.__esModule=!0,t.default=function e(t,r){for(var A in r)if((0,n.default)(r,A)){var s=r[A],a=t[A];if(void 0===a)t[A]=s;else{if(a===s)continue;(0,o.default)(a)?(0,o.default)(s)&&(t[A]=s.concat(a)):i(a)?i(s)&&(t[A]=e(a,s)):Array.isArray(a)&&Array.isArray(s)&&(t[A]=s.concat(a))}}return t};var n=A(r(15215)),o=A(r(11050)),i=function(e){return"[object Object]"===Object.prototype.toString.call(e)};e.exports=t.default},21043:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t){var r=s(e,t);return null!==r?r:JSON.stringify(e,(function(e,r){var A=s(this[e],t);return null!==A?A:r}),2)};var r=Object.prototype.toString,A=Error.prototype.toString,n=RegExp.prototype.toString,o="undefined"!=typeof Symbol?Symbol.prototype.toString:function(){return""},i=/^Symbol\((.*)\)(.*)$/;function s(e,t){if(void 0===t&&(t=!1),null==e||!0===e||!1===e)return""+e;var s=typeof e;if("number"===s)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===s)return t?'"'+e+'"':e;if("function"===s)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===s)return o.call(e).replace(i,"Symbol($1)");var a=r.call(e).slice(8,-1);return"Date"===a?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===a||e instanceof Error?"["+A.call(e)+"]":"RegExp"===a?n.call(e):null}e.exports=t.default},43910:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.getIn=i,t.default=void 0;var n=r(79588),o=A(r(15215));function i(e,t,r,A){var i,s,a;return A=A||r,t?((0,n.forEach)(t,(function(n,c,g){var l=c?function(e){return e.substr(0,e.length-1).substr(1)}(n):n;if(g||(0,o.default)(e,"_subType")){var u=g?parseInt(l,10):0;if(e=e.resolve({context:A,parent:i,value:r})._subType,r){if(g&&u>=r.length)throw new Error("Yup.reach cannot resolve an array item at index: "+n+", in the path: "+t+". because there is no value at that index. ");r=r[u]}}if(!g){if(e=e.resolve({context:A,parent:i,value:r}),!(0,o.default)(e,"fields")||!(0,o.default)(e.fields,l))throw new Error("The schema does not contain the path: "+t+". (failed at: "+a+' which is a type: "'+e._type+'") ');e=e.fields[l],i=r,r=r&&r[l],s=l,a=c?"["+n+"]":"."+n}})),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}var s=function(e,t,r,A){return i(e,t,r,A).schema};t.default=s},80180:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.propagateErrors=function(e,t){return e?null:function(e){return t.push(e),e.value}},t.settled=a,t.collectErrors=c,t.default=function(e){var t=e.endEarly,r=(0,n.default)(e,["endEarly"]);return t?function(e,t,r){return s(r).all(e).catch((function(e){throw"ValidationError"===e.name&&(e.value=t),e})).then((function(){return t}))}(r.validations,r.value,r.sync):c(r)};var n=A(r(74943)),o=r(93255),i=A(r(40828)),s=function(e){return e?o.SynchronousPromise:Promise};function a(e,t){var r=s(t);return r.all(e.map((function(e){return r.resolve(e).then((function(e){return{fulfilled:!0,value:e}}),(function(e){return{fulfilled:!1,value:e}}))})))}function c(e){var t=e.validations,r=e.value,A=e.path,n=e.sync,o=e.errors,s=e.sort;return o=function(e){return void 0===e&&(e=[]),e.inner&&e.inner.length?e.inner:[].concat(e)}(o),a(t,n).then((function(e){var t=e.filter((function(e){return!e.fulfilled})).reduce((function(e,t){var r=t.value;if(!i.default.isError(r))throw r;return e.concat(r)}),[]);if(s&&t.sort(s),(o=t.concat(o)).length)throw new i.default(o,r,A);return r}))}},23316:(e,t)=>{"use strict";function r(e,t){var r=1/0;return e.some((function(e,A){if(-1!==t.path.indexOf(e))return r=A,!0})),r}t.__esModule=!0,t.default=function(e){var t=Object.keys(e);return function(e,A){return r(t,e)-r(t,A)}},e.exports=t.default},18417:(e,t,r)=>{"use strict";var A=r(60087);t.__esModule=!0,t.default=function(e,t){void 0===t&&(t=[]);var r=[],A=[];function c(e,n){var o=(0,i.split)(e)[0];~A.indexOf(o)||A.push(o),~t.indexOf(n+"-"+o)||r.push([n,o])}for(var g in e)if((0,n.default)(e,g)){var l=e[g];~A.indexOf(g)||A.push(g),s.default.isRef(l)&&l.isSibling?c(l.path,g):(0,a.default)(l)&&l._deps&&l._deps.forEach((function(e){return c(e,g)}))}return o.default.array(A,r).reverse()};var n=A(r(15215)),o=A(r(75158)),i=r(79588),s=A(r(95814)),a=A(r(11050));e.exports=t.default},60306:e=>{"use strict";e.exports=JSON.parse('{"name":"@yarnpkg/cli","version":"2.4.0","license":"BSD-2-Clause","main":"./sources/index.ts","dependencies":{"@yarnpkg/core":"workspace:^2.4.0","@yarnpkg/fslib":"workspace:^2.4.0","@yarnpkg/libzip":"workspace:^2.2.1","@yarnpkg/parsers":"workspace:^2.3.0","@yarnpkg/plugin-compat":"workspace:^2.2.0","@yarnpkg/plugin-dlx":"workspace:^2.1.4","@yarnpkg/plugin-essentials":"workspace:^2.4.0","@yarnpkg/plugin-file":"workspace:^2.2.0","@yarnpkg/plugin-git":"workspace:^2.3.0","@yarnpkg/plugin-github":"workspace:^2.1.2","@yarnpkg/plugin-http":"workspace:^2.1.2","@yarnpkg/plugin-init":"workspace:^2.2.2","@yarnpkg/plugin-link":"workspace:^2.1.1","@yarnpkg/plugin-node-modules":"workspace:^2.3.0","@yarnpkg/plugin-npm":"workspace:^2.4.0","@yarnpkg/plugin-npm-cli":"workspace:^2.3.0","@yarnpkg/plugin-pack":"workspace:^2.2.3","@yarnpkg/plugin-patch":"workspace:^2.1.2","@yarnpkg/plugin-pnp":"workspace:^2.4.0","@yarnpkg/shell":"workspace:^2.4.1","chalk":"^3.0.0","ci-info":"^2.0.0","clipanion":"^2.6.2","fromentries":"^1.2.0","semver":"^7.1.2","tslib":"^1.13.0","yup":"^0.27.0"},"devDependencies":{"@types/ci-info":"^2","@types/yup":"0.26.12","@yarnpkg/builder":"workspace:^2.1.3","@yarnpkg/monorepo":"workspace:0.0.0","@yarnpkg/pnpify":"workspace:^2.4.0","micromatch":"^4.0.2","typescript":"4.1.0-beta"},"peerDependencies":{"@yarnpkg/core":"^2.4.0"},"scripts":{"postpack":"rm -rf lib","prepack":"run build:compile \\"$(pwd)\\"","build:cli+hook":"run build:pnp:hook && builder build bundle","build:cli":"builder build bundle","run:cli":"builder run","update-local":"run build:cli --no-git-hash && rsync -a --delete bundles/ bin/"},"publishConfig":{"main":"./lib/index.js","types":"./lib/index.d.ts","bin":null},"files":["/lib/**/*","!/lib/pluginConfiguration.*","!/lib/cli.*"],"@yarnpkg/builder":{"bundles":{"standard":["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-dlx","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-link","@yarnpkg/plugin-node-modules","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp"]}},"repository":{"type":"git","url":"ssh://git@github.com/yarnpkg/berry.git"},"engines":{"node":">=10.19.0"}}')},98497:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=98497,e.exports=t},32178:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=32178,e.exports=t},3368:(e,t,r)=>{var A,n=Object.assign({},r(35747)),o=void 0!==o?o:{},i={};for(A in o)o.hasOwnProperty(A)&&(i[A]=o[A]);var s,a,c,g,l=[],u="";u=__dirname+"/",s=function(e,t){var A=Qe(e);return A?t?A:A.toString():(c||(c=n),g||(g=r(85622)),e=g.normalize(e),c.readFileSync(e,t?null:"utf8"))},a=function(e){var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),E(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),l=process.argv.slice(2),e.exports=o,o.inspect=function(){return"[Emscripten Module object]"};var h=o.print||console.log.bind(console),p=o.printErr||console.warn.bind(console);for(A in i)i.hasOwnProperty(A)&&(o[A]=i[A]);i=null,o.arguments&&(l=o.arguments),o.thisProgram&&o.thisProgram,o.quit&&o.quit;var d,C;o.wasmBinary&&(d=o.wasmBinary),o.noExitRuntime&&o.noExitRuntime,"object"!=typeof WebAssembly&&_("no native wasm support detected");var f=new WebAssembly.Table({initial:31,maximum:31,element:"anyfunc"}),I=!1;function E(e,t){e||_("Assertion failed: "+t)}function B(e){var t=o["_"+e];return E(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function y(e,t,r,A,n){var o={string:function(e){var t=0;if(null!=e&&0!==e){var r=1+(e.length<<2);b(e,t=xe(r),r)}return t},array:function(e){var t=xe(e.length);return function(e,t){N.set(e,t)}(e,t),t}};var i=B(e),s=[],a=0;if(A)for(var c=0;c=A);)++n;if(n-t>16&&e.subarray&&m)return m.decode(e.subarray(t,n));for(var o="";t>10,56320|1023&c)}}else o+=String.fromCharCode((31&i)<<6|s)}else o+=String.fromCharCode(i)}return o}function Q(e,t){return e?w(F,e,t):""}function D(e,t,r,A){if(!(A>0))return 0;for(var n=r,o=r+A-1,i=0;i=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i);if(s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-n}function b(e,t,r){return D(e,F,t,r)}function v(e){for(var t=0,r=0;r=55296&&A<=57343&&(A=65536+((1023&A)<<10)|1023&e.charCodeAt(++r)),A<=127?++t:t+=A<=2047?2:A<=65535?3:4}return t}function S(e){var t=v(e)+1,r=Le(t);return r&&D(e,N,r,t),r}var k,N,F,K,M,R,x;function L(e){k=e,o.HEAP8=N=new Int8Array(e),o.HEAP16=K=new Int16Array(e),o.HEAP32=M=new Int32Array(e),o.HEAPU8=F=new Uint8Array(e),o.HEAPU16=new Uint16Array(e),o.HEAPU32=new Uint32Array(e),o.HEAPF32=R=new Float32Array(e),o.HEAPF64=x=new Float64Array(e)}var P=o.INITIAL_MEMORY||16777216;(C=o.wasmMemory?o.wasmMemory:new WebAssembly.Memory({initial:P/65536,maximum:32768}))&&(k=C.buffer),P=k.byteLength,L(k);var O=[],U=[],T=[],j=[];var Y=Math.abs,G=Math.ceil,H=Math.floor,J=Math.min,q=0,z=null,W=null;function X(e){q++,o.monitorRunDependencies&&o.monitorRunDependencies(q)}function V(e){if(q--,o.monitorRunDependencies&&o.monitorRunDependencies(q),0==q&&(null!==z&&(clearInterval(z),z=null),W)){var t=W;W=null,t()}}function _(e){throw o.onAbort&&o.onAbort(e),p(e+=""),I=!0,1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}o.preloadedImages={},o.preloadedAudios={};function Z(e){return t=e,r="data:application/octet-stream;base64,",String.prototype.startsWith?t.startsWith(r):0===t.indexOf(r);var t,r}var $,ee,te,re="data:application/octet-stream;base64,AGFzbQEAAAAB0QIwYAF/AX9gA39/fwF/Y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ICJAAgAiAANgIYIAIgATcDECACIAIoAhhCCBAfNgIMAkAgAigCDEUEQCACQX82AhwMAQsgAigCDCACKQMQQv8BgzwAACACKAIMIAIpAxBCCIhC/wGDPAABIAIoAgwgAikDEEIQiEL/AYM8AAIgAigCDCACKQMQQhiIQv8BgzwAAyACKAIMIAIpAxBCIIhC/wGDPAAEIAIoAgwgAikDEEIoiEL/AYM8AAUgAigCDCACKQMQQjCIQv8BgzwABiACKAIMIAIpAxBCOIhC/wGDPAAHIAJBADYCHAsgAigCHBogAkEgaiQAC4sDAQF/IwBBMGsiAyQAIAMgADYCJCADIAE2AiAgAyACNwMYAkAgAygCJC0AKEEBcQRAIANCfzcDKAwBCwJAAkAgAygCJCgCIEEATQ0AIAMpAxhC////////////AFYNACADKQMYQgBYDQEgAygCIA0BCyADKAIkQQxqQRJBABAVIANCfzcDKAwBCyADKAIkLQA1QQFxBEAgA0J/NwMoDAELAn8jAEEQayIAIAMoAiQ2AgwgACgCDC0ANEEBcQsEQCADQgA3AygMAQsgAykDGFAEQCADQgA3AygMAQsgA0IANwMQA0AgAykDECADKQMYVARAIAMgAygCJCADKAIgIAMpAxCnaiADKQMYIAMpAxB9QQEQIiICNwMIIAJCAFMEQCADKAIkQQE6ADUgAykDEFAEQCADQn83AygMBAsgAyADKQMQNwMoDAMLIAMpAwhQBEAgAygCJEEBOgA0BSADIAMpAwggAykDEHw3AxAMAgsLCyADIAMpAxA3AygLIAMpAyghAiADQTBqJAAgAgs2AQF/IwBBEGsiASAANgIMAn4gASgCDC0AAEEBcQRAIAEoAgwpAwggASgCDCkDEH0MAQtCAAsLsgECAX8BfiMAQRBrIgEkACABIAA2AgQgASABKAIEQggQHzYCAAJAIAEoAgBFBEAgAUIANwMIDAELIAEgASgCAC0AAK0gASgCAC0AB61COIYgASgCAC0ABq1CMIZ8IAEoAgAtAAWtQiiGfCABKAIALQAErUIghnwgASgCAC0AA61CGIZ8IAEoAgAtAAKtQhCGfCABKAIALQABrUIIhnx8NwMICyABKQMIIQIgAUEQaiQAIAILqAEBAX8jAEEQayIBJAAgASAANgIIAkAgASgCCCgCIEEATQRAIAEoAghBDGpBEkEAEBUgAUF/NgIMDAELIAEoAggiACAAKAIgQX9qNgIgIAEoAggoAiBFBEAgASgCCEEAQgBBAhAiGiABKAIIKAIABEAgASgCCCgCABAyQQBIBEAgASgCCEEMakEUQQAQFQsLCyABQQA2AgwLIAEoAgwhACABQRBqJAAgAAvxAgICfwF+AkAgAkUNACAAIAJqIgNBf2ogAToAACAAIAE6AAAgAkEDSQ0AIANBfmogAToAACAAIAE6AAEgA0F9aiABOgAAIAAgAToAAiACQQdJDQAgA0F8aiABOgAAIAAgAToAAyACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiADYCACADIAIgBGtBfHEiAmoiAUF8aiAANgIAIAJBCUkNACADIAA2AgggAyAANgIEIAFBeGogADYCACABQXRqIAA2AgAgAkEZSQ0AIAMgADYCGCADIAA2AhQgAyAANgIQIAMgADYCDCABQXBqIAA2AgAgAUFsaiAANgIAIAFBaGogADYCACABQWRqIAA2AgAgAiADQQRxQRhyIgFrIgJBIEkNACAArSIFQiCGIAWEIQUgASADaiEBA0AgASAFNwMYIAEgBTcDECABIAU3AwggASAFNwMAIAFBIGohASACQWBqIgJBH0sNAAsLC9wBAQF/IwBBEGsiASQAIAEgADYCDCABKAIMBEAgASgCDCgCKARAIAEoAgwoAihBADYCKCABKAIMKAIoQgA3AyAgASgCDAJ+IAEoAgwpAxggASgCDCkDIFYEQCABKAIMKQMYDAELIAEoAgwpAyALNwMYCyABIAEoAgwpAxg3AwADQCABKQMAIAEoAgwpAwhaRQRAIAEoAgwoAgAgASkDAKdBBHRqKAIAEBYgASABKQMAQgF8NwMADAELCyABKAIMKAIAEBYgASgCDCgCBBAWIAEoAgwQFgsgAUEQaiQAC2ACAX8BfiMAQRBrIgEkACABIAA2AgQCQCABKAIEKAIkQQFHBEAgASgCBEEMakESQQAQFSABQn83AwgMAQsgASABK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KAJIRQRAIAMoApABECQgA0F/NgKsAQwDCyADKAJIIAMoApABNgIAIAMgAygCSDYCkAELCwJAIAMoAqQBLwFSRQRAIAMoAqQBIgAgAC8BDEH+/wNxOwEMDAELIAMoAqQBIgAgAC8BDEEBcjsBDAsgAyADKAKkASADKAKgARCAAUEBcToAhgEgAyADKAKgAUGACnFBgApHBH8gAy0AhgEFQQELQQFxOgCHASADAn9BASADKAKkAS8BUkGBAkYNABpBASADKAKkAS8BUkGCAkYNABogAygCpAEvAVJBgwJGC0EBcToAhQEgAy0AhwFBAXEEQCADIANBIGpCHBAqNgIcIAMoAhxFBEAgAygCqAFBCGpBDkEAEBUgAygCkAEQJCADQX82AqwBDAILAkAgAygCoAFBgAJxBEACQCADKAKgAUGACHENACADKAKkASkDIEL/////D1YNACADKAKkASkDKEL/////D1gNAgsgAygCHCADKAKkASkDKBAuIAMoAhwgAygCpAEpAyAQLgwBCwJAAkAgAygCoAFBgAhxDQAgAygCpAEpAyBC/////w9WDQAgAygCpAEpAyhC/////w9WDQAgAygCpAEpA0hC/////w9YDQELIAMoAqQBKQMoQv////8PWgRAIAMoAhwgAygCpAEpAygQLgsgAygCpAEpAyBC/////w9aBEAgAygCHCADKAKkASkDIBAuCyADKAKkASkDSEL/////D1oEQCADKAIcIAMoAqQBKQNIEC4LCwsCfyMAQRBrIgAgAygCHDYCDCAAKAIMLQAAQQFxRQsEQCADKAKoAUEIakEUQQAQFSADKAIcEBcgAygCkAEQJCADQX82AqwBDAILIANBAQJ/IwBBEGsiACADKAIcNgIMAn4gACgCDC0AAEEBcQRAIAAoAgwpAxAMAQtCAAunQf//A3ELIANBIGpBgAYQUDYCjAEgAygCHBAXIAMoAowBIAMoApABNgIAIAMgAygCjAE2ApABCyADLQCFAUEBcQRAIAMgA0EVakIHECo2AhAgAygCEEUEQCADKAKoAUEIakEOQQAQFSADKAKQARAkIANBfzYCrAEMAgsgAygCEEECECAgAygCEEHP0wBBAhBAIAMoAhAgAygCpAEvAVJB/wFxEIoBIAMoAhAgAygCpAEoAhBB//8DcRAgAn8jAEEQayIAIAMoAhA2AgwgACgCDC0AAEEBcUULBEAgAygCqAFBCGpBFEEAEBUgAygCEBAXIAMoApABECQgA0F/NgKsAQwCCyADQYGyAkEHIANBFWpBgAYQUDYCDCADKAIQEBcgAygCDCADKAKQATYCACADIAMoAgw2ApABCyADIANB0ABqQi4QKiIANgJMIABFBEAgAygCqAFBCGpBDkEAEBUgAygCkAEQJCADQX82AqwBDAELIAMoAkxBxdMAQcrTACADKAKgAUGAAnEbQQQQQCADKAKgAUGAAnFFBEAgAygCTAJ/QS0gAy0AhgFBAXENABogAygCpAEvAQgLQf//A3EQIAsgAygCTAJ/QS0gAy0AhgFBAXENABogAygCpAEvAQoLQf//A3EQICADKAJMIAMoAqQBLwEMECACQCADLQCFAUEBcQRAIAMoAkxB4wAQIAwBCyADKAJMIAMoAqQBKAIQQf//A3EQIAsgAygCpAEoAhQgA0GeAWogA0GcAWoQwwEgAygCTCADLwGeARAgIAMoAkwgAy8BnAEQIAJAAkAgAy0AhQFBAXFFDQAgAygCpAEpAyhCFFoNACADKAJMQQAQIQwBCyADKAJMIAMoAqQBKAIYECELAkACQCADKAKgAUGAAnFBgAJHDQAgAygCpAEpAyBC/////w9UBEAgAygCpAEpAyhC/////w9UDQELIAMoAkxBfxAhIAMoAkxBfxAhDAELAkAgAygCpAEpAyBC/////w9UBEAgAygCTCADKAKkASkDIKcQIQwBCyADKAJMQX8QIQsCQCADKAKkASkDKEL/////D1QEQCADKAJMIAMoAqQBKQMopxAhDAELIAMoAkxBfxAhCwsgAygCTCADKAKkASgCMBBSQf//A3EQICADIAMoAqQBKAI0IAMoAqABEIIBQf//A3EgAygCkAFBgAYQggFB//8DcWo2AogBIAMoAkwgAygCiAFB//8DcRAgIAMoAqABQYACcUUEQCADKAJMIAMoAqQBKAI4EFJB//8DcRAgIAMoAkwgAygCpAEoAjxB//8DcRAgIAMoAkwgAygCpAEvAUAQICADKAJMIAMoAqQBK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YCHAsgBCgCHCEAIARBIGokACAAC4EGAgF/AX4jAEGQAWsiAyQAIAMgADYChAEgAyABNgKAASADIAI2AnwgAxBdAkAgAygCgAEpAwhCAFIEQCADIAMoAoABKAIAKAIAKQNINwNgIAMgAygCgAEoAgAoAgApA0g3A2gMAQsgA0IANwNgIANCADcDaAsgA0IANwNwAkADQCADKQNwIAMoAoABKQMIVARAIAMoAoABKAIAIAMpA3CnQQR0aigCACkDSCADKQNoVARAIAMgAygCgAEoAgAgAykDcKdBBHRqKAIAKQNINwNoCyADKQNoIAMoAoABKQMgVgRAIAMoAnxBE0EAEBUgA0J/NwOIAQwDCyADIAMoAoABKAIAIAMpA3CnQQR0aigCACkDSCADKAKAASgCACADKQNwp0EEdGooAgApAyB8IAMoAoABKAIAIAMpA3CnQQR0aigCACgCMBBSQf//A3GtfEIefDcDWCADKQNYIAMpA2BWBEAgAyADKQNYNwNgCyADKQNgIAMoAoABKQMgVgRAIAMoAnxBE0EAEBUgA0J/NwOIAQwDCyADKAKEASgCACADKAKAASgCACADKQNwp0EEdGooAgApA0hBABAoQQBIBEAgAygCfCADKAKEASgCABAYIANCfzcDiAEMAwsgAyADKAKEASgCAEEAQQEgAygCfBDCAUJ/UQRAIAMQXCADQn83A4gBDAMLIAMoAoABKAIAIAMpA3CnQQR0aigCACADEPEBBEAgAygCfEEVQQAQFSADEFwgA0J/NwOIAQwDBSADKAKAASgCACADKQNwp0EEdGooAgAoAjQgAygCNBCFASEAIAMoAoABKAIAIAMpA3CnQQR0aigCACAANgI0IAMoAoABKAIAIAMpA3CnQQR0aigCAEEBOgAEIANBADYCNCADEFwgAyADKQNwQgF8NwNwDAILAAsLIAMCfiADKQNgIAMpA2h9Qv///////////wBUBEAgAykDYCADKQNofQwBC0L///////////8ACzcDiAELIAMpA4gBIQQgA0GQAWokACAEC6YBAQF/IwBBIGsiAyQAIAMgADYCGCADIAE2AhQgAyACNgIQIAMgAygCEBD6ASIANgIMAkAgAEUEQCADQQA2AhwMAQsg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ai8BAEcNACADKAIQIAMoAhxB2Chqai0AACADKAIcQdwWaiADKAIMQQJ0aigCACADKAIcQdgoamotAABKDQAMAQsgAygCHEHcFmogAygCFEECdGogAygCHEHcFmogAygCDEECdGooAgA2AgAgAyADKAIMNgIUIAMgAygCDEEBdDYCDAwBCwsgAygCHEHcFmogAygCFEECdGogAygCEDYCAAvnCAEDfyMAQTBrIgIkACACIAA2AiwgAiABNgIoIAIgAigCKCgCADYCJCACIAIoAigoAggoAgA2AiAgAiACKAIoKAIIKAIMNgIcIAJBfzYCECACKAIsQQA2AtAoIAIoAixBvQQ2AtQoIAJBADYCGANAIAIoAhggAigCHE5FBEACQCACKAIkIAIoAhhBAnRqLwEABEAgAiACKAIYIgE2AhAgAigCLEHcFmohAyACKAIsIgQoAtAoQQFqIQAgBCAANgLQKCAAQQJ0IANqIAE2AgAgAigCGCACKAIsQdgoampBADoAAAwBCyACKAIkIAIoAhhBAnRqQQA7AQILIAIgAigCGEEBajYCGAwBCwsDQCACKAIsKALQKEECSARAAkAgAigCEEECSARAIAIgAigCEEEBaiIANgIQDAELQQAhAAsgAigCLEHcFmohAyACKAIsIgQoAtAoQQFqIQEgBCABNgLQKCABQQJ0IANqIAA2AgAgAiAANgIMIAIoAiQgAigCDEECdGpBATsBACACKAIMIAIoAixB2ChqakEAOgAAIAIoAiwiACAAKAKoLUF/ajYCqC0gAigCIARAIAIoAiwiACAAKAKsLSACKAIgIAIoAgxBAnRqLwECazYCrC0LDAELCyACKAIoIAIoAhA2AgQgAiACKAIsKALQKEECbTYCGANAIAIoAhhBAUhFBEAgAigCLCACKAIkIAIoAhgQdSACIAIoAhhBf2o2AhgMAQsLIAIgAigCHDYCDANAIAIgAigCLCgC4BY2AhggAigCLEHcFmohASACKAIsIgMoAtAoIQAgAyAAQX9qNgLQKCACKAIsIABBAnQgAWooAgA2AuAWIAIoAiwgAigCJEEBEHUgAiACKAIsKALgFjYCFCACKAIYIQEgAigCLEHcFmohAyACKAIsIgQoAtQoQX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AIoAgg2AgwgAiAAKAIMKAIANgIEIAIoAggQpwFBAUYEQCMAQRBrIgAgAigCCDYCDEG0nAEgACgCDCgCBDYCAAsLIAIoAgwEQCACKAIMIAIoAgQ2AgALIAJBEGokAAuVAQEBfyMAQRBrIgEkACABIAA2AggCQAJ/IwBBEGsiACABKAIINgIMIAAoAgwpAxhCgIAQg1ALBEAgASgCCCgCAARAIAEgASgCCCgCABCUAUEBcToADwwCCyABQQE6AA8MAQsgASABKAIIQQBCAEESECI+AgQgASABKAIEQQBHOgAPCyABLQAPQQFxIQAgAUEQaiQAIAALfwEBfyMAQSBrIgMkACADIAA2AhggAyABNwMQIANBADYCDCADIAI2AggCQCADKQMQQv///////////wBWBEAgAygCCEEEQT0QFSADQX82AhwMAQsgAyADKAIYIAMpAxAgAygCDCADKAIIEGc2AhwLIAMoAhwhACADQSBqJAAgAAt9ACACQQFGBEAgASAAKAIIIAAoAgRrrH0hAQsCQCAAKAIUIAAoAhxLBEAgAEEAQQAgACgCJBEBABogACgCFEUNAQsgAEEANgIcIABCADcDECAAIAEgAiAAKAIoERAAQgBTDQAgAEIANwIEIAAgACgCAEFvcTYCAEEADwtBfwviAgECfyMAQSBrIgMkAAJ/AkACQEH0lwEgASwAABCYAUUEQEG0nAFBHDYCAAwBC0GYCRAZIgINAQtBAAwBCyACQQBBkAEQMyABQSsQmAFFBEAgAkEIQQQgAS0AAEHyAEYbNgIACwJAIAEtAABB4QBHBEAgAigCACEBDAELIABBA0EAEAQiAUGACHFFBEAgAyABQYAIcjYCECAAQQQgA0EQahAEGgsgAiACKAIAQYABciIBNgIACyACQf8BOgBLIAJBgAg2AjAgAiAANgI8IAIgAkGYAWo2AiwCQCABQQhxDQAgAyADQRhqNgIAIABBk6gBIAMQDg0AIAJBCjoASwsgAkEaNgIoIAJBGzYCJCACQRw2AiAgAkEdNgIMQdygASgCAEUEQCACQX82AkwLIAJBsKEBKAIANgI4QbChASgCACIABEAgACACNgI0C0GwoQEgAjYCACACCyEAIANB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ACAAC+MIAQF/IwBBQGoiAiAANgI4IAIgATYCNCACIAIoAjgoAnw2AjAgAiACKAI4KAI4IAIoAjgoAmxqNgIsIAIgAigCOCgCeDYCICACIAIoAjgoApABNgIcIAICfyACKAI4KAJsIAIoAjgoAixBhgJrSwRAIAIoAjgoAmwgAigCOCgCLEGGAmtrDAELQQALNgIYIAIgAigCOCgCQDYCFCACIAIoAjgoAjQ2AhAgAiACKAI4KAI4IAIoAjgoAmxqQYICajYCDCACIAIoAiwgAigCIEEBa2otAAA6AAsgAiACKAIsIAIoAiBqLQAAOgAKIAIoAjgoAnggAigCOCgCjAFPBEAgAiACKAIwQQJ2NgIwCyACKAIcIAIoAjgoAnRLBEAgAiACKAI4KAJ0NgIcCwNAAkAgAiACKAI4KAI4IAIoAjRqNgIoAkAgAigCKCACKAIgai0AACACLQAKRw0AIAIoAiggAigCIEEBa2otAAAgAi0AC0cNACACKAIoLQAAIAIoAiwtAABHDQAgAiACKAIoIgBBAWo2AiggAC0AASACKAIsLQABRwRADAELIAIgAigCLEECajYCLCACIAIoAihBAWo2AigDQCACIAIoAiwiAEEBajYCLCAALQABIQEgAiACKAIoIgBBAWo2AigCf0EAIAAtAAEgAUcNABogAiACKAIsIgBBAWo2AiwgAC0AASEBIAIgAigCKCIAQQFqNgIoQQAgAC0AASABRw0AGiACIAIoAiwiAEEBajYCLCAALQABIQEgAiACKAIoIgBBAWo2AihBACAALQABIAFHDQAaIAIgAigCLCIAQQFqNgIsIAAtAAEhASACIAIoAigiAEEBajYCKEEAIAAtAAEgAUcNABogAiACKAIsIgBBAWo2AiwgAC0AASEBIAIgAigCKCIAQQFqNgIoQQAgAC0AASABRw0AGiACIAIoAiwiAEEBajYCLCAALQABIQEgAiACKAIoIgBBAWo2AihBACAALQABIAFHDQAaIAIgAigCLCIAQQFqNgIsIAAtAAEhASACIAIoAigiAEEBajYCKEEAIAAtAAEgAUcNABogAiACKAIsIgBBAWo2AiwgAC0AASEBIAIgAigCKCIAQQFqNgIoQQAgAC0AASABRw0AGiACKAIsIAIoAgxJC0EBcQ0ACyACQYICIAIoAgwgAigCLGtrNgIkIAIgAigCDEH+fWo2AiwgAigCJCACKAIgSgRAIAIoAjggAigCNDYCcCACIAIoAiQ2AiAgAigCJCACKAIcTg0CIAIgAigCLCACKAIgQQFrai0AADoACyACIAIoAiwgAigCIGotAAA6AAoLCyACIAIoAhQgAigCNCACKAIQcUEBdGovAQAiATYCNEEAIQAgASACKAIYSwR/IAIgAigCMEF/aiIANgIwIABBAEcFQQALQQFxDQELCwJAIAIoAiAgAigCOCgCdE0EQCACIAIoAiA2AjwMAQsgAiACKAI4KAJ0NgI8CyACKAI8C5gQAQF/IwBBMGsiAiQAIAIgADYCKCACIAE2AiQgAgJ/IAIoAigoAgxBBWsgAigCKCgCLEsEQCACKAIoKAIsDAELIAIoAigoAgxBBWsLNgIgIAJBADYCECACIAIoAigoAgAoAgQ2AgwDQAJAIAJB//8DNgIcIAIgAigCKCgCvC1BKmpBA3U2AhQgAigCKCgCACgCECACKAIUSQ0AIAIgAigCKCgCACgCECACKAIUazYCFCACIAIoAigoAmwgAigCKCgCXGs2AhggAigCHCACKAIYIAIoAigoAgAoAgRqSwRAIAIgAigCGCACKAIoKAIAKAIEajYCHAsgAigCHCACKAIUSwRAIAIgAigCFDYCHAsCQCACKAIcIAIoAiBPDQACQCACKAIcRQRAIAIoAiRBBEcNAQsgAigCJEUNACACKAIcIAIoAhggAigCKCgCACgCBGpGDQELDAELQQAhACACIAIoAiRBBEYEfyACKAIcIAIoAhggAigCKCgCACgCBGpGBUEAC0EBcUVFNgIQIAIoAihBAEEAIAIoAhAQVyACKAIoKAIIIAIoAigoAhRBBGtqIAIoAhw6AAAgAigCKCgCCCACKAIoKAIUQQNraiACKAIcQQh2OgAAIAIoAigoAgggAigCKCgCFEECa2ogAigCHEF/czoAACACKAIoKAIIIAIoAigoAhRBAWtqIAIoAhxBf3NBCHY6AAAgAigCKCgCABAdIAIoAhgEQCACKAIYIAIoAhxLBEAgAiACKAIcNgIYCyACKAIoKAIAKAIMIAIoAigoAjggAigCKCgCXGogAigCGBAaGiACKAIoKAIAIgAgAigCGCAAKAIMajYCDCACKAIoKAIAIgAgACgCECACKAIYazYCECACKAIoKAIAIgAgAigCGCAAKAIUajYCFCACKAIoIgAgAigCGCAAKAJcajYCXCACIAIoAhwgAigCGGs2AhwLIAIoAhwEQCACKAIoKAIAIAIoAigoAgAoAgwgAigCHBBzGiACKAIoKAIAIgAgAigCHCAAKAIMajYCDCACKAIoKAIAIgAgACgCECACKAIcazYCECACKAIoKAIAIgAgAigCHCAAKAIUajYCFAsgAigCEEUNAQsLIAIgAigCDCACKAIoKAIAKAIEazYCDCACKAIMBEACQCACKAIMIAIoAigoAixPBEAgAigCKEECNgKwLSACKAIoKAI4IAIoAigoAgAoAgAgAigCKCgCLGsgAigCKCgCLBAaGiACKAIoIAIoAigoAiw2AmwMAQsgAigCKCgCPCACKAIoKAJsayACKAIMTQRAIAIoAigiACAAKAJsIAIoAigoAixrNgJsIAIoAigoAjggAigCKCgCOCACKAIoKAIsaiACKAIoKAJsEBoaIAIoAigoArAtQQJJBEAgAigCKCIAIAAoArAtQQFqNgKwLQsLIAIoAigoAjggAigCKCgCbGogAigCKCgCACgCACACKAIMayACKAIMEBoaIAIoAigiACACKAIMIAAoAmxqNgJsCyACKAIoIAIoAigoAmw2AlwgAigCKCIBAn8gAigCDCACKAIoKAIsIAIoAigoArQta0sEQCACKAIoKAIsIAIoAigoArQtawwBCyACKAIMCyABKAK0LWo2ArQtCyACKAIoKALALSACKAIoKAJsSQRAIAIoAiggAigCKCgCbDYCwC0LAkAgAigCEARAIAJBAzYCLAwBCwJAIAIoAiRFDQAgAigCJEEERg0AIAIoAigoAgAoAgQNACACKAIoKAJsIAIoAigoAlxHDQAgAkEBNgIsDAELIAIgAigCKCgCPCACKAIoKAJsa0EBazYCFAJAIAIoAigoAgAoAgQgAigCFE0NACACKAIoKAJcIAIoAigoAixIDQAgAigCKCIAIAAoAlwgAigCKCgCLGs2AlwgAigCKCIAIAAoAmwgAigCKCgCLGs2AmwgAigCKCgCOCACKAIoKAI4IAIoAigoAixqIAIoAigoAmwQGhogAigCKCgCsC1BAkkEQCACKAIoIgAgACgCsC1BAWo2ArAtCyACIAIoAigoAiwgAigCFGo2AhQLIAIoAhQgAigCKCgCACgCBEsEQCACIAIoAigoAgAoAgQ2AhQLIAIoAhQEQCACKAIoKAIAIAIoAigoAjggAigCKCgCbGogAigCFBBzGiACKAIoIgAgAigCFCAAKAJsajYCbAsgAigCKCgCwC0gAigCKCgCbEkEQCACKAIoIAIoAigoAmw2AsAtCyACIAIoAigoArwtQSpqQQN1NgIUIAICf0H//wMgAigCKCgCDCACKAIUa0H//wNLDQAaIAIoAigoAgwgAigCFGsLNgIUIAICfyACKAIUIAIoAigoAixLBEAgAigCKCgCLAwBCyACKAIUCzYCICACIAIoAigoAmwgAigCKCgCXGs2AhgCQCACKAIYIAIoAiBJBEAgAigCGEUEQCACKAIkQQRHDQILIAIoAiRFDQEgAigCKCgCACgCBA0BIAIoAhggAigCFEsNAQsgAgJ/IAIoAhggAigCFEsEQCACKAIUDAELIAIoAhgLNgIcIAICf0EAIAIoAiRBBEcNABpBACACKAIoKAIAKAIEDQAaIAIoAhwgAigCGEYLQQFxRUU2AhAgAigCKCACKAIoKAI4IAIoAigoAlxqIAIoAhwgAigCEBBXIAIoAigiACACKAIcIAAoAlxqNgJcIAIoAigoAgAQHQsgAkECQQAgAigCEBs2AiwLIAIoAiwhACACQTBqJAAgAAuyAgEBfyMAQRBrIgEkACABIAA2AggCQCABKAIIEHQEQCABQX42AgwMAQsgASABKAIIKAIcKAIENgIEIAEoAggoAhwoAggEQCABKAIIKAIoIAEoAggoAhwoAgggASgCCCgCJBEEAAsgASgCCCgCHCgCRARAIAEoAggoAiggASgCCCgCHCgCRCABKAIIKAIkEQQACyABKAIIKAIcKAJABEAgASgCCCgCKCABKAIIKAIcKAJAIAEoAggoAiQRBAALIAEoAggoAhwoA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EgayIDJAAgAyAAOwEaIAMgATYCFCADIAI2AhAgAyADKAIUIANBCGpBwABBABBHIgA2AgwCQCAARQRAIANBADYCHAwBCyADKAIIQQVqQf//A0sEQCADKAIQQRJBABAVIANBADYCHAwBCyADQQAgAygCCEEFaq0QKiIANgIEIABFBEAgAygCEEEOQQAQFSADQQA2AhwMAQsgAygCBEEBEIoBIAMoAgQgAygCFBCIARAhIAMoAgQgAygCDCADKAIIEEACfyMAQRBrIgAgAygCBDYCDCAAKAIMLQAAQQFxRQsEQCADKAIQQRRBABAVIAMoAgQQFyADQQA2AhwMAQsgAyADLwEaAn8jAEEQayIAIAMoAgQ2AgwCfiAAKAIMLQAAQQFxBEAgACgCDCkDEAwBC0IAC6dB//8DcQsCfyMAQRBrIgAgAygCBDYCDCAAKAIMKAIEC0GABhBQNgIAIAMoAgQQFyADIAMoAgA2AhwLIAMoAhwhACADQSBqJAAgAAu0AgEBfyMAQTBrIgMkACADIAA2AiggAyABNwMgIAMgAjYCHAJAIAMpAyBQBEAgA0EBOgAvDAELIAMgAygCKCkDECADKQMgfDcDCAJAIAMpAwggAykDIFoEQCADKQMIQv////8AWA0BCyADKAIcQQ5BABAVIANBADoALwwBCyADIAMoAigoAgAgAykDCKdBBHQQTSIANgIEIABFBEAgAygCHEEOQQAQFSADQQA6AC8MAQsgAygCKCADKAIENgIAIAMgAygCKCkDCDcDEANAIAMpAxAgAykDCFpFBEAgAygCKCgCACADKQMQp0EEdGoQjAEgAyADKQMQQgF8NwMQDAELCyADKAIoIAMpAwgiATcDECADKAIoIAE3AwggA0EBOgAvCyADLQAvQQFxIQAgA0EwaiQAIAALzAEBAX8jAEEgayICJAAgAiAANwMQIAIgATYCDCACQTAQGSIBNgIIAkAgAUUEQCACKAIMQQ5BABAVIAJBADYCHAwBCyACKAIIQQA2AgAgAigCCEIANwMQIAIoAghCADcDCCACKAIIQgA3AyAgAigCCEIANwMYIAIoAghBADYCKCACKAIIQQA6ACwgAigCCCACKQMQIAIoAgwQx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kACABIAA2AqgBIAEoAqgBEDgCQAJAIAEoAqgBKAIAQQBOBEAgASgCqAEoAgBBoA4oAgBIDQELIAEgASgCqAEoAgA2AhAgAUEgakG8lwEgAUEQahBvIAFBADYCpAEgASABQSBqNgKgAQwBCyABIAEoAqgBKAIAQQJ0QaANaigCADYCpAECQAJAAkACQCABKAKoASgCAEECdEGwDmooAgBBf2oOAgABAgsgASABKAKoASgCBEGQmgEoAgAQpAI2AqABDAILIwBBEGsiACABKAKoASgCBDYCDCABQQAgACgCDGtBAnRB2NQAaigCADYCoAEMAQsgAUEANgKgAQsLAkAgASgCoAFFBEAgASABKAKkATYCrAEMAQsgASABKAKgARAsAn8gASgCpAEEQCABKAKkARAsQQJqDAELQQALakEBahAZIgA2AhwgAEUEQCABQdgNKAIANgKsAQwBCyABKAIcIQACfyABKAKkAQRAIAEoAqQBDAELQdSXAQshAkHVlwFB1JcBIAEoAqQBGyEDIAEgASgCoAE2AgggASADNgIEIAEgAjYCACAAQc2XASABEG8gASgCqAEgASgCHDYCCCABIAEoAhw2AqwBCyABKAKsASEAIAFBsAFqJAAgAAtxAQN/AkACQANAIAAgAkHQiAFqLQAARwRAQdcAIQMgAkEBaiICQdcARw0BDAILCyACIgMNAEGwiQEhAAwBC0GwiQEhAgNAIAItAAAhBCACQQFqIgAhAiAEDQAgACECIANBf2oiAw0ACwsgASgCFBogAAszAQF/IAAoAhQiAyABIAIgACgCECADayIBIAEgAksbIgEQGhogACAAKAIUIAFqNgIUIAILigEBAn8jAEGgAWsiAyQAIANBCGpBuIcBQZABEBoaIAMgADYCNCADIAA2AhwgA0F+IABrIgRB/////wdB/////wcgBEsbIgQ2AjggAyAAIARqIgA2AiQgAyAANgIYIANBCGogASACEKsCIAQEQCADKAIcIgAgACADKAIYRmtBADoAAAsgA0GgAWokAAspACABIAEoAgBBD2pBcHEiAUEQajYCACAAIAEpAwAgASkDCBCxAjkDAAuKFwMSfwJ+AXwjAEGwBGsiCSQAIAlBADYCLAJ/IAG9I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iwgAEEANgIcIABBADYCECAAKAIUGiAAQQA2AhRBAAsaIAAgACgCACAFcjYCACACRQ0ACyADQdABaiQACy8AIAECfyACKAJMQX9MBEAgACABIAIQcQwBCyAAIAEgAhBxCyIARgRAIAEPCyAAC1kBAX8gACAALQBKIgFBf2ogAXI6AEogACgCACIBQQhxBEAgACABQSByNgIAQX8PCyAAQgA3AgQgACAAKAIsIgE2AhwgACABNgIUIAAgASAAKAIwajYCEEEACwYAQaShAQsGAEGgoQELBgBBmKEBC9kDAgJ/An4jAEEgayICJAACQCABQv///////////wCDIgVCgICAgICAwP9DfCAFQoCAgICAgMCAvH98VARAIAFCBIYgAEI8iIQhBCAAQv//////////D4MiAEKBgICAgICAgAhaBEAgBEKBgICAgICAgMAAfCEEDAILIARCgICAgICAgIBAfSEEIABCgICAgICAgIAIhUIAUg0BIARCAYMgBHwhBAwBCyAAUCAFQoCAgICAgMD//wBUIAVCgICAgICAwP//AFEbRQRAIAFCBIYgAEI8iIRC/////////wODQoCAgICAgID8/wCEIQQMAQtCgICAgICAgPj/ACEEIAVC////////v//DAFYNAEIAIQQgBUIwiKciA0GR9wBJDQAgAkEQaiAAIAFC////////P4NCgICAgICAwACEIgQgA0H/iH9qELMCIAIgACAEQYH4ACADaxCyAiACKQMIQgSGIAIpAwAiAEI8iIQhBCACKQMQIAIpAxiEQgBSrSAAQv//////////D4OEIgBCgYCAgICAgIAIWgRAIARCAXwhBAwBCyAAQoCAgICAgICACIVCAFINACAEQgGDIAR8IQQLIAJBIGokACAEIAFCgICAgICAgICAf4OEvwtQAQF+AkAgA0HAAHEEQCACIANBQGqtiCEBQgAhAgwBCyADRQ0AIAJBwAAgA2uthiABIAOtIgSIhCEBIAIgBIghAgsgACABNwMAIAAgAjcDCAtQAQF+AkAgA0HAAHEEQCABIANBQGqthiECQgAhAQwBCyADRQ0AIAIgA60iBIYgAUHAACADa62IhCECIAEgBIYhAQsgACABNwMAIAAgAjcDCAuLAgACQCAABH8gAUH/AE0NAQJAQ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kEQaiACKAIMrSACKAKYQEEIahBhQQBIBEAgAkF/NgKcQAwDCyACKAKYQCACQRBqIAIoAgytEDZBAEgEQCACQX82ApxADAMFIAIgAikDkEAgAjUCDH03A5BAIAIoAphAKAJUIAIrAwAgAikDkEC6oSACKwMAoxBYDAILAAsLIAJBADYCnEALIAIoApxAIQAgAkGgwABqJAAgAAvnEQIBfwF+IwBBoAFrIgMkACADIAA2ApgBIAMgATYClAEgAyACNgKQAQJAIAMoApQBIANBOGoQOUEASARAIAMoApgBQQhqIAMoApQBEBggA0F/NgKcAQwBCyADKQM4QsAAg1AEQCADIAMpAzhCwACENwM4IANBADsBaAsCQAJAIAMoApABKAIQQX9HBEAgAygCkAEoAhBBfkcNAQsgAy8BaEUNACADKAKQASADLwFoNgIQDAELAkACQCADKAKQASgCEA0AIAMpAzhCBINQDQAgAyADKQM4QgiENwM4IAMgAykDUDcDWAwBCyADIAMpAzhC9////w+DNwM4CwsgAykDOEKAAYNQBEAgAyADKQM4QoABhDcDOCADQQA7AWoLIANBgAI2AiQCQCADKQM4QgSDUARAIAMgAygCJEGACHI2AiQgA0J/NwNwDAELIAMoApABIAMpA1A3AyggAyADKQNQNwNwAkAgAykDOEIIg1AEQAJAAkACQAJAAkACfwJAIAMoApABKAIQQX9HBEAgAygCkAEoAhBBfkcNAQtBCAwBCyADKAKQASgCEAtB//8DcQ4NAgMDAwMDAwMBAwMDAAMLIANClMLk8w83AxAMAwsgA0KDg7D/DzcDEAwCCyADQv////8PNwMQDAELIANCADcDEAsgAykDUCADKQMQVgRAIAMgAygCJEGACHI2AiQLDAELIAMoApABIAMpA1g3AyALCyADIAMoApgBKAIAEDUiBDcDiAEgBEIAUwRAIAMoApgBQQhqIAMoApgBKAIAEBggA0F/NgKcAQwBCyADKAKQASIAIAAvAQxB9/8DcTsBDCADIAMoApgBIAMoApABIAMoAiQQXiIANgIoIABBAEgEQCADQX82ApwBDAELIAMgAy8BaAJ/AkAgAygCkAEoAhBBf0cEQCADKAKQASg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ACIANgIwIABFBEAgAygCNBAcIANBfzYCnAEMAgsgAygCNBAcIAMgAygCMDYCNAsgAyADKAKYASgCABA1IgQ3A4ABIARCAFMEQCADKAKYAUEIaiADKAKYASgCABAYIANBfzYCnAEMAQsgAyADKAKYASADKAI0IAMpA3AQtQI2AiwgAygCNCADQThqEDlBAEgEQCADKAKYAUEIaiADKAI0EBggA0F/NgIsCyADIAMoAjQQuwIiADoAIyAAQRh0QRh1QQBIBEAgAygCmAFBCGogAygCNBAYIANBfzYCLAsgAygCNBAcIAMoAixBAEgEQCADQX82ApwBDAELIAMgAygCmAEoAgAQNSIENwN4IARCAFMEQCADKAKYAUEIaiADKAKYASgCABAYIANBfzYCnAEMAQsgAygCmAEoAgAgAykDiAEQqAFBAEgEQCADKAKYAUEIaiADKAKYASgCABAYIANBfzYCnAEMAQsgAykDOELkAINC5ABSBEAgAygCmAFBCGpBFEEAEBUgA0F/NgKcAQwBCyADKAKQASgCAEEgcUUEQAJAIAMpAzhCEINCAFIEQCADKAKQASADKAJgNgIUDAELIAMoApABQRRqEAEaCwsgAygCkAEgAy8BaDYCECADKAKQASADKAJkNgIYIAMoApABIAMpA1A3AyggAygCkAEgAykDeCADKQOAAX03AyAgAygCkAEgAygCkAEvAQxB+f8DcSADLQAjQQF0cjsBDCADKAKQASADKAIkQYAIcUEARxCKAyADIAMoApgBIAMoApABIAMoAiQQXiIANgIsIABBAEgEQCADQX82ApwBDAELIAMoAiggAygCLEcEQCADKAKYAUEIakEUQQAQFSADQX82ApwBDAELIAMoApgBKAIAIAMpA3gQqAFBAEgEQCADKAKYAUEIaiADKAKYASgCABAYIANBfzYCnAEMAQsgA0EANgKcAQsgAygCnAEhACADQaABaiQAIAALrwIBAX8jAEEgayICIAA2AhwgAiABNgIYIAJBADYCFCACQgA3AwACQCACKAIcLQAoQQFxRQRAIAIoAhwoAhggAigCHCgCFEYNAQsgAkEBNgIUCyACQgA3AwgDQCACKQMIIAIoAhwpAzBUBEACQAJAIAIoAhwoAk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QEMcBQQBIBEAgAUEBNgIsDAILIAEgASgCWCgCABA1IgM3AzAgA0IAUwRAIAFBATYCLAwCCyABKAIMIAEpAzA3A0gCQCABKAIUBEAgAUEANgIIIAEoAhAoAghFBEAgASABKAJYIAEoAlggASkDUEEIQQAQqQEiADYCCCAARQRAIAFBATYCLAwFCwsgASgCWAJ/IAEoAggEQCABKAIIDAELIAEoAhAoAggLIAEoAgwQuAJBAEgEQCABQQE2AiwgASgCCARAIAEoAggQHAsMBAsgASgCCARAIAEoAggQHAsMAQsgASgCDCIAIAAvAQxB9/8DcTsBDCABKAJYIAEoAgxBgAIQXkEASARAIAFBATYCLAwDCyABIAEoAlggASkDUCABKAJYQQhqEH8iAzcDACADUARAIAFBATYCLAwDCyABKAJYKAIAIAEpAwBBABAoQQBIBEAgASgCWEEIaiABKAJYKAIAEBggAUEBNgIsDAMLIAEoAlggASgCDCkDIBC3AkEASARAIAFBATYCLAwDCwsLIAEgASkDSEIBfDcDSAwBCwsgASgCLEUEQCABKAJYIAEoAiggASkDQBC2AkEASARAIAFBATYCLAsLIAEoAigQFiABKAIsRQRAIAEoAlgoAgAQvAIEQCABKAJYQQhqIAEoAlgoAgAQGCABQQE2AiwLCyABKAJYKAJUEPsCIAEoAiwEQCABKAJYKAIAEGogAUF/NgJcDAELIAEoAlgQPyABQQA2AlwLIAEoAlwhACABQeAAaiQAIAALswEBAX8jAEEQayIBJAAgASAANgIIAkADQCABKAIIBEAgASgCCCkDGEKAgASDQgBSBEAgASABKAIIQQBCAEEQECI3AwAgASkDAEIAUwRAIAFB/wE6AA8MBAsgASkDAEIDVQRAIAEoAghBDGpBFEEAEBUgAUH/AToADwwECyABIAEpAwA8AA8MAwUgASABKAIIKAIANgIIDAILAAsLIAFBADoADwsgASwADyEAIAFBEGokACAAC8wBAQF/IwBBEGsiASQAIAEgADYCCAJAIAEoAggoAiRBAUcEQCABKAIIQQxqQRJBABAVIAFBfzYCDAwBCyABKAIIKAIgQQFLBEAgASgCCEEMakEd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f3vADYCGCABKAJQQdH+ADYCBAwQCyABKAJQQQA2AmwgASgCUEHG/gA2AgQLA0ACQCABKAJQKAJsIAEoAlAoAmQgASgCUCgCaGpPDQADQAJAIAEgASgCUCgCUCABKAI8QQEgASgCUCgCWHRBAWtxQQJ0aigBADYBICABLQAhIAEoAjhNDQAgASgCREUNESABIAEoAkRBf2o2AkQgASABKAJMIgBBAWo2AkwgASABKAI8IAAtAAAgASgCOHRqNgI8IAEgASgCOEEIajYCOAwBCwsCQCABLwEiQRBIBEAgASABKAI8IAEtACF2NgI8IAEgASgCOCABLQAhazYCOCABLwEiIQIgASgCUEH0AGohAyABKAJQIgQoAmwhACAEIABBAWo2AmwgAEEBdCADaiACOwEADAELAkAgAS8BIkEQRgRAA0AgASgCOCABLQAhQQJqSQRAIAEoAkRFDRQgASABKAJEQX9qNgJEIAEgASgCTCIAQQFqNgJMIAEgASgCPCAALQAAIAEoAjh0ajYCPCABIAEoAjhBCGo2AjgMAQsLIAEgASgCPCABLQAhdjYCPCABIAEoAjggAS0AIWs2AjggASgCUCgCbEUEQCABKAJYQZbwADYCGCABKAJQQdH+ADYCBAwECyABIAEoAlAgASgCUCgCbEEBdGovAXI2AhQgASABKAI8QQNxQQNqNgIsIAEgASgCPEECdjYCPCABIAEoAjhBAms2AjgMAQsCQCABLwEiQRFGBEADQCABKAI4IAEtACFBA2pJBEAgASgCREUNFSABIAEoAkRBf2o2AkQgASABKAJMIgBBAWo2AkwgASABKAI8IAAtAAAgASgCOHRqNgI8IAEgASgCOEEIajYCOAwBCwsgASABKAI8IAEtACF2NgI8IAEgASgCOCABLQAhazYCOCABQQA2AhQgASABKAI8QQdxQQNqNgIsIAEgASgCPEEDdjYCPCABIAEoAjhBA2s2AjgMAQsDQCABKAI4IAEtACFBB2pJBEAgASgCREUNFCABIAEoAkRBf2o2AkQgASABKAJMIgBBAWo2AkwgASABKAI8IAAtAAAgASgCOHRqNgI8IAEgASgCOEEIajYCOAwBCwsgASABKAI8IAEtACF2N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Wo2AlAgAiACKAIsIAAtAAAgAigCKHRqNgIsIAIgAigCKEEIajYCKAsgAkEQaiACKAIgIAIoAiwgAigCGHFBAnRqKAEANgEAAkADQCACIAItABE2AgwgAiACKAIsIAIoAgx2NgIsIAIgAigCKCACKAIMazYCKCACIAItABA2AgwgAigCDEEQcQRAIAIgAi8BEjYCBCACIAIoAgxBD3E2AgwgAigCKCACKAIMSQRAIAIgAigCUCIAQQFqNgJQIAIgAigCLCAALQAAIAIoAih0ajYCLCACIAIoAihBCGo2AiggAigCKCACKAIMSQRAIAIgAigCUCIAQQFqNgJQIAIgAigCLCAALQAAIAIoAih0ajYCLCACIAIoAihBCGo2AigLCyACIAIoAgQgAigCLEEBIAIoAgx0QQFrcWo2AgQgAiACKAIsIAIoAgx2NgIsIAIgAigCKCACKAIMazYCKCACIAIoAkggAigCRGs2AgwCQCACKAIEIAIoAgxLBEAgAiACKAIEIAIoAgxrNgIMIAIoAgwgAigCOEsEQCACKAJUKALENwRAIAIoAlxBsO0ANgIYIAIoAlRB0f4ANgIEDAoLCyACIAIoAjA2AgACQCACKAI0RQRAIAIgAigCACACKAI8IAIoAgxrajYCACACKAIMIAIoAghJBEAgAiACKAIIIAIoAgxrNgIIA0AgAiACKAIAIgBBAWo2AgAgAC0AACEAIAIgAigCSCIBQQFqNgJIIAEgADoAACACIAIoAgxBf2oiADYCDCAADQALIAIgAigCSCACKAIEazYCAAsMAQsCQCACKAI0IAIoAgxJBEAgAiACKAIAIAIoAjwgAigCNGogAigCDGtqNgIAIAIgAigCDCACKAI0azYCDCACKAIMIAIoAghJBEAgAiACKAIIIAIoAgxrNgIIA0AgAiACKAIAIgBBAWo2AgAgAC0AACEAIAIgAigCSCIBQQFqNgJIIAEgADoAACACIAIoAgxBf2oiADYCDCAADQALIAIgAigCMDYCACACKAI0IAIoAghJBEAgAiACKAI0NgIMIAIgAigCCCACKAIMazYCCANAIAIgAigCACIAQQFqNgIAIAAtAAAhACACIAIoAkgiAUEBajYCSCABIAA6AAAgAiACKAIMQX9qIgA2AgwgAA0ACyACIAIoAkggAigCBGs2AgALCwwBCyACIAIoAgAgAigCNCACKAIMa2o2AgAgAigCDCACKAIISQRAIAIgAigCCCACKAIMazYCCANAIAIgAigCACIAQQFqNgIAIAAtAAAhACACIAIoAkgiAUEBajYCSCABIAA6AAAgAiACKAIMQX9qIgA2AgwgAA0ACyACIAIoAkggAigCBGs2AgALCwsDQCACKAIIQQJNRQRAIAIgAigCACIAQQFqNgIAIAAtAAAhACACIAIoAkgiAUEBajYCSCABIAA6AAAgAiACKAIAIgBBAWo2AgAgAC0AACEAIAIgAigCSCIBQQFqNgJIIAEgADoAACACIAIoAgAiAEEBajYCACAALQAAIQAgAiACKAJIIgFBAWo2AkggASAAOgAAIAIgAigCCEEDazYCCAwBCwsMAQsgAiACKAJIIAIoAgRrNgIAA0AgAiACKAIAIgBBAWo2AgAgAC0AACEAIAIgAigCSCIBQQFqNgJIIAEgADoAACACIAIoAgAiAEEBajYCACAALQAAIQAgAiACKAJIIgFBAWo2AkggASAAOgAAIAIgAigCACIAQQFqNgIAIAAtAAAhACACIAIoAkgiAUEBajYCSCABIAA6AAAgAiACKAIIQQNrNgIIIAIoAghBAksNAAsLIAIoAggEQCACIAIoAgAiAEEBajYCACAALQAAIQAgAiACKAJIIgFBAWo2AkggASAAOgAAIAIoAghBAUsEQCACIAIoAgAiAEEBajYCACAALQAAIQAgAiACKAJIIgFBAWo2AkggASAAOgAACwsMAgsgAigCDEHAAHFFBEAgAkEQaiACKAIgIAIvARIgAigCLEEBIAIoAgx0QQFrcWpBAnRqKAEANgEADAELCyACKAJcQc7tADYCGCACKAJUQdH+ADYCBAwECwwCCyACKAIMQcAAcUUEQCACQRBqIAIoAiQgAi8BEiACKAIsQQEgAigCDHRBAWtxakECdGooAQA2AQAMAQsLIAIoAgxBIHEEQCACKAJUQb/+ADYCBAwCCyACKAJcQeTtADYCGCACKAJUQdH+ADYCBAwBC0EAIQAgAigCUCACKAJMSQR/IAIoAk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AigiACACKAIoKAJgIAAoAmxqNgJsIAIoAihBADYCYAwBCyACIAIoAigiACgCOCAAKAJsai0AADoADyACKAIoIgAoAqQtIAAoAqAtQQF0akEAOwEAIAItAA8hASACKAIoIgAoApgtIQMgACAAKAKgLSIAQQFqNgKgLSAAIANqIAE6AAAgAigCKCACLQAPQQJ0aiIAIAAvAZQBQQFqOwGUASACIAIoAigoAqAtIAIoAigoApwtQQFrRjYCICACKAIoIgAgACgCdEF/ajYCdCACKAIoIgAgACgCbEEBajYCbAsgAigCIARAIAIoAigCfyACKAIoKAJcQQBOBEAgAigCKCgCOCACKAIoKAJcagwBC0EACyACKAIoKAJsIAIoAigoAlxrQQAQKSACKAIoIAIoAigoAmw2AlwgAigCKCgCABAdIAIoAigoAgAoAhBFBEAgAkEANgIsDAQLCwwBCwsgAigCKEEANgK0LSACKAIkQQRGBEAgAigCKAJ/IAIoAigoAlxBAE4EQCACKAIoKAI4IAIoAigoAlxqDAELQQALIAIoAigoAmwgAigCKCgCXGtBARApIAIoAiggAigCKCgCbDYCXCACKAIoKAIAEB0gAigCKCgCACgCEEUEQCACQQI2AiwMAgsgAkEDNgIsDAELIAIoAigoAqAtBEAgAigCKAJ/IAIoAigoAlxBAE4EQCACKAIoKAI4IAIoAigoAlxqDAELQQALIAIoAigoAmwgAigCKCgCXGtBABApIAIoAiggAigCKCgCbDYCXCACKAIoKAIAEB0gAigCKCgCACgCEEUEQCACQQA2AiwMAgsLIAJBATYCLAsgAigCLCEAIAJBMGokACAAC8AFAQJ/IwBBIGsiAiQAIAIgADYCGCACIAE2AhQCQANAAkAgAigCGCgCdEUEQCACKAIYEFYgAigCGCgCdEUEQCACKAIURQRAIAJBADYCHAwFCwwCCwsgAigCGEEANgJgIAIgAigCGCIAKAI4IAAoAmxqLQAAOgAPIAIoAhgiACgCpC0gACgCoC1BAXRqQQA7AQAgAi0ADyEBIAIoAhgiACgCmC0hAyAAIAAoAqAtIgBBAWo2AqAtIAAgA2ogAToAACACKAIYIAIt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CFEEESg0AIAIoAhxBCEcNASACKAIEQQFGDQELIAJBfjYCLAwBCyACKAIcQQhGBEAgAkEJNgIcCyACIAIoAigoAihBAUHELSACKAIoKAIgEQEANgIIIAIoAghFBEAgAkF8NgIsDAELIAIoAiggAigCCDYCHCACKAIIIAIoAig2AgAgAigCCEEqNgIEIAIoAgggAigCBDYCGCACKAIIQQA2AhwgAigCCCACKAIcNgIwIAIoAghBASACKAIIKAIwdDYCLCACKAIIIAIoAggoAixBAWs2AjQgAigCCCACKAIYQQdqNgJQIAIoAghBASACKAIIKAJQdDYCTCACKAIIIAIoAggoAkxBAWs2AlQgAigCCCACKAIIKAJQQQJqQQNuNgJYIAIoAigoAiggAigCCCgCLEECIAIoAigoAiARAQAhACACKAIIIAA2AjggAigCKCgCKCACKAIIKAIsQQIgAigCKCgCIBEBACEAIAIoAgggADYCQCACKAIoKAIoIAIoAggoAkxBAiACKAIoKAIgEQEAIQAgAigCCCAANgJEIAIoAghBADYCwC0gAigCCEEBIAIoAhhBBmp0NgKcLSACIAIoAigoAiggAigCCCgCnC1BBCACKAIoKAIgEQEANgIAIAIoAgggAigCADYCCCACKAIIIAIoAggoApwtQQJ0NgIMAkACQCACKAIIKAI4RQ0AIAIoAggoAkBFDQAgAigCCCgCREUNACACKAIIKAIIDQELIAIoAghBmgU2AgQgAigCKEHo1AAoAgA2AhggAigCKBCyARogAkF8NgIsDAELIAIoAgggAigCACACKAIIKAKcLUEBdkEBdGo2AqQtIAIoAgggAigCCCgCCCACKAIIKAKcLUEDbGo2ApgtIAIoAgggAigCJDYChAEgAigCCCACKAIUNgKIASACKAIIIAIoAiA6ACQgAiACKAIoEOACNgIsCyACKAIsIQAgAkEwaiQAIAALbAEBfyMAQRBrIgIgADYCDCACIAE2AgggAkEANgIEA0AgAiACKAIEIAIoAgxBAXFyNgIEIAIgAigCDEEBdjYCDCACIAIoAgRBAXQ2AgQgAiACKAIIQX9qIgA2AgggAEEASg0ACyACKAIEQQF2C5UCAQF/IwBBQGoiAyQAIAMgADYCPCADIAE2AjggAyACNgI0IANBADYCDCADQQE2AggDQCADKAIIQQ9KRQRAIAMgAygCDCADKAI0IAMoAghBAWtBAXRqLwEAakEBdDYCDCADQRBqIAMoAghBAXRqIAMoAgw7AQAgAyADKAIIQQFqNgIIDAELCyADQQA2AgQDQCADKAIEIAMoAjhMBEAgAyADKAI8IAMoAgRBAnRqLwECNgIAIAMoAgAEQCADQRBqIAMoAgBBAXRqIgEvAQAhACABIABBAWo7AQAgAEH//wNxIAMoAgAQ4gIhACADKAI8IAMoAgRBAnRqIAA7AQALIAMgAygCBEEBajYCBAwBCwsgA0FAayQAC4gIAQF/IwBBQGoiAiAANgI8IAIgATYCOCACIAIoAjgoAgA2AjQgAiACKAI4KAIENgIwIAIgAigCOCgCCCgCADYCLCACIAIoAjgoAggoAgQ2AiggAiACKAI4KAIIKAIINgIkIAIgAigCOCgCCCgCEDYCICACQQA2AgQgAkEANgIQA0AgAigCEEEPSkUEQCACKAI8QbwWaiACKAIQQQF0akEAOwEAIAIgAigCEEEBajYCEAwBCwsgAigCNCACKAI8QdwWaiACKAI8KALUKEECdGooAgBBAnRqQQA7AQIgAiACKAI8KALUKEEBajYCHANAIAIoAhxBvQRIBEAgAiACKAI8QdwWaiACKAIcQQJ0aigCADYCGCACIAIoAjQgAigCNCACKAIYQQJ0ai8BAkECdGovAQJBAWo2AhAgAigCECACKAIgSgRAIAIgAigCIDYCECACIAIoAgRBAWo2AgQLIAIoAjQgAigCGEECdGogAigCEDsBAiACKAIYIAIoAjBMBEAgAigCPCACKAIQQQF0akG8FmoiACAALwEAQQFqOwEAIAJBADYCDCACKAIYIAIoAiROBEAgAiACKAIoIAIoAhggAigCJGtBAnRqKAIANgIMCyACIAIoAjQgAigCGEECdGovAQA7AQogAigCPCIAIAAoAqgtIAIvAQogAigCECACKAIMamxqNgKoLSACKAIsBEAgAigCPCIAIAAoAqwtIAIvAQogAigCLCACKAIYQQJ0ai8BAiACKAIMamxqNgKsLQsLI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KAIYQfH/A08EQCADIAMoAhhB8f8DazYCGAsgAyADKAIYIAMoAgxqNgIMIAMoAgxB8f8DTwRAIAMgAygCDEHx/wNrNgIMCyADIAMoAhggAygCDEEQdHI2AhwMAQsgAygCFEUEQCADQQE2AhwMAQsgAygCEEEQSQRAA0AgAyADKAIQIgBBf2o2AhAgAARAIAMgAygCFCIAQQFqNgIUIAMgAC0AACADKAIYajYCGCADIAMoAhggAygCDGo2AgwMAQsLIAMoAhhB8f8DTwRAIAMgAygCGEHx/wNrNgIYCyADIAMoAgxB8f8DcDYCDCADIAMoAhggAygCDEEQdHI2AhwMAQsDQCADKAIQQbArSUUEQCADIAMoAhBBsCtrNgIQIANB2wI2AggDQCADIAMoAhQtAAAgAygCGGo2AhggAyADKAIYIAMoAgxqNgIMIAMgAygCFC0AASADKAIYajYCGCADIAMoAhggAygCDGo2AgwgAyADKAIULQACIAMoAhhqNgIYIAMgAygCGCADKAIMajYCDCADIAMoAhQtAAMgAygCGGo2AhggAyADKAIYIAMoAgxqNgIMIAMgAygCFC0ABCADKAIYajYCGCADIAMoAhggAygCDGo2AgwgAyADKAIULQAFIAMoAhhqNgIYIAMgAygCGCADKAIMajYCDCADIAMoAhQtAAYgAygCGGo2AhggAyADKAIYIAMoAgxqNgIMIAMgAygCFC0AByADKAIYajYCGCADIAMoAhggAygCDGo2AgwgAyADKAIULQAIIAMoAhhqNgIYIAMgAygCGCADKAIMajYCDCADIAMoAhQtAAkgAygCGGo2AhggAyADKAIYIAMoAgxqNgIMIAMgAygCFC0ACiADKAIYajYCGCADIAMoAhggAygCDGo2AgwgAyADKAIULQALIAMoAhhqNgIYIAMgAygCGCADKAIMajYCDCADIAMoAhQtAAwgAygCGGo2AhggAyADKAIYIAMoAgxqNgIMIAMgAygCFC0ADSADKAIYajYCGCADIAMoAhggAygCDGo2AgwgAyADKAIULQAOIAMoAhhqNgIYIAMgAygCGCADKAIMajYCDCADIAMoAhQtAA8gAygCGGo2AhggAyADKAIYIAMoAgxqNgIMIAMgAygCFEEQajYCFCADIAMoAghBf2oiADYCCCAADQALIAMgAygCGEHx/wNwNgIYIAMgAygCDEHx/wNwNgIMDAELCyADKAIQBEADQCADKAIQQRBJRQRAIAMgAygCEEEQazYCECADIAMoAhQtAAAgAygCGGo2AhggAyADKAIYIAMoAgxqNgIMIAMgAygCFC0AASADKAIYajYCGCADIAMoAhggAygCDGo2AgwgAyADKAIULQACIAMoAhhqNgIYIAMgAygCGCADKAIMajYCDCADIAMoAhQtAAMgAygCGGo2AhggAyADKAIYIAMoAgxqNgIMIAMgAygCFC0ABCADKAIYajYCGCADIAMoAhggAygCDGo2AgwgAyADKAIULQAFIAMoAhhqNgIYIAMgAygCGCADKAIMajYCDCADIAMoAhQtAAYgAygCGGo2AhggAyADKAIYIAMoAgxqNgIMIAMgAygCFC0AByADKAIYajYCGCADIAMoAhggAygCDGo2AgwgAyADKAIULQAIIAMoAhhqNgIYIAMgAygCGCADKAIMajYCDCADIAMoAhQtAAkgAygCGGo2AhggAyADKAIYIAMoAgxqNgIMIAMgAygCFC0ACiADKAIYajYCGCADIAMoAhggAygCDGo2AgwgAyADKAIULQALIAMoAhhqNgIYIAMgAygCGCADKAIMajYCDCADIAMoAhQtAAwgAygCGGo2AhggAyADKAIYIAMoAgxqNgIMIAMgAygCFC0ADSADKAIYajYCGCADIAMoAhggAygCDGo2AgwgAyADKAIULQAOIAMoAhhqNgIYIAMgAygCGCADKAIMajYCDCADIAMoAhQtAA8gAygCGGo2AhggAyADKAIYIAMoAgxqNgIMIAMgAygCFEEQajYCFAwBCwsDQCADIAMoAhAiAEF/ajYCECAABEAgAyADKAIUIgBBAWo2AhQgAyAALQAAIAMoAhhqNgIYIAMgAygCGCADKAIMajYCDAwBCwsgAyADKAIYQfH/A3A2AhggAyADKAIMQfH/A3A2AgwLIAMgAygCGCADKAIMQRB0cjYCHAsgAygCHAspAQF/IwBBEGsiAiQAIAIgADYCDCACIAE2AgggAigCCBAWIAJBEGokAAs6AQF/IwBBEG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IAMpAyCnaiADKAI0KAIAIAMpAxinQQR0aigCACADKQMQp2ogAykDCKcQGhogAykDCCADKAI0KAIAIAMpAxinQQR0aikDCCADKQMQfVEEQCADIAMpAxhCAXw3AxgLIAMgAykDCCADKQMgfDcDICADQgA3AxAMAQsLIAMoAjQiACADKQMgIAApAzh8NwM4IAMoAjQgAykDGDcDQCADIAMpAyA3AzgLIAMpAzghAiADQUBrJAAgAguuBAEBfyMAQUBqIgMkACADIAA2AjggAyABNwMwIAMgAjYCLAJAIAMpAzBQBEAgA0EAQgBBASADKAIsEE42AjwMAQsgAykDMCADKAI4KQMwVgRAIAMoAixBEkEAEBUgA0EANgI8DAELIAMoAjgoAigEQCADKAIsQR1BABAVIANBADYCPAwBCyADIAMoAjggAykDMBC7ATcDICADIAMpAzAgAygCOCgCBCADKQMgp0EDdGopAwB9NwMYIAMpAxhQBEAgAyADKQMgQn98NwMgIAMgAygCOCgCACADKQMgp0EEdGopAwg3AxgLIAMgAygCOCgCACADKQMgp0EEdGopAwggAykDGH03AxAgAykDECADKQMwVgRAIAMoAixBHEEAEBUgA0EANgI8DAELIAMgAygCOCgCACADKQMgQgF8QQAgAygCLBBOIgA2AgwgAEUEQCADQQA2AjwMAQsgAygCDCgCACADKAIMKQMIQgF9p0EEdGogAykDGDcDCCADKAIMKAIEIAMoAgwpAwinQQN0aiADKQMwNwMAIAMoAgwgAykDMDcDMCADKAIMAn4gAygCOCkDGCADKAIMKQMIQgF9VARAIAMoAjgpAxgMAQsgAygCDCkDCEIBfQs3AxggAygCOCADKAIMNgIoIAMoAgwgAygCODYCKCADKAI4IAMoAgwpAwg3AyAgAygCDCADKQMgQgF8NwMgIAMgAygCDDYCPAsgAygCPCEAIANBQGskACAAC8gJAQF/IwBB8ABrIgQkACAEIAA2AmQgBCABNgJgIAQgAjcDWCAEIAM2AlQgBCAEKAJkNgJQAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAEKAJUDhQGBwIMBAUKDw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AQQBIBEAgA0J/NwO4AQwDCyADKAIQBEAgA0EBOgAXCyADIAMpAxhCAXw3AxgMAQsLIAMgAygCtAEoAgAQNSICNwMgIAJCAFMEQCADKAK0AUEIaiADKAK0ASgCABAYIANCfzcDuAEMAQsgAyADKQMgIAMpA6ABfTcDmAECQCADKQOgAUL/////D1gEQCADKQOoAUL//wNYDQELIANBAToAFwsgAyADQTBqQuIAECoiADYCLCAARQRAIAMoArQBQQhqQQ5BABAVIANCfzcDuAEMAQsgAy0AF0EBcQRAIAMoAixBttMAQQQQQCADKAIsQiwQLiADKAIsQS0QICADKAIsQS0QICADKAIsQQAQISADKAIsQQAQISADKAIsIAMpA6gBEC4gAygCLCADKQOoARAuIAMoAiwgAykDmAEQLiADKAIsIAMpA6ABEC4gAygCLEG70wBBBBBAIAMoAixBABAhIAMoAiwgAykDoAEgAykDmAF8EC4gAygCLEEBECELIAMoAixBwNMAQQQQQCADKAIsQQAQISADKAIsAn5C//8DIAMpA6gBQv//A1oNABogAykDqAELp0H//wNxECAgAygCLAJ+Qv//AyADKQOoAUL//wNaDQAaIAMpA6gBC6dB//8DcRAgIAMoAiwCf0F/IAMpA5gBQv////8PWg0AGiADKQOYAacLECEgAygCLAJ/QX8gAykDoAFC/////w9aDQAaIAMpA6ABpwsQISADAn8gAygCtAEtAChBAXEEQCADKAK0ASgCJAwBCyADKAK0ASgCIAs2ApQBIAMoAiwCfyADKAKUAQRAIAMoApQBLwEEDAELQQALQf//A3EQIAJ/IwBBEGsiACADKAIsNgIMIAAoAgwtAABBAXFFCwRAIAMoArQBQQhqQRRBABAVIAMoAiwQFyADQn83A7gBDAELIAMoArQBAn8jAEEQayIAIAMoAiw2AgwgACgCDCgCBAsCfiMAQRBrIgAgAygCLDYCDAJ+IAAoAgwtAABBAXEEQCAAKAIMKQMQDAELQgALCxA2QQBIBEAgAygCLBAXIANCfzcDuAEMAQsgAygCLBAXIAMoApQBBEAgAygCtAEgAygClAEoAgAgAygClAEvAQStEDZBAEgEQ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YGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxscwC0AAMAyAAABAQAAHgEAAA8AAABAMgAAQDMAAAAAAAAeAAAADwAAAAAAAADAMwAAAAAAABMAAAAHAAAAAAAAAAwACACMAAgATAAIAMwACAAsAAgArAAIAGwACADsAAgAHAAIAJwACABcAAgA3AAIADwACAC8AAgAfAAIAPwACAACAAgAggAIAEIACADCAAgAIgAIAKIACABiAAgA4gAIABIACACSAAgAUgAIANIACAAyAAgAsgAIAHIACADyAAgACgAIAIoACABKAAgAygAIACoACACqAAgAagAIAOoACAAaAAgAmgAIAFoACADaAAgAOgAIALoACAB6AAgA+gAIAAYACACGAAgARgAIAMYACAAmAAgApgAIAGYACADmAAgAFgAIAJYACABWAAgA1gAIADYACAC2AAgAdgAIAPYACAAOAAgAjgAIAE4ACADOAAgALgAIAK4ACABuAAgA7gAIAB4ACACeAAgAXgAIAN4ACAA+AAgAvgAIAH4ACAD+AAgAAQAIAIEACABBAAgAwQAIACEACAChAAgAYQAIAOEACAARAAgAkQAIAFEACADRAAgAMQAIALEACABxAAgA8QAIAAkACACJAAgASQAIAMkACAApAAgAqQAIAGkACADpAAgAGQAIAJkACABZAAgA2QAIADkACAC5AAgAeQAIAPkACAAFAAgAhQAIAEUACADFAAgAJQAIAKUACABlAAgA5QAIABUACACVAAgAVQAIANUACAA1AAgAtQAIAHUACAD1AAgADQAIAI0ACABNAAgAzQAIAC0ACACtAAgAbQAIAO0ACAAdAAgAnQAIAF0ACADdAAgAPQAIAL0ACAB9AAgA/QAIABMACQATAQkAkwAJAJMBCQBTAAkAUwEJANMACQDTAQkAMwAJADMBCQCzAAkAswEJAHMACQBzAQkA8wAJAPMBCQALAAkACwEJAIsACQCLAQkASwAJA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JWQAJXMlcyVzAAA6IAAvcHJvYy9zZWxmL2ZkLwAvZGV2L3VyYW5kb20AcndhACVzLlhYWFhYWAByK2IAcmIAUEsFBgBBkJgBC04KAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAALAAAADAAAAA0AAAAOAAAADwAAABAAAAARAAAAAQAAAAgAAAAQTAAAMEwAQZCaAQsCgFAAQciaAQsJHwAAAGRNAAADAEHkmgELjAEt9FFYz4yxwEb2tcspMQPHBFtwMLRd/SB4f4ua2FkpUGhIiaunVgNs/7fNiD/Ud7QrpaNw8brkqPxBg/3Zb+GKei8tdJYHHw0JXgN2LHD3QKUsp29XQaiqdN+gWGQDSsfEPFOur18YBBWx420ohqsMpL9D8OlQgTlXFlI3/////////////////////w==";function Ae(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?f.get(r)():f.get(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(o)}}function ne(){var e=function(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}();return o.extraStackTrace&&(e+="\n"+o.extraStackTrace()),e.replace(/\b_Z[\w\d_]+/g,(function(e){return e==e?e:e+" ["+e+"]"}))}function oe(e,t){var r=new Date(1e3*M[e>>2]);M[t>>2]=r.getUTCSeconds(),M[t+4>>2]=r.getUTCMinutes(),M[t+8>>2]=r.getUTCHours(),M[t+12>>2]=r.getUTCDate(),M[t+16>>2]=r.getUTCMonth(),M[t+20>>2]=r.getUTCFullYear()-1900,M[t+24>>2]=r.getUTCDay(),M[t+36>>2]=0,M[t+32>>2]=0;var A=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),n=(r.getTime()-A)/864e5|0;return M[t+28>>2]=n,oe.GMTString||(oe.GMTString=S("GMT")),M[t+40>>2]=oe.GMTString,t}Z(re)||($=re,re=o.locateFile?o.locateFile($,u):u+$),U.push({func:function(){Se()}});var ie={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var r=0,A=e.length-1;A>=0;A--){var n=e[A];"."===n?e.splice(A,1):".."===n?(e.splice(A,1),r++):r&&(e.splice(A,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=ie.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=ie.splitPath(e),r=t[0],A=t[1];return r||A?(A&&(A=A.substr(0,A.length-1)),r+A):"."},basename:function(e){if("/"===e)return"/";var t=(e=(e=ie.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return ie.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return ie.normalize(e.join("/"))},join2:function(e,t){return ie.normalize(e+"/"+t)}};function se(e){return M[ke()>>2]=e,e}var ae={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var A=r>=0?arguments[r]:pe.cwd();if("string"!=typeof A)throw new TypeError("Arguments to path.resolve must be strings");if(!A)return"";e=A+"/"+e,t="/"===A.charAt(0)}return(t?"/":"")+(e=ie.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=ae.resolve(e).substr(1),t=ae.resolve(t).substr(1);for(var A=r(e.split("/")),n=r(t.split("/")),o=Math.min(A.length,n.length),i=o,s=0;s0?r.slice(0,A).toString("utf-8"):null))return null;e.input=we(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(h(w(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(h(w(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(p(w(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(p(w(e.output,0)),e.output=[])}}},ge={ops_table:null,mount:function(e){return ge.createNode(null,"/",16895,0)},createNode:function(e,t,r,A){if(pe.isBlkdev(r)||pe.isFIFO(r))throw new pe.ErrnoError(63);ge.ops_table||(ge.ops_table={dir:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr,lookup:ge.node_ops.lookup,mknod:ge.node_ops.mknod,rename:ge.node_ops.rename,unlink:ge.node_ops.unlink,rmdir:ge.node_ops.rmdir,readdir:ge.node_ops.readdir,symlink:ge.node_ops.symlink},stream:{llseek:ge.stream_ops.llseek}},file:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr},stream:{llseek:ge.stream_ops.llseek,read:ge.stream_ops.read,write:ge.stream_ops.write,allocate:ge.stream_ops.allocate,mmap:ge.stream_ops.mmap,msync:ge.stream_ops.msync}},link:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr,readlink:ge.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr},stream:pe.chrdev_stream_ops}});var n=pe.createNode(e,t,r,A);return pe.isDir(n.mode)?(n.node_ops=ge.ops_table.dir.node,n.stream_ops=ge.ops_table.dir.stream,n.contents={}):pe.isFile(n.mode)?(n.node_ops=ge.ops_table.file.node,n.stream_ops=ge.ops_table.file.stream,n.usedBytes=0,n.contents=null):pe.isLink(n.mode)?(n.node_ops=ge.ops_table.link.node,n.stream_ops=ge.ops_table.link.stream):pe.isChrdev(n.mode)&&(n.node_ops=ge.ops_table.chrdev.node,n.stream_ops=ge.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n),n},getFileDataAsRegularArray:function(e){if(e.contents&&e.contents.subarray){for(var t=[],r=0;r=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var A=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(A.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t){if(0==t)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var r=e.contents;return e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),void(e.usedBytes=t)}if(e.contents||(e.contents=[]),e.contents.length>t)e.contents.length=t;else for(;e.contents.length=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-n,A);if(i>8&&o.subarray)t.set(o.subarray(n,n+i),r);else for(var s=0;s0||A+r>2)}catch(e){if(!e.code)throw e;throw new pe.ErrnoError(ue.convertNodeCode(e))}return t.mode},realPath:function(e){for(var t=[];e.parent!==e;)t.push(e.name),e=e.parent;return t.push(e.mount.opts.root),t.reverse(),ie.join.apply(null,t)},flagsForNode:function(e){e&=-2097153,e&=-2049,e&=-32769,e&=-524289;var t=0;for(var r in ue.flagsForNodeMap)e&r&&(t|=ue.flagsForNodeMap[r],e^=r);if(e)throw new pe.ErrnoError(28);return t},node_ops:{getattr:function(e){var t,r=ue.realPath(e);try{t=Ie.lstatSync(r)}catch(e){if(!e.code)throw e;throw new pe.ErrnoError(ue.convertNodeCode(e))}return ue.isWindows&&!t.blksize&&(t.blksize=4096),ue.isWindows&&!t.blocks&&(t.blocks=(t.size+t.blksize-1)/t.blksize|0),{dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,size:t.size,atime:t.atime,mtime:t.mtime,ctime:t.ctime,blksize:t.blksize,blocks:t.blocks}},setattr:function(e,t){var r=ue.realPath(e);try{if(void 0!==t.mode&&(Ie.chmodSync(r,t.mode),e.mode=t.mode),void 0!==t.timestamp){var A=new Date(t.timestamp);Ie.utimesSync(r,A,A)}void 0!==t.size&&Ie.truncateSync(r,t.size)}catch(e){if(!e.code)throw e;throw new pe.ErrnoError(ue.convertNodeCode(e))}},lookup:function(e,t){var r=ie.join2(ue.realPath(e),t),A=ue.getMode(r);return ue.createNode(e,t,A)},mknod:function(e,t,r,A){var n=ue.createNode(e,t,r,A),o=ue.realPath(n);try{pe.isDir(n.mode)?Ie.mkdirSync(o,n.mode):Ie.writeFileSync(o,"",{mode:n.mode})}catch(e){if(!e.code)throw e;throw new pe.ErrnoError(ue.convertNodeCode(e))}return n},rename:function(e,t,r){var A=ue.realPath(e),n=ie.join2(ue.realPath(t),r);try{Ie.renameSync(A,n)}catch(e){if(!e.code)throw e;throw new pe.ErrnoError(ue.convertNodeCode(e))}e.name=r},unlink:function(e,t){var r=ie.join2(ue.realPath(e),t);try{Ie.unlinkSync(r)}catch(e){if(!e.code)throw e;throw new pe.ErrnoError(ue.convertNodeCode(e))}},rmdir:function(e,t){var r=ie.join2(ue.realPath(e),t);try{Ie.rmdirSync(r)}catch(e){if(!e.code)throw e;throw new pe.ErrnoError(ue.convertNodeCode(e))}},readdir:function(e){var t=ue.realPath(e);try{return Ie.readdirSync(t)}catch(e){if(!e.code)throw e;throw new pe.ErrnoError(ue.convertNodeCode(e))}},symlink:function(e,t,r){var A=ie.join2(ue.realPath(e),t);try{Ie.symlinkSync(r,A)}catch(e){if(!e.code)throw e;throw new pe.ErrnoError(ue.convertNodeCode(e))}},readlink:function(e){var t=ue.realPath(e);try{return t=Ie.readlinkSync(t),t=Ee.relative(Ee.resolve(e.mount.opts.root),t)}catch(e){if(!e.code)throw e;throw new pe.ErrnoError(ue.convertNodeCode(e))}}},stream_ops:{open:function(e){var t=ue.realPath(e.node);try{pe.isFile(e.node.mode)&&(e.nfd=Ie.openSync(t,ue.flagsForNode(e.flags)))}catch(e){if(!e.code)throw e;throw new pe.ErrnoError(ue.convertNodeCode(e))}},close:function(e){try{pe.isFile(e.node.mode)&&e.nfd&&Ie.closeSync(e.nfd)}catch(e){if(!e.code)throw e;throw new pe.ErrnoError(ue.convertNodeCode(e))}},read:function(e,t,r,A,n){if(0===A)return 0;try{return Ie.readSync(e.nfd,ue.bufferFrom(t.buffer),r,A,n)}catch(e){throw new pe.ErrnoError(ue.convertNodeCode(e))}},write:function(e,t,r,A,n){try{return Ie.writeSync(e.nfd,ue.bufferFrom(t.buffer),r,A,n)}catch(e){throw new pe.ErrnoError(ue.convertNodeCode(e))}},llseek:function(e,t,r){var A=t;if(1===r)A+=e.position;else if(2===r&&pe.isFile(e.node.mode))try{A+=Ie.fstatSync(e.nfd).size}catch(e){throw new pe.ErrnoError(ue.convertNodeCode(e))}if(A<0)throw new pe.ErrnoError(28);return A},mmap:function(e,t,r,A,n,o){if(E(0===t),!pe.isFile(e.node.mode))throw new pe.ErrnoError(43);var i=pe.mmapAlloc(r);return ue.stream_ops.read(e,N,i,r,A),{ptr:i,allocated:!0}},msync:function(e,t,r,A,n){if(!pe.isFile(e.node.mode))throw new pe.ErrnoError(43);if(2&n)return 0;ue.stream_ops.write(e,t,0,A,r,!1);return 0}}},he={lookupPath:function(e){return{path:e,node:{mode:ue.getMode(e)}}},createStandardStreams:function(){pe.streams[0]={fd:0,nfd:0,position:0,path:"",flags:0,tty:!0,seekable:!1};for(var e=1;e<3;e++)pe.streams[e]={fd:e,nfd:e,position:0,path:"",flags:577,tty:!0,seekable:!1}},cwd:function(){return process.cwd()},chdir:function(){process.chdir.apply(void 0,arguments)},mknod:function(e,t){pe.isDir(e)?Ie.mkdirSync(e,t):Ie.writeFileSync(e,"",{mode:t})},mkdir:function(){Ie.mkdirSync.apply(void 0,arguments)},symlink:function(){Ie.symlinkSync.apply(void 0,arguments)},rename:function(){Ie.renameSync.apply(void 0,arguments)},rmdir:function(){Ie.rmdirSync.apply(void 0,arguments)},readdir:function(){Ie.readdirSync.apply(void 0,arguments)},unlink:function(){Ie.unlinkSync.apply(void 0,arguments)},readlink:function(){return Ie.readlinkSync.apply(void 0,arguments)},stat:function(){return Ie.statSync.apply(void 0,arguments)},lstat:function(){return Ie.lstatSync.apply(void 0,arguments)},chmod:function(){Ie.chmodSync.apply(void 0,arguments)},fchmod:function(){Ie.fchmodSync.apply(void 0,arguments)},chown:function(){Ie.chownSync.apply(void 0,arguments)},fchown:function(){Ie.fchownSync.apply(void 0,arguments)},truncate:function(){Ie.truncateSync.apply(void 0,arguments)},ftruncate:function(){Ie.ftruncateSync.apply(void 0,arguments)},utime:function(){Ie.utimesSync.apply(void 0,arguments)},open:function(e,t,r,A){"string"==typeof t&&(t=ye.modeStringToFlags(t));var n=Ie.openSync(e,ue.flagsForNode(t),r),o=null!=A?A:pe.nextfd(n),i={fd:o,nfd:n,position:0,path:e,flags:t,seekable:!0};return pe.streams[o]=i,i},close:function(e){e.stream_ops||Ie.closeSync(e.nfd),pe.closeStream(e.fd)},llseek:function(e,t,r){if(e.stream_ops)return ye.llseek(e,t,r);var A=t;if(1===r)A+=e.position;else if(2===r)A+=Ie.fstatSync(e.nfd).size;else if(0!==r)throw new pe.ErrnoError(le.EINVAL);if(A<0)throw new pe.ErrnoError(le.EINVAL);return e.position=A,A},read:function(e,t,r,A,n){if(e.stream_ops)return ye.read(e,t,r,A,n);var o=void 0!==n;!o&&e.seekable&&(n=e.position);var i=Ie.readSync(e.nfd,ue.bufferFrom(t.buffer),r,A,n);return o||(e.position+=i),i},write:function(e,t,r,A,n){if(e.stream_ops)return ye.write(e,t,r,A,n);1024&e.flags&&pe.llseek(e,0,2);var o=void 0!==n;!o&&e.seekable&&(n=e.position);var i=Ie.writeSync(e.nfd,ue.bufferFrom(t.buffer),r,A,n);return o||(e.position+=i),i},allocate:function(){throw new pe.ErrnoError(le.EOPNOTSUPP)},mmap:function(){throw new pe.ErrnoError(le.ENODEV)},msync:function(){return 0},munmap:function(){return 0},ioctl:function(){throw new pe.ErrnoError(le.ENOTTY)}},pe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e){if(!(e instanceof pe.ErrnoError))throw e+" : "+ne();return se(e.errno)},lookupPath:function(e,t){if(t=t||{},!(e=ae.resolve(pe.cwd(),e)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var A in r)void 0===t[A]&&(t[A]=r[A]);if(t.recurse_count>8)throw new pe.ErrnoError(32);for(var n=ie.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),o=pe.root,i="/",s=0;s40)throw new pe.ErrnoError(32)}}return{path:i,node:o}},getPath:function(e){for(var t;;){if(pe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var r=0,A=0;A>>0)%pe.nameTable.length},hashAddNode:function(e){var t=pe.hashName(e.parent.id,e.name);e.name_next=pe.nameTable[t],pe.nameTable[t]=e},hashRemoveNode:function(e){var t=pe.hashName(e.parent.id,e.name);if(pe.nameTable[t]===e)pe.nameTable[t]=e.name_next;else for(var r=pe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:function(e,t){var r=pe.mayLookup(e);if(r)throw new pe.ErrnoError(r,e);for(var A=pe.hashName(e.id,t),n=pe.nameTable[A];n;n=n.name_next){var o=n.name;if(n.parent.id===e.id&&o===t)return n}return pe.lookup(e,t)},createNode:function(e,t,r,A){var n=new pe.FSNode(e,t,r,A);return pe.hashAddNode(n),n},destroyNode:function(e){pe.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(e){var t=pe.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return pe.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){var t=pe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{pe.lookupNode(e,t);return 20}catch(e){}return pe.nodePermissions(e,"wx")},mayDelete:function(e,t,r){var A;try{A=pe.lookupNode(e,t)}catch(e){return e.errno}var n=pe.nodePermissions(e,"wx");if(n)return n;if(r){if(!pe.isDir(A.mode))return 54;if(pe.isRoot(A)||pe.getPath(A)===pe.cwd())return 10}else if(pe.isDir(A.mode))return 31;return 0},mayOpen:function(e,t){return e?pe.isLink(e.mode)?32:pe.isDir(e.mode)&&("r"!==pe.flagsToPermissionString(t)||512&t)?31:pe.nodePermissions(e,pe.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||pe.MAX_OPEN_FDS;for(var r=e;r<=t;r++)if(!pe.streams[r])return r;throw new pe.ErrnoError(33)},getStream:function(e){return pe.streams[e]},createStream:function(e,t,r){pe.FSStream||(pe.FSStream=function(){},pe.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var A=new pe.FSStream;for(var n in e)A[n]=e[n];e=A;var o=pe.nextfd(t,r);return e.fd=o,pe.streams[o]=e,e},closeStream:function(e){pe.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=pe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new pe.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){pe.devices[e]={stream_ops:t}},getDevice:function(e){return pe.devices[e]},getMounts:function(e){for(var t=[],r=[e];r.length;){var A=r.pop();t.push(A),r.push.apply(r,A.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),pe.syncFSRequests++,pe.syncFSRequests>1&&p("warning: "+pe.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=pe.getMounts(pe.root.mount),A=0;function n(e){return pe.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,n(e));++A>=r.length&&n(null)}r.forEach((function(t){if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:function(e,t,r){var A,n="/"===r,o=!r;if(n&&pe.root)throw new pe.ErrnoError(10);if(!n&&!o){var i=pe.lookupPath(r,{follow_mount:!1});if(r=i.path,A=i.node,pe.isMountpoint(A))throw new pe.ErrnoError(10);if(!pe.isDir(A.mode))throw new pe.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},a=e.mount(s);return a.mount=s,s.root=a,n?pe.root=a:A&&(A.mounted=s,A.mount&&A.mount.mounts.push(s)),a},unmount:function(e){var t=pe.lookupPath(e,{follow_mount:!1});if(!pe.isMountpoint(t.node))throw new pe.ErrnoError(28);var r=t.node,A=r.mounted,n=pe.getMounts(A);Object.keys(pe.nameTable).forEach((function(e){for(var t=pe.nameTable[e];t;){var r=t.name_next;-1!==n.indexOf(t.mount)&&pe.destroyNode(t),t=r}})),r.mounted=null;var o=r.mount.mounts.indexOf(A);r.mount.mounts.splice(o,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,r){var A=pe.lookupPath(e,{parent:!0}).node,n=ie.basename(e);if(!n||"."===n||".."===n)throw new pe.ErrnoError(28);var o=pe.mayCreate(A,n);if(o)throw new pe.ErrnoError(o);if(!A.node_ops.mknod)throw new pe.ErrnoError(63);return A.node_ops.mknod(A,n,t,r)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,pe.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,pe.mknod(e,t,0)},mkdirTree:function(e,t){for(var r=e.split("/"),A="",n=0;nthis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,A=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,i=1048576;n||(i=A);var s=this;s.setDataGetter((function(e){var t=e*i,n=(e+1)*i-1;if(n=Math.min(n,A-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>A-1)throw new Error("only "+A+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",r,!1),A!==i&&n.setRequestHeader("Range","bytes="+e+"-"+t),"undefined"!=typeof Uint8Array&&(n.responseType="arraybuffer"),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+r+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):we(n.responseText||"",!0)}(t,n)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&A||(i=A=1,A=this.getter(0).length,i=A,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=A,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:r},s=pe.createFile(e,t,i,A,n);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var a={};return Object.keys(s.stream_ops).forEach((function(e){var t=s.stream_ops[e];a[e]=function(){if(!pe.forceLoadFile(s))throw new pe.ErrnoError(29);return t.apply(null,arguments)}})),a.read=function(e,t,r,A,n){if(!pe.forceLoadFile(s))throw new pe.ErrnoError(29);var o=e.node.contents;if(n>=o.length)return 0;var i=Math.min(o.length-n,A);if(o.slice)for(var a=0;a>2]=A.dev,M[r+4>>2]=0,M[r+8>>2]=A.ino,M[r+12>>2]=A.mode,M[r+16>>2]=A.nlink,M[r+20>>2]=A.uid,M[r+24>>2]=A.gid,M[r+28>>2]=A.rdev,M[r+32>>2]=0,te=[A.size>>>0,(ee=A.size,+Y(ee)>=1?ee>0?(0|J(+H(ee/4294967296),4294967295))>>>0:~~+G((ee-+(~~ee>>>0))/4294967296)>>>0:0)],M[r+40>>2]=te[0],M[r+44>>2]=te[1],M[r+48>>2]=4096,M[r+52>>2]=A.blocks,M[r+56>>2]=A.atime.getTime()/1e3|0,M[r+60>>2]=0,M[r+64>>2]=A.mtime.getTime()/1e3|0,M[r+68>>2]=0,M[r+72>>2]=A.ctime.getTime()/1e3|0,M[r+76>>2]=0,te=[A.ino>>>0,(ee=A.ino,+Y(ee)>=1?ee>0?(0|J(+H(ee/4294967296),4294967295))>>>0:~~+G((ee-+(~~ee>>>0))/4294967296)>>>0:0)],M[r+80>>2]=te[0],M[r+84>>2]=te[1],0},doMsync:function(e,t,r,A,n){var o=F.slice(e,e+r);pe.msync(t,o,n,r,A)},doMkdir:function(e,t){return"/"===(e=ie.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),pe.mkdir(e,t,0),0},doMknod:function(e,t,r){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return pe.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var A=pe.readlink(e),n=Math.min(r,v(A)),o=N[t+n];return b(A,t,r+1),N[t+n]=o,n},doAccess:function(e,t){if(-8&t)return-28;var r;if(!(r=pe.lookupPath(e,{follow:!0}).node))return-44;var A="";return 4&t&&(A+="r"),2&t&&(A+="w"),1&t&&(A+="x"),A&&pe.nodePermissions(r,A)?-2:0},doDup:function(e,t,r){var A=pe.getStream(r);return A&&pe.close(A),pe.open(e,t,0,r,r).fd},doReadv:function(e,t,r,A){for(var n=0,o=0;o>2],s=M[t+(8*o+4)>>2],a=pe.read(e,N,i,s,A);if(a<0)return-1;if(n+=a,a>2],s=M[t+(8*o+4)>>2],a=pe.write(e,N,i,s,A);if(a<0)return-1;n+=a}return n},varargs:void 0,get:function(){return de.varargs+=4,M[de.varargs-4>>2]},getStr:function(e){return Q(e)},getStreamFromFD:function(e){var t=pe.getStream(e);if(!t)throw new pe.ErrnoError(8);return t},get64:function(e,t){return e}};function Ce(e){try{return C.grow(e-k.byteLength+65535>>>16),L(C.buffer),1}catch(e){}}var fe=function(e,t,r,A){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=pe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=A};Object.defineProperties(fe.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return pe.isDir(this.mode)}},isDevice:{get:function(){return pe.isChrdev(this.mode)}}}),pe.FSNode=fe,pe.staticInit();var Ie=n,Ee=r(85622);ue.staticInit();var Be=function(e){return function(){try{return e.apply(this,arguments)}catch(e){if(!e.code)throw e;throw new pe.ErrnoError(le[e.code])}}},ye=Object.assign({},pe);for(var me in he)pe[me]=Be(he[me]);function we(e,t,r){var A=r>0?r:v(e)+1,n=new Array(A),o=D(e,n,0,n.length);return t&&(n.length=o),n}"function"==typeof atob&&atob;function Qe(e){if(Z(e))return function(e){var t;try{t=Buffer.from(e,"base64")}catch(r){t=new Buffer(e,"base64")}return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}(e.slice("data:application/octet-stream;base64,".length))}var De,be={m:function(e,t){return oe(e,t)},b:f,r:function(e,t){try{return e=de.getStr(e),pe.chmod(e,t),0}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),-e.errno}},g:function(e,t,r){de.varargs=r;try{var A=de.getStreamFromFD(e);switch(t){case 0:return(n=de.get())<0?-28:pe.open(A.path,A.flags,0,n).fd;case 1:case 2:return 0;case 3:return A.flags;case 4:var n=de.get();return A.flags|=n,0;case 12:n=de.get();return K[n+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return se(28),-1;default:return-28}}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),-e.errno}},l:function(e,t){try{var r=de.getStreamFromFD(e);return de.doStat(pe.stat,r.path,t)}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),-e.errno}},q:function(e,t,r){de.varargs=r;try{var A=de.getStreamFromFD(e);switch(t){case 21509:case 21505:return A.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return A.tty?0:-59;case 21519:if(!A.tty)return-59;var n=de.get();return M[n>>2]=0,0;case 21520:return A.tty?-28:-59;case 21531:n=de.get();return pe.ioctl(A,t,n);case 21523:case 21524:return A.tty?0:-59;default:_("bad ioctl syscall "+t)}}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),-e.errno}},t:function(e,t,r){de.varargs=r;try{var A=de.getStr(e),n=de.get();return pe.open(A,t,n).fd}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),-e.errno}},s:function(e,t,r){try{var A=de.getStreamFromFD(e);return pe.read(A,N,t,r)}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),-e.errno}},j:function(e,t){try{return e=de.getStr(e),t=de.getStr(t),pe.rename(e,t),0}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),-e.errno}},u:function(e){try{return e=de.getStr(e),pe.rmdir(e),0}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),-e.errno}},e:function(e,t){try{return e=de.getStr(e),de.doStat(pe.stat,e,t)}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),-e.errno}},i:function(e){try{return e=de.getStr(e),pe.unlink(e),0}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),-e.errno}},v:function(e,t,r){F.copyWithin(e,t,t+r)},w:function(e){e>>>=0;var t=F.length;if(e>2147483648)return!1;for(var r,A,n=1;n<=4;n*=2){var o=t*(1+.2/n);if(o=Math.min(o,e+100663296),Ce(Math.min(2147483648,((r=Math.max(16777216,e,o))%(A=65536)>0&&(r+=A-r%A),r))))return!0}return!1},h:function(e){try{var t=de.getStreamFromFD(e);return pe.close(t),0}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),e.errno}},k:function(e,t){try{var r=de.getStreamFromFD(e),A=r.tty?2:pe.isDir(r.mode)?3:pe.isLink(r.mode)?7:4;return N[t>>0]=A,0}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),e.errno}},p:function(e,t,r,A){try{var n=de.getStreamFromFD(e),o=de.doReadv(n,t,r);return M[A>>2]=o,0}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),e.errno}},n:function(e,t,r,A,n){try{var o=de.getStreamFromFD(e),i=4294967296*r+(t>>>0);return i<=-9007199254740992||i>=9007199254740992?-61:(pe.llseek(o,i,A),te=[o.position>>>0,(ee=o.position,+Y(ee)>=1?ee>0?(0|J(+H(ee/4294967296),4294967295))>>>0:~~+G((ee-+(~~ee>>>0))/4294967296)>>>0:0)],M[n>>2]=te[0],M[n+4>>2]=te[1],o.getdents&&0===i&&0===A&&(o.getdents=null),0)}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),e.errno}},f:function(e,t,r,A){try{var n=de.getStreamFromFD(e),o=de.doWritev(n,t,r);return M[A>>2]=o,0}catch(e){return void 0!==pe&&e instanceof pe.ErrnoError||_(e),e.errno}},a:C,c:function(e){0|e},d:function(e){var t=Date.now()/1e3|0;return e&&(M[e>>2]=t),t},o:function(e){!function e(){if(!e.called){e.called=!0,M[Ke()>>2]=60*(new Date).getTimezoneOffset();var t=(new Date).getFullYear(),r=new Date(t,0,1),A=new Date(t,6,1);M[Fe()>>2]=Number(r.getTimezoneOffset()!=A.getTimezoneOffset());var n=a(r),o=a(A),i=S(n),s=S(o);A.getTimezoneOffset()>2]=i,M[Ne()+4>>2]=s):(M[Ne()>>2]=s,M[Ne()+4>>2]=i)}function a(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}}();var t=Date.UTC(M[e+20>>2]+1900,M[e+16>>2],M[e+12>>2],M[e+8>>2],M[e+4>>2],M[e>>2],0),r=new Date(t);M[e+24>>2]=r.getUTCDay();var A=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),n=(r.getTime()-A)/864e5|0;return M[e+28>>2]=n,r.getTime()/1e3|0}},ve=function(){var e={a:be};function t(e,t){var r=e.exports;o.asm=r,V()}if(X(),o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){return p("Module.instantiateWasm callback failed with error: "+e),!1}return function(){var r,A,n;try{n=function(){try{if(d)return new Uint8Array(d);var e=Qe(re);if(e)return e;if(a)return a(re);throw"sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)"}catch(e){_(e)}}(),A=new WebAssembly.Module(n),r=new WebAssembly.Instance(A,e)}catch(e){var o=e.toString();throw p("failed to compile wasm module: "+o),(o.indexOf("imported Memory")>=0||o.indexOf("memory import")>=0)&&p("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."),e}t(r)}(),o.asm}(),Se=o.___wasm_call_ctors=ve.x,ke=(o._zipstruct_stat=ve.y,o._zipstruct_statS=ve.z,o._zipstruct_stat_name=ve.A,o._zipstruct_stat_index=ve.B,o._zipstruct_stat_size=ve.C,o._zipstruct_stat_mtime=ve.D,o._zipstruct_error=ve.E,o._zipstruct_errorS=ve.F,o._zipstruct_error_code_zip=ve.G,o._zipstruct_stat_comp_size=ve.H,o._zipstruct_stat_comp_method=ve.I,o._zip_close=ve.J,o._zip_delete=ve.K,o._zip_dir_add=ve.L,o._zip_discard=ve.M,o._zip_error_init_with_code=ve.N,o._zip_get_error=ve.O,o._zip_file_get_error=ve.P,o._zip_error_strerror=ve.Q,o._zip_fclose=ve.R,o._zip_file_add=ve.S,o._zip_file_get_external_attributes=ve.T,o._zip_file_set_external_attributes=ve.U,o._zip_file_set_mtime=ve.V,o._zip_fopen=ve.W,o._zip_fopen_index=ve.X,o._zip_fread=ve.Y,o._zip_get_name=ve.Z,o._zip_get_num_entries=ve._,o._zip_name_locate=ve.$,o._zip_open=ve.aa,o._zip_open_from_source=ve.ba,o._zip_set_file_compression=ve.ca,o._zip_source_buffer=ve.da,o._zip_source_buffer_create=ve.ea,o._zip_source_close=ve.fa,o._zip_source_error=ve.ga,o._zip_source_free=ve.ha,o._zip_source_keep=ve.ia,o._zip_source_open=ve.ja,o._zip_source_read=ve.ka,o._zip_source_seek=ve.la,o._zip_source_set_mtime=ve.ma,o._zip_source_tell=ve.na,o._zip_stat=ve.oa,o._zip_stat_index=ve.pa,o._zip_ext_count_symlinks=ve.qa,o.___errno_location=ve.ra),Ne=o.__get_tzname=ve.sa,Fe=o.__get_daylight=ve.ta,Ke=o.__get_timezone=ve.ua,Me=o.stackSave=ve.va,Re=o.stackRestore=ve.wa,xe=o.stackAlloc=ve.xa,Le=o._malloc=ve.ya;o._free=ve.za;function Pe(e){function t(){De||(De=!0,o.calledRun=!0,I||(!0,o.noFSInit||pe.init.initialized||pe.init(),ce.init(),Ae(U),pe.ignorePermissions=!1,Ae(T),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)e=o.postRun.shift(),j.unshift(e);var e;Ae(j)}()))}e=e||l,q>0||(!function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)e=o.preRun.shift(),O.unshift(e);var e;Ae(O)}(),q>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}if(o.cwrap=function(e,t,r,A){var n=(r=r||[]).every((function(e){return"number"===e}));return"string"!==t&&n&&!A?B(e):function(){return y(e,t,r,arguments)}},o.getValue=function(e,t,r){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return N[e>>0];case"i16":return K[e>>1];case"i32":case"i64":return M[e>>2];case"float":return R[e>>2];case"double":return x[e>>3];default:_("invalid type for getValue: "+t)}return null},W=function e(){De||Pe(),De||(W=e)},o.run=Pe,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();Pe()},98261:e=>{"use strict";function t(e,r,A,n){this.message=e,this.expected=r,this.found=A,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(t,Error),t.buildMessage=function(e,t){var r={literal:function(e){return`"${n(e.text)}"`},class:function(e){var t,r="";for(t=0;t0){for(t=1,A=1;tf&&(f=p,I=[]),I.push(e))}function Q(e,r,A){return new t(t.buildMessage(e,r),e,r,A)}function D(){var t,r,A,o;return t=p,(r=b())!==n?(47===e.charCodeAt(p)?(A="/",p++):(A=n,w(s)),A!==n&&(o=b())!==n?(d=t,t=r={from:r,descriptor:o}):(p=t,t=n)):(p=t,t=n),t===n&&(t=p,(r=b())!==n&&(d=t,r=function(e){return{descriptor:e}}(r)),t=r),t}function b(){var t,r,A,o;return t=p,(r=v())!==n?(64===e.charCodeAt(p)?(A="@",p++):(A=n,w(a)),A!==n&&(o=function(){var t,r,A;t=p,r=[],u.test(e.charAt(p))?(A=e.charAt(p),p++):(A=n,w(h));if(A!==n)for(;A!==n;)r.push(A),u.test(e.charAt(p))?(A=e.charAt(p),p++):(A=n,w(h));else r=n;r!==n&&(d=t,r=c());return t=r}())!==n?(d=t,t=r={fullName:r,description:o}):(p=t,t=n)):(p=t,t=n),t===n&&(t=p,(r=v())!==n&&(d=t,r=function(e){return{fullName:e}}(r)),t=r),t}function v(){var t,r,A;return t=p,64===e.charCodeAt(p)?(r="@",p++):(r=n,w(a)),r!==n&&S()!==n?(47===e.charCodeAt(p)?(A="/",p++):(A=n,w(s)),A!==n&&S()!==n?(d=t,t=r=c()):(p=t,t=n)):(p=t,t=n),t===n&&(t=p,(r=S())!==n&&(d=t,r=c()),t=r),t}function S(){var t,r,A;if(t=p,r=[],g.test(e.charAt(p))?(A=e.charAt(p),p++):(A=n,w(l)),A!==n)for(;A!==n;)r.push(A),g.test(e.charAt(p))?(A=e.charAt(p),p++):(A=n,w(l));else r=n;return r!==n&&(d=t,r=c()),t=r}if((A=i())!==n&&p===e.length)return A;throw A!==n&&p{"use strict";function t(e,r,A,n){this.message=e,this.expected=r,this.found=A,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(t,Error),t.buildMessage=function(e,t){var r={literal:function(e){return'"'+n(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,A=1;t>",!1),I=le(">&",!1),E=le(">",!1),B=le("<<<",!1),y=le("<&",!1),m=le("<",!1),w=le("'",!1),Q=le('"',!1),D=function(e){return{type:"text",text:e}},b=le("\\",!1),v={type:"any"},S=/^[^']/,k=ue(["'"],!0,!1),N=function(e){return e.join("")},F=/^[^$"]/,K=ue(["$",'"'],!0,!1),M=le("-",!1),R=le("+",!1),x=/^[0-9]/,L=ue([["0","9"]],!1,!1),P=le(".",!1),O=le("*",!1),U=le("/",!1),T=le("$((",!1),j=le("))",!1),Y=le("$(",!1),G=le("${",!1),H=le(":-",!1),J=le(":-}",!1),q=function(e){return{name:e}},z=le("$",!1),W=/^[a-zA-Z0-9_]/,X=ue([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),V=function(){return e.substring(ie,oe)},_=/^[$@*?#a-zA-Z0-9_\-]/,Z=ue(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),$=/^[(){}<>$|&; \t"']/,ee=ue(["(",")","{","}","<",">","$","|","&",";"," ","\t",'"',"'"],!1,!1),te=/^[<>&; \t"']/,re=ue(["<",">","&",";"," ","\t",'"',"'"],!1,!1),Ae=/^[ \t]/,ne=ue([" ","\t"],!1,!1),oe=0,ie=0,se=[{line:1,column:1}],ae=0,ce=[],ge=0;if("startRule"in r){if(!(r.startRule in o))throw new Error("Can't start parsing from rule \""+r.startRule+'".');i=o[r.startRule]}function le(e,t){return{type:"literal",text:e,ignoreCase:t}}function ue(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function he(t){var r,A=se[t];if(A)return A;for(r=t-1;!se[r];)r--;for(A={line:(A=se[r]).line,column:A.column};rae&&(ae=oe,ce=[]),ce.push(e))}function Ce(e,r,A){return new t(t.buildMessage(e,r),e,r,A)}function fe(){var e,t;return e=oe,(t=Ie())===n&&(t=null),t!==n&&(ie=e,t=t||[]),e=t}function Ie(){var e,t,r,A,o;if(e=oe,(t=Be())!==n){for(r=[],A=Te();A!==n;)r.push(A),A=Te();r!==n&&(A=Ee())!==n?((o=function(){var e,t,r,A,o;e=oe,t=[],r=Te();for(;r!==n;)t.push(r),r=Te();if(t!==n)if((r=Ie())!==n){for(A=[],o=Te();o!==n;)A.push(o),o=Te();A!==n?(ie=e,e=t=r):(oe=e,e=n)}else oe=e,e=n;else oe=e,e=n;return e}())===n&&(o=null),o!==n?(ie=e,e=t=[t].concat(o||[])):(oe=e,e=n)):(oe=e,e=n)}else oe=e,e=n;if(e===n)if(e=oe,(t=Be())!==n){for(r=[],A=Te();A!==n;)r.push(A),A=Te();r!==n?((A=Ee())===n&&(A=null),A!==n?(ie=e,e=t=function(e,t){return[e]}(t)):(oe=e,e=n)):(oe=e,e=n)}else oe=e,e=n;return e}function Ee(){var t;return 59===e.charCodeAt(oe)?(t=";",oe++):(t=n,0===ge&&de(s)),t}function Be(){var t,r,A,o,i;return t=oe,(r=ye())!==n?((A=function(){var t,r,A,o,i,s,g;t=oe,r=[],A=Te();for(;A!==n;)r.push(A),A=Te();if(r!==n)if((A=function(){var t;"&&"===e.substr(oe,2)?(t="&&",oe+=2):(t=n,0===ge&&de(a));t===n&&("||"===e.substr(oe,2)?(t="||",oe+=2):(t=n,0===ge&&de(c)));return t}())!==n){for(o=[],i=Te();i!==n;)o.push(i),i=Te();if(o!==n)if((i=Be())!==n){for(s=[],g=Te();g!==n;)s.push(g),g=Te();s!==n?(ie=t,t=r={type:A,line:i}):(oe=t,t=n)}else oe=t,t=n;else oe=t,t=n}else oe=t,t=n;else oe=t,t=n;return t}())===n&&(A=null),A!==n?(ie=t,o=r,t=r=(i=A)?{chain:o,then:i}:{chain:o}):(oe=t,t=n)):(oe=t,t=n),t}function ye(){var t,r,A,o,i;return t=oe,(r=function(){var t,r,A,o,i,s,a,c,g,l,u;t=oe,r=[],A=Te();for(;A!==n;)r.push(A),A=Te();if(r!==n)if(40===e.charCodeAt(oe)?(A="(",oe++):(A=n,0===ge&&de(h)),A!==n){for(o=[],i=Te();i!==n;)o.push(i),i=Te();if(o!==n)if((i=Ie())!==n){for(s=[],a=Te();a!==n;)s.push(a),a=Te();if(s!==n)if(41===e.charCodeAt(oe)?(a=")",oe++):(a=n,0===ge&&de(p)),a!==n){for(c=[],g=Te();g!==n;)c.push(g),g=Te();if(c!==n){for(g=[],l=Qe();l!==n;)g.push(l),l=Qe();if(g!==n){for(l=[],u=Te();u!==n;)l.push(u),u=Te();l!==n?(ie=t,t=r={type:"subshell",subshell:i,args:g}):(oe=t,t=n)}else oe=t,t=n}else oe=t,t=n}else oe=t,t=n;else oe=t,t=n}else oe=t,t=n;else oe=t,t=n}else oe=t,t=n;else oe=t,t=n;if(t===n){for(t=oe,r=[],A=Te();A!==n;)r.push(A),A=Te();if(r!==n)if(123===e.charCodeAt(oe)?(A="{",oe++):(A=n,0===ge&&de(d)),A!==n){for(o=[],i=Te();i!==n;)o.push(i),i=Te();if(o!==n)if((i=Ie())!==n){for(s=[],a=Te();a!==n;)s.push(a),a=Te();if(s!==n)if(125===e.charCodeAt(oe)?(a="}",oe++):(a=n,0===ge&&de(C)),a!==n){for(c=[],g=Te();g!==n;)c.push(g),g=Te();if(c!==n){for(g=[],l=Qe();l!==n;)g.push(l),l=Qe();if(g!==n){for(l=[],u=Te();u!==n;)l.push(u),u=Te();l!==n?(ie=t,r=function(e,t){return{type:"group",group:e,args:t}}(i,g),t=r):(oe=t,t=n)}else oe=t,t=n}else oe=t,t=n}else oe=t,t=n;else oe=t,t=n}else oe=t,t=n;else oe=t,t=n}else oe=t,t=n;else oe=t,t=n;if(t===n){for(t=oe,r=[],A=Te();A!==n;)r.push(A),A=Te();if(r!==n){for(A=[],o=me();o!==n;)A.push(o),o=me();if(A!==n){for(o=[],i=Te();i!==n;)o.push(i),i=Te();if(o!==n){if(i=[],(s=we())!==n)for(;s!==n;)i.push(s),s=we();else i=n;if(i!==n){for(s=[],a=Te();a!==n;)s.push(a),a=Te();s!==n?(ie=t,r=function(e,t){return{type:"command",args:t,envs:e}}(A,i),t=r):(oe=t,t=n)}else oe=t,t=n}else oe=t,t=n}else oe=t,t=n}else oe=t,t=n;if(t===n){for(t=oe,r=[],A=Te();A!==n;)r.push(A),A=Te();if(r!==n){if(A=[],(o=me())!==n)for(;o!==n;)A.push(o),o=me();else A=n;if(A!==n){for(o=[],i=Te();i!==n;)o.push(i),i=Te();o!==n?(ie=t,t=r={type:"envs",envs:A}):(oe=t,t=n)}else oe=t,t=n}else oe=t,t=n}}}return t}())!==n?((A=function(){var t,r,A,o,i,s,a;t=oe,r=[],A=Te();for(;A!==n;)r.push(A),A=Te();if(r!==n)if((A=function(){var t;"|&"===e.substr(oe,2)?(t="|&",oe+=2):(t=n,0===ge&&de(g));t===n&&(124===e.charCodeAt(oe)?(t="|",oe++):(t=n,0===ge&&de(l)));return t}())!==n){for(o=[],i=Te();i!==n;)o.push(i),i=Te();if(o!==n)if((i=ye())!==n){for(s=[],a=Te();a!==n;)s.push(a),a=Te();s!==n?(ie=t,t=r={type:A,chain:i}):(oe=t,t=n)}else oe=t,t=n;else oe=t,t=n}else oe=t,t=n;else oe=t,t=n;return t}())===n&&(A=null),A!==n?(ie=t,o=r,t=r=(i=A)?{...o,then:i}:o):(oe=t,t=n)):(oe=t,t=n),t}function me(){var t,r,A,o,i,s;if(t=oe,(r=Le())!==n)if(61===e.charCodeAt(oe)?(A="=",oe++):(A=n,0===ge&&de(u)),A!==n)if((o=be())!==n){for(i=[],s=Te();s!==n;)i.push(s),s=Te();i!==n?(ie=t,t=r={name:r,args:[o]}):(oe=t,t=n)}else oe=t,t=n;else oe=t,t=n;else oe=t,t=n;if(t===n)if(t=oe,(r=Le())!==n)if(61===e.charCodeAt(oe)?(A="=",oe++):(A=n,0===ge&&de(u)),A!==n){for(o=[],i=Te();i!==n;)o.push(i),i=Te();o!==n?(ie=t,t=r=function(e){return{name:e,args:[]}}(r)):(oe=t,t=n)}else oe=t,t=n;else oe=t,t=n;return t}function we(){var e,t,r;for(e=oe,t=[],r=Te();r!==n;)t.push(r),r=Te();if(t!==n&&(r=Qe())!==n?(ie=e,e=t=r):(oe=e,e=n),e===n){for(e=oe,t=[],r=Te();r!==n;)t.push(r),r=Te();t!==n&&(r=De())!==n?(ie=e,e=t=r):(oe=e,e=n)}return e}function Qe(){var t,r,A,o;for(t=oe,r=[],A=Te();A!==n;)r.push(A),A=Te();return r!==n&&(A=function(){var t;">>"===e.substr(oe,2)?(t=">>",oe+=2):(t=n,0===ge&&de(f));t===n&&(">&"===e.substr(oe,2)?(t=">&",oe+=2):(t=n,0===ge&&de(I)),t===n&&(62===e.charCodeAt(oe)?(t=">",oe++):(t=n,0===ge&&de(E)),t===n&&("<<<"===e.substr(oe,3)?(t="<<<",oe+=3):(t=n,0===ge&&de(B)),t===n&&("<&"===e.substr(oe,2)?(t="<&",oe+=2):(t=n,0===ge&&de(y)),t===n&&(60===e.charCodeAt(oe)?(t="<",oe++):(t=n,0===ge&&de(m)))))));return t}())!==n&&(o=De())!==n?(ie=t,t=r={type:"redirection",subtype:A,args:[o]}):(oe=t,t=n),t}function De(){var e,t,r;for(e=oe,t=[],r=Te();r!==n;)t.push(r),r=Te();return t!==n&&(r=be())!==n?(ie=e,e=t=r):(oe=e,e=n),e}function be(){var e,t,r,A;if(e=oe,t=[],(r=ve())!==n)for(;r!==n;)t.push(r),r=ve();else t=n;return t!==n&&(ie=e,A=t,t={type:"argument",segments:[].concat(...A)}),e=t}function ve(){var t,r;return t=oe,(r=function(){var t,r,A,o;t=oe,39===e.charCodeAt(oe)?(r="'",oe++):(r=n,0===ge&&de(w));r!==n&&(A=function(){var t,r,A,o,i;t=oe,r=[],A=oe,92===e.charCodeAt(oe)?(o="\\",oe++):(o=n,0===ge&&de(b));o!==n?(e.length>oe?(i=e.charAt(oe),oe++):(i=n,0===ge&&de(v)),i!==n?(ie=A,A=o=i):(oe=A,A=n)):(oe=A,A=n);A===n&&(S.test(e.charAt(oe))?(A=e.charAt(oe),oe++):(A=n,0===ge&&de(k)));for(;A!==n;)r.push(A),A=oe,92===e.charCodeAt(oe)?(o="\\",oe++):(o=n,0===ge&&de(b)),o!==n?(e.length>oe?(i=e.charAt(oe),oe++):(i=n,0===ge&&de(v)),i!==n?(ie=A,A=o=i):(oe=A,A=n)):(oe=A,A=n),A===n&&(S.test(e.charAt(oe))?(A=e.charAt(oe),oe++):(A=n,0===ge&&de(k)));r!==n&&(ie=t,r=N(r));return t=r}())!==n?(39===e.charCodeAt(oe)?(o="'",oe++):(o=n,0===ge&&de(w)),o!==n?(ie=t,r=function(e){return[{type:"text",text:e}]}(A),t=r):(oe=t,t=n)):(oe=t,t=n);return t}())!==n&&(ie=t,r=r),(t=r)===n&&(t=oe,(r=function(){var t,r,A,o;t=oe,34===e.charCodeAt(oe)?(r='"',oe++):(r=n,0===ge&&de(Q));if(r!==n){for(A=[],o=Se();o!==n;)A.push(o),o=Se();A!==n?(34===e.charCodeAt(oe)?(o='"',oe++):(o=n,0===ge&&de(Q)),o!==n?(ie=t,t=r=A):(oe=t,t=n)):(oe=t,t=n)}else oe=t,t=n;return t}())!==n&&(ie=t,r=r),(t=r)===n&&(t=oe,(r=function(){var e,t,r;if(e=oe,t=[],(r=ke())!==n)for(;r!==n;)t.push(r),r=ke();else t=n;t!==n&&(ie=e,t=t);return e=t}())!==n&&(ie=t,r=r),t=r)),t}function Se(){var t,r,A;return t=oe,(r=Me())!==n&&(ie=t,r={type:"arithmetic",arithmetic:r,quoted:!0}),(t=r)===n&&(t=oe,(r=Re())!==n&&(ie=t,r={type:"shell",shell:r,quoted:!0}),(t=r)===n&&(t=oe,(r=xe())!==n&&(ie=t,A=r,r={type:"variable",...A,quoted:!0}),(t=r)===n&&(t=oe,(r=function(){var t,r,A,o,i;t=oe,r=[],A=oe,92===e.charCodeAt(oe)?(o="\\",oe++):(o=n,0===ge&&de(b));o!==n?(e.length>oe?(i=e.charAt(oe),oe++):(i=n,0===ge&&de(v)),i!==n?(ie=A,A=o=i):(oe=A,A=n)):(oe=A,A=n);A===n&&(F.test(e.charAt(oe))?(A=e.charAt(oe),oe++):(A=n,0===ge&&de(K)));if(A!==n)for(;A!==n;)r.push(A),A=oe,92===e.charCodeAt(oe)?(o="\\",oe++):(o=n,0===ge&&de(b)),o!==n?(e.length>oe?(i=e.charAt(oe),oe++):(i=n,0===ge&&de(v)),i!==n?(ie=A,A=o=i):(oe=A,A=n)):(oe=A,A=n),A===n&&(F.test(e.charAt(oe))?(A=e.charAt(oe),oe++):(A=n,0===ge&&de(K)));else r=n;r!==n&&(ie=t,r=N(r));return t=r}())!==n&&(ie=t,r=D(r)),t=r))),t}function ke(){var t,A,o;return t=oe,(A=Me())!==n&&(ie=t,A={type:"arithmetic",arithmetic:A,quoted:!1}),(t=A)===n&&(t=oe,(A=Re())!==n&&(ie=t,A={type:"shell",shell:A,quoted:!1}),(t=A)===n&&(t=oe,(A=xe())!==n&&(ie=t,o=A,A={type:"variable",...o,quoted:!1}),(t=A)===n&&(t=oe,(A=function(){var t,A;t=oe,(A=function(){var t,r,A,o,i;t=oe,r=[],A=oe,o=oe,ge++,i=Ue(),ge--,i===n?o=void 0:(oe=o,o=n);o!==n?(e.length>oe?(i=e.charAt(oe),oe++):(i=n,0===ge&&de(v)),i!==n?(ie=A,A=o=i):(oe=A,A=n)):(oe=A,A=n);if(A!==n)for(;A!==n;)r.push(A),A=oe,o=oe,ge++,i=Ue(),ge--,i===n?o=void 0:(oe=o,o=n),o!==n?(e.length>oe?(i=e.charAt(oe),oe++):(i=n,0===ge&&de(v)),i!==n?(ie=A,A=o=i):(oe=A,A=n)):(oe=A,A=n);else r=n;r!==n&&(ie=t,r=N(r));return t=r}())!==n?(ie=oe,o=A,(r.isGlobPattern(o)?void 0:n)!==n?(ie=t,t=A=A):(oe=t,t=n)):(oe=t,t=n);var o;return t}())!==n&&(ie=t,A={type:"glob",pattern:A}),(t=A)===n&&(t=oe,(A=function(){var t,r,A,o,i;t=oe,r=[],A=oe,92===e.charCodeAt(oe)?(o="\\",oe++):(o=n,0===ge&&de(b));o!==n?(e.length>oe?(i=e.charAt(oe),oe++):(i=n,0===ge&&de(v)),i!==n?(ie=A,A=o=i):(oe=A,A=n)):(oe=A,A=n);A===n&&(A=oe,o=oe,ge++,i=Oe(),ge--,i===n?o=void 0:(oe=o,o=n),o!==n?(e.length>oe?(i=e.charAt(oe),oe++):(i=n,0===ge&&de(v)),i!==n?(ie=A,A=o=i):(oe=A,A=n)):(oe=A,A=n));if(A!==n)for(;A!==n;)r.push(A),A=oe,92===e.charCodeAt(oe)?(o="\\",oe++):(o=n,0===ge&&de(b)),o!==n?(e.length>oe?(i=e.charAt(oe),oe++):(i=n,0===ge&&de(v)),i!==n?(ie=A,A=o=i):(oe=A,A=n)):(oe=A,A=n),A===n&&(A=oe,o=oe,ge++,i=Oe(),ge--,i===n?o=void 0:(oe=o,o=n),o!==n?(e.length>oe?(i=e.charAt(oe),oe++):(i=n,0===ge&&de(v)),i!==n?(ie=A,A=o=i):(oe=A,A=n)):(oe=A,A=n));else r=n;r!==n&&(ie=t,r=N(r));return t=r}())!==n&&(ie=t,A=D(A)),t=A)))),t}function Ne(){var t,r,A,o,i,s,a,c;if(t=oe,45===e.charCodeAt(oe)?(r="-",oe++):(r=n,0===ge&&de(M)),r===n&&(43===e.charCodeAt(oe)?(r="+",oe++):(r=n,0===ge&&de(R))),r===n&&(r=null),r!==n){if(A=[],x.test(e.charAt(oe))?(o=e.charAt(oe),oe++):(o=n,0===ge&&de(L)),o!==n)for(;o!==n;)A.push(o),x.test(e.charAt(oe))?(o=e.charAt(oe),oe++):(o=n,0===ge&&de(L));else A=n;if(A!==n)if(46===e.charCodeAt(oe)?(o=".",oe++):(o=n,0===ge&&de(P)),o!==n){if(i=[],x.test(e.charAt(oe))?(s=e.charAt(oe),oe++):(s=n,0===ge&&de(L)),s!==n)for(;s!==n;)i.push(s),x.test(e.charAt(oe))?(s=e.charAt(oe),oe++):(s=n,0===ge&&de(L));else i=n;i!==n?(ie=t,a=i,t=r={type:"number",value:("-"===r?-1:1)*parseFloat(A.join("")+"."+a.join(""))}):(oe=t,t=n)}else oe=t,t=n;else oe=t,t=n}else oe=t,t=n;if(t===n){if(t=oe,45===e.charCodeAt(oe)?(r="-",oe++):(r=n,0===ge&&de(M)),r===n&&(43===e.charCodeAt(oe)?(r="+",oe++):(r=n,0===ge&&de(R))),r===n&&(r=null),r!==n){if(A=[],x.test(e.charAt(oe))?(o=e.charAt(oe),oe++):(o=n,0===ge&&de(L)),o!==n)for(;o!==n;)A.push(o),x.test(e.charAt(oe))?(o=e.charAt(oe),oe++):(o=n,0===ge&&de(L));else A=n;A!==n?(ie=t,t=r=function(e,t){return{type:"number",value:("-"===e?-1:1)*parseInt(t.join(""))}}(r,A)):(oe=t,t=n)}else oe=t,t=n;if(t===n&&(t=oe,(r=xe())!==n&&(ie=t,c=r,r={type:"variable",...c}),(t=r)===n&&(t=oe,(r=Pe())!==n&&(ie=t,r={type:"variable",name:r}),(t=r)===n)))if(t=oe,40===e.charCodeAt(oe)?(r="(",oe++):(r=n,0===ge&&de(h)),r!==n){for(A=[],o=Te();o!==n;)A.push(o),o=Te();if(A!==n)if((o=Ke())!==n){for(i=[],s=Te();s!==n;)i.push(s),s=Te();i!==n?(41===e.charCodeAt(oe)?(s=")",oe++):(s=n,0===ge&&de(p)),s!==n?(ie=t,t=r=o):(oe=t,t=n)):(oe=t,t=n)}else oe=t,t=n;else oe=t,t=n}else oe=t,t=n}return t}function Fe(){var t,r,A,o,i,s;if(t=oe,(r=Ne())!==n){for(A=[],o=Te();o!==n;)A.push(o),o=Te();if(A!==n)if(42===e.charCodeAt(oe)?(o="*",oe++):(o=n,0===ge&&de(O)),o!==n){for(i=[],s=Te();s!==n;)i.push(s),s=Te();i!==n&&(s=Fe())!==n?(ie=t,t=r={type:"multiplication",left:r,right:s}):(oe=t,t=n)}else oe=t,t=n;else oe=t,t=n}else oe=t,t=n;if(t===n){if(t=oe,(r=Ne())!==n){for(A=[],o=Te();o!==n;)A.push(o),o=Te();if(A!==n)if(47===e.charCodeAt(oe)?(o="/",oe++):(o=n,0===ge&&de(U)),o!==n){for(i=[],s=Te();s!==n;)i.push(s),s=Te();i!==n&&(s=Fe())!==n?(ie=t,t=r=function(e,t){return{type:"division",left:e,right:t}}(r,s)):(oe=t,t=n)}else oe=t,t=n;else oe=t,t=n}else oe=t,t=n;t===n&&(t=Ne())}return t}function Ke(){var t,r,A,o,i,s;if(t=oe,(r=Fe())!==n){for(A=[],o=Te();o!==n;)A.push(o),o=Te();if(A!==n)if(43===e.charCodeAt(oe)?(o="+",oe++):(o=n,0===ge&&de(R)),o!==n){for(i=[],s=Te();s!==n;)i.push(s),s=Te();i!==n&&(s=Ke())!==n?(ie=t,t=r={type:"addition",left:r,right:s}):(oe=t,t=n)}else oe=t,t=n;else oe=t,t=n}else oe=t,t=n;if(t===n){if(t=oe,(r=Fe())!==n){for(A=[],o=Te();o!==n;)A.push(o),o=Te();if(A!==n)if(45===e.charCodeAt(oe)?(o="-",oe++):(o=n,0===ge&&de(M)),o!==n){for(i=[],s=Te();s!==n;)i.push(s),s=Te();i!==n&&(s=Ke())!==n?(ie=t,t=r=function(e,t){return{type:"subtraction",left:e,right:t}}(r,s)):(oe=t,t=n)}else oe=t,t=n;else oe=t,t=n}else oe=t,t=n;t===n&&(t=Fe())}return t}function Me(){var t,r,A,o,i,s;if(t=oe,"$(("===e.substr(oe,3)?(r="$((",oe+=3):(r=n,0===ge&&de(T)),r!==n){for(A=[],o=Te();o!==n;)A.push(o),o=Te();if(A!==n)if((o=Ke())!==n){for(i=[],s=Te();s!==n;)i.push(s),s=Te();i!==n?("))"===e.substr(oe,2)?(s="))",oe+=2):(s=n,0===ge&&de(j)),s!==n?(ie=t,t=r=o):(oe=t,t=n)):(oe=t,t=n)}else oe=t,t=n;else oe=t,t=n}else oe=t,t=n;return t}function Re(){var t,r,A,o;return t=oe,"$("===e.substr(oe,2)?(r="$(",oe+=2):(r=n,0===ge&&de(Y)),r!==n&&(A=Ie())!==n?(41===e.charCodeAt(oe)?(o=")",oe++):(o=n,0===ge&&de(p)),o!==n?(ie=t,t=r=A):(oe=t,t=n)):(oe=t,t=n),t}function xe(){var t,r,A,o,i,s;return t=oe,"${"===e.substr(oe,2)?(r="${",oe+=2):(r=n,0===ge&&de(G)),r!==n&&(A=Pe())!==n?(":-"===e.substr(oe,2)?(o=":-",oe+=2):(o=n,0===ge&&de(H)),o!==n&&(i=function(){var e,t,r,A,o;for(e=oe,t=[],r=Te();r!==n;)t.push(r),r=Te();if(t!==n){if(r=[],(A=De())!==n)for(;A!==n;)r.push(A),A=De();else r=n;if(r!==n){for(A=[],o=Te();o!==n;)A.push(o),o=Te();A!==n?(ie=e,e=t=r):(oe=e,e=n)}else oe=e,e=n}else oe=e,e=n;return e}())!==n?(125===e.charCodeAt(oe)?(s="}",oe++):(s=n,0===ge&&de(C)),s!==n?(ie=t,t=r={name:A,defaultValue:i}):(oe=t,t=n)):(oe=t,t=n)):(oe=t,t=n),t===n&&(t=oe,"${"===e.substr(oe,2)?(r="${",oe+=2):(r=n,0===ge&&de(G)),r!==n&&(A=Pe())!==n?(":-}"===e.substr(oe,3)?(o=":-}",oe+=3):(o=n,0===ge&&de(J)),o!==n?(ie=t,t=r=function(e){return{name:e,defaultValue:[]}}(A)):(oe=t,t=n)):(oe=t,t=n),t===n&&(t=oe,"${"===e.substr(oe,2)?(r="${",oe+=2):(r=n,0===ge&&de(G)),r!==n&&(A=Pe())!==n?(125===e.charCodeAt(oe)?(o="}",oe++):(o=n,0===ge&&de(C)),o!==n?(ie=t,t=r=q(A)):(oe=t,t=n)):(oe=t,t=n),t===n&&(t=oe,36===e.charCodeAt(oe)?(r="$",oe++):(r=n,0===ge&&de(z)),r!==n&&(A=Pe())!==n?(ie=t,t=r=q(A)):(oe=t,t=n)))),t}function Le(){var t,r,A;if(t=oe,r=[],W.test(e.charAt(oe))?(A=e.charAt(oe),oe++):(A=n,0===ge&&de(X)),A!==n)for(;A!==n;)r.push(A),W.test(e.charAt(oe))?(A=e.charAt(oe),oe++):(A=n,0===ge&&de(X));else r=n;return r!==n&&(ie=t,r=V()),t=r}function Pe(){var t,r,A;if(t=oe,r=[],_.test(e.charAt(oe))?(A=e.charAt(oe),oe++):(A=n,0===ge&&de(Z)),A!==n)for(;A!==n;)r.push(A),_.test(e.charAt(oe))?(A=e.charAt(oe),oe++):(A=n,0===ge&&de(Z));else r=n;return r!==n&&(ie=t,r=V()),t=r}function Oe(){var t;return $.test(e.charAt(oe))?(t=e.charAt(oe),oe++):(t=n,0===ge&&de(ee)),t}function Ue(){var t;return te.test(e.charAt(oe))?(t=e.charAt(oe),oe++):(t=n,0===ge&&de(re)),t}function Te(){var t,r;if(t=[],Ae.test(e.charAt(oe))?(r=e.charAt(oe),oe++):(r=n,0===ge&&de(ne)),r!==n)for(;r!==n;)t.push(r),Ae.test(e.charAt(oe))?(r=e.charAt(oe),oe++):(r=n,0===ge&&de(ne));else t=n;return t}if((A=i())!==n&&oe===e.length)return A;throw A!==n&&oe{"use strict";function t(e,r,A,n){this.message=e,this.expected=r,this.found=A,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(t,Error),t.buildMessage=function(e,t){var r={literal:function(e){return`"${n(e.text)}"`},class:function(e){var t,r="";for(t=0;t0){for(t=1,A=1;t'"%@`\-]/,I=oe(["\r","\n","\t"," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),E=/^[^\r\n\t ,\][{}:#"']/,B=oe(["\r","\n","\t"," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),y=function(){return Ae().replace(/^ *| *$/g,"")},m=ne("--",!1),w=/^[a-zA-Z\/0-9]/,Q=oe([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),D=/^[^\r\n\t :,]/,b=oe(["\r","\n","\t"," ",":",","],!0,!1),v=ne("null",!1),S=ne("true",!1),k=ne("false",!1),N=ie("string"),F=ne('"',!1),K=/^[^"\\\0-\x1F\x7F]/,M=oe(['"',"\\",["\0",""],""],!0,!1),R=ne('\\"',!1),x=ne("\\\\",!1),L=ne("\\/",!1),P=ne("\\b",!1),O=ne("\\f",!1),U=ne("\\n",!1),T=ne("\\r",!1),j=ne("\\t",!1),Y=ne("\\u",!1),G=/^[0-9a-fA-F]/,H=oe([["0","9"],["a","f"],["A","F"]],!1,!1),J=ie("blank space"),q=/^[ \t]/,z=oe([" ","\t"],!1,!1),W=(ie("white space"),oe([" ","\t","\n","\r"],!1,!1),ne("\r\n",!1)),X=ne("\n",!1),V=ne("\r",!1),_=0,Z=0,$=[{line:1,column:1}],ee=0,te=[],re=0;if("startRule"in r){if(!(r.startRule in o))throw new Error(`Can't start parsing from rule "${r.startRule}".`);i=o[r.startRule]}function Ae(){return e.substring(Z,_)}function ne(e,t){return{type:"literal",text:e,ignoreCase:t}}function oe(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function ie(e){return{type:"other",description:e}}function se(t){var r,A=$[t];if(A)return A;for(r=t-1;!$[r];)r--;for(A={line:(A=$[r]).line,column:A.column};ree&&(ee=_,te=[]),te.push(e))}function ge(e,r,A){return new t(t.buildMessage(e,r),e,r,A)}function le(){return he()}function ue(){var t,r,A;return t=_,Ce()!==n?(45===e.charCodeAt(_)?(r="-",_++):(r=n,0===re&&ce(s)),r!==n&&be()!==n&&(A=de())!==n?(Z=t,t=A):(_=t,t=n)):(_=t,t=n),t}function he(){var e,t,r,A;for(e=_,t=[],r=pe();r!==n;)t.push(r),r=pe();return t!==n&&(Z=e,A=t,t=Object.assign({},...A)),e=t}function pe(){var t,r,A,o,i,s,p,d,C,f,I,E;if(t=_,(r=be())===n&&(r=null),r!==n){if(A=_,35===e.charCodeAt(_)?(o="#",_++):(o=n,0===re&&ce(a)),o!==n){if(i=[],s=_,p=_,re++,d=Se(),re--,d===n?p=void 0:(_=p,p=n),p!==n?(e.length>_?(d=e.charAt(_),_++):(d=n,0===re&&ce(c)),d!==n?s=p=[p,d]:(_=s,s=n)):(_=s,s=n),s!==n)for(;s!==n;)i.push(s),s=_,p=_,re++,d=Se(),re--,d===n?p=void 0:(_=p,p=n),p!==n?(e.length>_?(d=e.charAt(_),_++):(d=n,0===re&&ce(c)),d!==n?s=p=[p,d]:(_=s,s=n)):(_=s,s=n);else i=n;i!==n?A=o=[o,i]:(_=A,A=n)}else _=A,A=n;if(A===n&&(A=null),A!==n){if(o=[],(i=ve())!==n)for(;i!==n;)o.push(i),i=ve();else o=n;o!==n?(Z=t,t=r={}):(_=t,t=n)}else _=t,t=n}else _=t,t=n;if(t===n&&(t=_,(r=Ce())!==n&&(A=function(){var e;(e=we())===n&&(e=Be());return e}())!==n?((o=be())===n&&(o=null),o!==n?(58===e.charCodeAt(_)?(i=":",_++):(i=n,0===re&&ce(g)),i!==n?((s=be())===n&&(s=null),s!==n&&(p=de())!==n?(Z=t,t=r=l(A,p)):(_=t,t=n)):(_=t,t=n)):(_=t,t=n)):(_=t,t=n),t===n&&(t=_,(r=Ce())!==n&&(A=Ee())!==n?((o=be())===n&&(o=null),o!==n?(58===e.charCodeAt(_)?(i=":",_++):(i=n,0===re&&ce(g)),i!==n?((s=be())===n&&(s=null),s!==n&&(p=de())!==n?(Z=t,t=r=l(A,p)):(_=t,t=n)):(_=t,t=n)):(_=t,t=n)):(_=t,t=n),t===n))){if(t=_,(r=Ce())!==n)if((A=Ee())!==n)if((o=be())!==n)if((i=function(){var e;(e=me())===n&&(e=we())===n&&(e=ye());return e}())!==n){if(s=[],(p=ve())!==n)for(;p!==n;)s.push(p),p=ve();else s=n;s!==n?(Z=t,t=r=l(A,i)):(_=t,t=n)}else _=t,t=n;else _=t,t=n;else _=t,t=n;else _=t,t=n;if(t===n)if(t=_,(r=Ce())!==n)if((A=Ee())!==n){if(o=[],i=_,(s=be())===n&&(s=null),s!==n?(44===e.charCodeAt(_)?(p=",",_++):(p=n,0===re&&ce(u)),p!==n?((d=be())===n&&(d=null),d!==n&&(C=Ee())!==n?(Z=i,i=s=h(0,C)):(_=i,i=n)):(_=i,i=n)):(_=i,i=n),i!==n)for(;i!==n;)o.push(i),i=_,(s=be())===n&&(s=null),s!==n?(44===e.charCodeAt(_)?(p=",",_++):(p=n,0===re&&ce(u)),p!==n?((d=be())===n&&(d=null),d!==n&&(C=Ee())!==n?(Z=i,i=s=h(0,C)):(_=i,i=n)):(_=i,i=n)):(_=i,i=n);else o=n;o!==n?((i=be())===n&&(i=null),i!==n?(58===e.charCodeAt(_)?(s=":",_++):(s=n,0===re&&ce(g)),s!==n?((p=be())===n&&(p=null),p!==n&&(d=de())!==n?(Z=t,f=A,I=o,E=d,t=r=Object.assign({},...[f].concat(I).map(e=>({[e]:E})))):(_=t,t=n)):(_=t,t=n)):(_=t,t=n)):(_=t,t=n)}else _=t,t=n;else _=t,t=n}return t}function de(){var t,r,A,o,i,a,c;if(t=_,r=_,re++,A=_,(o=Se())!==n&&(i=function(){var t,r,A;t=_,r=[],32===e.charCodeAt(_)?(A=" ",_++):(A=n,0===re&&ce(d));for(;A!==n;)r.push(A),32===e.charCodeAt(_)?(A=" ",_++):(A=n,0===re&&ce(d));r!==n?(Z=_,(A=(A=r.length===(Ne+1)*ke)?void 0:n)!==n?t=r=[r,A]:(_=t,t=n)):(_=t,t=n);return t}())!==n?(45===e.charCodeAt(_)?(a="-",_++):(a=n,0===re&&ce(s)),a!==n&&(c=be())!==n?A=o=[o,i,a,c]:(_=A,A=n)):(_=A,A=n),re--,A!==n?(_=r,r=void 0):r=n,r!==n&&(A=ve())!==n&&(o=fe())!==n&&(i=function(){var e,t,r,A;for(e=_,t=[],r=ue();r!==n;)t.push(r),r=ue();return t!==n&&(Z=e,A=t,t=[].concat(...A)),e=t}())!==n&&(a=Ie())!==n?(Z=t,t=r=i):(_=t,t=n),t===n&&(t=_,(r=Se())!==n&&(A=fe())!==n&&(o=he())!==n&&(i=Ie())!==n?(Z=t,t=r=o):(_=t,t=n),t===n))if(t=_,(r=function(){var t;(t=me())===n&&(t=function(){var t,r;t=_,"true"===e.substr(_,4)?(r="true",_+=4):(r=n,0===re&&ce(S));r!==n&&(Z=t,r=!0);(t=r)===n&&(t=_,"false"===e.substr(_,5)?(r="false",_+=5):(r=n,0===re&&ce(k)),r!==n&&(Z=t,r=!1),t=r);return t}())===n&&(t=we())===n&&(t=Be());return t}())!==n){if(A=[],(o=ve())!==n)for(;o!==n;)A.push(o),o=ve();else A=n;A!==n?(Z=t,t=r=r):(_=t,t=n)}else _=t,t=n;return t}function Ce(){var t,r,A;for(re++,t=_,r=[],32===e.charCodeAt(_)?(A=" ",_++):(A=n,0===re&&ce(d));A!==n;)r.push(A),32===e.charCodeAt(_)?(A=" ",_++):(A=n,0===re&&ce(d));return r!==n?(Z=_,(A=(A=r.length===Ne*ke)?void 0:n)!==n?t=r=[r,A]:(_=t,t=n)):(_=t,t=n),re--,t===n&&(r=n,0===re&&ce(p)),t}function fe(){return Z=_,Ne++,!0?void 0:n}function Ie(){return Z=_,Ne--,!0?void 0:n}function Ee(){var e,t,r;if((e=we())===n){if(e=_,t=[],(r=ye())!==n)for(;r!==n;)t.push(r),r=ye();else t=n;t!==n&&(Z=e,t=Ae()),e=t}return e}function Be(){var t,r,A,o,i,s;if(re++,t=_,f.test(e.charAt(_))?(r=e.charAt(_),_++):(r=n,0===re&&ce(I)),r!==n){for(A=[],o=_,(i=be())===n&&(i=null),i!==n?(E.test(e.charAt(_))?(s=e.charAt(_),_++):(s=n,0===re&&ce(B)),s!==n?o=i=[i,s]:(_=o,o=n)):(_=o,o=n);o!==n;)A.push(o),o=_,(i=be())===n&&(i=null),i!==n?(E.test(e.charAt(_))?(s=e.charAt(_),_++):(s=n,0===re&&ce(B)),s!==n?o=i=[i,s]:(_=o,o=n)):(_=o,o=n);A!==n?(Z=t,t=r=y()):(_=t,t=n)}else _=t,t=n;return re--,t===n&&(r=n,0===re&&ce(C)),t}function ye(){var t,r,A,o,i;if(t=_,"--"===e.substr(_,2)?(r="--",_+=2):(r=n,0===re&&ce(m)),r===n&&(r=null),r!==n)if(w.test(e.charAt(_))?(A=e.charAt(_),_++):(A=n,0===re&&ce(Q)),A!==n){for(o=[],D.test(e.charAt(_))?(i=e.charAt(_),_++):(i=n,0===re&&ce(b));i!==n;)o.push(i),D.test(e.charAt(_))?(i=e.charAt(_),_++):(i=n,0===re&&ce(b));o!==n?(Z=t,t=r=y()):(_=t,t=n)}else _=t,t=n;else _=t,t=n;return t}function me(){var t,r;return t=_,"null"===e.substr(_,4)?(r="null",_+=4):(r=n,0===re&&ce(v)),r!==n&&(Z=t,r=null),t=r}function we(){var t,r,A,o;return re++,t=_,34===e.charCodeAt(_)?(r='"',_++):(r=n,0===re&&ce(F)),r!==n?(34===e.charCodeAt(_)?(A='"',_++):(A=n,0===re&&ce(F)),A!==n?(Z=t,t=r=""):(_=t,t=n)):(_=t,t=n),t===n&&(t=_,34===e.charCodeAt(_)?(r='"',_++):(r=n,0===re&&ce(F)),r!==n&&(A=function(){var e,t,r;if(e=_,t=[],(r=Qe())!==n)for(;r!==n;)t.push(r),r=Qe();else t=n;t!==n&&(Z=e,t=t.join(""));return e=t}())!==n?(34===e.charCodeAt(_)?(o='"',_++):(o=n,0===re&&ce(F)),o!==n?(Z=t,t=r=A):(_=t,t=n)):(_=t,t=n)),re--,t===n&&(r=n,0===re&&ce(N)),t}function Qe(){var t,r,A,o,i,s,a,c,g,l;return K.test(e.charAt(_))?(t=e.charAt(_),_++):(t=n,0===re&&ce(M)),t===n&&(t=_,'\\"'===e.substr(_,2)?(r='\\"',_+=2):(r=n,0===re&&ce(R)),r!==n&&(Z=t,r='"'),(t=r)===n&&(t=_,"\\\\"===e.substr(_,2)?(r="\\\\",_+=2):(r=n,0===re&&ce(x)),r!==n&&(Z=t,r="\\"),(t=r)===n&&(t=_,"\\/"===e.substr(_,2)?(r="\\/",_+=2):(r=n,0===re&&ce(L)),r!==n&&(Z=t,r="/"),(t=r)===n&&(t=_,"\\b"===e.substr(_,2)?(r="\\b",_+=2):(r=n,0===re&&ce(P)),r!==n&&(Z=t,r="\b"),(t=r)===n&&(t=_,"\\f"===e.substr(_,2)?(r="\\f",_+=2):(r=n,0===re&&ce(O)),r!==n&&(Z=t,r="\f"),(t=r)===n&&(t=_,"\\n"===e.substr(_,2)?(r="\\n",_+=2):(r=n,0===re&&ce(U)),r!==n&&(Z=t,r="\n"),(t=r)===n&&(t=_,"\\r"===e.substr(_,2)?(r="\\r",_+=2):(r=n,0===re&&ce(T)),r!==n&&(Z=t,r="\r"),(t=r)===n&&(t=_,"\\t"===e.substr(_,2)?(r="\\t",_+=2):(r=n,0===re&&ce(j)),r!==n&&(Z=t,r="\t"),(t=r)===n&&(t=_,"\\u"===e.substr(_,2)?(r="\\u",_+=2):(r=n,0===re&&ce(Y)),r!==n&&(A=De())!==n&&(o=De())!==n&&(i=De())!==n&&(s=De())!==n?(Z=t,a=A,c=o,g=i,l=s,t=r=String.fromCharCode(parseInt(`0x${a}${c}${g}${l}`))):(_=t,t=n)))))))))),t}function De(){var t;return G.test(e.charAt(_))?(t=e.charAt(_),_++):(t=n,0===re&&ce(H)),t}function be(){var t,r;if(re++,t=[],q.test(e.charAt(_))?(r=e.charAt(_),_++):(r=n,0===re&&ce(z)),r!==n)for(;r!==n;)t.push(r),q.test(e.charAt(_))?(r=e.charAt(_),_++):(r=n,0===re&&ce(z));else t=n;return re--,t===n&&(r=n,0===re&&ce(J)),t}function ve(){var e,t,r,A,o,i;if(e=_,(t=Se())!==n){for(r=[],A=_,(o=be())===n&&(o=null),o!==n&&(i=Se())!==n?A=o=[o,i]:(_=A,A=n);A!==n;)r.push(A),A=_,(o=be())===n&&(o=null),o!==n&&(i=Se())!==n?A=o=[o,i]:(_=A,A=n);r!==n?e=t=[t,r]:(_=e,e=n)}else _=e,e=n;return e}function Se(){var t;return"\r\n"===e.substr(_,2)?(t="\r\n",_+=2):(t=n,0===re&&ce(W)),t===n&&(10===e.charCodeAt(_)?(t="\n",_++):(t=n,0===re&&ce(X)),t===n&&(13===e.charCodeAt(_)?(t="\r",_++):(t=n,0===re&&ce(V)))),t}const ke=2;let Ne=0;if((A=i())!==n&&_===e.length)return A;throw A!==n&&_{let A;e.exports=()=>(void 0===A&&(A=r(78761).brotliDecompressSync(Buffer.from("W4VmWMM2BubfuhOQtPrf2v23OidkIrLQsV6vuo6ON5J6yagfMdrY7lWBqNRd9a47LpsBgqCqmpd0iExCZ1KAzk71/+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d43ros+vk4bacK","base64")).toString()),A)},42357:e=>{"use strict";e.exports=require("assert")},64293:e=>{"use strict";e.exports=require("buffer")},63129:e=>{"use strict";e.exports=require("child_process")},27619:e=>{"use strict";e.exports=require("constants")},76417:e=>{"use strict";e.exports=require("crypto")},40881:e=>{"use strict";e.exports=require("dns")},28614:e=>{"use strict";e.exports=require("events")},35747:e=>{"use strict";e.exports=require("fs")},98605:e=>{"use strict";e.exports=require("http")},97565:e=>{"use strict";e.exports=require("http2")},57211:e=>{"use strict";e.exports=require("https")},32282:e=>{"use strict";e.exports=require("module")},11631:e=>{"use strict";e.exports=require("net")},12087:e=>{"use strict";e.exports=require("os")},85622:e=>{"use strict";e.exports=require("path")},71191:e=>{"use strict";e.exports=require("querystring")},51058:e=>{"use strict";e.exports=require("readline")},92413:e=>{"use strict";e.exports=require("stream")},24304:e=>{"use strict";e.exports=require("string_decoder")},4016:e=>{"use strict";e.exports=require("tls")},33867:e=>{"use strict";e.exports=require("tty")},78835:e=>{"use strict";e.exports=require("url")},31669:e=>{"use strict";e.exports=require("util")},78761:e=>{"use strict";e.exports=require("zlib")}},t={};function r(A){if(t[A])return t[A].exports;var n=t[A]={id:A,loaded:!1,exports:{}};return e[A].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}return r.c=t,r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var A=Object.create(null);r.r(A);var n={};if(2&t&&"object"==typeof e&&e)for(const t in e)n[t]=()=>e[t];return n.default=()=>e,r.d(A,n),A},r.d=(e,t)=>{for(var A in t)r.o(t,A)&&!r.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r(43418)})(); ================================================ FILE: packages/runtime/test/fixtures/32-custom-install-command/.yarnrc.yml ================================================ yarnPath: ".yarn/releases/yarn-berry.cjs" ================================================ FILE: packages/runtime/test/fixtures/32-custom-install-command/install.js ================================================ const path = require('path'); const { promises: fs } = require('fs'); async function main() { console.log('installCommand...'); await fs.writeFile(path.join(__dirname, 'install.txt'), `installCommand`); console.log('Finished installing...'); } main() .then(() => { process.exit(0); }) .catch(error => { console.error(error); process.exit(1); }); ================================================ FILE: packages/runtime/test/fixtures/32-custom-install-command/next.config.js ================================================ module.exports = { target: 'serverless', }; ================================================ FILE: packages/runtime/test/fixtures/32-custom-install-command/package.json ================================================ { "scripts": { "build": "next build" }, "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: packages/runtime/test/fixtures/32-custom-install-command/pages/index.js ================================================ import path from 'path'; import { promises as fs } from 'fs'; export async function getStaticProps(context) { console.log(process.cwd()); const installPath = path.join(process.cwd(), 'install.txt'); const install = await fs.readFile(installPath, 'utf8'); return { props: { install }, }; } export default function ({ install }) { return
{install}
; } ================================================ FILE: packages/runtime/test/fixtures/32-custom-install-command/vercel.json ================================================ { "builds": [ { "src": "package.json", "use": "@vercel/next", "config": { "zeroConfig": true, "installCommand": "node install.js && yarn", "buildCommand": "next build" } } ], "probes": [ { "path": "/", "status": 200, "mustContain": "installCommand" } ] } ================================================ FILE: packages/runtime/test/integration/gip-gsp-404/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: packages/runtime/test/integration/gip-gsp-404/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/gip-gsp-404/package.json ================================================ { "dependencies": { "next": "canary", "react": "latest", "react-dom": "latest" } } ================================================ FILE: packages/runtime/test/integration/gip-gsp-404/pages/404.js ================================================ export default function MyApp() { return '404 page'; } export const getStaticProps = () => { console.log('/404 getStaticProps'); return { props: { random: Math.random(), is404: true, }, }; }; ================================================ FILE: packages/runtime/test/integration/gip-gsp-404/pages/_app.js ================================================ import React from 'react'; function MyApp({ Component, pageProps }) { return React.createElement(Component, pageProps); } MyApp.getInitialProps = () => { console.log('App.getInitialProps'); return { random: Math.random(), hello: 'world', }; }; export default MyApp; ================================================ FILE: packages/runtime/test/integration/gip-gsp-404/pages/api/hello.js ================================================ // Next.js API route support: https://nextjs.org/docs/api-routes/introduction export default (req, res) => { res.statusCode = 200; res.json({ name: 'John Doe' }); }; ================================================ FILE: packages/runtime/test/integration/gip-gsp-404/pages/index.js ================================================ export default function Home() { return 'index page'; } ================================================ FILE: packages/runtime/test/integration/index.test.js ================================================ const path = require('path'); const fs = require('fs-extra'); const runBuildLambda = require('../lib/run-build-lambda'); const FOUR_MINUTES = 240000; beforeAll(() => { process.env.NEXT_TELEMETRY_DISABLED = '1'; }); it( 'Should build the standard example', async () => { const { buildResult: { output }, } = await runBuildLambda(path.join(__dirname, 'standard')); expect(output['index']).toBeDefined(); expect(output.goodbye).not.toBeDefined(); expect(output.__NEXT_PAGE_LAMBDA_0).toBeDefined(); const filePaths = Object.keys(output); const serverlessError = filePaths.some(filePath => filePath.match(/_error/) ); const hasUnderScoreAppStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_app-.*\.js$/) ); const hasUnderScoreErrorStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_error-.*\.js$/) ); expect(hasUnderScoreAppStaticFile).toBeTruthy(); expect(hasUnderScoreErrorStaticFile).toBeTruthy(); expect(serverlessError).toBeTruthy(); }, FOUR_MINUTES ); it( 'Should build the gip-gsp-404 example', async () => { const { buildResult } = await runBuildLambda( path.join(__dirname, 'gip-gsp-404') ); const { output, routes } = buildResult; const handleErrorIdx = (routes || []).findIndex(r => r.handle === 'error'); expect(routes[handleErrorIdx + 1].dest).toBe('/404'); expect(routes[handleErrorIdx + 1].headers).toBe(undefined); expect(output.goodbye).not.toBeDefined(); expect(output.__NEXT_PAGE_LAMBDA_0).toBeDefined(); expect(output['404']).toBeDefined(); expect(output['404'].type).toBe('FileFsRef'); const filePaths = Object.keys(output); const serverlessError = filePaths.some(filePath => filePath.match(/_error/) ); const hasUnderScoreAppStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_app-.*\.js$/) ); const hasUnderScoreErrorStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_error-.*\.js$/) ); expect(hasUnderScoreAppStaticFile).toBeTruthy(); expect(hasUnderScoreErrorStaticFile).toBeTruthy(); expect(serverlessError).toBeTruthy(); }, FOUR_MINUTES ); it( 'Should not deploy preview lambdas for static site', async () => { const { buildResult: { output }, } = await runBuildLambda(path.join(__dirname, 'static-site')); expect(output['index']).toBeDefined(); expect(output['index'].type).toBe('FileFsRef'); expect(output['another']).toBeDefined(); expect(output['another'].type).toBe('FileFsRef'); expect(output['dynamic']).toBeDefined(); expect(output['dynamic'].type).toBe('FileFsRef'); }, FOUR_MINUTES ); it( 'Should opt-out of shared lambdas when routes are detected', async () => { const { buildResult: { output }, } = await runBuildLambda( path.join(__dirname, '../fixtures/26-mono-repo-404-lambda') ); expect(output['packages/webapp/404']).toBeDefined(); expect(output['packages/webapp/index']).toBeDefined(); expect(output['packages/webapp/__NEXT_PAGE_LAMBDA_0']).not.toBeDefined(); const filePaths = Object.keys(output); const hasUnderScoreAppStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_app\.js$/) ); const hasUnderScoreErrorStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_error\.js$/) ); expect(hasUnderScoreAppStaticFile).toBeTruthy(); expect(hasUnderScoreErrorStaticFile).toBeTruthy(); }, FOUR_MINUTES ); it( 'Should build the monorepo example', async () => { const { buildResult: { output }, } = await runBuildLambda(path.join(__dirname, 'monorepo')); expect(output['www/index']).not.toBeDefined(); expect(output['www/__NEXT_PAGE_LAMBDA_0']).toBeDefined(); expect(output['www/static/test.txt']).toBeDefined(); expect(output['www/data.txt']).toBeDefined(); const filePaths = Object.keys(output); const hasUnderScoreAppStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_app\.js$/) ); const hasUnderScoreErrorStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_error\.js$/) ); expect(hasUnderScoreAppStaticFile).toBeTruthy(); expect(hasUnderScoreErrorStaticFile).toBeTruthy(); }, FOUR_MINUTES ); it( 'Should build the legacy standard example', async () => { const { buildResult: { output }, } = await runBuildLambda(path.join(__dirname, 'legacy-standard')); expect(output.index).toBeDefined(); const filePaths = Object.keys(output); const hasUnderScoreAppStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_app\.js$/) ); const hasUnderScoreErrorStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_error\.js$/) ); expect(hasUnderScoreAppStaticFile).toBeTruthy(); expect(hasUnderScoreErrorStaticFile).toBeTruthy(); }, FOUR_MINUTES ); it( 'Should build the legacy custom dependency test', async () => { const { buildResult: { output }, } = await runBuildLambda(path.join(__dirname, 'legacy-custom-dependency')); expect(output.index).toBeDefined(); }, FOUR_MINUTES ); it('Should throw when package.json or next.config.js is not the "src"', async () => { try { await runBuildLambda( path.join(__dirname, 'no-package-json-and-next-config') ); throw new Error('did not throw'); } catch (err) { expect(err.message).toMatch(/package\.json/); } }); it( 'Should build the static-files test on legacy', async () => { const { buildResult: { output }, } = await runBuildLambda(path.join(__dirname, 'legacy-static-files')); expect(output['static/test.txt']).toBeDefined(); }, FOUR_MINUTES ); it( 'Should build the static-files test', async () => { const { buildResult: { output }, } = await runBuildLambda(path.join(__dirname, 'static-files')); expect(output['static/test.txt']).toBeDefined(); }, FOUR_MINUTES ); it( 'Should build the public-files test', async () => { const { buildResult: { output }, } = await runBuildLambda(path.join(__dirname, 'public-files')); expect(output['robots.txt']).toBeDefined(); expect(output['generated.txt']).toBeDefined(); }, FOUR_MINUTES ); it( 'Should build the serverless-config example', async () => { const { workPath, buildResult: { output }, } = await runBuildLambda(path.join(__dirname, 'serverless-config')); expect(output.index).not.toBeDefined(); expect(output.goodbye).not.toBeDefined(); expect(output.__NEXT_PAGE_LAMBDA_0).toBeDefined(); const filePaths = Object.keys(output); const serverlessError = filePaths.some(filePath => filePath.match(/_error/) ); const hasUnderScoreAppStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_app\.js$/) ); const hasUnderScoreErrorStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_error\.js$/) ); expect(hasUnderScoreAppStaticFile).toBeTruthy(); expect(hasUnderScoreErrorStaticFile).toBeTruthy(); expect(serverlessError).toBeTruthy(); const contents = await fs.readdir(workPath); expect(contents.some(name => name === 'next.config.js')).toBeTruthy(); expect( contents.some(name => name.includes('next.config.__vercel_builder_backup__') ) ).toBeTruthy(); }, FOUR_MINUTES ); it( 'Should build the serverless-config-monorepo-missing example', async () => { const { workPath, buildResult: { output }, } = await runBuildLambda( path.join(__dirname, 'serverless-config-monorepo-missing') ); expect(output['nested/index']).not.toBeDefined(); expect(output['nested/goodbye']).not.toBeDefined(); expect(output['nested/__NEXT_PAGE_LAMBDA_0']).toBeDefined(); const filePaths = Object.keys(output); const serverlessError = filePaths.some(filePath => filePath.match(/_error/) ); const hasUnderScoreAppStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_app\.js$/) ); const hasUnderScoreErrorStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_error\.js$/) ); expect(hasUnderScoreAppStaticFile).toBeTruthy(); expect(hasUnderScoreErrorStaticFile).toBeTruthy(); expect(serverlessError).toBeTruthy(); const contents = await fs.readdir(path.join(workPath, 'nested')); expect(contents.some(name => name === 'next.config.js')).toBeTruthy(); }, FOUR_MINUTES ); it( 'Should build the serverless-config-monorepo-present example', async () => { const { workPath, buildResult: { output }, } = await runBuildLambda( path.join(__dirname, 'serverless-config-monorepo-present') ); expect(output['nested/index']).not.toBeDefined(); expect(output['nested/goodbye']).not.toBeDefined(); expect(output['nested/__NEXT_PAGE_LAMBDA_0']).toBeDefined(); const filePaths = Object.keys(output); const serverlessError = filePaths.some(filePath => filePath.match(/_error/) ); const hasUnderScoreAppStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_app\.js$/) ); const hasUnderScoreErrorStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_error\.js$/) ); expect(hasUnderScoreAppStaticFile).toBeTruthy(); expect(hasUnderScoreErrorStaticFile).toBeTruthy(); expect(serverlessError).toBeTruthy(); const contents = await fs.readdir(path.join(workPath, 'nested')); expect(contents.some(name => name === 'next.config.js')).toBeTruthy(); expect( contents.some(name => name.includes('next.config.__vercel_builder_backup__') ) ).toBeTruthy(); }, FOUR_MINUTES ); it( 'Should build the serverless-config-async example', async () => { let error = null; try { await runBuildLambda(path.join(__dirname, 'serverless-config-async')); } catch (err) { error = err; } expect(error).toBe(null); }, FOUR_MINUTES ); it( 'Should build the serverless-config-promise example', async () => { let error = null; try { await runBuildLambda(path.join(__dirname, 'serverless-config-promise')); } catch (err) { error = err; } expect(error).toBe(null); }, FOUR_MINUTES ); it( 'Should build the serverless-config-object example', async () => { const { workPath, buildResult: { output }, } = await runBuildLambda(path.join(__dirname, 'serverless-config-object')); expect(output['index']).toBeDefined(); expect(output.goodbye).not.toBeDefined(); expect(output.__NEXT_PAGE_LAMBDA_0).toBeDefined(); const filePaths = Object.keys(output); const serverlessError = filePaths.some(filePath => filePath.match(/_error/) ); const hasUnderScoreAppStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_app-.*\.js$/) ); const hasUnderScoreErrorStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_error-.*\.js$/) ); expect(hasUnderScoreAppStaticFile).toBeTruthy(); expect(hasUnderScoreErrorStaticFile).toBeTruthy(); expect(serverlessError).toBeTruthy(); const contents = await fs.readdir(workPath); expect(contents.some(name => name === 'next.config.js')).toBeTruthy(); expect( contents.some(name => name.includes('next.config.__vercel_builder_backup__') ) ).toBeTruthy(); }, FOUR_MINUTES ); it( 'Should build the serverless-no-config example', async () => { const { workPath, buildResult: { output }, } = await runBuildLambda(path.join(__dirname, 'serverless-no-config')); expect(output['index']).toBeDefined(); expect(output.goodbye).not.toBeDefined(); expect(output.__NEXT_PAGE_LAMBDA_0).toBeDefined(); const filePaths = Object.keys(output); const serverlessError = filePaths.some(filePath => filePath.match(/_error/) ); const hasUnderScoreAppStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_app-.*\.js$/) ); const hasUnderScoreErrorStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_error-.*\.js$/) ); expect(hasUnderScoreAppStaticFile).toBeTruthy(); expect(hasUnderScoreErrorStaticFile).toBeTruthy(); expect(serverlessError).toBeTruthy(); const contents = await fs.readdir(workPath); expect(contents.some(name => name === 'next.config.js')).toBeTruthy(); expect( contents.some(name => name.includes('next.config.__vercel_builder_backup__') ) ).toBeFalsy(); }, FOUR_MINUTES ); it( 'Should invoke build command with serverless-no-config', async () => { const { workPath, buildResult: { output }, } = await runBuildLambda( path.join(__dirname, 'serverless-no-config-build') ); expect(output['index']).toBeDefined(); const filePaths = Object.keys(output); const serverlessError = filePaths.some(filePath => filePath.match(/_error/) ); const hasUnderScoreAppStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_app-.*\.js$/) ); const hasUnderScoreErrorStaticFile = filePaths.some(filePath => filePath.match(/static.*\/pages\/_error-.*\.js$/) ); const hasBuildFile = await fs.pathExists( path.join(__dirname, 'serverless-no-config-build'), '.next', 'world.txt' ); expect(hasUnderScoreAppStaticFile).toBeTruthy(); expect(hasUnderScoreErrorStaticFile).toBeTruthy(); expect(serverlessError).toBeTruthy(); expect(hasBuildFile).toBeTruthy(); const contents = await fs.readdir(workPath); expect(contents.some(name => name === 'next.config.js')).toBeTruthy(); expect( contents.some(name => name.includes('next.config.__vercel_builder_backup__') ) ).toBeFalsy(); }, FOUR_MINUTES ); it( 'Should should run the postinstall script', async () => { const { workPath, buildResult: { output }, } = await runBuildLambda(path.join(__dirname, 'postinstall')); expect(output['prisma.txt']).toBeDefined(); expect(fs.existsSync(path.join(workPath, 'public/init-cwd.txt'))).toBe( true ); }, FOUR_MINUTES ); ================================================ FILE: packages/runtime/test/integration/legacy-custom-dependency/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/legacy-custom-dependency/package.json ================================================ { "dependencies": { "encoding": "latest", "isomorphic-unfetch": "latest", "next": "7.0.0" } } ================================================ FILE: packages/runtime/test/integration/legacy-custom-dependency/pages/index.js ================================================ import fetch from 'isomorphic-unfetch'; // Fake fetch fetch('https://example.com'); export default () => 'test'; ================================================ FILE: packages/runtime/test/integration/legacy-standard/next.config.js ================================================ module.exports = {}; ================================================ FILE: packages/runtime/test/integration/legacy-standard/now.json ================================================ { "version": 2, "builds": [{ "src": "next.config.js", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/legacy-standard/package.json ================================================ { "dependencies": { "next": "^7.0.2" } } ================================================ FILE: packages/runtime/test/integration/legacy-standard/pages/index.js ================================================ export default () => 'Index page'; ================================================ FILE: packages/runtime/test/integration/legacy-static-files/next.config.js ================================================ module.exports = {}; ================================================ FILE: packages/runtime/test/integration/legacy-static-files/now.json ================================================ { "version": 2, "builds": [{ "src": "next.config.js", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/legacy-static-files/package.json ================================================ { "dependencies": { "next": "7.0.2" } } ================================================ FILE: packages/runtime/test/integration/legacy-static-files/pages/index.js ================================================ export default () => 'Index page'; ================================================ FILE: packages/runtime/test/integration/legacy-static-files/static/test.txt ================================================ hello world ================================================ FILE: packages/runtime/test/integration/monorepo/now.json ================================================ { "version": 2, "builds": [{ "src": "www/package.json", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/monorepo/shared/hello.js ================================================ module.exports = () => 'Hello!'; ================================================ FILE: packages/runtime/test/integration/monorepo/www/next.config.js ================================================ module.exports = { target: 'serverless', }; ================================================ FILE: packages/runtime/test/integration/monorepo/www/package.json ================================================ { "name": "monorepo", "dependencies": { "next": "^8.0.0", "react": "^16.8.0", "react-dom": "^16.8.0" }, "scripts": { "now-build": "next build" } } ================================================ FILE: packages/runtime/test/integration/monorepo/www/pages/index.js ================================================ import hello from '../../shared/hello'; export default () => `${hello()} Welcome to the index page`; ================================================ FILE: packages/runtime/test/integration/monorepo/www/public/data.txt ================================================ data ================================================ FILE: packages/runtime/test/integration/monorepo/www/static/test.txt ================================================ hello world ================================================ FILE: packages/runtime/test/integration/no-package-json-and-next-config/now.json ================================================ { "version": 2, "builds": [{ "src": "pages/index.js", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/no-package-json-and-next-config/pages/index.js ================================================ export default () => 'Index page'; ================================================ FILE: packages/runtime/test/integration/postinstall/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/postinstall/package.json ================================================ { "scripts": { "postinstall": "node postinstall.js" }, "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" } } ================================================ FILE: packages/runtime/test/integration/postinstall/pages/goodbye.js ================================================ const F = () => 'Goodbye World!'; F.getInitialProps = async () => ({}); export default F; ================================================ FILE: packages/runtime/test/integration/postinstall/pages/index.js ================================================ export default () => 'Hello World!'; ================================================ FILE: packages/runtime/test/integration/postinstall/postinstall.js ================================================ #!/usr/bin/env node const fs = require('fs'); const path = require('path'); // Some packages like Prisma rely on the `NOW_BUILDER` environment variable // to determine if the build is running with the Vercel builder // Prisma: https://github.com/prisma/prisma/blob/1d0045fe60dc1992173f3f5be84b24129f0d45a3/src/packages/cli/scripts/install.js#L10 if (process.env.INIT_CWD && process.env.NOW_BUILDER) { fs.writeFileSync('public/prisma.txt', ''); } if (process.env.INIT_CWD) { fs.writeFileSync(path.join(process.env.INIT_CWD, 'public/init-cwd.txt'), ''); } ================================================ FILE: packages/runtime/test/integration/postinstall/public/.gitkeep ================================================ ================================================ FILE: packages/runtime/test/integration/public-files/create-public-file.js ================================================ const fs = require('fs'); // Adds a new file to the public folder at build time fs.writeFileSync('public/generated.txt', 'Generated'); ================================================ FILE: packages/runtime/test/integration/public-files/next.config.js ================================================ module.exports = { target: 'serverless', }; ================================================ FILE: packages/runtime/test/integration/public-files/now.json ================================================ { "version": 2, "builds": [{ "src": "next.config.js", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/public-files/package.json ================================================ { "scripts": { "now-build": "node create-public-file.js && next build" }, "dependencies": { "next": "9", "react": "16", "react-dom": "16" } } ================================================ FILE: packages/runtime/test/integration/public-files/pages/index.js ================================================ export default () => 'Index page'; ================================================ FILE: packages/runtime/test/integration/public-files/public/robots.txt ================================================ User-agent: * Disallow: / ================================================ FILE: packages/runtime/test/integration/serverless-config/next.config.js ================================================ module.exports = () => ({}); ================================================ FILE: packages/runtime/test/integration/serverless-config/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/serverless-config/package.json ================================================ { "dependencies": { "next": "8.1.0", "react": "latest", "react-dom": "latest" } } ================================================ FILE: packages/runtime/test/integration/serverless-config/pages/goodbye.js ================================================ const F = () => 'Goodbye World!'; F.getInitialProps = async () => ({}); export default F; ================================================ FILE: packages/runtime/test/integration/serverless-config/pages/index.js ================================================ export default () => 'Hello World!'; ================================================ FILE: packages/runtime/test/integration/serverless-config-async/next.config.js ================================================ module.exports = async function () { return {}; }; ================================================ FILE: packages/runtime/test/integration/serverless-config-async/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/serverless-config-async/package.json ================================================ { "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" } } ================================================ FILE: packages/runtime/test/integration/serverless-config-async/pages/goodbye.js ================================================ const F = () => 'Goodbye World!'; F.getInitialProps = async () => ({}); export default F; ================================================ FILE: packages/runtime/test/integration/serverless-config-async/pages/index.js ================================================ export default () => 'Hello World!'; ================================================ FILE: packages/runtime/test/integration/serverless-config-monorepo-missing/nested/package.json ================================================ { "dependencies": { "next": "8.1.0", "react": "latest", "react-dom": "latest" } } ================================================ FILE: packages/runtime/test/integration/serverless-config-monorepo-missing/nested/pages/goodbye.js ================================================ const F = () => 'Goodbye World!'; F.getInitialProps = async () => ({}); export default F; ================================================ FILE: packages/runtime/test/integration/serverless-config-monorepo-missing/nested/pages/index.js ================================================ export default () => 'Hello World!'; ================================================ FILE: packages/runtime/test/integration/serverless-config-monorepo-missing/now.json ================================================ { "version": 2, "builds": [{ "src": "nested/package.json", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/serverless-config-monorepo-present/nested/next.config.js ================================================ module.exports = () => ({}); ================================================ FILE: packages/runtime/test/integration/serverless-config-monorepo-present/nested/package.json ================================================ { "dependencies": { "next": "8.1.0", "react": "latest", "react-dom": "latest" } } ================================================ FILE: packages/runtime/test/integration/serverless-config-monorepo-present/nested/pages/goodbye.js ================================================ const F = () => 'Goodbye World!'; F.getInitialProps = async () => ({}); export default F; ================================================ FILE: packages/runtime/test/integration/serverless-config-monorepo-present/nested/pages/index.js ================================================ export default () => 'Hello World!'; ================================================ FILE: packages/runtime/test/integration/serverless-config-monorepo-present/now.json ================================================ { "version": 2, "builds": [{ "src": "nested/package.json", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/serverless-config-object/next.config.js ================================================ module.exports = {}; ================================================ FILE: packages/runtime/test/integration/serverless-config-object/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/serverless-config-object/package.json ================================================ { "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" } } ================================================ FILE: packages/runtime/test/integration/serverless-config-object/pages/goodbye.js ================================================ const F = () => 'Goodbye World!'; F.getInitialProps = async () => ({}); export default F; ================================================ FILE: packages/runtime/test/integration/serverless-config-object/pages/index.js ================================================ export default () => 'Hello World!'; ================================================ FILE: packages/runtime/test/integration/serverless-config-promise/next.config.js ================================================ module.exports = new Promise(res => res({})); ================================================ FILE: packages/runtime/test/integration/serverless-config-promise/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/serverless-config-promise/package.json ================================================ { "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" } } ================================================ FILE: packages/runtime/test/integration/serverless-config-promise/pages/goodbye.js ================================================ const F = () => 'Goodbye World!'; F.getInitialProps = async () => ({}); export default F; ================================================ FILE: packages/runtime/test/integration/serverless-config-promise/pages/index.js ================================================ export default () => 'Hello World!'; ================================================ FILE: packages/runtime/test/integration/serverless-no-config/now.json ================================================ { "version": 2, "builds": [ { "src": "package.json", "use": "@millihq/tf-next-runtime", "config": { "zeroConfig": true } } ] } ================================================ FILE: packages/runtime/test/integration/serverless-no-config/package.json ================================================ { "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" } } ================================================ FILE: packages/runtime/test/integration/serverless-no-config/pages/goodbye.js ================================================ const F = () => 'Goodbye World!'; F.getInitialProps = async () => ({}); export default F; ================================================ FILE: packages/runtime/test/integration/serverless-no-config/pages/index.js ================================================ export default () => 'Hello World!'; ================================================ FILE: packages/runtime/test/integration/serverless-no-config-build/now.json ================================================ { "version": 2, "builds": [ { "src": "package.json", "use": "@millihq/tf-next-runtime", "config": { "zeroConfig": true } } ] } ================================================ FILE: packages/runtime/test/integration/serverless-no-config-build/package.json ================================================ { "scripts": { "build": "next build && echo 'hello' > .next/world.txt" }, "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" } } ================================================ FILE: packages/runtime/test/integration/serverless-no-config-build/pages/index.js ================================================ export default () => 'Hello World!'; ================================================ FILE: packages/runtime/test/integration/standard/now.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/standard/package.json ================================================ { "dependencies": { "next": "canary", "react": "latest", "react-dom": "latest" } } ================================================ FILE: packages/runtime/test/integration/standard/pages/goodbye.js ================================================ const F = () => 'Goodbye World!'; F.getInitialProps = () => ({}); export default F; ================================================ FILE: packages/runtime/test/integration/standard/pages/index.js ================================================ export default () => 'Hello World!'; ================================================ FILE: packages/runtime/test/integration/static-files/next.config.js ================================================ module.exports = { target: 'serverless', }; ================================================ FILE: packages/runtime/test/integration/static-files/now.json ================================================ { "version": 2, "builds": [{ "src": "next.config.js", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/integration/static-files/package.json ================================================ { "scripts": { "now-build": "next build" }, "dependencies": { "next": "8", "react": "16", "react-dom": "16" } } ================================================ FILE: packages/runtime/test/integration/static-files/pages/index.js ================================================ export default () => 'Index page'; ================================================ FILE: packages/runtime/test/integration/static-files/static/test.txt ================================================ hello world ================================================ FILE: packages/runtime/test/integration/static-site/package.json ================================================ { "dependencies": { "next": "canary", "react": "latest", "react-dom": "latest" } } ================================================ FILE: packages/runtime/test/integration/static-site/pages/another.js ================================================ export default function Page() { return 'hello'; } export function getStaticProps() { return { props: {} }; } ================================================ FILE: packages/runtime/test/integration/static-site/pages/dynamic.js ================================================ export default function Page() { return 'hello'; } export function getStaticProps() { return { props: {}, revalidate: 10 }; } ================================================ FILE: packages/runtime/test/integration/static-site/pages/index.js ================================================ export default function Page() { return 'hello'; } export function getStaticProps() { return { props: {} }; } ================================================ FILE: packages/runtime/test/integration/static-site/vercel.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "@millihq/tf-next-runtime" }] } ================================================ FILE: packages/runtime/test/lib/run-build-lambda.js ================================================ const fs = require('fs-extra'); const { glob, getWriteableDirectory } = require('@vercel/build-utils'); function runAnalyze(wrapper, context) { if (wrapper.analyze) { return wrapper.analyze(context); } return 'this-is-a-fake-analyze-result-from-default-analyze'; } async function runBuildLambda(inputPath) { const inputFiles = await glob('**', inputPath); const nowJsonRef = inputFiles['vercel.json'] || inputFiles['now.json']; if (typeof expect !== 'undefined') { expect(nowJsonRef).toBeDefined(); } const nowJson = require(nowJsonRef.fsPath); const build = nowJson.builds[0]; if (typeof expect !== 'undefined') { expect(build.src.includes('*')).toBeFalsy(); } const entrypoint = build.src.replace(/^\//, ''); // strip leftmost slash if (typeof expect !== 'undefined') { expect(inputFiles[entrypoint]).toBeDefined(); } inputFiles[entrypoint].digest = 'this-is-a-fake-digest-for-non-default-analyze'; const wrapper = require(build.use); const analyzeResult = runAnalyze(wrapper, { files: inputFiles, entrypoint, config: build.config, }); const workPath = await fs.realpath(await getWriteableDirectory()); const buildResult = await wrapper.build({ files: inputFiles, entrypoint, config: build.config, workPath, }); const { output } = buildResult; // Windows support if (output) { buildResult.output = Object.keys(output).reduce( (result, path) => ({ ...result, [path.replace(/\\/g, '/')]: output[path], }), {} ); } return { analyzeResult, buildResult, workPath, }; } module.exports = runBuildLambda; ================================================ FILE: packages/runtime/test/unit/__snapshots__/utils.test.js.snap ================================================ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`getNextConfig return null on nothing 1`] = `null`; exports[`getNextConfig should find entry file 1`] = ` "module.exports = {}; " `; exports[`getNextConfig should find work file second 1`] = ` "module.exports = { target: 'serverless' }; " `; ================================================ FILE: packages/runtime/test/unit/build.test.js ================================================ const path = require('path'); const os = require('os'); const execa = require('execa'); const { build } = require('@millihq/tf-next-runtime'); const { download, FileBlob } = require('@vercel/build-utils'); jest.setTimeout(45000); beforeAll(() => { process.env.NEXT_TELEMETRY_DISABLED = '1'; }); describe('build meta dev', () => { const files = { 'next.config.js': new FileBlob({ mode: 0o777, data: ` module.exports = { target: 'serverless' } `, }), 'pages/index.js': new FileBlob({ mode: 0o777, data: ` export default () => 'Index page' `, }), 'pages/nested/[param].js': new FileBlob({ mode: 0o777, data: ` export default () => 'Dynamic page' `, }), 'pages/nested/page.tsx': new FileBlob({ mode: 0o777, data: ` export default () => 'Nested page' `, }), 'pages/api/test.js': new FileBlob({ mode: 0o777, data: ` export default (req, res) => res.status(200).end('API Route') `, }), // This file should be omitted because `pages/index.js` will use the same route 'public/index': new FileBlob({ mode: 0o777, data: 'text', }), 'public/data.txt': new FileBlob({ mode: 0o777, data: 'data', }), 'package.json': new FileBlob({ mode: 0o777, data: ` { "scripts": { "now-build": "next build" }, "dependencies": { "next": "9", "react": "16", "react-dom": "16" }, "devDependencies": { "@types/node": "12", "@types/react": "16", "typescript": "3" } } `, }), }; const entrypoint = 'next.config.js'; const workPath = path.join( os.tmpdir(), Math.random() .toString() .slice(3) ); console.log('workPath directory: ', workPath); it('should have builder v2 response isDev=true', async () => { // Since `download()` is a no-op when `isDev=true`, the assumption is that the // source files are already present, so manually download them here first. await download(files, workPath); // Since we won't install dependecies when `isDev=true` await execa('yarn', ['install'], { cwd: workPath, env: process.env, reject: true, }); const meta = { isDev: true, requestPath: null }; const { output, routes, watch, childProcesses } = await build({ files, workPath, entrypoint, meta, }); routes.forEach(route => { // eslint-disable-next-line no-param-reassign route.dest = route.dest.replace(/:\d+/, ':5000'); }); expect(output).toEqual({}); expect(routes).toEqual([ { src: '/_next/(.*)', dest: 'http://localhost:5000/_next/$1' }, { src: '/static/(.*)', dest: 'http://localhost:5000/static/$1' }, { src: '/index', dest: 'http://localhost:5000/index' }, { src: '/', dest: 'http://localhost:5000/' }, { src: '/nested/page', dest: 'http://localhost:5000/nested/page' }, { src: '/api/test', dest: 'http://localhost:5000/api/test' }, { src: '^/(nested\\/([^/]+?)(?:\\/)?)$', dest: 'http://localhost:5000/$1', check: false /* We cannot check the filesystem for a url */, }, { src: '/data.txt', dest: 'http://localhost:5000/data.txt' }, ]); expect(watch).toEqual([ 'next.config.js', 'pages/index.js', 'pages/nested/[param].js', 'pages/nested/page.tsx', 'pages/api/test.js', 'public/index', 'public/data.txt', 'package.json', ]); childProcesses.forEach(cp => cp.kill()); }); }); ================================================ FILE: packages/runtime/test/unit/export.test.js ================================================ describe('export', () => { it('should require by path main', async () => { const main = require('@millihq/tf-next-runtime'); expect(main).toBeDefined(); }); it('should require by path dev-server relative to index', async () => { const index = require('@millihq/tf-next-runtime/dist/index.js'); const server = require('@millihq/tf-next-runtime/dist/dev-server.js'); expect(index).toBeDefined(); expect(server).toBeDefined(); }); }); ================================================ FILE: packages/runtime/test/unit/fixtures/entry/next.config.js ================================================ module.exports = {}; ================================================ FILE: packages/runtime/test/unit/fixtures/next.config.js ================================================ module.exports = { target: 'serverless' }; ================================================ FILE: packages/runtime/test/unit/utils.test.js ================================================ const path = require('path'); const { excludeFiles, validateEntrypoint, normalizePackageJson, getNextConfig, } = require('@millihq/tf-next-runtime/dist/utils'); const { FileRef } = require('@vercel/build-utils'); describe('getNextConfig', () => { const workPath = path.join(__dirname, 'fixtures'); const entryPath = path.join(__dirname, 'fixtures', 'entry'); it('should find entry file', async () => { const file = await getNextConfig(workPath, entryPath); expect(file).toMatchSnapshot(); }); it('should find work file second', async () => { const file = await getNextConfig(workPath, '/'); expect(file).toMatchSnapshot(); }); it('return null on nothing', async () => { const file = await getNextConfig('/', '/'); expect(file).toMatchSnapshot(); }); }); describe('excludeFiles', () => { it('should exclude files', () => { const files = { 'pages/index.js': new FileRef({ digest: 'index' }), 'package.json': new FileRef({ digest: 'package' }), 'package-lock.json': new FileRef({ digest: 'package-lock' }), }; const result = excludeFiles( files, filePath => filePath === 'package-lock.json' ); expect(result['pages/index.js']).toBeDefined(); expect(result['package.json']).toBeDefined(); expect(result['package-lock.json']).toBeUndefined(); }); }); describe('validateEntrypoint', () => { it('should allow package.json', () => { expect(validateEntrypoint('package.json')).toBeUndefined(); }); it('should allow nested package.json', () => { expect(validateEntrypoint('frontend/package.json')).toBeUndefined(); }); it('should allow next.config.js', () => { expect(validateEntrypoint('next.config.js')).toBeUndefined(); }); it('should allow nested next.config.js', () => { expect(validateEntrypoint('frontend/next.config.js')).toBeUndefined(); }); it('should not allow pages/index.js', () => { expect(() => validateEntrypoint('pages/index.js')).toThrow(); }); }); describe('normalizePackageJson', () => { it('should work without a package.json being supplied', () => { const result = normalizePackageJson(); expect(result).toEqual({ dependencies: { 'next-server': 'v7.0.2-canary.49', react: 'latest', 'react-dom': 'latest', }, devDependencies: { next: 'v7.0.2-canary.49', }, scripts: { 'now-build': 'NODE_OPTIONS=--max_old_space_size=3000 next build --lambdas', }, }); }); it('should work with a package.json being supplied', () => { const defaultPackage = { dependencies: { 'next-server': 'v7.0.2-canary.49', react: 'latest', 'react-dom': 'latest', }, devDependencies: { next: 'v7.0.2-canary.49', }, scripts: { 'now-build': 'next build', }, }; const result = normalizePackageJson(defaultPackage); expect(result).toEqual({ dependencies: { 'next-server': 'v7.0.2-canary.49', react: 'latest', 'react-dom': 'latest', }, devDependencies: { next: 'v7.0.2-canary.49', }, scripts: { 'now-build': 'NODE_OPTIONS=--max_old_space_size=3000 next build --lambdas', }, }); }); it('should force next@canary to be a devDependency', () => { const defaultPackage = { dependencies: { react: 'latest', 'react-dom': 'latest', next: 'latest', }, }; const result = normalizePackageJson(defaultPackage); expect(result).toEqual({ dependencies: { 'next-server': 'v7.0.2-canary.49', react: 'latest', 'react-dom': 'latest', }, devDependencies: { next: 'v7.0.2-canary.49', }, scripts: { 'now-build': 'NODE_OPTIONS=--max_old_space_size=3000 next build --lambdas', }, }); }); it('should force next-server@canary to be a dependency', () => { const defaultPackage = { dependencies: { react: 'latest', 'react-dom': 'latest', next: 'latest', }, }; const result = normalizePackageJson(defaultPackage); expect(result).toEqual({ dependencies: { 'next-server': 'v7.0.2-canary.49', react: 'latest', 'react-dom': 'latest', }, devDependencies: { next: 'v7.0.2-canary.49', }, scripts: { 'now-build': 'NODE_OPTIONS=--max_old_space_size=3000 next build --lambdas', }, }); }); it('should force now-build script', () => { const defaultPackage = { dependencies: { react: 'latest', 'react-dom': 'latest', next: 'latest', }, }; const result = normalizePackageJson(defaultPackage); expect(result).toEqual({ dependencies: { 'next-server': 'v7.0.2-canary.49', react: 'latest', 'react-dom': 'latest', }, devDependencies: { next: 'v7.0.2-canary.49', }, scripts: { 'now-build': 'NODE_OPTIONS=--max_old_space_size=3000 next build --lambdas', }, }); }); // https://github.com/vercel/next.js/issues/5700 it('should normalize user report vercel/next.js#5700 correctly', () => { const defaultPackage = { version: '1.0.0', scripts: { dev: 'next', build: 'next build', start: 'next start', test: "xo && stylelint './pages/**/*.js' && jest", }, main: 'pages/index.js', license: 'MIT', devDependencies: { 'babel-plugin-styled-components': '^1.8.0', 'eslint-config-xo-react': '^0.17.0', 'eslint-plugin-react': '^7.11.1', jest: '^23.6.0', 'jest-styled-components': '^6.3.1', 'react-test-renderer': '^16.6.3', stylelint: '^9.8.0', 'stylelint-config-recommended': '^2.1.0', 'stylelint-config-styled-components': '^0.1.1', 'stylelint-processor-styled-components': '^1.5.1', xo: '^0.23.0', }, dependencies: { consola: '^2.2.6', fontfaceobserver: '^2.0.13', next: '^7.0.2', react: '^16.6.3', 'react-dom': '^16.6.3', 'styled-components': '^4.1.1', }, xo: { extends: 'xo-react', envs: 'browser', esnext: true, ignores: [ 'test', 'pages/_document.js', 'pages/index.js', 'pages/home.js', ], rules: { 'react/no-unescaped-entities': null, }, }, jest: { testEnvironment: 'node', }, }; const result = normalizePackageJson(defaultPackage); expect(result).toEqual({ version: '1.0.0', scripts: { dev: 'next', build: 'next build', 'now-build': 'NODE_OPTIONS=--max_old_space_size=3000 next build --lambdas', start: 'next start', test: "xo && stylelint './pages/**/*.js' && jest", }, main: 'pages/index.js', license: 'MIT', devDependencies: { 'babel-plugin-styled-components': '^1.8.0', 'eslint-config-xo-react': '^0.17.0', 'eslint-plugin-react': '^7.11.1', jest: '^23.6.0', 'jest-styled-components': '^6.3.1', 'react-test-renderer': '^16.6.3', stylelint: '^9.8.0', 'stylelint-config-recommended': '^2.1.0', 'stylelint-config-styled-components': '^0.1.1', 'stylelint-processor-styled-components': '^1.5.1', next: 'v7.0.2-canary.49', 'next-server': undefined, xo: '^0.23.0', consola: '^2.2.6', fontfaceobserver: '^2.0.13', 'styled-components': '^4.1.1', }, dependencies: { 'next-server': 'v7.0.2-canary.49', react: '^16.6.3', 'react-dom': '^16.6.3', }, xo: { extends: 'xo-react', envs: 'browser', esnext: true, ignores: [ 'test', 'pages/_document.js', 'pages/index.js', 'pages/home.js', ], rules: { 'react/no-unescaped-entities': null, }, }, jest: { testEnvironment: 'node', }, }); }); }); ================================================ FILE: packages/runtime/test/utils.js ================================================ async function waitFor(milliseconds) { return new Promise(resolve => { setTimeout(resolve, milliseconds); }); } async function check(contentFn, regex, hardError = true) { let content; let lastErr; for (let tries = 0; tries < 30; tries++) { try { content = await contentFn(); if (typeof regex === 'string') { if (regex === content) { return true; } } else if (regex.test(content)) { // found the content return true; } await waitFor(1000); } catch (err) { await waitFor(1000); lastErr = err; } } console.error('TIMED OUT CHECK: ', { regex, content, lastErr }); if (hardError) { throw new Error('TIMED OUT: ' + regex + '\n\n' + content); } return false; } module.exports = { check, waitFor, }; ================================================ FILE: packages/runtime/tsconfig.json ================================================ { "compilerOptions": { "strict": true, "esModuleInterop": true, "lib": ["esnext"], "target": "es2018", "module": "commonjs", "outDir": "dist", "sourceMap": false, "declaration": true }, "include": ["src/**/*"], "exclude": ["node_modules"] } ================================================ FILE: packages/tf-next/.gitignore ================================================ dist ================================================ FILE: packages/tf-next/README.md ================================================ # Terraform Next.js CLI Command-line interface (CLI) companion tool for [Terraform Next.js module for AWS](https://github.com/milliHQ/terraform-aws-next-js). It is used for [building](#build) Next.js apps, deployment and management of deployments. ## Getting Started This covers only the CLI part of the tool, for a full step-by-step tutorial please see our [examples](https://github.com/milliHQ/terraform-aws-next-js#examples). 1. Install the CLI tool ```plain npm i -g tf-next@canary ``` 2. Build the project ```plain tf-next build ``` 3. Deploy the app ```plain tf-next deploy --endpoint https://.execute-api..amazonaws.com > success Deployment package uploaded > success Deployment ready > Available at: https://1e02d46975338b63651b8587ea6a8475.example.com/ ``` ## Commands ### Build #### Basic Usage To build a Next.js app, run `tf-next build` from the directory where your `next.config.js` or `package.json` is located. The app is then checked out into a temporary folder and build from there. Once the build process is finished, a new folder `.next-tf` is added to your current working directory. The `.next-tf` folder contains a deployment package that can be used together with the [deploy command](#deploy) to deploy your application. ```plain tf-next build ``` #### Extended Usage The `--skipDownload` flag can be used to prevent the checkout into a temporary folder (builds in the current working directory instead): ```plain tf-next build --skipDownload ``` #### Global Options The following options can be passed when using the `tf-next build` command: - `--skipDownload` ### Deploy To publish an previously built Next.js app to the system, run `tf-next deploy` from the same directory where the build command was executed from. #### Basic Usage ```plain tf-next deploy --endpoint ``` #### Global Options The following options can be passed when using the `tf-next deploy` command: - `--endpoint` - `--profile` (also available as `--awsProfile`) AWS profile to use for authenticating against the API endpoint. Uses `default` profile if not specified. ### Deployment To manage the deployments that are published to the system. #### Basic Usage To show the most recent (25) deployments: ```plain tf-next deployment ls ``` To remove (delete) an existing deployment from the system: ```plain tf-next deployment rm ``` #### Extended Usage To delete an existing deployment including all of the aliases that are associated with it. ```plain tf-next deployment rm --force ``` #### Global Options The following options can be passed when using the `tf-next deployment` command: - `--endpoint` - `--profile` (also available as `--awsProfile`) AWS profile to use for authenticating against the API endpoint. Uses `default` profile if not specified. ### Alias To managed the aliases that are deployed to the system ## License Apache-2.0 - see [LICENSE](./LICENSE) for details. ================================================ FILE: packages/tf-next/index.js ================================================ #!/usr/bin/env node require(__dirname + '/dist/index.js'); ================================================ FILE: packages/tf-next/package.json ================================================ { "name": "tf-next", "version": "1.0.0-canary.5", "description": "CLI build tool for AWS Next.js Terraform module.", "homepage": "https://registry.terraform.io/modules/milliHQ/next-js/aws", "main": "index.js", "license": "Apache-2.0", "repository": { "type": "git", "url": "https://github.com/milliHQ/terraform-aws-next-js.git", "directory": "packages/tf-next" }, "bin": { "tf-next": "index.js" }, "scripts": { "build": "tsc", "prepack": "cp ../../LICENSE ./", "postpack": "rm ./LICENSE" }, "dependencies": { "@aws-crypto/sha256-js": "^2.0.1", "@aws-sdk/credential-provider-node": "3.100.0", "@aws-sdk/signature-v4": "^3.78.0", "@millihq/tf-next-runtime": "1.0.0-canary.5", "@vercel/build-utils": "2.12.1", "@vercel/frameworks": "^0.0.15", "@vercel/routing-utils": "^1.10.1", "ajv": "8.11.0", "ansi-escapes": "4.3.2", "archiver": "^5.3.0", "chalk": "4.1.2", "clipboardy": "2.3.0", "find-yarn-workspace-root": "^2.0.0", "form-data-encoder": "^1.7.2", "formdata-node": "^4.3.2", "fs-extra": "^9.0.1", "glob": "^7.1.6", "ms": "2.1.3", "node-fetch": "2.6.7", "ora": "^5.4.1", "p-wait-for": "3.2.0", "text-table": "0.2.0", "tmp": "^0.2.1", "yargs": "17.5.1" }, "devDependencies": { "@aws-sdk/types": "^3.78.0", "@millihq/terraform-next-api": "1.0.0-canary.5", "@tsconfig/node14": "1.0.1", "@types/archiver": "^5.1.0", "@types/fs-extra": "^9.0.1", "@types/glob": "^7.1.2", "@types/ms": "0.7.31", "@types/node-fetch": "^2.0.0", "@types/text-table": "0.2.2", "@types/tmp": "^0.2.0", "@types/yargs": "17.0.10", "typescript": "*" }, "files": [ "dist/**", "index.js" ], "engines": { "node": ">= 14" } } ================================================ FILE: packages/tf-next/src/client/aws-profile.ts ================================================ import { defaultProvider } from '@aws-sdk/credential-provider-node'; import { Credentials, MemoizedProvider } from '@aws-sdk/types'; import { Options, Arguments } from 'yargs'; import { Client } from './client'; type AwsCredentialProvider = MemoizedProvider; type AWSProfileArguments = { awsCredentialProvider: AwsCredentialProvider; }; /** * Generates a aws credential provider from the Node.js environment. * It will attempt to find credentials from the following sources (listed in * order of precedence): * - Environment variables exposed via process.env * - SSO credentials from token cache * - Web identity token credentials * - Shared credentials and config ini files * - The EC2/ECS Instance Metadata Service * * @see {@link https://www.npmjs.com/package/@aws-sdk/credential-provider-node} */ const awsProfileMiddleware = (argv: Arguments): AwsCredentialProvider => { // If the --profile flag is provided load a named profile const profile = typeof argv.profile === 'string' ? argv.profile : undefined; if (profile) { const client = argv.client as Client; client.output.debug(`Using AWS profile ${profile}`); } return defaultProvider({ profile, }); }; /** * Command line options that are added when the awsProfileMiddleware is used. */ const awsProfileMiddlewareOptions: Record = { profile: { type: 'string', description: 'AWS profile that should be used for authentication with the API endpoint.', alias: 'awsProfile', }, }; export type { AWSProfileArguments, AwsCredentialProvider }; export { awsProfileMiddleware, awsProfileMiddlewareOptions }; ================================================ FILE: packages/tf-next/src/client/client.ts ================================================ import { ArgumentsCamelCase, Argv, BuilderCallback, MiddlewareFunction, } from 'yargs'; import { GlobalOptions, LogLevel } from '../types'; import { awsProfileMiddleware, awsProfileMiddlewareOptions, } from './aws-profile'; import { ApiService, apiMiddlewareOptions, apiMiddleware, } from './services/api'; import { OutputService } from './services/output'; type ClientOptions = { logLevel: LogLevel; apiService?: ApiService; }; class Client { logLevel: LogLevel; output: OutputService; // TODO: apiService is only present, when it is available from ClientOptions // Typing this correctly would take too long public apiService!: ApiService; constructor({ logLevel, apiService }: ClientOptions) { this.logLevel = logLevel; this.output = new OutputService({ logLevel }); if (apiService) { this.apiService = apiService; } } } /* ----------------------------------------------------------------------------- * clientMiddleware * ---------------------------------------------------------------------------*/ type ClientMiddlewareArguments = { client: Client; }; type CreateClientMiddlewareOptions = { withApiService: boolean; }; const createClientMiddleware = (options: CreateClientMiddlewareOptions): MiddlewareFunction => // Ensure that this function is async otherwise errors thrown in the // middleware are not caught! // @see {@link https://github.com/yargs/yargs/issues/1797} async (argv) => { // Initialize client first, so that we can use it in Error middleware argv.client = new Client({ logLevel: argv.logLevel, }); if (options.withApiService) { // Get AWS profile const awsCredentialProvider = awsProfileMiddleware(argv); argv.client.apiService = apiMiddleware(argv, awsCredentialProvider); } }; /* ----------------------------------------------------------------------------- * withClient * ---------------------------------------------------------------------------*/ type WithClientOptions = { withApiService?: boolean; }; function withClient< Args extends GlobalOptions, U = Args & ClientMiddlewareArguments >( command: string | ReadonlyArray, description: string, builder: BuilderCallback, handler: (args: ArgumentsCamelCase) => void | Promise, options: WithClientOptions = {} ) { const { withApiService = true } = options; return (yargs: Argv) => { const middleware = createClientMiddleware({ withApiService, }); const localBuilder: BuilderCallback = (localYargs) => { if (withApiService) { localYargs.options({ ...awsProfileMiddlewareOptions, ...apiMiddlewareOptions, }); } return builder(localYargs); }; yargs.command(command, description, localBuilder, handler, [middleware]); }; } export type { Client }; export { withClient }; ================================================ FILE: packages/tf-next/src/client/index.ts ================================================ export { ApiService } from './services/api'; export { Client, withClient } from './client'; ================================================ FILE: packages/tf-next/src/client/services/api/api.ts ================================================ import { URL, URLSearchParams } from 'url'; import { Sha256 } from '@aws-crypto/sha256-js'; import { SignatureV4 } from '@aws-sdk/signature-v4'; import { HeaderBag, MemoizedProvider, QueryParameterBag } from '@aws-sdk/types'; import { paths } from '@millihq/terraform-next-api/schema'; import { Credentials } from 'aws-lambda'; import nodeFetch, { HeadersInit } from 'node-fetch'; import pWaitFor from 'p-wait-for'; import { createResponseError, ResponseError, } from '../../../utils/errors/response-error'; import { CredentialsError } from '../../../utils/errors'; type NodeFetch = typeof nodeFetch; type CreateAliasRequestBody = paths['/aliases']['post']['requestBody']['content']['application/json']; type CreateAliasSuccessResponse = paths['/aliases']['post']['responses']['201']['content']['application/json']; type ListAliasQueryParameters = paths['/aliases']['get']['parameters']['query']; type ListAliasSuccessResponse = paths['/aliases']['get']['responses']['200']['content']['application/json']; type CreateDeploymentSuccessResponse = paths['/deployments']['post']['responses']['201']['content']['application/json']; type ListDeploymentsSuccessResponse = paths['/deployments']['get']['responses']['200']['content']['application/json']; type GetDeploymentByIdSuccessResponse = paths['/deployments/{deploymentId}']['get']['responses']['200']['content']['application/json']; type DeleteDeploymentByIdSuccessResponse = paths['/deployments/{deploymentId}']['delete']['responses']['200']['content']['application/json']; const POLLING_DEFAULT_INTERVAL_MS = 5_000; const POLLING_DEFAULT_TIMEOUT_MS = 5 * 60_000; /** * API Gateway endpoints use a regional API endpoint which includes the AWS * region where they are deployed to. * e.g. https://xyz.execute-api.eu-central-1.amazonaws.com */ function extractRegionFromApiGatewayEndpoint( endpointUrl: string ): string | null { const result = endpointUrl.match(/execute-api\.([^\.]*)/); if (result && result[1]) { return result[1]; } return null; } /** * Converts the headers from fetch into SignatureV4 compatible format. */ function convertFetchHeaders( inputHeaders: HeadersInit | undefined = {} ): HeaderBag { const result: HeaderBag = {}; for (const [key, value] of Object.entries(inputHeaders)) { result[key] = value; } return result; } function convertURLSearchParamsToQueryBag( searchParams: URLSearchParams ): QueryParameterBag { let queryBag: QueryParameterBag = {}; for (const [key, value] of searchParams.entries()) { queryBag[key] = value; } return queryBag; } /* ----------------------------------------------------------------------------- * ApiService * ---------------------------------------------------------------------------*/ type ApiServiceOptions = { apiEndpoint: string; awsCredentialProvider: MemoizedProvider; }; class ApiService { apiEndpoint: string; awsCredentialProvider: MemoizedProvider; awsRegion: string; constructor({ apiEndpoint, awsCredentialProvider }: ApiServiceOptions) { this.apiEndpoint = apiEndpoint; this.awsCredentialProvider = awsCredentialProvider; const awsRegion = extractRegionFromApiGatewayEndpoint(apiEndpoint); if (!awsRegion) { throw new Error( 'API endpoint is in bad format. Could not extract region from it.' ); } this.awsRegion = awsRegion; } /** * Fetch that signs a request with SignatureV4 automatically. * @param fetchArgs * @returns */ private async fetchAWSSigV4( ...fetchArgs: Parameters ): Promise { const signature = new SignatureV4({ region: this.awsRegion, service: 'execute-api', credentials: this.awsCredentialProvider, sha256: Sha256, }); let requestUrl: string; if (typeof fetchArgs[0] === 'string') { requestUrl = fetchArgs[0]; } else if ('href' in fetchArgs[0]) { requestUrl = fetchArgs[0].href; } else { requestUrl = fetchArgs[0].url; } const parsedUrl = new URL(requestUrl, this.apiEndpoint); try { const signedRequest = await signature.sign({ hostname: parsedUrl.hostname, protocol: parsedUrl.protocol, path: parsedUrl.pathname, headers: convertFetchHeaders({ ...fetchArgs[1]?.headers, host: parsedUrl.hostname, accept: 'application/json', }), method: fetchArgs[1]?.method?.toUpperCase() ?? 'GET', query: convertURLSearchParamsToQueryBag(parsedUrl.searchParams), body: fetchArgs[1]?.body, }); const response = await nodeFetch(parsedUrl.href, { ...fetchArgs[1], headers: signedRequest.headers, }); if (!response.ok) { throw await createResponseError(response); } // OK - parse the response if (response.headers.get('content-type') === 'application/json') { try { return (await response.json()) as Promise; } catch (_ignoredError) { return {} as T; } } // Response from API is not OK, should never happen throw new Error('Invalid response from API'); } catch (error: any) { if (error.name === 'CredentialsProviderError') { throw new CredentialsError(); } throw error; } } // Aliases createAlias(requestBody: CreateAliasRequestBody) { return this.fetchAWSSigV4('/aliases', { method: 'POST', body: JSON.stringify(requestBody), headers: { 'Content-Type': 'application/json', }, }); } deleteAlias(alias: string) { return this.fetchAWSSigV4(`/aliases/${alias}`, { method: 'DELETE', }); } async listAliases(deploymentId: string) { const params: ListAliasQueryParameters = { deploymentId, }; const query = new URLSearchParams(params).toString(); const { items } = await this.fetchAWSSigV4( `/aliases?${query}` ); return items; } // Deployments createDeployment() { return this.fetchAWSSigV4('/deployments', { method: 'POST', }); } async listDeployments() { const { items } = await this.fetchAWSSigV4( '/deployments' ); return items; } getDeploymentById(deploymentId: string) { return this.fetchAWSSigV4( `/deployments/${deploymentId}` ); } /** * Polls the getDeploymentById endpoint until the status meets the desired * status. * * @param deploymentId - Id of the deployment that should be polled. * @param status - Status to wait for until polling finishes. * @param options - Polling options. */ pollForDeploymentStatus = async ( deploymentId: string, status: GetDeploymentByIdSuccessResponse['status'], options: { interval?: number; timeout?: number; } = {} ): Promise => { // Status where we should stop since something bad has happened const failureStatus: GetDeploymentByIdSuccessResponse['status'][] = [ 'CREATE_FAILED', 'DESTROY_FAILED', ]; const { interval = POLLING_DEFAULT_INTERVAL_MS, timeout = POLLING_DEFAULT_TIMEOUT_MS, } = options; let result: GetDeploymentByIdSuccessResponse | null = null; await pWaitFor( async () => { const response = await this.getDeploymentById(deploymentId); if (response) { if (failureStatus.indexOf(response.status) !== -1) { // Create a pseudo error response throw new ResponseError({ status: 400, code: 'DEPLOYMENT_CREATE_FAILED', }); } if (response.status === status) { result = response; return true; } } return false; }, { interval, timeout, leadingCheck: false, } ); if (!result) { throw new Error('Could not get deployment status.'); } return result; }; deleteDeploymentById = (deploymentId: string) => { return this.fetchAWSSigV4( `/deployments/${deploymentId}`, { method: 'DELETE', } ); }; } export { ApiService }; ================================================ FILE: packages/tf-next/src/client/services/api/index.ts ================================================ export { ApiService } from './api'; export { apiMiddleware, apiMiddlewareOptions } from './middleware'; ================================================ FILE: packages/tf-next/src/client/services/api/middleware.ts ================================================ import { Options } from 'yargs'; import { GlobalOptions } from '../../../types'; import { ApiService } from '../api'; import { readProjectConfig, writeProjectConfig, } from '../../../utils/project-config'; import { AwsCredentialProvider } from '../../aws-profile'; import { MissingApiEndpoint } from '../../../utils/errors'; /* ----------------------------------------------------------------------------- * apiMiddleware * ---------------------------------------------------------------------------*/ type ApiMiddlewareArguments = { endpoint?: string; } & GlobalOptions; function apiMiddleware( argv: ApiMiddlewareArguments, awsCredentialProvider: AwsCredentialProvider ): ApiService { // Check for project config const projectConfig = readProjectConfig(argv.commandCwd); let endpoint: string | undefined; if (typeof argv.endpoint === 'string') { endpoint = argv.endpoint; } else if (projectConfig) { endpoint = projectConfig.apiEndpoint; } if (endpoint === undefined) { throw new MissingApiEndpoint(); } // Write projectConfig if (!projectConfig || projectConfig.apiEndpoint !== endpoint) { writeProjectConfig(argv.commandCwd, { apiEndpoint: endpoint, }); } return new ApiService({ awsCredentialProvider, apiEndpoint: endpoint, }); } const apiMiddlewareOptions: Record = { endpoint: { type: 'string', description: 'API endpoint to use.', }, }; export { apiMiddleware, apiMiddlewareOptions }; ================================================ FILE: packages/tf-next/src/client/services/output/create-spinner.ts ================================================ import ansiEscapes from 'ansi-escapes'; import chalk from 'chalk'; import ora from 'ora'; /** * Same spinner configuration as Next.js * @see {@link https://github.com/vercel/next.js/blob/canary/packages/next/build/spinner.ts} */ const dotsSpinner = { frames: ['.', '..', '...'], interval: 200, }; function eraseLines(numberOfLines: number) { return ansiEscapes.eraseLines(numberOfLines); } type StopCallback = () => void; function createSpinner(message: string, delay: number = 300) { let spinner: ReturnType | null; const timeout = setTimeout(() => { spinner = ora({ spinner: dotsSpinner, prefixText: chalk.gray(message), color: 'gray', }); spinner.start(); }, delay); const stop = () => { clearTimeout(timeout); if (spinner) { spinner.stop(); spinner = null; eraseLines(1); } }; return stop; } export type { StopCallback }; export { createSpinner }; ================================================ FILE: packages/tf-next/src/client/services/output/index.ts ================================================ export { OutputService } from './output'; ================================================ FILE: packages/tf-next/src/client/services/output/output.ts ================================================ import chalk from 'chalk'; import { LogLevel } from '../../../types'; import { strlen } from '../../../utils/strlen'; import { createSpinner, StopCallback } from './create-spinner'; type OutputServiceOptions = { logLevel: LogLevel; }; class OutputService { private _spinner: StopCallback | null; private spinnerMessage: string; logLevel: LogLevel; isDebug: boolean; constructor({ logLevel }: OutputServiceOptions) { this.spinnerMessage = ''; this.logLevel = logLevel; this.isDebug = logLevel === 'verbose'; this._spinner = null; } print(message: string, prefix?: string) { const prefixLength = prefix ? strlen(prefix) : 0; const indentNewline = '\n' + ' '.repeat(prefixLength); this.stopSpinner(); const indentedMessage = message.replace(/\n/, indentNewline); console.log((prefix || '') + indentedMessage); } log = (message: string, color = chalk.grey) => { this.print(message, color('> ')); }; debug = (message: string) => { if (this.isDebug) { this.print(chalk.gray(message), chalk.blueBright('debug ')); } }; error = (message: string) => { this.print(message, chalk.red('error ')); }; success = (message: string) => { this.print(message, chalk.green('success ')); }; spinner = (message: string, delay = 300): void => { this.spinnerMessage = message; this._spinner = createSpinner(message, delay); }; stopSpinner = () => { if (this._spinner) { this._spinner(); this._spinner = null; this.spinnerMessage = ''; } }; } export { OutputService }; ================================================ FILE: packages/tf-next/src/commands/alias/alias-list.ts ================================================ import chalk from 'chalk'; import ms from 'ms'; import table from 'text-table'; import { Client, withClient } from '../../client'; import { GlobalOptions } from '../../types'; import { DeploymentNotExists, ResponseError } from '../../utils/errors'; import { strlen } from '../../utils/strlen'; /* ----------------------------------------------------------------------------- * aliasListCommand * ---------------------------------------------------------------------------*/ type AliasListCommandOptions = { /** * Global client service. */ client: Client; /** * DeploymentId */ deploymentId: string; }; /** * Prints the latest 25 aliases for a deployment to the console. */ async function aliasListCommand({ client, deploymentId, }: AliasListCommandOptions) { const { apiService, output } = client; output.spinner(`Fetching aliases for deployment ${deploymentId}`); try { const aliases = await apiService.listAliases(deploymentId); output.stopSpinner(); if (aliases.length === 0) { output.log( `No aliases linked to deployment ${deploymentId}\nCreate a new alias with the 'tf-next alias set' command.` ); return; } output.log(`Linked aliases for deployment ${deploymentId}:\n`); // Print table const todayMillis = Date.now(); console.log( table( [ // Header ['age ▼', 'alias'].map((header) => chalk.dim(header)), // Data ...aliases.map((alias) => [ ms(todayMillis - new Date(alias.createDate).getTime()), `https://${alias.id}`, ]), ], { hsep: ' '.repeat(3), stringLength: strlen, } ).replace(/^/gm, ' ') + '\n' ); } catch (error: ResponseError | any) { if (error.code === 'DEPLOYMENT_NOT_FOUND') { throw new DeploymentNotExists(deploymentId); } throw error; } } /* ----------------------------------------------------------------------------- * createAliasListCommand * ---------------------------------------------------------------------------*/ type AliasListCommandArguments = { deploymentId: string; } & GlobalOptions; const createAliasListCommand = withClient( 'ls ', 'List aliases that are linked to a deployment', (yargs) => { return yargs.positional('deployment-id', { describe: 'ID of the deployment', type: 'string', }); }, ({ client, deploymentId }) => aliasListCommand({ client, deploymentId, }) ); export { createAliasListCommand }; ================================================ FILE: packages/tf-next/src/commands/alias/alias-remove.ts ================================================ import { Client, withClient } from '../../client'; import { GlobalOptions } from '../../types'; import { AliasNotExists, DeleteDeploymentAlias, ResponseError, } from '../../utils/errors'; import { trimProtocol } from '../../utils/trim-protocol'; /* ----------------------------------------------------------------------------- * aliasRemoveCommand * ---------------------------------------------------------------------------*/ type AliasRemoveCommandOptions = { /** * Global client service. */ client: Client; /** * The domain name of the alias. */ customDomain: string; }; /** * Creates a new alias or overrides an existing one. */ async function aliasRemoveCommand({ client, customDomain, }: AliasRemoveCommandOptions) { const { apiService, output } = client; const alias = trimProtocol(customDomain); output.spinner('Removing alias'); try { await apiService.deleteAlias(alias); output.success(`Alias ${alias} was removed.`); } catch (error: ResponseError | any) { if (error.code === 'ALIAS_NOT_FOUND') { throw new AliasNotExists(alias); } if (error.code === 'DEPLOYMENT_ALIAS') { throw new DeleteDeploymentAlias(); } throw error; } } /* ----------------------------------------------------------------------------- * createAliasRemoveCommand * ---------------------------------------------------------------------------*/ type AliasRemoveCommandArguments = { // Positional arguments customDomain: string; } & GlobalOptions; const createAliasRemoveCommand = withClient( 'rm ', 'Remove an existing alias', (yargs) => { yargs.positional('custom-domain', { describe: 'Domain of the alias', type: 'string', }); }, ({ client, customDomain }) => aliasRemoveCommand({ client, customDomain, }) ); export { createAliasRemoveCommand }; ================================================ FILE: packages/tf-next/src/commands/alias/alias-set.ts ================================================ import chalk from 'chalk'; import { Client, withClient } from '../../client'; import { GlobalOptions } from '../../types'; import { AliasOverrideNotAllowed, ResponseError } from '../../utils/errors'; import { trimProtocol } from '../../utils/trim-protocol'; /* ----------------------------------------------------------------------------- * aliasSetCommand * ---------------------------------------------------------------------------*/ type AliasSetCommandOptions = { /** * Global client. */ client: Client; /** * The domain name of the alias. */ customDomain: string; /** * DeploymentId or alias where the alias should link to */ target: string; /** * Override an existing alias. */ override: boolean; }; /** * Creates a new alias or overrides an existing one. */ async function aliasSetCommand({ client, customDomain, target, override, }: AliasSetCommandOptions) { const { apiService, output } = client; const trimmedCustomDomain = trimProtocol(customDomain); const trimmedTarget = trimProtocol(target); output.spinner('Creating alias'); try { const alias = await apiService.createAlias({ alias: trimmedCustomDomain, target: trimmedTarget, override, }); output.success( `Alias created: https://${ alias.id }\n${chalk.gray`Now linked to deployment ${alias.deployment}`}` ); } catch (error: ResponseError | any) { if (error.code === 'ALIAS_OVERRIDE_NOT_ALLOWED') { throw new AliasOverrideNotAllowed(trimmedCustomDomain); } throw error; } } /* ----------------------------------------------------------------------------- * createAliasSetCommand * ---------------------------------------------------------------------------*/ type AliasSetCommandArguments = { // Positional arguments customDomain: string; target: string; // Optional arguments force?: boolean; } & GlobalOptions; const createAliasSetCommand = withClient( 'set ', 'Creates an alias that is linked to a deployment or another alias', (yargs) => { yargs .positional('custom-domain', { describe: 'Domain of the alias', type: 'string', }) .positional('target', { describe: 'deployment-id or other alias', type: 'string', }); yargs.options({ force: { type: 'boolean', description: 'Override existing alias', }, }); }, ({ client, customDomain, target, force }) => aliasSetCommand({ client, customDomain, target, override: !!force, }) ); export { createAliasSetCommand }; ================================================ FILE: packages/tf-next/src/commands/alias/alias.ts ================================================ import { GlobalYargs } from '../../types'; import { createAliasListCommand } from './alias-list'; import { createAliasRemoveCommand } from './alias-remove'; import { createAliasSetCommand } from './alias-set'; function createAliasCommand(yargs: GlobalYargs) { yargs.command( 'alias [command]', 'Manage aliases', (yargs: GlobalYargs) => { createAliasListCommand(yargs); createAliasRemoveCommand(yargs); createAliasSetCommand(yargs); yargs.demandCommand(); } ); } export { createAliasCommand }; ================================================ FILE: packages/tf-next/src/commands/alias/index.ts ================================================ export { createAliasCommand } from './alias'; ================================================ FILE: packages/tf-next/src/commands/build/build.ts ================================================ import * as path from 'path'; import * as util from 'util'; import { build } from '@millihq/tf-next-runtime'; import { glob, Lambda, FileFsRef, streamToBuffer, Prerender, download, } from '@vercel/build-utils'; import { Route } from '@vercel/routing-utils'; import archiver from 'archiver'; import findWorkspaceRoot from 'find-yarn-workspace-root'; import * as fs from 'fs-extra'; import tmp from 'tmp'; import { ConfigOutput, GlobalOptions, LogLevel } from '../../types'; import { findEntryPoint } from '../../utils'; import { withClient } from '../../client'; // Config file version (For detecting incompatibility issues in Terraform) // See: https://github.com/dealmore/terraform-aws-next-js/issues/5 const TF_NEXT_VERSION = 1; type Lambdas = Record; type Prerenders = Record; type StaticWebsiteFiles = Record; async function checkoutFiles(basePath: string, targetPath: string) { const files = await glob('**', { cwd: basePath, ignore: [ '**/node_modules/**', '**/.next/**', '**/.next-tf/**', '**/.git/**', ], }); return download(files, targetPath); } interface PrerenderOutputProps { lambda: string; } interface OutputProps { buildId: string; images?: { domains: string[]; sizes: number[]; formats?: string[] | undefined; dangerouslyAllowSVG?: boolean | undefined; contentSecurityPolicy?: string | undefined; }; routes: Route[]; lambdas: Lambdas; prerenders: Record; staticWebsiteFiles: StaticWebsiteFiles; outputDir: string; } function normalizeRoute(input: string) { return input.replace(/\/index$/, '/'); } /** * Creates a zip file from the build output with the following format: * * deployment.zip * ├── lambdas/ * | ├── lambda1.zip * | └── lambda2.zip * ├── static/ * | ├── _next/... * | └── prerendered-site * └── config.json */ async function writeOutput(props: OutputProps) { const lambdaDirPrefix = 'lambdas/'; const staticDirPrefix = 'static/'; const config: ConfigOutput = { lambdas: {}, staticRoutes: [], lambdaRoutes: [], routes: props.routes, buildId: props.buildId, prerenders: props.prerenders, staticFilesArchive: 'static-website-files.zip', version: TF_NEXT_VERSION, images: props.images, }; config.staticRoutes = Object.keys(props.staticWebsiteFiles) .map((fullFilePath) => // On Windows make sure that the `\` in the filepath is replaced with `/` fullFilePath.split(path.sep).join(path.posix.sep) ) .filter( // Remove paths that are not routed from the proxy // - _next/static/ -> Is routed directly by CloudFront (fullFilePath) => !fullFilePath.startsWith('_next/static/') ) // Add leading / to the route .map((fullFilePath) => `/${fullFilePath}`); // Initialize zip archive const outputFile = fs.createWriteStream( path.join(props.outputDir, 'deployment.zip') ); const archive = archiver('zip', { zlib: { level: 5 }, }); // Fill the archive await new Promise(async (resolve, reject) => { archive.pipe(outputFile); outputFile.on('close', function () { console.log(archive.pointer() + ' total bytes'); resolve(); }); archive.on('error', (err) => { reject(err); }); // Pack lambdas for (const [key, lambda] of Object.entries(props.lambdas)) { const zipFilename = `${key}.zip`; const route = `/${key}`; config.lambdaRoutes.push(route); config.lambdas[key] = { handler: lambda.handler, runtime: lambda.runtime as 'nodejs12.x' | 'nodejs14.x' | 'nodejs16.x', filename: zipFilename, route: normalizeRoute(route), }; archive.append(lambda.zipBuffer, { name: lambdaDirPrefix + zipFilename, }); } // Pack static files for (const [key, file] of Object.entries(props.staticWebsiteFiles)) { const buf = await streamToBuffer(file.toStream()); archive.append(buf, { name: `${staticDirPrefix}${key}` }); } // Write config.json archive.append(JSON.stringify(config, null, 2), { name: 'config.json', }); archive.finalize(); }); } /* ----------------------------------------------------------------------------- * Build Command * ---------------------------------------------------------------------------*/ type BuildCommandProps = { skipDownload?: boolean; deleteBuildCache?: boolean; target?: 'AWS'; logLevel: LogLevel; cwd: string; }; async function buildCommand({ skipDownload = false, logLevel, deleteBuildCache = true, cwd, }: BuildCommandProps) { let buildOutput: OutputProps | null = null; const mode = skipDownload ? 'local' : 'download'; // On download create a tmp dir where the files can be downloaded const tmpDir = mode === 'download' ? tmp.dirSync({ unsafeCleanup: deleteBuildCache }) : null; const workspaceRoot = findWorkspaceRoot(cwd); const repoRootPath = workspaceRoot ?? cwd; const relativeWorkPath = path.relative(repoRootPath, cwd); const workPath = mode === 'download' ? path.join(tmpDir!.name, relativeWorkPath) : cwd; const outputDir = path.join(cwd, '.next-tf'); // Ensure that the output dir exists fs.ensureDirSync(outputDir); if (mode === 'download') { console.log('Checking out files...'); await checkoutFiles(repoRootPath, tmpDir!.name); } try { // Entrypoint is the path to the `package.json` or `next.config.js` file // from repoRootPath const entrypoint = findEntryPoint(workPath); const lambdas: Lambdas = {}; const prerenders: Prerenders = {}; const staticWebsiteFiles: StaticWebsiteFiles = {}; const buildResult = await build({ // files normally would contain build cache files: {}, workPath, repoRootPath: mode === 'download' ? tmpDir!.name : repoRootPath, entrypoint, config: { sharedLambdas: true }, meta: { isDev: false, // @ts-ignore skipDownload, }, }); // Get BuildId // TODO: Should be part of buildResult since it's already there const entryDirectory = path.dirname(entrypoint); const entryPath = path.join(workPath, entryDirectory); const buildId = await fs.readFile( path.join(entryPath, '.next', 'BUILD_ID'), 'utf8' ); for (const [key, file] of Object.entries(buildResult.output)) { switch (file.type) { // @ts-ignore case 'Lambda': { lambdas[key] = file as unknown as Lambda; break; } // @ts-ignore case 'Prerender': { prerenders[key] = file as unknown as Prerender; break; } case 'FileFsRef': { staticWebsiteFiles[key] = file as FileFsRef; break; } } } // Build the mapping for prerendered routes const prerenderedOutput: Record = {}; for (const [key, prerender] of Object.entries(prerenders)) { // Find the matching the Lambda route const match = Object.entries(lambdas).find(([, lambda]) => { return lambda === prerender.lambda; }); if (match) { const [lambdaKey] = match; prerenderedOutput[`/${key}`] = { lambda: lambdaKey }; } } buildOutput = { buildId, prerenders: prerenderedOutput, routes: buildResult.routes, lambdas, staticWebsiteFiles, outputDir: outputDir, images: buildResult.images, }; await writeOutput(buildOutput); if (logLevel === 'verbose') { console.log( util.format('Routes:\n%s', JSON.stringify(buildResult.routes, null, 2)) ); } console.log('Build successful!'); } catch (err) { console.log('Build failed:'); console.error(err); // If an error occurs make the task fail process.exitCode = 1; } // Cleanup tmpDir if (tmpDir && deleteBuildCache) { tmpDir.removeCallback(); } return buildOutput; } /* ----------------------------------------------------------------------------- * createBuildCommand * ---------------------------------------------------------------------------*/ type BuildCommandArguments = { skipDownload?: boolean; } & GlobalOptions; const createBuildCommand = withClient( 'build', 'Build a project', (yargs) => { yargs.option('skip-download', { type: 'boolean', description: 'Runs the build in the current working directory.', }); }, async ({ commandCwd, logLevel, skipDownload }) => { await buildCommand({ cwd: commandCwd, logLevel, skipDownload, }); }, { // No API communication needed withApiService: false, } ); export { createBuildCommand }; ================================================ FILE: packages/tf-next/src/commands/build/index.ts ================================================ export { createBuildCommand } from './build'; ================================================ FILE: packages/tf-next/src/commands/deploy/deploy.ts ================================================ import { resolve } from 'path'; import { Readable } from 'stream'; import chalk from 'chalk'; import { writeSync as copy } from 'clipboardy'; import { FormDataEncoder } from 'form-data-encoder'; import { FormData } from 'formdata-node'; import { fileFromPath } from 'formdata-node/file-from-path'; import nodeFetch from 'node-fetch'; import { Client, withClient } from '../../client'; import { GlobalOptions } from '../../types'; import { DeploymentCreateFailed, ResponseError } from '../../utils/errors'; /* ----------------------------------------------------------------------------- * deployCommand * ---------------------------------------------------------------------------*/ type DeployCommandOptions = { /** * Client Service. */ client: Client; /** * Path to the deployment package that should be uploaded. */ deploymentPackagePath?: string; /** * Wether to copy the URL of the finished deployment to the clipboard. */ noClipboard: boolean; /** * The working directory where the command should run. */ cwd: string; }; async function deployCommand({ client, deploymentPackagePath = '.next-tf/deployment.zip', noClipboard, cwd, }: DeployCommandOptions) { const { apiService, output } = client; const internalDeploymentPackagePath = resolve(cwd, deploymentPackagePath); let deploymentId: string; // Upload package output.spinner('Uploading deployment package'); try { const deployment = await apiService.createDeployment(); deploymentId = deployment.id; const uploadForm = new FormData(); Object.entries(deployment.uploadAttributes).forEach(([key, value]) => { uploadForm.append(key, value); }); uploadForm.append( 'file', await fileFromPath(internalDeploymentPackagePath) ); const encoder = new FormDataEncoder(uploadForm); const uploadResponse = await nodeFetch(deployment.uploadUrl, { method: 'POST', headers: encoder.headers, body: Readable.from(encoder), }); if (uploadResponse.status !== 204) { console.log(uploadResponse.status); const parsedResponse = await uploadResponse.text(); throw new Error(parsedResponse); } output.stopSpinner(); output.success('Deployment package uploaded'); // Poll until the CloudFormation stack creation has finished } catch (error: any) { console.debug(error.toString()); console.error('Could not upload deployment package.'); return; } // Deployment output.spinner('Waiting for deployment'); try { const deploymentCreationResult = await apiService.pollForDeploymentStatus( deploymentId, 'FINISHED' ); output.stopSpinner(); output.success('Deployment ready'); // If we have a preview deployment, display the URL if (deploymentCreationResult.deploymentAlias) { const previewUrl = `https://${deploymentCreationResult.deploymentAlias}`; let urlCopiedToClipboard = false; try { if (!noClipboard) { copy(previewUrl); urlCopiedToClipboard = true; } } catch (_ignoredError) {} output.log( `Available at: ${previewUrl}${ urlCopiedToClipboard ? chalk.gray` (copied to clipboard)` : '' } ` ); } else { output.log(`Deployment Id: ${deploymentCreationResult.id}`); } } catch (error: ResponseError | any) { if (error.code === 'DEPLOYMENT_CREATE_FAILED') { throw new DeploymentCreateFailed(); } throw error; } } /* ----------------------------------------------------------------------------- * createDeployCommand * ---------------------------------------------------------------------------*/ type DeployCommandArguments = { noClipboard?: boolean; } & GlobalOptions; const createDeployCommand = withClient( 'deploy', 'Deploy a project', (yargs) => { yargs.option('no-clipboard', { type: 'boolean', description: 'Do not copy the url to clipboard after a successful deployment', }); }, async ({ client, commandCwd, noClipboard }) => { await deployCommand({ client, cwd: commandCwd, noClipboard: !!noClipboard, }); } ); export { createDeployCommand }; ================================================ FILE: packages/tf-next/src/commands/deploy/index.ts ================================================ export { createDeployCommand } from './deploy'; ================================================ FILE: packages/tf-next/src/commands/deployment/deployment-list.ts ================================================ import chalk from 'chalk'; import ms from 'ms'; import table from 'text-table'; import { Client, withClient } from '../../client'; import { strlen } from '../../utils/strlen'; function renderStatus(status: string) { switch (status) { case 'FINISHED': return chalk.green`ready`; case 'INITIALIZED': return chalk.gray`init`; case 'CREATE_FAILED': case 'DESTROY_FAILED': return chalk.red`error`; case 'CREATE_IN_PROGRESS': return chalk.cyan`creating`; case 'DESTROY_IN_PROGRESS': return chalk.cyan`destroying`; } return status; } /* ----------------------------------------------------------------------------- * deploymentListCommand * ---------------------------------------------------------------------------*/ type DeploymentListCommandOptions = { /** * Global client service. */ client: Client; }; /** * Prints the latest 25 deployments to the console. */ async function deploymentListCommand({ client }: DeploymentListCommandOptions) { const { apiService, output } = client; output.spinner('Fetching deployments'); const deployments = await apiService.listDeployments(); output.stopSpinner(); if (deployments.length === 0) { output.log( `No deployments created yet.\n${chalk.gray( 'Create a new deployment by running `tf-next deploy`.' )}` ); return; } const todayMillis = Date.now(); console.log( table( [ // Header ['age ▼', 'deployment-id', 'status'].map((header) => chalk.dim(header)), // Data ...deployments.map((deployment) => [ ms(todayMillis - new Date(deployment.createDate).getTime()), deployment.id, renderStatus(deployment.status), ]), ], { hsep: ' '.repeat(3), stringLength: strlen, } ).replace(/^/gm, ' ') + '\n' ); } /* ----------------------------------------------------------------------------- * createListDeploymentsCommand * ---------------------------------------------------------------------------*/ const createDeploymentListCommand = withClient( 'ls', 'List the latest deployments', async () => {}, async ({ client }) => { await deploymentListCommand({ client, }); } ); export { createDeploymentListCommand }; ================================================ FILE: packages/tf-next/src/commands/deployment/deployment-remove.ts ================================================ import { Client, withClient } from '../../client'; import { GlobalOptions } from '../../types'; import { DeploymentHasLinkedAliases, DeploymentNotExists, ResponseError, } from '../../utils/errors'; /* ----------------------------------------------------------------------------- * deploymentRemoveCommand * ---------------------------------------------------------------------------*/ type DeploymentRemoveCommandOptions = { /** * Global client service. */ client: Client; /** * Deployment to remove. */ deploymentId: string; }; /** * Removes a single deployment. */ async function deploymentRemoveCommand({ client, deploymentId, }: DeploymentRemoveCommandOptions) { const { apiService, output } = client; output.spinner(`Removing deployment ${deploymentId}`); try { const result = await apiService.deleteDeploymentById(deploymentId); if ( result && (result.status === 'DESTROY_REQUESTED' || result.status === 'DESTROY_IN_PROGRESS') ) { try { // Poll until the destruction is complete // When destruction is complete the polling should fail with a // 404 - Deployment not found await apiService.pollForDeploymentStatus(deploymentId, 'FINISHED'); } catch (error: ResponseError | any) { if (error.code !== 'DEPLOYMENT_NOT_FOUND') { throw error; } } } output.success('Deployment successfully removed.'); } catch (error: ResponseError | any) { switch (error.code) { case 'NOT_FOUND': throw new DeploymentNotExists(deploymentId); case 'ALIASES_ASSOCIATED': throw new DeploymentHasLinkedAliases(); default: throw error; } } } /* ----------------------------------------------------------------------------- * createDeploymentRemoveCommand * ---------------------------------------------------------------------------*/ type DeploymentRemoveCommandArguments = { deploymentId: string; } & GlobalOptions; const createDeploymentRemoveCommand = withClient( 'rm ', 'Remove a deployment', (yargs) => { yargs.positional('deployment-id', { describe: 'ID of the deployment that should be removed.', type: 'string', }); }, async ({ client, deploymentId }) => { await deploymentRemoveCommand({ client, deploymentId, }); } ); export { createDeploymentRemoveCommand }; ================================================ FILE: packages/tf-next/src/commands/deployment/deployment.ts ================================================ import { GlobalYargs } from '../../types'; import { createDeploymentListCommand } from './deployment-list'; import { createDeploymentRemoveCommand } from './deployment-remove'; function createDeploymentCommand(yargs: GlobalYargs) { yargs.command( 'deployment [command]', 'Manage deployments', async (yargs: GlobalYargs) => { createDeploymentListCommand(yargs); createDeploymentRemoveCommand(yargs); yargs.demandCommand(); } ); } export { createDeploymentCommand }; ================================================ FILE: packages/tf-next/src/commands/deployment/index.ts ================================================ export { createDeploymentCommand } from './deployment'; ================================================ FILE: packages/tf-next/src/commands/main.ts ================================================ import chalk from 'chalk'; import { Argv } from 'yargs'; import { globalMiddleware, globalMiddlewareOptions, } from '../middleware/global'; import { createAliasCommand } from './alias'; import { createBuildCommand } from './build'; import { createDeployCommand } from './deploy'; import { createDeploymentCommand } from './deployment'; const CLI_TITLE = 'milliVolt CLI'; /** * Creates the `tf-next` command. * Composes all sub commands together. */ function createMainCommand(globalYargs: Argv) { // Register global options and middleware globalYargs .strict() .options(globalMiddlewareOptions) // @ts-ignore - Don't know how to fix this .middleware(globalMiddleware) .demandCommand() // Show version on each command .showVersion((message) => console.log(chalk.gray`${CLI_TITLE} ${message}\n`) ) .hide('verbose'); const yargs = globalYargs as Argv; // Register all subcommands createAliasCommand(yargs); createBuildCommand(yargs); createDeployCommand(yargs); createDeploymentCommand(yargs); return yargs; } export { createMainCommand }; ================================================ FILE: packages/tf-next/src/index.ts ================================================ import globalYargs from 'yargs'; import { Client } from './client'; import { createMainCommand } from './commands/main'; import { CliError, ResponseError } from './utils/errors'; async function runCli() { let errorCaught = false; try { // Run CLI await createMainCommand(globalYargs).parseAsync( process.argv.slice(2), {}, // Intentionally not using the .fail() method here, since fail does not // give us access to the argv argument. // @see {@link https://github.com/yargs/yargs/issues/2133} (error, argv, output) => { const client = argv.client as Client | undefined; // Ensure that the output halts if (client) { client.output.stopSpinner(); } if (error instanceof CliError) { // Client should be initialized at this point if (!client) { throw new Error('Client was not initialized'); } const { output } = client; output.error(error.message); errorCaught = true; process.exitCode = 1; } else if (error instanceof ResponseError) { // Unhandled error response from API const client = argv.client as Client; // Client should be initialized at this point if (!client) { throw new Error('Client was not initialized'); } const { output } = client; if (error.serverMessage) { output.debug(`ServerMessage: ${error.serverMessage}`); } output.error(error.message); errorCaught = true; process.exitCode = 1; } else { if (output) { console.log(output); } else if (error) { console.error(error); } } } ); } catch (potentiallyUncaughtError) { if (!errorCaught) { process.exitCode = 1; console.error(potentiallyUncaughtError); } } } runCli(); ================================================ FILE: packages/tf-next/src/middleware/global.ts ================================================ import { MiddlewareFunction, Options } from 'yargs'; import { GlobalOptions } from '../types'; /** * Global middleware that runs before every command. */ const globalMiddleware: MiddlewareFunction = (argv) => { // Set logLevel if (typeof argv.verbose === 'boolean') { argv.logLevel = argv.verbose ? 'verbose' : 'none'; } // Set cwd argv.commandCwd = process.cwd(); }; /** * Command line options that are added when the globalMiddleware is used. */ const globalMiddlewareOptions: Record = { verbose: { type: 'boolean', description: 'Run with verbose logging.', }, }; export { globalMiddleware, globalMiddlewareOptions }; ================================================ FILE: packages/tf-next/src/types.ts ================================================ import { Route } from '@vercel/routing-utils'; import { Argv } from 'yargs'; export interface ConfigOutput { buildId: string; routes: Route[]; staticRoutes: string[]; lambdaRoutes: string[]; staticFilesArchive: string; lambdas: Record< string, { handler: string; runtime: 'nodejs12.x' | 'nodejs14.x' | 'nodejs16.x'; filename: string; route: string; } >; prerenders: Record< string, { lambda: string; } >; images?: { domains: string[]; sizes: number[]; }; version: number; } export type LogLevel = 'verbose' | 'none'; export type GlobalOptions = { /** * The current working directory where the command is executed from. */ commandCwd: string; /** * LogLevel of the command */ logLevel: LogLevel; }; export type GlobalYargs = Argv; ================================================ FILE: packages/tf-next/src/utils/errors/cli-error.ts ================================================ class CliError extends Error { code: Code; constructor({ code, message }: { code: Code; message: string }) { super(message); this.code = code; } } export { CliError }; ================================================ FILE: packages/tf-next/src/utils/errors/errors.ts ================================================ import { CliError } from './cli-error'; export class MissingApiEndpoint extends CliError<'MISSING_API_ENDPOINT'> { constructor() { super({ code: 'MISSING_API_ENDPOINT', message: 'API endpoint not set. Please use the --endpoint flag to set the endpoint.', }); } } export class CredentialsError extends CliError<'INVALID_CREDENTIALS'> { constructor() { super({ code: 'INVALID_CREDENTIALS', message: 'Could not read the provided AWS credentials.\nPlease make sure that the provided AWS profile exists.', }); } } export class AliasOverrideNotAllowed extends CliError<'ALIAS_OVERRIDE_NOT_ALLOWED'> { constructor(alias: string) { super({ code: 'ALIAS_OVERRIDE_NOT_ALLOWED', message: `Alias ${alias} already exists.\nTo override run the command with --force flag.`, }); } } export class AliasNotExists extends CliError<'ALIAS_NOT_EXISTS'> { constructor(alias: string) { super({ code: 'ALIAS_NOT_EXISTS', message: `Alias with name ${alias} does not exist.`, }); } } export class DeleteDeploymentAlias extends CliError<'ALIAS_DELETE_DEPLOYMENT_ALIAS'> { constructor() { super({ code: 'ALIAS_DELETE_DEPLOYMENT_ALIAS', message: 'Requested alias is a deployment alias.\nCan only be removed when the linked deployment is removed.', }); } } export class DeploymentNotExists extends CliError<'DEPLOYMENT_NOT_EXISTS'> { constructor(deploymentId: string) { super({ code: 'DEPLOYMENT_NOT_EXISTS', message: `Deployment with id ${deploymentId} does not exist.`, }); } } export class DeploymentHasLinkedAliases extends CliError<'DEPLOYMENT_HAS_CUSTOM_ALIASES'> { constructor() { super({ code: 'DEPLOYMENT_HAS_CUSTOM_ALIASES', message: 'Deployment has linked custom alias(es).\nPlease remove all custom aliases before removing a deployment.', }); } } export class DeploymentCreateFailed extends CliError<'DEPLOYMENT_CREATE_FAILED'> { constructor() { super({ code: 'DEPLOYMENT_CREATE_FAILED', message: 'Creation of the deployment failed. Please see the logs in AWS CloudWatch for more information.', }); } } ================================================ FILE: packages/tf-next/src/utils/errors/index.ts ================================================ export * from './errors'; export { CliError } from './cli-error'; export { createResponseError, ResponseError } from './response-error'; ================================================ FILE: packages/tf-next/src/utils/errors/response-error.ts ================================================ import { Response } from 'node-fetch'; type ResponseErrorOptions = { status: number; code: string; message?: string; serverMessage?: string; }; class ResponseError extends Error { status: number; code: string; serverMessage?: string; constructor({ status, code, message, serverMessage }: ResponseErrorOptions) { super(message); this.status = status; this.code = code; this.serverMessage = serverMessage; } } async function createResponseError(res: Response): Promise { let errorBody: Record = {}; // Try to parse the error if (res.headers.get('content-type') === 'application/json') { try { errorBody = await res.json(); } catch (_ignoredError) {} } const status = typeof errorBody.status === 'number' ? errorBody.status : res.status; const code = typeof errorBody.code === 'string' ? errorBody.code : ''; const message = typeof errorBody.message === 'string' ? errorBody.message : ''; // AWS authentication Error // The forbidden message does not follow the schema of error responses from // API since the authorization is handled by API Gateway. if (res.status === 403) { return new ResponseError({ status: 403, code: 'PERMISSION_ERROR', serverMessage: message, message: 'Authentication failed.\nMake sure that the AWS user has the correct permissions.', }); } return new ResponseError({ status, code, message, }); } export { createResponseError, ResponseError }; ================================================ FILE: packages/tf-next/src/utils/index.ts ================================================ import { join } from 'path'; import { existsSync } from 'fs'; // Looks for a `package.json` or `next.config.js` file in cwd and // returns the result as a relative path to the basePath export function findEntryPoint(cwd: string) { for (const entrypoint of ['package.json', 'next.config.js']) { if (existsSync(join(cwd, entrypoint))) { return entrypoint; } } throw new Error(`No package.json or next.config.js could be found in ${cwd}`); } ================================================ FILE: packages/tf-next/src/utils/project-config.ts ================================================ import { existsSync, readFileSync, writeFileSync } from 'fs'; import { join as pathJoin } from 'path'; import Ajv, { Schema } from 'ajv'; const CONFIG_DIR = '.next-tf'; const CONFIG_DIR_PROJECT_FILE = 'project.json'; const projectSchema: Schema = { type: 'object', properties: { apiEndpoint: { type: 'string', minLength: 1, }, }, required: ['apiEndpoint'], }; type ProjectConfig = { apiEndpoint: string; }; function readProjectConfig(cwd: string): ProjectConfig | null { const configPath = pathJoin(cwd, CONFIG_DIR, CONFIG_DIR_PROJECT_FILE); const configExists = existsSync(configPath); if (configExists) { try { const projectFileRaw = readFileSync(configPath, 'utf-8'); const projectFileContent = JSON.parse(projectFileRaw); const ajv = new Ajv(); const validate = ajv.compile(projectSchema); if (validate(projectFileContent)) { return projectFileContent; } return null; } catch (error) { return null; } } return null; } function writeProjectConfig(cwd: string, projectConfig: ProjectConfig) { const configPath = pathJoin(cwd, CONFIG_DIR, CONFIG_DIR_PROJECT_FILE); writeFileSync(configPath, JSON.stringify(projectConfig, null, 2)); } export { readProjectConfig, writeProjectConfig }; ================================================ FILE: packages/tf-next/src/utils/routes.ts ================================================ import { Route } from '@vercel/routing-utils'; /** * Given an array of routes we filter routes out that start with * - `prefix` * - `/prefix` * - `^prefix` * - `^/prefix` */ export function removeRoutesByPrefix(routes: Route[], prefix: string) { // https://stackoverflow.com/a/35478115/831465 const escapedPrefix = prefix.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&'); const matcher = new RegExp(`^\\^?\\/?\\/${escapedPrefix}`); return routes.filter(({ src }) => { if (src && src.match(matcher)) { return false; } return true; }); } ================================================ FILE: packages/tf-next/src/utils/strlen.ts ================================================ /** * Removes all chalk color information from a string and returns it's original * length. */ function strlen(str: string) { return str.replace(/\u001b[^m]*m/g, '').length; } export { strlen }; ================================================ FILE: packages/tf-next/src/utils/trim-protocol.ts ================================================ /** * Trims the protocol from an input string. * E.g. https://example.com becomes example.com * * @see {@link https://stackoverflow.com/a/8206299/831465} */ function trimProtocol(input: string) { return input.replace(/(^\w+:|^)\/\//, ''); } export { trimProtocol }; ================================================ FILE: packages/tf-next/tsconfig.json ================================================ { "extends": "@tsconfig/node14/tsconfig.json", "compilerOptions": { "outDir": "./dist", "removeComments": true }, "include": ["./src/**/*"] } ================================================ FILE: patches/aws-cdk-lib+2.25.0.patch ================================================ diff --git a/node_modules/aws-cdk-lib/package.json b/node_modules/aws-cdk-lib/package.json index ec16a7b..2ea5c03 100644 --- a/node_modules/aws-cdk-lib/package.json +++ b/node_modules/aws-cdk-lib/package.json @@ -385,6 +385,7 @@ "excludeExperimentalModules": true }, "exports": { + "./core/lib/private/synthesis": "./core/lib/private/synthesis.js", ".": "./index.js", "./package.json": "./package.json", "./.jsii": "./.jsii", ================================================ FILE: scripts/publish-release.sh ================================================ #!/bin/bash git describe --exact-match if [[ ! $? -eq 0 ]];then echo "Nothing to publish, exiting.." exit 0; fi if [[ -z "$NPM_TOKEN" ]];then echo "No NPM_TOKEN, exiting.." exit 0; fi echo "registry=https://registry.npmjs.org/" >> ~/.npmrc echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc if [[ $(git describe --exact-match 2> /dev/null || :) =~ "packages-v" ]];then echo "Publishing version" yarn release:ci # Make sure to exit script with code 1 if publish failed if [[ ! $? -eq 0 ]];then exit 1; fi fi ================================================ FILE: test/README.md ================================================ # E2E Tests ## Prerequisites The E2E use a local abstraction of the required AWS infrastructure. It is not a complete E2E test but it covers the critical paths like routing and server side rendering. In order to run the tests you need to have the following tools installed locally: - [Docker](https://docs.docker.com/get-docker/) - [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) ================================================ FILE: test/build-fixtures.js ================================================ /** * Builds the fixtures with terraform-next-build */ const { readdir, stat } = require('fs').promises; const path = require('path'); const { spawn } = require('child_process'); const tmp = require('tmp'); const fs = require('fs-extra'); const { parse: parseJSON } = require('hjson'); const DEBUG = false; const pathToFixtures = path.join(__dirname, 'fixtures'); // Get subdirs from a given path const getDirs = async (_path) => { let dirs = []; for (const file of await readdir(_path)) { if ((await stat(path.join(_path, file))).isDirectory()) { dirs = [...dirs, file]; } } return dirs; }; async function buildFixtures(debug = false) { const fixtures = (await getDirs(pathToFixtures)).map((_path) => path.resolve(pathToFixtures, _path) ); async function build(buildPath, workPath, buildPackage) { const tfNextBuildPath = path.dirname(require.resolve(buildPackage)); const command = 'node'; const args = [tfNextBuildPath, 'build']; // Copy the files first in a tmp dir from where the build starts // This must happen in order to find the correct workspace root // Otherwise the script would falsely assume that the workspace root // of this project would be the correct workspace root const tmpDir = tmp.dirSync({ unsafeCleanup: true, }); const workDir = tmpDir.name; await fs.copy(buildPath, workDir); // If `tf-next` is executed inside a monorepo, the workPath can be changed // to a subdirectory const realWorkDir = path.join(workDir, workPath); return new Promise((resolve, reject) => { const child = spawn(command, args, { cwd: realWorkDir, stdio: debug ? 'inherit' : 'ignore', }); child.on('close', (code) => { if (code !== 0) { reject({ command: `${command} ${args.join(' ')}`, }); return; } resolve(); }); }).then(() => { // Copy .next-tf directory back to the original place return fs.copy( path.join(realWorkDir, '.next-tf'), path.join(buildPath, '.next-tf') ); }); } // Build all fixtures sequentially for (const fixture of fixtures) { console.log(`Building fixture "${fixture}"`); // Read probes.json const probesJson = parseJSON( fs.readFileSync(path.join(fixture, 'probes.json')).toString('utf-8') ); for (const buildItem of probesJson.builds) { const { src, use } = buildItem; const workPath = path.dirname( path.relative(fixture, path.join(fixture, src)) ); await build(fixture, workPath, use); } } } async function main() { await buildFixtures(DEBUG); } main(); ================================================ FILE: test/fixtures/00-shared-lambdas/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: test/fixtures/00-shared-lambdas/package.json ================================================ { "name": "fixture-00", "version": "0.0.0", "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "tf-next": "*" } } ================================================ FILE: test/fixtures/00-shared-lambdas/pages/[teamSlug]/[project]/[id].js ================================================ export default () => 'hello from /[teamSlug]/[project]/[id]'; ================================================ FILE: test/fixtures/00-shared-lambdas/pages/groups/[id].js ================================================ import { useRouter } from 'next/router'; export const getStaticProps = ({ params }) => { return { props: { id: params.id, }, }; }; export const getStaticPaths = () => ({ paths: ['first', 'second'].map((id) => ({ params: { id } })), fallback: true, }); export default ({ id }) => useRouter().isFallback ? `loading...` : `hello from /groups/[id] ${id}`; ================================================ FILE: test/fixtures/00-shared-lambdas/pages/products/[pid]/index.js ================================================ export default function Pdp({ product }) { return (

{product.name}

{product.productId}

); } export async function getStaticProps(context) { const { params } = context; const { pid: productId } = params; const product = { productId, name: `${productId} Product Name`, }; return { props: { product, }, // will be passed to the page component as props }; } export async function getStaticPaths() { return { paths: [ { params: { pid: 'one' } }, // See the "paths" section below { params: { pid: 'five' } }, // See the "paths" section below { params: { pid: 'beam' } }, // See the "paths" section below ], fallback: false, }; } ================================================ FILE: test/fixtures/00-shared-lambdas/pages/teams/invite/[inviteCode].js ================================================ export const getServerSideProps = ({ params }) => { return { props: { code: params.inviteCode, }, }; }; export default ({ code }) => `hello from /teams/invite/[inviteCode] ${code}`; ================================================ FILE: test/fixtures/00-shared-lambdas/probes.json ================================================ { "builds": [{ "src": "package.json", "use": "tf-next" }], "probes": [ { "path": "/teams/invite/hello", "mustContain": "hello from /teams/invite/[inviteCode] hello" }, { "path": "/groups/first", "mustContain": "hello from /groups/[id] first" }, { "path": "/groups/second", "mustContain": "hello from /groups/[id] second" }, // TODO: Check why no fallback is rendered here // // { // "path": "/groups/third", // "mustContain": "loading..." // }, { "path": "/another/invite/hello", "mustContain": "hello from /[teamSlug]/[project]/[id]" }, // From issue #16 { "path": "/products/one", "mustContain": "one Product Name" }, { "path": "/products/five", "mustContain": "five Product Name" }, { "path": "/products/beam", "mustContain": "beam Product Name" } ] } ================================================ FILE: test/fixtures/00-trailing-slash-add/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, trailingSlash: true, }; ================================================ FILE: test/fixtures/00-trailing-slash-add/package.json ================================================ { "dependencies": { "next": "canary", "react": "^16.8.6", "react-dom": "^16.8.6" } } ================================================ FILE: test/fixtures/00-trailing-slash-add/pages/abc/def.js ================================================ export default function Page() { return

nested page

; } export const getServerSideProps = () => { return { props: { hello: 'world', }, }; }; ================================================ FILE: test/fixtures/00-trailing-slash-add/pages/api/hello.js ================================================ export default (req, res) => { res.end('hello from API'); }; ================================================ FILE: test/fixtures/00-trailing-slash-add/pages/blog/[post].js ================================================ export default function Page({ post }) { return

post: {post}

; } export const getServerSideProps = ({ params }) => { return { props: { post: params.post, }, }; }; ================================================ FILE: test/fixtures/00-trailing-slash-add/pages/foo.js ================================================ export default function Page() { return

foo page

; } ================================================ FILE: test/fixtures/00-trailing-slash-add/probes.json ================================================ { "version": 2, "builds": [{ "src": "package.json", "use": "tf-next" }], "probes": [ { "path": "/foo/", "status": 200, "mustContain": "foo page" }, { "fetchOptions": { "redirect": "manual" }, "path": "/foo", "status": 308 // "responseHeaders": { // "refresh": "/url=/foo/$/" // } }, { "path": "/abc/def/", "status": 200, "mustContain": "nested page" }, { "fetchOptions": { "redirect": "manual" }, "path": "/abc/def", "status": 308 // "responseHeaders": { // "refresh": "/url=/abc/def/$/" // } }, { "fetchOptions": { "redirect": "manual" }, "path": "/test.txt/", "status": 308 // "responseHeaders": { // "refresh": "/url=/test\\.txt$/" // } }, { "fetchOptions": { "redirect": "manual" }, "path": "/test.txt", "status": 200, "mustContain": "this is a file" }, { "fetchOptions": { "redirect": "manual" }, "path": "/blog/post-1", "status": 308 // "responseHeaders": { // "refresh": "/url=/blog/post-1/$/" // } }, { "fetchOptions": { "redirect": "manual" }, "path": "/blog/post-1/", "status": 200, "mustContain": "post: post-1" }, { "fetchOptions": { "redirect": "manual" }, "path": "/_next/data/testing-build-id/blog/post-1.json/", "status": 308 // "responseHeaders": { // "refresh": "/url=/_next/data/testing-build-id/blog/post-1.json$/" // } }, { "fetchOptions": { "redirect": "manual" }, "path": "/_next/data/testing-build-id/blog/post-1.json", "status": 200, "mustContain": "\"post-1\"" }, { "fetchOptions": { "redirect": "manual" }, "path": "/api/hello", "status": 308 // "responseHeaders": { // "refresh": "/url=/api/hello/$/" // } }, { "fetchOptions": { "redirect": "manual" }, "path": "/api/hello/", "status": 200, "mustContain": "hello from API" } ] } ================================================ FILE: test/fixtures/00-trailing-slash-add/public/test.txt ================================================ this is a file ================================================ FILE: test/fixtures/01-custom-routing/next.config.js ================================================ module.exports = { async rewrites() { return [ // Rewriting to an external URL { source: '/docs/:slug', destination: 'http://example.com/docs/:slug', }, ]; }, async redirects() { return [ { source: '/redir1', destination: '/redir2', permanent: true, }, { source: '/redir2', destination: '/hello', permanent: false, }, { source: '/redir/:path', destination: '/:path', permanent: false, }, ]; }, }; ================================================ FILE: test/fixtures/01-custom-routing/package.json ================================================ { "name": "fixture-01", "version": "0.0.0", "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "tf-next": "*" } } ================================================ FILE: test/fixtures/01-custom-routing/pages/hello.js ================================================ const Page = () =>
hello!
; export default Page; ================================================ FILE: test/fixtures/01-custom-routing/pages/index.js ================================================ import React from 'react'; // eslint-disable-next-line camelcase export async function getStaticProps() { return { props: { world: 'world', path: process.cwd(), }, }; } export default ({ world, path }) => { const isSSR = path.startsWith('/var/task/'); return ( <>

hello: {world}

isSSR: {JSON.stringify(isSSR)}

); }; ================================================ FILE: test/fixtures/01-custom-routing/pages/param.js ================================================ // Currently we need at least one SSR page for our e2e tests, so this is // a dummy page export async function getServerSideProps(ctx) { counter++; return { props: { params: ctx.params, query: ctx.query, slug: ctx.query && ctx.query.slug, initialPropsCounter: counter, }, }; } const ParamPage = (props) => { return (
{JSON.stringify(props, null, 2)}
); }; export default ParamPage; ================================================ FILE: test/fixtures/01-custom-routing/probes.json ================================================ { "builds": [{ "src": "package.json", "use": "tf-next" }], "probes": [ { "path": "/docs/hello-world", "destPath": "http://example.com/docs/hello-world" }, { "path": "/redir1", "status": 308, "responseHeaders": { "location": "/redir2" } }, { "path": "/redir2", "status": 307, "responseHeaders": { "location": "/hello" } }, { "path": "/redir/to-path", "status": 307, "responseHeaders": { "location": "/to-path" } }, { "path": "/unknown-route-with-trailing-slash/", "status": 308, "statusDescription": "Permanent Redirect", "responseHeaders": { "location": "/unknown-route-with-trailing-slash" } }, { "path": "/hello/", "status": 308, "responseHeaders": { "location": "/hello" } }, { "path": "/", "status": 200, "mustContain": "isSSR: false" } ] } ================================================ FILE: test/fixtures/02-api/next.config.js ================================================ module.exports = { generateBuildId() { return 'testing-build-id'; }, }; ================================================ FILE: test/fixtures/02-api/package.json ================================================ { "name": "fixture-02", "version": "0.0.0", "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "tf-next": "*" } } ================================================ FILE: test/fixtures/02-api/pages/api/actions/[actionId]/info.js ================================================ export default function handler(req, res) { const { actionId } = req.query; res.setHeader('Cache-Control', 'no-cache'); res.end(`actionId: ${actionId}`); } ================================================ FILE: test/fixtures/02-api/pages/api/host.js ================================================ /** * Output the host header of the request */ export default function handler(req, res) { const host = req.headers['host']; res.setHeader('Cache-Control', 'no-cache'); res.end(`host: ${host}`); } ================================================ FILE: test/fixtures/02-api/pages/api/index.js ================================================ export default function handler(req, res) { res.statusCode = 200; res.setHeader('Cache-Control', 'no-cache'); res.setHeader('Set-Cookie', ['cookie-1', 'cookie-2']); res.end(JSON.stringify({ foo: 'bar' })); } ================================================ FILE: test/fixtures/02-api/pages/api/viewer-header.js ================================================ /** * prints the custom header `x-tf-next-abc` */ export default function handler(req, res) { const headerValue = req.headers['x-tf-next-abc']; res.setHeader('Cache-Control', 'no-cache'); res.end(`x-tf-next-abc: ${headerValue}`); } ================================================ FILE: test/fixtures/02-api/pages/test.js ================================================ export default function AboutPage() { return (

About

); } ================================================ FILE: test/fixtures/02-api/probes.json ================================================ { "builds": [{ "src": "package.json", "use": "tf-next" }], "probes": [ { "path": "/api", "status": 200, "responseHeaders": { "Set-Cookie": "cookie-1, cookie-2" } }, { "path": "/api/actions/12345/info", "status": 200, "mustContain": "actionId: 12345" }, // Headers { "path": "/api/host", "requestHeaders": { "host": "example.org" }, "status": 200, "mustContain": "host: example.org" }, { "path": "/api/viewer-header", "requestHeaders": { "x-tf-next-abc": "test123" }, "status": 200, "mustContain": "x-tf-next-abc: test123" } ] } ================================================ FILE: test/fixtures/03-yarn-workspaces/lerna.json ================================================ { "packages": ["packages/*"], "npmClient": "yarn", "version": "0.0.0" } ================================================ FILE: test/fixtures/03-yarn-workspaces/package.json ================================================ { "name": "fixture-03", "version": "0.0.0", "private": true, "workspaces": { "packages": [ "packages/*" ] }, "scripts": { "postinstall": "lerna run build --scope=@jimmy/common" }, "devDependencies": { "lerna": "^3.19.0" } } ================================================ FILE: test/fixtures/03-yarn-workspaces/packages/common/dist/index.d.ts ================================================ export declare const add: (a: number, b: number) => number; ================================================ FILE: test/fixtures/03-yarn-workspaces/packages/common/dist/index.js ================================================ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); exports.add = (a, b) => { return a + b; }; //# sourceMappingURL=index.js.map ================================================ FILE: test/fixtures/03-yarn-workspaces/packages/common/package.json ================================================ { "name": "@jimmy/common", "version": "1.0.64", "types": "dist/index.d.ts", "main": "dist/index.js", "license": "MIT", "scripts": { "watch": "tsc -w", "build": "tsc" }, "devDependencies": { "typescript": "^3.7.3" } } ================================================ FILE: test/fixtures/03-yarn-workspaces/packages/common/src/index.ts ================================================ export const add = (a: number, b: number) => { return a + b; }; ================================================ FILE: test/fixtures/03-yarn-workspaces/packages/common/tsconfig.json ================================================ { "compilerOptions": { "sourceMap": true, "removeComments": true, "strict": true, "noImplicitAny": true, "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitThis": true, "alwaysStrict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "skipLibCheck": true, "composite": true, "rootDir": "src", "outDir": "dist", "target": "es6", "module": "commonjs", "lib": ["dom", "es2017", "esnext.asynciterable", "es2017.object"], "declaration": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "resolveJsonModule": true }, "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.json"], "exclude": ["dist"] } ================================================ FILE: test/fixtures/03-yarn-workspaces/packages/web/next-env.d.ts ================================================ /// /// ================================================ FILE: test/fixtures/03-yarn-workspaces/packages/web/next.config.js ================================================ module.exports = {}; ================================================ FILE: test/fixtures/03-yarn-workspaces/packages/web/package.json ================================================ { "name": "@jimmy/web", "version": "1.0.67", "scripts": { "dev": "next", "build": "next build", "start": "next start" }, "dependencies": { "@jimmy/common": "^1.0.64", "next": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "@types/node": "^12.12.14", "@types/react": "latest", "@types/react-dom": "latest", "typescript": "3.7.3" }, "license": "ISC" } ================================================ FILE: test/fixtures/03-yarn-workspaces/packages/web/pages/_app.tsx ================================================ import App from "next/app"; import React from "react"; class MyApp extends App { static async getInitialProps() { console.log("i am props"); return { q: 5, pageProps: {} }; } render() { const { Component, pageProps } = this.props; return ( <>
yo
); } } export default MyApp; ================================================ FILE: test/fixtures/03-yarn-workspaces/packages/web/pages/index.tsx ================================================ import { add } from "@jimmy/common"; export default () => { return
hello world {add(1, 5)}
; }; ================================================ FILE: test/fixtures/03-yarn-workspaces/packages/web/tsconfig.json ================================================ { "compilerOptions": { "target": "esnext", "module": "esnext", "jsx": "preserve", "lib": ["dom", "es2017"], "baseUrl": ".", "moduleResolution": "node", "strict": true, "allowJs": true, "noEmit": true, "allowSyntheticDefaultImports": true, "esModuleInterop": true, "skipLibCheck": true, "noUnusedLocals": true, "noUnusedParameters": true, "isolatedModules": true, "removeComments": false, "preserveConstEnums": true, "sourceMap": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true }, "exclude": ["dist", ".next", "out", "next.config.js"], "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"] } ================================================ FILE: test/fixtures/03-yarn-workspaces/probes.json ================================================ { "builds": [{ "src": "packages/web/next.config.js", "use": "tf-next" }], // "routes": [{ "src": "/(.*)", "dest": "/packages/web/$1", "continue": true }], "probes": [ { "path": "/", "mustContain": "hello world 6" } ] } ================================================ FILE: test/jest.setup.ts ================================================ import dotenv from 'dotenv'; import * as path from 'path'; export default async function globalSetup() { dotenv.config({ path: path.resolve(process.cwd(), 'test.env') }); } ================================================ FILE: test/routes.test.ts ================================================ import * as fs from 'fs'; import * as path from 'path'; import { URL } from 'url'; import { parse as parseJSON } from 'hjson'; import { ConfigOutput } from 'tf-next/src/types'; import { CloudFrontResultResponse, S3Event } from 'aws-lambda'; import { generateLocalSAM, LocalSAMGenerator, generateAPISAM, APISAMGenerator, generateProxySAM, ProxySAM, normalizeCloudFrontHeaders, ConfigLambda, } from '@millihq/sammy'; import S3 from 'aws-sdk/clients/s3'; import { s3CreateBucket, BucketHandler, getLocalIpAddressFromHost, AttachLoggerResult, attachLogger, } from './utils'; // We use an increased timeout here because in the worst case // AWS SAM needs to download a docker image before the test can run jest.setTimeout(2 * 60 * 1000); // Log files where the output from the SAM CLI should be written to // (Using console.log for this would ) const SAMLogFileLocal = 'sam-local.log'; const SAMLogFileAPI = 'sam-api.log'; const pathToFixtures = path.join(__dirname, 'fixtures'); const pathToProxyPackage = require.resolve( '@millihq/terraform-next-proxy/dist.zip', { paths: [__dirname], } ); const pathToDeployTriggerPackage = require.resolve( '@millihq/terraform-next-deploy-trigger/dist.zip', { paths: [__dirname], } ); const s3Endpoint = `${getLocalIpAddressFromHost()}:9000`; interface ProbeFile { probes: { path: string; mustContain?: string; status?: number; statusDescription?: string; responseHeaders?: Record; requestHeaders?: Record; destPath?: string; }[]; } describe('Test proxy config', () => { let s3: S3; beforeAll(() => { // Initialize the local S3 client s3 = new S3({ endpoint: s3Endpoint, accessKeyId: process.env.MINIO_ACCESS_KEY, secretAccessKey: process.env.MINIO_SECRET_KEY, s3ForcePathStyle: true, signatureVersion: 'v4', sslEnabled: false, }); }); for (const fixture of fs.readdirSync(pathToFixtures)) { describe(`Testing fixture: ${fixture}`, () => { const pathToFixture = path.join(pathToFixtures, fixture); let config: ConfigOutput; let probeFile: ProbeFile; /** * Logger for apiSAM */ let loggerApiSAM: AttachLoggerResult; /** * apiSAM handles request against SSR Lambdas from Next.js * (through API-Gateway) */ let apiSAM: APISAMGenerator; /** * Logger for localSAM */ let loggerlocalSAM: AttachLoggerResult; /** * lambdaSAM handles request against deploy trigger component */ let localSAM: LocalSAMGenerator; /** * proxySAM handles requests against the proxy (Lambda@Edge) */ let proxySAM: ProxySAM; /** * Bucket where the static-files.zip file is uploaded to * (for further processing through deploy trigger) */ let deployBucket: BucketHandler; /** * Target bucket where the static files are extracted to * (from deploy trigger) */ let staticFilesBucket: BucketHandler; beforeAll(async () => { // Get the config config = require(path.join( pathToFixture, '.next-tf/config.json' )) as ConfigOutput; // Get the probes probeFile = parseJSON( fs .readFileSync(path.join(pathToFixture, 'probes.json')) .toString('utf-8') ) as ProbeFile; /* --------------------------------------------------------------------- * Prepare deploy-trigger integration * -------------------------------------------------------------------*/ const staticDeployFunctionName = 'deployTrigger'; staticFilesBucket = await s3CreateBucket(s3); deployBucket = await s3CreateBucket(s3); localSAM = await generateLocalSAM({ lambdas: { [staticDeployFunctionName]: { handler: 'handler.handler', runtime: 'nodejs14.x', filename: pathToDeployTriggerPackage, environment: { TARGET_BUCKET: staticFilesBucket.bucketName, EXPIRE_AFTER_DAYS: '0', // No CF invalidation is created __DEBUG__SKIP_INVALIDATIONS: 'true', __DEBUG__USE_LOCAL_BUCKET: JSON.stringify({ endpoint: s3Endpoint, accessKeyId: process.env.MINIO_ACCESS_KEY, secretAccessKey: process.env.MINIO_SECRET_KEY, s3ForcePathStyle: true, signatureVersion: 'v4', sslEnabled: false, }), }, }, }, cwd: path.join(pathToFixture, '.next-tf'), randomizeFunctionNames: false, }); // Attach logger loggerlocalSAM = attachLogger(SAMLogFileLocal, localSAM); await localSAM.start(); // Upload static files and process it though static-deploy Lambda const staticDeploymentObject = await s3 .upload({ Key: 'static-website-files.zip', Body: fs.createReadStream( path.join(pathToFixture, '.next-tf/', config.staticFilesArchive) ), Bucket: deployBucket.bucketName, }) .promise(); await localSAM.sendEvent( staticDeployFunctionName, 'RequestResponse', JSON.stringify({ Records: [ { s3: { bucket: { name: deployBucket.bucketName, }, object: { key: staticDeploymentObject.Key, }, }, }, ], } as S3Event) ); /* --------------------------------------------------------------------- * Prepare API-Gateway integration * -------------------------------------------------------------------*/ // Generate the Lambdas for API-Gateway integration (SSR) const lambdas: Record = {}; for (const [key, lambda] of Object.entries(config.lambdas)) { lambdas[key] = { ...lambda, route: undefined, routes: { ApiRoot: `${lambda.route}/`, Api: `${lambda.route}/{proxy+}`, }, memorySize: 1024, }; } apiSAM = await generateAPISAM({ lambdas, cwd: path.join(pathToFixture, '.next-tf'), randomizeFunctionNames: true, }); // Attach logger loggerApiSAM = attachLogger(SAMLogFileAPI, apiSAM); await apiSAM.start(); /* --------------------------------------------------------------------- * Prepare Proxy integration (Lambda@Edge) * -------------------------------------------------------------------*/ const proxyConfig = { routes: config.routes, staticRoutes: config.staticRoutes, lambdaRoutes: Object.values(config.lambdas).map( (lambda) => lambda.route ), prerenders: config.prerenders, }; proxySAM = await generateProxySAM({ runtime: 'nodejs14.x', pathToProxyPackage, proxyConfig: JSON.stringify(proxyConfig), onData(data: string) { console.log(data.toString()); }, onError(data: string) { console.log(data.toString()); }, }); await proxySAM.start(); }); afterAll(async () => { // Close loggers loggerlocalSAM.stop(); loggerApiSAM.stop(); // Shutdown SAM await localSAM.stop(); await apiSAM.stop(); await proxySAM.stop(); // Cleanup buckets await deployBucket.destroy(); await staticFilesBucket.destroy(); }); test('Proxy', async () => { for (const probe of probeFile.probes) { const Request = await proxySAM.sendRequestEvent({ uri: probe.path, headers: probe.requestHeaders, }); if ('origin' in Request) { // Request if (Request.origin?.custom) { if (Request.origin.custom.domainName === 'local-apigw.local') { // Request should be served by lambda (SSR) const basePath = Request.origin.custom.path; const { uri, querystring } = Request; // Merge request headers and custom headers from origin const headers = { ...normalizeCloudFrontHeaders(Request.headers), ...normalizeCloudFrontHeaders( Request.origin.custom.customHeaders ), }; const requestPath = `${basePath}${uri}${ querystring !== '' ? `?${querystring}` : '' }`; const lambdaResponse = await apiSAM .sendApiGwRequest(requestPath, { headers, }) .then((res) => { return res.text(); }); if (probe.mustContain) { expect(lambdaResponse).toContain(probe.mustContain); } } else { // Request is an external rewrite if (probe.destPath) { const { custom: customOrigin } = Request.origin; const originRequest = new URL( `${customOrigin.protocol}://${customOrigin.domainName}${ Request.uri }${Request.querystring ? `?${Request.querystring}` : ''}` ); // Check for custom ports if (customOrigin.port !== 80 && customOrigin.port !== 443) { originRequest.port = customOrigin.port.toString(); } expect(originRequest).toEqual(new URL(probe.destPath)); } } } else if (Request.origin?.s3) { // Request should be served by static file system (S3) // Check static routes const { uri } = Request; if (config.staticRoutes.find((route) => route === uri)) { const filePath = uri.replace(/^\//, ''); // Download the file from the S3 const fileContent = await s3 .getObject({ Bucket: staticFilesBucket.bucketName, Key: filePath, }) .promise() .then(({ Body }) => { if (Body) { return Body.toString(); } throw new Error(`File is empty: ${filePath}`); }); if (probe.mustContain) { expect(fileContent).toContain(probe.mustContain); } } else { throw new Error( `Could not resolve ${probe.path} to an existing lambda! (Resolved to: ${uri})` ); } } else { throw new Error( `Path ${probe.path} returned invalid proxy request` ); } } else { // Request-Response const Response = Request as CloudFrontResultResponse; if (probe.status) { expect(Response.status).toBe(probe.status.toString()); } for (const header in probe.responseHeaders) { const lowerHeader = header.toLowerCase(); expect(Response.headers![lowerHeader]).toBeDefined(); expect(Response.headers![lowerHeader]).toContainEqual( expect.objectContaining({ value: probe.responseHeaders[header], }) ); } if (probe.statusDescription) { expect(Response.statusDescription).toBe(probe.statusDescription); } } } }); }); } }); ================================================ FILE: test/tsconfig.json ================================================ { "extends": "../tsconfig.json", "include": ["./**/*"] } ================================================ FILE: test/utils/attach-logger.ts ================================================ import { EventEmitter } from 'events'; import * as fs from 'fs'; type AttachLoggerResult = { /** * Detaches the logger from the emitter and closes the write stream to the * log file */ stop(): void; }; /** * Attaches a logger to an emitter and puts the logs into a file * * @param filePath - Path of the file where the logs should be put in * @param emitter - Emitter from where the logs should taken, supports `data` and `error` events */ function attachLogger( filePath: string, emitter: Emitter ): AttachLoggerResult { const writeStream = fs.createWriteStream(filePath, { // Open file for appending. The file is created if it does not exist. flags: 'a', }); function onData(data: string) { writeStream.write(data.toString()); } function onError(data: string) { writeStream.write(data.toString()); } emitter.on('data', onData); emitter.on('error', onError); return { stop() { emitter.off('data', onData); emitter.off('error', onError); // Close stream to the log file writeStream.close(); }, }; } export { attachLogger }; export type { AttachLoggerResult }; ================================================ FILE: test/utils/host-ip-address.ts ================================================ import { networkInterfaces } from 'os'; /** * Utility to find the local ip address * @see: https://stackoverflow.com/a/8440736/831465 */ function getLocalIpAddressFromHost() { const nets = networkInterfaces(); const results: Record> = {}; // or just '{}', an empty object for (const name of Object.keys(nets)) { for (const net of nets[name]!) { // skip over non-ipv4 and internal (i.e. 127.0.0.1) addresses if (net.family === 'IPv4' && !net.internal) { if (!results[name]) { results[name] = []; } results[name]!.push(net.address); } } } // Get the first address we find for (const [, addresses] of Object.entries(results)) { for (const address of addresses) { return address; } } } export { getLocalIpAddressFromHost }; ================================================ FILE: test/utils/index.ts ================================================ export { attachLogger } from './attach-logger'; export type { AttachLoggerResult } from './attach-logger'; export { getLocalIpAddressFromHost } from './host-ip-address'; export { s3CreateBucket } from './s3-create-bucket'; export type { BucketHandler } from './s3-create-bucket'; ================================================ FILE: test/utils/s3-create-bucket.ts ================================================ import { randomBytes } from 'crypto'; import S3 from 'aws-sdk/clients/s3'; interface BucketHandler { bucketName: string; destroy: () => Promise; } /** * Helper to create a new bucket */ async function s3CreateBucket( s3: S3, bucketName: string = randomBytes(8).toString('hex') ): Promise { await s3 .createBucket({ Bucket: bucketName, }) .promise(); return { bucketName, async destroy() { // Empty bucket and destroy it try { // We can't delete a bucket before emptying its contents const { Contents } = await s3 .listObjects({ Bucket: bucketName }) .promise(); if (Contents && Contents.length > 0) { // TypeGuard function isObjectIdentifier( obj: S3.Object ): obj is S3.ObjectIdentifier { return typeof obj.Key === 'string'; } await s3 .deleteObjects({ Bucket: bucketName, Delete: { Objects: Contents.filter(isObjectIdentifier).map(({ Key }) => ({ Key, })), }, }) .promise(); } await s3.deleteBucket({ Bucket: bucketName }).promise(); return true; } catch (err) { console.log(err); return false; } }, }; } export type { BucketHandler }; export { s3CreateBucket }; ================================================ FILE: test.env ================================================ S3_ENDPOINT=localhost:9000 MINIO_ACCESS_KEY=test MINIO_SECRET_KEY=testtest TEST_DYNAMO_ENDPOINT=http://localhost:8000 ================================================ FILE: tsconfig.json ================================================ { "extends": "@tsconfig/node14/tsconfig.json", "compilerOptions": { "declaration": false, "sourceMap": true }, "exclude": ["node_modules", "examples/**/*"] } ================================================ FILE: turbo.json ================================================ { "baseBranch": "origin/main", "pipeline": { "build": { "outputs": ["dist/**", "dist.zip"], "dependsOn": ["^build"] } } } ================================================ FILE: variables.tf ================================================ #################### # Image Optimization #################### variable "create_image_optimization" { description = "Controls whether resources for image optimization support should be created or not." type = bool default = true } variable "image_optimization_lambda_memory_size" { description = "Amount of memory in MB the worker Lambda Function for image optimization can use. Valid value between 128 MB to 10,240 MB, in 1 MB increments." type = number default = 2048 } ###################### # Multiple deployments ###################### variable "enable_multiple_deployments" { description = "Controls whether it should be possible to run multiple deployments in parallel (requires multiple_deployments_base_domain)." type = bool default = false } variable "multiple_deployments_base_domain" { description = "Default wildcard domain where new deployments should be available. Should be in the form of *.example.com." type = string default = null } ################### # Lambdas (Next.js) ################### variable "lambda_policy_json" { description = "Additional policy document as JSON to attach to the Lambda Function role" type = string default = null } variable "lambda_attach_policy_json" { description = "Whether to deploy additional lambda JSON policies. If false, lambda_policy_json will not be attached to the lambda function. (Necessary since policy strings are only known after apply when using Terraforms data.aws_iam_policy_document)" type = bool default = false } variable "lambda_role_permissions_boundary" { type = string # https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html description = "ARN of IAM policy that scopes aws_iam_role access for the lambda" default = null } variable "lambda_attach_to_vpc" { type = bool description = "Set to true if the Lambda functions should be attached to a VPC. Use this setting if VPC resources should be accessed by the Lambda functions. When setting this to true, use vpc_security_group_ids and vpc_subnet_ids to specify the VPC networking. Note that attaching to a VPC would introduce a delay on to cold starts" default = false } variable "vpc_subnet_ids" { type = list(string) description = "The list of VPC subnet IDs to attach the Lambda functions. lambda_attach_to_vpc should be set to true for these to be applied." default = [] } variable "vpc_security_group_ids" { type = list(string) description = "The list of Security Group IDs to be used by the Lambda functions. lambda_attach_to_vpc should be set to true for these to be applied." default = [] } ######################### # Cloudfront Distribution ######################### variable "cloudfront_create_distribution" { description = "Controls whether the main CloudFront distribution should be created." type = bool default = true } variable "cloudfront_price_class" { description = "Price class for the CloudFront distributions (main & proxy config). One of PriceClass_All, PriceClass_200, PriceClass_100." type = string default = "PriceClass_100" } variable "cloudfront_aliases" { description = "Aliases for custom_domain" type = list(string) default = [] } variable "cloudfront_acm_certificate_arn" { description = "ACM certificate arn for custom_domain" type = string default = null } variable "cloudfront_minimum_protocol_version" { description = "The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections. One of SSLv3, TLSv1, TLSv1_2016, TLSv1.1_2016, TLSv1.2_2018 or TLSv1.2_2019." type = string default = "TLSv1" } variable "cloudfront_origin_request_policy" { description = "Id of a custom request policy that overrides the default policy (AllViewer). Can be custom or managed." type = string default = null } variable "cloudfront_response_headers_policy" { description = "Id of a response headers policy. Can be custom or managed. Default is empty." type = string default = null } variable "cloudfront_cache_key_headers" { description = "Header keys that should be used to calculate the cache key in CloudFront." type = list(string) default = ["Authorization"] } variable "cloudfront_external_id" { description = "When using an external CloudFront distribution provide its id." type = string default = null } variable "cloudfront_external_arn" { description = "When using an external CloudFront distribution provide its arn." type = string default = null } variable "cloudfront_webacl_id" { description = "An optional webacl2 arn or webacl id to associate with the cloudfront distribution" type = string default = null } ########## # Labeling ########## variable "deployment_name" { description = "Identifier for the deployment group (only lowercase alphanumeric characters and hyphens are allowed)." type = string default = "tf-next" validation { condition = can(regex("[a-z0-9-]+", var.deployment_name)) error_message = "Only lowercase alphanumeric characters and hyphens allowed." } } variable "tags" { description = "Tag metadata to label AWS resources that support tags." type = map(string) default = {} } variable "tags_s3_bucket" { description = "Tag metadata to label AWS S3 buckets. Overrides tags with the same name in input variable tags." type = map(string) default = {} } ################ # Debug Settings ################ variable "debug_use_local_packages" { description = "Use locally built packages rather than download them from npm." type = bool default = false } ================================================ FILE: versions.tf ================================================ terraform { required_version = ">= 0.15" required_providers { aws = { source = "hashicorp/aws" version = ">= 4.8" configuration_aliases = [aws.global_region] } } }