From 4a1756843960a8591d2abb8fef2d709971aadff0 Mon Sep 17 00:00:00 2001 From: Cameron Pettit <71421099+cameronpettit@users.noreply.github.com> Date: Fri, 5 Jul 2024 10:37:11 -0700 Subject: [PATCH] Revert "BRS-291: Convert A&R to use SAM (#344)" (#345) This reverts commit 2f8f220c5f5d20e9a2895bf32503279522981550. Big oops from me, sorry team (luckily Dave's code is totally functional) --- .github/workflows/deploy_dev.yaml | 107 +- .github/workflows/deploy_prod.yaml | 116 +- .github/workflows/deploy_test.yaml | 127 +- .github/workflows/on-pr.yaml | 44 +- .gitignore | 3 - README.md | 188 +- .../__tests__ => __tests__}/activity.test.js | 219 +- __tests__/constants.test.js | 114 + .../dynamoUtil.test.js | 16 +- .../export-variance.test.js | 100 +- .../__tests__ => __tests__}/export.test.js | 91 +- .../fiscalYearEnd.test.js | 96 +- __tests__/formulaUtils.test.js | 46 + __tests__/global/data.json | 266 ++ __tests__/global/settings.js | 13 + .../__tests__ => __tests__/global}/setup.js | 3 +- .../global}/teardown.js | 3 +- __tests__/keycloakUtil.test.js | 72 + .../name-update.test.js | 4 +- .../park/__tests__ => __tests__}/park.test.js | 193 +- .../__tests__ => __tests__}/subArea.test.js | 191 +- __tests__/subAreaUtils.test.js | 91 + .../__tests__ => __tests__}/variance.test.js | 146 +- arSam/.gitignore | 208 -- arSam/__tests__/mock_data.json | 266 -- arSam/__tests__/settings.js | 13 - arSam/handlers/activity/DELETE/index.js | 7 - arSam/handlers/activity/POST/package.json | 9 - arSam/handlers/authorizer/index.js | 97 - arSam/handlers/cloudwatchAlarm/package.json | 9 - arSam/handlers/events/event.json | 62 - arSam/handlers/export-variance/GET/index.js | 185 - .../handlers/export-variance/GET/package.json | 12 - .../export-variance/invokable/package.json | 9 - arSam/handlers/export/GET/package.json | 11 - arSam/handlers/export/invokable/package.json | 9 - .../handlers/fiscalYearEnd/POST/package.json | 9 - arSam/handlers/nameUpdate/package.json | 10 - arSam/handlers/subArea/DELETE/package.json | 9 - arSam/layers/__tests__/constantsLayer.test.js | 115 - arSam/layers/__tests__/formulasLayer.test.js | 47 - arSam/layers/__tests__/keycloakLayer.test.js | 73 - arSam/layers/__tests__/subAreaLayer.test.js | 92 - arSam/layers/baseLayer/Makefile | 11 - arSam/layers/baseLayer/nodejs/package.json | 11 - arSam/layers/constantsLayer/Makefile | 11 - .../layers/constantsLayer/nodejs/package.json | 6 - arSam/layers/formulaLayer/Makefile | 11 - arSam/layers/formulaLayer/nodejs/package.json | 9 - arSam/layers/functionsLayer/Makefile | 11 - .../layers/functionsLayer/nodejs/package.json | 10 - arSam/layers/keycloakLayer/Makefile | 11 - .../layers/keycloakLayer/nodejs/package.json | 9 - arSam/layers/permissionLayer/Makefile | 11 - .../permissionLayer/nodejs/package.json | 10 - arSam/layers/subAreaLayer/Makefile | 11 - arSam/layers/subAreaLayer/nodejs/package.json | 9 - arSam/layers/varianceLayer/Makefile | 11 - .../layers/varianceLayer/nodejs/package.json | 6 - arSam/package.json | 56 - arSam/samconfig.toml | 34 - arSam/template.yaml | 972 ------ lambda/activity/DELETE/index.js | 5 + .../handlers => lambda}/activity/GET/index.js | 18 +- .../activity/POST/index.js | 20 +- .../handlers => lambda}/activity/PUT/index.js | 2 - .../cloudwatchAlarm/index.js | 4 +- .../constantsLayer.js => lambda/constants.js | 0 .../baseLayer.js => lambda/dynamoUtil.js | 73 +- lambda/export-variance/GET/index.js | 183 + .../export-variance/invokable/index.js | 27 +- .../handlers => lambda}/export/GET/index.js | 41 +- .../export/invokable/index.js | 15 +- .../fiscalYearEnd/GET/index.js | 10 +- .../fiscalYearEnd/POST/index.js | 13 +- .../formulaLayer.js => lambda/formulaUtils.js | 4 +- .../functionsLayer.js => lambda/functions.js | 2 +- .../keycloakUtil.js | 2 +- lambda/logger.js | 21 + .../handlers => lambda}/nameUpdate/index.js | 3 +- {arSam/handlers => lambda}/park/GET/index.js | 22 +- {arSam/handlers => lambda}/park/POST/index.js | 13 +- {arSam/handlers => lambda}/park/PUT/index.js | 2 - .../permissionUtil.js | 6 +- .../handlers => lambda}/readConfig/index.js | 11 +- lambda/responseUtil.js | 13 + .../subArea/DELETE/index.js | 8 +- .../handlers => lambda}/subArea/GET/index.js | 3 - .../handlers => lambda}/subArea/POST/index.js | 33 +- .../handlers => lambda}/subArea/PUT/index.js | 3 - .../subAreaLayer.js => lambda/subAreaUtils.js | 2 +- .../handlers => lambda}/variance/GET/index.js | 23 +- .../variance/POST/index.js | 3 - .../handlers => lambda}/variance/PUT/index.js | 12 +- .../varianceUtils.js | 4 +- migrations-data/addFromCSV.js | 4 +- migrations-data/checkAllRecordsForORC.js | 2 +- .../legacy-data/2017-2019/migrate.js | 2 +- .../legacy-data/legacy-data-functions.js | 2 +- migrations-data/legacy-data/purgeLegacy.js | 4 +- migrations-data/sectionUpdate2.js | 4 +- migrations-data/updateORC3883.js | 4 +- migrations-data/updateSubareaName.js | 4 +- .../20220621153946-parkAndSubAreaRoles.js | 2 +- migrations/20220825185430-newEntries-1.js | 2 +- migrations/20220922154247-addBundle.js | 2 +- migrations/20221102211341-newEntries-2.js | 2 +- migrations/20230803145347-rolesTypeFix.js | 2 +- migrations/20230815153845-seedVariance.js | 2 +- migrations/20230816150824-sectionUpdates.js | 4 +- .../20240103113100-fixMalformedDates.js | 4 +- migrations/20240125103944-fixSubAreaRoles.js | 2 +- migrations/20240126140700-fixParkRoles.js | 2 +- .../20240308143600-subAreaNameUpdates.js | 4 +- .../20240313090100-modernizeVarianceObjs.js | 4 +- package.json | 47 + postman/A&R - DEV.postman_environment.json | 2 +- postman/A&R - LOCAL.postman_environment.json | 4 +- postman/A&R - TEST.postman_environment.json | 2 +- ...ndance and Revenue.postman_collection.json | 66 +- terraform/common.auto.tfvars | 1 + terraform/dev/terragrunt.hcl | 7 + terraform/prod/terragrunt.hcl | 7 + terraform/src/activity.tf | 377 +++ terraform/src/cloudfront.tf | 66 + terraform/src/cloudwatchAlarms.tf | 138 + terraform/src/db-config.tf | 32 + terraform/src/db.tf | 72 + terraform/src/export.tf | 150 + terraform/src/fiscalYearEnd.tf | 200 ++ terraform/src/main.tf | 172 + .../modules/cors-enabled-api-resource/main.tf | 63 + .../cors-enabled-api-resource/outputs.tf | 7 + .../cors-enabled-api-resource/variables.tf | 26 + terraform/src/nameUpdate.tf | 50 + terraform/src/park.tf | 174 + terraform/src/roles.tf | 290 ++ terraform/src/settings.tf | 104 + terraform/src/subArea.tf | 249 ++ terraform/src/variables.tf | 64 + terraform/src/variance-export.tf | 147 + terraform/src/variance.tf | 192 ++ terraform/terragrunt.hcl | 42 + terraform/test/terragrunt.hcl | 7 + terraform/tools/terragrunt.hcl | 7 + tools/README.md | 8 +- tools/convertParksSheet.js | 4 +- tools/dynamoMigrator.py | 2 +- tools/dynamoRestore.js | 2 +- arSam/yarn.lock => yarn.lock | 3009 +++++++---------- 150 files changed, 5833 insertions(+), 5337 deletions(-) rename {arSam/handlers/activity/__tests__ => __tests__}/activity.test.js (74%) create mode 100644 __tests__/constants.test.js rename arSam/layers/__tests__/dynamoLayer.test.js => __tests__/dynamoUtil.test.js (88%) rename arSam/handlers/export-variance/__tests__/export-variance.tests.js => __tests__/export-variance.test.js (66%) rename {arSam/handlers/export/__tests__ => __tests__}/export.test.js (65%) rename {arSam/handlers/fiscalYearEnd/__tests__ => __tests__}/fiscalYearEnd.test.js (62%) create mode 100644 __tests__/formulaUtils.test.js create mode 100644 __tests__/global/data.json create mode 100644 __tests__/global/settings.js rename {arSam/__tests__ => __tests__/global}/setup.js (97%) rename {arSam/__tests__ => __tests__/global}/teardown.js (88%) create mode 100644 __tests__/keycloakUtil.test.js rename {arSam/handlers/nameUpdate/__tests__ => __tests__}/name-update.test.js (97%) rename {arSam/handlers/park/__tests__ => __tests__}/park.test.js (68%) rename {arSam/handlers/subArea/__tests__ => __tests__}/subArea.test.js (79%) create mode 100644 __tests__/subAreaUtils.test.js rename {arSam/handlers/variance/__tests__ => __tests__}/variance.test.js (74%) delete mode 100644 arSam/.gitignore delete mode 100644 arSam/__tests__/mock_data.json delete mode 100644 arSam/__tests__/settings.js delete mode 100644 arSam/handlers/activity/DELETE/index.js delete mode 100644 arSam/handlers/activity/POST/package.json delete mode 100644 arSam/handlers/authorizer/index.js delete mode 100644 arSam/handlers/cloudwatchAlarm/package.json delete mode 100644 arSam/handlers/events/event.json delete mode 100644 arSam/handlers/export-variance/GET/index.js delete mode 100644 arSam/handlers/export-variance/GET/package.json delete mode 100644 arSam/handlers/export-variance/invokable/package.json delete mode 100644 arSam/handlers/export/GET/package.json delete mode 100644 arSam/handlers/export/invokable/package.json delete mode 100644 arSam/handlers/fiscalYearEnd/POST/package.json delete mode 100644 arSam/handlers/nameUpdate/package.json delete mode 100644 arSam/handlers/subArea/DELETE/package.json delete mode 100644 arSam/layers/__tests__/constantsLayer.test.js delete mode 100644 arSam/layers/__tests__/formulasLayer.test.js delete mode 100644 arSam/layers/__tests__/keycloakLayer.test.js delete mode 100644 arSam/layers/__tests__/subAreaLayer.test.js delete mode 100644 arSam/layers/baseLayer/Makefile delete mode 100644 arSam/layers/baseLayer/nodejs/package.json delete mode 100644 arSam/layers/constantsLayer/Makefile delete mode 100644 arSam/layers/constantsLayer/nodejs/package.json delete mode 100644 arSam/layers/formulaLayer/Makefile delete mode 100644 arSam/layers/formulaLayer/nodejs/package.json delete mode 100644 arSam/layers/functionsLayer/Makefile delete mode 100644 arSam/layers/functionsLayer/nodejs/package.json delete mode 100644 arSam/layers/keycloakLayer/Makefile delete mode 100644 arSam/layers/keycloakLayer/nodejs/package.json delete mode 100644 arSam/layers/permissionLayer/Makefile delete mode 100644 arSam/layers/permissionLayer/nodejs/package.json delete mode 100644 arSam/layers/subAreaLayer/Makefile delete mode 100644 arSam/layers/subAreaLayer/nodejs/package.json delete mode 100644 arSam/layers/varianceLayer/Makefile delete mode 100644 arSam/layers/varianceLayer/nodejs/package.json delete mode 100644 arSam/package.json delete mode 100644 arSam/samconfig.toml delete mode 100644 arSam/template.yaml create mode 100644 lambda/activity/DELETE/index.js rename {arSam/handlers => lambda}/activity/GET/index.js (87%) rename {arSam/handlers => lambda}/activity/POST/index.js (95%) rename {arSam/handlers => lambda}/activity/PUT/index.js (77%) rename {arSam/handlers => lambda}/cloudwatchAlarm/index.js (95%) rename arSam/layers/constantsLayer/constantsLayer.js => lambda/constants.js (100%) rename arSam/layers/baseLayer/baseLayer.js => lambda/dynamoUtil.js (79%) create mode 100644 lambda/export-variance/GET/index.js rename {arSam/handlers => lambda}/export-variance/invokable/index.js (94%) rename {arSam/handlers => lambda}/export/GET/index.js (81%) rename {arSam/handlers => lambda}/export/invokable/index.js (98%) rename {arSam/handlers => lambda}/fiscalYearEnd/GET/index.js (86%) rename {arSam/handlers => lambda}/fiscalYearEnd/POST/index.js (89%) rename arSam/layers/formulaLayer/formulaLayer.js => lambda/formulaUtils.js (98%) rename arSam/layers/functionsLayer/functionsLayer.js => lambda/functions.js (94%) rename arSam/layers/keycloakLayer/keycloakLayer.js => lambda/keycloakUtil.js (98%) create mode 100644 lambda/logger.js rename {arSam/handlers => lambda}/nameUpdate/index.js (98%) rename {arSam/handlers => lambda}/park/GET/index.js (91%) rename {arSam/handlers => lambda}/park/POST/index.js (76%) rename {arSam/handlers => lambda}/park/PUT/index.js (77%) rename arSam/layers/permissionLayer/permissionLayer.js => lambda/permissionUtil.js (98%) rename {arSam/handlers => lambda}/readConfig/index.js (74%) create mode 100644 lambda/responseUtil.js rename {arSam/handlers => lambda}/subArea/DELETE/index.js (96%) rename {arSam/handlers => lambda}/subArea/GET/index.js (81%) rename {arSam/handlers => lambda}/subArea/POST/index.js (76%) rename {arSam/handlers => lambda}/subArea/PUT/index.js (76%) rename arSam/layers/subAreaLayer/subAreaLayer.js => lambda/subAreaUtils.js (98%) rename {arSam/handlers => lambda}/variance/GET/index.js (89%) rename {arSam/handlers => lambda}/variance/POST/index.js (76%) rename {arSam/handlers => lambda}/variance/PUT/index.js (87%) rename arSam/layers/varianceLayer/varianceLayer.js => lambda/varianceUtils.js (94%) create mode 100644 package.json create mode 100644 terraform/common.auto.tfvars create mode 100644 terraform/dev/terragrunt.hcl create mode 100644 terraform/prod/terragrunt.hcl create mode 100644 terraform/src/activity.tf create mode 100644 terraform/src/cloudfront.tf create mode 100644 terraform/src/cloudwatchAlarms.tf create mode 100644 terraform/src/db-config.tf create mode 100644 terraform/src/db.tf create mode 100644 terraform/src/export.tf create mode 100644 terraform/src/fiscalYearEnd.tf create mode 100644 terraform/src/main.tf create mode 100644 terraform/src/modules/cors-enabled-api-resource/main.tf create mode 100644 terraform/src/modules/cors-enabled-api-resource/outputs.tf create mode 100644 terraform/src/modules/cors-enabled-api-resource/variables.tf create mode 100644 terraform/src/nameUpdate.tf create mode 100644 terraform/src/park.tf create mode 100644 terraform/src/roles.tf create mode 100644 terraform/src/settings.tf create mode 100644 terraform/src/subArea.tf create mode 100644 terraform/src/variables.tf create mode 100644 terraform/src/variance-export.tf create mode 100644 terraform/src/variance.tf create mode 100644 terraform/terragrunt.hcl create mode 100644 terraform/test/terragrunt.hcl create mode 100644 terraform/tools/terragrunt.hcl rename arSam/yarn.lock => yarn.lock (79%) diff --git a/.github/workflows/deploy_dev.yaml b/.github/workflows/deploy_dev.yaml index 8f529bc..07f8d30 100644 --- a/.github/workflows/deploy_dev.yaml +++ b/.github/workflows/deploy_dev.yaml @@ -1,12 +1,18 @@ name: Deploy Dev -run-name: Deploying ${{ github.ref_name }} to dev - on: push: branches: [main] workflow_dispatch: +env: + TF_VERSION: 0.14.7 + TG_VERSION: 0.37.1 + TG_SRC_PATH: terraform + TFC_WORKSPACE: dev + TARGET_ENV: dev + GIT_BRANCH: main + permissions: id-token: write contents: read @@ -20,66 +26,53 @@ jobs: matrix: node-version: [18.x] - defaults: - run: - working-directory: "./" steps: - # Checkout GitHub Repo - - name: Checkout repo + - name: Checkout uses: actions/checkout@v3 - - shell: bash - env: - WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} - run: | - curl -X POST -H 'Content-Type: application/json' $WEBHOOK_URL --data '{"text":" A&R API deploy Dev"}' + ### Install if no cache exists ### + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "yarn" + - run: yarn install --silent --frozen-lockfile - # Setup AWS SAM - - name: Setup AWS SAM - uses: aws-actions/setup-sam@v2 + ### Build if no cache exists ### + - name: Cache Build + id: cache-build + uses: actions/cache@v3 with: - use-installer: true + path: | + **/terraform/src/artifacts + key: ${{ github.sha }}-artifacts + - name: Run Build + if: steps.cache-build.outputs.cache-hit != 'true' + run: yarn build-ci - # Assume AWS IAM Role - - name: Get AWS credentials - uses: aws-actions/configure-aws-credentials@v2 + ### Get environment variables from AWS Parameter Store ### + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v3 with: - role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} - role-session-name: GitHub_to_AWS_via_FederatedOIDC - aws-region: ${{ vars.AWS_REGION }} + aws-region: ${{ secrets.AWS_REGION }} + role-to-assume: ${{ vars.AWS_ROLE_ARN_TO_USE }} + role-duration-seconds: 900 + role-session-name: parks-ar-api-sandbox-dev-action + role-skip-session-tagging: true - # SAM Build - - name: Cache SAM Build - id: cache-sam-build - uses: actions/cache@v3 - with: - path: | - **/.aws-sam - key: ${{ github.sha }}-ar-api-sam-cache - - name: Run sam build - if: steps.cache-sam-build.outputs.cache-hit != 'true' - run: | - sam build --cached - - # Prevent prompts and failure when the stack is unchanged - - name: SAM deploy - env: - STAGE: ${{ vars.AR_API_STAGE }} - STACK_NAME: ${{ vars.AR_API_STACK_NAME }} - ACCOUNT_ID: ${{ vars.ACCOUNT_ID }} - AWS_ACCOUNT_LIST: ${{ vars.AWS_ACCOUNT_LIST }} - SSO_ISSUER: ${{ vars.SSO_ISSUER }} - SSO_JWKSURI: ${{ vars.SSO_JWKSURI }} - SSO_CLIENT_ID: ${{ secrets.SSO_CLIENT_ID }} - SSO_ORIGIN: ${{ vars.SSO_ORIGIN }} - S3_BUCKET_DATA: ${{ vars.S3_BUCKET_DATA }} - DATA_REGISTER_NAME_ENDPOINT: ${{ secrets.DATA_REGISTER_NAME_ENDPOINT }} - DATA_REGISTER_NAME_API_KEY: ${{ secrets.DATA_REGISTER_NAME_API_KEY }} - run: | - sam deploy --stack-name $STACK_NAME --no-confirm-changeset --no-fail-on-empty-changeset --parameter-overrides "AccountId=$ACCOUNT_ID" "Stage=$STAGE" "SSOIssuerUrl=$SSO_ISSUER" "SSOJWKSUri=$SSO_JWKSURI" "SSOClientId=$SSO_CLIENT_ID" "SSOOrigin=$SSO_ORIGIN" "AWSAccountList=$AWS_ACCOUNT_LIST" "S3BucketData=$S3_BUCKET_DATA" "DataRegisterNameEndpoint=$DATA_REGISTER_NAME_ENDPOINT" "DataRegisterNameApiKey=$DATA_REGISTER_NAME_API_KEY" - - - shell: bash - env: - WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} - run: | - curl -X POST -H 'Content-Type: application/json' $WEBHOOK_URL --data '{"text":" A&R API - Deploy Dev Complete"}' + ### Run Terragrunt ### + - name: Setup terraform + uses: hashicorp/setup-terraform@v2 + with: + terraform_version: ${{ env.TF_VERSION }} + + - name: Setup Terragrunt + uses: autero1/action-terragrunt@v1.3.0 + with: + terragrunt_version: ${{ env.TG_VERSION }} + + - name: Terragrunt Apply + working-directory: ${{ env.TG_SRC_PATH }}/${{ env.TARGET_ENV }} + env: + aws_region: ${{ secrets.AWS_REGION }} + run: terragrunt apply -auto-approve --terragrunt-non-interactive -var target_aws_account_id=${{ vars.ACCOUNT_ID }} -var target_env=dev diff --git a/.github/workflows/deploy_prod.yaml b/.github/workflows/deploy_prod.yaml index db030ea..6a30127 100644 --- a/.github/workflows/deploy_prod.yaml +++ b/.github/workflows/deploy_prod.yaml @@ -1,96 +1,100 @@ name: Deploy Prod -run-name: Deploying ${{ github.ref_name }} to prod +run-name: Deploying ${{ github.event.inputs.releaseTag }} to prod on: workflow_dispatch: inputs: releaseTag: - description: "Tag of version to be promoted to prod" + description: 'Tag of version to be promoted to prod' required: true +env: + TF_VERSION: 0.14.7 + TG_VERSION: 0.37.1 + TG_SRC_PATH: terraform + TFC_WORKSPACE: prod + TARGET_ENV: prod + GIT_BRANCH: main + permissions: id-token: write contents: read jobs: ci: - name: Build and Deploy + name: Push to AWS Lambda runs-on: ubuntu-latest environment: prod strategy: matrix: node-version: [18.x] - defaults: - run: - working-directory: "./" steps: - # Checkout GitHub Repo - - name: Checkout repo + - name: Attempt to checkout tag uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.releaseTag }} - - shell: bash - env: - WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} - run: | - curl -X POST -H 'Content-Type: application/json' $WEBHOOK_URL --data '{"text":"A&R API API Prod"}' - - # Tag not found - name: Tag not found if: ${{ failure() }} run: | echo "::error::Git Tag not found, please double check input" exit 1 - # Setup AWS SAM - - name: Setup AWS SAM - uses: aws-actions/setup-sam@v2 + ### Install if no cache exists ### + - name: Setup node + uses: actions/setup-node@v3 with: - use-installer: true + node-version: ${{ matrix.node-version }} + cache: 'yarn' + - run: yarn install --silent --frozen-lockfile - # Assume AWS IAM Role - - name: Get AWS credentials - uses: aws-actions/configure-aws-credentials@v2 + ### Build if no cache exists ### + - name: Cache Build + id: cache-build + uses: actions/cache@v3 with: - role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} - role-session-name: GitHub_to_AWS_via_FederatedOIDC - aws-region: ${{ vars.AWS_REGION }} + path: | + **/terraform/src/artifacts + key: ${{ github.sha }}-artifacts + - name: Run Build + if: steps.cache-build.outputs.cache-hit != 'true' + run: yarn build-ci - # SAM Build - - name: Cache SAM Build - id: cache-sam-build - uses: actions/cache@v3 - with: - path: | - **/.aws-sam - key: ${{ github.sha }}-ar-api-sam-cache - - name: Run sam build - if: steps.cache-sam-build.outputs.cache-hit != 'true' - run: | - sam build --cached + ### Get environment variables from AWS Parameter Store ### + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v3 + with: + aws-region: ${{ secrets.AWS_REGION }} + role-to-assume: ${{ vars.AWS_ROLE_ARN_TO_USE }} + role-duration-seconds: 900 + role-session-name: parks-ar-api-sandbox-gh-action + role-skip-session-tagging: true - # Prevent prompts and failure when the stack is unchanged - - name: SAM deploy - env: - STAGE: ${{ vars.AR_API_STAGE }} - STACK_NAME: ${{ vars.AR_API_STACK_NAME }} - ACCOUNT_ID: ${{ vars.ACCOUNT_ID }} - AWS_ACCOUNT_LIST: ${{ vars.AWS_ACCOUNT_LIST }} - SSO_ISSUER: ${{ vars.SSO_ISSUER }} - SSO_JWKSURI: ${{ vars.SSO_JWKSURI }} - SSO_CLIENT_ID: ${{ secrets.SSO_CLIENT_ID }} - SSO_ORIGIN: ${{ vars.SSO_ORIGIN }} - S3_BUCKET_DATA: ${{ vars.S3_BUCKET_DATA }} - DATA_REGISTER_NAME_ENDPOINT: ${{ secrets.DATA_REGISTER_NAME_ENDPOINT }} - DATA_REGISTER_NAME_API_KEY: ${{ secrets.DATA_REGISTER_NAME_API_KEY }} - run: | - sam deploy --stack-name $STACK_NAME --no-confirm-changeset --no-fail-on-empty-changeset --parameter-overrides "AccountId=$ACCOUNT_ID" "Stage=$STAGE" "SSOIssuerUrl=$SSO_ISSUER" "SSOJWKSUri=$SSO_JWKSURI" "SSOClientId=$SSO_CLIENT_ID" "SSOOrigin=$SSO_ORIGIN" "AWSAccountList=$AWS_ACCOUNT_LIST" "S3BucketData=$S3_BUCKET_DATA" "DataRegisterNameEndpoint=$DATA_REGISTER_NAME_ENDPOINT" "DataRegisterNameApiKey=$DATA_REGISTER_NAME_API_KEY" + ### Run Terragrunt ### + - name: Setup terraform + uses: hashicorp/setup-terraform@v2 + with: + terraform_version: ${{ env.TF_VERSION }} + + - name: Setup Terragrunt + uses: autero1/action-terragrunt@v1.3.0 + with: + terragrunt_version: ${{ env.TG_VERSION }} - - shell: bash + - name: Terragrunt Apply + working-directory: ${{ env.TG_SRC_PATH }}/${{ env.TFC_WORKSPACE }} env: - WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} + aws_region: ${{ secrets.AWS_REGION }} + run: terragrunt apply -auto-approve --terragrunt-non-interactive -var target_aws_account_id=${{ vars.ACCOUNT_ID }} -var target_env=prod + + alert-if-failure: + if: ${{ always() && (needs.ci.result=='failure')}} + runs-on: ubuntu-latest + needs: [ci] + steps: + - name: Send alert if building api-prod fails. + id: failure_alert run: | - curl -X POST -H 'Content-Type: application/json' $WEBHOOK_URL --data '{"text":"A&R API - Deploy Prod Complete"}' + curl -X POST -H 'Content-Type: application/json' --data '{"text": "Prod Deployment Failed for AR-API"}' ${{ secrets.WEBHOOK_URL }} diff --git a/.github/workflows/deploy_test.yaml b/.github/workflows/deploy_test.yaml index d48c5fe..4146257 100644 --- a/.github/workflows/deploy_test.yaml +++ b/.github/workflows/deploy_test.yaml @@ -4,13 +4,16 @@ run-name: Deploying ${{ github.ref_name }} to test on: push: - tags: + tags: - '*' - workflow_dispatch: - inputs: - releaseTag: - description: "Tag of version to be promoted to test" - required: true + +env: + TF_VERSION: 0.14.7 + TG_VERSION: 0.37.1 + TG_SRC_PATH: terraform + TFC_WORKSPACE: test + TARGET_ENV: test + GIT_BRANCH: main permissions: id-token: write @@ -18,82 +21,78 @@ permissions: jobs: ci: - name: Build and Deploy + name: Push to AWS Lambda runs-on: ubuntu-latest environment: test strategy: matrix: node-version: [18.x] - defaults: - run: - working-directory: "./" steps: - # Checkout GitHub Repo - - name: Checkout repo + - name: Attempt to checkout tag uses: actions/checkout@v3 with: - ref: ${{ github.ref }} - - - shell: bash - env: - WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} - run: | - curl -X POST -H 'Content-Type: application/json' $WEBHOOK_URL --data '{"text":" A&R API deploy Test"}' + ref: ${{ github.ref_name }} - # Tag not found - name: Tag not found if: ${{ failure() }} run: | echo "::error::Git Tag not found, please double check input" exit 1 - # Setup AWS SAM - - name: Setup AWS SAM - uses: aws-actions/setup-sam@v2 + ### Install if no cache exists ### + - name: Setup node + uses: actions/setup-node@v3 with: - use-installer: true + node-version: ${{ matrix.node-version }} + cache: 'yarn' + - run: yarn install --silent --frozen-lockfile - # Assume AWS IAM Role - - name: Get AWS credentials - uses: aws-actions/configure-aws-credentials@v2 + ### Build if no cache exists ### + - name: Cache Build + id: cache-build + uses: actions/cache@v3 with: - role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} - role-session-name: GitHub_to_AWS_via_FederatedOIDC - aws-region: ${{ vars.AWS_REGION }} + path: | + **/terraform/src/artifacts + key: ${{ github.sha }}-artifacts + - name: Run Build + if: steps.cache-build.outputs.cache-hit != 'true' + run: yarn build-ci - # SAM Build - - name: Cache SAM Build - id: cache-sam-build - uses: actions/cache@v3 - with: - path: | - **/.aws-sam - key: ${{ github.sha }}-ar-api-sam-cache - - name: Run sam build - if: steps.cache-sam-build.outputs.cache-hit != 'true' - run: | - sam build --cached - - # Prevent prompts and failure when the stack is unchanged - - name: SAM deploy - env: - STAGE: ${{ vars.AR_API_STAGE }} - STACK_NAME: ${{ vars.AR_API_STACK_NAME }} - ACCOUNT_ID: ${{ vars.ACCOUNT_ID }} - AWS_ACCOUNT_LIST: ${{ vars.AWS_ACCOUNT_LIST }} - SSO_ISSUER: ${{ vars.SSO_ISSUER }} - SSO_JWKSURI: ${{ vars.SSO_JWKSURI }} - SSO_CLIENT_ID: ${{ secrets.SSO_CLIENT_ID }} - SSO_ORIGIN: ${{ vars.SSO_ORIGIN }} - S3_BUCKET_DATA: ${{ vars.S3_BUCKET_DATA }} - DATA_REGISTER_NAME_ENDPOINT: ${{ secrets.DATA_REGISTER_NAME_ENDPOINT }} - DATA_REGISTER_NAME_API_KEY: ${{ secrets.DATA_REGISTER_NAME_API_KEY }} - run: | - sam deploy --stack-name $STACK_NAME --no-confirm-changeset --no-fail-on-empty-changeset --parameter-overrides "AccountId=$ACCOUNT_ID" "Stage=$STAGE" "SSOIssuerUrl=$SSO_ISSUER" "SSOJWKSUri=$SSO_JWKSURI" "SSOClientId=$SSO_CLIENT_ID" "SSOOrigin=$SSO_ORIGIN" "AWSAccountList=$AWS_ACCOUNT_LIST" "S3BucketData=$S3_BUCKET_DATA" "DataRegisterNameEndpoint=$DATA_REGISTER_NAME_ENDPOINT" "DataRegisterNameApiKey=$DATA_REGISTER_NAME_API_KEY" + ### Get environment variables from AWS Parameter Store ### + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v3 + with: + aws-region: ${{ secrets.AWS_REGION }} + role-to-assume: ${{ vars.AWS_ROLE_ARN_TO_USE }} + role-duration-seconds: 900 + role-session-name: parks-ar-api-sandbox-gh-action + role-skip-session-tagging: true + + ### Run Terragrunt ### + - name: Setup terraform + uses: hashicorp/setup-terraform@v2 + with: + terraform_version: ${{ env.TF_VERSION }} - - shell: bash - env: - WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} - run: | - curl -X POST -H 'Content-Type: application/json' $WEBHOOK_URL --data '{"text":" A&R API - Deploy Test Complete"}' + - name: Setup Terragrunt + uses: autero1/action-terragrunt@v1.3.0 + with: + terragrunt_version: ${{ env.TG_VERSION }} + + - name: Terragrunt Apply + working-directory: ${{ env.TG_SRC_PATH }}/${{ env.TFC_WORKSPACE }} + env: + aws_region: ${{ secrets.AWS_REGION }} + run: terragrunt apply -auto-approve --terragrunt-non-interactive -var target_aws_account_id=${{ vars.ACCOUNT_ID }} -var target_env=test + + alert-if-failure: + if: ${{ always() && (needs.ci.result=='failure')}} + runs-on: ubuntu-latest + needs: [ci] + steps: + - name: Send alert if building api-test fails. + id: failure_alert + run: | + curl -X POST -H 'Content-Type: application/json' --data '{"text": "Test Deployment Failed for AR-API"}' ${{ secrets.WEBHOOK_URL }} diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index d4e19a6..20d6179 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -1,72 +1,42 @@ -name: PR Checks -run-name: Run test on PR ${{ github.event.number }} +name: Run Tests -on: - pull_request: - paths: "/**" +on: [pull_request] jobs: test: runs-on: ubuntu-latest - environment: dev strategy: matrix: node-version: [18.x] - defaults: - run: - working-directory: "./" + steps: - name: Checkout uses: actions/checkout@v3 - # Install if no cache exists + ### Install if no cache exists ### - name: Setup node uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: "yarn" - cache-dependency-path: "./yarn.lock" - run: yarn install --silent --frozen-lockfile - # Setup AWS SAM - - name: Setup AWS SAM - uses: aws-actions/setup-sam@v2 - with: - use-installer: true - - # SAM Build - - name: Cache SAM Build - id: cache-sam-build - uses: actions/cache@v3 - with: - path: | - ./.aws-sam - key: ${{ github.sha }}-ar-api-sam-cache - - name: Run sam build - if: steps.cache-sam-build.outputs.cache-hit != 'true' - run: | - sam build --cached --parallel - - # Set up DynamoDB local - name: Setup DynamoDB Local uses: rrainn/dynamodb-action@v3.0.0 with: sharedDb: true port: 8000 - cors: '*' + cors: "*" - name: Sleep so DynamoDB has time to wake up uses: GuillaumeFalourd/wait-sleep-action@v1 with: time: '15' # for 15 seconds - # Run Tests - - name: Run Tests + - run: yarn test --coverage --runInBand env: - TABLE_NAME: ParksAr-tests IS_OFFLINE: true - DYNAMODB_ENDPOINT_URL: http://127.0.0.1:8000 AWS_REGION: local-env + TABLE_NAME: ar-tests AWS_ACCESS_KEY_ID: notused AWS_SECRET_ACCESS_KEY: notused - run: ./node_modules/jest/bin/jest.js --coverage --runInBand diff --git a/.gitignore b/.gitignore index bc3be10..3c850f4 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,3 @@ terraform/sandbox/artifacts/ .env terraform/tools/.terraform.lock.hcl terraform/tools/.terragrunt-cache/ - -# AWS SAM Template vars.json for Environment variables -*vars.json diff --git a/README.md b/README.md index 9d721f1..173215b 100644 --- a/README.md +++ b/README.md @@ -5,31 +5,26 @@ This repository consists of the back end code for the BC Parks Attendance & Revenue system (A&R) API. A&R helps Park Operators, BC Parks, and the BC Government track important statistical information to help guide budget allowances and any maintenance that needs to be done to parks. -The AWS resources for this project are defined in the `template.yaml` file. -Data models can be found in [/docs](https://github.com/bcgov/bcparks-ar-api/tree/main/docs) - Associated repos: - https://github.com/bcgov/bcparks-ar-admin - https://github.com/bcgov/bcparks-ar-api -## Contribution Guidelines -To contribute to this code, follow the steps through this link: https://bcgov.github.io/bcparks/collaborate -# Local Development +## Contribuition Guidelines -## Prerequisites +To contribute to this code, follow the steps through this link: https://bcgov.github.io/bcparks/collaborate -To use the SAM CLI, you need the following tools. -* SAM CLI - [Install the SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html) -* Node.js - [Install Node.js 18](https://nodejs.org/en/), including the NPM package management tool. -* Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community) + +# Local Development + +## Prerequisites ### DynamoDB Local -This project makes use of `dynamodb-local` for local development. You can start an instance of DynamoDB using Docker. +This project makes use of `dynamodb-local` for local development. You can start an instance of DyanmoDB using Docker. ``` docker run -d -p 8000:8000 --name dynamodb amazon/dynamodb-local -jar DynamoDBLocal.jar -sharedDb @@ -39,161 +34,106 @@ docker run -d -p 8000:8000 --name dynamodb amazon/dynamodb-local -jar DynamoDBLo The AWS credentials `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` must exist in your environment as environment variables or in the `.aws` credential file. These values are used by the `aws-sdk` to instantiate sdk objects. -You can provide any value for them when using `dynamodb-local`. - -## Use the SAM CLI to build and test locally - -Set the AWS Credentials: - - AWS_ACCESS_KEY_ID - - AWS_SECRET_ACCESS_KEY - - AWS_SESSION_TOKEN - - AWS_DEFAULT_REGION - - AWS_REGION +You can provide any value for them when using `dynamodb-local`. Real values are needed when performing operations on remote AWS services such as generating CAPTCHA audio using AWS Polly. -Copy the [sample-vars.json](../docs/sample-vars.json) file to the root of your local `arSam` folder and make changes according to your own personal set up. +## Start Development Server ``` - "IS_OFFLINE":"true", // set to true if working online - "DYNAMODB_ENDPOINT_URL":"http://172.17.0.1:8000", // local endpoint of your local dynamodb server - "AWS_REGION":"local-env", // can be anything if working locally - "TABLE_NAME":"ParksAr", // local DynamoDB table name - "NAME_CACHE_TABLE_NAME":"NameCacheAr", // cache table - "CONFIG_TABLE_NAME":"ConfigAr" // config table +yarn install +yarn start ``` -Navigate to the folder containing `template.yaml` +Once server starts, the API will be available at http://localhost:3000/api. The local server is also configured to seed some basic data from the `data` directory. -Build your application with the `sam build` command. +## Create Lambda Packages -```bash -arSam$ sam build -``` - -Use the `sam local start-api` to run the API locally on port 3000. +The Serverless Framework is setup to package Lambda functions into individual zip files which is then used by Terraform to deploy to AWS. -```bash -arSam$ sam local start-api -arSam$ curl http://localhost:3000/ +``` +yarn build ``` -You can also use `yarn build` & `yarn start-full` to build and start the API locally. - -## Connecting to remote AWS DynamoDB endpoints (for migrations, etc) - -DynamoDB functionality is universally inherited from `dynamodb` which is exported from the [baseLayer](layers/baseLayer/baseLayer.js). By default, the DynamoDB endpoint is `dynamodb..amazonaws.com`, unless you have the local environment variable `IS_OFFLINE=true`. The `DYNAMODB_ENDPOINT_URL` environment variable determines which endpoint `dynamodb` will point to. +# Deployment Pipeline -### Local connections -``` -export IS_OFFLINE=true -export DYNAMODB_ENDPOINT_URL="http://172.17.0.1:8000" // local endpoint of your local dynamodb server -``` +## Github Actions -### Remote connections -``` -unset IS_OFFLINE -export DYNAMODB_ENDPOINT_URL="https://dynamodb.ca-central-1.amazonaws.com" // remote endpoint for all dynamodb connections in ca-central-1 -``` +On push to the Main branch, three actions run: -### Testing +1. Lint +2. Unit Tests +3. Deploy to dev -Test a single function by invoking it directly with a test event. An event is a JSON document that represents the input that the function receives from the event source. Test events are included in the `events` folder in this project. +The deploy to dev orchestrates deployment to AWS dev. -Run functions locally and invoke them with the `sam local invoke` command. +## Getting environment variables for Actions and Terraform -```bash -arSam$ sam local invoke HelloWorldFunction --event events/event.json -``` +There are three places where secrets and variables are stored. -The SAM CLI reads the application template to determine the API's routes and the functions that they invoke. The `Events` property on each function's definition includes the route and method for each path. +### Github -```yaml - Events: - HelloWorld: - Type: Api - Properties: - Path: /hello - Method: get -``` +The secrets stored in Github are required for the AWS configuration in Github actions. The variables are as follows: -Run the suite of unit tests with `yarn test`: +- AWS_REGION -```bash -arSam$ yarn test -``` +These secrets are permanent and will not have to be changed in the future. -With SAM, Lambda and layer dependencies are stored in their respective `nodejs` folder upon running `sam build`, not the common `node_modules` folder. Since Jest looks for dependencies in the `node_modules` folder, a symlink is created in the build step so Jest can find layer dependencies outside of a SAM docker container environment. +These environment variables need to be set for each dev/test/prod environment: -Because of this, dependency mapping does not exist prior to `sam build` and therefore `sam build` is included in the `yarn test` script. +- ACCOUNT_ID +- AWS_ROLE_ARN_TO_USE -Additionally, Lambdas with layer dependencies import the layer using `require`: -``` -const { layerFn } = require(/opt/layer); -``` +### Terraform -The `/opt` directory is only available at runtime within the SAM docker container after running `sam build && sam local start-api`. Jest cannot be mapped to the `opt` directory. To work around this, Jest is configured to look for the respective layer resources using `moduleNameMapper`. - -```package.json -"jest": { - ... - "moduleNameMapper": [ - "^/opt/baseLayer": "/.aws-sam/build/BaseLayer/baseLayer", - "^/opt/constantsLayer": "/.aws-sam/build/ConstantsLayer/constantsLayer", - ..., - "^/opt/varianceLayer": "/.aws-sam/build/VarianceLayer/varianceLayer" - ] -} -``` +There are a few secrets and variables that must be stored in Terraform Cloud. This is because they are required for provider initilization. This initialization happens before we are able to get variables from Github so they cannot be passed from AWS Parameter store. The variables are as follows: -The configuration above tells Jest to look for layer resources in the build folder. We tell Jest to look here instead of the `/layer` folder because all the layer's dependencies are available within the build folder via symlink after running `sam build`. +- target_env +- AWS_SECRET_ACCESS_KEY +- AWS_ACCESS_KEY_ID +- aws_region +- target_aws_account_id -# Deployment Pipeline +These variables and secrets are permanent and will not have to be changed in the future. -## Github Actions +### AWS Parameter Store -On push to the Main branch, three actions run: +These variables are required by Github Actions as well as Terraform. The variables themselves are stored in AWS Parameter Store. These parameters are organized into four categories: -1. Lint -2. Unit Tests -3. Deploy to dev +- bcparks-ar-api/ +- bcparks-ar-admin/ -The deploy to dev orchestrates deployment to AWS dev. +These variables are passed to Terraform Cloud in the following steps: -## Deploying to test and prod +``` +AWS Parameter Store -> Github -> Terragrunt -> *.auto.tfvars -> Terraform Cloud +``` -Test pipeline is triggered by publishing a release that is marked as a `pre-release`. +If a variable must be updated, you must update it from AWS Parameter store. -Prod pipeline is triggered by removing the `pre-release` tag from a release. +### AWS Parameter Store -## Deploying to AWS +API requires a JWT secret for emails to work. This secret is stored in Secret Manager on AWS. This allows for secret rotation. This secret is accessed by Terraform Cloud directly. -```bash -sam build -sam deploy --guided -``` +## Install, zip and upload to S3 -The first command will build the source of your application. The second command will package and deploy your application to AWS, with a series of prompts: +For each of the functions we must run `yarn install`. After that, each function directory is zipped up and uploaded to S3. These zips will then be pulled down by Terraform Cloud. -* **Stack Name**: The name of the stack to deploy to CloudFormation. This should be unique to your account and region, and a good starting point would be something matching your project name. -* **AWS Region**: The AWS region you want to deploy your app to. -* **Confirm changes before deploy**: If set to yes, any change sets will be shown to you before execution for manual review. If set to no, the AWS SAM CLI will automatically deploy application changes. -* **Allow SAM CLI IAM role creation**: Many AWS SAM templates, including this example, create AWS IAM roles required for the AWS Lambda function(s) included to access AWS services. By default, these are scoped down to minimum required permissions. To deploy an AWS CloudFormation stack which creates or modifies IAM roles, the `CAPABILITY_IAM` value for `capabilities` must be provided. If permission isn't provided through this prompt, to deploy this example you must explicitly pass `--capabilities CAPABILITY_IAM` to the `sam deploy` command. -* **Save arguments to samconfig.toml**: If set to yes, your choices will be saved to a configuration file inside the project, so that in the future you can just re-run `sam deploy` without parameters to deploy changes to your application. +## Terragrunt and Terraform Cloud -You can find your API Gateway Endpoint URL in the output values displayed after deployment. +This creates several things in AWS: -## Fetch, tail, and filter Lambda function logs +- DynamoDB +- Cloudfront Distribution +- Connections among S3, Cloudfront, DynamoDB and API Gateway. -To simplify troubleshooting, SAM CLI has a command called `sam logs`. `sam logs` lets you fetch logs generated by your deployed Lambda function from the command line. In addition to printing the logs on the terminal, this command has several nifty features to help you quickly find the bug. +## Deploying to test and prod -`NOTE`: This command works for all AWS Lambda functions; not just the ones you deploy using SAM. +Test pipeline is triggered by publishing a release that is marked as a `pre-release`. -```bash -arSam$ sam logs -n ConfigGet --stack-name arSam --tail -``` +Prod pipeline is triggered by removing the `pre-release` tag from a release. -You can find more information and examples about filtering Lambda function logs in the [SAM CLI Documentation](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-logging.html). +# Config service -## Resources +Config service is used to alter frontend via DynamoDB. In Dynamo, an item with the PK and SK of config must exist. Within the attributes, you are able to set certain configurations such as `KEYCLOAK_ENABLED`, `API_LOCATION`, and `debugMode`. -See the [AWS SAM developer guide](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html) for an introduction to SAM specification, the SAM CLI, and serverless application concepts. +This item is request by the front ends upon client connection. diff --git a/arSam/handlers/activity/__tests__/activity.test.js b/__tests__/activity.test.js similarity index 74% rename from arSam/handlers/activity/__tests__/activity.test.js rename to __tests__/activity.test.js index 6b7d797..acf9ec8 100644 --- a/arSam/handlers/activity/__tests__/activity.test.js +++ b/__tests__/activity.test.js @@ -1,13 +1,13 @@ const { DynamoDBClient, PutItemCommand, GetItemCommand } = require('@aws-sdk/client-dynamodb'); const { marshall, unmarshall } = require('@aws-sdk/util-dynamodb'); -const { REGION, ENDPOINT, TABLE_NAME } = require("../../../__tests__/settings"); +const { REGION, ENDPOINT, TABLE_NAME } = require("./global/settings"); const { PARKSLIST, SUBAREAS, CONFIG_ENTRIES, SUBAREA_ENTRIES, FISCAL_YEAR_LOCKS, -} = require("../../../__tests__/mock_data.json"); +} = require("./global/data.json"); const jwt = require("jsonwebtoken"); const token = jwt.sign( @@ -58,6 +58,34 @@ describe("Activity Test", () => { process.env = { ...OLD_ENV }; // Make a copy of environment }); + const mockedUnauthenticatedUser = { + decodeJWT: jest.fn((event) => { }), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: false, + roles: [], + isAuthenticated: false, + }; + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }), + }; + + const mockedSysadmin = { + decodeJWT: jest.fn((event) => { }), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: true, + roles: ["sysadmin"], + isAuthenticated: true, + }; + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }), + }; + afterEach(() => { process.env = OLD_ENV; // Restore old environment }); @@ -67,19 +95,15 @@ describe("Activity Test", () => { }); test("Handler - 200 GET specific activity entry", async () => { - const activityGET = require("../GET/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const activityGET = require("../lambda/activity/GET/index"); const obj = await activityGET.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - } - }, queryStringParameters: { orcs: SUBAREA_ENTRIES[0].orcs, subAreaId: SUBAREA_ENTRIES[0].pk.split("::")[0], @@ -93,19 +117,15 @@ describe("Activity Test", () => { }); test("Handler - 403 GET Not Authenticated", async () => { - const activityGET = require("../GET/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedUnauthenticatedUser; + }); + const activityGET = require("../lambda/activity/GET/index"); const response = await activityGET.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"public\"]", - isAdmin: false, - isAuthenticated: false, - } - }, queryStringParameters: { orcs: SUBAREA_ENTRIES[0].orcs, subAreaId: SUBAREA_ENTRIES[0].pk.split("::")[0], @@ -120,20 +140,16 @@ describe("Activity Test", () => { }); test("Handler - 403 GET Unauthorized role", async () => { - const activityGET = require("../GET/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedUnauthenticatedUser; + }); + const activityGET = require("../lambda/activity/GET/index"); const response = await activityGET.handler( { headers: { Authorization: "Bearer " + token, PsuedoToken: emptyRole, }, - requestContext: { - authorizer: { - roles: "[]", - isAdmin: false, - isAuthenticated: false, - }, - }, queryStringParameters: { orcs: SUBAREA_ENTRIES[0].orcs, subAreaId: SUBAREA_ENTRIES[0].pk.split("::")[0], @@ -148,19 +164,15 @@ describe("Activity Test", () => { }); test("Subarea Handler - 400 GET Bad Request", async () => { - const activityGET = require("../GET/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const activityGET = require("../lambda/activity/GET/index"); const response = await activityGET.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - } - }, queryStringParameters: { badParam: "oops", }, @@ -172,20 +184,16 @@ describe("Activity Test", () => { }); test("HandlePost - 200 POST handle Activity/Variances", async () => { - const activityPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const activityPOST = require("../lambda/activity/POST/index"); // Setup the first record const response = await activityPOST.handlePost( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - } - }, body: JSON.stringify({ orcs: SUBAREA_ENTRIES[0].orcs, parkName: SUBAREA_ENTRIES[0].parkName, @@ -227,13 +235,6 @@ describe("Activity Test", () => { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - } - }, body: JSON.stringify({ orcs: SUBAREA_ENTRIES[0].orcs, parkName: SUBAREA_ENTRIES[0].parkName, @@ -287,20 +288,16 @@ describe("Activity Test", () => { }); test("Handler - 403 POST Not Authenticated", async () => { - const activityPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedUnauthenticatedUser; + }); + const activityPOST = require("../lambda/activity/POST/index"); const response = await activityPOST.handlePost( { headers: { Authorization: "Bearer " + token, PsuedoToken: "error", //{ resource_access: { 'attendance-and-revenue': { roles: [''] } } } }, - requestContext: { - authorizer: { - roles: "[\"public\"]", - isAdmin: false, - isAuthenticated: false, - } - }, body: JSON.stringify({ orcs: SUBAREA_ENTRIES[0].orcs, subAreaId: SUBAREA_ENTRIES[0].pk.split("::")[0], @@ -315,20 +312,16 @@ describe("Activity Test", () => { }); test("Handler - 403 POST Unauthorized role", async () => { - const activityPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedUnauthenticatedUser; + }); + const activityPOST = require("../lambda/activity/POST/index"); const response = await activityPOST.handlePost( { headers: { Authorization: "Bearer " + token, PsuedoToken: emptyRole, }, - requestContext: { - authorizer: { - roles: "[\"public\"]", - isAdmin: false, - isAuthenticated: false, - } - }, body: JSON.stringify({ orcs: SUBAREA_ENTRIES[0].orcs, subAreaId: SUBAREA_ENTRIES[0].pk.split("::")[0], @@ -345,19 +338,15 @@ describe("Activity Test", () => { // note: CONFIG POST disabled 2022-09-27 test("HandlePost - 400 POST handle Activity", async () => { - const activityPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const activityPOST = require("../lambda/activity/POST/index"); const response = await activityPOST.handlePost( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - } - }, body: JSON.stringify({ orcs: SUBAREA_ENTRIES[0].orcs, }), @@ -368,19 +357,15 @@ describe("Activity Test", () => { }); test("HandlePost - 400 POST handle Activity", async () => { - const activityPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const activityPOST = require("../lambda/activity/POST/index"); const response = await activityPOST.handlePost( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - } - }, }, null ); @@ -388,19 +373,15 @@ describe("Activity Test", () => { }); test("HandlePost - 400 POST handle Activity date", async () => { - const activityPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const activityPOST = require("../lambda/activity/POST/index"); const response = await activityPOST.handlePost( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - } - }, body: JSON.stringify({ orcs: SUBAREA_ENTRIES[0].orcs, subAreaId: SUBAREA_ENTRIES[0].pk.split("::")[0], @@ -414,19 +395,15 @@ describe("Activity Test", () => { }); test("HandlePost - 400 POST Bad Request", async () => { - const activityPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const activityPOST = require("../lambda/activity/POST/index"); const response = await activityPOST.handlePost( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - } - }, body: { badParam: "{xxxxxx}", }, @@ -438,19 +415,15 @@ describe("Activity Test", () => { }); test("HandleLock - 200 POST lock record", async () => { - const activityPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const activityPOST = require("../lambda/activity/POST/index"); const response = await activityPOST.handleLock( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - } - }, body: JSON.stringify({ orcs: SUBAREA_ENTRIES[3].orcs, subAreaId: SUBAREA_ENTRIES[3].pk.split("::")[0], @@ -464,19 +437,15 @@ describe("Activity Test", () => { }); test("HandlePost - 409 POST to locked record", async () => { - const activityPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const activityPOST = require("../lambda/activity/POST/index"); const response = await activityPOST.handlePost( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - } - }, body: JSON.stringify({ orcs: SUBAREA_ENTRIES[3].orcs, subAreaId: SUBAREA_ENTRIES[3].pk.split("::")[0], @@ -490,19 +459,15 @@ describe("Activity Test", () => { }); test("HandleUnlock - 200 POST unlock record", async () => { - const activityPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const activityPOST = require("../lambda/activity/POST/index"); const response = await activityPOST.handleUnlock( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - } - }, body: JSON.stringify({ orcs: SUBAREA_ENTRIES[3].orcs, subAreaId: SUBAREA_ENTRIES[3].pk.split("::")[0], @@ -516,19 +481,15 @@ describe("Activity Test", () => { }); test("Handler - 403 POST to locked fiscal year", async () => { - const activityPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const activityPOST = require("../lambda/activity/POST/index"); const response = await activityPOST.handlePost( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - } - }, body: JSON.stringify({ orcs: SUBAREA_ENTRIES[2].orcs, subAreaId: SUBAREA_ENTRIES[2].pk.split("::")[0], diff --git a/__tests__/constants.test.js b/__tests__/constants.test.js new file mode 100644 index 0000000..28a7e37 --- /dev/null +++ b/__tests__/constants.test.js @@ -0,0 +1,114 @@ +describe("Constants Test", () => { + const OLD_ENV = process.env; + beforeEach(async () => { + jest.resetModules(); + process.env = { ...OLD_ENV }; // Make a copy of environment + }); + + test("Handler - Constants has items", async () => { + + const constants = require("../lambda/constants"); + // Checks to ensure the value functions returns the data we pass through to it based on the attribute. + expect(constants.CSV_SYSADMIN_SCHEMA.length).toEqual(96); + for(const row of constants.CSV_SYSADMIN_SCHEMA) { + expect(row.value({ + region: 1, + section: 1, + bundle: 1, + parkName: 1, + orcs: 1, + subAreaName: 1, + subAreaId: 1, + year: 1, + fiscalYear: 1, + month: 1, + campingPartyNightsAttendanceStandard: 1, + campingPartyNightsAttendanceSenior: 1, + campingPartyNightsAttendanceSocial: 1, + campingPartyNightsAttendanceLongStay: 1, + calc_frontCountryCamping_frontCountryCamping_campingPartyNights_totalNights: 1, + calc_frontCountryCamping_frontCountryCamping_campingPartyNights_totalAttendance: 1, + campingPartyNightsRevenueGross: 1, + calc_frontCountryCamping_campingPartyNights_netRevenue: 1, + secondCarsAttendanceStandard: 1, + secondCarsAttendanceSenior: 1, + secondCarsAttendanceSocial: 1, + calc_frontCountryCamping_secondCars_totalAttendance: 1, + secondCarsRevenueGross: 1, + calc_frontCountryCamping_secondCars_netRevenue: 1, + otherRevenueGrossSani: 1, + calc_frontCountryCamping_other_sani_netRevenue: 1, + otherRevenueElectrical: 1, + calc_frontCountryCamping_other_electrical_netRevenue: 1, + otherRevenueShower: 1, + calc_frontCountryCamping_other_shower_netRevenue: 1, + notes_frontcountryCamping: 1, + totalAttendanceParties: 1, + calc_frontcountryCabins_parties_totalAttendance: 1, + revenueGrossCamping: 1, + calc_frontcountryCabins_camping_netRevenue: 1, + notes_frontcountryCabins: 1, + standardRateGroupsTotalPeopleStandard: 1, + standardRateGroupsTotalPeopleAdults: 1, + standardRateGroupsTotalPeopleYouth: 1, + standardRateGroupsTotalPeopleKids: 1, + calc_groupCamping_standardRate_totalPeople: 1, + standardRateGroupsRevenueGross: 1, + calc_groupCamping_standardRate_netRevenue: 1, + youthRateGroupsAttendanceGroupNights: 1, + youthRateGroupsAttendancePeople: 1, + youthRateGroupsRevenueGross: 1, + calc_groupCamping_youthRate_netRevenue: 1, + notes_groupCamping: 1, + calc_groupCamping_totalPeople: 1, + calc_groupCamping_totalGrossRevenue: 1, + calc_groupCamping_totalNetRevenue: 1, + calc_frontcountry_totalAttendancePeople: 1, + calc_frontcountry_totalGrossRevenue: 1, + calc_frontcountry_totalNetRevenue: 1, + people: 1, + grossCampingRevenue: 1, + calc_backcountryCamping_camping_netRevenue: 1, + notes_backcountryCamping: 1, + peopleAdult: 1, + peopleChild: 1, + peopleFamily: 1, + calc_backcountryCabins_totalPeople: 1, + revenueFamily: 1, + calc_backcountryCabins_family_netRevenue: 1, + notes_backcountryCabins: 1, + calc_backcountry_totalAttendancePeople: 1, + calc_backcountry_totalGrossRevenue: 1, + calc_backcountry_totalNetRevenue: 1, + calc_totalCampingAttendancePeople: 1, + calc_totalCampingGrossRevenue: 1, + calc_totalCampingNetRevenue: 1, + peopleAndVehiclesVehicle: 1, + peopleAndVehiclesBus: 1, + peopleAndVehiclesTrail: 1, + calc_dayUse_peopleAndVehicles_vehicleAttendance: 1, + picnicRevenueShelter: 1, + picnicShelterPeople: 1, + picnicRevenueGross: 1, + calc_dayUse_picnicShelters_netRevenue: 1, + otherDayUsePeopleHotSprings: 1, + otherDayUseRevenueHotSprings: 1, + calc_dayUse_otherDayUse_netRevenue: 1, + notes_dayUse: 1, + calc_dayUse_totalAttendancePeople: 1, + calc_dayUse_totalGrossRevenue: 1, + calc_dayUse_totalNetRevenue: 1, + boatAttendanceNightsOnDock: 1, + boatAttendanceNightsOnBouys: 1, + boatAttendanceMiscellaneous: 1, + calc_boating_boats_boatAttendance: 1, + boatRevenueGross: 1, + calc_boating_boats_netRevenue: 1, + notes_boating: 1, + calc_totalAttendancePeople: 1, + calc_totalGrossRevenue: 1, + calc_totalNetRevenue: 1 + })).toEqual(1); + } + }); +}); diff --git a/arSam/layers/__tests__/dynamoLayer.test.js b/__tests__/dynamoUtil.test.js similarity index 88% rename from arSam/layers/__tests__/dynamoLayer.test.js rename to __tests__/dynamoUtil.test.js index 64b49b3..6af28bf 100644 --- a/arSam/layers/__tests__/dynamoLayer.test.js +++ b/__tests__/dynamoUtil.test.js @@ -1,9 +1,9 @@ const AWS = require("aws-sdk"); const { DocumentClient } = require("aws-sdk/clients/dynamodb"); -const { REGION, ENDPOINT, TABLE_NAME } = require("../../__tests__/settings"); -const { PARKSLIST, SUBAREAS, SUBAREA_ENTRIES } = require("../../__tests__/mock_data.json"); +const { REGION, ENDPOINT, TABLE_NAME } = require("./global/settings"); +const { PARKSLIST, SUBAREAS, SUBAREA_ENTRIES } = require("./global/data.json"); -const CONFIG_TABLE_NAME = "ConfigsAr-tests-dynamo"; +const CONFIG_TABLE_NAME = "dynamo-config-test"; async function setupDb() { const dynamoDb = new AWS.DynamoDB({ @@ -96,7 +96,7 @@ describe("Pass Succeeds", () => { }); test("dynamoUtil - runScan", async () => { - const utils = require("../baseLayer/baseLayer"); + const utils = require("../lambda/dynamoUtil"); let queryObj = { TableName: TABLE_NAME, @@ -120,7 +120,7 @@ describe("Pass Succeeds", () => { }); test("dynamoUtil - getParks", async () => { - const utils = require("../baseLayer/baseLayer"); + const utils = require("../lambda/dynamoUtil"); const result = await utils.getParks(); @@ -137,7 +137,7 @@ describe("Pass Succeeds", () => { }); test("dynamoUtil - getSubAreas", async () => { - const utils = require("../baseLayer/baseLayer"); + const utils = require("../lambda/dynamoUtil"); let orc = "0041"; let specificSubAreas = []; @@ -161,7 +161,7 @@ describe("Pass Succeeds", () => { }); test("dynamoUtil - getRecords", async () => { - const utils = require("../baseLayer/baseLayer"); + const utils = require("../lambda/dynamoUtil"); const result = await utils.getRecords(SUBAREAS[0]); @@ -175,7 +175,7 @@ describe("Pass Succeeds", () => { }); test("dynamoUtil - incrementAndGetNextSubAreaID works with and without an entry in the DB", async () => { - const utils = require("../baseLayer/baseLayer"); + const utils = require("../lambda/dynamoUtil"); const result = await utils.incrementAndGetNextSubAreaID(); expect(result).toEqual("1"); diff --git a/arSam/handlers/export-variance/__tests__/export-variance.tests.js b/__tests__/export-variance.test.js similarity index 66% rename from arSam/handlers/export-variance/__tests__/export-variance.tests.js rename to __tests__/export-variance.test.js index f007470..b769e28 100644 --- a/arSam/handlers/export-variance/__tests__/export-variance.tests.js +++ b/__tests__/export-variance.test.js @@ -1,7 +1,7 @@ const AWS = require("aws-sdk"); const { DocumentClient } = require("aws-sdk/clients/dynamodb"); -const { REGION, ENDPOINT, TABLE_NAME } = require("../../../__tests__/settings"); -const { PARKSLIST, SUBAREAS, VARIANCE_JOBSLIST, VARIANCE_MOCKJOB } = require("../../../__tests__/mock_data.json"); +const { REGION, ENDPOINT, TABLE_NAME } = require("./global/settings"); +const { PARKSLIST, SUBAREAS, VARIANCE_JOBSLIST, VARIANCE_MOCKJOB } = require("./global/data.json"); const jwt = require("jsonwebtoken"); const tokenContent = { @@ -49,6 +49,36 @@ async function setupDb() { } describe("Export Variance Report", () => { + const mockedUnauthenticatedUser = { + decodeJWT: jest.fn((event) => { + }), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: false, + roles: [], + isAuthenticated: false + } + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }) + }; + + const mockedSysadmin = { + decodeJWT: jest.fn((event) => { + }), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: true, + roles: ['sysadmin'], + isAuthenticated: true + } + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }) + }; + const OLD_ENV = process.env; beforeEach(async () => { jest.resetModules(); @@ -64,22 +94,11 @@ describe("Export Variance Report", () => { }); test("Handler - 403 GET Invalid Auth", async () => { - const event = { - headers: { - Authorization: "Bearer " + token, - }, - httpMethod: "GET", - requestContext: { - authorizer: { - roles: "[\"public\"]", - isAdmin: false, - isAuthenticated: false, - }, - }, - }; - - const varianceExportGET = require("../GET/index"); - const response = await varianceExportGET.handler(event, null); + jest.mock('../lambda/permissionUtil', () => { + return mockedUnauthenticatedUser; + }); + const varianceExportGET = require("../lambda/export-variance/GET/index"); + const response = await varianceExportGET.handler({},null); expect(response.statusCode).toBe(403); }); @@ -91,19 +110,15 @@ describe("Export Variance Report", () => { Authorization: "Bearer " + token, }, httpMethod: "GET", - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, queryStringParameters: { getJob: "true" }, }; - const varianceExportGET = require("../GET/index"); + jest.mock('../lambda/permissionUtil', () => { + return mockedSysadmin; + }); + const varianceExportGET = require("../lambda/export-variance/GET/index"); const result = await varianceExportGET.handler(event, null); let body; try { @@ -115,8 +130,8 @@ describe("Export Variance Report", () => { expect.objectContaining({ headers: { "Access-Control-Allow-Headers": - "Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token", - "Access-Control-Allow-Methods": "OPTIONS,GET,POST,PUT,DELETE", + "Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token", + "Access-Control-Allow-Methods": "OPTIONS,GET,POST", "Access-Control-Allow-Origin": "*", "Content-Type": "application/json", }, @@ -126,27 +141,22 @@ describe("Export Variance Report", () => { }) test("Handler - 200 GET, with no jobs", async () => { - process.env.IS_OFFLINE = 'true' const dateField = "dateGenerated" const event = { headers: { Authorization: "Bearer " + token, }, httpMethod: "GET", - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, queryStringParameters: { getJob: "true", fiscalYearEnd: 2023 }, }; - const varianceExportGET = require("../GET/index"); + jest.mock('../lambda/permissionUtil', () => { + return mockedSysadmin; + }); + const varianceExportGET = require("../lambda/export-variance/GET/index"); const result = await varianceExportGET.handler(event, null); let body; try { @@ -159,8 +169,8 @@ describe("Export Variance Report", () => { expect.objectContaining({ headers: { "Access-Control-Allow-Headers": - "Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token", - "Access-Control-Allow-Methods": "OPTIONS,GET,POST,PUT,DELETE", + "Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token", + "Access-Control-Allow-Methods": "OPTIONS,GET,POST", "Access-Control-Allow-Origin": "*", "Content-Type": "application/json", }, @@ -176,18 +186,14 @@ describe("Export Variance Report", () => { Authorization: "Bearer " + token, }, httpMethod: "GET", - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, queryStringParameters: { fiscalYearEnd: 2023 }, }; - const varianceExportGET = require("../GET/index"); + jest.mock('../lambda/permissionUtil', () => { + return mockedSysadmin; + }); + const varianceExportGET = require("../lambda/export-variance/GET/index"); const result = await varianceExportGET.handler(event, null) // Returns value below even with no job diff --git a/arSam/handlers/export/__tests__/export.test.js b/__tests__/export.test.js similarity index 65% rename from arSam/handlers/export/__tests__/export.test.js rename to __tests__/export.test.js index 3bb9bf5..6e4fc72 100644 --- a/arSam/handlers/export/__tests__/export.test.js +++ b/__tests__/export.test.js @@ -1,7 +1,7 @@ const AWS = require("aws-sdk"); const { DocumentClient } = require("aws-sdk/clients/dynamodb"); -const { REGION, ENDPOINT, TABLE_NAME } = require("../../../__tests__/settings"); -const { PARKSLIST, SUBAREAS, JOBSLIST, MOCKJOB } = require("../../../__tests__/mock_data.json"); +const { REGION, ENDPOINT, TABLE_NAME } = require("./global/settings"); +const { PARKSLIST, SUBAREAS, JOBSLIST, MOCKJOB } = require("./global/data.json"); const jwt = require("jsonwebtoken"); const tokenContent = { @@ -49,6 +49,36 @@ async function setupDb() { } describe("Export Report", () => { + const mockedUnauthenticatedUser = { + decodeJWT: jest.fn((event) => { + }), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: false, + roles: [], + isAuthenticated: false + } + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }) + }; + + const mockedSysadmin = { + decodeJWT: jest.fn((event) => { + }), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: true, + roles: ['sysadmin'], + isAuthenticated: true + } + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }) + }; + const OLD_ENV = process.env; beforeEach(async () => { jest.resetModules(); @@ -64,50 +94,31 @@ describe("Export Report", () => { }); test("Handler - 403 GET Invalid Auth", async () => { - const event = { - headers: { - Authorization: "Bearer " + token, - }, - requestContext: { - authorizer: { - roles: "[\"public\"]", - isAdmin: false, - isAuthenticated: false, - } - }, - httpMethod: "GET", - queryStringParameters: { - getJob: "true" - }, - }; - - const exportGET = require("../GET/index"); - const response = await exportGET.handler(event, null); + jest.mock('../lambda/permissionUtil', () => { + return mockedUnauthenticatedUser; + }); + const exportGET = require("../lambda/export/GET/index"); + const response = await exportGET.handler({},null); expect(response.statusCode).toBe(403); }); test("Handler - 200 GET, with no jobs", async () => { - process.env.IS_OFFLINE = 'true' const dateField = "dateGenerated" const event = { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - } - }, httpMethod: "GET", queryStringParameters: { getJob: "true" }, }; - const exportGET = require("../GET/index"); + jest.mock('../lambda/permissionUtil', () => { + return mockedSysadmin; + }); + const exportGET = require("../lambda/export/GET/index"); const result = await exportGET.handler(event, null) let body; try { @@ -120,8 +131,8 @@ describe("Export Report", () => { expect.objectContaining({ headers: { "Access-Control-Allow-Headers": - "Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token", - "Access-Control-Allow-Methods": "OPTIONS,GET,POST,PUT,DELETE", + "Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token", + "Access-Control-Allow-Methods": "OPTIONS,GET,POST", "Access-Control-Allow-Origin": "*", "Content-Type": "application/json", }, @@ -136,16 +147,12 @@ describe("Export Report", () => { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, httpMethod: "GET", }; - const exportGET = require("../GET/index"); + jest.mock('../lambda/permissionUtil', () => { + return mockedSysadmin; + }); + const exportGET = require("../lambda/export/GET/index"); const result = await exportGET.handler(event, null) // Returns value below even with no job @@ -163,9 +170,9 @@ describe("Export Report", () => { } }; - const exportFUNCTIONS = require("/opt/functionsLayer"); + const exportFUNCTIONS = require("../lambda/functions"); await exportFUNCTIONS.updateJobEntry(MOCKJOB, TABLE_NAME) - const utils = require("/opt/baseLayer"); + const utils = require("../lambda/dynamoUtil"); const result = await utils.runQuery(query) expect(result).toMatchObject([MOCKJOB]) diff --git a/arSam/handlers/fiscalYearEnd/__tests__/fiscalYearEnd.test.js b/__tests__/fiscalYearEnd.test.js similarity index 62% rename from arSam/handlers/fiscalYearEnd/__tests__/fiscalYearEnd.test.js rename to __tests__/fiscalYearEnd.test.js index 80e85e1..d8b7d3d 100644 --- a/arSam/handlers/fiscalYearEnd/__tests__/fiscalYearEnd.test.js +++ b/__tests__/fiscalYearEnd.test.js @@ -1,7 +1,7 @@ const AWS = require('aws-sdk'); const { DocumentClient } = require('aws-sdk/clients/dynamodb'); -const { REGION, ENDPOINT, TABLE_NAME } = require('../../../__tests__/settings'); -const { FISCAL_YEAR_LOCKS2 } = require('../../../__tests__/mock_data.json'); +const { REGION, ENDPOINT, TABLE_NAME } = require('./global/settings'); +const { FISCAL_YEAR_LOCKS2 } = require('./global/data.json'); const jwt = require('jsonwebtoken'); const token = jwt.sign({ resource_access: { 'attendance-and-revenue': { roles: ['sysadmin'] } } }, 'defaultSecret'); @@ -32,6 +32,36 @@ async function genericPutDocument(item) { } describe('Fiscal Year End Test', () => { + const mockedAuthenticatedUserNoRoles = { + decodeJWT: jest.fn((event) => { + }), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: false, + roles: [], + isAuthenticated: true + } + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }) + }; + + const mockedSysadmin = { + decodeJWT: jest.fn((event) => { + }), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: true, + roles: ['sysadmin'], + isAuthenticated: true + } + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }) + }; + const OLD_ENV = process.env; beforeEach(async () => { jest.resetModules(); @@ -47,19 +77,15 @@ describe('Fiscal Year End Test', () => { }); test('Handler - 200 GET fiscal year end', async () => { - const fiscalYearEndGET = require('../GET/index'); + jest.mock('../lambda/permissionUtil', () => { + return mockedSysadmin; + }); + const fiscalYearEndGET = require('../lambda/fiscalYearEnd/GET/index'); const obj = await fiscalYearEndGET.handler( { headers: { Authorization: "Bearer " + token }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, queryStringParameters: { fiscalYearEnd: FISCAL_YEAR_LOCKS2[0].sk } @@ -68,36 +94,28 @@ describe('Fiscal Year End Test', () => { }); test('Handler - 200 GET All fiscal year end objects', async () => { - const fiscalYearEndGET = require('../GET/index'); + jest.mock('../lambda/permissionUtil', () => { + return mockedSysadmin; + }); + const fiscalYearEndGET = require('../lambda/fiscalYearEnd/GET/index'); const response = await fiscalYearEndGET.handler({ headers: { Authorization: "Bearer " + token }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, }, null); expect(response.statusCode).toBe(200); }); test('HandleLock - 200 lock fiscal year', async () => { - const fiscalYearEndPOST = require('../POST/index'); + jest.mock('../lambda/permissionUtil', () => { + return mockedSysadmin; + }); + const fiscalYearEndPOST = require('../lambda/fiscalYearEnd/POST/index'); const response = await fiscalYearEndPOST.lockFiscalYear({ headers: { Authorization: "Bearer " + token }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, queryStringParameters: { fiscalYearEnd: "2017" } @@ -107,18 +125,14 @@ describe('Fiscal Year End Test', () => { }); test('HandleLock - 200 unlock fiscal year', async () => { - const fiscalYearEndPOST = require('../POST/index'); + jest.mock('../lambda/permissionUtil', () => { + return mockedSysadmin; + }); + const fiscalYearEndPOST = require('../lambda/fiscalYearEnd/POST/index'); const response = await fiscalYearEndPOST.unlockFiscalYear({ headers: { Authorization: "Bearer " + token }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, queryStringParameters: { fiscalYearEnd: "2017" } @@ -128,18 +142,14 @@ describe('Fiscal Year End Test', () => { }); test('HandleLock - 403 unlock fiscal year without perms', async () => { - const fiscalYearEndPOST = require('../POST/index'); + jest.mock('../lambda/permissionUtil', () => { + return mockedAuthenticatedUserNoRoles; + }); + const fiscalYearEndPOST = require('../lambda/fiscalYearEnd/POST/index'); const response = await fiscalYearEndPOST.unlockFiscalYear({ headers: { Authorization: "Bearer " + token }, - requestContext: { - authorizer: { - roles: "[\"public\"]", - isAdmin: false, - isAuthenticated: false, - }, - }, queryStringParameters: { fiscalYearEnd: "2017" } @@ -148,4 +158,4 @@ describe('Fiscal Year End Test', () => { expect(response.statusCode).toBe(403); }); -}); +}); \ No newline at end of file diff --git a/__tests__/formulaUtils.test.js b/__tests__/formulaUtils.test.js new file mode 100644 index 0000000..3a4b2d6 --- /dev/null +++ b/__tests__/formulaUtils.test.js @@ -0,0 +1,46 @@ +describe("keycloak utility tests", () => { + beforeEach(async () => { + jest.resetModules(); + }); + + test("Creates Update Park with New Sub Area Object", async () => { + const utils = require("../lambda/formulaUtils"); + const response = await utils.createPutFormulaConfigObj( + ["Day Use", "Backcountry Cabins", "Fake Garbage"], + "test-id", + "test-park-name", + "test-orcs", + "test-sub-area-name" + ); + + expect(response).toEqual([ + { + TableName: "bcparks-ar-tests", + ConditionExpression: "attribute_not_exists(sk)", + Item: { + pk: { S: "config::test-id" }, + sk: { S: "Day Use" }, + parkName: { S: "test-park-name" }, + orcs: { S: "test-orcs" }, + subAreaId: { S: "test-id" }, + subAreaName: { S: "test-sub-area-name" }, + attendanceVehiclesModifier: { N: "3.5" }, + attendanceBusModifier: { N: "40" }, + }, + }, + { + TableName: "bcparks-ar-tests", + ConditionExpression: "attribute_not_exists(sk)", + Item: { + pk: { S: "config::test-id" }, + sk: { S: "Backcountry Cabins" }, + parkName: { S: "test-park-name" }, + orcs: { S: "test-orcs" }, + subAreaId: { S: "test-id" }, + subAreaName: { S: "test-sub-area-name" }, + attendanceModifier: { N: "3.2" }, + }, + }, + ]); + }); +}); diff --git a/__tests__/global/data.json b/__tests__/global/data.json new file mode 100644 index 0000000..3871bea --- /dev/null +++ b/__tests__/global/data.json @@ -0,0 +1,266 @@ +{ + "PARKSLIST": [ + { + "sk": "0041", + "orcs": "0041", + "subAreas": [ + { + "name": "Maple Bay", + "id": "0087" + }, + { + "name": "Teapot Hill", + "id": "0089" + } + ], + "pk": "park", + "parkName": "Cultus Lake Park" + }, + { + "sk": "6161", + "orcs": "6161", + "subAreas": [ + { + "name": "Holt Creek", + "id": "0074" + } + ], + "pk": "park", + "parkName": "Cowichan River Park" + }, + { + "sk": "HIST", + "subAreas": [ + { + "name": "LEGACY SUBAREA", + "id": "HIST" + } + ], + "pk": "park", + "isLegacy": true, + "parkName": "LEGACY PARK" + } + ], + "SUBAREA_INFORMATION": [ + { + "sk": "0087", + "pk": "park::0041", + "parkName": "Cultus Lake Park", + "activities": [ + "Frontcountry Camping", + "Day Use" + ], + "orcs": "41", + "subAreaName": "Maple Bay" + } + ], + "SUBAREAS": [ + { + "pk": "park::0041", + "sk": "0087", + "activities": [ + "Frontcountry Camping", + "Day Use" + ], + "parkName": "Cultus Lake Park", + "orcs": "41", + "subAreaName": "Maple Bay", + "roles": [ + "sysadmin", + "0041:0087" + ] + }, + { + "pk": "park::0041", + "sk": "0089", + "activities": [ + "Day Use" + ], + "parkName": "Cultus Lake Park", + "orcs": "41", + "subAreaName": "Teapot Hill", + "roles": [ + "sysadmin", + "0041:0089" + ] + }, + { + "pk": "park::6161", + "sk": "0074", + "activities": [ + "Day Use" + ], + "orcs": "6161", + "subAreaName": "Holt Creek" + }, + { + "pk": "park::HIST", + "sk": "HIST", + "isLegacy": true, + "activities": [ + "Frontcountry Camping", + "Frontcountry Cabins", + "Backcountry Camping", + "Backcountry Cabins", + "Group Camping", + "Day Use", + "Boating", + "Legacy Data" + ], + "orcs": "HIST", + "subAreaName": "LEGACY SUBAREA" + } + ], + "SUBAREA_ENTRIES": [ + { + "pk": "0087::Day Use", + "sk": "202204", + "parkName": "Cultus Lake Park", + "picnicRevenue": 2.5, + "attendanceVehicleModifier": 3.5, + "attendanceBusModifier": 40, + "pplVehicleCount": 12, + "subAreaName": "Maple Bay", + "otherHotSpringsRevenue": 5.55, + "pplBusCount": 3, + "pplTrailCounter": 4, + "orcs": "0041", + "notes": "Some notes", + "otherSkiiRevenue": 0, + "picnicRentals": 5 + }, + { + "pk": "0087::Frontcountry Camping", + "sk": "202204", + "parkName": "Cultus Lake Park", + "picnicRevenue": 2.5, + "attendanceVehicleModifier": 3.5, + "attendanceBusModifier": 40, + "pplVehicleCount": 12, + "subAreaName": "Maple Bay", + "otherHotSpringsRevenue": 5.55, + "pplBusCount": 3, + "pplTrailCounter": 4, + "orcs": "0041", + "notes": "Some notes", + "otherSkiiRevenue": 0, + "picnicRentals": 5 + }, + { + "pk": "0087::Frontcountry Camping", + "sk": "201801", + "parkName": "Cultus Lake Park", + "attendanceVehicleModifier": 3.5, + "attendanceBusModifier": 40, + "subAreaName": "Maple Bay", + "orcs": "0041", + "notes": "This one should be locked by fiscal year" + }, + { + "pk": "0087::Frontcountry Camping", + "sk": "201901", + "parkName": "Cultus Lake Park", + "attendanceVehicleModifier": 3.5, + "attendanceBusModifier": 40, + "subAreaName": "Maple Bay", + "orcs": "0041", + "notes": "This one should be locked directly", + "isLocked": false + }, + { + "pk": "HIST::Legacy Data", + "sk": "202303", + "isLegacy": true, + "parkName": "LEGACY PARK", + "subAreaName": "LEGACY SUBAREA", + "orcs": "HIST", + "legacyData": { + "legacy_totalsTotalAttendancePeople": 1123, + "legacy_dataSource": "I made it up" + }, + "notes": "Legacy record for legacy data that doesn't fit into another activity", + "isLocked": false + } + ], + "CONFIG_ENTRIES": [ + { + "pk": "config::0087", + "sk": "Day Use", + "parkName": "Cultus Lake Park", + "attendanceVehicleModifier": 3.5, + "attendanceBusModifier": 40, + "orcs": "0041", + "subAreaName": "Maple Bay", + "subAreaId": "0087", + "activity": "Day Use" + }, + { + "pk": "config::0087", + "sk": "Frontcountry Camping", + "parkName": "Cultus Lake Park", + "attendanceVehicleModifier": 3.5, + "attendanceBusModifier": 40, + "subAreaName": "Maple Bay", + "subAreaId": "0087", + "orcs": "0041", + "activity": "Frontcountry Camping" + } + ], + "FISCAL_YEAR_LOCKS": [ + { + "pk": "fiscalYearEnd", + "sk": "2018", + "isLocked": true + } + ], + "FISCAL_YEAR_LOCKS2": [ + { + "pk": "fiscalYearEnd", + "sk": "2017", + "isLocked": true + } + ], + "JOBSLIST": [ + { + "dateGenerated": "2023-01-05T22:12:49.314Z", + "lastSuccessfulJob": { + "dateGenerated": "2023-01-05T22:12:49.314Z", + "key": "8404d420fd0dd5dc00986111a6bb8d6d/A&R_Export.xlsx" + }, + "progressDescription": "Job Complete. Your document is ready.", + "progressState": "complete", + "sk": "8404d420fd0dd5dc00986111a6bb8d6d", + "pk": "job", + "key": "8404d420fd0dd5dc00986111a6bb8d6d/A&R_Export.xlsx", + "progressPercentage": 100 + } + ], + "VARIANCE_JOBSLIST": [ + { + "dateGenerated": "2023-01-05T22:12:49.314Z", + "lastSuccessfulJob": { + "dateGenerated": "2023-01-05T22:12:49.314Z", + "key": "f36c75c5d08d41effd2ccc8fd077c6ab/A&R_Variance_Report.csv" + }, + "progressDescription": "Job Complete.", + "progressState": "complete", + "sk": "f36c75c5d08d41effd2ccc8fd077c6ab", + "pk": "variance-exp-job", + "progressPercentage": 100 + } + ], + "VARIANCE_MOCKJOB": { + "sk": "VARIANCE_MOCK_JOB_ID", + "progressPercentage": 0, + "key": "MOCK_S3_KEY", + "progressDescription": "", + "lastSuccessfulJob": {} + }, + "MOCKJOB": { + "sk": "MOCK_JOB_ID", + "progressPercentage": 0, + "key": "MOCK_S3_KEY", + "progressDescription": "", + "lastSuccessfulJob": {} + } +} \ No newline at end of file diff --git a/__tests__/global/settings.js b/__tests__/global/settings.js new file mode 100644 index 0000000..7d79337 --- /dev/null +++ b/__tests__/global/settings.js @@ -0,0 +1,13 @@ +const REGION = process.env.AWS_REGION || 'local-env'; +const ENDPOINT = 'http://localhost:8000'; +const TABLE_NAME = process.env.TABLE_NAME || 'ar-tests'; +const CONFIG_TABLE_NAME = process.env.CONFIG_TABLE_NAME || 'ar-config'; +const NAME_CACHE_TABLE_NAME = process.env.NAME_CACHE_TABLE_NAME || 'name-cache'; + +module.exports = { + REGION, + ENDPOINT, + TABLE_NAME, + CONFIG_TABLE_NAME, + NAME_CACHE_TABLE_NAME +}; diff --git a/arSam/__tests__/setup.js b/__tests__/global/setup.js similarity index 97% rename from arSam/__tests__/setup.js rename to __tests__/global/setup.js index bbc21ce..5b5ac24 100644 --- a/arSam/__tests__/setup.js +++ b/__tests__/global/setup.js @@ -1,6 +1,7 @@ const { DynamoDB } = require('@aws-sdk/client-dynamodb'); const { REGION, ENDPOINT, TABLE_NAME, CONFIG_TABLE_NAME, NAME_CACHE_TABLE_NAME } = require('./settings'); +const { logger } = require('../../lambda/logger'); module.exports = async () => { dynamoDb = new DynamoDB({ @@ -107,6 +108,6 @@ module.exports = async () => { } }); } catch (err) { - console.log(err); + logger.error(err); } }; diff --git a/arSam/__tests__/teardown.js b/__tests__/global/teardown.js similarity index 88% rename from arSam/__tests__/teardown.js rename to __tests__/global/teardown.js index 5be3251..092e0ff 100644 --- a/arSam/__tests__/teardown.js +++ b/__tests__/global/teardown.js @@ -1,6 +1,7 @@ const { DynamoDB } = require('@aws-sdk/client-dynamodb'); const { REGION, ENDPOINT, TABLE_NAME, CONFIG_TABLE_NAME, NAME_CACHE_TABLE_NAME } = require('./settings'); +const { logger } = require('../../lambda/logger'); module.exports = async () => { dynamoDb = new DynamoDB({ @@ -22,6 +23,6 @@ module.exports = async () => { TableName: CONFIG_TABLE_NAME }); } catch (err) { - console.log(err); + logger.error(err); } }; diff --git a/__tests__/keycloakUtil.test.js b/__tests__/keycloakUtil.test.js new file mode 100644 index 0000000..e7399bf --- /dev/null +++ b/__tests__/keycloakUtil.test.js @@ -0,0 +1,72 @@ + +describe("keycloak utility tests", () => { + beforeEach(async () => { + jest.resetModules(); + }); + + test("Creates keycloak role", async () => { + const axios = require('axios'); + jest.mock("axios"); + axios.post.mockImplementation(() => Promise.resolve({ statusCode: 200, data: {} })); + const utils = require("../lambda/keycloakUtil"); + const response = await utils.createKeycloakRole('http://localhost/', 'client-id', 'sometoken', '0001:0001', 'Some description'); + expect(response).toEqual({}); + }); + + test("Fails to create keycloak role", async () => { + const axios = require('axios'); + jest.mock("axios"); + axios.post.mockImplementation(() => Promise.reject({ statusCode: 400, data: {} })); + const utils = require("../lambda/keycloakUtil"); + try { + await utils.createKeycloakRole('http://localhost/', 'client-id', 'sometoken', '0001:0001', 'Some description'); + } catch (error) { + expect(error.message).toEqual('Operation Failed.'); + } + }); + + test("Deletes keycloak role", async () => { + const axios = require('axios'); + jest.mock("axios"); + axios.delete.mockImplementation(() => Promise.resolve({ statusCode: 200, data: { } })); + const utils = require("../lambda/keycloakUtil"); + const response = await utils.deleteKeycloakRole('http://localhost/', 'client-id', 'sometoken', '0001:0001'); + expect(response).toEqual({}); + }); + + test("Fails to delete keycloak role", async () => { + const axios = require('axios'); + jest.mock("axios"); + axios.delete.mockImplementation(() => Promise.reject({ statusCode: 400, data: {} })); + const utils = require("../lambda/keycloakUtil"); + try { + await utils.deleteKeycloakRole('http://localhost/', 'client-id', 'sometoken', '0001:0001', 'Some description'); + } catch (error) { + expect(error.message).toEqual('Operation Failed.'); + } + }); + + test("Gets keycloak role", async () => { + const theRole = { + name: 'some role' + }; + const axios = require('axios'); + jest.mock("axios"); + axios.get.mockImplementation(() => Promise.resolve({ statusCode: 200, data: theRole })); + const utils = require("../lambda/keycloakUtil"); + const response = await utils.getKeycloakRole('http://localhost/', 'client-id', 'sometoken', '0001:0001'); + expect(response).toEqual(theRole); + }); + + test("Fails to get keycloak role", async () => { + const axios = require('axios'); + jest.mock("axios"); + axios.get.mockImplementation(() => Promise.reject({ statusCode: 400, data: {} })); + const utils = require("../lambda/keycloakUtil"); + try { + await utils.getKeycloakRole('http://localhost/', 'client-id', 'sometoken', '0001:0001'); + } catch (error) { + expect(error.message).toEqual('Operation Failed.'); + } + }); +}); diff --git a/arSam/handlers/nameUpdate/__tests__/name-update.test.js b/__tests__/name-update.test.js similarity index 97% rename from arSam/handlers/nameUpdate/__tests__/name-update.test.js rename to __tests__/name-update.test.js index ff8a1e9..fde4a5f 100644 --- a/arSam/handlers/nameUpdate/__tests__/name-update.test.js +++ b/__tests__/name-update.test.js @@ -1,6 +1,6 @@ const AWS = require("aws-sdk"); const { DocumentClient } = require("aws-sdk/clients/dynamodb"); -const { REGION, ENDPOINT, TABLE_NAME, NAME_CACHE_TABLE_NAME } = require("../../../__tests__/settings"); +const { REGION, ENDPOINT, TABLE_NAME, NAME_CACHE_TABLE_NAME } = require("./global/settings"); const docClient = new DocumentClient({ region: REGION, endpoint: ENDPOINT, @@ -72,7 +72,7 @@ describe("Name Update Tests", () => { }) ); - const nameUpdateHandler = require("../index"); + const nameUpdateHandler = require("../lambda/nameUpdate/index"); // Cached document keys const CACHED_DOCUMENT = { diff --git a/arSam/handlers/park/__tests__/park.test.js b/__tests__/park.test.js similarity index 68% rename from arSam/handlers/park/__tests__/park.test.js rename to __tests__/park.test.js index cc02c94..0d0ca47 100644 --- a/arSam/handlers/park/__tests__/park.test.js +++ b/__tests__/park.test.js @@ -1,7 +1,7 @@ const AWS = require("aws-sdk"); const { DocumentClient } = require("aws-sdk/clients/dynamodb"); -const { REGION, ENDPOINT, TABLE_NAME } = require("../../../__tests__/settings"); -const { PARKSLIST, SUBAREAS } = require("../../../__tests__/mock_data.json"); +const { REGION, ENDPOINT, TABLE_NAME } = require("./global/settings"); +const { PARKSLIST, SUBAREAS } = require("./global/data.json"); const jwt = require("jsonwebtoken"); const tokenContent = { @@ -40,7 +40,32 @@ async function setupDb() { } describe("Park Test", () => { + const mockedUnauthenticatedInvalidUser = { + decodeJWT: jest.fn((event) => {}), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: false, + roles: [], + isAuthenticated: false, + }; + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }), + }; + const mockedLimitedUser = { + decodeJWT: jest.fn((event) => {}), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: false, + roles: ["0041:0087"], + isAuthenticated: true, + }; + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }), roleFilter: jest.fn((records, roles) => { if (roles.includes('0041:0087')) { return records.filter((subarea) => subarea.roles.includes('0041:0087')); @@ -49,6 +74,34 @@ describe("Park Test", () => { }), }; + const mockedUnauthenticatedUser = { + decodeJWT: jest.fn((event) => { }), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: false, + roles: [], + isAuthenticated: false, + }; + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }), + }; + + const mockedSysadmin = { + decodeJWT: jest.fn((event) => { }), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: true, + roles: ["sysadmin"], + isAuthenticated: true, + }; + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }), + }; + const OLD_ENV = process.env; beforeEach(async () => { jest.resetModules(); @@ -69,13 +122,6 @@ describe("Park Test", () => { Authorization: "Bearer " + token, }, httpMethod: "GET", - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, }; // Ignore legacy parks for now. let modifiedParksList = [...PARKSLIST]; @@ -84,7 +130,10 @@ describe("Park Test", () => { modifiedParksList.splice(index, 1); } } - const parkGET = require("../GET/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const parkGET = require("../lambda/park/GET/index"); const response = await parkGET.handler(event, null); expect(response.statusCode).toBe(200); }); @@ -96,23 +145,15 @@ describe("Park Test", () => { specificSubAreas.push(area); } } - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return mockedLimitedUser; }); - const parkGET = require("../GET/index"); + const parkGET = require("../lambda/park/GET/index"); const response = await parkGET.handler( { headers: { Authorization: "Bearer " + token, }, - httpMethod: "GET", - requestContext: { - authorizer: { - roles: "[\"0041:0087\"]", - isAdmin: false, - isAuthenticated: true, - }, - }, }, null ); @@ -141,20 +182,15 @@ describe("Park Test", () => { specificSubAreas.push(area); } } - const parkGET = require("../GET/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const parkGET = require("../lambda/park/GET/index"); const response = await parkGET.handler( { headers: { Authorization: "Bearer " + token, }, - httpMethod: "GET", - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, queryStringParameters: { orcs: PARKSLIST[0].sk, subAreaId: specificSubAreas[0].sk, @@ -175,23 +211,15 @@ describe("Park Test", () => { specificSubAreas.push(area); } } - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return mockedLimitedUser; }); - const parkGET = require("../GET/index"); + const parkGET = require("../lambda/park/GET/index"); const response = await parkGET.handler( { headers: { Authorization: "Bearer " + token, }, - httpMethod: "GET", - requestContext: { - authorizer: { - roles: "[\"0041:0087\"]", - isAdmin: false, - isAuthenticated: true, - }, - }, queryStringParameters: { orcs: PARKSLIST[0].sk, subAreaId: specificSubAreas[0].sk, @@ -205,40 +233,33 @@ describe("Park Test", () => { }); test("Handler - 403 GET Invalid", async () => { - const parkGET = require("../GET/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedUnauthenticatedInvalidUser; + }); + const parkGET = require("../lambda/park/GET/index"); const response = await parkGET.handler( { headers: { Authorization: "Bearer " + token + "invalid", }, - requestContext: { - authorizer: { - roles: "[\"public\"]", - isAdmin: false, - isAuthenticated: false, - }, - }, }, null ); + expect(response.statusCode).toBe(403); expect(response.body).toBe('{"msg":"Error: UnAuthenticated."}'); }); test("Handler - 400 GET Bad Request", async () => { - const parkGET = require("../GET/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const parkGET = require("../lambda/park/GET/index"); const response = await parkGET.handler( { headers: { Authorization: "Bearer " + token + "invalid", }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, queryStringParameters: { badParam: "oops", }, @@ -250,19 +271,15 @@ describe("Park Test", () => { }); test("Handler - 400 POST Bad Request", async () => { - const parkPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const parkPOST = require("../lambda/park/POST/index"); const response = await parkPOST.handler( { headers: { Authorization: "Bearer " + token + "invalid", }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, body: JSON.stringify({ badParam: "{xxxxxx}", }), @@ -274,19 +291,15 @@ describe("Park Test", () => { }); test("Handler - 400 POST Park", async () => { - const parkPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const parkPOST = require("../lambda/park/POST/index"); const response = await parkPOST.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, body: JSON.stringify({ orcs: "0000", someconfig: "test", @@ -299,44 +312,36 @@ describe("Park Test", () => { }); test("Handler - 200 POST Park", async () => { - const parkPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const parkPOST = require("../lambda/park/POST/index"); const response = await parkPOST.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, body: JSON.stringify({ orcs: "0000", parkName: "test", - isLegacy: "false" }), }, null ); + expect(response.statusCode).toBe(200); }); test("Handler - 403 POST Park Invalid User", async () => { - const parkPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedUnauthenticatedInvalidUser; + }); + const parkPOST = require("../lambda/park/POST/index"); const response = await parkPOST.handler( { headers: { Authorization: "Bearer " + token + "invalid", }, - requestContext: { - authorizer: { - roles: "[\"public\"]", - isAdmin: false, - isAuthenticated: false, - }, - }, }, null ); @@ -345,19 +350,15 @@ describe("Park Test", () => { }); test("Handler - 403 POST Park Unauthorized User", async () => { - const parkPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedUnauthenticatedUser; + }); + const parkPOST = require("../lambda/park/POST/index"); const response = await parkPOST.handler( { headers: { Authorization: "Bearer " + token + "invalid", }, - requestContext: { - authorizer: { - roles: "[]", - isAdmin: false, - isAuthenticated: false, - }, - }, }, null ); diff --git a/arSam/handlers/subArea/__tests__/subArea.test.js b/__tests__/subArea.test.js similarity index 79% rename from arSam/handlers/subArea/__tests__/subArea.test.js rename to __tests__/subArea.test.js index 0cd99f7..af76838 100644 --- a/arSam/handlers/subArea/__tests__/subArea.test.js +++ b/__tests__/subArea.test.js @@ -5,8 +5,8 @@ const { ENDPOINT, TABLE_NAME, CONFIG_TABLE_NAME, -} = require("../../../__tests__/settings"); -const { PARKSLIST } = require("../../../__tests__/mock_data.json"); +} = require("./global/settings"); +const { PARKSLIST } = require("./global/data.json"); const jwt = require("jsonwebtoken"); const tokenContent = { @@ -107,14 +107,65 @@ async function setupDb() { } describe("Sub Area Test", () => { - const mockKeycloakRoles = { - createKeycloakRole: jest.fn().mockImplementation(() => - Promise.resolve({ - id: '123', - name: 'test-role', - }) - ) + const mockedUnauthenticatedInvalidUser = { + decodeJWT: jest.fn((event) => {}), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: false, + roles: [], + isAuthenticated: false, + }; + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }), + }; + + const mockedLimitedUser = { + decodeJWT: jest.fn((event) => {}), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: false, + roles: ["0041:0084"], + isAuthenticated: true, + }; + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }), + roleFilter: jest.fn((records, roles) => { + return records.filter((park) => park.orcs === "0041"); + }), + }; + + const mockedUnauthenticatedUser = { + decodeJWT: jest.fn((event) => {}), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: false, + roles: [], + isAuthenticated: false, + }; + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }), }; + + const mockedSysadmin = { + decodeJWT: jest.fn((event) => {}), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: true, + roles: ["sysadmin"], + isAuthenticated: true, + }; + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }), + }; + const OLD_ENV = process.env; beforeEach(async () => { jest.resetModules(); @@ -130,8 +181,14 @@ describe("Sub Area Test", () => { }); test("Handler - 200 Sub Area POST Success", async () => { - jest.mock('/opt/keycloakLayer', () => { - return mockKeycloakRoles + const axios = require("axios"); + jest.mock("axios"); + axios.post.mockImplementation(() => + Promise.resolve({ statusCode: 200, data: {} }) + ); + + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; }); let config = await docClient @@ -144,19 +201,12 @@ describe("Sub Area Test", () => { .promise(); const lastID = Object.keys(config).length === 0 ? 0 : config.Item.lastID; - const subAreaPOST = require("../POST/index"); + const subAreaPOST = require("../lambda/subArea/POST/index"); const response = await subAreaPOST.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, body: JSON.stringify({ activities: ["Day Use"], orcs: "0041" + suffix, @@ -191,19 +241,15 @@ describe("Sub Area Test", () => { Promise.resolve({ statusCode: 200, data: {} }) ); - const subAreaPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedUnauthenticatedInvalidUser; + }); + const subAreaPOST = require("../lambda/subArea/POST/index"); const response = await subAreaPOST.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"public\"]", - isAdmin: false, - isAuthenticated: false, - }, - }, body: JSON.stringify({ activities: ["Day Use"], orcs: "0041" + suffix, @@ -226,19 +272,15 @@ describe("Sub Area Test", () => { Promise.resolve({ statusCode: 200, data: {} }) ); - const subAreaPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedUnauthenticatedInvalidUser; + }); + const subAreaPOST = require("../lambda/subArea/POST/index"); const response = await subAreaPOST.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"public\"]", - isAdmin: false, - isAuthenticated: false, - }, - }, body: JSON.stringify({ activities: ["Day Use"], orcs: "0041" + suffix, @@ -261,19 +303,15 @@ describe("Sub Area Test", () => { Promise.resolve({ statusCode: 200, data: {} }) ); - const subAreaPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedUnauthenticatedUser; + }); + const subAreaPOST = require("../lambda/subArea/POST/index"); const response = await subAreaPOST.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"public\"]", - isAdmin: false, - isAuthenticated: false, - }, - }, body: JSON.stringify({ activities: ["Day Use"], orcs: "0041" + suffix, @@ -297,19 +335,15 @@ describe("Sub Area Test", () => { Promise.resolve({ statusCode: 200, data: {} }) ); - const subAreaPOST = require("../POST/index"); + jest.mock("../lambda/permissionUtil", () => { + return mockedLimitedUser; + }); + const subAreaPOST = require("../lambda/subArea/POST/index"); const response = await subAreaPOST.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"0041:0084\"]", - isAdmin: false, - isAuthenticated: true, - }, - }, body: JSON.stringify({ activities: ["Day Use"], orcs: "0041" + suffix, @@ -332,19 +366,16 @@ describe("Sub Area Test", () => { axios.post.mockImplementation(() => Promise.resolve({ statusCode: 200, data: {} }) ); - const subAreaPOST = require("../POST/index"); + + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const subAreaPOST = require("../lambda/subArea/POST/index"); const response = await subAreaPOST.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, body: JSON.stringify({ activities: ["Day Use"], managementArea: "South Fraser", @@ -366,19 +397,16 @@ describe("Sub Area Test", () => { axios.post.mockImplementation(() => Promise.resolve({ statusCode: 200, data: {} }) ); - const subAreaPOST = require("../POST/index"); + + jest.mock("../lambda/permissionUtil", () => { + return mockedSysadmin; + }); + const subAreaPOST = require("../lambda/subArea/POST/index"); const response = await subAreaPOST.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - }, body: JSON.stringify({ activities: ["Day Use"], orcs: "fakeOrc", @@ -397,19 +425,12 @@ describe("Sub Area Test", () => { test("Handler - 400 Sub Area DELETE Bad Request", async () => { // Returns if there are no query string parameters - const subAreaDELETE = require("../DELETE/index"); + const subAreaDELETE = require("../lambda/subArea/DELETE/index"); const response = await subAreaDELETE.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: "[\"sysadmin\"]", - isAdmin: true, - isAuthenticated: true, - }, - } }); expect(response.statusCode).toBe(400); }); @@ -421,7 +442,7 @@ describe("Sub Area Test", () => { Promise.resolve({ statusCode: 200, data: {} }) ); - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return { requirePermissions: () => { throw { @@ -431,7 +452,7 @@ describe("Sub Area Test", () => { } }; }); - const subAreaDELETE = require("../DELETE/index"); + const subAreaDELETE = require("../lambda/subArea/DELETE/index"); const response = await subAreaDELETE.handler( { headers: { @@ -456,7 +477,7 @@ describe("Sub Area Test", () => { Promise.resolve({ statusCode: 200, data: {} }) ); - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return { requirePermissions: () => { throw { @@ -466,7 +487,7 @@ describe("Sub Area Test", () => { } }; }); - const subAreaDELETE = require("../DELETE/index"); + const subAreaDELETE = require("../lambda/subArea/DELETE/index"); const response = await subAreaDELETE.handler( { headers: { @@ -491,7 +512,7 @@ describe("Sub Area Test", () => { Promise.resolve({ statusCode: 200, data: {} }) ); - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return { requirePermissions: () => { return { @@ -501,7 +522,7 @@ describe("Sub Area Test", () => { }, }; }); - const subAreaDELETE = require("../DELETE/index"); + const subAreaDELETE = require("../lambda/subArea/DELETE/index"); const response = await subAreaDELETE.handler( { headers: { @@ -526,7 +547,7 @@ describe("Sub Area Test", () => { Promise.resolve({ statusCode: 200, data: {} }) ); - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return { requirePermissions: () => { return { @@ -536,7 +557,7 @@ describe("Sub Area Test", () => { }, }; }); - const subAreaDELETE = require("../DELETE/index"); + const subAreaDELETE = require("../lambda/subArea/DELETE/index"); const parkObject = PARKSLIST[1]; const qsp = { orcs: parkObject.orcs, @@ -563,7 +584,7 @@ describe("Sub Area Test", () => { Promise.resolve({ statusCode: 200, data: {} }) ); - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return { requirePermissions: () => { return { @@ -573,7 +594,7 @@ describe("Sub Area Test", () => { }, }; }); - const subAreaDELETE = require("../DELETE/index"); + const subAreaDELETE = require("../lambda/subArea/DELETE/index"); // Delete the first subarea from PARKSLIST const parkObject = PARKSLIST[0]; diff --git a/__tests__/subAreaUtils.test.js b/__tests__/subAreaUtils.test.js new file mode 100644 index 0000000..13ad4fa --- /dev/null +++ b/__tests__/subAreaUtils.test.js @@ -0,0 +1,91 @@ +describe('keycloak utility tests', () => { + beforeEach(async () => { + jest.resetModules(); + }); + + const testSubAreaObj = { + activities: ['Day Use'], + managementArea: 'test-managementArea', + section: 'test-section', + region: 'test-region', + bundle: 'test-bundle', + subAreaName: 'test-subAreaName', + parkName: 'test-parkName', + roles: ['sysadmin'], + orcs: 'test-orcs', + }; + + test('Creates Update Park with New Sub Area Object', async () => { + const utils = require('../lambda/subAreaUtils'); + const response = await utils.createUpdateParkWithNewSubAreaObj('test-name', 'test-id', false, 'test-orcs'); + + expect(response).toEqual({ + TableName: 'bcparks-ar-tests', + Key: { pk: { S: 'park' }, sk: { S: 'test-orcs' } }, + ExpressionAttributeValues: { + ':subAreas': { + L: [ + { + M: { + id: { + S: 'test-id', + }, + isLegacy: { + BOOL: false, + }, + name: { + S: 'test-name', + }, + }, + }, + ], + }, + }, + UpdateExpression: 'SET subAreas = list_append(subAreas, :subAreas)', + }); + }); + + test('Creates Put Sub Area Obj', async () => { + const utils = require('../lambda/subAreaUtils'); + const response = await utils.createPutSubAreaObj(testSubAreaObj, 'test-id', 'test-name'); + + expect(response).toEqual({ + TableName: 'bcparks-ar-tests', + ConditionExpression: 'attribute_not_exists(sk)', + Item: { + pk: { S: 'park::test-orcs' }, + sk: { S: 'test-id' }, + activities: { SS: ['Day Use'] }, + managementArea: { S: 'test-managementArea' }, + section: { S: 'test-section' }, + region: { S: 'test-region' }, + bundle: { S: 'test-bundle' }, + subAreaName: { S: 'test-subAreaName' }, + parkName: { S: 'test-name' }, + roles: { L: [{ S: 'sysadmin' }] }, + orcs: { S: 'test-orcs' }, + }, + }); + }); + + test('Creates Valid Sub Area Object', async () => { + const utils = require('../lambda/subAreaUtils'); + const garbage = { test: 'fake', whatever: [] }; + const testSubAreaObjWithGarbage = { ...testSubAreaObj, ...garbage }; + + const response = await utils.getValidSubareaObj(testSubAreaObjWithGarbage, 'test-name', 'test-subAreaId'); + + expect(response).toEqual({ + parkName: 'test-name', + orcs: 'test-orcs', + activities: ['Day Use'], + managementArea: 'test-managementArea', + section: 'test-section', + region: 'test-region', + bundle: 'test-bundle', + subAreaName: 'test-subAreaName', + isLegacy: false, + roles: ['sysadmin', 'test-orcs:test-subAreaId'], + }); + }); +}); diff --git a/arSam/handlers/variance/__tests__/variance.test.js b/__tests__/variance.test.js similarity index 74% rename from arSam/handlers/variance/__tests__/variance.test.js rename to __tests__/variance.test.js index 3e69269..b8f2c82 100644 --- a/arSam/handlers/variance/__tests__/variance.test.js +++ b/__tests__/variance.test.js @@ -4,7 +4,7 @@ const { REGION, ENDPOINT, TABLE_NAME -} = require("../../../__tests__/settings"); +} = require("./global/settings"); const jwt = require("jsonwebtoken"); const tokenContent = { @@ -65,18 +65,51 @@ async function setupDb() { describe("Variance Test", () => { const mockedUnauthenticatedInvalidUser = { + decodeJWT: jest.fn((event) => {}), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: false, + roles: [], + isAuthenticated: false, + }; + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }), roleFilter: jest.fn((records, roles) => { return {} }) }; const mockedLimitedUser = { + decodeJWT: jest.fn((event) => {}), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: false, + roles: ["0041:0084"], + isAuthenticated: true, + }; + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }), roleFilter: jest.fn((records, roles) => { return records.filter((park) => park.orcs === "0041"); }), }; const mockedSysadmin = { + decodeJWT: jest.fn((event) => {}), + resolvePermissions: jest.fn((token) => { + return { + isAdmin: true, + roles: ["sysadmin"], + isAuthenticated: true, + }; + }), + getParkAccess: jest.fn((orcs, permissionObject) => { + return {}; + }), roleFilter: jest.fn((records, roles) => { return records; }), @@ -97,23 +130,16 @@ describe("Variance Test", () => { }); test("Variance GET Single PK Success", async () => { - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return mockedSysadmin; }); - const varianceGET = require("../GET/index"); + const varianceGET = require("../lambda/variance/GET/index"); const response = await varianceGET.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: ["[\"sysadmin\"]"], - isAdmin: true, - isAuthenticated: true - } - }, queryStringParameters: { orcs: '0001', date: "202201", @@ -127,23 +153,16 @@ describe("Variance Test", () => { }); test("Variance GET Single SK Success", async () => { - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return mockedSysadmin; }); - const varianceGET = require("../GET/index"); + const varianceGET = require("../lambda/variance/GET/index"); const response = await varianceGET.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: ["[\"sysadmin\"]"], - isAdmin: true, - isAuthenticated: true - } - }, queryStringParameters: { orcs: '0001', activity: "Day Use", @@ -159,23 +178,16 @@ describe("Variance Test", () => { }); test("Variance GET Success 200 but no permissions for records", async () => { - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return mockedLimitedUser; }); - const varianceGET = require("../GET/index"); + const varianceGET = require("../lambda/variance/GET/index"); const response = await varianceGET.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: ["[\"0041:0084\"]"], - isAdmin: false, - isAuthenticated: true - } - }, queryStringParameters: { orcs: '0001', activity: "Day Use", @@ -191,27 +203,20 @@ describe("Variance Test", () => { }); test("Variance GET FAIL 403 public user", async () => { - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return mockedUnauthenticatedInvalidUser; }); - const varianceGET = require("../GET/index"); + const varianceGET = require("../lambda/variance/GET/index"); const response = await varianceGET.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: ["[\"public\"]"], - isAdmin: false, - isAuthenticated: false - } - }, queryStringParameters: { activity: "Day Use", date: "2022-01-01", - subAreaId: "0001" + subAreaId: "0001", }, }, null @@ -222,23 +227,16 @@ describe("Variance Test", () => { }); test("Variance GET FAIL invalid params", async () => { - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return mockedSysadmin; }); - const varianceGET = require("../GET/index"); + const varianceGET = require("../lambda/variance/GET/index"); const response = await varianceGET.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: ["[\"sysadmin\"]"], - isAdmin: true, - isAuthenticated: true - } - }, queryStringParameters: {}, }, null @@ -249,7 +247,7 @@ describe("Variance Test", () => { }); test("Variance should trigger", async () => { - const { calculateVariance } = require("/opt/varianceLayer"); + const { calculateVariance } = require("../lambda/varianceUtils"); const res = calculateVariance([8, 8, 8], 10, 0.2); expect(res).toEqual({ averageHistoricValue: 8, @@ -260,7 +258,7 @@ describe("Variance Test", () => { }); test("Variance should trigger 2", async () => { - const { calculateVariance } = require("/opt/varianceLayer"); + const { calculateVariance } = require("../lambda/varianceUtils"); const res = calculateVariance([8.5, 8.5, 8.5], 10.8, 0.2); expect(res).toEqual({ averageHistoricValue: 8.5, @@ -271,7 +269,7 @@ describe("Variance Test", () => { }); test("Variance should trigger 3", async () => { - const { calculateVariance } = require("/opt/varianceLayer"); + const { calculateVariance } = require("../lambda/varianceUtils"); const res = calculateVariance([8.5, 8.5, 8.5], 0.8, 0.2); expect(res).toEqual({ averageHistoricValue: 8.5, @@ -282,7 +280,7 @@ describe("Variance Test", () => { }); test("Variance should not trigger", async () => { - const { calculateVariance } = require("/opt/varianceLayer"); + const { calculateVariance } = require("../lambda/varianceUtils"); const res = calculateVariance([10.2, 10.2, 10.2], 10.2, 0.25); expect(res).toEqual({ averageHistoricValue: 10.2, @@ -293,7 +291,7 @@ describe("Variance Test", () => { }); test("Variance should calculate variance with two years", async () => { - const { calculateVariance } = require("/opt/varianceLayer"); + const { calculateVariance } = require("../lambda/varianceUtils"); const res = calculateVariance([8, 8, null], 10, 0.2); expect(res).toEqual({ averageHistoricValue: 8, @@ -304,22 +302,15 @@ describe("Variance Test", () => { }); test("Variance PUT FAIL invalid params", async () => { - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return mockedSysadmin; }); - const variancePUT = require("../PUT/index"); + const variancePUT = require("../lambda/variance/PUT/index"); const response = await variancePUT.handler( { headers: { Authorization: "Bearer " + token, - }, - requestContext: { - authorizer: { - roles: ["[\"sysadmin\"]"], - isAdmin: true, - isAuthenticated: true - } } }, null @@ -330,22 +321,15 @@ describe("Variance Test", () => { }); test("Variance PUT FAIL 403 public user", async () => { - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return mockedUnauthenticatedInvalidUser; }); - const variancePUT = require("../PUT/index"); + const variancePUT = require("../lambda/variance/PUT/index"); const response = await variancePUT.handler( { headers: { Authorization: "Bearer " + token, - }, - requestContext: { - authorizer: { - roles: ["[\"public\"]"], - isAdmin: false, - isAuthenticated: false - } } }, null @@ -356,23 +340,16 @@ describe("Variance Test", () => { }); test("Variance PUT FAIL 403 limited user", async () => { - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return mockedLimitedUser; }); - const variancePUT = require("../PUT/index"); + const variancePUT = require("../lambda/variance/PUT/index"); const response = await variancePUT.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: ["[\"0041:0084\"]"], - isAdmin: false, - isAuthenticated: true - } - }, body: JSON.stringify({ subAreaId: "0403", orcs: "0001", @@ -392,23 +369,16 @@ describe("Variance Test", () => { Promise.resolve({ statusCode: 200, data: {} }) ); - jest.mock("/opt/permissionLayer", () => { + jest.mock("../lambda/permissionUtil", () => { return mockedSysadmin; }); - const variancePUT = require("../PUT/index"); + const variancePUT = require("../lambda/variance/PUT/index"); const response = await variancePUT.handler( { headers: { Authorization: "Bearer " + token, }, - requestContext: { - authorizer: { - roles: ["[\"sysadmin\"]"], - isAdmin: true, - isAuthenticated: true - } - }, body: JSON.stringify({ subAreaId: "0403", orcs: "0001", diff --git a/arSam/.gitignore b/arSam/.gitignore deleted file mode 100644 index 805f708..0000000 --- a/arSam/.gitignore +++ /dev/null @@ -1,208 +0,0 @@ - -# Created by https://www.toptal.com/developers/gitignore/api/osx,node,linux,windows,sam -# Edit at https://www.toptal.com/developers/gitignore?templates=osx,node,linux,windows,sam - -### Linux ### -*~ - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* -vars.json -### Node ### -# 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 - -# Optional stylelint cache -.stylelintcache - -# 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 -.env*.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt -dist - -# Storybook build outputs -.out -.storybook-out -storybook-static - -# rollup.js default build output -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 - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# Temporary folders -tmp/ -temp/ - -### OSX ### -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -### SAM ### -# Ignore build directories for the AWS Serverless Application Model (SAM) -# Info: https://aws.amazon.com/serverless/sam/ -# Docs: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-reference.html - -**/.aws-sam - -### Windows ### -# Windows thumbnail cache files -Thumbs.db -Thumbs.db:encryptable -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -# End of https://www.toptal.com/developers/gitignore/api/osx,node,linux,windows,sam diff --git a/arSam/__tests__/mock_data.json b/arSam/__tests__/mock_data.json deleted file mode 100644 index 183d8de..0000000 --- a/arSam/__tests__/mock_data.json +++ /dev/null @@ -1,266 +0,0 @@ -{ - "PARKSLIST": [ - { - "sk": "0041", - "orcs": "0041", - "subAreas": [ - { - "name": "Maple Bay", - "id": "0087" - }, - { - "name": "Teapot Hill", - "id": "0089" - } - ], - "pk": "park", - "parkName": "Cultus Lake Park" - }, - { - "sk": "6161", - "orcs": "6161", - "subAreas": [ - { - "name": "Holt Creek", - "id": "0074" - } - ], - "pk": "park", - "parkName": "Cowichan River Park" - }, - { - "sk": "HIST", - "subAreas": [ - { - "name": "LEGACY SUBAREA", - "id": "HIST" - } - ], - "pk": "park", - "isLegacy": true, - "parkName": "LEGACY PARK" - } - ], - "SUBAREA_INFORMATION": [ - { - "sk": "0087", - "pk": "park::0041", - "parkName": "Cultus Lake Park", - "activities": [ - "Frontcountry Camping", - "Day Use" - ], - "orcs": "41", - "subAreaName": "Maple Bay" - } - ], - "SUBAREAS": [ - { - "pk": "park::0041", - "sk": "0087", - "activities": [ - "Frontcountry Camping", - "Day Use" - ], - "parkName": "Cultus Lake Park", - "orcs": "41", - "subAreaName": "Maple Bay", - "roles": [ - "sysadmin", - "0041:0087" - ] - }, - { - "pk": "park::0041", - "sk": "0089", - "activities": [ - "Day Use" - ], - "parkName": "Cultus Lake Park", - "orcs": "41", - "subAreaName": "Teapot Hill", - "roles": [ - "sysadmin", - "0041:0089" - ] - }, - { - "pk": "park::6161", - "sk": "0074", - "activities": [ - "Day Use" - ], - "orcs": "6161", - "subAreaName": "Holt Creek" - }, - { - "pk": "park::HIST", - "sk": "HIST", - "isLegacy": true, - "activities": [ - "Frontcountry Camping", - "Frontcountry Cabins", - "Backcountry Camping", - "Backcountry Cabins", - "Group Camping", - "Day Use", - "Boating", - "Legacy Data" - ], - "orcs": "HIST", - "subAreaName": "LEGACY SUBAREA" - } - ], - "SUBAREA_ENTRIES": [ - { - "pk": "0087::Day Use", - "sk": "202204", - "parkName": "Cultus Lake Park", - "picnicRevenue": 2.5, - "attendanceVehicleModifier": 3.5, - "attendanceBusModifier": 40, - "pplVehicleCount": 12, - "subAreaName": "Maple Bay", - "otherHotSpringsRevenue": 5.55, - "pplBusCount": 3, - "pplTrailCounter": 4, - "orcs": "0041", - "notes": "Some notes", - "otherSkiiRevenue": 0, - "picnicRentals": 5 - }, - { - "pk": "0087::Frontcountry Camping", - "sk": "202204", - "parkName": "Cultus Lake Park", - "picnicRevenue": 2.5, - "attendanceVehicleModifier": 3.5, - "attendanceBusModifier": 40, - "pplVehicleCount": 12, - "subAreaName": "Maple Bay", - "otherHotSpringsRevenue": 5.55, - "pplBusCount": 3, - "pplTrailCounter": 4, - "orcs": "0041", - "notes": "Some notes", - "otherSkiiRevenue": 0, - "picnicRentals": 5 - }, - { - "pk": "0087::Frontcountry Camping", - "sk": "201801", - "parkName": "Cultus Lake Park", - "attendanceVehicleModifier": 3.5, - "attendanceBusModifier": 40, - "subAreaName": "Maple Bay", - "orcs": "0041", - "notes": "This one should be locked by fiscal year" - }, - { - "pk": "0087::Frontcountry Camping", - "sk": "201901", - "parkName": "Cultus Lake Park", - "attendanceVehicleModifier": 3.5, - "attendanceBusModifier": 40, - "subAreaName": "Maple Bay", - "orcs": "0041", - "notes": "This one should be locked directly", - "isLocked": false - }, - { - "pk": "HIST::Legacy Data", - "sk": "202303", - "isLegacy": true, - "parkName": "LEGACY PARK", - "subAreaName": "LEGACY SUBAREA", - "orcs": "HIST", - "legacyData": { - "legacy_totalsTotalAttendancePeople": 1123, - "legacy_dataSource": "I made it up" - }, - "notes": "Legacy record for legacy data that doesn't fit into another activity", - "isLocked": false - } - ], - "CONFIG_ENTRIES": [ - { - "pk": "config::0087", - "sk": "Day Use", - "parkName": "Cultus Lake Park", - "attendanceVehicleModifier": 3.5, - "attendanceBusModifier": 40, - "orcs": "0041", - "subAreaName": "Maple Bay", - "subAreaId": "0087", - "activity": "Day Use" - }, - { - "pk": "config::0087", - "sk": "Frontcountry Camping", - "parkName": "Cultus Lake Park", - "attendanceVehicleModifier": 3.5, - "attendanceBusModifier": 40, - "subAreaName": "Maple Bay", - "subAreaId": "0087", - "orcs": "0041", - "activity": "Frontcountry Camping" - } - ], - "FISCAL_YEAR_LOCKS": [ - { - "pk": "fiscalYearEnd", - "sk": "2018", - "isLocked": true - } - ], - "FISCAL_YEAR_LOCKS2": [ - { - "pk": "fiscalYearEnd", - "sk": "2017", - "isLocked": true - } - ], - "JOBSLIST": [ - { - "dateGenerated": "2023-01-05T22:12:49.314Z", - "lastSuccessfulJob": { - "dateGenerated": "2023-01-05T22:12:49.314Z", - "key": "8404d420fd0dd5dc00986111a6bb8d6d/A&R_Export.xlsx" - }, - "progressDescription": "Job Complete. Your document is ready.", - "progressState": "complete", - "sk": "8404d420fd0dd5dc00986111a6bb8d6d", - "pk": "job", - "key": "8404d420fd0dd5dc00986111a6bb8d6d/A&R_Export.xlsx", - "progressPercentage": 100 - } - ], - "VARIANCE_JOBSLIST": [ - { - "dateGenerated": "2023-01-05T22:12:49.314Z", - "lastSuccessfulJob": { - "dateGenerated": "2023-01-05T22:12:49.314Z", - "key": "f36c75c5d08d41effd2ccc8fd077c6ab/A&R_Variance_Report.csv" - }, - "progressDescription": "Job Complete.", - "progressState": "complete", - "sk": "f36c75c5d08d41effd2ccc8fd077c6ab", - "pk": "variance-exp-job", - "progressPercentage": 100 - } - ], - "VARIANCE_MOCKJOB": { - "sk": "VARIANCE_MOCK_JOB_ID", - "progressPercentage": 0, - "key": "MOCK_S3_KEY", - "progressDescription": "", - "lastSuccessfulJob": {} - }, - "MOCKJOB": { - "sk": "MOCK_JOB_ID", - "progressPercentage": 0, - "key": "MOCK_S3_KEY", - "progressDescription": "", - "lastSuccessfulJob": {} - } - } diff --git a/arSam/__tests__/settings.js b/arSam/__tests__/settings.js deleted file mode 100644 index b9ccd06..0000000 --- a/arSam/__tests__/settings.js +++ /dev/null @@ -1,13 +0,0 @@ -const REGION = process.env.AWS_REGION || 'local'; -const ENDPOINT = 'http://localhost:8000'; -const TABLE_NAME = process.env.TABLE_NAME || 'ParksAr-tests'; -const CONFIG_TABLE_NAME = process.env.CONFIG_TABLE_NAME || 'ConfigAr-tests'; -const NAME_CACHE_TABLE_NAME = process.env.NAME_CACHE_TABLE_NAME || 'NameCacheAr-tests'; - -module.exports = { - REGION, - ENDPOINT, - TABLE_NAME, - CONFIG_TABLE_NAME, - NAME_CACHE_TABLE_NAME, -}; diff --git a/arSam/handlers/activity/DELETE/index.js b/arSam/handlers/activity/DELETE/index.js deleted file mode 100644 index 772d345..0000000 --- a/arSam/handlers/activity/DELETE/index.js +++ /dev/null @@ -1,7 +0,0 @@ -const { logger } = require("/opt/baseLayer"); - -exports.handler = async (event, context) => { - logger.debug("Activity delete:", event); - return sendResponse(501, { msg: "Error: Not implemented." }, context); -}; - \ No newline at end of file diff --git a/arSam/handlers/activity/POST/package.json b/arSam/handlers/activity/POST/package.json deleted file mode 100644 index 07a4672..0000000 --- a/arSam/handlers/activity/POST/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "activityPostFunction", - "version": "1.0.0", - "author": "Digitalspace ", - "dependencies": { - "@aws-sdk/util-dynamodb": "^3.529.1", - "luxon": "^3.2.1" - } -} diff --git a/arSam/handlers/authorizer/index.js b/arSam/handlers/authorizer/index.js deleted file mode 100644 index 3d0a0af..0000000 --- a/arSam/handlers/authorizer/index.js +++ /dev/null @@ -1,97 +0,0 @@ -const { decodeJWT, resolvePermissions } = require('/opt/permissionLayer'); -const { logger } = require('/opt/baseLayer'); - -const SSO_ISSUER = process.env.SSO_ISSUER || 'https://dev.loginproxy.gov.bc.ca/auth/realms/bcparks-service-transformation'; -const SSO_JWKSURI = process.env.SSO_JWKSURI || 'https://dev.loginproxy.gov.bc.ca/auth/realms/bcparks-service-transformation/protocol/openid-connect/certs'; - -const publicPermissionObject = { - isAdmin: false, - role: ['public'] -}; - -exports.handler = async function (event, context, callback) { - logger.debug('event', JSON.stringify(event)); - - const headers = event?.headers; - let token = undefined; - let permissionObject = undefined; - - if (headers?.Authorization && headers.Authorization !== 'None') { - // Authorization: None is required because we don't have lambda@edge. - // Until then, all unauth stuff needs to be here. - // This is why methodARN isn't here. - token = await decodeJWT(event, SSO_ISSUER, SSO_JWKSURI); - logger.debug('token', JSON.stringify(token)); - - if (!token.decoded) { - logger.debug('Issue decoding token.'); - return generatePolicy('user', 'Deny', event.methodArn); - } - - permissionObject = resolvePermissions(token); - logger.debug('permissionObject', JSON.stringify(permissionObject)); - if (!permissionObject.isAuthenticated) { - logger.debug('User is not authenticated.'); - return generatePolicy('user', 'Deny', event.methodArn); - } - } - - const methodArn = event.methodArn.replace(`${event.httpMethod}${event.path}`, `*`); - - if (!headers?.Authorization || headers?.Authorization === 'None') { - logger.info(`Public user`); - // Public user. - return generatePolicy('public', 'Allow', methodArn, publicPermissionObject, headers); - } - - // Sysadmin - logger.debug('User authenticated.'); - - // extract the base API gateway ARN from the event so that a policy can be generated for all routes - // TODO: this will likely have to change to enforce more granular role permissions - logger.info(`methodArn: ${event.methodArn}`); - - return generatePolicy(token.data.sid, 'Allow', methodArn, permissionObject, headers); -}; - -// Help function to generate an IAM policy -let generatePolicy = function (principalId, effect, methodArn, permissionObject, headers) { - logger.debug('principalId', principalId); - let authResponse = {}; - - // Set principal Id - authResponse.principalId = principalId; - if (effect && methodArn) { - let policyDocument = {}; - policyDocument.Version = '2012-10-17'; - policyDocument.Statement = []; - let statementOne = {}; - statementOne.Action = 'execute-api:Invoke'; - statementOne.Effect = effect; - statementOne.Resource = methodArn; - policyDocument.Statement[0] = statementOne; - - // Set Policy Document - authResponse.policyDocument = policyDocument; - } - - if (effect === 'Allow') { - return handleContext(authResponse, permissionObject, headers); - } else { - return authResponse; - } -}; - -function handleContext(authResponse, permissionObject, headers) { - // Optional output with custom properties of the String, Number or Boolean type. - // Set the context - authResponse.context = { - isAdmin: permissionObject?.isAdmin, - userID: permissionObject?.email, - roles: JSON.stringify(permissionObject?.roles), - isAuthenticated: permissionObject?.isAuthenticated - }; - - logger.debug('authResponse', JSON.stringify(authResponse)); - return authResponse; -}; diff --git a/arSam/handlers/cloudwatchAlarm/package.json b/arSam/handlers/cloudwatchAlarm/package.json deleted file mode 100644 index 8087dbf..0000000 --- a/arSam/handlers/cloudwatchAlarm/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "cloudwatchAlarmFunction", - "version": "1.0.0", - "author": "Digitalspace ", - "dependencies": { - "axios": "^1.4.0", - "luxon": "^3.2.1" - } -} diff --git a/arSam/handlers/events/event.json b/arSam/handlers/events/event.json deleted file mode 100644 index 070ad8e..0000000 --- a/arSam/handlers/events/event.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "body": "{\"message\": \"hello world\"}", - "resource": "/{proxy+}", - "path": "/path/to/resource", - "httpMethod": "POST", - "isBase64Encoded": false, - "queryStringParameters": { - "foo": "bar" - }, - "pathParameters": { - "proxy": "/path/to/resource" - }, - "stageVariables": { - "baz": "qux" - }, - "headers": { - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", - "Accept-Encoding": "gzip, deflate, sdch", - "Accept-Language": "en-US,en;q=0.8", - "Cache-Control": "max-age=0", - "CloudFront-Forwarded-Proto": "https", - "CloudFront-Is-Desktop-Viewer": "true", - "CloudFront-Is-Mobile-Viewer": "false", - "CloudFront-Is-SmartTV-Viewer": "false", - "CloudFront-Is-Tablet-Viewer": "false", - "CloudFront-Viewer-Country": "US", - "Host": "1234567890.execute-api.us-east-1.amazonaws.com", - "Upgrade-Insecure-Requests": "1", - "User-Agent": "Custom User Agent String", - "Via": "1.1 08f323deadbeefa7af34d5feb414ce27.cloudfront.net (CloudFront)", - "X-Amz-Cf-Id": "cDehVQoZnx43VYQb9j2-nvCh-9z396Uhbp027Y2JvkCPNLmGJHqlaA==", - "X-Forwarded-For": "127.0.0.1, 127.0.0.2", - "X-Forwarded-Port": "443", - "X-Forwarded-Proto": "https" - }, - "requestContext": { - "accountId": "123456789012", - "resourceId": "123456", - "stage": "prod", - "requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef", - "requestTime": "09/Apr/2015:12:34:56 +0000", - "requestTimeEpoch": 1428582896000, - "identity": { - "cognitoIdentityPoolId": null, - "accountId": null, - "cognitoIdentityId": null, - "caller": null, - "accessKey": null, - "sourceIp": "127.0.0.1", - "cognitoAuthenticationType": null, - "cognitoAuthenticationProvider": null, - "userArn": null, - "userAgent": "Custom User Agent String", - "user": null - }, - "path": "/prod/path/to/resource", - "resourcePath": "/{proxy+}", - "httpMethod": "POST", - "apiId": "1234567890", - "protocol": "HTTP/1.1" - } -} diff --git a/arSam/handlers/export-variance/GET/index.js b/arSam/handlers/export-variance/GET/index.js deleted file mode 100644 index 96576cb..0000000 --- a/arSam/handlers/export-variance/GET/index.js +++ /dev/null @@ -1,185 +0,0 @@ -const { Lambda } = require("@aws-sdk/client-lambda"); -const { getSignedUrl } = require("@aws-sdk/s3-request-presigner"); -const { S3Client, GetObjectCommand } = require("@aws-sdk/client-s3"); -const { marshall } = require('@aws-sdk/util-dynamodb'); - -const defaultRegion = process.env.AWS_REGION || "ca-central-1"; -const s3Client = new S3Client({ region: defaultRegion }); -const bucket = process.env.S3_BUCKET_DATA || "parks-ar-assets-tools"; - -const IS_OFFLINE = - process.env.IS_OFFLINE && process.env.IS_OFFLINE === "true" ? true : false; - -const options = {}; -if (IS_OFFLINE) { - options.region = "local"; - // For local we use port 3002 because we're hitting an invokable - options.endpoint = "http://localhost:3002"; -} - -const lambda = new Lambda(options); - -const { runQuery, TABLE_NAME, dynamodb, sendResponse, logger } = require("/opt/baseLayer"); -const crypto = require('crypto'); - -const VARIANCE_EXPORT_FUNCTION_NAME = - process.env.VARIANCE_EXPORT_FUNCTION_NAME || "ar-api-VarianceExportInvokableFunction"; - -const EXPIRY_TIME = process.env.EXPORT_EXPIRY_TIME - ? Number(process.env.EXPORT_EXPIRY_TIME) - : 60 * 15; // 15 minutes - -exports.handler = async (event, context) => { - logger.info("GET: Export variances - ", event?.queryStringParameters); - - // Allow CORS - if (event.httpMethod === 'OPTIONS') { - return sendResponse(200, {}, 'Success', null, context); - } - - try { - let permissionObject = event.requestContext.authorizer; - permissionObject.roles = JSON.parse(permissionObject.roles); - - if (!permissionObject.isAuthenticated) { - return sendResponse(403, { msg: "Error: Not authenticated" }, context); - } - let params = event?.queryStringParameters || {}; - params['roles'] = permissionObject.roles; - - // Must provide fiscal year end - if (!params?.fiscalYearEnd) { - return sendResponse(400, { msg: "No fiscal year end provided." }, context); - } - // generate a job id from params+role - let hashParams = {...params}; - delete hashParams.getJob; - const decodedHash = JSON.stringify(hashParams) + JSON.stringify(permissionObject.roles); - const hash = crypto.createHash('md5').update(decodedHash).digest('hex'); - const pk = "variance-exp-job"; - - // check for existing job - let queryObj = { - TableName: TABLE_NAME, - ExpressionAttributeValues: { - ":pk": { S: pk }, - ":sk": { S: hash } - }, - KeyConditionExpression: "pk = :pk and sk = :sk" - } - - const res = (await runQuery(queryObj))[0]; - - if (params?.getJob) { - // We're trying to download an existing job - - if (!res) { - // Job doesn't exist. - return sendResponse(200, { msg: "Requested job does not exist" }, context); - } else if ( - res.progressState === "complete" || - res.progressState === "error" - ) { - // Job is not currently running. Return signed URL - let urlKey = res.key; - let message = 'Job completed'; - if (res.progressState === 'error') { - urlKey = res.lastSuccessfulJob.key || {}; - message = 'Job failed. Returning last successful job.'; - } - let URL = ""; - if (!IS_OFFLINE) { - logger.debug('S3_BUCKET_DATA:', process.env.S3_BUCKET_DATA); - logger.debug('Url key:', urlKey); - let command = new GetObjectCommand({ Bucket: bucket, Key: urlKey }); - URL = await getSignedUrl( - s3Client, - command, - { expiresIn: EXPIRY_TIME }); - } - // send back new job object - delete res.pk; - delete res.sk; - delete res.key; - return sendResponse( - 200, - { msg: message, signedURL: URL, jobObj: res }, - context - ); - } else { - // Job is currently running. Return latest job object - delete res?.pk; - delete res?.sk; - delete res?.key; - return sendResponse( - 200, - { msg: "Job is currently running", jobObj: res }, - context - ); - } - } else { - // We are trying to generate a new report - // If there's already a completed job, we want to save this in case the new job fails - let lastSuccessfulJob = {}; - if (res?.progressState === "complete" && res?.key) { - lastSuccessfulJob = { - key: res?.key, - dateGenerated: res?.dateGenerated || new Date().toISOString(), - } - } else if (res?.progressState === "error") { - lastSuccessfulJob = res?.lastSuccessfulJob || {}; - } - // create the new job object - const varianceExportPutObj = { - TableName: TABLE_NAME, - ExpressionAttributeValues: { - ":complete": { S: "complete" }, - ":error": { S: "error" }, - }, - ConditionExpression: "(attribute_not_exists(pk) AND attribute_not_exists(sk)) OR attribute_not_exists(progressState) OR progressState = :complete OR progressState = :error", - Item: marshall({ - pk: pk, - sk: hash, - params: params, - progressPercentage: 0, - progressDescription: "Initializing job.", - progressState: "Initializing", - lastSuccessfulJob: lastSuccessfulJob - }), - }; - - logger.debug('Creating new job:', varianceExportPutObj); - let newJob; - try { - newJob = await dynamodb.putItem(varianceExportPutObj); - // Check if there's already a report being generated. - // If there are is no instance of a job or the job is 100% complete, generate a report. - logger.debug('New job created:', newJob); - - // run the export function - const varianceExportParams = { - FunctionName: VARIANCE_EXPORT_FUNCTION_NAME, - InvocationType: "Event", - LogType: "None", - Payload: JSON.stringify({ - jobId: hash, - params: params, - lastSuccessfulJob: lastSuccessfulJob - }) - } - // Invoke the variance report export lambda - await lambda.invoke(varianceExportParams); - - return sendResponse(200, { msg: "Variance report export job created" }, context); - } catch (error) { - // a job already exists - logger.error("Error creating new job:", error); - return sendResponse(200, { msg: "Variance report export job already running" }, context); - - } - } - } catch (error) { - logger.error(error); - return sendResponse(400, { error: error }, context); - } -}; diff --git a/arSam/handlers/export-variance/GET/package.json b/arSam/handlers/export-variance/GET/package.json deleted file mode 100644 index 19b5793..0000000 --- a/arSam/handlers/export-variance/GET/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "varianceExportGetFunction", - "version": "1.0.0", - "author": "Digitalspace ", - "dependencies": { - "@aws-sdk/client-lambda": "^3.568.0", - "@aws-sdk/client-s3": "^3.568.0", - "@aws-sdk/util-dynamodb": "^3.529.1", - "@aws-sdk/s3-request-presigner": "^3.568.0", - "crypto": "1.0.1" - } -} diff --git a/arSam/handlers/export-variance/invokable/package.json b/arSam/handlers/export-variance/invokable/package.json deleted file mode 100644 index a931eb4..0000000 --- a/arSam/handlers/export-variance/invokable/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "varianceExportInvokableFunction", - "version": "1.0.0", - "author": "Digitalspace ", - "dependencies": { - "@aws-sdk/client-s3": "^3.568.0", - "@aws-sdk/util-dynamodb": "^3.529.1" - } -} diff --git a/arSam/handlers/export/GET/package.json b/arSam/handlers/export/GET/package.json deleted file mode 100644 index e8b07eb..0000000 --- a/arSam/handlers/export/GET/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "exportGetFunction", - "version": "1.0.0", - "author": "Digitalspace ", - "dependencies": { - "@aws-sdk/client-lambda": "^3.568.0", - "@aws-sdk/client-s3": "^3.568.0", - "@aws-sdk/util-dynamodb": "^3.529.1", - "@aws-sdk/s3-request-presigner": "^3.568.0" - } -} diff --git a/arSam/handlers/export/invokable/package.json b/arSam/handlers/export/invokable/package.json deleted file mode 100644 index 74d8990..0000000 --- a/arSam/handlers/export/invokable/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "exportInvokableFunction", - "version": "1.0.0", - "author": "Digitalspace ", - "dependencies": { - "@aws-sdk/client-s3": "^3.568.0", - "write-excel-file": "^1.3.16" - } -} diff --git a/arSam/handlers/fiscalYearEnd/POST/package.json b/arSam/handlers/fiscalYearEnd/POST/package.json deleted file mode 100644 index dc46125..0000000 --- a/arSam/handlers/fiscalYearEnd/POST/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "fiscalYearEndPostFunction", - "version": "1.0.0", - "author": "Digitalspace ", - "dependencies": { - "@aws-sdk/util-dynamodb": "^3.529.1", - "luxon": "^3.2.1" - } -} diff --git a/arSam/handlers/nameUpdate/package.json b/arSam/handlers/nameUpdate/package.json deleted file mode 100644 index 9fdf56a..0000000 --- a/arSam/handlers/nameUpdate/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "nameUpdateFunction", - "version": "1.0.0", - "author": "Digitalspace ", - "dependencies": { - "axios": "^0.21.1", - "@aws-sdk/util-dynamodb": "^3.529.1" - } -} - \ No newline at end of file diff --git a/arSam/handlers/subArea/DELETE/package.json b/arSam/handlers/subArea/DELETE/package.json deleted file mode 100644 index ca625c4..0000000 --- a/arSam/handlers/subArea/DELETE/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "subAreaDeleteFunction", - "version": "1.0.0", - "author": "Digitalspace ", - "dependencies": { - "@aws-sdk/util-dynamodb": "^3.529.1" - } -} - \ No newline at end of file diff --git a/arSam/layers/__tests__/constantsLayer.test.js b/arSam/layers/__tests__/constantsLayer.test.js deleted file mode 100644 index 1e2017b..0000000 --- a/arSam/layers/__tests__/constantsLayer.test.js +++ /dev/null @@ -1,115 +0,0 @@ -describe("Constants Test", () => { - const OLD_ENV = process.env; - beforeEach(async () => { - jest.resetModules(); - process.env = { ...OLD_ENV }; // Make a copy of environment - }); - - test("Handler - Constants has items", async () => { - - const constants = require("../constantsLayer/constantsLayer"); - // Checks to ensure the value functions returns the data we pass through to it based on the attribute. - expect(constants.CSV_SYSADMIN_SCHEMA.length).toEqual(96); - for(const row of constants.CSV_SYSADMIN_SCHEMA) { - expect(row.value({ - region: 1, - section: 1, - bundle: 1, - parkName: 1, - orcs: 1, - subAreaName: 1, - subAreaId: 1, - year: 1, - fiscalYear: 1, - month: 1, - campingPartyNightsAttendanceStandard: 1, - campingPartyNightsAttendanceSenior: 1, - campingPartyNightsAttendanceSocial: 1, - campingPartyNightsAttendanceLongStay: 1, - calc_frontCountryCamping_frontCountryCamping_campingPartyNights_totalNights: 1, - calc_frontCountryCamping_frontCountryCamping_campingPartyNights_totalAttendance: 1, - campingPartyNightsRevenueGross: 1, - calc_frontCountryCamping_campingPartyNights_netRevenue: 1, - secondCarsAttendanceStandard: 1, - secondCarsAttendanceSenior: 1, - secondCarsAttendanceSocial: 1, - calc_frontCountryCamping_secondCars_totalAttendance: 1, - secondCarsRevenueGross: 1, - calc_frontCountryCamping_secondCars_netRevenue: 1, - otherRevenueGrossSani: 1, - calc_frontCountryCamping_other_sani_netRevenue: 1, - otherRevenueElectrical: 1, - calc_frontCountryCamping_other_electrical_netRevenue: 1, - otherRevenueShower: 1, - calc_frontCountryCamping_other_shower_netRevenue: 1, - notes_frontcountryCamping: 1, - totalAttendanceParties: 1, - calc_frontcountryCabins_parties_totalAttendance: 1, - revenueGrossCamping: 1, - calc_frontcountryCabins_camping_netRevenue: 1, - notes_frontcountryCabins: 1, - standardRateGroupsTotalPeopleStandard: 1, - standardRateGroupsTotalPeopleAdults: 1, - standardRateGroupsTotalPeopleYouth: 1, - standardRateGroupsTotalPeopleKids: 1, - calc_groupCamping_standardRate_totalPeople: 1, - standardRateGroupsRevenueGross: 1, - calc_groupCamping_standardRate_netRevenue: 1, - youthRateGroupsAttendanceGroupNights: 1, - youthRateGroupsAttendancePeople: 1, - youthRateGroupsRevenueGross: 1, - calc_groupCamping_youthRate_netRevenue: 1, - notes_groupCamping: 1, - calc_groupCamping_totalPeople: 1, - calc_groupCamping_totalGrossRevenue: 1, - calc_groupCamping_totalNetRevenue: 1, - calc_frontcountry_totalAttendancePeople: 1, - calc_frontcountry_totalGrossRevenue: 1, - calc_frontcountry_totalNetRevenue: 1, - people: 1, - grossCampingRevenue: 1, - calc_backcountryCamping_camping_netRevenue: 1, - notes_backcountryCamping: 1, - peopleAdult: 1, - peopleChild: 1, - peopleFamily: 1, - calc_backcountryCabins_totalPeople: 1, - revenueFamily: 1, - calc_backcountryCabins_family_netRevenue: 1, - notes_backcountryCabins: 1, - calc_backcountry_totalAttendancePeople: 1, - calc_backcountry_totalGrossRevenue: 1, - calc_backcountry_totalNetRevenue: 1, - calc_totalCampingAttendancePeople: 1, - calc_totalCampingGrossRevenue: 1, - calc_totalCampingNetRevenue: 1, - peopleAndVehiclesVehicle: 1, - peopleAndVehiclesBus: 1, - peopleAndVehiclesTrail: 1, - calc_dayUse_peopleAndVehicles_vehicleAttendance: 1, - picnicRevenueShelter: 1, - picnicShelterPeople: 1, - picnicRevenueGross: 1, - calc_dayUse_picnicShelters_netRevenue: 1, - otherDayUsePeopleHotSprings: 1, - otherDayUseRevenueHotSprings: 1, - calc_dayUse_otherDayUse_netRevenue: 1, - notes_dayUse: 1, - calc_dayUse_totalAttendancePeople: 1, - calc_dayUse_totalGrossRevenue: 1, - calc_dayUse_totalNetRevenue: 1, - boatAttendanceNightsOnDock: 1, - boatAttendanceNightsOnBouys: 1, - boatAttendanceMiscellaneous: 1, - calc_boating_boats_boatAttendance: 1, - boatRevenueGross: 1, - calc_boating_boats_netRevenue: 1, - notes_boating: 1, - calc_totalAttendancePeople: 1, - calc_totalGrossRevenue: 1, - calc_totalNetRevenue: 1 - })).toEqual(1); - } - }); - }); - \ No newline at end of file diff --git a/arSam/layers/__tests__/formulasLayer.test.js b/arSam/layers/__tests__/formulasLayer.test.js deleted file mode 100644 index 7c7fffd..0000000 --- a/arSam/layers/__tests__/formulasLayer.test.js +++ /dev/null @@ -1,47 +0,0 @@ -describe("keycloak utility tests", () => { - beforeEach(async () => { - jest.resetModules(); - }); - - test("Creates Update Park with New Sub Area Object", async () => { - const utils = require("../formulaLayer/formulaLayer"); - const response = await utils.createPutFormulaConfigObj( - ["Day Use", "Backcountry Cabins", "Fake Garbage"], - "test-id", - "test-park-name", - "test-orcs", - "test-sub-area-name" - ); - - expect(response).toEqual([ - { - TableName: "ParksAr-tests", - ConditionExpression: "attribute_not_exists(sk)", - Item: { - pk: { S: "config::test-id" }, - sk: { S: "Day Use" }, - parkName: { S: "test-park-name" }, - orcs: { S: "test-orcs" }, - subAreaId: { S: "test-id" }, - subAreaName: { S: "test-sub-area-name" }, - attendanceVehiclesModifier: { N: "3.5" }, - attendanceBusModifier: { N: "40" }, - }, - }, - { - TableName: "ParksAr-tests", - ConditionExpression: "attribute_not_exists(sk)", - Item: { - pk: { S: "config::test-id" }, - sk: { S: "Backcountry Cabins" }, - parkName: { S: "test-park-name" }, - orcs: { S: "test-orcs" }, - subAreaId: { S: "test-id" }, - subAreaName: { S: "test-sub-area-name" }, - attendanceModifier: { N: "3.2" }, - }, - }, - ]); - }); - }); - \ No newline at end of file diff --git a/arSam/layers/__tests__/keycloakLayer.test.js b/arSam/layers/__tests__/keycloakLayer.test.js deleted file mode 100644 index 60f15fc..0000000 --- a/arSam/layers/__tests__/keycloakLayer.test.js +++ /dev/null @@ -1,73 +0,0 @@ - -describe("keycloak utility tests", () => { - beforeEach(async () => { - jest.resetModules(); - }); - - test("Creates keycloak role", async () => { - const axios = require('axios'); - jest.mock("axios"); - axios.post.mockImplementation(() => Promise.resolve({ statusCode: 200, data: {} })); - const utils = require("../keycloakLayer/keycloakLayer"); - const response = await utils.createKeycloakRole('http://localhost/', 'client-id', 'sometoken', '0001:0001', 'Some description'); - expect(response).toEqual({}); - }); - - test("Fails to create keycloak role", async () => { - const axios = require('axios'); - jest.mock("axios"); - axios.post.mockImplementation(() => Promise.reject({ statusCode: 400, data: {} })); - const utils = require("../keycloakLayer/keycloakLayer"); - try { - await utils.createKeycloakRole('http://localhost/', 'client-id', 'sometoken', '0001:0001', 'Some description'); - } catch (error) { - expect(error.message).toEqual('Operation Failed.'); - } - }); - - test("Deletes keycloak role", async () => { - const axios = require('axios'); - jest.mock("axios"); - axios.delete.mockImplementation(() => Promise.resolve({ statusCode: 200, data: { } })); - const utils = require("../keycloakLayer/keycloakLayer"); - const response = await utils.deleteKeycloakRole('http://localhost/', 'client-id', 'sometoken', '0001:0001'); - expect(response).toEqual({}); - }); - - test("Fails to delete keycloak role", async () => { - const axios = require('axios'); - jest.mock("axios"); - axios.delete.mockImplementation(() => Promise.reject({ statusCode: 400, data: {} })); - const utils = require("../keycloakLayer/keycloakLayer"); - try { - await utils.deleteKeycloakRole('http://localhost/', 'client-id', 'sometoken', '0001:0001', 'Some description'); - } catch (error) { - expect(error.message).toEqual('Operation Failed.'); - } - }); - - test("Gets keycloak role", async () => { - const theRole = { - name: 'some role' - }; - const axios = require('axios'); - jest.mock("axios"); - axios.get.mockImplementation(() => Promise.resolve({ statusCode: 200, data: theRole })); - const utils = require("../keycloakLayer/keycloakLayer"); - const response = await utils.getKeycloakRole('http://localhost/', 'client-id', 'sometoken', '0001:0001'); - expect(response).toEqual(theRole); - }); - - test("Fails to get keycloak role", async () => { - const axios = require('axios'); - jest.mock("axios"); - axios.get.mockImplementation(() => Promise.reject({ statusCode: 400, data: {} })); - const utils = require("../keycloakLayer/keycloakLayer"); - try { - await utils.getKeycloakRole('http://localhost/', 'client-id', 'sometoken', '0001:0001'); - } catch (error) { - expect(error.message).toEqual('Operation Failed.'); - } - }); - }); - \ No newline at end of file diff --git a/arSam/layers/__tests__/subAreaLayer.test.js b/arSam/layers/__tests__/subAreaLayer.test.js deleted file mode 100644 index d1890b1..0000000 --- a/arSam/layers/__tests__/subAreaLayer.test.js +++ /dev/null @@ -1,92 +0,0 @@ -describe('keycloak utility tests', () => { - beforeEach(async () => { - jest.resetModules(); - }); - - const testSubAreaObj = { - activities: ['Day Use'], - managementArea: 'test-managementArea', - section: 'test-section', - region: 'test-region', - bundle: 'test-bundle', - subAreaName: 'test-subAreaName', - parkName: 'test-parkName', - roles: ['sysadmin'], - orcs: 'test-orcs', - }; - - test('Creates Update Park with New Sub Area Object', async () => { - const utils = require('../subAreaLayer/subAreaLayer'); - const response = await utils.createUpdateParkWithNewSubAreaObj('test-name', 'test-id', false, 'test-orcs'); - - expect(response).toEqual({ - TableName: 'ParksAr-tests', - Key: { pk: { S: 'park' }, sk: { S: 'test-orcs' } }, - ExpressionAttributeValues: { - ':subAreas': { - L: [ - { - M: { - id: { - S: 'test-id', - }, - isLegacy: { - BOOL: false, - }, - name: { - S: 'test-name', - }, - }, - }, - ], - }, - }, - UpdateExpression: 'SET subAreas = list_append(subAreas, :subAreas)', - }); - }); - - test('Creates Put Sub Area Obj', async () => { - const utils = require('../subAreaLayer/subAreaLayer'); - const response = await utils.createPutSubAreaObj(testSubAreaObj, 'test-id', 'test-name'); - - expect(response).toEqual({ - TableName: 'ParksAr-tests', - ConditionExpression: 'attribute_not_exists(sk)', - Item: { - pk: { S: 'park::test-orcs' }, - sk: { S: 'test-id' }, - activities: { SS: ['Day Use'] }, - managementArea: { S: 'test-managementArea' }, - section: { S: 'test-section' }, - region: { S: 'test-region' }, - bundle: { S: 'test-bundle' }, - subAreaName: { S: 'test-subAreaName' }, - parkName: { S: 'test-name' }, - roles: { L: [{ S: 'sysadmin' }] }, - orcs: { S: 'test-orcs' }, - }, - }); - }); - - test('Creates Valid Sub Area Object', async () => { - const utils = require('../subAreaLayer/subAreaLayer'); - const garbage = { test: 'fake', whatever: [] }; - const testSubAreaObjWithGarbage = { ...testSubAreaObj, ...garbage }; - - const response = await utils.getValidSubareaObj(testSubAreaObjWithGarbage, 'test-name', 'test-subAreaId'); - - expect(response).toEqual({ - parkName: 'test-name', - orcs: 'test-orcs', - activities: ['Day Use'], - managementArea: 'test-managementArea', - section: 'test-section', - region: 'test-region', - bundle: 'test-bundle', - subAreaName: 'test-subAreaName', - isLegacy: false, - roles: ['sysadmin', 'test-orcs:test-subAreaId'], - }); - }); - }); - \ No newline at end of file diff --git a/arSam/layers/baseLayer/Makefile b/arSam/layers/baseLayer/Makefile deleted file mode 100644 index 85b484d..0000000 --- a/arSam/layers/baseLayer/Makefile +++ /dev/null @@ -1,11 +0,0 @@ - build-BaseLayer: - # copy dependency directory into artifacts directory - cp -r * "$(ARTIFACTS_DIR)" - # remove makefile in artifacts directory - rm "$(ARTIFACTS_DIR)/Makefile" - # install dependencies in artifacts directory - cd nodejs && yarn install --ignore-scripts --frozen-lockfile --modules-folder "$(ARTIFACTS_DIR)/nodejs/node_modules" - # symlink to node_modules folder for testing purposes - cd "$(ARTIFACTS_DIR)" && ln -s "$(ARTIFACTS_DIR)"/nodejs/node_modules node_modules - # remove package.json to avoid rebuilding when changes don't relate to dependencies - rm "$(ARTIFACTS_DIR)/nodejs/package.json" \ No newline at end of file diff --git a/arSam/layers/baseLayer/nodejs/package.json b/arSam/layers/baseLayer/nodejs/package.json deleted file mode 100644 index ce4aa1e..0000000 --- a/arSam/layers/baseLayer/nodejs/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "baseLayer", - "version": "0.0.1", - "author": "Digitalspace ", - "license": "MIT", - "dependencies": { - "@aws-sdk/client-dynamodb": "^3.529.1", - "@aws-sdk/util-dynamodb": "^3.529.1", - "winston": "^3.8.0" - } -} diff --git a/arSam/layers/constantsLayer/Makefile b/arSam/layers/constantsLayer/Makefile deleted file mode 100644 index da98263..0000000 --- a/arSam/layers/constantsLayer/Makefile +++ /dev/null @@ -1,11 +0,0 @@ - build-ConstantsLayer: - # copy dependency directory into artifacts directory - cp -r * "$(ARTIFACTS_DIR)" - # remove makefile in artifacts directory - rm "$(ARTIFACTS_DIR)/Makefile" - # install dependencies in artifacts directory - cd nodejs && yarn install --ignore-scripts --frozen-lockfile --modules-folder "$(ARTIFACTS_DIR)/nodejs/node_modules" - # symlink to node_modules folder for testing purposes - cd "$(ARTIFACTS_DIR)" && ln -s "$(ARTIFACTS_DIR)"/nodejs/node_modules node_modules - # remove package.json to avoid rebuilding when changes don't relate to dependencies - rm "$(ARTIFACTS_DIR)/nodejs/package.json" \ No newline at end of file diff --git a/arSam/layers/constantsLayer/nodejs/package.json b/arSam/layers/constantsLayer/nodejs/package.json deleted file mode 100644 index b759d2b..0000000 --- a/arSam/layers/constantsLayer/nodejs/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "ConstantsLayer", - "version": "0.0.1", - "author": "Digitalspace ", - "license": "MIT" - } diff --git a/arSam/layers/formulaLayer/Makefile b/arSam/layers/formulaLayer/Makefile deleted file mode 100644 index bd39c32..0000000 --- a/arSam/layers/formulaLayer/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -build-FormulaLayer: - # copy dependency directory into artifacts directory - cp -r * "$(ARTIFACTS_DIR)" - # remove makefile in artifacts directory - rm "$(ARTIFACTS_DIR)/Makefile" - # install dependencies in artifacts directory - cd nodejs && yarn install --ignore-scripts --frozen-lockfile --modules-folder "$(ARTIFACTS_DIR)/nodejs/node_modules" - # symlink to node_modules folder for testing purposes - cd "$(ARTIFACTS_DIR)" && ln -s "$(ARTIFACTS_DIR)"/nodejs/node_modules node_modules - # remove package.json to avoid rebuilding when changes don't relate to dependencies - rm "$(ARTIFACTS_DIR)/nodejs/package.json" \ No newline at end of file diff --git a/arSam/layers/formulaLayer/nodejs/package.json b/arSam/layers/formulaLayer/nodejs/package.json deleted file mode 100644 index d4885df..0000000 --- a/arSam/layers/formulaLayer/nodejs/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "formulaLayer", - "version": "0.0.1", - "author": "Digitalspace ", - "license": "MIT", - "dependencies": { - "@aws-sdk/util-dynamodb": "^3.529.1" - } - } diff --git a/arSam/layers/functionsLayer/Makefile b/arSam/layers/functionsLayer/Makefile deleted file mode 100644 index 101e254..0000000 --- a/arSam/layers/functionsLayer/Makefile +++ /dev/null @@ -1,11 +0,0 @@ - build-FunctionsLayer: - # copy dependency directory into artifacts directory - cp -r * "$(ARTIFACTS_DIR)" - # remove makefile in artifacts directory - rm "$(ARTIFACTS_DIR)/Makefile" - # install dependencies in artifacts directory - cd nodejs && yarn install --ignore-scripts --frozen-lockfile --modules-folder "$(ARTIFACTS_DIR)/nodejs/node_modules" - # symlink to node_modules folder for testing purposes - cd "$(ARTIFACTS_DIR)" && ln -s "$(ARTIFACTS_DIR)"/nodejs/node_modules node_modules - # remove package.json to avoid rebuilding when changes don't relate to dependencies - rm "$(ARTIFACTS_DIR)/nodejs/package.json" \ No newline at end of file diff --git a/arSam/layers/functionsLayer/nodejs/package.json b/arSam/layers/functionsLayer/nodejs/package.json deleted file mode 100644 index 52a5002..0000000 --- a/arSam/layers/functionsLayer/nodejs/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "functionsLayer", - "version": "0.0.1", - "author": "Digitalspace ", - "license": "MIT", - "dependencies": { - "@aws-sdk/util-dynamodb": "^3.529.1", - "crypto": "1.0.1" - } - } diff --git a/arSam/layers/keycloakLayer/Makefile b/arSam/layers/keycloakLayer/Makefile deleted file mode 100644 index e413e4d..0000000 --- a/arSam/layers/keycloakLayer/Makefile +++ /dev/null @@ -1,11 +0,0 @@ - build-KeycloakLayer: - # copy dependency directory into artifacts directory - cp -r * "$(ARTIFACTS_DIR)" - # remove makefile in artifacts directory - rm "$(ARTIFACTS_DIR)/Makefile" - # install dependencies in artifacts directory - cd nodejs && yarn install --ignore-scripts --frozen-lockfile --modules-folder "$(ARTIFACTS_DIR)/nodejs/node_modules" - # symlink to node_modules folder for testing purposes - cd "$(ARTIFACTS_DIR)" && ln -s "$(ARTIFACTS_DIR)"/nodejs/node_modules node_modules - # remove package.json to avoid rebuilding when changes don't relate to dependencies - rm "$(ARTIFACTS_DIR)/nodejs/package.json" \ No newline at end of file diff --git a/arSam/layers/keycloakLayer/nodejs/package.json b/arSam/layers/keycloakLayer/nodejs/package.json deleted file mode 100644 index ac27f4f..0000000 --- a/arSam/layers/keycloakLayer/nodejs/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "loggerLayer", - "version": "0.0.1", - "author": "Digitalspace ", - "license": "MIT", - "dependencies": { - "axios": "^1.4.0" - } -} diff --git a/arSam/layers/permissionLayer/Makefile b/arSam/layers/permissionLayer/Makefile deleted file mode 100644 index f994261..0000000 --- a/arSam/layers/permissionLayer/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -build-PermissionLayer: - # copy dependency directory into artifacts directory - cp -r * "$(ARTIFACTS_DIR)" - # remove makefile in artifacts directory - rm "$(ARTIFACTS_DIR)/Makefile" - # install dependencies in artifacts directory - cd nodejs && yarn install --ignore-scripts --frozen-lockfile --modules-folder "$(ARTIFACTS_DIR)/nodejs/node_modules" - # symlink to node_modules folder for testing purposes - cd "$(ARTIFACTS_DIR)" && ln -s "$(ARTIFACTS_DIR)"/nodejs/node_modules node_modules - # remove package.json to avoid rebuilding when changes don't relate to dependencies - rm "$(ARTIFACTS_DIR)/nodejs/package.json" \ No newline at end of file diff --git a/arSam/layers/permissionLayer/nodejs/package.json b/arSam/layers/permissionLayer/nodejs/package.json deleted file mode 100644 index 1954fd6..0000000 --- a/arSam/layers/permissionLayer/nodejs/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "permissionLayer", - "version": "0.0.1", - "author": "Digitalspace ", - "license": "MIT", - "dependencies": { - "jsonwebtoken": "^9.0.0", - "jwks-rsa": "^3.0.1" - } -} diff --git a/arSam/layers/subAreaLayer/Makefile b/arSam/layers/subAreaLayer/Makefile deleted file mode 100644 index b8c300c..0000000 --- a/arSam/layers/subAreaLayer/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -build-SubAreaLayer: - # copy dependency directory into artifacts directory - cp -r * "$(ARTIFACTS_DIR)" - # remove makefile in artifacts directory - rm "$(ARTIFACTS_DIR)/Makefile" - # install dependencies in artifacts directory - cd nodejs && yarn install --ignore-scripts --frozen-lockfile --modules-folder "$(ARTIFACTS_DIR)/nodejs/node_modules" - # symlink to node_modules folder for testing purposes - cd "$(ARTIFACTS_DIR)" && ln -s "$(ARTIFACTS_DIR)"/nodejs/node_modules node_modules - # remove package.json to avoid rebuilding when changes don't relate to dependencies - rm "$(ARTIFACTS_DIR)/nodejs/package.json" \ No newline at end of file diff --git a/arSam/layers/subAreaLayer/nodejs/package.json b/arSam/layers/subAreaLayer/nodejs/package.json deleted file mode 100644 index d549eb4..0000000 --- a/arSam/layers/subAreaLayer/nodejs/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "subAreaLayer", - "version": "0.0.1", - "author": "Digitalspace ", - "license": "MIT", - "dependencies": { - "@aws-sdk/util-dynamodb": "^3.529.1" - } -} diff --git a/arSam/layers/varianceLayer/Makefile b/arSam/layers/varianceLayer/Makefile deleted file mode 100644 index 64d6e57..0000000 --- a/arSam/layers/varianceLayer/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -build-VarianceLayer: - # copy dependency directory into artifacts directory - cp -r * "$(ARTIFACTS_DIR)" - # remove makefile in artifacts directory - rm "$(ARTIFACTS_DIR)/Makefile" - # install dependencies in artifacts directory - cd nodejs && yarn install --ignore-scripts --frozen-lockfile --modules-folder "$(ARTIFACTS_DIR)/nodejs/node_modules" - # symlink to node_modules folder for testing purposes - cd "$(ARTIFACTS_DIR)" && ln -s "$(ARTIFACTS_DIR)"/nodejs/node_modules node_modules - # remove package.json to avoid rebuilding when changes don't relate to dependencies - rm "$(ARTIFACTS_DIR)/nodejs/package.json" \ No newline at end of file diff --git a/arSam/layers/varianceLayer/nodejs/package.json b/arSam/layers/varianceLayer/nodejs/package.json deleted file mode 100644 index 5d30434..0000000 --- a/arSam/layers/varianceLayer/nodejs/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "varianceLayer", - "version": "0.0.1", - "author": "Digitalspace ", - "license": "MIT" -} diff --git a/arSam/package.json b/arSam/package.json deleted file mode 100644 index 54ffab7..0000000 --- a/arSam/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "scripts": { - "start": "sam local start-api --env-vars vars.json --debug", - "start-full": "yarn build && yarn start", - "build": "sam build", - "test": "yarn build && jest --coverage" - }, - "jest": { - "verbose": true, - "globalSetup": "./__tests__/setup.js", - "globalTeardown": "./__tests__/teardown.js", - "modulePathIgnorePatterns": [ - "/__tests__", - "/.aws-sam/" - ], - "moduleNameMapper": { - "^/opt/baseLayer": "/.aws-sam/build/BaseLayer/baseLayer", - "^/opt/constantsLayer": "/.aws-sam/build/ConstantsLayer/constantsLayer", - "^/opt/formulaLayer": "/.aws-sam/build/FormulaLayer/formulaLayer", - "^/opt/functionsLayer": "/.aws-sam/build/FunctionsLayer/functionsLayer", - "^/opt/keycloakLayer": "/.aws-sam/build/KeycloakLayer/keycloakLayer", - "^/opt/permissionLayer": "/.aws-sam/build/PermissionLayer/permissionLayer", - "^/opt/subAreaLayer": "/.aws-sam/build/SubAreaLayer/subAreaLayer", - "^/opt/varianceLayer": "/.aws-sam/build/VarianceLayer/varianceLayer" - } - }, - "devDependencies": { - "@digitalspace/dynamodb-migrate": "^1.0.6", - "aws-sdk-mock": "^5.4.0", - "jest": "^29.5.0", - "read-excel-file": "^5.3.4", - "serverless": "^3.18.1", - "serverless-dotenv-plugin": "^6.0.0", - "serverless-offline": "^12.0.4", - "serverless-plugin-include-dependencies": "^5.0.0", - "luxon": "^3.2.1" - }, - "dependencies": { - "@aws-sdk/client-dynamodb": "^3.529.1", - "@aws-sdk/client-lambda": "^3.568.0", - "@aws-sdk/client-s3": "^3.568.0", - "@aws-sdk/util-dynamodb": "^3.529.1", - "@aws-sdk/s3-request-presigner": "^3.568.0", - "@babel/traverse": "7.23.2", - "axios": "^1.4.0", - "jsonwebtoken": "^9.0.0", - "jwks-rsa": "^3.0.1", - "node-jose": "^2.2.0", - "serverless-webpack": "^5.13.0", - "svg-captcha": "^1.4.0", - "webpack": "^5.91.0", - "winston": "^3.8.0", - "write-excel-file": "^1.3.16", - "crypto": "1.0.1" - } -} diff --git a/arSam/samconfig.toml b/arSam/samconfig.toml deleted file mode 100644 index c2eb384..0000000 --- a/arSam/samconfig.toml +++ /dev/null @@ -1,34 +0,0 @@ -# More information about the configuration file can be found here: -# https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html -version = 0.1 - -[default] -[default.global.parameters] -stack_name = "ar-api" - -[default.build.parameters] -cached = false -parallel = true - -[default.validate.parameters] -lint = true - -[default.deploy.parameters] -capabilities = "CAPABILITY_IAM" -confirm_changeset = true -resolve_s3 = true -s3_prefix = "ar-api" -region = "ca-central-1" -image_repositories = [] - -[default.package.parameters] -resolve_s3 = true - -[default.sync.parameters] -watch = true - -[default.local_start_api.parameters] -warm_containers = "EAGER" - -[default.local_start_lambda.parameters] -warm_containers = "EAGER" diff --git a/arSam/template.yaml b/arSam/template.yaml deleted file mode 100644 index 7561f80..0000000 --- a/arSam/template.yaml +++ /dev/null @@ -1,972 +0,0 @@ -AWSTemplateFormatVersion: '2010-09-09' -Transform: AWS::Serverless-2016-10-31 -Description: > - SAM deployment for A&R API - -# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst -Globals: - Function: - Timeout: 3 - Environment: - Variables: - SSO_ISSUER: !Ref SSOIssuerUrl - SSO_JWKSURI: !Ref SSOJWKSUri - IS_OFFLINE: false - DYNAMODB_ENDPOINT_URL: https://dynamodb.ca-central-1.amazonaws.com - -Parameters: - AWSAccountList: - Type: String - Default: 'defaultAccount' - Stage: - Type: String - Default: 'dev' - ExportFunctionName: - Type: String - Default: 'ar-api-ExportInvokableFunction' - VarianceExportFunctionName: - Type: String - Default: 'ar-api-VarianceExportInvokableFunction' - ExportExpiryTime: - Type: String - Default: '900' - FilePath: - Type: String - Default: '/tmp/' - FileNameExport: - Type: String - Default: 'A&R_Export' - FileNameVarianceExport: - Type: String - Default: 'A&R_Variance_Report' - JobUpdateModulo: - Type: String - Default: '1' - DisableProgressUpdates: - Type: String - Default: 'false' - DisableHighAccuracyProgressPercentage: - Type: String - Default: 'false' - S3BucketData: - Type: String - Default: 'parks-ar-assets-tools' - TableNameAR: - Type: String - Default: 'ParksAr' - TableNameCacheAR: - Type: String - Default: 'NameCacheAr' - TableNameConfigAR: - Type: String - Default: "ConfigAr" - DataRegisterNameEndpoint: - Type: String - Default: "defaultEndpoint" - DataRegisterNameApiKey: - Type: String - Default: "defaultApiKey" - SSOIssuerUrl: - Type: String - Default: "https://dev.loginproxy.gov.bc.ca/auth/realms/bcparks-service-transformation" - SSOJWKSUri: - Type: String - Default: "https://dev.loginproxy.gov.bc.ca/auth/realms/bcparks-service-transformation/protocol/openid-connect/certs" - SSOOrigin: - Type: String - Default: "https://dev.loginproxy.gov.bc.ca" - SSOClientId: - Type: String - Default: "defaultClientId" - WebhookUrl: - Type: String - Default: "defaultWebhookUrl" - -Resources: - ### LAMBDA LAYERS ### - VarianceLayer: - Type: AWS::Serverless::LayerVersion - Properties: - LayerName: varianceLayer - Description: Variance Layer - ContentUri: layers/varianceLayer/ - CompatibleRuntimes: - - nodejs18.x - LicenseInfo: 'Apache-2.0' - RetentionPolicy: Retain - Metadata: - BuildMethod: makefile - - SubAreaLayer: - Type: AWS::Serverless::LayerVersion - Properties: - LayerName: subAreaLayer - Description: SubArea Layer - ContentUri: layers/subAreaLayer/ - CompatibleRuntimes: - - nodejs18.x - LicenseInfo: 'Apache-2.0' - RetentionPolicy: Retain - Metadata: - BuildMethod: makefile - - PermissionLayer: - Type: AWS::Serverless::LayerVersion - Properties: - LayerName: permissionLayer - Description: Permission Layer - ContentUri: layers/permissionLayer/ - CompatibleRuntimes: - - nodejs18.x - LicenseInfo: 'Apache-2.0' - RetentionPolicy: Retain - Metadata: - BuildMethod: makefile - - BaseLayer: - Type: AWS::Serverless::LayerVersion - Properties: - LayerName: baseLayer - Description: Base Layer - ContentUri: layers/baseLayer/ - CompatibleRuntimes: - - nodejs18.x - LicenseInfo: 'Apache-2.0' - RetentionPolicy: Retain - Metadata: - BuildMethod: makefile - - KeycloakLayer: - Type: AWS::Serverless::LayerVersion - Properties: - LayerName: keycloakLayer - Description: Keycloak Layer - ContentUri: layers/keycloakLayer/ - CompatibleRuntimes: - - nodejs18.x - LicenseInfo: 'Apache-2.0' - RetentionPolicy: Retain - Metadata: - BuildMethod: makefile - - FunctionsLayer: - Type: AWS::Serverless::LayerVersion - Properties: - LayerName: functionsLayer - Description: Functions Layer - ContentUri: layers/functionsLayer/ - CompatibleRuntimes: - - nodejs18.x - LicenseInfo: 'Apache-2.0' - RetentionPolicy: Retain - Metadata: - BuildMethod: makefile - - FormulaLayer: - Type: AWS::Serverless::LayerVersion - Properties: - LayerName: formulaLayer - Description: Formula Layer - ContentUri: layers/formulaLayer/ - CompatibleRuntimes: - - nodejs18.x - LicenseInfo: 'Apache-2.0' - RetentionPolicy: Retain - Metadata: - BuildMethod: makefile - - ConstantsLayer: - Type: AWS::Serverless::LayerVersion - Properties: - LayerName: constantsLayer - Description: Constants Layer - ContentUri: layers/constantsLayer/ - CompatibleRuntimes: - - nodejs18.x - LicenseInfo: 'Apache-2.0' - RetentionPolicy: Retain - Metadata: - BuildMethod: makefile - - ### LAMBDA FUNCTIONS ### - - ActivityGetFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/activity/GET/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - Events: - activityGet: - Type: Api - Properties: - Path: /activity - Method: GET - RestApiId: !Ref ApiDeployment - activityOptions: - Type: Api - Properties: - Path: /activity - Method: OPTIONS - RestApiId: !Ref ApiDeployment - - ActivityPostFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/activity/POST/ - Handler: index.handlePost - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - - !Ref VarianceLayer - - !Ref ConstantsLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - Events: - activityPost: - Type: Api - Properties: - Path: /activity - Method: POST - RestApiId: !Ref ApiDeployment - - ActivityPostLockFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/activity/POST/ - Handler: index.handleLock - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - - !Ref VarianceLayer - - !Ref ConstantsLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - Events: - activityRecordLock: - Type: Api - Properties: - Path: /activity/lock - Method: POST - RestApiId: !Ref ApiDeployment - - ActivityPostUnlockFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/activity/POST/ - Handler: index.handleUnlock - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - - !Ref VarianceLayer - - !Ref ConstantsLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - Events: - activityRecordUnlock: - Type: Api - Properties: - Path: /activity/unlock - Method: POST - RestApiId: !Ref ApiDeployment - - ActivityDeleteFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/activity/DELETE/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - Events: - activityDelete: - Type: Api - Properties: - Path: /activity - Method: DELETE - RestApiId: !Ref ApiDeployment - - ActivityPutFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/activity/PUT/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - Events: - activityPut: - Type: Api - Properties: - Path: /activity - Method: PUT - RestApiId: !Ref ApiDeployment - - CloudwatchAlarmFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/cloudwatchAlarm/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - AWS_ACCOUNT_LIST: !Ref AWSAccountList - LOG_LEVEL: debug - WEBHOOK_URL: !Ref WebhookUrl - Layers: - - !Ref BaseLayer - Events: - cloudwatchAlarm: - Type: Api - Properties: - Path: /cloudwatchAlarm - Method: GET - RestApiId: !Ref ApiDeployment - cloudwatchAlarmOptions: - Type: Api - Properties: - Path: /cloudwatchAlarm - Method: OPTIONS - RestApiId: !Ref ApiDeployment - - ExportGetFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/export/GET/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: info - EXPORT_FUNCTION_NAME: !Ref ExportFunctionName - EXPORT_EXPIRY_TIME: !Ref ExportExpiryTime - S3_BUCKET_DATA: !Ref S3BucketData - Layers: - - !Ref FunctionsLayer - - !Ref BaseLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - - LambdaInvokePolicy: - FunctionName: - !Ref ExportInvokableFunction - - S3FullAccessPolicy: - BucketName: !Ref S3BucketData - Events: - exportGet: - Type: Api - Properties: - Path: /export - Method: GET - RestApiId: !Ref ApiDeployment - exportOptions: - Type: Api - Properties: - Path: /export - Method: OPTIONS - RestApiId: !Ref ApiDeployment - - ExportInvokableFunction: - Type: AWS::Serverless::Function - Properties: - Timeout: 300 - CodeUri: handlers/export/invokable/ - Handler: index.handler - Runtime: nodejs18.x - FunctionName: !Ref ExportFunctionName - Environment: - Variables: - FILE_PATH: !Ref FilePath - FILE_NAME: !Ref FileNameExport - JOB_UPDATE_MODULO: !Ref JobUpdateModulo - DISABLE_PROGRESS_UPDATES: !Ref DisableProgressUpdates - DISABLE_HIGH_ACCURACY_PROGRESS_PERCENTAGE: !Ref DisableHighAccuracyProgressPercentage - S3_BUCKET_DATA: !Ref S3BucketData - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: info - Layers: - - !Ref ConstantsLayer - - !Ref FunctionsLayer - - !Ref BaseLayer - - !Ref FormulaLayer - - !Ref SubAreaLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - - S3FullAccessPolicy: - BucketName: !Ref S3BucketData - - VarianceExportGetFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/export-variance/GET/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: info - VARIANCE_EXPORT_FUNCTION_NAME: !Ref VarianceExportFunctionName - S3_BUCKET_DATA: !Ref S3BucketData - EXPORT_EXPIRY_TIME: !Ref ExportExpiryTime - Layers: - - !Ref BaseLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - - LambdaInvokePolicy: - FunctionName: - !Ref VarianceExportInvokableFunction - - S3FullAccessPolicy: - BucketName: !Ref S3BucketData - Events: - varianceExportGet: - Type: Api - Properties: - Path: /export-variance - Method: GET - RestApiId: !Ref ApiDeployment - varianceExportOptions: - Type: Api - Properties: - Path: /export-variance - Method: OPTIONS - RestApiId: !Ref ApiDeployment - - VarianceExportInvokableFunction: - Type: AWS::Serverless::Function - Properties: - Timeout: 300 - CodeUri: handlers/export-variance/invokable/ - Handler: index.handler - Runtime: nodejs18.x - FunctionName: !Ref VarianceExportFunctionName - Environment: - Variables: - FILE_PATH: !Ref FilePath - FILE_NAME_VARIANCE: !Ref FileNameVarianceExport - S3_BUCKET_DATA: !Ref S3BucketData - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - - !Ref ConstantsLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - - S3FullAccessPolicy: - BucketName: !Ref S3BucketData - - FiscalYearEndGetFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/fiscalYearEnd/GET/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - Events: - fiscalYearEndGet: - Type: Api - Properties: - Path: /fiscalYearEnd - Method: GET - RestApiId: !Ref ApiDeployment - fiscalYearEndOptions: - Type: Api - Properties: - Path: /fiscalYearEnd - Method: OPTIONS - RestApiId: !Ref ApiDeployment - - FiscalYearEndPostLockFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/fiscalYearEnd/POST/ - Handler: index.lockFiscalYear - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - Events: - fiscalYearEndLock: - Type: Api - Properties: - Path: /fiscalYearEnd/lock - Method: POST - RestApiId: !Ref ApiDeployment - - FiscalYearEndPostUnlockFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/fiscalYearEnd/POST/ - Handler: index.unlockFiscalYear - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - Events: - fiscalYearEndUnlock: - Type: Api - Properties: - Path: /fiscalYearEnd/unlock - Method: POST - RestApiId: !Ref ApiDeployment - - NameUpdate: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/nameUpdate/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - NAME_CACHE_TABLE_NAME: !Ref TableNameCacheAR - LOG_LEVEL: info - DATA_REGISTER_NAME_API_ENDPOINT: !Ref DataRegisterNameEndpoint - DATA_REGISTER_NAME_API_KEY: !Ref DataRegisterNameApiKey - Layers: - - !Ref BaseLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - TableName: !Ref TableNameCacheAR - - ParkGetFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/park/GET/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - - !Ref PermissionLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - Events: - parkGet: - Type: Api - Properties: - Path: /park - Method: GET - RestApiId: !Ref ApiDeployment - parkOptions: - Type: Api - Properties: - Path: /park - Method: OPTIONS - RestApiId: !Ref ApiDeployment - - ParkPostFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/park/POST/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - Events: - ParkPostFunction: - Type: Api - Properties: - Path: /park - Method: POST - RestApiId: !Ref ApiDeployment - - ParkPutFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/park/PUT/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - Events: - ParkPutFunction: - Type: Api - Properties: - Path: /park - Method: PUT - RestApiId: !Ref ApiDeployment - - ReadConfigFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/readConfig/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - TABLE_NAME: !Ref TableNameAR - LOG_LEVEL: error - Layers: - - !Ref BaseLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - Events: - readConfigGet: - Type: Api - Properties: - Path: /readConfig - Method: GET - RestApiId: !Ref ApiDeployment - readConfigOptions: - Type: Api - Properties: - Path: /readConfig - Method: OPTIONS - RestApiId: !Ref ApiDeployment - - SubAreaGetFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/subArea/GET/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - Events: - subAreaGet: - Type: Api - Properties: - Path: /subArea - Method: GET - RestApiId: !Ref ApiDeployment - subAreaOptions: - Type: Api - Properties: - Path: /subArea - Method: OPTIONS - RestApiId: !Ref ApiDeployment - - SubAreaDeleteFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/subArea/DELETE/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - LOG_LEVEL: info - TABLE_NAME: !Ref TableNameAR - Layers: - - !Ref BaseLayer - - !Ref PermissionLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - Events: - subAreaDelete: - Type: Api - Properties: - Path: /subArea - Method: DELETE - RestApiId: !Ref ApiDeployment - - SubAreaPostFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/subArea/POST/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - LOG_LEVEL: info - TABLE_NAME: !Ref TableNameAR - CONFIG_TABLE_NAME: !Ref TableNameConfigAR - SSO_ORIGIN: !Ref SSOOrigin - SSO_CLIENT_ID: !Ref SSOClientId - Layers: - - !Ref BaseLayer - - !Ref KeycloakLayer - - !Ref FormulaLayer - - !Ref SubAreaLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - TableNameConfig: !Ref TableNameConfigAR - Events: - subAreaPost: - Type: Api - Properties: - Path: /subArea - Method: POST - RestApiId: !Ref ApiDeployment - - SubAreaPutFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/subArea/PUT/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - Events: - SubAreaPut: - Type: Api - Properties: - Path: /subArea - Method: PUT - RestApiId: !Ref ApiDeployment - - VarianceGetFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/variance/GET/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - LOG_LEVEL: info - TABLE_NAME: !Ref TableNameAR - Layers: - - !Ref BaseLayer - - !Ref PermissionLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - Events: - varianceGet: - Type: Api - Properties: - Path: /variance - Method: GET - RestApiId: !Ref ApiDeployment - varianceOptions: - Type: Api - Properties: - Path: /variance - Method: OPTIONS - RestApiId: !Ref ApiDeployment - - VariancePostFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/variance/POST/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - LOG_LEVEL: info - Layers: - - !Ref BaseLayer - Events: - variancePost: - Type: Api - Properties: - Path: /variance - Method: POST - RestApiId: !Ref ApiDeployment - - VariancePutFunction: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/variance/PUT/ - Handler: index.handler - Runtime: nodejs18.x - Environment: - Variables: - LOG_LEVEL: info - TABLE_NAME: !Ref TableNameAR - Layers: - - !Ref BaseLayer - Policies: - - DynamoDBCrudPolicy: - TableName: !Ref TableNameAR - Events: - variancePut: - Type: Api - Properties: - Path: /variance - Method: PUT - RestApiId: !Ref ApiDeployment - - ### DYNAMODB TABLES ### - - ParksAr: - Type: AWS::DynamoDB::Table - DeletionPolicy: Retain - UpdateReplacePolicy: Retain - Properties: - TableName: !Ref TableNameAR - KeySchema: - - AttributeName: pk - KeyType: HASH - - AttributeName: sk - KeyType: RANGE - AttributeDefinitions: - - AttributeName: pk - AttributeType: S - - AttributeName: sk - AttributeType: S - - AttributeName: orcs - AttributeType: S - GlobalSecondaryIndexes: - - IndexName: orcs-index - KeySchema: - - AttributeName: orcs - KeyType: HASH - Projection: - ProjectionType: ALL - BillingMode: PAY_PER_REQUEST - PointInTimeRecoverySpecification: - PointInTimeRecoveryEnabled: true - StreamSpecification: - StreamViewType: NEW_AND_OLD_IMAGES - NameCacheAr: - Type: "AWS::DynamoDB::Table" - DeletionPolicy: Retain - UpdateReplacePolicy: Retain - Properties: - TableName: !Ref TableNameCacheAR - AttributeDefinitions: - - AttributeName: pk - AttributeType: S - KeySchema: - - AttributeName: pk - KeyType: HASH - BillingMode: PAY_PER_REQUEST - PointInTimeRecoverySpecification: - PointInTimeRecoveryEnabled: true - DependsOn: ParksAr - ConfigAr: - Type: "AWS::DynamoDB::Table" - DeletionPolicy: Retain - UpdateReplacePolicy: Retain - Properties: - TableName: !Ref TableNameConfigAR - AttributeDefinitions: - - AttributeName: pk - AttributeType: S - KeySchema: - - AttributeName: pk - KeyType: HASH - BillingMode: PAY_PER_REQUEST - PointInTimeRecoverySpecification: - PointInTimeRecoveryEnabled: true - DependsOn: NameCacheAr - - ### API ### - ApiDeployment: - Type: AWS::Serverless::Api - Properties: - StageName: !Ref Stage - Cors: - AllowMethods: "'POST,GET,OPTIONS,PUT,DELETE'" - AllowHeaders: "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,X-App-Version'" - AllowOrigin: "'*'" - MaxAge: "'600'" - Auth: - DefaultAuthorizer: KCAuthorizer - AddDefaultAuthorizerToCorsPreflight: false - Authorizers: - KCAuthorizer: - FunctionPayloadType: REQUEST - FunctionArn: !GetAtt Authorizer.Arn - Identity: - Headers: - - Authorization - - ### AUTHORIZER ### - Authorizer: - Type: AWS::Serverless::Function - Properties: - CodeUri: handlers/authorizer/ - Handler: index.handler - Environment: - Variables: - LOG_LEVEL: info - SSO_ISSUER: !Ref SSOIssuerUrl - SSO_JWKSURI: !Ref SSOJWKSUri - Layers: - - !Ref BaseLayer - - !Ref PermissionLayer - Runtime: nodejs18.x - - ### S3 BUCKET ### - ParksArAssetsS3Bucket: - Type: 'AWS::S3::Bucket' - Properties: - BucketName: !Ref S3BucketData - -Outputs: - # ServerlessRestApi is an implicit API created out of Events key under Serverless::Function - # Find out more about other implicit resources you can reference within SAM - # https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#api - ApiDeployment: - Description: 'API Gateway endpoint URL for Stage for Config function' - Value: !Sub 'https://${ApiDeployment}.execute-api.${AWS::Region}.amazonaws.com/${Stage}/config/' diff --git a/lambda/activity/DELETE/index.js b/lambda/activity/DELETE/index.js new file mode 100644 index 0000000..30eb6ab --- /dev/null +++ b/lambda/activity/DELETE/index.js @@ -0,0 +1,5 @@ +exports.handler = async (event, context) => { + logger.debug("Activity delete:", event); + return sendResponse(501, { msg: "Error: Not implemented." }, context); + }; + \ No newline at end of file diff --git a/arSam/handlers/activity/GET/index.js b/lambda/activity/GET/index.js similarity index 87% rename from arSam/handlers/activity/GET/index.js rename to lambda/activity/GET/index.js index 073b932..1c849cc 100644 --- a/arSam/handlers/activity/GET/index.js +++ b/lambda/activity/GET/index.js @@ -1,26 +1,24 @@ -const { runQuery, TABLE_NAME, sendResponse, logger } = require("/opt/baseLayer"); +const { runQuery, TABLE_NAME } = require("../../dynamoUtil"); +const { sendResponse } = require("../../responseUtil"); +const { decodeJWT, resolvePermissions } = require("../../permissionUtil"); +const { logger } = require("../../logger"); exports.handler = async (event, context) => { logger.debug("GET: Activity", event); - // Allow CORS - if (event.httpMethod === 'OPTIONS') { - return sendResponse(200, {}, 'Success', null, context); - } - let queryObj = { TableName: TABLE_NAME, }; try { - let permissionObject = event.requestContext.authorizer - permissionObject.roles = JSON.parse(permissionObject.roles) - + const token = await decodeJWT(event); + const permissionObject = resolvePermissions(token); + if (!permissionObject.isAuthenticated) { logger.info("**NOT AUTHENTICATED, PUBLIC**"); return sendResponse(403, { msg: "Error: UnAuthenticated." }, context); } - + if ( event?.queryStringParameters?.subAreaId && event?.queryStringParameters?.activity && diff --git a/arSam/handlers/activity/POST/index.js b/lambda/activity/POST/index.js similarity index 95% rename from arSam/handlers/activity/POST/index.js rename to lambda/activity/POST/index.js index 08cd1f5..7ad5d50 100644 --- a/arSam/handlers/activity/POST/index.js +++ b/lambda/activity/POST/index.js @@ -1,8 +1,11 @@ const { marshall, unmarshall } = require('@aws-sdk/util-dynamodb'); +const { dynamodb, runQuery, TABLE_NAME, getOne, FISCAL_YEAR_FINAL_MONTH, TIMEZONE } = require('../../dynamoUtil'); +const { sendResponse } = require('../../responseUtil'); +const { decodeJWT, resolvePermissions } = require('../../permissionUtil'); +const { logger } = require('../../logger'); const { DateTime } = require('luxon'); -const { dynamodb, runQuery, TABLE_NAME, getOne, FISCAL_YEAR_FINAL_MONTH, TIMEZONE, sendResponse, logger } = require('/opt/baseLayer'); -const { calculateVariance } = require('/opt/varianceLayer'); -const { EXPORT_VARIANCE_CONFIG } = require('/opt/constantsLayer'); +const { calculateVariance } = require('../../varianceUtils'); +const { EXPORT_VARIANCE_CONFIG } = require('../../constants'); exports.handlePost = async (event, context) => { logger.info('Activity POST:'); @@ -21,14 +24,13 @@ exports.handleUnlock = async (event, context) => { async function main(event, context, lock = null) { try { - + const token = await decodeJWT(event); + const permissionObject = resolvePermissions(token); const warnIfVariance = event.queryStringParameters?.hasOwnProperty('warn') || false; - let permissionObject = event.requestContext.authorizer; - permissionObject.roles = JSON.parse(permissionObject.roles); - + if (!permissionObject.isAuthenticated) { - logger.info("**NOT AUTHENTICATED, PUBLIC**"); - return sendResponse(403, { msg: "Error: UnAuthenticated." }, context); + logger.info('**NOT AUTHENTICATED, PUBLIC**'); + return sendResponse(403, { msg: 'Error: UnAuthenticated.' }, context); } const body = JSON.parse(event.body); diff --git a/arSam/handlers/activity/PUT/index.js b/lambda/activity/PUT/index.js similarity index 77% rename from arSam/handlers/activity/PUT/index.js rename to lambda/activity/PUT/index.js index 0824e17..84f9125 100644 --- a/arSam/handlers/activity/PUT/index.js +++ b/lambda/activity/PUT/index.js @@ -1,5 +1,3 @@ -const { logger } = require("/opt/baseLayer"); - exports.handler = async (event, context) => { logger.debug("Activity put:", event); return sendResponse(501, { msg: "Error: Not implemented." }, context); diff --git a/arSam/handlers/cloudwatchAlarm/index.js b/lambda/cloudwatchAlarm/index.js similarity index 95% rename from arSam/handlers/cloudwatchAlarm/index.js rename to lambda/cloudwatchAlarm/index.js index 238dbdc..b4d191b 100644 --- a/arSam/handlers/cloudwatchAlarm/index.js +++ b/lambda/cloudwatchAlarm/index.js @@ -1,8 +1,9 @@ const axios = require('axios'); const { DateTime } = require('luxon'); -const { TIMEZONE, logger } = require('/opt/baseLayer'); +const { TIMEZONE } = require('../dynamoUtil'); const WEBHOOK_URL = process.env.WEBHOOK_URL; const AWS_ACCOUNT_LIST = JSON.parse(process.env.AWS_ACCOUNT_LIST); +const { logger } = require('../logger'); exports.handler = async (event, context) => { logger.debug('Cloudwatch Alarm Event:', event, context); @@ -62,4 +63,3 @@ exports.handler = async (event, context) => { return {}; }; - diff --git a/arSam/layers/constantsLayer/constantsLayer.js b/lambda/constants.js similarity index 100% rename from arSam/layers/constantsLayer/constantsLayer.js rename to lambda/constants.js diff --git a/arSam/layers/baseLayer/baseLayer.js b/lambda/dynamoUtil.js similarity index 79% rename from arSam/layers/baseLayer/baseLayer.js rename to lambda/dynamoUtil.js index 35b128c..c5e646f 100644 --- a/arSam/layers/baseLayer/baseLayer.js +++ b/lambda/dynamoUtil.js @@ -1,60 +1,18 @@ -// Logger, ResponseUtil, and DynamoUtilLayer are all included in this baseLayer - -// Logger -const { createLogger, format, transports } = require('winston'); -const { combine, timestamp } = format; -const LEVEL = process.env.LOG_LEVEL || 'error'; - -const logger = createLogger({ - level: LEVEL, - format: combine( - timestamp(), - format.printf((info) => { - let meta = '' - let symbols = Object.getOwnPropertySymbols(info) - if (symbols.length == 2) { - meta = JSON.stringify(info[symbols[1]]) - - } - return `${info.timestamp} ${[info.level.toUpperCase()]}: ${info.message} ${meta}`; - }) - ), - transports: [new transports.Console()] -}); - -// ResponseUtil -const sendResponse = function (code, data, context) { - const response = { - statusCode: code, - headers: { - 'Content-Type': 'application/json', - 'Access-Control-Allow-Headers': 'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token', - 'Access-Control-Allow-Origin': '*', - 'Access-Control-Allow-Methods': 'OPTIONS,GET,POST,PUT,DELETE' - }, - body: JSON.stringify(data) - }; - return response; -}; - -// DynamoUtil const { DynamoDB } = require('@aws-sdk/client-dynamodb'); const { marshall, unmarshall } = require('@aws-sdk/util-dynamodb'); +const { logger } = require("./logger"); -const TABLE_NAME = process.env.TABLE_NAME || "ParksAr-tests"; +const TABLE_NAME = process.env.TABLE_NAME || "ar-tests"; const ORCS_INDEX = process.env.ORCS_INDEX || "orcs-index"; -const NAME_CACHE_TABLE_NAME = process.env.NAME_CACHE_TABLE_NAME || "NameCacheAr-tests"; -const CONFIG_TABLE_NAME = process.env.CONFIG_TABLE_NAME || "ConfigAr-tests"; +const NAME_CACHE_TABLE_NAME = process.env.NAME_CACHE_TABLE_NAME || "name-cache"; +const CONFIG_TABLE_NAME = process.env.CONFIG_TABLE_NAME || "ar-config"; const MAX_TRANSACTION_SIZE = 25; -const AWS_REGION = process.env.AWS_REGION || "ca-central-1"; -const DYNAMODB_ENDPOINT_URL = process.env.DYNAMODB_ENDPOINT_URL || "http://localhost:8000/"; const options = { - region: AWS_REGION, - endpoint: DYNAMODB_ENDPOINT_URL + region: "ca-central-1", }; -if (process.env.IS_OFFLINE === 'true') { - // If offline point at local - options.endpoint = 'http://localhost:8000/'; + +if (process.env.IS_OFFLINE) { + options.endpoint = "http://localhost:8000"; } const ACTIVE_STATUS = "active"; const RESERVED_STATUS = "reserved"; @@ -231,9 +189,9 @@ async function batchWrite(items, action = 'put') { await dynamodb.batchWriteItem(batchChunk); } catch (err) { for (const item of items) { - logger.info('item.fields:', item.fields); + console.log('item.fields:', item.fields); } - logger.error('err:', err); + console.log('err:', err); } } } @@ -262,8 +220,8 @@ async function getSubAreas(orcs, includeLegacy = true) { async function getRecords(subArea, bundle, section, region, filter = true, includeLegacy = true) { let records = []; let filteredActivityList = RECORD_ACTIVITY_LIST; - if (filter && subArea.activities) { - filteredActivityList = Array.from(subArea.activities); + if (filter && subArea.activites) { + filteredActivityList = unmarshall(subArea.activites); } for (let activity of filteredActivityList) { const recordQuery = { @@ -279,7 +237,7 @@ async function getRecords(subArea, bundle, section, region, filter = true, inclu } let recordsFromQuery = await runQuery(recordQuery); for (let rec of recordsFromQuery) { - // Tack these items from the subArea record onto the report record as they are not found on the + // Tack these items from the subare record onto the report record as they are not found on the // activity entry rec.bundle = bundle; rec.section = section; @@ -307,8 +265,6 @@ async function incrementAndGetNextSubAreaID() { } module.exports = { - logger, - sendResponse, ACTIVE_STATUS, RESERVED_STATUS, EXPIRED_STATUS, @@ -325,9 +281,10 @@ module.exports = { dynamodb, runQuery, runScan, + batchPut, getOne, getParks, getSubAreas, getRecords, incrementAndGetNextSubAreaID, -} +}; diff --git a/lambda/export-variance/GET/index.js b/lambda/export-variance/GET/index.js new file mode 100644 index 0000000..80396a7 --- /dev/null +++ b/lambda/export-variance/GET/index.js @@ -0,0 +1,183 @@ +const { S3 } = require("@aws-sdk/client-s3"); +const { Lambda } = require("@aws-sdk/client-lambda"); +const { marshall, unmarshall } = require('@aws-sdk/util-dynamodb'); +const s3 = new S3(); + +const IS_OFFLINE = + process.env.IS_OFFLINE && process.env.IS_OFFLINE === "true" ? true : false; + +const options = {}; +if (IS_OFFLINE) { + options.region = "local-env"; + // For local we use port 3002 because we're hitting an invokable + options.endpoint = "http://localhost:3002"; +} + +const lambda = new Lambda(options); + +const { logger } = require("../../logger"); +const { decodeJWT, resolvePermissions } = require("../../permissionUtil"); +const { sendResponse } = require("../../responseUtil"); +const { TABLE_NAME, dynamodb } = require("../../dynamoUtil"); +const crypto = require('crypto'); + +const EXPORT_FUNCTION_NAME = + process.env.EXPORT_FUNCTION_NAME || "bcparks-ar-api-api-varianceExportInvokable"; + +const EXPIRY_TIME = process.env.EXPORT_EXPIRY_TIME + ? Number(process.env.EXPORT_EXPIRY_TIME) + : 60 * 15; // 15 minutes + +exports.handler = async (event, context) => { + logger.info("GET: Export variances - ", event?.queryStringParameters); + + // decode permissions + const token = await decodeJWT(event); + const permissionObject = resolvePermissions(token); + + if (!permissionObject.isAuthenticated) { + return sendResponse(403, { msg: "Error: Not authenticated" }, context); + } + + let params = event?.queryStringParameters || {}; + params['roles'] = permissionObject.roles; + + // Must provide fiscal year end + if (!params?.fiscalYearEnd) { + return sendResponse(400, { msg: "No fiscal year end provided." }, context); + } + + // generate a job id from params+role + let hashParams = {...params}; + delete hashParams.getJob; + const decodedHash = JSON.stringify(hashParams) + JSON.stringify(permissionObject.roles); + const hash = crypto.createHash('md5').update(decodedHash).digest('hex'); + const pk = "variance-exp-job"; + + // check for existing job + let existingJobQueryObj = { + TableName: TABLE_NAME, + ExpressionAttributeValues: { + ":pk": { S: pk }, + ":sk": { S: hash } + }, + KeyConditionExpression: "pk = :pk and sk = :sk" + } + + let jobObj = {}; + + try { + const res = await dynamodb.query(existingJobQueryObj); + jobObj = unmarshall(res?.Items?.[0]) || null; + } catch (error) { + logger.error("Error querying for existing job: ", error); + return sendResponse(500, { msg: "Error querying for existing job" }, context); + } + + if (params?.getJob) { + // We're trying to download an existing job + if (!jobObj || !jobObj?.sk) { + // Job doesn't exist. + return sendResponse(200, { msg: "Requested job does not exist" }, context); + } else if ( + jobObj?.progressState === "complete" || + jobObj?.progressState === "error" + ) { + // Job is not currently running. Return signed URL + try { + let urlKey = jobObj?.key; + let message = 'Job completed'; + if (jobObj?.progressState === 'error') { + urlKey = jobObj?.lastSuccessfulJob?.key; + message = 'Job failed. Returning last successful job.'; + } + let URL = ""; + if (!process.env.IS_OFFLINE) { + logger.debug('S3_BUCKET_DATA:', process.env.S3_BUCKET_DATA); + logger.debug('Url key:', urlKey); + URL = await s3.getSignedUrl("getObject", { + Bucket: process.env.S3_BUCKET_DATA, + Expires: EXPIRY_TIME, + Key: urlKey, + }); + } + // send back new job object + delete jobObj.pk; + delete jobObj.sk; + delete jobObj.key; + return sendResponse(200, { msg: message, signedURL: URL, jobObj: jobObj }, context); + } catch (error) { + logger.error("Error getting signed URL: ", error); + return sendResponse(500, { msg: "Error getting signed URL" }, context); + } + + } else { + // Job is currently running. Return latest job object + delete jobObj?.pk; + delete jobObj?.sk; + delete jobObj?.key; + return sendResponse(200, { msg: "Job is currently running", jobObj: jobObj }, context); + } + } else { + // We are trying to generate a new report + // If there's already a completed job, we want to save this in case the new job fails + let lastSuccessfulJob = {}; + if (jobObj && jobObj?.progressState === "complete" && jobObj?.key) { + lastSuccessfulJob = { + key: jobObj?.key, + dateGenerated: jobObj?.dateGenerated || new Date().toISOString(), + } + } else if (jobObj?.progressState === "error") { + lastSuccessfulJob = jobObj?.lastSuccessfulJob || {}; + } + + try { + // create the new job object + const varianceExportPutObj = { + TableName: TABLE_NAME, + ExpressionAttributeValues: { + ":complete": { S: "complete" }, + ":error": { S: "error" }, + }, + ConditionExpression: "(attribute_not_exists(pk) AND attribute_not_exists(sk)) OR attribute_not_exists(progressState) OR progressState = :complete OR progressState = :error", + Item: marshall({ + pk: pk, + sk: hash, + params: params, + progressPercentage: 0, + progressDescription: "Initializing job.", + progressState: "Initializing", + lastSuccessfulJob: lastSuccessfulJob + }), + }; + + logger.debug('Creating new job:', varianceExportPutObj); + + const newJob = await dynamodb.putItem(varianceExportPutObj); + logger.debug('New job created:', newJob); + + // run the export function + const varianceExportParams = { + FunctionName: EXPORT_FUNCTION_NAME, + InvocationType: "Event", + LogType: "None", + Payload: JSON.stringify({ + jobId: hash, + params: params, + lastSuccessfulJob: lastSuccessfulJob + }) + } + + // Invoke the variance report export lambda + await lambda.invoke(varianceExportParams); + + return sendResponse(200, { msg: "Variance report export job created" }, context); + } catch (error) { + // a job already exists + logger.error("Error creating new job:", error); + return sendResponse(200, { msg: "Variance report export job already running" }, context); + + } + } +} + diff --git a/arSam/handlers/export-variance/invokable/index.js b/lambda/export-variance/invokable/index.js similarity index 94% rename from arSam/handlers/export-variance/invokable/index.js rename to lambda/export-variance/invokable/index.js index 8581a61..3f5d9a5 100644 --- a/arSam/handlers/export-variance/invokable/index.js +++ b/lambda/export-variance/invokable/index.js @@ -1,12 +1,13 @@ +const { logger } = require("../../logger"); const { S3 } = require('@aws-sdk/client-s3'); -const s3 = new S3(); const { marshall } = require('@aws-sdk/util-dynamodb'); const fs = require('fs'); -const { VARIANCE_CSV_SCHEMA, VARIANCE_STATE_DICTIONARY } = require("/opt/constantsLayer"); -const { getParks, TABLE_NAME, dynamodb, runQuery, logger } = require("/opt/baseLayer"); +const { VARIANCE_CSV_SCHEMA, VARIANCE_STATE_DICTIONARY } = require("../../constants"); +const { getParks, TABLE_NAME, dynamodb, runQuery } = require("../../dynamoUtil"); +const s3 = S3(); -const FILE_PATH = process.env.FILE_PATH || "/tmp/"; +const FILE_PATH = process.env.FILE_PATH || "./"; const FILE_NAME = process.env.FILE_NAME || "A&R_Variance_Report"; let LAST_SUCCESSFUL_JOB = {}; @@ -38,13 +39,8 @@ exports.handler = async (event, context) => { throw new Error("Missing fiscal year end parameter"); } - await updateJobWithState( - VARIANCE_STATE_DICTIONARY.FETCHING, - `Fetching all entries for ${roles}` - ); + await updateJobWithState(VARIANCE_STATE_DICTIONARY.FETCHING); - logger.info(`=== Exporting filtered data ===`); - // collect variance records const records = await getVarianceRecords(fiscalYearEnd, roles); await updateJobWithState(VARIANCE_STATE_DICTIONARY.FORMATTING); @@ -286,10 +282,13 @@ async function uploadToS3(csvData) { Bucket: process.env.S3_BUCKET_DATA, Key: S3_KEY, Body: buffer, - }; + } + + if (!process.env.IS_OFFLINE) { + await s3.putObject(params); + } + logger.debug("Uploaded to S3"); - await s3.putObject(params); - logger.debug("File successfully uploaded to S3"); } function convertMonth(monthNumber){ @@ -305,4 +304,4 @@ function convertMonth(monthNumber){ return 'Invalid month number'; } -} +} \ No newline at end of file diff --git a/arSam/handlers/export/GET/index.js b/lambda/export/GET/index.js similarity index 81% rename from arSam/handlers/export/GET/index.js rename to lambda/export/GET/index.js index f7a1053..e666fce 100644 --- a/arSam/handlers/export/GET/index.js +++ b/lambda/export/GET/index.js @@ -1,28 +1,28 @@ const { Lambda } = require("@aws-sdk/client-lambda"); -const { getSignedUrl } = require("@aws-sdk/s3-request-presigner"); -const { S3Client, GetObjectCommand } = require("@aws-sdk/client-s3"); +const { S3 } = require("@aws-sdk/client-s3"); const { marshall } = require('@aws-sdk/util-dynamodb'); -const defaultRegion = process.env.AWS_REGION || "ca-central-1"; -const s3Client = new S3Client({ region: defaultRegion }); -const bucket = process.env.S3_BUCKET_DATA || "parks-ar-assets-tools"; +const s3 = new S3(); const IS_OFFLINE = process.env.IS_OFFLINE && process.env.IS_OFFLINE === "true" ? true : false; const options = {}; if (IS_OFFLINE) { - options.region = "local"; + options.region = "local-env"; // For local we use port 3002 because we're hitting an invokable options.endpoint = "http://localhost:3002"; } const lambda = new Lambda(options); -const { runQuery, dynamodb, TABLE_NAME, sendResponse, logger } = require("/opt/baseLayer"); -const { convertRolesToMD5 } = require("/opt/functionsLayer"); +const { runQuery, dynamodb, TABLE_NAME } = require("../../dynamoUtil"); +const { sendResponse } = require("../../responseUtil"); +const { decodeJWT, resolvePermissions } = require("../../permissionUtil"); +const { convertRolesToMD5 } = require("../../functions"); +const { logger } = require("../../logger"); const EXPORT_FUNCTION_NAME = - process.env.EXPORT_FUNCTION_NAME || "ar-api-ExportInvokableFunction"; + process.env.EXPORT_FUNCTION_NAME || "bcparks-ar-api-api-exportInvokable"; const EXPIRY_TIME = process.env.EXPORT_EXPIRY_TIME ? Number(process.env.EXPORT_EXPIRY_TIME) @@ -31,19 +31,14 @@ const EXPIRY_TIME = process.env.EXPORT_EXPIRY_TIME exports.handler = async (event, context) => { logger.debug("GET: Export", event.queryStringParameters); - // Allow CORS - if (event.httpMethod === 'OPTIONS') { - return sendResponse(200, {}, 'Success', null, context); - } - try { - let permissionObject = event.requestContext.authorizer; - permissionObject.roles = JSON.parse(permissionObject.roles); + const token = await decodeJWT(event); + const permissionObject = resolvePermissions(token); if (!permissionObject.isAuthenticated) { return sendResponse(403, { msg: "Error: UnAuthenticated." }, context); } - + // This will give us the sk const sk = convertRolesToMD5(permissionObject.roles, "export-"); @@ -76,12 +71,12 @@ exports.handler = async (event, context) => { message = "Job failed. Returning last successful job."; } let URL = ""; - if (!IS_OFFLINE) { - let command = new GetObjectCommand({ Bucket: bucket, Key: urlKey }); - URL = await getSignedUrl( - s3Client, - command, - { expiresIn: EXPIRY_TIME }); + if (!process.env.IS_OFFLINE) { + URL = await s3.getSignedUrl("getObject", { + Bucket: process.env.S3_BUCKET_DATA, + Expires: EXPIRY_TIME, + Key: urlKey, + }); } delete res.pk; delete res.sk; diff --git a/arSam/handlers/export/invokable/index.js b/lambda/export/invokable/index.js similarity index 98% rename from arSam/handlers/export/invokable/index.js rename to lambda/export/invokable/index.js index a526f1d..07489fb 100644 --- a/arSam/handlers/export/invokable/index.js +++ b/lambda/export/invokable/index.js @@ -3,19 +3,20 @@ const s3 = new S3(); const fs = require("fs"); const writeXlsxFile = require("write-excel-file/node"); const { + runQuery, TABLE_NAME, getParks, getSubAreas, getRecords, - logger, -} = require("/opt/baseLayer"); +} = require("../../dynamoUtil"); const { EXPORT_NOTE_KEYS, EXPORT_MONTHS, CSV_SYSADMIN_SCHEMA, STATE_DICTIONARY, -} = require("/opt/constantsLayer"); -const { updateJobEntry } = require("/opt/functionsLayer"); +} = require("../../constants"); +const { updateJobEntry } = require("../../functions"); +const { logger } = require("../../logger"); const { arraySum, @@ -27,10 +28,10 @@ const { dayUseVehicleAttendance, backcountryCabinsAttendance, boatingAttendance, -} = require("/opt/formulaLayer"); +} = require("../../formulaUtils"); -const FILE_PATH = process.env.FILE_PATH || "/tmp/"; -const FILE_NAME = process.env.FILE_NAME || "A&R_Variance_Report"; +const FILE_PATH = process.env.FILE_PATH || "./"; +const FILE_NAME = process.env.FILE_NAME || "A&R_Export"; const SYSADMIN_SCHEMA = process.env.CSV_SYSADMIN_SCHEMA ? JSON.parse(process.env.CSV_SYSADMIN_SCHEMA) diff --git a/arSam/handlers/fiscalYearEnd/GET/index.js b/lambda/fiscalYearEnd/GET/index.js similarity index 86% rename from arSam/handlers/fiscalYearEnd/GET/index.js rename to lambda/fiscalYearEnd/GET/index.js index 0557f20..56b6101 100644 --- a/arSam/handlers/fiscalYearEnd/GET/index.js +++ b/lambda/fiscalYearEnd/GET/index.js @@ -1,13 +1,9 @@ -const { getOne, TABLE_NAME, runQuery, sendResponse, logger } = require("/opt/baseLayer"); +const { getOne, TABLE_NAME, runQuery } = require("../../dynamoUtil"); +const { sendResponse } = require("../../responseUtil"); +const { logger } = require("../../logger"); exports.handler = async (event, context) => { logger.debug("GET: dateConfig", event); - - // Allow CORS - if (event.httpMethod === 'OPTIONS') { - return sendResponse(200, {}, 'Success', null, context); - } - try { const year = getDate(event); let res; diff --git a/arSam/handlers/fiscalYearEnd/POST/index.js b/lambda/fiscalYearEnd/POST/index.js similarity index 89% rename from arSam/handlers/fiscalYearEnd/POST/index.js rename to lambda/fiscalYearEnd/POST/index.js index b343429..0bbc257 100644 --- a/arSam/handlers/fiscalYearEnd/POST/index.js +++ b/lambda/fiscalYearEnd/POST/index.js @@ -4,9 +4,10 @@ const { dynamodb, TIMEZONE, FISCAL_YEAR_FINAL_MONTH, - sendResponse, - logger -} = require("/opt/baseLayer"); +} = require("../../dynamoUtil"); +const { sendResponse } = require("../../responseUtil"); +const { logger } = require("../../logger"); +const { decodeJWT, resolvePermissions } = require("../../permissionUtil"); const { DateTime } = require("luxon"); // lock the fiscal year from further edits @@ -35,10 +36,8 @@ async function handleLockUnlock(isLocked, event, context) { } async function checkPermissions(event) { - - const permissionObject = event.requestContext.authorizer - permissionObject.roles = JSON.parse(permissionObject.roles) - + const token = await decodeJWT(event); + const permissionObject = resolvePermissions(token); if (!permissionObject.isAdmin) { throw { code: 403, diff --git a/arSam/layers/formulaLayer/formulaLayer.js b/lambda/formulaUtils.js similarity index 98% rename from arSam/layers/formulaLayer/formulaLayer.js rename to lambda/formulaUtils.js index 89aaacb..5d961c1 100644 --- a/arSam/layers/formulaLayer/formulaLayer.js +++ b/lambda/formulaUtils.js @@ -1,6 +1,6 @@ const { marshall } = require('@aws-sdk/util-dynamodb'); -const { TABLE_NAME } = require("/opt/baseLayer"); -const { validActivities } = require("/opt/subAreaLayer"); +const { TABLE_NAME } = require("./dynamoUtil"); +const { validActivities } = require("./subAreaUtils"); const gstPercent = 5; const defaultDecimalPlaces = 1; diff --git a/arSam/layers/functionsLayer/functionsLayer.js b/lambda/functions.js similarity index 94% rename from arSam/layers/functionsLayer/functionsLayer.js rename to lambda/functions.js index 1c6da85..0afb773 100644 --- a/arSam/layers/functionsLayer/functionsLayer.js +++ b/lambda/functions.js @@ -1,5 +1,5 @@ const { marshall } = require('@aws-sdk/util-dynamodb'); -const { dynamodb } = require("/opt/baseLayer"); +const { dynamodb } = require("./dynamoUtil"); const crypto = require("crypto"); function convertRolesToMD5(roles, prefix = "") { diff --git a/arSam/layers/keycloakLayer/keycloakLayer.js b/lambda/keycloakUtil.js similarity index 98% rename from arSam/layers/keycloakLayer/keycloakLayer.js rename to lambda/keycloakUtil.js index b1afe28..14e1c09 100644 --- a/arSam/layers/keycloakLayer/keycloakLayer.js +++ b/lambda/keycloakUtil.js @@ -1,5 +1,5 @@ const axios = require("axios"); -const { logger } = require("/opt/baseLayer"); +const { logger } = require("./logger"); const config = { headers: { diff --git a/lambda/logger.js b/lambda/logger.js new file mode 100644 index 0000000..b02c625 --- /dev/null +++ b/lambda/logger.js @@ -0,0 +1,21 @@ +const { createLogger, format, transports } = require('winston'); +const { combine, timestamp } = format; + +const LEVEL = process.env.LOG_LEVEL || 'error'; + +exports.logger = createLogger({ + level: LEVEL, + format: combine( + timestamp(), + format.printf((info) => { + let meta = '' + let symbols = Object.getOwnPropertySymbols(info) + if (symbols.length == 2) { + meta = JSON.stringify(info[symbols[1]]) + + } + return `${info.timestamp} ${[info.level.toUpperCase()]}: ${info.message} ${meta}`; + }) + ), + transports: [new transports.Console()] +}); \ No newline at end of file diff --git a/arSam/handlers/nameUpdate/index.js b/lambda/nameUpdate/index.js similarity index 98% rename from arSam/handlers/nameUpdate/index.js rename to lambda/nameUpdate/index.js index 3c6a4a6..a9caf42 100644 --- a/arSam/handlers/nameUpdate/index.js +++ b/lambda/nameUpdate/index.js @@ -1,6 +1,7 @@ const axios = require('axios'); const { marshall } = require('@aws-sdk/util-dynamodb'); -const { runQuery, runScan, NAME_CACHE_TABLE_NAME, TABLE_NAME, ORCS_INDEX, dynamodb, logger } = require("/opt/baseLayer"); +const { runQuery, runScan, NAME_CACHE_TABLE_NAME, TABLE_NAME, ORCS_INDEX, dynamodb } = require("../dynamoUtil"); +const { logger } = require('../logger'); const DATA_REGISTER_NAME_ENDPOINT = process.env.DATA_REGISTER_NAME_ENDPOINT || 'https://zloys5cfvf.execute-api.ca-central-1.amazonaws.com/api/parks/names?status=established'; const DATA_REGISTER_NAME_API_KEY = process.env.DATA_REGISTER_NAME_API_KEY; const ESTABLISHED_STATE = 'established'; diff --git a/arSam/handlers/park/GET/index.js b/lambda/park/GET/index.js similarity index 91% rename from arSam/handlers/park/GET/index.js rename to lambda/park/GET/index.js index 880b408..899680a 100644 --- a/arSam/handlers/park/GET/index.js +++ b/lambda/park/GET/index.js @@ -1,21 +1,23 @@ -const { runQuery, TABLE_NAME, sendResponse, logger } = require("/opt/baseLayer"); -const { roleFilter } = require("/opt/permissionLayer"); +const { runQuery, TABLE_NAME } = require("../../dynamoUtil"); +const { sendResponse } = require("../../responseUtil"); +const { + decodeJWT, + roleFilter, + resolvePermissions, +} = require("../../permissionUtil"); +const { logger } = require("../../logger"); exports.handler = async (event, context) => { logger.info("GET: Park"); - - // Allow CORS - if (event.httpMethod === 'OPTIONS') { - return sendResponse(200, {}, 'Success', null, context); - } + logger.debug(event); let queryObj = { TableName: TABLE_NAME, }; try { - const permissionObject = event.requestContext.authorizer; - permissionObject.roles = JSON.parse(permissionObject.roles); + const token = await decodeJWT(event); + const permissionObject = resolvePermissions(token); if (!permissionObject.isAuthenticated) { logger.info("**NOT AUTHENTICATED, PUBLIC**"); @@ -88,7 +90,7 @@ exports.handler = async (event, context) => { } else { // Some other authenticated role logger.info( - "**Some other authenticated person with attendance-and-revenue role**" + "**Some other authenticated person with attendance-and-revenue roles**" ); logger.debug("permissionObject.roles:", permissionObject.roles); results = await roleFilter(results, permissionObject.roles); diff --git a/arSam/handlers/park/POST/index.js b/lambda/park/POST/index.js similarity index 76% rename from arSam/handlers/park/POST/index.js rename to lambda/park/POST/index.js index 030ed34..680737d 100644 --- a/arSam/handlers/park/POST/index.js +++ b/lambda/park/POST/index.js @@ -1,14 +1,17 @@ -const { dynamodb, TABLE_NAME, logger, sendResponse } = require("/opt/baseLayer"); +const { dynamodb, TABLE_NAME } = require("../../dynamoUtil"); +const { decodeJWT, resolvePermissions } = require("../../permissionUtil"); +const { logger } = require("../../logger"); +const { sendResponse } = require("../../responseUtil"); exports.handler = async (event, context) => { logger.debug("Park POST:", event); try { - const permissionObject = event.requestContext.authorizer; - permissionObject.roles = JSON.parse(permissionObject.roles); - + const token = await decodeJWT(event); + const permissionObject = resolvePermissions(token); + if (!permissionObject.isAuthenticated) { logger.info("**NOT AUTHENTICATED, PUBLIC**"); - return sendResponse(403, { msg: "Error: UnAuthenticated." }, context); + return sendResponse(403, { msg: "Error: Unauthenticated." }, context); } // Admins only diff --git a/arSam/handlers/park/PUT/index.js b/lambda/park/PUT/index.js similarity index 77% rename from arSam/handlers/park/PUT/index.js rename to lambda/park/PUT/index.js index 028bf99..60aced2 100644 --- a/arSam/handlers/park/PUT/index.js +++ b/lambda/park/PUT/index.js @@ -1,5 +1,3 @@ -const { logger } = require("/opt/baseLayer"); - exports.handler = async (event, context) => { logger.debug("Park put:", event); return sendResponse(501, { msg: "Error: Not implemented." }, context); diff --git a/arSam/layers/permissionLayer/permissionLayer.js b/lambda/permissionUtil.js similarity index 98% rename from arSam/layers/permissionLayer/permissionLayer.js rename to lambda/permissionUtil.js index cbcc46d..b545421 100644 --- a/arSam/layers/permissionLayer/permissionLayer.js +++ b/lambda/permissionUtil.js @@ -1,12 +1,12 @@ const jwt = require('jsonwebtoken'); -const jwksClient = require('jwks-rsa'); +const jwksClient = require('jwks-rsa'); const SSO_ISSUER = process.env.SSO_ISSUER || 'https://dev.loginproxy.gov.bc.ca/auth/realms/bcparks-service-transformation'; const SSO_JWKSURI = process.env.SSO_JWKSURI || 'https://dev.loginproxy.gov.bc.ca/auth/realms/bcparks-service-transformation/protocol/openid-connect/certs'; const INVALID_TOKEN = { decoded: false, data: null }; -const { logger } = require('/opt/baseLayer'); +const { logger } = require('./logger'); exports.decodeJWT = async function (event) { const token = event.headers.Authorization; @@ -180,4 +180,4 @@ exports.requirePermissions = async function (event, permissionSet) { } return { token, permissionObject }; -} +} \ No newline at end of file diff --git a/arSam/handlers/readConfig/index.js b/lambda/readConfig/index.js similarity index 74% rename from arSam/handlers/readConfig/index.js rename to lambda/readConfig/index.js index 2521fa2..e592613 100644 --- a/arSam/handlers/readConfig/index.js +++ b/lambda/readConfig/index.js @@ -1,13 +1,10 @@ -const { runQuery, TABLE_NAME, sendResponse, logger } = require('/opt/baseLayer'); +const { runQuery, TABLE_NAME } = require('../dynamoUtil'); +const { sendResponse } = require('../responseUtil'); +const { logger } = require('../logger'); exports.handler = async (event, context) => { logger.debug('Read Config', event); - // Allow CORS - if (event.httpMethod === 'OPTIONS') { - return sendResponse(200, {}, 'Success', null, context); - } - let queryObj = { TableName: TABLE_NAME }; @@ -25,4 +22,4 @@ exports.handler = async (event, context) => { logger.error(err); return sendResponse(400, err, context); } -}; +}; \ No newline at end of file diff --git a/lambda/responseUtil.js b/lambda/responseUtil.js new file mode 100644 index 0000000..5caf922 --- /dev/null +++ b/lambda/responseUtil.js @@ -0,0 +1,13 @@ +exports.sendResponse = function (code, data, context) { + const response = { + statusCode: code, + headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Headers': 'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token', + 'Access-Control-Allow-Origin': '*', + 'Access-Control-Allow-Methods': 'OPTIONS,GET,POST' + }, + body: JSON.stringify(data) + }; + return response; +}; diff --git a/arSam/handlers/subArea/DELETE/index.js b/lambda/subArea/DELETE/index.js similarity index 96% rename from arSam/handlers/subArea/DELETE/index.js rename to lambda/subArea/DELETE/index.js index e8056c6..e550549 100644 --- a/arSam/handlers/subArea/DELETE/index.js +++ b/lambda/subArea/DELETE/index.js @@ -1,6 +1,8 @@ +const { logger } = require("../../logger"); const { marshall } = require('@aws-sdk/util-dynamodb'); -const { requirePermissions } = require("/opt/permissionLayer"); -const { getOne, TABLE_NAME, dynamodb, runQuery, sendResponse, logger } = require("/opt/baseLayer"); +const { sendResponse } = require("../../responseUtil"); +const { requirePermissions } = require("../../permissionUtil"); +const { getOne, TABLE_NAME, dynamodb, runQuery } = require("../../dynamoUtil"); exports.handler = async (event, context) => { logger.info("SubArea delete"); @@ -189,4 +191,4 @@ async function archiveSubArea(subAreaId, orcs, context) { logger.info("Archived."); return sendResponse(200, { msg: "SubArea archived" }, context); -}; +}; \ No newline at end of file diff --git a/arSam/handlers/subArea/GET/index.js b/lambda/subArea/GET/index.js similarity index 81% rename from arSam/handlers/subArea/GET/index.js rename to lambda/subArea/GET/index.js index e1cb0f1..35f28b1 100644 --- a/arSam/handlers/subArea/GET/index.js +++ b/lambda/subArea/GET/index.js @@ -1,8 +1,5 @@ // TODO: Decouple subArea get from park get endpoint. -const { logger } = require("/opt/baseLayer"); - exports.handler = async (event, context) => { logger.debug("Subarea get:", event); return sendResponse(501, { msg: "Error: Not implemented." }, context); }; - \ No newline at end of file diff --git a/arSam/handlers/subArea/POST/index.js b/lambda/subArea/POST/index.js similarity index 76% rename from arSam/handlers/subArea/POST/index.js rename to lambda/subArea/POST/index.js index 8b2e3b7..fbd5ddc 100644 --- a/arSam/handlers/subArea/POST/index.js +++ b/lambda/subArea/POST/index.js @@ -1,26 +1,19 @@ -const { - dynamodb, - incrementAndGetNextSubAreaID, - getOne, - logger, - sendResponse -} = require("/opt/baseLayer"); -const { createKeycloakRole } = require("/opt/keycloakLayer"); -const { createPutFormulaConfigObj } = require("/opt/formulaLayer"); -const { - getValidSubareaObj, - createUpdateParkWithNewSubAreaObj, - createPutSubAreaObj, -} = require("/opt/subAreaLayer"); - -const SSO_ORIGIN = process.env.SSO_ORIGIN || 'https://dev.loginproxy.gov.bc.ca'; -const SSO_CLIENT_ID = process.env.SSO_CLIENT_ID || 'default-client'; +const { dynamodb, incrementAndGetNextSubAreaID, getOne } = require('../../dynamoUtil'); +const { createKeycloakRole } = require('../../keycloakUtil'); +const { createPutFormulaConfigObj } = require('../../formulaUtils'); +const { sendResponse } = require('../../responseUtil'); +const { decodeJWT, resolvePermissions } = require('../../permissionUtil'); +const { logger } = require('../../logger'); +const { getValidSubareaObj, createUpdateParkWithNewSubAreaObj, createPutSubAreaObj } = require('../../subAreaUtils'); + +const SSO_ORIGIN = process.env.SSO_ORIGIN; +const SSO_CLIENT_ID = process.env.SSO_CLIENT_ID; exports.handler = async (event, context) => { logger.debug('Subarea POST:', event); try { - const permissionObject = event.requestContext.authorizer; - permissionObject.roles = JSON.parse(permissionObject.roles); + const token = await decodeJWT(event); + const permissionObject = resolvePermissions(token); if (!permissionObject.isAuthenticated) { logger.info('**NOT AUTHENTICATED, PUBLIC**'); @@ -35,7 +28,7 @@ exports.handler = async (event, context) => { const body = JSON.parse(event.body); - // ensure all mandatory fields exist + // ensure all madatory fields exist if ( !body.orcs || !body.activities || diff --git a/arSam/handlers/subArea/PUT/index.js b/lambda/subArea/PUT/index.js similarity index 76% rename from arSam/handlers/subArea/PUT/index.js rename to lambda/subArea/PUT/index.js index 2453bc9..f8aa9c3 100644 --- a/arSam/handlers/subArea/PUT/index.js +++ b/lambda/subArea/PUT/index.js @@ -1,7 +1,4 @@ -const { logger } = require("/opt/baseLayer"); - exports.handler = async (event, context) => { logger.debug("Subarea put:", event); return sendResponse(501, { msg: "Error: Not implemented." }, context); }; - \ No newline at end of file diff --git a/arSam/layers/subAreaLayer/subAreaLayer.js b/lambda/subAreaUtils.js similarity index 98% rename from arSam/layers/subAreaLayer/subAreaLayer.js rename to lambda/subAreaUtils.js index a2a5381..49eaef7 100644 --- a/arSam/layers/subAreaLayer/subAreaLayer.js +++ b/lambda/subAreaUtils.js @@ -1,5 +1,5 @@ const { marshall } = require('@aws-sdk/util-dynamodb'); -const { TABLE_NAME } = require('/opt/baseLayer'); +const { TABLE_NAME } = require('./dynamoUtil'); function createUpdateParkWithNewSubAreaObj(subAreaName, subAreaId, isLegacy, orcs) { // Return update park obj diff --git a/arSam/handlers/variance/GET/index.js b/lambda/variance/GET/index.js similarity index 89% rename from arSam/handlers/variance/GET/index.js rename to lambda/variance/GET/index.js index 7832601..ebe7473 100644 --- a/arSam/handlers/variance/GET/index.js +++ b/lambda/variance/GET/index.js @@ -1,17 +1,18 @@ -const { runQuery, TABLE_NAME, sendResponse, logger } = require("/opt/baseLayer"); -const { roleFilter } = require("/opt/permissionLayer"); +const { runQuery, TABLE_NAME } = require("../../dynamoUtil"); +const { sendResponse } = require("../../responseUtil"); +const { + decodeJWT, + roleFilter, + resolvePermissions, +} = require("../../permissionUtil"); +const { logger } = require("../../logger"); exports.handler = async (event, context) => { logger.debug("Variance get:", event); - // Allow CORS - if (event.httpMethod === 'OPTIONS') { - return sendResponse(200, {}, 'Success', null, context); - } - try { - const permissionObject = event.requestContext.authorizer; - permissionObject.roles = JSON.parse(permissionObject.roles); + const token = await decodeJWT(event); + const permissionObject = resolvePermissions(token); // Only admins see this route. if (permissionObject.isAdmin) { @@ -26,7 +27,7 @@ exports.handler = async (event, context) => { return sendResponse(403, { msg: "Error: UnAuthenticated." }, context); } } - + // new pk/sk for variance: // pk: variance::ORCS::activityDate // sk: subAreaId::activity @@ -51,7 +52,7 @@ exports.handler = async (event, context) => { return await getVarianceRecords(permissionObject, orcs, activityDate, subAreaId, activity, resolvedStatus, lastEvaluatedKeyPK, lastEvaluatedKeySK) } catch (e) { - logger.error(e); + console.error(e); } return sendResponse(400, { msg: "Invalid request." }, context); diff --git a/arSam/handlers/variance/POST/index.js b/lambda/variance/POST/index.js similarity index 76% rename from arSam/handlers/variance/POST/index.js rename to lambda/variance/POST/index.js index 1c8ee13..f0ae7c5 100644 --- a/arSam/handlers/variance/POST/index.js +++ b/lambda/variance/POST/index.js @@ -1,7 +1,4 @@ -const { logger } = require("/opt/baseLayer"); - exports.handler = async (event, context) => { logger.debug("Variance post:", event); return sendResponse(501, { msg: "Error: Not implemented." }, context); }; - \ No newline at end of file diff --git a/arSam/handlers/variance/PUT/index.js b/lambda/variance/PUT/index.js similarity index 87% rename from arSam/handlers/variance/PUT/index.js rename to lambda/variance/PUT/index.js index a3f370e..0879e3a 100644 --- a/arSam/handlers/variance/PUT/index.js +++ b/lambda/variance/PUT/index.js @@ -1,12 +1,14 @@ -const { dynamodb, TABLE_NAME, logger, sendResponse } = require("/opt/baseLayer"); +const { dynamodb, TABLE_NAME } = require("../../dynamoUtil"); +const { decodeJWT, resolvePermissions } = require("../../permissionUtil"); +const { logger } = require("../../logger"); +const { sendResponse } = require("../../responseUtil"); exports.handler = async (event, context) => { logger.debug("Variance PUT:", event); - try { - const permissionObject = event.requestContext.authorizer; - permissionObject.roles = JSON.parse(permissionObject.roles); - + const token = await decodeJWT(event); + const permissionObject = resolvePermissions(token); + if (!permissionObject.isAuthenticated) { logger.info("**NOT AUTHENTICATED, PUBLIC**"); return sendResponse(403, { msg: "Error: Unauthenticated." }, context); diff --git a/arSam/layers/varianceLayer/varianceLayer.js b/lambda/varianceUtils.js similarity index 94% rename from arSam/layers/varianceLayer/varianceLayer.js rename to lambda/varianceUtils.js index f34ab57..d72434f 100644 --- a/arSam/layers/varianceLayer/varianceLayer.js +++ b/lambda/varianceUtils.js @@ -1,4 +1,4 @@ -const { logger } = require("/opt/baseLayer"); +const { logger } = require("./logger"); function calculateVariance( historicalValues, @@ -43,7 +43,7 @@ function calculateVariance( averageHistoricValue: averageHistoricValue }; logger.info("Variance return obj:", res); - logger.info("=== Variance calculation complete ==="); + logger.info("=== Variance calulation complete ==="); return res; } diff --git a/migrations-data/addFromCSV.js b/migrations-data/addFromCSV.js index 96debd1..26b5eb0 100644 --- a/migrations-data/addFromCSV.js +++ b/migrations-data/addFromCSV.js @@ -1,5 +1,5 @@ const AWS = require('aws-sdk'); -const { dynamodb, TABLE_NAME, getOne } = require('/opt/baseLayer'); +const { dynamodb, TABLE_NAME, getOne } = require('../lambda/dynamoUtil'); const readXlsxFile = require('read-excel-file/node'); @@ -258,4 +258,4 @@ async function putItem(record, overwrite = false) { module.exports = { doMigration -} +} \ No newline at end of file diff --git a/migrations-data/checkAllRecordsForORC.js b/migrations-data/checkAllRecordsForORC.js index 1204798..f5d8e3b 100644 --- a/migrations-data/checkAllRecordsForORC.js +++ b/migrations-data/checkAllRecordsForORC.js @@ -1,6 +1,6 @@ const AWS = require('aws-sdk'); const region = 'localhost'; -const { TABLE_NAME, dynamodb, runQuery, getSubAreas } = require('/opt/baseLayer'); +const { TABLE_NAME, dynamodb, runQuery, getSubAreas } = require('../lambda/dynamoUtil'); let endpoint; if (region === 'localhost') { diff --git a/migrations-data/legacy-data/2017-2019/migrate.js b/migrations-data/legacy-data/2017-2019/migrate.js index e8a5563..a8ed7c6 100644 --- a/migrations-data/legacy-data/2017-2019/migrate.js +++ b/migrations-data/legacy-data/2017-2019/migrate.js @@ -1,6 +1,6 @@ const AWS = require("aws-sdk"); const readXlsxFile = require('read-excel-file/node'); -const { TABLE_NAME, dynamodb } = require('/opt/baseLayer'); +const { TABLE_NAME, dynamodb } = require('../../../lambda/dynamoUtil'); const { createCSV, getDBSnapshot, validateSchema, updateConsoleProgress, determineActivities, createLegacySubAreaObject, createLegacyParkObject, getConsoleInput, createLegacyRecordObject, clientIDsAR, addRoleToKeycloak, isTokenExpired } = require('../legacy-data-functions'); const { schema } = require('../legacy-data-constants'); diff --git a/migrations-data/legacy-data/legacy-data-functions.js b/migrations-data/legacy-data/legacy-data-functions.js index 3178c6a..66e5d72 100644 --- a/migrations-data/legacy-data/legacy-data-functions.js +++ b/migrations-data/legacy-data/legacy-data-functions.js @@ -1,6 +1,6 @@ const fs = require('fs'); const readline = require('readline'); -const { getParks, getSubAreas } = require('/opt/baseLayer'); +const { getParks, getSubAreas } = require('../../lambda/dynamoUtil'); const { activitiesEnum } = require('./legacy-data-constants'); const axios = require('axios'); const jwt = require("jsonwebtoken"); diff --git a/migrations-data/legacy-data/purgeLegacy.js b/migrations-data/legacy-data/purgeLegacy.js index 3c7e459..21fdb86 100644 --- a/migrations-data/legacy-data/purgeLegacy.js +++ b/migrations-data/legacy-data/purgeLegacy.js @@ -1,5 +1,5 @@ const AWS = require("aws-sdk"); -const { runScan, TABLE_NAME, dynamodb } = require("/opt/baseLayer"); +const { runScan, TABLE_NAME, dynamodb } = require("../../lambda/dynamoUtil"); const { getConsoleInput, updateConsoleProgress, clientIDsAR, removeRoleFromKeycloak, isTokenExpired } = require("./legacy-data-functions"); const MAX_TRANSACTION_SIZE = 25; @@ -148,4 +148,4 @@ async function run() { } } -run(); +run(); \ No newline at end of file diff --git a/migrations-data/sectionUpdate2.js b/migrations-data/sectionUpdate2.js index 1edef21..2a7fb17 100644 --- a/migrations-data/sectionUpdate2.js +++ b/migrations-data/sectionUpdate2.js @@ -1,6 +1,6 @@ const AWS = require('aws-sdk'); const region = process.env.AWS_REGION || 'localhost'; -const { TABLE_NAME, dynamodb, getSubAreas } = require('/opt/baseLayer'); +const { TABLE_NAME, dynamodb, getSubAreas } = require('../lambda/dynamoUtil'); let endpoint; if (region === 'localhost') { @@ -190,4 +190,4 @@ async function updateSection(data) { return await dynamodb.updateItem(updateObj).promise(); } exports.down = async function () {}; -exports.up(); +exports.up(); \ No newline at end of file diff --git a/migrations-data/updateORC3883.js b/migrations-data/updateORC3883.js index 9a2b963..391ef22 100644 --- a/migrations-data/updateORC3883.js +++ b/migrations-data/updateORC3883.js @@ -5,7 +5,7 @@ const { createPutSubAreaObj, } = require("../lambda/subAreaUtils"); const region = 'localhost'; -const { TABLE_NAME, dynamodb, runQuery, getSubAreas } = require('/opt/baseLayer'); +const { TABLE_NAME, dynamodb, runQuery, getSubAreas } = require('../lambda/dynamoUtil'); let endpoint; if (region === 'localhost') { @@ -366,4 +366,4 @@ const newORC = '3883'; const newParkName = 'Tsútswecw Park'; exports.down = async function () {}; -exports.up(oldORC, newORC, newParkName); +exports.up(oldORC, newORC, newParkName); \ No newline at end of file diff --git a/migrations-data/updateSubareaName.js b/migrations-data/updateSubareaName.js index ac8c362..39c05e1 100644 --- a/migrations-data/updateSubareaName.js +++ b/migrations-data/updateSubareaName.js @@ -1,4 +1,4 @@ -const { getParks, getSubAreas, TABLE_NAME, dynamodb, runQuery } = require("/opt/baseLayer"); +const { getParks, getSubAreas, TABLE_NAME, dynamodb, runQuery } = require("../lambda/dynamoUtil"); const { marshall } = require("@aws-sdk/util-dynamodb"); const { DateTime } = require('luxon'); @@ -150,4 +150,4 @@ async function marshallAndPutItem(item) { module.exports = { updateSubareaName, marshallAndPutItem -}; +}; \ No newline at end of file diff --git a/migrations/20220621153946-parkAndSubAreaRoles.js b/migrations/20220621153946-parkAndSubAreaRoles.js index 3ab6114..5994538 100644 --- a/migrations/20220621153946-parkAndSubAreaRoles.js +++ b/migrations/20220621153946-parkAndSubAreaRoles.js @@ -1,6 +1,6 @@ 'use strict'; const AWS = require('aws-sdk'); -const { runQuery, TABLE_NAME, dynamodb } = require('/opt/baseLayer'); +const { runQuery, TABLE_NAME, dynamodb } = require('../lambda/dynamoUtil'); const readXlsxFile = require('read-excel-file/node'); diff --git a/migrations/20220825185430-newEntries-1.js b/migrations/20220825185430-newEntries-1.js index 89fc836..a9de606 100644 --- a/migrations/20220825185430-newEntries-1.js +++ b/migrations/20220825185430-newEntries-1.js @@ -2,7 +2,7 @@ const AWS = require('aws-sdk'); const { doMigration } = require('../migrations-data/addFromCSV'); -const { TABLE_NAME, dynamodb, runQuery } = require('/opt/baseLayer'); +const { TABLE_NAME, dynamodb, runQuery } = require('../lambda/dynamoUtil'); const dataFile = '20220825185430_data.xlsx'; const dataFolder = 'migrations-data/' diff --git a/migrations/20220922154247-addBundle.js b/migrations/20220922154247-addBundle.js index 5f79ed2..89964a6 100644 --- a/migrations/20220922154247-addBundle.js +++ b/migrations/20220922154247-addBundle.js @@ -1,5 +1,5 @@ const AWS = require('aws-sdk'); -const { dynamodb, TABLE_NAME, getOne } = require('/opt/baseLayer'); +const { dynamodb, TABLE_NAME, getOne } = require('../lambda/dynamoUtil'); const readXlsxFile = require('read-excel-file/node'); const sourcePaths = ['tools/Park Name Comparisons.xlsx']; diff --git a/migrations/20221102211341-newEntries-2.js b/migrations/20221102211341-newEntries-2.js index a6b02b2..a7b2e68 100644 --- a/migrations/20221102211341-newEntries-2.js +++ b/migrations/20221102211341-newEntries-2.js @@ -1,6 +1,6 @@ 'use strict'; const AWS = require('aws-sdk'); -const { TABLE_NAME, dynamodb, runQuery } = require('/opt/baseLayer'); +const { TABLE_NAME, dynamodb, runQuery } = require('../lambda/dynamoUtil'); const { doMigration } = require('../migrations-data/addFromCSV'); const dataFile = '20221102211341_data.xlsx'; diff --git a/migrations/20230803145347-rolesTypeFix.js b/migrations/20230803145347-rolesTypeFix.js index 6bc9250..e3b6f34 100644 --- a/migrations/20230803145347-rolesTypeFix.js +++ b/migrations/20230803145347-rolesTypeFix.js @@ -1,6 +1,6 @@ 'use strict'; const AWS = require('aws-sdk'); -const { TABLE_NAME, getParks, dynamodb } = require('/opt/baseLayer'); +const { TABLE_NAME, getParks, dynamodb } = require('../lambda/dynamoUtil'); exports.up = async function (dbOptions) { const parks = await getParks(); diff --git a/migrations/20230815153845-seedVariance.js b/migrations/20230815153845-seedVariance.js index 1ae8d62..0224629 100644 --- a/migrations/20230815153845-seedVariance.js +++ b/migrations/20230815153845-seedVariance.js @@ -1,6 +1,6 @@ 'use strict'; const AWS = require('aws-sdk'); -const { getParks, getSubAreas, getOne, TABLE_NAME, dynamodb } = require('/opt/baseLayer'); +const { getParks, getSubAreas, getOne, TABLE_NAME, dynamodb } = require('../lambda/dynamoUtil'); const { calculateVariance } = require('../lambda/varianceUtils'); const { updateConsoleProgress, finishConsoleUpdates, errorConsoleUpdates } = require('../tools/progress-indicator'); const { EXPORT_VARIANCE_CONFIG } = require('../lambda/constants'); diff --git a/migrations/20230816150824-sectionUpdates.js b/migrations/20230816150824-sectionUpdates.js index 389b205..51228c0 100644 --- a/migrations/20230816150824-sectionUpdates.js +++ b/migrations/20230816150824-sectionUpdates.js @@ -1,6 +1,6 @@ 'use strict'; const AWS = require('aws-sdk'); -const { TABLE_NAME, dynamodb, getSubAreas } = require('/opt/baseLayer'); +const { TABLE_NAME, dynamodb, getSubAreas } = require('../lambda/dynamoUtil'); //parks to update, section updates to be applied to every subarea within the park const changes = [ @@ -225,4 +225,4 @@ async function updateSection(data) { }; return await dynamodb.updateItem(updateObj).promise(); -} +} \ No newline at end of file diff --git a/migrations/20240103113100-fixMalformedDates.js b/migrations/20240103113100-fixMalformedDates.js index c1dd975..fa427d6 100644 --- a/migrations/20240103113100-fixMalformedDates.js +++ b/migrations/20240103113100-fixMalformedDates.js @@ -1,5 +1,5 @@ const AWS = require('aws-sdk'); -const { dynamodb, TABLE_NAME, getOne } = require('/opt/baseLayer'); +const { dynamodb, TABLE_NAME, getOne } = require('../lambda/dynamoUtil'); const readXlsxFile = require('read-excel-file/node'); const file = '../migrations-data/20240103113100_data.xlsx'; @@ -74,4 +74,4 @@ async function updateRecords() { } } -updateRecords(); +updateRecords(); \ No newline at end of file diff --git a/migrations/20240125103944-fixSubAreaRoles.js b/migrations/20240125103944-fixSubAreaRoles.js index 852ed4f..3c79eb3 100644 --- a/migrations/20240125103944-fixSubAreaRoles.js +++ b/migrations/20240125103944-fixSubAreaRoles.js @@ -1,4 +1,4 @@ -const { TABLE_NAME, getParks, dynamodb } = require('/opt/baseLayer'); +const { TABLE_NAME, getParks, dynamodb } = require('../lambda/dynamoUtil'); async function fixSubAreaRoles() { const parks = await getParks(); diff --git a/migrations/20240126140700-fixParkRoles.js b/migrations/20240126140700-fixParkRoles.js index e29812d..308e1ed 100644 --- a/migrations/20240126140700-fixParkRoles.js +++ b/migrations/20240126140700-fixParkRoles.js @@ -1,4 +1,4 @@ -const { TABLE_NAME, getParks, dynamodb } = require('/opt/baseLayer'); +const { TABLE_NAME, getParks, dynamodb } = require('../lambda/dynamoUtil'); const AWS = require('aws-sdk'); async function fixSubAreaRoles() { diff --git a/migrations/20240308143600-subAreaNameUpdates.js b/migrations/20240308143600-subAreaNameUpdates.js index 2626aa2..cc7a0d1 100644 --- a/migrations/20240308143600-subAreaNameUpdates.js +++ b/migrations/20240308143600-subAreaNameUpdates.js @@ -1,4 +1,4 @@ -const { TABLE_NAME, getSubAreas, dynamodb } = require("/opt/baseLayer"); +const { TABLE_NAME, getSubAreas, dynamodb } = require("../lambda/dynamoUtil"); const { updateSubareaName, marshallAndPutItem } = require("../migrations-data/updateSubareaName"); @@ -56,4 +56,4 @@ async function updateDiamondHead() { updateSubareaName('0007', 'Garibaldi Lake', 'Rubble Creek'); updateSubareaName('0041', 'Cultus East Group Use', 'Honeymoon Bay Group'); updateSubareaName('0041', 'Cultus West Group Use', 'Westside Group'); -updateDiamondHead(); +updateDiamondHead(); \ No newline at end of file diff --git a/migrations/20240313090100-modernizeVarianceObjs.js b/migrations/20240313090100-modernizeVarianceObjs.js index 2665467..5ed643c 100644 --- a/migrations/20240313090100-modernizeVarianceObjs.js +++ b/migrations/20240313090100-modernizeVarianceObjs.js @@ -1,5 +1,5 @@ const { DateTime } = require('luxon'); -const { getParks, TABLE_NAME, getOne, runQuery, dynamodb, batchPut } = require('/opt/baseLayer'); +const { getParks, TABLE_NAME, getOne, runQuery, dynamodb, batchPut } = require('../lambda/dynamoUtil'); const { updateConsoleProgress, errorConsoleUpdates, finishConsoleUpdates } = require('../tools/progress-indicator'); const tz = 'America/Vancouver'; @@ -150,4 +150,4 @@ function buildYearlyAverages(field, records) { return averages; } -run(); +run(); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..d836532 --- /dev/null +++ b/package.json @@ -0,0 +1,47 @@ +{ + "name": "bcparks-ar-api", + "version": "1.0.0", + "description": "BCParks Attendance and Revenue Backend", + "devDependencies": { + "@digitalspace/dynamodb-migrate": "^1.0.6", + "jest": "^29.5.0", + "read-excel-file": "^5.3.4", + "serverless": "^3.18.1", + "serverless-dotenv-plugin": "^6.0.0", + "serverless-offline": "^12.0.4", + "serverless-plugin-include-dependencies": "^5.0.0" + }, + "scripts": { + "start": "sls offline start", + "build": "sls package --package ./artifacts", + "build-ci": "sls package --package ./terraform/src/artifacts", + "test": "IS_OFFLINE=1 TABLE_NAME=bcparks-ar-tests CONFIG_TABLE_NAME=bcparks-ar-tests-config jest --coverage", + "migration": "node ./node_modules/@digitalspace/dynamodb-migrate/migrate.js" + }, + "jest": { + "verbose": true, + "globalSetup": "./__tests__/global/setup.js", + "globalTeardown": "./__tests__/global/teardown.js", + "modulePathIgnorePatterns": [ + "./__tests__/global/" + ] + }, + "dependencies": { + "@aws-sdk/client-dynamodb": "^3.529.1", + "@aws-sdk/client-lambda": "^3.568.0", + "@aws-sdk/client-s3": "^3.568.0", + "@aws-sdk/util-dynamodb": "^3.529.1", + "@babel/traverse": "7.23.2", + "serverless-webpack": "^5.13.0", + "axios": "^1.4.0", + "jsonwebtoken": "^9.0.0", + "jwks-rsa": "^3.0.1", + "luxon": "^3.2.1", + "node-jose": "^2.2.0", + "serverless-webpack": "^5.13.0", + "svg-captcha": "^1.4.0", + "webpack": "^5.91.0", + "winston": "^3.8.0", + "write-excel-file": "^1.3.16" + } +} \ No newline at end of file diff --git a/postman/A&R - DEV.postman_environment.json b/postman/A&R - DEV.postman_environment.json index 93fa092..28cfd9b 100644 --- a/postman/A&R - DEV.postman_environment.json +++ b/postman/A&R - DEV.postman_environment.json @@ -4,7 +4,7 @@ "values": [ { "key": "base_url", - "value": "https://xa6gjgmu8f.execute-api.ca-central-1.amazonaws.com/", + "value": "https://xa6gjgmu8f.execute-api.ca-central-1.amazonaws.com/api/", "type": "default", "enabled": true }, diff --git a/postman/A&R - LOCAL.postman_environment.json b/postman/A&R - LOCAL.postman_environment.json index 55a4a1c..8ba42a5 100644 --- a/postman/A&R - LOCAL.postman_environment.json +++ b/postman/A&R - LOCAL.postman_environment.json @@ -4,7 +4,7 @@ "values": [ { "key": "base_url", - "value": "http://localhost:3000/", + "value": "http://localhost:3000/api/", "type": "default", "enabled": true }, @@ -54,4 +54,4 @@ "_postman_variable_scope": "environment", "_postman_exported_at": "2022-09-21T23:26:31.585Z", "_postman_exported_using": "Postman/9.31.9" -} +} \ No newline at end of file diff --git a/postman/A&R - TEST.postman_environment.json b/postman/A&R - TEST.postman_environment.json index adebb79..faaa150 100644 --- a/postman/A&R - TEST.postman_environment.json +++ b/postman/A&R - TEST.postman_environment.json @@ -4,7 +4,7 @@ "values": [ { "key": "base_url", - "value": "https://krjqszayj6.execute-api.ca-central-1.amazonaws.com/", + "value": "https://krjqszayj6.execute-api.ca-central-1.amazonaws.com/api/", "type": "default", "enabled": true }, diff --git a/postman/BCParks Attendance and Revenue.postman_collection.json b/postman/BCParks Attendance and Revenue.postman_collection.json index 51163ea..641e39e 100644 --- a/postman/BCParks Attendance and Revenue.postman_collection.json +++ b/postman/BCParks Attendance and Revenue.postman_collection.json @@ -66,16 +66,16 @@ { "key": "orcs", "value": "0001", - "description": "Get all subAreas under this Park ORCS id." + "description": "Get all subareas under this Park ORCS id." }, { "key": "subAreaId", "value": "0403", - "description": "(Optional) Get specific subArea by subAreaId." + "description": "(Optional) Get specific subarea by subAreaId." } ] }, - "description": "Get specific subAreas, either all subAreas belonging to a specific park, or a single subArea given park ORCS and subArea ID." + "description": "Get specific subareas, either all subareas belonging to a specific park, or a single subarea given park ORCS and subarea ID." }, "response": [] }, @@ -263,7 +263,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n\t\"activities\": [\"Day Use\"],\r\n\t\"orcs\": \"0001\",\r\n\t\"managementArea\": \"Strathcona\",\r\n\t\"section\": \"South Central Coast/North Island\",\r\n\t\"region\": \"West Coast\",\r\n\t\"bundle\": \"N/A\",\r\n\t\"subAreaName\": \"Test Sub Area\"\r\n}", + "raw": "{\r\n \"date\": \"202009\",\r\n \"subAreaId\": \"TEST\",\r\n \"activity\": \"Backcountry Camping\",\r\n}", "options": { "raw": { "language": "json" @@ -271,9 +271,9 @@ } }, "url": { - "raw": "{{base_url}}subArea", + "raw": "{{base_url}}subarea", "host": [ - "{{base_url}}subArea" + "{{base_url}}subarea" ], "query": [ { @@ -286,6 +286,60 @@ "description": "Create record. Must provide the following body as a minimum:\n\nStartFragment\n\n```\n{\n \"date\": \"202209\", // date yyyyMM\n \"subAreaId\": \"TEST\",\n \"activity\": \"Backcountry Camping\"\n}\n\n```" }, "response": [] + }, + { + "name": "Lock Record", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"date\": \"202209\",\r\n \"subAreaId\": \"TEST\",\r\n \"activity\": \"Backcountry Camping\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url}}subarea/lock", + "host": [ + "{{base_url}}subarea" + ], + "path": [ + "lock" + ] + }, + "description": "Locks a record given the following info in the request body:\n\n```\n{\n \"date\": \"202209\", // date \"yyyyMM\"\n \"subAreaId\": \"TEST\", // subAreaId\n \"activity\": \"Backcountry Camping\" //activity\n}\n\n```\n\nIf the record doesn't exist, a blank one will be created using the config object for that record, and locked." + }, + "response": [] + }, + { + "name": "Unlock Record", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"date\": \"202209\",\r\n \"subAreaId\": \"TEST\",\r\n \"activity\": \"Backcountry Camping\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{base_url}}subarea/unlock", + "host": [ + "{{base_url}}subarea" + ], + "path": [ + "unlock" + ] + }, + "description": "Unlocks a record. The following is required in the request body:\n\n```\n{\n \"date\": \"202209\", // date \"yyyyMM\"\n \"subAreaId\": \"TEST\", // subareaID\n \"activity\": \"Backcountry Camping\" //activity\n}\n\n```" + }, + "response": [] } ] }, diff --git a/terraform/common.auto.tfvars b/terraform/common.auto.tfvars new file mode 100644 index 0000000..46c06dc --- /dev/null +++ b/terraform/common.auto.tfvars @@ -0,0 +1 @@ +aws_region = "ca-central-1" diff --git a/terraform/dev/terragrunt.hcl b/terraform/dev/terragrunt.hcl new file mode 100644 index 0000000..f955d28 --- /dev/null +++ b/terraform/dev/terragrunt.hcl @@ -0,0 +1,7 @@ +terraform { + source = "../src" +} + +include { + path = find_in_parent_folders() +} \ No newline at end of file diff --git a/terraform/prod/terragrunt.hcl b/terraform/prod/terragrunt.hcl new file mode 100644 index 0000000..f955d28 --- /dev/null +++ b/terraform/prod/terragrunt.hcl @@ -0,0 +1,7 @@ +terraform { + source = "../src" +} + +include { + path = find_in_parent_folders() +} \ No newline at end of file diff --git a/terraform/src/activity.tf b/terraform/src/activity.tf new file mode 100644 index 0000000..3f238e0 --- /dev/null +++ b/terraform/src/activity.tf @@ -0,0 +1,377 @@ +#getActivity +resource "aws_lambda_function" "activityGetLambda" { + function_name = "activity-get-${random_string.postfix.result}" + + filename = "artifacts/activityGet.zip" + source_code_hash = filebase64sha256("artifacts/activityGet.zip") + + handler = "lambda/activity/GET/index.handler" + runtime = "nodejs14.x" + timeout = 30 + publish = "true" + + memory_size = 128 + + role = aws_iam_role.databaseReadRole.arn + + environment { + variables = { + SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value, + SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value, + TABLE_NAME = aws_dynamodb_table.ar_table.name, + LOG_LEVEL = "info" + } + } +} + +resource "aws_lambda_alias" "activityGetLambdaLatest" { + name = "latest" + function_name = aws_lambda_function.activityGetLambda.function_name + function_version = aws_lambda_function.activityGetLambda.version +} + +resource "aws_lambda_permission" "activityGetPermission" { + statement_id = "activityGetPermissionInvoke" + action = "lambda:InvokeFunction" + function_name = aws_lambda_function.activityGetLambda.function_name + principal = "apigateway.amazonaws.com" + source_arn = "${aws_api_gateway_rest_api.apiLambda.execution_arn}/*/GET/activity" +} + +#postActivity +resource "aws_lambda_function" "activityPostLambda" { + function_name = "activity-post-${random_string.postfix.result}" + + filename = "artifacts/activityPost.zip" + source_code_hash = filebase64sha256("artifacts/activityPost.zip") + + handler = "lambda/activity/POST/index.handlePost" + runtime = "nodejs14.x" + timeout = 30 + publish = "true" + + memory_size = 128 + + role = aws_iam_role.databaseReadRole.arn + + environment { + variables = { + SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value, + SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value, + TABLE_NAME = aws_dynamodb_table.ar_table.name, + LOG_LEVEL = "info" + } + } +} + +resource "aws_lambda_alias" "activityPostLambdaLatest" { + name = "latest" + function_name = aws_lambda_function.activityPostLambda.function_name + function_version = aws_lambda_function.activityPostLambda.version +} + +resource "aws_lambda_permission" "activityPostPermission" { + statement_id = "activityPostPermissionInvoke" + action = "lambda:InvokeFunction" + function_name = aws_lambda_function.activityPostLambda.function_name + principal = "apigateway.amazonaws.com" + source_arn = "${aws_api_gateway_rest_api.apiLambda.execution_arn}/*/POST/activity" +} + +#putActivity +resource "aws_lambda_function" "activityPutLambda" { + function_name = "activity-put-${random_string.postfix.result}" + + filename = "artifacts/activityPut.zip" + source_code_hash = filebase64sha256("artifacts/activityPut.zip") + + handler = "lambda/activity/PUT/index.handlePut" + runtime = "nodejs14.x" + timeout = 30 + publish = "true" + + memory_size = 128 + + role = aws_iam_role.databaseReadRole.arn + + environment { + variables = { + SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value, + SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value, + TABLE_NAME = aws_dynamodb_table.ar_table.name, + LOG_LEVEL = "info" + } + } +} + +resource "aws_lambda_alias" "activityPutLambdaLatest" { + name = "latest" + function_name = aws_lambda_function.activityPutLambda.function_name + function_version = aws_lambda_function.activityPutLambda.version +} + +resource "aws_lambda_permission" "activityPutPermission" { + statement_id = "activityPutPermissionInvoke" + action = "lambda:InvokeFunction" + function_name = aws_lambda_function.activityPutLambda.function_name + principal = "apigateway.amazonaws.com" + source_arn = "${aws_api_gateway_rest_api.apiLambda.execution_arn}/*/PUT/activity" +} + +#deleteActivity +resource "aws_lambda_function" "activityDeleteLambda" { + function_name = "activity-delete-${random_string.postfix.result}" + + filename = "artifacts/activityDelete.zip" + source_code_hash = filebase64sha256("artifacts/activityDelete.zip") + + handler = "lambda/activity/DELETE/index.handleDelete" + runtime = "nodejs14.x" + timeout = 30 + publish = "true" + + memory_size = 128 + + role = aws_iam_role.databaseReadRole.arn + + environment { + variables = { + SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value, + SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value, + TABLE_NAME = aws_dynamodb_table.ar_table.name, + LOG_LEVEL = "info" + } + } +} + +resource "aws_lambda_alias" "activityDeleteLambdaLatest" { + name = "latest" + function_name = aws_lambda_function.activityDeleteLambda.function_name + function_version = aws_lambda_function.activityDeleteLambda.version +} + +resource "aws_lambda_permission" "activityDeletePermission" { + statement_id = "activityDeletePermissionInvoke" + action = "lambda:InvokeFunction" + function_name = aws_lambda_function.activityDeleteLambda.function_name + principal = "apigateway.amazonaws.com" + source_arn = "${aws_api_gateway_rest_api.apiLambda.execution_arn}/*/DELETE/activity" +} + +#lockActivityRecord +resource "aws_lambda_function" "activityRecordLockLambda" { + function_name = "activity-record-lock-${random_string.postfix.result}" + + filename = "artifacts/activityRecordLock.zip" + source_code_hash = filebase64sha256("artifacts/activityRecordLock.zip") + + handler = "lambda/activity/POST/index.handleLock" + runtime = "nodejs14.x" + timeout = 30 + publish = "true" + + memory_size = 128 + + role = aws_iam_role.databaseReadRole.arn + + environment { + variables = { + SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value, + SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value, + TABLE_NAME = aws_dynamodb_table.ar_table.name, + LOG_LEVEL = "info" + } + } +} + +resource "aws_lambda_alias" "activityRecordLockLambdaLatest" { + name = "latest" + function_name = aws_lambda_function.activityRecordLockLambda.function_name + function_version = aws_lambda_function.activityRecordLockLambda.version +} + +resource "aws_lambda_permission" "activityRecordLockPermission" { + statement_id = "activityRecordLockPermissionInvoke" + action = "lambda:InvokeFunction" + function_name = aws_lambda_function.activityRecordLockLambda.function_name + principal = "apigateway.amazonaws.com" + source_arn = "${aws_api_gateway_rest_api.apiLambda.execution_arn}/*/POST/activity/lock" +} + +#unlockActivityRecord +resource "aws_lambda_function" "activityRecordUnlockLambda" { + function_name = "activity-record-unlock-${random_string.postfix.result}" + + filename = "artifacts/activityRecordUnlock.zip" + source_code_hash = filebase64sha256("artifacts/activityRecordUnlock.zip") + + handler = "lambda/activity/POST/index.handleUnlock" + runtime = "nodejs14.x" + timeout = 30 + publish = "true" + + memory_size = 128 + + role = aws_iam_role.databaseReadRole.arn + + environment { + variables = { + SSO_ISSUER = data.aws_ssm_parameter.sso_issuer.value, + SSO_JWKSURI = data.aws_ssm_parameter.sso_jwksuri.value, + TABLE_NAME = aws_dynamodb_table.ar_table.name, + LOG_LEVEL = "info" + } + } +} + +resource "aws_lambda_alias" "activityRecordUnlockLambdaLatest" { + name = "latest" + function_name = aws_lambda_function.activityRecordUnlockLambda.function_name + function_version = aws_lambda_function.activityRecordUnlockLambda.version +} + +resource "aws_lambda_permission" "activityRecordUnlockPermission" { + statement_id = "activityRecordUnlockPermissionInvoke" + action = "lambda:InvokeFunction" + function_name = aws_lambda_function.activityRecordUnlockLambda.function_name + principal = "apigateway.amazonaws.com" + source_arn = "${aws_api_gateway_rest_api.apiLambda.execution_arn}/*/POST/activity/unlock" +} + +# Resources - activitys +module "activityResource" { + source = "./modules/cors-enabled-api-resource" + resource_rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_parent_id = aws_api_gateway_rest_api.apiLambda.root_resource_id + resource_path_part = "activity" +} + +// Defines the HTTP GET /activity API +resource "aws_api_gateway_method" "activityGet" { + rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_id = module.activityResource.resource.id + http_method = "GET" + authorization = "NONE" +} + +// Integrates the APIG to Lambda via POST method +resource "aws_api_gateway_integration" "activityGetIntegration" { + rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_id = module.activityResource.resource.id + http_method = aws_api_gateway_method.activityGet.http_method + + integration_http_method = "POST" + type = "AWS_PROXY" + uri = aws_lambda_function.activityGetLambda.invoke_arn +} + +// Defines the HTTP POST /activity API +resource "aws_api_gateway_method" "activityPost" { + rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_id = module.activityResource.resource.id + http_method = "POST" + authorization = "NONE" +} + +// Integrates the APIG to Lambda via POST method +resource "aws_api_gateway_integration" "activityPostIntegration" { + rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_id = module.activityResource.resource.id + http_method = aws_api_gateway_method.activityPost.http_method + + integration_http_method = "POST" + type = "AWS_PROXY" + uri = aws_lambda_function.activityPostLambda.invoke_arn +} + +// Defines the HTTP PUT /activity API +resource "aws_api_gateway_method" "activityPut" { + rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_id = module.activityResource.resource.id + http_method = "PUT" + authorization = "NONE" +} + +// Integrates the APIG to Lambda via POST method +resource "aws_api_gateway_integration" "activityPutIntegration" { + rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_id = module.activityResource.resource.id + http_method = aws_api_gateway_method.activityPut.http_method + + integration_http_method = "POST" + type = "AWS_PROXY" + uri = aws_lambda_function.activityPutLambda.invoke_arn +} + +// Defines the HTTP DELETE /activity API +resource "aws_api_gateway_method" "activityDelete" { + rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_id = module.activityResource.resource.id + http_method = "DELETE" + authorization = "NONE" +} + +// Integrates the APIG to Lambda via POST method +resource "aws_api_gateway_integration" "activityDeleteIntegration" { + rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_id = module.activityResource.resource.id + http_method = aws_api_gateway_method.activityDelete.http_method + + integration_http_method = "POST" + type = "AWS_PROXY" + uri = aws_lambda_function.activityDeleteLambda.invoke_arn +} + +# Resources - lock activitys +module "activityRecordLockResource" { + source = "./modules/cors-enabled-api-resource" + resource_rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_parent_id = module.activityResource.resource.id + resource_path_part = "lock" +} + +// Defines the HTTP POST /activity/lock API +resource "aws_api_gateway_method" "activityRecordLockMethod" { + rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_id = module.activityRecordLockResource.resource.id + http_method = "POST" + authorization = "NONE" +} + +// Integrates the APIG to Lambda via POST method +resource "aws_api_gateway_integration" "activityRecordLockIntegration" { + rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_id = module.activityRecordLockResource.resource.id + http_method = aws_api_gateway_method.activityRecordLockMethod.http_method + + integration_http_method = "POST" + type = "AWS_PROXY" + uri = aws_lambda_function.activityRecordLockLambda.invoke_arn +} + +# Resources - unlock activitys +module "activityRecordUnlockResource" { + source = "./modules/cors-enabled-api-resource" + resource_rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_parent_id = module.activityResource.resource.id + resource_path_part = "unlock" +} + +// Defines the HTTP POST /activity/unlock API +resource "aws_api_gateway_method" "activityRecordUnlockMethod" { + rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_id = module.activityRecordUnlockResource.resource.id + http_method = "POST" + authorization = "NONE" +} + +// Integrates the APIG to Lambda via POST method +resource "aws_api_gateway_integration" "activityRecordUnlockIntegration" { + rest_api_id = aws_api_gateway_rest_api.apiLambda.id + resource_id = module.activityRecordUnlockResource.resource.id + http_method = aws_api_gateway_method.activityRecordUnlockMethod.http_method + + integration_http_method = "POST" + type = "AWS_PROXY" + uri = aws_lambda_function.activityRecordUnlockLambda.invoke_arn +} diff --git a/terraform/src/cloudfront.tf b/terraform/src/cloudfront.tf new file mode 100644 index 0000000..9a7672c --- /dev/null +++ b/terraform/src/cloudfront.tf @@ -0,0 +1,66 @@ +#Distrubtion and bucket for parks assets such as images +resource "aws_s3_bucket" "bcgov-parks-ar-assets" { + bucket = "${data.aws_ssm_parameter.s3_bucket_assets.value}-${var.target_env}" + acl = "private" + + tags = { + Name = data.aws_ssm_parameter.s3_bucket_assets_name.value + } +} + +resource "aws_cloudfront_origin_access_identity" "parks-ar-assets-oai" { + comment = "Cloud front OAI for BC Parks reservations assets delivery" +} + +resource "aws_cloudfront_distribution" "s3_assets_distribution" { + origin { + domain_name = aws_s3_bucket.bcgov-parks-ar-assets.bucket_regional_domain_name + origin_id = data.aws_ssm_parameter.origin_id_assets.value + origin_path = "/assets" + + s3_origin_config { + origin_access_identity = aws_cloudfront_origin_access_identity.parks-ar-assets-oai.cloudfront_access_identity_path + } + } + + enabled = true + is_ipv6_enabled = true + default_root_object = "index.html" + + default_cache_behavior { + allowed_methods = ["DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT"] + cached_methods = ["GET", "HEAD"] + target_origin_id = data.aws_ssm_parameter.origin_id_assets.value + + forwarded_values { + query_string = false + + cookies { + forward = "none" + } + } + + min_ttl = 0 + default_ttl = 3600 + max_ttl = 86400 + viewer_protocol_policy = "redirect-to-https" + } + + price_class = "PriceClass_100" + + restrictions { + geo_restriction { + restriction_type = "whitelist" + locations = ["US", "CA", "GB", "DE"] + } + } + + tags = { + Environment = var.target_env + Name = "BC Parks AR Assets" + } + + viewer_certificate { + cloudfront_default_certificate = true + } +} diff --git a/terraform/src/cloudwatchAlarms.tf b/terraform/src/cloudwatchAlarms.tf new file mode 100644 index 0000000..31e1d35 --- /dev/null +++ b/terraform/src/cloudwatchAlarms.tf @@ -0,0 +1,138 @@ +resource "aws_lambda_function" "cloudwatch_alarm" { + function_name = "cloudwatchAlarm-${random_string.postfix.result}" + + filename = "artifacts/cloudwatchAlarm.zip" + source_code_hash = filebase64sha256("artifacts/cloudwatchAlarm.zip") + + handler = "lambda/cloudwatchAlarm/index.handler" + runtime = "nodejs14.x" + timeout = 30 + publish = "true" + + role = aws_iam_role.parkRole.arn + + environment { + variables = { + AWS_ACCOUNT_LIST = data.aws_ssm_parameter.aws_account_list.value, + WEBHOOK_URL = data.aws_ssm_parameter.webhook_url.value, + LOG_LEVEL = "debug" + } + } +} + +resource "aws_sns_topic" "cloudwatch_error_alarm" { + name = "lambda-error-topic" +} + +data "aws_iam_policy_document" "sns-topic-policy" { + policy_id = "__default_policy_ID" + + statement { + sid = "__default_statement_ID" + effect = "Allow" + + actions = [ + "SNS:Subscribe", + "SNS:SetTopicAttributes", + "SNS:RemovePermission", + "SNS:Receive", + "SNS:Publish", + "SNS:ListSubscriptionsByTopic", + "SNS:GetTopicAttributes", + "SNS:DeleteTopic", + "SNS:AddPermission", + ] + + condition { + test = "StringEquals" + variable = "AWS:SourceOwner" + values = [var.target_aws_account_id] + } + + principals { + type = "AWS" + identifiers = [aws_iam_role.parkRole.arn] + } + + resources = [aws_sns_topic.cloudwatch_error_alarm.arn] + } + + statement { + sid = "AWSEvents_capture-autoscaling-events_SendToSNS" + effect = "Allow" + actions = ["SNS:Publish"] + + principals { + type = "Service" + identifiers = ["cloudwatch.amazonaws.com"] + } + + resources = [aws_sns_topic.cloudwatch_error_alarm.arn] + } +} + + +resource "aws_sns_topic_policy" "default" { + arn = aws_sns_topic.cloudwatch_error_alarm.arn + policy = data.aws_iam_policy_document.sns-topic-policy.json +} + +resource "aws_cloudwatch_metric_alarm" "lambda_alert" { + alarm_name = "lambda-error-alert" + comparison_operator = "GreaterThanThreshold" + evaluation_periods = "1" + metric_name = "Errors" + namespace = "AWS/Lambda" + period = "10" + statistic = "Sum" + threshold = "0" + alarm_description = "This metric monitors all Lambda function invocation errors" + datapoints_to_alarm = "1" + insufficient_data_actions = [] + alarm_actions = [aws_sns_topic.cloudwatch_error_alarm.arn] +} + +resource "aws_sqs_queue" "alarm_queue" { + name = "cloudwatch-alarm-queue${random_string.postfix.result}" + message_retention_seconds = 86400 +} + +resource "aws_sns_topic_subscription" "user_updates_sqs_target" { + topic_arn = aws_sns_topic.cloudwatch_error_alarm.arn + protocol = "sqs" + endpoint = aws_sqs_queue.alarm_queue.arn +} + +resource "aws_lambda_event_source_mapping" "event_source_mapping" { + event_source_arn = aws_sqs_queue.alarm_queue.arn + enabled = true + function_name = aws_lambda_function.cloudwatch_alarm.arn + batch_size = 1 +} + +resource "aws_sqs_queue_policy" "sqs_queue_policy" { + queue_url = aws_sqs_queue.alarm_queue.id + + policy = < ./dump.json` +`aws dynamodb scan --table-name=parksreso > ./dump.json` 3. login using the aws console credentials for the project you want to move the data into 4. run the script: -`node dynamoRestore.js ParksAr` +`node dynamoRestore.js` diff --git a/tools/convertParksSheet.js b/tools/convertParksSheet.js index 1274854..63e1a65 100644 --- a/tools/convertParksSheet.js +++ b/tools/convertParksSheet.js @@ -1,5 +1,5 @@ const AWS = require('aws-sdk'); -const { dynamodb, TABLE_NAME } = require('/opt/baseLayer'); +const { dynamodb, TABLE_NAME } = require('../lambda/dynamoUtil'); const readXlsxFile = require('read-excel-file/node'); @@ -243,4 +243,4 @@ doMigration() .then((res) => { console.log(`Import complete. ${res} records processed.`); }) - .catch((e) => console.log("Error:", e)) + .catch((e) => console.log("Error:", e)) \ No newline at end of file diff --git a/tools/dynamoMigrator.py b/tools/dynamoMigrator.py index 552454f..f8e304a 100644 --- a/tools/dynamoMigrator.py +++ b/tools/dynamoMigrator.py @@ -8,6 +8,6 @@ formattedString = json.dumps(item, separators=(',', ':')) formattedString = formattedString.replace('"', r'\"') - cmd = "aws --endpoint-url=http://localhost:8000 dynamodb put-item --table-name=ParksAr --item=\"{0}\"".format( + cmd = "aws --endpoint-url=http://localhost:8000 dynamodb put-item --table-name=parksreso --item=\"{0}\"".format( formattedString) os.system(cmd) diff --git a/tools/dynamoRestore.js b/tools/dynamoRestore.js index f8ad835..21b912d 100644 --- a/tools/dynamoRestore.js +++ b/tools/dynamoRestore.js @@ -3,7 +3,7 @@ const AWS = require('aws-sdk'); const data = require('./dump.json'); const { updateConsoleProgress, finishConsoleUpdates, errorConsoleUpdates } = require('./progress-indicator'); -const TABLE_NAME = process.env.TABLE_NAME || 'ParksAr'; +const TABLE_NAME = process.env.TABLE_NAME || 'ar-tests'; const MAX_TRANSACTION_SIZE = 25; const options = { diff --git a/arSam/yarn.lock b/yarn.lock similarity index 79% rename from arSam/yarn.lock rename to yarn.lock index 85800a1..b7354ea 100644 --- a/arSam/yarn.lock +++ b/yarn.lock @@ -18,720 +18,538 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@aws-crypto/crc32@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/crc32/-/crc32-5.2.0.tgz#cfcc22570949c98c6689cfcbd2d693d36cdae2e1" - integrity sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg== +"@aws-crypto/crc32@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/crc32/-/crc32-3.0.0.tgz#07300eca214409c33e3ff769cd5697b57fdd38fa" + integrity sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA== dependencies: - "@aws-crypto/util" "^5.2.0" + "@aws-crypto/util" "^3.0.0" "@aws-sdk/types" "^3.222.0" - tslib "^2.6.2" + tslib "^1.11.1" -"@aws-crypto/crc32c@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/crc32c/-/crc32c-5.2.0.tgz#4e34aab7f419307821509a98b9b08e84e0c1917e" - integrity sha512-+iWb8qaHLYKrNvGRbiYRHSdKRWhto5XlZUEBwDjYNf+ly5SVYG6zEoYIdxvf5R3zyeP16w4PLBn3rH1xc74Rag== +"@aws-crypto/crc32c@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz#016c92da559ef638a84a245eecb75c3e97cb664f" + integrity sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w== dependencies: - "@aws-crypto/util" "^5.2.0" + "@aws-crypto/util" "^3.0.0" "@aws-sdk/types" "^3.222.0" - tslib "^2.6.2" + tslib "^1.11.1" -"@aws-crypto/sha1-browser@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/sha1-browser/-/sha1-browser-5.2.0.tgz#b0ee2d2821d3861f017e965ef3b4cb38e3b6a0f4" - integrity sha512-OH6lveCFfcDjX4dbAvCFSYUjJZjDr/3XJ3xHtjn3Oj5b9RjojQo8npoLeA/bNwkOkrSQ0wgrHzXk4tDRxGKJeg== +"@aws-crypto/ie11-detection@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz#640ae66b4ec3395cee6a8e94ebcd9f80c24cd688" + integrity sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q== + dependencies: + tslib "^1.11.1" + +"@aws-crypto/sha1-browser@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/sha1-browser/-/sha1-browser-3.0.0.tgz#f9083c00782b24714f528b1a1fef2174002266a3" + integrity sha512-NJth5c997GLHs6nOYTzFKTbYdMNA6/1XlKVgnZoaZcQ7z7UJlOgj2JdbHE8tiYLS3fzXNCguct77SPGat2raSw== dependencies: - "@aws-crypto/supports-web-crypto" "^5.2.0" - "@aws-crypto/util" "^5.2.0" + "@aws-crypto/ie11-detection" "^3.0.0" + "@aws-crypto/supports-web-crypto" "^3.0.0" + "@aws-crypto/util" "^3.0.0" "@aws-sdk/types" "^3.222.0" "@aws-sdk/util-locate-window" "^3.0.0" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.6.2" + "@aws-sdk/util-utf8-browser" "^3.0.0" + tslib "^1.11.1" -"@aws-crypto/sha256-browser@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz#153895ef1dba6f9fce38af550e0ef58988eb649e" - integrity sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw== +"@aws-crypto/sha256-browser@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz#05f160138ab893f1c6ba5be57cfd108f05827766" + integrity sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ== dependencies: - "@aws-crypto/sha256-js" "^5.2.0" - "@aws-crypto/supports-web-crypto" "^5.2.0" - "@aws-crypto/util" "^5.2.0" + "@aws-crypto/ie11-detection" "^3.0.0" + "@aws-crypto/sha256-js" "^3.0.0" + "@aws-crypto/supports-web-crypto" "^3.0.0" + "@aws-crypto/util" "^3.0.0" "@aws-sdk/types" "^3.222.0" "@aws-sdk/util-locate-window" "^3.0.0" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.6.2" + "@aws-sdk/util-utf8-browser" "^3.0.0" + tslib "^1.11.1" -"@aws-crypto/sha256-js@5.2.0", "@aws-crypto/sha256-js@^5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz#c4fdb773fdbed9a664fc1a95724e206cf3860042" - integrity sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA== +"@aws-crypto/sha256-js@3.0.0", "@aws-crypto/sha256-js@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz#f06b84d550d25521e60d2a0e2a90139341e007c2" + integrity sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ== dependencies: - "@aws-crypto/util" "^5.2.0" + "@aws-crypto/util" "^3.0.0" "@aws-sdk/types" "^3.222.0" - tslib "^2.6.2" + tslib "^1.11.1" -"@aws-crypto/supports-web-crypto@^5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz#a1e399af29269be08e695109aa15da0a07b5b5fb" - integrity sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg== +"@aws-crypto/supports-web-crypto@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz#5d1bf825afa8072af2717c3e455f35cda0103ec2" + integrity sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg== dependencies: - tslib "^2.6.2" + tslib "^1.11.1" -"@aws-crypto/util@^5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@aws-crypto/util/-/util-5.2.0.tgz#71284c9cffe7927ddadac793c14f14886d3876da" - integrity sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ== +"@aws-crypto/util@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@aws-crypto/util/-/util-3.0.0.tgz#1c7ca90c29293f0883468ad48117937f0fe5bfb0" + integrity sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w== dependencies: "@aws-sdk/types" "^3.222.0" - "@smithy/util-utf8" "^2.0.0" - tslib "^2.6.2" - -"@aws-sdk/client-api-gateway@^3.588.0": - version "3.606.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-api-gateway/-/client-api-gateway-3.606.0.tgz#72b4d4b6373a6b0ec73fb2ef6a67c024c70c6938" - integrity sha512-pYUduJCJzBQcKEGQYV9QKyqKr8iWMHpM8WyQoCuSe0DmU9Pf96rAknKsHjw26PlFyGOUkfiVjwAnTkE/f5+cBA== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.606.0" - "@aws-sdk/client-sts" "3.606.0" - "@aws-sdk/core" "3.598.0" - "@aws-sdk/credential-provider-node" "3.600.0" - "@aws-sdk/middleware-host-header" "3.598.0" - "@aws-sdk/middleware-logger" "3.598.0" - "@aws-sdk/middleware-recursion-detection" "3.598.0" - "@aws-sdk/middleware-sdk-api-gateway" "3.598.0" - "@aws-sdk/middleware-user-agent" "3.598.0" - "@aws-sdk/region-config-resolver" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@aws-sdk/util-endpoints" "3.598.0" - "@aws-sdk/util-user-agent-browser" "3.598.0" - "@aws-sdk/util-user-agent-node" "3.598.0" - "@smithy/config-resolver" "^3.0.2" - "@smithy/core" "^2.2.1" - "@smithy/fetch-http-handler" "^3.0.2" - "@smithy/hash-node" "^3.0.1" - "@smithy/invalid-dependency" "^3.0.1" - "@smithy/middleware-content-length" "^3.0.1" - "@smithy/middleware-endpoint" "^3.0.2" - "@smithy/middleware-retry" "^3.0.4" - "@smithy/middleware-serde" "^3.0.1" - "@smithy/middleware-stack" "^3.0.1" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/node-http-handler" "^3.0.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" - "@smithy/url-parser" "^3.0.1" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.4" - "@smithy/util-defaults-mode-node" "^3.0.4" - "@smithy/util-endpoints" "^2.0.2" - "@smithy/util-middleware" "^3.0.1" - "@smithy/util-retry" "^3.0.1" - "@smithy/util-stream" "^3.0.2" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" + "@aws-sdk/util-utf8-browser" "^3.0.0" + tslib "^1.11.1" "@aws-sdk/client-cloudformation@^3.410.0": - version "3.606.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-cloudformation/-/client-cloudformation-3.606.0.tgz#f34fb405ac8828f7db486adf72e26fa7c75f6f3a" - integrity sha512-ti58HgFwpoxkjSzWUjBrlEDyZ/KYhN2sKkAt0me2IkZH+pBdKrWU5EpXeNNRy5EycMWcf5RYx5q2/HQnrtOnww== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.606.0" - "@aws-sdk/client-sts" "3.606.0" - "@aws-sdk/core" "3.598.0" - "@aws-sdk/credential-provider-node" "3.600.0" - "@aws-sdk/middleware-host-header" "3.598.0" - "@aws-sdk/middleware-logger" "3.598.0" - "@aws-sdk/middleware-recursion-detection" "3.598.0" - "@aws-sdk/middleware-user-agent" "3.598.0" - "@aws-sdk/region-config-resolver" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@aws-sdk/util-endpoints" "3.598.0" - "@aws-sdk/util-user-agent-browser" "3.598.0" - "@aws-sdk/util-user-agent-node" "3.598.0" - "@smithy/config-resolver" "^3.0.2" - "@smithy/core" "^2.2.1" - "@smithy/fetch-http-handler" "^3.0.2" - "@smithy/hash-node" "^3.0.1" - "@smithy/invalid-dependency" "^3.0.1" - "@smithy/middleware-content-length" "^3.0.1" - "@smithy/middleware-endpoint" "^3.0.2" - "@smithy/middleware-retry" "^3.0.4" - "@smithy/middleware-serde" "^3.0.1" - "@smithy/middleware-stack" "^3.0.1" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/node-http-handler" "^3.0.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" - "@smithy/url-parser" "^3.0.1" + version "3.576.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-cloudformation/-/client-cloudformation-3.576.0.tgz#aac4b796d5998d722cded31a755731b4aec636a4" + integrity sha512-x0bqKTbYOxB5pWZ/hrGZPj7ThCxcu9WPv4VjotDASe+tPYJ9oqm+qD+uREl2QtthoA11hSslc84EoYx30rGUXQ== + dependencies: + "@aws-crypto/sha256-browser" "3.0.0" + "@aws-crypto/sha256-js" "3.0.0" + "@aws-sdk/client-sso-oidc" "3.576.0" + "@aws-sdk/client-sts" "3.576.0" + "@aws-sdk/core" "3.576.0" + "@aws-sdk/credential-provider-node" "3.576.0" + "@aws-sdk/middleware-host-header" "3.575.0" + "@aws-sdk/middleware-logger" "3.575.0" + "@aws-sdk/middleware-recursion-detection" "3.575.0" + "@aws-sdk/middleware-user-agent" "3.575.0" + "@aws-sdk/region-config-resolver" "3.575.0" + "@aws-sdk/types" "3.575.0" + "@aws-sdk/util-endpoints" "3.575.0" + "@aws-sdk/util-user-agent-browser" "3.575.0" + "@aws-sdk/util-user-agent-node" "3.575.0" + "@smithy/config-resolver" "^3.0.0" + "@smithy/core" "^2.0.0" + "@smithy/fetch-http-handler" "^3.0.0" + "@smithy/hash-node" "^3.0.0" + "@smithy/invalid-dependency" "^3.0.0" + "@smithy/middleware-content-length" "^3.0.0" + "@smithy/middleware-endpoint" "^3.0.0" + "@smithy/middleware-retry" "^3.0.0" + "@smithy/middleware-serde" "^3.0.0" + "@smithy/middleware-stack" "^3.0.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/node-http-handler" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/smithy-client" "^3.0.0" + "@smithy/types" "^3.0.0" + "@smithy/url-parser" "^3.0.0" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.4" - "@smithy/util-defaults-mode-node" "^3.0.4" - "@smithy/util-endpoints" "^2.0.2" - "@smithy/util-middleware" "^3.0.1" - "@smithy/util-retry" "^3.0.1" + "@smithy/util-defaults-mode-browser" "^3.0.0" + "@smithy/util-defaults-mode-node" "^3.0.0" + "@smithy/util-endpoints" "^2.0.0" + "@smithy/util-middleware" "^3.0.0" + "@smithy/util-retry" "^3.0.0" "@smithy/util-utf8" "^3.0.0" - "@smithy/util-waiter" "^3.0.1" + "@smithy/util-waiter" "^3.0.0" tslib "^2.6.2" uuid "^9.0.1" -"@aws-sdk/client-cognito-identity-provider@^3.588.0": - version "3.606.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-cognito-identity-provider/-/client-cognito-identity-provider-3.606.0.tgz#1eb8c7c779f3af086507ac3216fcfdef340972c1" - integrity sha512-2+F+moeMvFwUaVRIcTC8jPIWKJdECy1e+MoWxAfYr5eoqB1vtcHV85MZVV5uDYFaOQAVKzs9iB6mJte9Zl2l5g== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.606.0" - "@aws-sdk/client-sts" "3.606.0" - "@aws-sdk/core" "3.598.0" - "@aws-sdk/credential-provider-node" "3.600.0" - "@aws-sdk/middleware-host-header" "3.598.0" - "@aws-sdk/middleware-logger" "3.598.0" - "@aws-sdk/middleware-recursion-detection" "3.598.0" - "@aws-sdk/middleware-user-agent" "3.598.0" - "@aws-sdk/region-config-resolver" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@aws-sdk/util-endpoints" "3.598.0" - "@aws-sdk/util-user-agent-browser" "3.598.0" - "@aws-sdk/util-user-agent-node" "3.598.0" - "@smithy/config-resolver" "^3.0.2" - "@smithy/core" "^2.2.1" - "@smithy/fetch-http-handler" "^3.0.2" - "@smithy/hash-node" "^3.0.1" - "@smithy/invalid-dependency" "^3.0.1" - "@smithy/middleware-content-length" "^3.0.1" - "@smithy/middleware-endpoint" "^3.0.2" - "@smithy/middleware-retry" "^3.0.4" - "@smithy/middleware-serde" "^3.0.1" - "@smithy/middleware-stack" "^3.0.1" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/node-http-handler" "^3.0.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" - "@smithy/url-parser" "^3.0.1" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.4" - "@smithy/util-defaults-mode-node" "^3.0.4" - "@smithy/util-endpoints" "^2.0.2" - "@smithy/util-middleware" "^3.0.1" - "@smithy/util-retry" "^3.0.1" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - "@aws-sdk/client-dynamodb@^3.529.1": - version "3.606.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-dynamodb/-/client-dynamodb-3.606.0.tgz#d43a26a084a3906027ed21131aacc730075d847e" - integrity sha512-Htx6JxaJbhstUhyZiUtmleMqifwU9jHBdS28GAPCUmcOjoioRfrN7sgGg/G9Tl9kQeu4BuJRG9ss044uD0SU5A== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.606.0" - "@aws-sdk/client-sts" "3.606.0" - "@aws-sdk/core" "3.598.0" - "@aws-sdk/credential-provider-node" "3.600.0" - "@aws-sdk/middleware-endpoint-discovery" "3.598.0" - "@aws-sdk/middleware-host-header" "3.598.0" - "@aws-sdk/middleware-logger" "3.598.0" - "@aws-sdk/middleware-recursion-detection" "3.598.0" - "@aws-sdk/middleware-user-agent" "3.598.0" - "@aws-sdk/region-config-resolver" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@aws-sdk/util-endpoints" "3.598.0" - "@aws-sdk/util-user-agent-browser" "3.598.0" - "@aws-sdk/util-user-agent-node" "3.598.0" - "@smithy/config-resolver" "^3.0.2" - "@smithy/core" "^2.2.1" - "@smithy/fetch-http-handler" "^3.0.2" - "@smithy/hash-node" "^3.0.1" - "@smithy/invalid-dependency" "^3.0.1" - "@smithy/middleware-content-length" "^3.0.1" - "@smithy/middleware-endpoint" "^3.0.2" - "@smithy/middleware-retry" "^3.0.4" - "@smithy/middleware-serde" "^3.0.1" - "@smithy/middleware-stack" "^3.0.1" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/node-http-handler" "^3.0.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" - "@smithy/url-parser" "^3.0.1" + version "3.576.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-dynamodb/-/client-dynamodb-3.576.0.tgz#44ffa3bf445edf2a0dd0a20c5e695c42a7fa441a" + integrity sha512-EFkIAPPysiN/XUYuRD89pIZM5dPQ6lPxZXG4o/Ysa/ZfsWtdTAcbowx+VKGRxCyTtjA1Nw1n37/HQOXKLVTRdg== + dependencies: + "@aws-crypto/sha256-browser" "3.0.0" + "@aws-crypto/sha256-js" "3.0.0" + "@aws-sdk/client-sso-oidc" "3.576.0" + "@aws-sdk/client-sts" "3.576.0" + "@aws-sdk/core" "3.576.0" + "@aws-sdk/credential-provider-node" "3.576.0" + "@aws-sdk/middleware-endpoint-discovery" "3.575.0" + "@aws-sdk/middleware-host-header" "3.575.0" + "@aws-sdk/middleware-logger" "3.575.0" + "@aws-sdk/middleware-recursion-detection" "3.575.0" + "@aws-sdk/middleware-user-agent" "3.575.0" + "@aws-sdk/region-config-resolver" "3.575.0" + "@aws-sdk/types" "3.575.0" + "@aws-sdk/util-endpoints" "3.575.0" + "@aws-sdk/util-user-agent-browser" "3.575.0" + "@aws-sdk/util-user-agent-node" "3.575.0" + "@smithy/config-resolver" "^3.0.0" + "@smithy/core" "^2.0.0" + "@smithy/fetch-http-handler" "^3.0.0" + "@smithy/hash-node" "^3.0.0" + "@smithy/invalid-dependency" "^3.0.0" + "@smithy/middleware-content-length" "^3.0.0" + "@smithy/middleware-endpoint" "^3.0.0" + "@smithy/middleware-retry" "^3.0.0" + "@smithy/middleware-serde" "^3.0.0" + "@smithy/middleware-stack" "^3.0.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/node-http-handler" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/smithy-client" "^3.0.0" + "@smithy/types" "^3.0.0" + "@smithy/url-parser" "^3.0.0" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.4" - "@smithy/util-defaults-mode-node" "^3.0.4" - "@smithy/util-endpoints" "^2.0.2" - "@smithy/util-middleware" "^3.0.1" - "@smithy/util-retry" "^3.0.1" + "@smithy/util-defaults-mode-browser" "^3.0.0" + "@smithy/util-defaults-mode-node" "^3.0.0" + "@smithy/util-endpoints" "^2.0.0" + "@smithy/util-middleware" "^3.0.0" + "@smithy/util-retry" "^3.0.0" "@smithy/util-utf8" "^3.0.0" - "@smithy/util-waiter" "^3.0.1" + "@smithy/util-waiter" "^3.0.0" tslib "^2.6.2" uuid "^9.0.1" -"@aws-sdk/client-eventbridge@^3.588.0": - version "3.606.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-eventbridge/-/client-eventbridge-3.606.0.tgz#84841562c308c1e6527900dc31ae96880bf69ba5" - integrity sha512-u2Fy402nJGBTH1zdzQNv5YlYkm2+J0Cdl1Ge6R96SFA2suBHH2CFgep0xivVHQp/3Vyk23we9lOu4RxM+9pnSg== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.606.0" - "@aws-sdk/client-sts" "3.606.0" - "@aws-sdk/core" "3.598.0" - "@aws-sdk/credential-provider-node" "3.600.0" - "@aws-sdk/middleware-host-header" "3.598.0" - "@aws-sdk/middleware-logger" "3.598.0" - "@aws-sdk/middleware-recursion-detection" "3.598.0" - "@aws-sdk/middleware-signing" "3.598.0" - "@aws-sdk/middleware-user-agent" "3.598.0" - "@aws-sdk/region-config-resolver" "3.598.0" - "@aws-sdk/signature-v4-multi-region" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@aws-sdk/util-endpoints" "3.598.0" - "@aws-sdk/util-user-agent-browser" "3.598.0" - "@aws-sdk/util-user-agent-node" "3.598.0" - "@smithy/config-resolver" "^3.0.2" - "@smithy/fetch-http-handler" "^3.0.2" - "@smithy/hash-node" "^3.0.1" - "@smithy/invalid-dependency" "^3.0.1" - "@smithy/middleware-content-length" "^3.0.1" - "@smithy/middleware-endpoint" "^3.0.2" - "@smithy/middleware-retry" "^3.0.4" - "@smithy/middleware-serde" "^3.0.1" - "@smithy/middleware-stack" "^3.0.1" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/node-http-handler" "^3.0.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" - "@smithy/url-parser" "^3.0.1" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.4" - "@smithy/util-defaults-mode-node" "^3.0.4" - "@smithy/util-endpoints" "^2.0.2" - "@smithy/util-retry" "^3.0.1" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@aws-sdk/client-iam@^3.588.0": - version "3.606.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-iam/-/client-iam-3.606.0.tgz#1b28b2d53792e2c19180fd7a4da708ae13df3a42" - integrity sha512-Ji2Byyph9Liq+0/q5kKj1N7GXBnlndpgX00tRoihfMo+z1w2Y5Jaq3n/QvrI9s3dY5iI7uCYM65/b/neRSyxBA== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.606.0" - "@aws-sdk/client-sts" "3.606.0" - "@aws-sdk/core" "3.598.0" - "@aws-sdk/credential-provider-node" "3.600.0" - "@aws-sdk/middleware-host-header" "3.598.0" - "@aws-sdk/middleware-logger" "3.598.0" - "@aws-sdk/middleware-recursion-detection" "3.598.0" - "@aws-sdk/middleware-user-agent" "3.598.0" - "@aws-sdk/region-config-resolver" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@aws-sdk/util-endpoints" "3.598.0" - "@aws-sdk/util-user-agent-browser" "3.598.0" - "@aws-sdk/util-user-agent-node" "3.598.0" - "@smithy/config-resolver" "^3.0.2" - "@smithy/core" "^2.2.1" - "@smithy/fetch-http-handler" "^3.0.2" - "@smithy/hash-node" "^3.0.1" - "@smithy/invalid-dependency" "^3.0.1" - "@smithy/middleware-content-length" "^3.0.1" - "@smithy/middleware-endpoint" "^3.0.2" - "@smithy/middleware-retry" "^3.0.4" - "@smithy/middleware-serde" "^3.0.1" - "@smithy/middleware-stack" "^3.0.1" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/node-http-handler" "^3.0.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" - "@smithy/url-parser" "^3.0.1" - "@smithy/util-base64" "^3.0.0" - "@smithy/util-body-length-browser" "^3.0.0" - "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.4" - "@smithy/util-defaults-mode-node" "^3.0.4" - "@smithy/util-endpoints" "^2.0.2" - "@smithy/util-middleware" "^3.0.1" - "@smithy/util-retry" "^3.0.1" - "@smithy/util-utf8" "^3.0.0" - "@smithy/util-waiter" "^3.0.1" - tslib "^2.6.2" - -"@aws-sdk/client-lambda@^3.241.0", "@aws-sdk/client-lambda@^3.568.0", "@aws-sdk/client-lambda@^3.588.0": - version "3.606.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-lambda/-/client-lambda-3.606.0.tgz#46e116eb1f08d9a4153076e98985c48f2b824363" - integrity sha512-FGAv25D9FDL2D/CmbOuuaJkYf/jAsy9b7R+f0DUvdPTwrbgdd59eSA+iNrbUZuZj6wdeYvUFBfX1TWqK5ZsOfA== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.606.0" - "@aws-sdk/client-sts" "3.606.0" - "@aws-sdk/core" "3.598.0" - "@aws-sdk/credential-provider-node" "3.600.0" - "@aws-sdk/middleware-host-header" "3.598.0" - "@aws-sdk/middleware-logger" "3.598.0" - "@aws-sdk/middleware-recursion-detection" "3.598.0" - "@aws-sdk/middleware-user-agent" "3.598.0" - "@aws-sdk/region-config-resolver" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@aws-sdk/util-endpoints" "3.598.0" - "@aws-sdk/util-user-agent-browser" "3.598.0" - "@aws-sdk/util-user-agent-node" "3.598.0" - "@smithy/config-resolver" "^3.0.2" - "@smithy/core" "^2.2.1" - "@smithy/eventstream-serde-browser" "^3.0.2" - "@smithy/eventstream-serde-config-resolver" "^3.0.1" - "@smithy/eventstream-serde-node" "^3.0.2" - "@smithy/fetch-http-handler" "^3.0.2" - "@smithy/hash-node" "^3.0.1" - "@smithy/invalid-dependency" "^3.0.1" - "@smithy/middleware-content-length" "^3.0.1" - "@smithy/middleware-endpoint" "^3.0.2" - "@smithy/middleware-retry" "^3.0.4" - "@smithy/middleware-serde" "^3.0.1" - "@smithy/middleware-stack" "^3.0.1" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/node-http-handler" "^3.0.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" - "@smithy/url-parser" "^3.0.1" +"@aws-sdk/client-lambda@^3.241.0", "@aws-sdk/client-lambda@^3.568.0": + version "3.576.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-lambda/-/client-lambda-3.576.0.tgz#79c3b4ff96cf1c5c8c245a2fd2fa8f594ee4674e" + integrity sha512-hycN/0OgklDfm/WQGJ3kGP/aJnslA56pwlM9TZIoP0nLHZIEYyT+MlNLGs0ausCAZKOLu2XG/5hvKhzgZkR00g== + dependencies: + "@aws-crypto/sha256-browser" "3.0.0" + "@aws-crypto/sha256-js" "3.0.0" + "@aws-sdk/client-sso-oidc" "3.576.0" + "@aws-sdk/client-sts" "3.576.0" + "@aws-sdk/core" "3.576.0" + "@aws-sdk/credential-provider-node" "3.576.0" + "@aws-sdk/middleware-host-header" "3.575.0" + "@aws-sdk/middleware-logger" "3.575.0" + "@aws-sdk/middleware-recursion-detection" "3.575.0" + "@aws-sdk/middleware-user-agent" "3.575.0" + "@aws-sdk/region-config-resolver" "3.575.0" + "@aws-sdk/types" "3.575.0" + "@aws-sdk/util-endpoints" "3.575.0" + "@aws-sdk/util-user-agent-browser" "3.575.0" + "@aws-sdk/util-user-agent-node" "3.575.0" + "@smithy/config-resolver" "^3.0.0" + "@smithy/core" "^2.0.0" + "@smithy/eventstream-serde-browser" "^3.0.0" + "@smithy/eventstream-serde-config-resolver" "^3.0.0" + "@smithy/eventstream-serde-node" "^3.0.0" + "@smithy/fetch-http-handler" "^3.0.0" + "@smithy/hash-node" "^3.0.0" + "@smithy/invalid-dependency" "^3.0.0" + "@smithy/middleware-content-length" "^3.0.0" + "@smithy/middleware-endpoint" "^3.0.0" + "@smithy/middleware-retry" "^3.0.0" + "@smithy/middleware-serde" "^3.0.0" + "@smithy/middleware-stack" "^3.0.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/node-http-handler" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/smithy-client" "^3.0.0" + "@smithy/types" "^3.0.0" + "@smithy/url-parser" "^3.0.0" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.4" - "@smithy/util-defaults-mode-node" "^3.0.4" - "@smithy/util-endpoints" "^2.0.2" - "@smithy/util-middleware" "^3.0.1" - "@smithy/util-retry" "^3.0.1" - "@smithy/util-stream" "^3.0.2" + "@smithy/util-defaults-mode-browser" "^3.0.0" + "@smithy/util-defaults-mode-node" "^3.0.0" + "@smithy/util-endpoints" "^2.0.0" + "@smithy/util-middleware" "^3.0.0" + "@smithy/util-retry" "^3.0.0" + "@smithy/util-stream" "^3.0.0" "@smithy/util-utf8" "^3.0.0" - "@smithy/util-waiter" "^3.0.1" + "@smithy/util-waiter" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-s3@^3.568.0", "@aws-sdk/client-s3@^3.588.0": - version "3.606.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-s3/-/client-s3-3.606.0.tgz#ff9d7e029591387522783b7aae3d458d4cb0b473" - integrity sha512-IGM/E8kVk/NY/kZwLdmGRsX1QYtuPljoNutM5kBRdtGahQL5VwVAve5PElPUArcsTkfTyW+LfXpznDeeHxMCcA== - dependencies: - "@aws-crypto/sha1-browser" "5.2.0" - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.606.0" - "@aws-sdk/client-sts" "3.606.0" - "@aws-sdk/core" "3.598.0" - "@aws-sdk/credential-provider-node" "3.600.0" - "@aws-sdk/middleware-bucket-endpoint" "3.598.0" - "@aws-sdk/middleware-expect-continue" "3.598.0" - "@aws-sdk/middleware-flexible-checksums" "3.598.0" - "@aws-sdk/middleware-host-header" "3.598.0" - "@aws-sdk/middleware-location-constraint" "3.598.0" - "@aws-sdk/middleware-logger" "3.598.0" - "@aws-sdk/middleware-recursion-detection" "3.598.0" - "@aws-sdk/middleware-sdk-s3" "3.598.0" - "@aws-sdk/middleware-signing" "3.598.0" - "@aws-sdk/middleware-ssec" "3.598.0" - "@aws-sdk/middleware-user-agent" "3.598.0" - "@aws-sdk/region-config-resolver" "3.598.0" - "@aws-sdk/signature-v4-multi-region" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@aws-sdk/util-endpoints" "3.598.0" - "@aws-sdk/util-user-agent-browser" "3.598.0" - "@aws-sdk/util-user-agent-node" "3.598.0" - "@aws-sdk/xml-builder" "3.598.0" - "@smithy/config-resolver" "^3.0.2" - "@smithy/core" "^2.2.1" - "@smithy/eventstream-serde-browser" "^3.0.2" - "@smithy/eventstream-serde-config-resolver" "^3.0.1" - "@smithy/eventstream-serde-node" "^3.0.2" - "@smithy/fetch-http-handler" "^3.0.2" - "@smithy/hash-blob-browser" "^3.1.0" - "@smithy/hash-node" "^3.0.1" - "@smithy/hash-stream-node" "^3.1.0" - "@smithy/invalid-dependency" "^3.0.1" - "@smithy/md5-js" "^3.0.1" - "@smithy/middleware-content-length" "^3.0.1" - "@smithy/middleware-endpoint" "^3.0.2" - "@smithy/middleware-retry" "^3.0.4" - "@smithy/middleware-serde" "^3.0.1" - "@smithy/middleware-stack" "^3.0.1" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/node-http-handler" "^3.0.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" - "@smithy/url-parser" "^3.0.1" +"@aws-sdk/client-s3@^3.568.0": + version "3.576.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-s3/-/client-s3-3.576.0.tgz#0e2f8f8fdbf1548ed2bd7d782f8fdf2e90131de1" + integrity sha512-6Xhj8x7ijLqoLYncKMUn433QKWzEezDLR3TipKv/qHThTa8oYXkymMat/MfJ/lx3jsc8wS72i+1kTwO+AFUg6w== + dependencies: + "@aws-crypto/sha1-browser" "3.0.0" + "@aws-crypto/sha256-browser" "3.0.0" + "@aws-crypto/sha256-js" "3.0.0" + "@aws-sdk/client-sso-oidc" "3.576.0" + "@aws-sdk/client-sts" "3.576.0" + "@aws-sdk/core" "3.576.0" + "@aws-sdk/credential-provider-node" "3.576.0" + "@aws-sdk/middleware-bucket-endpoint" "3.575.0" + "@aws-sdk/middleware-expect-continue" "3.575.0" + "@aws-sdk/middleware-flexible-checksums" "3.575.0" + "@aws-sdk/middleware-host-header" "3.575.0" + "@aws-sdk/middleware-location-constraint" "3.575.0" + "@aws-sdk/middleware-logger" "3.575.0" + "@aws-sdk/middleware-recursion-detection" "3.575.0" + "@aws-sdk/middleware-sdk-s3" "3.575.0" + "@aws-sdk/middleware-signing" "3.575.0" + "@aws-sdk/middleware-ssec" "3.575.0" + "@aws-sdk/middleware-user-agent" "3.575.0" + "@aws-sdk/region-config-resolver" "3.575.0" + "@aws-sdk/signature-v4-multi-region" "3.575.0" + "@aws-sdk/types" "3.575.0" + "@aws-sdk/util-endpoints" "3.575.0" + "@aws-sdk/util-user-agent-browser" "3.575.0" + "@aws-sdk/util-user-agent-node" "3.575.0" + "@aws-sdk/xml-builder" "3.575.0" + "@smithy/config-resolver" "^3.0.0" + "@smithy/core" "^2.0.0" + "@smithy/eventstream-serde-browser" "^3.0.0" + "@smithy/eventstream-serde-config-resolver" "^3.0.0" + "@smithy/eventstream-serde-node" "^3.0.0" + "@smithy/fetch-http-handler" "^3.0.0" + "@smithy/hash-blob-browser" "^3.0.0" + "@smithy/hash-node" "^3.0.0" + "@smithy/hash-stream-node" "^3.0.0" + "@smithy/invalid-dependency" "^3.0.0" + "@smithy/md5-js" "^3.0.0" + "@smithy/middleware-content-length" "^3.0.0" + "@smithy/middleware-endpoint" "^3.0.0" + "@smithy/middleware-retry" "^3.0.0" + "@smithy/middleware-serde" "^3.0.0" + "@smithy/middleware-stack" "^3.0.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/node-http-handler" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/smithy-client" "^3.0.0" + "@smithy/types" "^3.0.0" + "@smithy/url-parser" "^3.0.0" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.4" - "@smithy/util-defaults-mode-node" "^3.0.4" - "@smithy/util-endpoints" "^2.0.2" - "@smithy/util-retry" "^3.0.1" - "@smithy/util-stream" "^3.0.2" + "@smithy/util-defaults-mode-browser" "^3.0.0" + "@smithy/util-defaults-mode-node" "^3.0.0" + "@smithy/util-endpoints" "^2.0.0" + "@smithy/util-retry" "^3.0.0" + "@smithy/util-stream" "^3.0.0" "@smithy/util-utf8" "^3.0.0" - "@smithy/util-waiter" "^3.0.1" + "@smithy/util-waiter" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-sso-oidc@3.606.0": - version "3.606.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.606.0.tgz#19d4818b9d04e5d1b6a7fe50a86b0c98a2b30c42" - integrity sha512-gL1FHPS6hwgMNS/A+Qh5bUyHOeRVOqdb7c6+i+9gR3wtGvt2lvoSm8w5DhS08Xiiacz2AqYRDEapp0xuyCrbBQ== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.598.0" - "@aws-sdk/credential-provider-node" "3.600.0" - "@aws-sdk/middleware-host-header" "3.598.0" - "@aws-sdk/middleware-logger" "3.598.0" - "@aws-sdk/middleware-recursion-detection" "3.598.0" - "@aws-sdk/middleware-user-agent" "3.598.0" - "@aws-sdk/region-config-resolver" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@aws-sdk/util-endpoints" "3.598.0" - "@aws-sdk/util-user-agent-browser" "3.598.0" - "@aws-sdk/util-user-agent-node" "3.598.0" - "@smithy/config-resolver" "^3.0.2" - "@smithy/core" "^2.2.1" - "@smithy/fetch-http-handler" "^3.0.2" - "@smithy/hash-node" "^3.0.1" - "@smithy/invalid-dependency" "^3.0.1" - "@smithy/middleware-content-length" "^3.0.1" - "@smithy/middleware-endpoint" "^3.0.2" - "@smithy/middleware-retry" "^3.0.4" - "@smithy/middleware-serde" "^3.0.1" - "@smithy/middleware-stack" "^3.0.1" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/node-http-handler" "^3.0.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" - "@smithy/url-parser" "^3.0.1" +"@aws-sdk/client-sso-oidc@3.576.0": + version "3.576.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.576.0.tgz#0747712005dc8c70ad7b1ecdb1fb4857106a0a69" + integrity sha512-6U8933O9h6iMnQDpH3OtFhS3G3FVttYZUqTpC2T0FnSSX7zgG0GnlxdQiyZh1j1aFrEB8bFw/RSmxPcMJJuSlQ== + dependencies: + "@aws-crypto/sha256-browser" "3.0.0" + "@aws-crypto/sha256-js" "3.0.0" + "@aws-sdk/client-sts" "3.576.0" + "@aws-sdk/core" "3.576.0" + "@aws-sdk/credential-provider-node" "3.576.0" + "@aws-sdk/middleware-host-header" "3.575.0" + "@aws-sdk/middleware-logger" "3.575.0" + "@aws-sdk/middleware-recursion-detection" "3.575.0" + "@aws-sdk/middleware-user-agent" "3.575.0" + "@aws-sdk/region-config-resolver" "3.575.0" + "@aws-sdk/types" "3.575.0" + "@aws-sdk/util-endpoints" "3.575.0" + "@aws-sdk/util-user-agent-browser" "3.575.0" + "@aws-sdk/util-user-agent-node" "3.575.0" + "@smithy/config-resolver" "^3.0.0" + "@smithy/core" "^2.0.0" + "@smithy/fetch-http-handler" "^3.0.0" + "@smithy/hash-node" "^3.0.0" + "@smithy/invalid-dependency" "^3.0.0" + "@smithy/middleware-content-length" "^3.0.0" + "@smithy/middleware-endpoint" "^3.0.0" + "@smithy/middleware-retry" "^3.0.0" + "@smithy/middleware-serde" "^3.0.0" + "@smithy/middleware-stack" "^3.0.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/node-http-handler" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/smithy-client" "^3.0.0" + "@smithy/types" "^3.0.0" + "@smithy/url-parser" "^3.0.0" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.4" - "@smithy/util-defaults-mode-node" "^3.0.4" - "@smithy/util-endpoints" "^2.0.2" - "@smithy/util-middleware" "^3.0.1" - "@smithy/util-retry" "^3.0.1" + "@smithy/util-defaults-mode-browser" "^3.0.0" + "@smithy/util-defaults-mode-node" "^3.0.0" + "@smithy/util-endpoints" "^2.0.0" + "@smithy/util-middleware" "^3.0.0" + "@smithy/util-retry" "^3.0.0" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-sso@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.598.0.tgz#aef58e198e504d3b3d1ba345355650a67d21facb" - integrity sha512-nOI5lqPYa+YZlrrzwAJywJSw3MKVjvu6Ge2fCqQUNYMfxFB0NAaDFnl0EPjXi+sEbtCuz/uWE77poHbqiZ+7Iw== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.598.0" - "@aws-sdk/middleware-host-header" "3.598.0" - "@aws-sdk/middleware-logger" "3.598.0" - "@aws-sdk/middleware-recursion-detection" "3.598.0" - "@aws-sdk/middleware-user-agent" "3.598.0" - "@aws-sdk/region-config-resolver" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@aws-sdk/util-endpoints" "3.598.0" - "@aws-sdk/util-user-agent-browser" "3.598.0" - "@aws-sdk/util-user-agent-node" "3.598.0" - "@smithy/config-resolver" "^3.0.2" - "@smithy/core" "^2.2.1" - "@smithy/fetch-http-handler" "^3.0.2" - "@smithy/hash-node" "^3.0.1" - "@smithy/invalid-dependency" "^3.0.1" - "@smithy/middleware-content-length" "^3.0.1" - "@smithy/middleware-endpoint" "^3.0.2" - "@smithy/middleware-retry" "^3.0.4" - "@smithy/middleware-serde" "^3.0.1" - "@smithy/middleware-stack" "^3.0.1" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/node-http-handler" "^3.0.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" - "@smithy/url-parser" "^3.0.1" +"@aws-sdk/client-sso@3.576.0": + version "3.576.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.576.0.tgz#10a60057a6e6fb3cae164af1f16bb20f60188746" + integrity sha512-xbKE4bf3HYvkdrvn5kkpUdcoi3mg7uDLLkSbGaj0tzW3vNSdx9qLrCMuwfV7KrhVKWwx+lnw/2LGuCR2B5y0IA== + dependencies: + "@aws-crypto/sha256-browser" "3.0.0" + "@aws-crypto/sha256-js" "3.0.0" + "@aws-sdk/core" "3.576.0" + "@aws-sdk/middleware-host-header" "3.575.0" + "@aws-sdk/middleware-logger" "3.575.0" + "@aws-sdk/middleware-recursion-detection" "3.575.0" + "@aws-sdk/middleware-user-agent" "3.575.0" + "@aws-sdk/region-config-resolver" "3.575.0" + "@aws-sdk/types" "3.575.0" + "@aws-sdk/util-endpoints" "3.575.0" + "@aws-sdk/util-user-agent-browser" "3.575.0" + "@aws-sdk/util-user-agent-node" "3.575.0" + "@smithy/config-resolver" "^3.0.0" + "@smithy/core" "^2.0.0" + "@smithy/fetch-http-handler" "^3.0.0" + "@smithy/hash-node" "^3.0.0" + "@smithy/invalid-dependency" "^3.0.0" + "@smithy/middleware-content-length" "^3.0.0" + "@smithy/middleware-endpoint" "^3.0.0" + "@smithy/middleware-retry" "^3.0.0" + "@smithy/middleware-serde" "^3.0.0" + "@smithy/middleware-stack" "^3.0.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/node-http-handler" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/smithy-client" "^3.0.0" + "@smithy/types" "^3.0.0" + "@smithy/url-parser" "^3.0.0" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.4" - "@smithy/util-defaults-mode-node" "^3.0.4" - "@smithy/util-endpoints" "^2.0.2" - "@smithy/util-middleware" "^3.0.1" - "@smithy/util-retry" "^3.0.1" + "@smithy/util-defaults-mode-browser" "^3.0.0" + "@smithy/util-defaults-mode-node" "^3.0.0" + "@smithy/util-endpoints" "^2.0.0" + "@smithy/util-middleware" "^3.0.0" + "@smithy/util-retry" "^3.0.0" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/client-sts@3.606.0", "@aws-sdk/client-sts@^3.410.0": - version "3.606.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.606.0.tgz#81d61a6240761230fbb0e36ac782485c535ac4a2" - integrity sha512-b11mAhjrkm3MMiAPoMGcmd6vsaz2120lg8rHG/NZCo9vB1K6Kc7WP+a1Q05TRMseer2egTtpWJfn44aVO97VqA== - dependencies: - "@aws-crypto/sha256-browser" "5.2.0" - "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/client-sso-oidc" "3.606.0" - "@aws-sdk/core" "3.598.0" - "@aws-sdk/credential-provider-node" "3.600.0" - "@aws-sdk/middleware-host-header" "3.598.0" - "@aws-sdk/middleware-logger" "3.598.0" - "@aws-sdk/middleware-recursion-detection" "3.598.0" - "@aws-sdk/middleware-user-agent" "3.598.0" - "@aws-sdk/region-config-resolver" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@aws-sdk/util-endpoints" "3.598.0" - "@aws-sdk/util-user-agent-browser" "3.598.0" - "@aws-sdk/util-user-agent-node" "3.598.0" - "@smithy/config-resolver" "^3.0.2" - "@smithy/core" "^2.2.1" - "@smithy/fetch-http-handler" "^3.0.2" - "@smithy/hash-node" "^3.0.1" - "@smithy/invalid-dependency" "^3.0.1" - "@smithy/middleware-content-length" "^3.0.1" - "@smithy/middleware-endpoint" "^3.0.2" - "@smithy/middleware-retry" "^3.0.4" - "@smithy/middleware-serde" "^3.0.1" - "@smithy/middleware-stack" "^3.0.1" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/node-http-handler" "^3.0.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" - "@smithy/url-parser" "^3.0.1" +"@aws-sdk/client-sts@3.576.0", "@aws-sdk/client-sts@^3.410.0": + version "3.576.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sts/-/client-sts-3.576.0.tgz#17aee1dad3c135730c47df8aac2adbf14fae7df6" + integrity sha512-GHqqfRcUW/nGE4lpRafNKRxi4K7+SaQjYLjQnTEioUhr+w1IT/fFb3rGZYHHnN9ZCzbnrBULRC+1XOPIQWyLsw== + dependencies: + "@aws-crypto/sha256-browser" "3.0.0" + "@aws-crypto/sha256-js" "3.0.0" + "@aws-sdk/client-sso-oidc" "3.576.0" + "@aws-sdk/core" "3.576.0" + "@aws-sdk/credential-provider-node" "3.576.0" + "@aws-sdk/middleware-host-header" "3.575.0" + "@aws-sdk/middleware-logger" "3.575.0" + "@aws-sdk/middleware-recursion-detection" "3.575.0" + "@aws-sdk/middleware-user-agent" "3.575.0" + "@aws-sdk/region-config-resolver" "3.575.0" + "@aws-sdk/types" "3.575.0" + "@aws-sdk/util-endpoints" "3.575.0" + "@aws-sdk/util-user-agent-browser" "3.575.0" + "@aws-sdk/util-user-agent-node" "3.575.0" + "@smithy/config-resolver" "^3.0.0" + "@smithy/core" "^2.0.0" + "@smithy/fetch-http-handler" "^3.0.0" + "@smithy/hash-node" "^3.0.0" + "@smithy/invalid-dependency" "^3.0.0" + "@smithy/middleware-content-length" "^3.0.0" + "@smithy/middleware-endpoint" "^3.0.0" + "@smithy/middleware-retry" "^3.0.0" + "@smithy/middleware-serde" "^3.0.0" + "@smithy/middleware-stack" "^3.0.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/node-http-handler" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/smithy-client" "^3.0.0" + "@smithy/types" "^3.0.0" + "@smithy/url-parser" "^3.0.0" "@smithy/util-base64" "^3.0.0" "@smithy/util-body-length-browser" "^3.0.0" "@smithy/util-body-length-node" "^3.0.0" - "@smithy/util-defaults-mode-browser" "^3.0.4" - "@smithy/util-defaults-mode-node" "^3.0.4" - "@smithy/util-endpoints" "^2.0.2" - "@smithy/util-middleware" "^3.0.1" - "@smithy/util-retry" "^3.0.1" + "@smithy/util-defaults-mode-browser" "^3.0.0" + "@smithy/util-defaults-mode-node" "^3.0.0" + "@smithy/util-endpoints" "^2.0.0" + "@smithy/util-middleware" "^3.0.0" + "@smithy/util-retry" "^3.0.0" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/core@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/core/-/core-3.598.0.tgz#82a069d703be0cafe3ddeacb1de51981ee4faa25" - integrity sha512-HaSjt7puO5Cc7cOlrXFCW0rtA0BM9lvzjl56x0A20Pt+0wxXGeTOZZOkXQIepbrFkV2e/HYukuT9e99vXDm59g== +"@aws-sdk/core@3.576.0": + version "3.576.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/core/-/core-3.576.0.tgz#ced16ca42b615182565c6bcf4563278b30fd43bf" + integrity sha512-KDvDlbeipSTIf+ffKtTg1m419TK7s9mZSWC8bvuZ9qx6/sjQFOXIKOVqyuli6DnfxGbvRcwoRuY99OcCH1N/0w== dependencies: - "@smithy/core" "^2.2.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/signature-v4" "^3.1.0" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" + "@smithy/core" "^2.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/signature-v4" "^3.0.0" + "@smithy/smithy-client" "^3.0.0" + "@smithy/types" "^3.0.0" fast-xml-parser "4.2.5" tslib "^2.6.2" -"@aws-sdk/credential-provider-env@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.598.0.tgz#ea1f30cfc9948017dd0608518868d3f50074164f" - integrity sha512-vi1khgn7yXzLCcgSIzQrrtd2ilUM0dWodxj3PQ6BLfP0O+q1imO3hG1nq7DVyJtq7rFHs6+9N8G4mYvTkxby2w== +"@aws-sdk/credential-provider-env@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.575.0.tgz#2f0238719b383e37265e736575e9a9823a562982" + integrity sha512-YTgpq3rvYBXzW6OTDB00cE79evQtss/lz2GlJXgqqVXD0m7i77hGA8zb44VevP/WxtDaiSW7SSjuu8VCBGsg4g== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/property-provider" "^3.1.1" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/property-provider" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-http@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-http/-/credential-provider-http-3.598.0.tgz#58144440e698aef63b5cb459780325817c0acf10" - integrity sha512-N7cIafi4HVlQvEgvZSo1G4T9qb/JMLGMdBsDCT5XkeJrF0aptQWzTFH0jIdZcLrMYvzPcuEyO3yCBe6cy/ba0g== - dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/fetch-http-handler" "^3.0.2" - "@smithy/node-http-handler" "^3.0.1" - "@smithy/property-provider" "^3.1.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" - "@smithy/util-stream" "^3.0.2" +"@aws-sdk/credential-provider-http@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-http/-/credential-provider-http-3.575.0.tgz#d410dba2ae89ea6c42bf30d319b98e410da14d1b" + integrity sha512-xQfVmYI+9KqRvhWY8fyElnpcVUBBUgi/Hoji3oU6WLrUjrX98k93He7gKDQSyHf7ykMLUAJYWwsV4AjQ2j6njA== + dependencies: + "@aws-sdk/types" "3.575.0" + "@smithy/fetch-http-handler" "^3.0.0" + "@smithy/node-http-handler" "^3.0.0" + "@smithy/property-provider" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/smithy-client" "^3.0.0" + "@smithy/types" "^3.0.0" + "@smithy/util-stream" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-ini@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.598.0.tgz#fd0ba8ab5c3701e05567d1c6f7752cfd9f4ba111" - integrity sha512-/ppcIVUbRwDIwJDoYfp90X3+AuJo2mvE52Y1t2VSrvUovYn6N4v95/vXj6LS8CNDhz2jvEJYmu+0cTMHdhI6eA== - dependencies: - "@aws-sdk/credential-provider-env" "3.598.0" - "@aws-sdk/credential-provider-http" "3.598.0" - "@aws-sdk/credential-provider-process" "3.598.0" - "@aws-sdk/credential-provider-sso" "3.598.0" - "@aws-sdk/credential-provider-web-identity" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@smithy/credential-provider-imds" "^3.1.1" - "@smithy/property-provider" "^3.1.1" - "@smithy/shared-ini-file-loader" "^3.1.1" - "@smithy/types" "^3.1.0" +"@aws-sdk/credential-provider-ini@3.576.0": + version "3.576.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.576.0.tgz#faad19e47ae8c61997d435d6d8a148d8057cada1" + integrity sha512-AwH/+29SbjhxGJVYhFn6+7r0MZ7TjJClySTJzuOoyjJGPWAifTdEuFkyOw8Bs9fEvbJ0ExgFxSaa445fO56kmg== + dependencies: + "@aws-sdk/credential-provider-env" "3.575.0" + "@aws-sdk/credential-provider-process" "3.575.0" + "@aws-sdk/credential-provider-sso" "3.576.0" + "@aws-sdk/credential-provider-web-identity" "3.575.0" + "@aws-sdk/types" "3.575.0" + "@smithy/credential-provider-imds" "^3.0.0" + "@smithy/property-provider" "^3.0.0" + "@smithy/shared-ini-file-loader" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-node@3.600.0": - version "3.600.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.600.0.tgz#33b32364972bd7167d000cdded92b9398346a3ca" - integrity sha512-1pC7MPMYD45J7yFjA90SxpR0yaSvy+yZiq23aXhAPZLYgJBAxHLu0s0mDCk/piWGPh8+UGur5K0bVdx4B1D5hw== - dependencies: - "@aws-sdk/credential-provider-env" "3.598.0" - "@aws-sdk/credential-provider-http" "3.598.0" - "@aws-sdk/credential-provider-ini" "3.598.0" - "@aws-sdk/credential-provider-process" "3.598.0" - "@aws-sdk/credential-provider-sso" "3.598.0" - "@aws-sdk/credential-provider-web-identity" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@smithy/credential-provider-imds" "^3.1.1" - "@smithy/property-provider" "^3.1.1" - "@smithy/shared-ini-file-loader" "^3.1.1" - "@smithy/types" "^3.1.0" +"@aws-sdk/credential-provider-node@3.576.0": + version "3.576.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.576.0.tgz#9bd181e9cb2c3d1434df8293e6c0f271de0854bc" + integrity sha512-Ad244g3TJnfY1QFlZ+cywD6kgGD2yj+qg47Ryt50Y42bwmNuuqSpF9n0C71opRR68Rcl7ksOxixCJomWqpcHbA== + dependencies: + "@aws-sdk/credential-provider-env" "3.575.0" + "@aws-sdk/credential-provider-http" "3.575.0" + "@aws-sdk/credential-provider-ini" "3.576.0" + "@aws-sdk/credential-provider-process" "3.575.0" + "@aws-sdk/credential-provider-sso" "3.576.0" + "@aws-sdk/credential-provider-web-identity" "3.575.0" + "@aws-sdk/types" "3.575.0" + "@smithy/credential-provider-imds" "^3.0.0" + "@smithy/property-provider" "^3.0.0" + "@smithy/shared-ini-file-loader" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-process@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.598.0.tgz#f48ff6f964cd6726499b207f45bfecda4be922ce" - integrity sha512-rM707XbLW8huMk722AgjVyxu2tMZee++fNA8TJVNgs1Ma02Wx6bBrfIvlyK0rCcIRb0WdQYP6fe3Xhiu4e8IBA== +"@aws-sdk/credential-provider-process@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.575.0.tgz#b1b409af833ccbce18e2806991434aa30f61ceb3" + integrity sha512-2/5NJV7MZysKglqJSQ/O8OELNcwLcH3xknabL9NagtzB7RNB2p1AUXR0UlTey9sSDLL4oCmNa/+unYuglW/Ahg== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/property-provider" "^3.1.1" - "@smithy/shared-ini-file-loader" "^3.1.1" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/property-provider" "^3.0.0" + "@smithy/shared-ini-file-loader" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-sso@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.598.0.tgz#52781e2b60b1f61752829c44a5e0b9fedd0694d6" - integrity sha512-5InwUmrAuqQdOOgxTccRayMMkSmekdLk6s+az9tmikq0QFAHUCtofI+/fllMXSR9iL6JbGYi1940+EUmS4pHJA== - dependencies: - "@aws-sdk/client-sso" "3.598.0" - "@aws-sdk/token-providers" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@smithy/property-provider" "^3.1.1" - "@smithy/shared-ini-file-loader" "^3.1.1" - "@smithy/types" "^3.1.0" +"@aws-sdk/credential-provider-sso@3.576.0": + version "3.576.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.576.0.tgz#d3c9041fdae3513717aaea92fefc3371f64a6d83" + integrity sha512-1F17issiqf+mSG7KJ+D0SfZRYBZPAmRcA5+VHDUuMLozhh8tyYMe0mwzOt9IKc7ocrJA+2Wp7l7sg3h6aanedQ== + dependencies: + "@aws-sdk/client-sso" "3.576.0" + "@aws-sdk/token-providers" "3.575.0" + "@aws-sdk/types" "3.575.0" + "@smithy/property-provider" "^3.0.0" + "@smithy/shared-ini-file-loader" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-web-identity@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.598.0.tgz#d737e9c2b7c4460b8e31a55b4979bf4d88913900" - integrity sha512-GV5GdiMbz5Tz9JO4NJtRoFXjW0GPEujA0j+5J/B723rTN+REHthJu48HdBKouHGhdzkDWkkh1bu52V02Wprw8w== +"@aws-sdk/credential-provider-web-identity@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.575.0.tgz#524ff9f944986c99486be5fa374db4d5895f63ff" + integrity sha512-QcvVH7wpvpFRXGAGgCBfQeiF/ptD0NJ+Hrc8dDYfPGhFeZ0EoVQBYNphLi25xe7JZ+XbaqCKrURHZtr4fAEOJw== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/property-provider" "^3.1.1" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/property-provider" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" "@aws-sdk/endpoint-cache@3.572.0": @@ -742,206 +560,182 @@ mnemonist "0.38.3" tslib "^2.6.2" -"@aws-sdk/middleware-bucket-endpoint@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.598.0.tgz#033b08921f9f284483a7337ed165743ee0dc598d" - integrity sha512-PM7BcFfGUSkmkT6+LU9TyJiB4S8yI7dfuKQDwK5ZR3P7MKaK4Uj4yyDiv0oe5xvkF6+O2+rShj+eh8YuWkOZ/Q== +"@aws-sdk/middleware-bucket-endpoint@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.575.0.tgz#258c00c672179f6c038f532f9bc1ff51caba5eb0" + integrity sha512-ytsp7xcmbpkVk4TLoi91YyXQh/vwSIGdJ2Awo/pi6ac5Fqe6OntPijh5GHSVj5ZrxW4haPWb6HdBmKMo4liGEw== dependencies: - "@aws-sdk/types" "3.598.0" + "@aws-sdk/types" "3.575.0" "@aws-sdk/util-arn-parser" "3.568.0" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/types" "^3.1.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/types" "^3.0.0" "@smithy/util-config-provider" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-endpoint-discovery@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.598.0.tgz#1670e657e8ad75516a3907fe8c406f2b8f004544" - integrity sha512-TaFo3rfapVP0FiddH2zDyA5R5XNk2M+zMeUZaBRveYamSQ11F+fMGcedBgbOsv7yNESvaZvjlcw2K+cx3jOchA== +"@aws-sdk/middleware-endpoint-discovery@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-endpoint-discovery/-/middleware-endpoint-discovery-3.575.0.tgz#bd9c714d65c0b8dd99f8c259f5317e7788fee876" + integrity sha512-IcswRas8vfUvvOCISAN5u1sVx0ioTqMZU6QYm3eVUwUDuZDvIDnrqLSGWPIS4c+Utc7RZcENgEYtbgb1aLSPVw== dependencies: "@aws-sdk/endpoint-cache" "3.572.0" - "@aws-sdk/types" "3.598.0" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-expect-continue@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.598.0.tgz#5b08b8cae70d1e7cc082d3627b31856f6ba20d17" - integrity sha512-ZuHW18kaeHR8TQyhEOYMr8VwiIh0bMvF7J1OTqXHxDteQIavJWA3CbfZ9sgS4XGtrBZDyHJhjZKeCfLhN2rq3w== +"@aws-sdk/middleware-expect-continue@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.575.0.tgz#d54c8b309b87347be9f3a3b566bafa0fbf8cd7bf" + integrity sha512-8Nq4UtEi63MJPoYBACW5YoMKQdbrkLNGIdTyrolNRNwVS+6nQqDMvBplakCzQ1nL1rHOEEsKKc8e2BlG9SkR5A== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/protocol-http" "^4.0.1" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-flexible-checksums@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.598.0.tgz#8e40734d5fb1b116816f885885f16db9b5e39032" - integrity sha512-xukAzds0GQXvMEY9G6qt+CzwVzTx8NyKKh04O2Q+nOch6QQ8Rs+2kTRy3Z4wQmXq2pK9hlOWb5nXA7HWpmz6Ng== +"@aws-sdk/middleware-flexible-checksums@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.575.0.tgz#0b06111c0cc82c279e6682acd36f96e3df56a1d5" + integrity sha512-UbyqN39v6s+olyuVKwX778w6J2ZuYpxb1j+KdhFtZwpMSLd/UIQ0+A71U2vB6TrC52OEW0jIXEEBv6PcMBz9nw== dependencies: - "@aws-crypto/crc32" "5.2.0" - "@aws-crypto/crc32c" "5.2.0" - "@aws-sdk/types" "3.598.0" + "@aws-crypto/crc32" "3.0.0" + "@aws-crypto/crc32c" "3.0.0" + "@aws-sdk/types" "3.575.0" "@smithy/is-array-buffer" "^3.0.0" - "@smithy/protocol-http" "^4.0.1" - "@smithy/types" "^3.1.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/types" "^3.0.0" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-host-header@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.598.0.tgz#0a7c4d5a95657bea2d7c4e29b9a8b379952d09b1" - integrity sha512-WiaG059YBQwQraNejLIi0gMNkX7dfPZ8hDIhvMr5aVPRbaHH8AYF3iNSsXYCHvA2Cfa1O9haYXsuMF9flXnCmA== +"@aws-sdk/middleware-host-header@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.575.0.tgz#5bf24080d6a6c466cdeaff49879c77559f74a2fd" + integrity sha512-V2WoLBiXNCc4rIWZt6FUcP4TN0Vk02A9PPCBWkTfyOooiqfq+WZmZjRRBpwl1+5UsvARslrKWF0VzheMRXPJLQ== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/protocol-http" "^4.0.1" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-location-constraint@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.598.0.tgz#45564d5119468e3ac97949431c249e8b6e00ec09" - integrity sha512-8oybQxN3F1ISOMULk7JKJz5DuAm5hCUcxMW9noWShbxTJuStNvuHf/WLUzXrf8oSITyYzIHPtf8VPlKR7I3orQ== +"@aws-sdk/middleware-location-constraint@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.575.0.tgz#1816fcda54bfefa4b607a0ac93273e12b2027621" + integrity sha512-MtQsLsEjSSSfm0OlQqg9PEzS1nxJDdApGoeCYLTbCzIp6hChdLZCCsDXwGg9S++24rjQsUglMhXh4WGXQ9FDnw== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-logger@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.598.0.tgz#0c0692d2f4f9007c915734ab319db377ca9a3b1b" - integrity sha512-bxBjf/VYiu3zfu8SYM2S9dQQc3tz5uBAOcPz/Bt8DyyK3GgOpjhschH/2XuUErsoUO1gDJqZSdGOmuHGZQn00Q== +"@aws-sdk/middleware-logger@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.575.0.tgz#981c939cb3c10c1e3ecfa458c64f7be8c5a71307" + integrity sha512-7DEKx9Z11Maaye7FfhYtC8rjbM/PcFcMO2N4QEAfypcgWCj+w4gseE2OGdfAH9OFDoFc6YvLp53v16vbPjzQSg== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-recursion-detection@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.598.0.tgz#94015d41f8174bd41298fd13f8fb0a8c4576d7c8" - integrity sha512-vjT9BeFY9FeN0f8hm2l6F53tI0N5bUq6RcDkQXKNabXBnQxKptJRad6oP2X5y3FoVfBLOuDkQgiC2940GIPxtQ== +"@aws-sdk/middleware-recursion-detection@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.575.0.tgz#924a4b7ca864600a202d82621bed3ddfd7819e06" + integrity sha512-ri89ldRFos6KZDGaknWPS2XPO9qr+gZ7+mPaoU8YkSM1W4uKqtnUSONyc+O3CFGJrqReuGHhRq0l2Sld0bjwOw== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/protocol-http" "^4.0.1" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-sdk-api-gateway@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-sdk-api-gateway/-/middleware-sdk-api-gateway-3.598.0.tgz#94e87ab3c40db65bdcf3740dc95d12a6a6f6b50c" - integrity sha512-VJLhV1C5MrV+QBRfzTXCyZvFizY/mBf6b7AZ9NsUH54/VbasorFBY5ol+p+0sPuDwRxXWX+nWdAvs2p4uhSBFQ== +"@aws-sdk/middleware-sdk-s3@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.575.0.tgz#b2be802e4522ca4d7b0466b1a9b174f802afc48f" + integrity sha512-8cBG8/tap4F6+UigTpKu8D2bvsLgqRTmn1K86qo3LqRX0Wc5X8TVjdKA2PmG0onOOr7rqTLcP9Q02LCh3usU6Q== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/protocol-http" "^4.0.1" - "@smithy/types" "^3.1.0" - tslib "^2.6.2" - -"@aws-sdk/middleware-sdk-s3@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.598.0.tgz#308604f8a38959ad65ec5674c643c7032d678f43" - integrity sha512-5AGtLAh9wyK6ANPYfaKTqJY1IFJyePIxsEbxa7zS6REheAqyVmgJFaGu3oQ5XlxfGr5Uq59tFTRkyx26G1HkHA== - dependencies: - "@aws-sdk/types" "3.598.0" + "@aws-sdk/types" "3.575.0" "@aws-sdk/util-arn-parser" "3.568.0" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/signature-v4" "^3.1.0" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/signature-v4" "^3.0.0" + "@smithy/smithy-client" "^3.0.0" + "@smithy/types" "^3.0.0" "@smithy/util-config-provider" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-signing@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-signing/-/middleware-signing-3.598.0.tgz#b90eef6a9fe3f76777c9cd4890dcae8e1febd249" - integrity sha512-XKb05DYx/aBPqz6iCapsCbIl8aD8EihTuPCs51p75QsVfbQoVr4TlFfIl5AooMSITzojdAQqxt021YtvxjtxIQ== - dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/property-provider" "^3.1.1" - "@smithy/protocol-http" "^4.0.1" - "@smithy/signature-v4" "^3.1.0" - "@smithy/types" "^3.1.0" - "@smithy/util-middleware" "^3.0.1" +"@aws-sdk/middleware-signing@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-signing/-/middleware-signing-3.575.0.tgz#b19d2d6816770ed8645e12662d147777b271907e" + integrity sha512-frpGG7i3YngWwrYIeDq8/nbat3Gfl803qasaS112rmlPU0ezmYS1SPxpXjpIKxUUYofbzaFtRBAOHU1u7GnWew== + dependencies: + "@aws-sdk/types" "3.575.0" + "@smithy/property-provider" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/signature-v4" "^3.0.0" + "@smithy/types" "^3.0.0" + "@smithy/util-middleware" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-ssec@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-ssec/-/middleware-ssec-3.598.0.tgz#d6a3c64ce77bd7379653b46b58ded32a7b0fe6f4" - integrity sha512-f0p2xP8IC1uJ5e/tND1l81QxRtRFywEdnbtKCE0H6RSn4UIt2W3Dohe1qQDbnh27okF0PkNW6BJGdSAz3p7qbA== +"@aws-sdk/middleware-ssec@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-ssec/-/middleware-ssec-3.575.0.tgz#799650e7860a7443e95e0e72313e41b77e99ce1c" + integrity sha512-rEFt2w3DdlmPsHRvVXOW6rNDIPE7UaEZ5a4LAkn78XilQYuQdhm5wtw5Ao0pJpDSVYNCZDVZaAvdHKQ1dnfwCA== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/middleware-user-agent@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.598.0.tgz#6fa26849d256434ca4884c42c1c4755aa2f1556e" - integrity sha512-4tjESlHG5B5MdjUaLK7tQs/miUtHbb6deauQx8ryqSBYOhfHVgb1ZnzvQR0bTrhpqUg0WlybSkDaZAICf9xctg== +"@aws-sdk/middleware-user-agent@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.575.0.tgz#1969f8b8972ee0c02753584575dde3e3b0b204b8" + integrity sha512-fWlr4RfrUNS2R3PgP+WsoMYORAgv/47Lp0J0fb3dXO1YvdczNWddRbFSUX2MQxM/y9XFfQPLpLgzluhoL3Cjeg== dependencies: - "@aws-sdk/types" "3.598.0" - "@aws-sdk/util-endpoints" "3.598.0" - "@smithy/protocol-http" "^4.0.1" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@aws-sdk/util-endpoints" "3.575.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/region-config-resolver@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/region-config-resolver/-/region-config-resolver-3.598.0.tgz#fd8fd6b7bc11b5f81def4db0db9e835d40a8f86e" - integrity sha512-oYXhmTokSav4ytmWleCr3rs/1nyvZW/S0tdi6X7u+dLNL5Jee+uMxWGzgOrWK6wrQOzucLVjS4E/wA11Kv2GTw== +"@aws-sdk/region-config-resolver@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/region-config-resolver/-/region-config-resolver-3.575.0.tgz#8be6a9411ec8b5da3f3d0cac44beaa5b9eb6341f" + integrity sha512-sBJKwTWKCWu9y8FzXIijYGwkKr3tDkPXM7BylToe6W+tGkp4OirV4iXrWA9zReNwTTepoxHufofqjGK9BtcI8g== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/types" "^3.0.0" "@smithy/util-config-provider" "^3.0.0" - "@smithy/util-middleware" "^3.0.1" - tslib "^2.6.2" - -"@aws-sdk/s3-request-presigner@^3.568.0": - version "3.606.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/s3-request-presigner/-/s3-request-presigner-3.606.0.tgz#8ccde4f65147f091961da8eb3a4dd03513cbd05b" - integrity sha512-ErxArdCk73MVOh5xiTWZkk76kZWCHZqCCdMnSJTD0lzTpfGbwL/eEjHIjKLJO+EsRtDKYmS8vN+qijyMvMqruw== - dependencies: - "@aws-sdk/signature-v4-multi-region" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@aws-sdk/util-format-url" "3.598.0" - "@smithy/middleware-endpoint" "^3.0.2" - "@smithy/protocol-http" "^4.0.1" - "@smithy/smithy-client" "^3.1.2" - "@smithy/types" "^3.1.0" + "@smithy/util-middleware" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/signature-v4-multi-region@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.598.0.tgz#1716022e31dcbc5821aeca85204718f523a1ddbf" - integrity sha512-1r/EyTrO1gSa1FirnR8V7mabr7gk+l+HkyTI0fcTSr8ucB7gmYyW6WjkY8JCz13VYHFK62usCEDS7yoJoJOzTA== +"@aws-sdk/signature-v4-multi-region@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.575.0.tgz#73a639120a9bb36a067fdbaa094a54c9bcff7093" + integrity sha512-QMwuLuNwnEQ51RCZX8H/lXnOJgBcJJOCgClB9usW/XujNJVq8GnpZ5E7TsQLN88G6fifmcjQWonLKummuh/zVA== dependencies: - "@aws-sdk/middleware-sdk-s3" "3.598.0" - "@aws-sdk/types" "3.598.0" - "@smithy/protocol-http" "^4.0.1" - "@smithy/signature-v4" "^3.1.0" - "@smithy/types" "^3.1.0" + "@aws-sdk/middleware-sdk-s3" "3.575.0" + "@aws-sdk/types" "3.575.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/signature-v4" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/token-providers@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.598.0.tgz#49a94c14ce2e392bb0e84b69986c33ecfad5b804" - integrity sha512-TKY1EVdHVBnZqpyxyTHdpZpa1tUpb6nxVeRNn1zWG8QB5MvH4ALLd/jR+gtmWDNQbIG4cVuBOZFVL8hIYicKTA== +"@aws-sdk/token-providers@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.575.0.tgz#0d5ded8434b49cafd7303a139d09c97155138d3b" + integrity sha512-EPNDPQoQkjKqn4D2t70qVzbfdtlaAy9KBdG58qD1yNWVxq8Rh/lXdwmB+aE2PSahtyfVikZdCRoZiFzxDh5IUA== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/property-provider" "^3.1.1" - "@smithy/shared-ini-file-loader" "^3.1.1" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/property-provider" "^3.0.0" + "@smithy/shared-ini-file-loader" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/types@3.598.0", "@aws-sdk/types@^3.222.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.598.0.tgz#b840d2446dee19a2a4731e6166f2327915d846db" - integrity sha512-742uRl6z7u0LFmZwDrFP6r1wlZcgVPw+/TilluDJmCAR8BgRw3IR+743kUXKBGd8QZDRW2n6v/PYsi/AWCDDMQ== +"@aws-sdk/types@3.575.0", "@aws-sdk/types@^3.222.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.575.0.tgz#ed8f33e15c7ea22b5244018330475983d0558556" + integrity sha512-XrnolQGs0wXxdgNudirR14OgNOarH7WUif38+2Pd4onZH+L7XoILem0EgA1tRpgFpw2pFHlZCNaAHDNSBEal7g== dependencies: - "@smithy/types" "^3.1.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" "@aws-sdk/util-arn-parser@3.568.0": @@ -952,30 +746,20 @@ tslib "^2.6.2" "@aws-sdk/util-dynamodb@^3.529.1": - version "3.606.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-dynamodb/-/util-dynamodb-3.606.0.tgz#a171a203c7dd42cc6a7ef7e1970c1a43b87a171a" - integrity sha512-2m6yPB634cgnjpSfkKWIqVSUC5SfgzBRotdwRqkCsfQDm66KX5pnhz8QMogB5D+O1q+Gd7ZypgAkQ7PgDWt5tA== - dependencies: - tslib "^2.6.2" - -"@aws-sdk/util-endpoints@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.598.0.tgz#7f78d68524babac7fdacf381590470353d45b959" - integrity sha512-Qo9UoiVVZxcOEdiOMZg3xb1mzkTxrhd4qSlg5QQrfWPJVx/QOg+Iy0NtGxPtHtVZNHZxohYwDwV/tfsnDSE2gQ== + version "3.576.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-dynamodb/-/util-dynamodb-3.576.0.tgz#ca970b7af3d5a3039dd19afa98281505b09814ab" + integrity sha512-5ehO+SqFWfvCno8ofhqBeKoCdbrBMPuDIEKMYn2z29JaZtOqAIvazzDabtqRCaDzYGTnwoq+otCcrHav9Hlxfw== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/types" "^3.1.0" - "@smithy/util-endpoints" "^2.0.2" tslib "^2.6.2" -"@aws-sdk/util-format-url@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-format-url/-/util-format-url-3.598.0.tgz#966ddb048df7448017862fc9f64c7755411fe9e3" - integrity sha512-1X0PlREk5K6tQg8rFZOjoKVtDyI1WgbKJNCymHhMye6STryY6fhuuayKstiDThkqDYxqahjUJz/Tl2p5W3rbcw== +"@aws-sdk/util-endpoints@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.575.0.tgz#370ad9b1ce7df227d44447ab2135c5e110aa72d2" + integrity sha512-wC5x+V6w3kRlR6X6XVINsAPDYG+Tzs3Wthlw+YLtjuPODUNZIQAqsABHahxnekFyAvse+1929Hwo+CaL+BHZGA== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/querystring-builder" "^3.0.1" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/types" "^3.0.0" + "@smithy/util-endpoints" "^2.0.0" tslib "^2.6.2" "@aws-sdk/util-locate-window@^3.0.0": @@ -985,187 +769,191 @@ dependencies: tslib "^2.6.2" -"@aws-sdk/util-user-agent-browser@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.598.0.tgz#5039d0335f8a06af5be73c960df85009dda59090" - integrity sha512-36Sxo6F+ykElaL1mWzWjlg+1epMpSe8obwhCN1yGE7Js9ywy5U6k6l+A3q3YM9YRbm740sNxncbwLklMvuhTKw== +"@aws-sdk/util-user-agent-browser@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.575.0.tgz#3054cc42e0b386a34f7b0d4e8e9609e016c72eed" + integrity sha512-iADonXyaXgwvC4T0qRuDWCdKInz82GX2cyezq/oqVlL8bPY7HD8jwZZruuJdq5tkaJi1EhbO4+f1ksZqOiZKvQ== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/types" "^3.0.0" bowser "^2.11.0" tslib "^2.6.2" -"@aws-sdk/util-user-agent-node@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.598.0.tgz#f9bdf1b7cc3a40787c379f7c2ff028de2612c177" - integrity sha512-oyWGcOlfTdzkC6SVplyr0AGh54IMrDxbhg5RxJ5P+V4BKfcDoDcZV9xenUk9NsOi9MuUjxMumb9UJGkDhM1m0A== +"@aws-sdk/util-user-agent-node@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.575.0.tgz#49a6ecc5f56297e1477de90f30f102c470d3dc78" + integrity sha512-kwzvBfA0LoILDOFS6BV8uOkksBHrYulP6kNXegB5eZnDSNia5DbBsXqxQ/HknNF5a429SWQw2aaQJEgQvZB1VA== dependencies: - "@aws-sdk/types" "3.598.0" - "@smithy/node-config-provider" "^3.1.1" - "@smithy/types" "^3.1.0" + "@aws-sdk/types" "3.575.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@aws-sdk/xml-builder@3.598.0": - version "3.598.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/xml-builder/-/xml-builder-3.598.0.tgz#ee591c5d80a34d9c5bc14326f1a62e9a0649c587" - integrity sha512-ZIa2RK7CHFTZ4gwK77WRtsZ6vF7xwRXxJ8KQIxK2duhoTVcn0xYxpFLdW9WZZZvdP9GIF3Loqvf8DRdeU5Jc7Q== +"@aws-sdk/util-utf8-browser@^3.0.0": + version "3.259.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz#3275a6f5eb334f96ca76635b961d3c50259fd9ff" + integrity sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw== + dependencies: + tslib "^2.3.1" + +"@aws-sdk/xml-builder@3.575.0": + version "3.575.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/xml-builder/-/xml-builder-3.575.0.tgz#233b2aae422dd789a078073032da1bc60317aa1d" + integrity sha512-cWgAwmbFYNCFzPwxL705+lWps0F3ZvOckufd2KKoEZUmtpVw9/txUXNrPySUXSmRTSRhoatIMABNfStWR043bQ== dependencies: - "@smithy/types" "^3.1.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" - integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.2": + version "7.24.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" + integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== dependencies: - "@babel/highlight" "^7.24.7" + "@babel/highlight" "^7.24.2" picocolors "^1.0.0" -"@babel/compat-data@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.7.tgz#d23bbea508c3883ba8251fb4164982c36ea577ed" - integrity sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw== +"@babel/compat-data@^7.23.5": + version "7.24.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.4.tgz#6f102372e9094f25d908ca0d34fc74c74606059a" + integrity sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.7.tgz#b676450141e0b52a3d43bc91da86aa608f950ac4" - integrity sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g== + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.5.tgz#15ab5b98e101972d171aeef92ac70d8d6718f06a" + integrity sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" - "@babel/helper-compilation-targets" "^7.24.7" - "@babel/helper-module-transforms" "^7.24.7" - "@babel/helpers" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/template" "^7.24.7" - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/code-frame" "^7.24.2" + "@babel/generator" "^7.24.5" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-module-transforms" "^7.24.5" + "@babel/helpers" "^7.24.5" + "@babel/parser" "^7.24.5" + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.5" + "@babel/types" "^7.24.5" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.23.0", "@babel/generator@^7.24.7", "@babel/generator@^7.7.2": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d" - integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA== +"@babel/generator@^7.23.0", "@babel/generator@^7.24.5", "@babel/generator@^7.7.2": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.5.tgz#e5afc068f932f05616b66713e28d0f04e99daeb3" + integrity sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA== dependencies: - "@babel/types" "^7.24.7" + "@babel/types" "^7.24.5" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" -"@babel/helper-compilation-targets@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz#4eb6c4a80d6ffeac25ab8cd9a21b5dfa48d503a9" - integrity sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg== +"@babel/helper-compilation-targets@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz#4d79069b16cbcf1461289eccfbbd81501ae39991" + integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== dependencies: - "@babel/compat-data" "^7.24.7" - "@babel/helper-validator-option" "^7.24.7" + "@babel/compat-data" "^7.23.5" + "@babel/helper-validator-option" "^7.23.5" browserslist "^4.22.2" lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-environment-visitor@^7.22.20", "@babel/helper-environment-visitor@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9" - integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== - dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-function-name@^7.23.0", "@babel/helper-function-name@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2" - integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== - dependencies: - "@babel/template" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/helper-hoist-variables@^7.22.5", "@babel/helper-hoist-variables@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee" - integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== - dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-module-imports@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" - integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== - dependencies: - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" - -"@babel/helper-module-transforms@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz#31b6c9a2930679498db65b685b1698bfd6c7daf8" - integrity sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ== - dependencies: - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-module-imports" "^7.24.7" - "@babel/helper-simple-access" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" - "@babel/helper-validator-identifier" "^7.24.7" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.8.0": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz#98c84fe6fe3d0d3ae7bfc3a5e166a46844feb2a0" - integrity sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg== +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== -"@babel/helper-simple-access@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3" - integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== +"@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== dependencies: - "@babel/traverse" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" -"@babel/helper-split-export-declaration@^7.22.6", "@babel/helper-split-export-declaration@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856" - integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== dependencies: - "@babel/types" "^7.24.7" - -"@babel/helper-string-parser@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2" - integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== - -"@babel/helper-validator-identifier@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" - integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== - -"@babel/helper-validator-option@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz#24c3bb77c7a425d1742eec8fb433b5a1b38e62f6" - integrity sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw== + "@babel/types" "^7.22.5" -"@babel/helpers@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.7.tgz#aa2ccda29f62185acb5d42fb4a3a1b1082107416" - integrity sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg== +"@babel/helper-module-imports@^7.24.3": + version "7.24.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz#6ac476e6d168c7c23ff3ba3cf4f7841d46ac8128" + integrity sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg== dependencies: - "@babel/template" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/types" "^7.24.0" -"@babel/highlight@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" - integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== +"@babel/helper-module-transforms@^7.24.5": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz#ea6c5e33f7b262a0ae762fd5986355c45f54a545" + integrity sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A== dependencies: - "@babel/helper-validator-identifier" "^7.24.7" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-module-imports" "^7.24.3" + "@babel/helper-simple-access" "^7.24.5" + "@babel/helper-split-export-declaration" "^7.24.5" + "@babel/helper-validator-identifier" "^7.24.5" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.24.0", "@babel/helper-plugin-utils@^7.8.0": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz#a924607dd254a65695e5bd209b98b902b3b2f11a" + integrity sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ== + +"@babel/helper-simple-access@^7.24.5": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz#50da5b72f58c16b07fbd992810be6049478e85ba" + integrity sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ== + dependencies: + "@babel/types" "^7.24.5" + +"@babel/helper-split-export-declaration@^7.22.6", "@babel/helper-split-export-declaration@^7.24.5": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz#b9a67f06a46b0b339323617c8c6213b9055a78b6" + integrity sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q== + dependencies: + "@babel/types" "^7.24.5" + +"@babel/helper-string-parser@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz#f99c36d3593db9540705d0739a1f10b5e20c696e" + integrity sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ== + +"@babel/helper-validator-identifier@^7.24.5": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz#918b1a7fa23056603506370089bd990d8720db62" + integrity sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA== + +"@babel/helper-validator-option@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" + integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== + +"@babel/helpers@^7.24.5": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.5.tgz#fedeb87eeafa62b621160402181ad8585a22a40a" + integrity sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q== + dependencies: + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.5" + "@babel/types" "^7.24.5" + +"@babel/highlight@^7.24.2": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.5.tgz#bc0613f98e1dd0720e99b2a9ee3760194a704b6e" + integrity sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw== + dependencies: + "@babel/helper-validator-identifier" "^7.24.5" chalk "^2.4.2" js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.0", "@babel/parser@^7.23.9", "@babel/parser@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" - integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.0", "@babel/parser@^7.23.9", "@babel/parser@^7.24.0", "@babel/parser@^7.24.5": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.5.tgz#4a4d5ab4315579e5398a82dcf636ca80c3392790" + integrity sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -1203,11 +991,11 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-jsx@^7.7.2": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz#39a1fa4a7e3d3d7f34e2acc6be585b718d30e02d" - integrity sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ== + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz#3f6ca04b8c841811dbc3c5c5f837934e0d626c10" + integrity sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.0" "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" @@ -1259,27 +1047,27 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz#58d458271b4d3b6bb27ee6ac9525acbb259bad1c" - integrity sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA== + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz#b3bcc51f396d15f3591683f90239de143c076844" + integrity sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw== dependencies: - "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.0" "@babel/runtime@^7.17.9": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12" - integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw== + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.5.tgz#230946857c053a36ccc66e1dd03b17dd0c4ed02c" + integrity sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g== dependencies: regenerator-runtime "^0.14.0" -"@babel/template@^7.24.7", "@babel/template@^7.3.3": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315" - integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== +"@babel/template@^7.22.15", "@babel/template@^7.24.0", "@babel/template@^7.3.3": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.0.tgz#c6a524aa93a4a05d66aaf31654258fae69d87d50" + integrity sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA== dependencies: - "@babel/code-frame" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/types" "^7.24.7" + "@babel/code-frame" "^7.23.5" + "@babel/parser" "^7.24.0" + "@babel/types" "^7.24.0" "@babel/traverse@7.23.2": version "7.23.2" @@ -1297,29 +1085,29 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/traverse@^7.24.7": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5" - integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA== - dependencies: - "@babel/code-frame" "^7.24.7" - "@babel/generator" "^7.24.7" - "@babel/helper-environment-visitor" "^7.24.7" - "@babel/helper-function-name" "^7.24.7" - "@babel/helper-hoist-variables" "^7.24.7" - "@babel/helper-split-export-declaration" "^7.24.7" - "@babel/parser" "^7.24.7" - "@babel/types" "^7.24.7" +"@babel/traverse@^7.24.5": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.5.tgz#972aa0bc45f16983bf64aa1f877b2dd0eea7e6f8" + integrity sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA== + dependencies: + "@babel/code-frame" "^7.24.2" + "@babel/generator" "^7.24.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.24.5" + "@babel/parser" "^7.24.5" + "@babel/types" "^7.24.5" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.23.0", "@babel/types@^7.24.7", "@babel/types@^7.3.3": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" - integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.0", "@babel/types@^7.24.5", "@babel/types@^7.3.3": + version "7.24.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.5.tgz#7661930afc638a5383eb0c4aee59b74f38db84d7" + integrity sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ== dependencies: - "@babel/helper-string-parser" "^7.24.7" - "@babel/helper-validator-identifier" "^7.24.7" + "@babel/helper-string-parser" "^7.24.1" + "@babel/helper-validator-identifier" "^7.24.5" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -1332,6 +1120,13 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.6.0.tgz#ec6cd237440700bc23ca23087f513c75508958b0" integrity sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA== +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + "@dabh/diagnostics@^2.0.2": version "2.0.3" resolved "https://registry.yarnpkg.com/@dabh/diagnostics/-/diagnostics-2.0.3.tgz#7f7e97ee9a725dffc7808d93668cc984e1dc477a" @@ -1400,10 +1195,10 @@ "@hapi/boom" "^10.0.1" "@hapi/hoek" "^11.0.2" -"@hapi/catbox-memory@^6.0.2": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@hapi/catbox-memory/-/catbox-memory-6.0.2.tgz#399fa83e85134d45a548eee978e4c3c1523e1a70" - integrity sha512-H1l4ugoFW/ZRkqeFrIo8p1rWN0PA4MDTfu4JmcoNDvnY975o29mqoZblqFTotxNHlEkMPpIiIBJTV+Mbi+aF0g== +"@hapi/catbox-memory@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@hapi/catbox-memory/-/catbox-memory-6.0.1.tgz#8f6b04c0cf2ce25da470324df360bd4e8d68b6ec" + integrity sha512-sVb+/ZxbZIvaMtJfAbdyY+QJUQg9oKTwamXpEg/5xnfG5WbJLTjvEn4kIGKz9pN3ENNbIL/bIdctmHmqi/AdGA== dependencies: "@hapi/boom" "^10.0.1" "@hapi/hoek" "^11.0.2" @@ -1448,9 +1243,9 @@ "@hapi/wreck" "^18.0.1" "@hapi/hapi@^21.1.0": - version "21.3.10" - resolved "https://registry.yarnpkg.com/@hapi/hapi/-/hapi-21.3.10.tgz#0357db7ca49415e50e5df80ba50ad3964f2a62f3" - integrity sha512-CmEcmTREW394MaGGKvWpoOK4rG8tKlpZLs30tbaBzhCrhiL2Ti/HARek9w+8Ya4nMBGcd+kDAzvU44OX8Ms0Jg== + version "21.3.9" + resolved "https://registry.yarnpkg.com/@hapi/hapi/-/hapi-21.3.9.tgz#953220abe26d12a7cbd308a57e434dedf0278cb3" + integrity sha512-AT5m+Rb8iSOFG3zWaiEuTJazf4HDYl5UpRpyxMJ3yR+g8tOEmqDv6FmXrLHShdvDOStAAepHGnr1G7egkFSRdw== dependencies: "@hapi/accept" "^6.0.1" "@hapi/ammo" "^6.0.1" @@ -1458,7 +1253,7 @@ "@hapi/bounce" "^3.0.1" "@hapi/call" "^9.0.1" "@hapi/catbox" "^12.1.1" - "@hapi/catbox-memory" "^6.0.2" + "@hapi/catbox-memory" "^6.0.1" "@hapi/heavy" "^8.0.1" "@hapi/hoek" "^11.0.2" "@hapi/mimos" "^7.0.1" @@ -1610,18 +1405,6 @@ "@hapi/bourne" "^3.0.0" "@hapi/hoek" "^11.0.2" -"@isaacs/cliui@^8.0.2": - version "8.0.2" - resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" - integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== - dependencies: - string-width "^5.1.2" - string-width-cjs "npm:string-width@^4.2.0" - strip-ansi "^7.0.1" - strip-ansi-cjs "npm:strip-ansi@^6.0.1" - wrap-ansi "^8.1.0" - wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" - "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -1839,7 +1622,7 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.24" -"@jridgewell/resolve-uri@^3.1.0": +"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": version "3.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== @@ -1862,6 +1645,14 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" @@ -1903,11 +1694,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@pkgjs/parseargs@^0.11.0": - version "0.11.0" - resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" - integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== - "@serverless/dashboard-plugin@^7.2.0": version "7.2.3" resolved "https://registry.yarnpkg.com/@serverless/dashboard-plugin/-/dashboard-plugin-7.2.3.tgz#ea2a312de2c4e763f4365654f8dfb8720bda52bb" @@ -2015,14 +1801,7 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== -"@sinonjs/commons@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-2.0.0.tgz#fd4ca5b063554307e8327b4564bd56d3b73924a3" - integrity sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg== - dependencies: - type-detect "4.0.8" - -"@sinonjs/commons@^3.0.0", "@sinonjs/commons@^3.0.1": +"@sinonjs/commons@^3.0.0": version "3.0.1" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== @@ -2036,33 +1815,12 @@ dependencies: "@sinonjs/commons" "^3.0.0" -"@sinonjs/fake-timers@^11.2.2": - version "11.2.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz#50063cc3574f4a27bd8453180a04171c85cc9699" - integrity sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw== - dependencies: - "@sinonjs/commons" "^3.0.0" - -"@sinonjs/samsam@^8.0.0": - version "8.0.0" - resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-8.0.0.tgz#0d488c91efb3fa1442e26abea81759dfc8b5ac60" - integrity sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew== - dependencies: - "@sinonjs/commons" "^2.0.0" - lodash.get "^4.4.2" - type-detect "^4.0.8" - -"@sinonjs/text-encoding@^0.7.2": - version "0.7.2" - resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz#5981a8db18b56ba38ef0efb7d995b12aa7b51918" - integrity sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ== - -"@smithy/abort-controller@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-3.1.1.tgz#291210611ff6afecfc198d0ca72d5771d8461d16" - integrity sha512-MBJBiidoe+0cTFhyxT8g+9g7CeVccLM0IOKKUMCNQ1CNMJ/eIfoo0RTfVrXOONEI1UCN1W+zkiHSbzUNE9dZtQ== +"@smithy/abort-controller@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-3.0.0.tgz#5815f5d4618e14bf8d031bb98a99adabbb831168" + integrity sha512-p6GlFGBt9K4MYLu72YuJ523NVR4A8oHlC5M2JO6OmQqN8kAc/uh1JqLE+FizTokrSJGg0CSvC+BrsmGzKtsZKA== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" "@smithy/chunked-blob-reader-native@^3.0.0": @@ -2080,140 +1838,133 @@ dependencies: tslib "^2.6.2" -"@smithy/config-resolver@^3.0.2", "@smithy/config-resolver@^3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-3.0.4.tgz#85fffa86cee4562f867b0a70a374057a48525d1b" - integrity sha512-VwiOk7TwXoE7NlNguV/aPq1hFH72tqkHCw8eWXbr2xHspRyyv9DLpLXhq+Ieje+NwoqXrY0xyQjPXdOE6cGcHA== +"@smithy/config-resolver@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-3.0.0.tgz#d37b31e3202c5ce54d9bd2406dcde7c7b5073cbd" + integrity sha512-2GzOfADwYLQugYkKQhIyZyQlM05K+tMKvRnc6eFfZcpJGRfKoMUMYdPlBKmqHwQFXQKBrGV6cxL9oymWgDzvFw== dependencies: - "@smithy/node-config-provider" "^3.1.3" - "@smithy/types" "^3.3.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/types" "^3.0.0" "@smithy/util-config-provider" "^3.0.0" - "@smithy/util-middleware" "^3.0.3" + "@smithy/util-middleware" "^3.0.0" tslib "^2.6.2" -"@smithy/core@^2.2.1": - version "2.2.4" - resolved "https://registry.yarnpkg.com/@smithy/core/-/core-2.2.4.tgz#a83d62fc685ff95ad3133d55d7e365a51526a436" - integrity sha512-qdY3LpMOUyLM/gfjjMQZui+UTNS7kBRDWlvyIhVOql5dn2J3isk9qUTBtQ1CbDH8MTugHis1zu3h4rH+Qmmh4g== - dependencies: - "@smithy/middleware-endpoint" "^3.0.4" - "@smithy/middleware-retry" "^3.0.7" - "@smithy/middleware-serde" "^3.0.3" - "@smithy/protocol-http" "^4.0.3" - "@smithy/smithy-client" "^3.1.5" - "@smithy/types" "^3.3.0" - "@smithy/util-middleware" "^3.0.3" +"@smithy/core@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@smithy/core/-/core-2.0.1.tgz#8a7ac8faa0227912ce260bc3f976a5e254323920" + integrity sha512-rcMkjvwxH/bER+oZUPR0yTA0ELD6m3A+d92+CFkdF6HJFCBB1bXo7P5pm21L66XwTN01B6bUhSCQ7cymWRD8zg== + dependencies: + "@smithy/middleware-endpoint" "^3.0.0" + "@smithy/middleware-retry" "^3.0.1" + "@smithy/middleware-serde" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/smithy-client" "^3.0.1" + "@smithy/types" "^3.0.0" + "@smithy/util-middleware" "^3.0.0" tslib "^2.6.2" -"@smithy/credential-provider-imds@^3.1.1", "@smithy/credential-provider-imds@^3.1.3": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@smithy/credential-provider-imds/-/credential-provider-imds-3.1.3.tgz#43e6c2d1e3df6bb6bb28bfae6b99c5a4d93bda09" - integrity sha512-U1Yrv6hx/mRK6k8AncuI6jLUx9rn0VVSd9NPEX6pyYFBfkSkChOc/n4zUb8alHUVg83TbI4OdZVo1X0Zfj3ijA== +"@smithy/credential-provider-imds@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/credential-provider-imds/-/credential-provider-imds-3.0.0.tgz#a290eb0224ef045742e5c806685cf63d44a084f3" + integrity sha512-lfmBiFQcA3FsDAPxNfY0L7CawcWtbyWsBOHo34nF095728JLkBX4Y9q/VPPE2r7fqMVK+drmDigqE2/SSQeVRA== dependencies: - "@smithy/node-config-provider" "^3.1.3" - "@smithy/property-provider" "^3.1.3" - "@smithy/types" "^3.3.0" - "@smithy/url-parser" "^3.0.3" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/property-provider" "^3.0.0" + "@smithy/types" "^3.0.0" + "@smithy/url-parser" "^3.0.0" tslib "^2.6.2" -"@smithy/eventstream-codec@^3.1.2": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-codec/-/eventstream-codec-3.1.2.tgz#4a1c72b34400631b829241151984a1ad8c4f963c" - integrity sha512-0mBcu49JWt4MXhrhRAlxASNy0IjDRFU+aWNDRal9OtUJvJNiwDuyKMUONSOjLjSCeGwZaE0wOErdqULer8r7yw== +"@smithy/eventstream-codec@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-codec/-/eventstream-codec-3.0.0.tgz#81d30391220f73d41f432f65384b606d67673e46" + integrity sha512-PUtyEA0Oik50SaEFCZ0WPVtF9tz/teze2fDptW6WRXl+RrEenH8UbEjudOz8iakiMl3lE3lCVqYf2Y+znL8QFQ== dependencies: - "@aws-crypto/crc32" "5.2.0" - "@smithy/types" "^3.3.0" + "@aws-crypto/crc32" "3.0.0" + "@smithy/types" "^3.0.0" "@smithy/util-hex-encoding" "^3.0.0" tslib "^2.6.2" -"@smithy/eventstream-serde-browser@^3.0.2": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-3.0.4.tgz#98d6e7ae60d297e37ee7775af2a7a8bbe574579d" - integrity sha512-Eo4anLZX6ltGJTZ5yJMc80gZPYYwBn44g0h7oFq6et+TYr5dUsTpIcDbz2evsOKIZhZ7zBoFWHtBXQ4QQeb5xA== +"@smithy/eventstream-serde-browser@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-3.0.0.tgz#94721b01f01d8b7eb1db5814275a774ed4d38190" + integrity sha512-NB7AFiPN4NxP/YCAnrvYR18z2/ZsiHiF7VtG30gshO9GbFrIb1rC8ep4NGpJSWrz6P64uhPXeo4M0UsCLnZKqw== dependencies: - "@smithy/eventstream-serde-universal" "^3.0.4" - "@smithy/types" "^3.3.0" + "@smithy/eventstream-serde-universal" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/eventstream-serde-config-resolver@^3.0.1": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-3.0.3.tgz#f852e096d0ad112363b4685e1d441088d1fce67a" - integrity sha512-NVTYjOuYpGfrN/VbRQgn31x73KDLfCXCsFdad8DiIc3IcdxL+dYA9zEQPyOP7Fy2QL8CPy2WE4WCUD+ZsLNfaQ== +"@smithy/eventstream-serde-config-resolver@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-3.0.0.tgz#420447d1d284d41f7f070a5d92fc3686cc922581" + integrity sha512-RUQG3vQ3LX7peqqHAbmayhgrF5aTilPnazinaSGF1P0+tgM3vvIRWPHmlLIz2qFqB9LqFIxditxc8O2Z6psrRw== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/eventstream-serde-node@^3.0.2": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-node/-/eventstream-serde-node-3.0.4.tgz#6301752ca51b3ebabcd2dec112f1dacd990de4c1" - integrity sha512-mjlG0OzGAYuUpdUpflfb9zyLrBGgmQmrobNT8b42ZTsGv/J03+t24uhhtVEKG/b2jFtPIHF74Bq+VUtbzEKOKg== +"@smithy/eventstream-serde-node@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-node/-/eventstream-serde-node-3.0.0.tgz#6519523fbb429307be29b151b8ba35bcca2b6e64" + integrity sha512-baRPdMBDMBExZXIUAoPGm/hntixjt/VFpU6+VmCyiYJYzRHRxoaI1MN+5XE+hIS8AJ2GCHLMFEIOLzq9xx1EgQ== dependencies: - "@smithy/eventstream-serde-universal" "^3.0.4" - "@smithy/types" "^3.3.0" + "@smithy/eventstream-serde-universal" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/eventstream-serde-universal@^3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-3.0.4.tgz#6754de5b94bdc286d8ef1d6bcf22d80f6ab68f30" - integrity sha512-Od9dv8zh3PgOD7Vj4T3HSuox16n0VG8jJIM2gvKASL6aCtcS8CfHZDWe1Ik3ZXW6xBouU+45Q5wgoliWDZiJ0A== +"@smithy/eventstream-serde-universal@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-3.0.0.tgz#cb8441a73fbde4cbaa68e4a21236f658d914a073" + integrity sha512-HNFfShmotWGeAoW4ujP8meV9BZavcpmerDbPIjkJbxKbN8RsUcpRQ/2OyIxWNxXNH2GWCAxuSB7ynmIGJlQ3Dw== dependencies: - "@smithy/eventstream-codec" "^3.1.2" - "@smithy/types" "^3.3.0" + "@smithy/eventstream-codec" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/fetch-http-handler@^3.0.2", "@smithy/fetch-http-handler@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.0.tgz#425ce7686bf20176b38f8013ed7fb28302a88929" - integrity sha512-vFvDxMrc6sO5Atec8PaISckMcAwsCrRhYxwUylg97bRT2KZoumOF7qk5+6EVUtuM1IG9AJV5aqXnHln9ZdXHpg== +"@smithy/fetch-http-handler@^3.0.0", "@smithy/fetch-http-handler@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-3.0.1.tgz#dacfdf6e70d639fac4a0f57c42ce13f0ed14ff22" + integrity sha512-uaH74i5BDj+rBwoQaXioKpI0SHBJFtOVwzrCpxZxphOW0ki5jhj7dXvDMYM2IJem8TpdFvS2iC08sjOblfFGFg== dependencies: - "@smithy/protocol-http" "^4.0.3" - "@smithy/querystring-builder" "^3.0.3" - "@smithy/types" "^3.3.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/querystring-builder" "^3.0.0" + "@smithy/types" "^3.0.0" "@smithy/util-base64" "^3.0.0" tslib "^2.6.2" -"@smithy/hash-blob-browser@^3.1.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@smithy/hash-blob-browser/-/hash-blob-browser-3.1.2.tgz#90281c1f183d93686fb4f26107f1819644d68829" - integrity sha512-hAbfqN2UbISltakCC2TP0kx4LqXBttEv2MqSPE98gVuDFMf05lU+TpC41QtqGP3Ff5A3GwZMPfKnEy0VmEUpmg== +"@smithy/hash-blob-browser@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/hash-blob-browser/-/hash-blob-browser-3.0.0.tgz#63ef4c98f74c53cbcad8ec73387c68ec4708f55b" + integrity sha512-/Wbpdg+bwJvW7lxR/zpWAc1/x/YkcqguuF2bAzkJrvXriZu1vm8r+PUdE4syiVwQg7PPR2dXpi3CLBb9qRDaVQ== dependencies: "@smithy/chunked-blob-reader" "^3.0.0" "@smithy/chunked-blob-reader-native" "^3.0.0" - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/hash-node@^3.0.1": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-3.0.3.tgz#82c5cb7b0f1a29ee7319081853d2d158c07dff24" - integrity sha512-2ctBXpPMG+B3BtWSGNnKELJ7SH9e4TNefJS0cd2eSkOOROeBnnVBnAy9LtJ8tY4vUEoe55N4CNPxzbWvR39iBw== +"@smithy/hash-node@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-3.0.0.tgz#f44b5fff193e241c1cdcc957b296b60f186f0e59" + integrity sha512-84qXstNemP3XS5jcof0el6+bDfjzuvhJPQTEfro3lgtbCtKgzPm3MgiS6ehXVPjeQ5+JS0HqmTz8f/RYfzHVxw== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" "@smithy/util-buffer-from" "^3.0.0" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/hash-stream-node@^3.1.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@smithy/hash-stream-node/-/hash-stream-node-3.1.2.tgz#89f0290ae44b113863878e75b10c484ff48af71c" - integrity sha512-PBgDMeEdDzi6JxKwbfBtwQG9eT9cVwsf0dZzLXoJF4sHKHs5HEo/3lJWpn6jibfJwT34I1EBXpBnZE8AxAft6g== +"@smithy/hash-stream-node@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/hash-stream-node/-/hash-stream-node-3.0.0.tgz#b395a8a0d2427e4a8effc56135b37cb299339f8f" + integrity sha512-J0i7de+EgXDEGITD4fxzmMX8CyCNETTIRXlxjMiNUvvu76Xn3GJ31wQR85ynlPk2wI1lqoknAFJaD1fiNDlbIA== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/invalid-dependency@^3.0.1": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-3.0.3.tgz#8d9fd70e3a94b565a4eba4ffbdc95238e1930528" - integrity sha512-ID1eL/zpDULmHJbflb864k72/SNOZCADRc9i7Exq3RUNJw6raWUSlFEQ+3PX3EYs++bTxZB2dE9mEHTQLv61tw== - dependencies: - "@smithy/types" "^3.3.0" - tslib "^2.6.2" - -"@smithy/is-array-buffer@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz#f84f0d9f9a36601a9ca9381688bd1b726fd39111" - integrity sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA== +"@smithy/invalid-dependency@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-3.0.0.tgz#21cb6b5203ee15321bfcc751f21f7a19536d4ae8" + integrity sha512-F6wBBaEFgJzj0s4KUlliIGPmqXemwP6EavgvDqYwCH40O5Xr2iMHvS8todmGVZtuJCorBkXsYLyTu4PuizVq5g== dependencies: + "@smithy/types" "^3.0.0" tslib "^2.6.2" "@smithy/is-array-buffer@^3.0.0": @@ -2223,176 +1974,176 @@ dependencies: tslib "^2.6.2" -"@smithy/md5-js@^3.0.1": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/md5-js/-/md5-js-3.0.3.tgz#55ee40aa24075b096c39f7910590c18ff7660c98" - integrity sha512-O/SAkGVwpWmelpj/8yDtsaVe6sINHLB1q8YE/+ZQbDxIw3SRLbTZuRaI10K12sVoENdnHqzPp5i3/H+BcZ3m3Q== +"@smithy/md5-js@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/md5-js/-/md5-js-3.0.0.tgz#6a2d1c496f4d4476a0fc84f7724d79b234c3eb13" + integrity sha512-Tm0vrrVzjlD+6RCQTx7D3Ls58S3FUH1ZCtU1MIh/qQmaOo1H9lMN2as6CikcEwgattnA9SURSdoJJ27xMcEfMA== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/middleware-content-length@^3.0.1": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-3.0.3.tgz#426a7f907cc3c0a5d81deb84e16d38303e5a9ad8" - integrity sha512-Dbz2bzexReYIQDWMr+gZhpwBetNXzbhnEMhYKA6urqmojO14CsXjnsoPYO8UL/xxcawn8ZsuVU61ElkLSltIUQ== +"@smithy/middleware-content-length@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-3.0.0.tgz#084b3d22248967885d496eb0b105d9090e8ababd" + integrity sha512-3C4s4d/iGobgCtk2tnWW6+zSTOBg1PRAm2vtWZLdriwTroFbbWNSr3lcyzHdrQHnEXYCC5K52EbpfodaIUY8sg== dependencies: - "@smithy/protocol-http" "^4.0.3" - "@smithy/types" "^3.3.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/middleware-endpoint@^3.0.2", "@smithy/middleware-endpoint@^3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-3.0.4.tgz#c18518b21c80887c16fb595b156c7c009b0b64ca" - integrity sha512-whUJMEPwl3ANIbXjBXZVdJNgfV2ZU8ayln7xUM47rXL2txuenI7jQ/VFFwCzy5lCmXScjp6zYtptW5Evud8e9g== - dependencies: - "@smithy/middleware-serde" "^3.0.3" - "@smithy/node-config-provider" "^3.1.3" - "@smithy/shared-ini-file-loader" "^3.1.3" - "@smithy/types" "^3.3.0" - "@smithy/url-parser" "^3.0.3" - "@smithy/util-middleware" "^3.0.3" +"@smithy/middleware-endpoint@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-3.0.0.tgz#54c9e1bd8f35b7d004c803eaf3702e61e32b8295" + integrity sha512-aXOAWztw/5qAfp0NcA2OWpv6ZI/E+Dh9mByif7i91D/0iyYNUcKvskmXiowKESFkuZ7PIMd3VOR4fTibZDs2OQ== + dependencies: + "@smithy/middleware-serde" "^3.0.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/shared-ini-file-loader" "^3.0.0" + "@smithy/types" "^3.0.0" + "@smithy/url-parser" "^3.0.0" + "@smithy/util-middleware" "^3.0.0" tslib "^2.6.2" -"@smithy/middleware-retry@^3.0.4", "@smithy/middleware-retry@^3.0.7": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-3.0.7.tgz#b42d90b3ecc392fdfeda1eff9dc7a023ba11d34b" - integrity sha512-f5q7Y09G+2h5ivkSx5CHvlAT4qRR3jBFEsfXyQ9nFNiWQlr8c48blnu5cmbTQ+p1xmIO14UXzKoF8d7Tm0Gsjw== - dependencies: - "@smithy/node-config-provider" "^3.1.3" - "@smithy/protocol-http" "^4.0.3" - "@smithy/service-error-classification" "^3.0.3" - "@smithy/smithy-client" "^3.1.5" - "@smithy/types" "^3.3.0" - "@smithy/util-middleware" "^3.0.3" - "@smithy/util-retry" "^3.0.3" +"@smithy/middleware-retry@^3.0.0", "@smithy/middleware-retry@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-3.0.1.tgz#167b75e9b79395f11a799f22030eaaf7d40da410" + integrity sha512-hBhSEuL841FhJBK/19WpaGk5YWSzFk/P2UaVjANGKRv3eYNO8Y1lANWgqnuPWjOyCEWMPr58vELFDWpxvRKANw== + dependencies: + "@smithy/node-config-provider" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/service-error-classification" "^3.0.0" + "@smithy/smithy-client" "^3.0.1" + "@smithy/types" "^3.0.0" + "@smithy/util-middleware" "^3.0.0" + "@smithy/util-retry" "^3.0.0" tslib "^2.6.2" uuid "^9.0.1" -"@smithy/middleware-serde@^3.0.1", "@smithy/middleware-serde@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-3.0.3.tgz#74d974460f74d99f38c861e6862984543a880a66" - integrity sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA== +"@smithy/middleware-serde@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-3.0.0.tgz#786da6a6bc0e5e51d669dac834c19965245dd302" + integrity sha512-I1vKG1foI+oPgG9r7IMY1S+xBnmAn1ISqployvqkwHoSb8VPsngHDTOgYGYBonuOKndaWRUGJZrKYYLB+Ane6w== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/middleware-stack@^3.0.1", "@smithy/middleware-stack@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-3.0.3.tgz#91845c7e61e6f137fa912b623b6def719a4f6ce7" - integrity sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA== +"@smithy/middleware-stack@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-3.0.0.tgz#00f112bae7af5fc3bd37d4fab95ebce0f17a7774" + integrity sha512-+H0jmyfAyHRFXm6wunskuNAqtj7yfmwFB6Fp37enytp2q047/Od9xetEaUbluyImOlGnGpaVGaVfjwawSr+i6Q== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/node-config-provider@^3.1.1", "@smithy/node-config-provider@^3.1.3": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-3.1.3.tgz#e8e69d0df5be9d6ed3f3a84f51fd2176f09c7ab8" - integrity sha512-rxdpAZczzholz6CYZxtqDu/aKTxATD5DAUDVj7HoEulq+pDSQVWzbg0btZDlxeFfa6bb2b5tUvgdX5+k8jUqcg== +"@smithy/node-config-provider@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-3.0.0.tgz#4cd5dcf6132c75d6a582fcd6243482dac703865a" + integrity sha512-buqfaSdDh0zo62EPLf8rGDvcpKwGpO5ho4bXS2cdFhlOta7tBkWJt+O5uiaAeICfIOfPclNOndshDNSanX2X9g== dependencies: - "@smithy/property-provider" "^3.1.3" - "@smithy/shared-ini-file-loader" "^3.1.3" - "@smithy/types" "^3.3.0" + "@smithy/property-provider" "^3.0.0" + "@smithy/shared-ini-file-loader" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/node-http-handler@^3.0.1", "@smithy/node-http-handler@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-3.1.1.tgz#9213d9b5139c9f9c5a1928e1574de767a979bf94" - integrity sha512-L71NLyPeP450r2J/mfu1jMc//Z1YnqJt2eSNw7uhiItaONnBLDA68J5jgxq8+MBDsYnFwNAIc7dBG1ImiWBiwg== +"@smithy/node-http-handler@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-3.0.0.tgz#e771ea95d03e259f04b7b37e8aece8a4fffc8cdc" + integrity sha512-3trD4r7NOMygwLbUJo4eodyQuypAWr7uvPnebNJ9a70dQhVn+US8j/lCnvoJS6BXfZeF7PkkkI0DemVJw+n+eQ== dependencies: - "@smithy/abort-controller" "^3.1.1" - "@smithy/protocol-http" "^4.0.3" - "@smithy/querystring-builder" "^3.0.3" - "@smithy/types" "^3.3.0" + "@smithy/abort-controller" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/querystring-builder" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/property-provider@^3.1.1", "@smithy/property-provider@^3.1.3": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-3.1.3.tgz#afd57ea82a3f6c79fbda95e3cb85c0ee0a79f39a" - integrity sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g== +"@smithy/property-provider@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-3.0.0.tgz#ef7a26557c855cc1471b9aa0e05529183e99b978" + integrity sha512-LmbPgHBswdXCrkWWuUwBm9w72S2iLWyC/5jet9/Y9cGHtzqxi+GVjfCfahkvNV4KXEwgnH8EMpcrD9RUYe0eLQ== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/protocol-http@^4.0.1", "@smithy/protocol-http@^4.0.3": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-4.0.3.tgz#acf16058504e3cce2dbe8abf94f7b544cd09d3f4" - integrity sha512-x5jmrCWwQlx+Zv4jAtc33ijJ+vqqYN+c/ZkrnpvEe/uDas7AT7A/4Rc2CdfxgWv4WFGmEqODIrrUToPN6DDkGw== +"@smithy/protocol-http@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-4.0.0.tgz#04df3b5674b540323f678e7c4113e8abd8b26432" + integrity sha512-qOQZOEI2XLWRWBO9AgIYuHuqjZ2csyr8/IlgFDHDNuIgLAMRx2Bl8ck5U5D6Vh9DPdoaVpuzwWMa0xcdL4O/AQ== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/querystring-builder@^3.0.1", "@smithy/querystring-builder@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz#6b0e566f885bb84938d077c69e8f8555f686af13" - integrity sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw== +"@smithy/querystring-builder@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-3.0.0.tgz#48a9aa7b700e8409368c21bc0adf7564e001daea" + integrity sha512-bW8Fi0NzyfkE0TmQphDXr1AmBDbK01cA4C1Z7ggwMAU5RDz5AAv/KmoRwzQAS0kxXNf/D2ALTEgwK0U2c4LtRg== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" "@smithy/util-uri-escape" "^3.0.0" tslib "^2.6.2" -"@smithy/querystring-parser@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-3.0.3.tgz#272a6b83f88dfcbbec8283d72a6bde850cc00091" - integrity sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ== +"@smithy/querystring-parser@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-3.0.0.tgz#fa1ed0cee408cd4d622070fa874bc50ac1a379b7" + integrity sha512-UzHwthk0UEccV4dHzPySnBy34AWw3V9lIqUTxmozQ+wPDAO9csCWMfOLe7V9A2agNYy7xE+Pb0S6K/J23JSzfQ== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/service-error-classification@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-3.0.3.tgz#73484255060a094aa9372f6cd972dcaf97e3ce80" - integrity sha512-Jn39sSl8cim/VlkLsUhRFq/dKDnRUFlfRkvhOJaUbLBXUsLRLNf9WaxDv/z9BjuQ3A6k/qE8af1lsqcwm7+DaQ== +"@smithy/service-error-classification@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-3.0.0.tgz#06a45cb91b15b8b0d5f3b1df2b3743d2ca42f5c4" + integrity sha512-3BsBtOUt2Gsnc3X23ew+r2M71WwtpHfEDGhHYHSDg6q1t8FrWh15jT25DLajFV1H+PpxAJ6gqe9yYeRUsmSdFA== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" -"@smithy/shared-ini-file-loader@^3.1.1", "@smithy/shared-ini-file-loader@^3.1.3": - version "3.1.3" - resolved "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.3.tgz#49a5e0e8cd98d219e7e56860586710b146d52ade" - integrity sha512-Z8Y3+08vgoDgl4HENqNnnzSISAaGrF2RoKupoC47u2wiMp+Z8P/8mDh1CL8+8ujfi2U5naNvopSBmP/BUj8b5w== +"@smithy/shared-ini-file-loader@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.0.0.tgz#8739b7cd24f55fb4e276a74f00f0c2bb4e3f25d8" + integrity sha512-REVw6XauXk8xE4zo5aGL7Rz4ywA8qNMUn8RtWeTRQsgAlmlvbJ7CEPBcaXU2NDC3AYBgYAXrGyWD8XrN8UGDog== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/signature-v4@^3.1.0": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-3.1.2.tgz#63fc0d4f9a955e902138fb0a57fafc96b9d4e8bb" - integrity sha512-3BcPylEsYtD0esM4Hoyml/+s7WP2LFhcM3J2AGdcL2vx9O60TtfpDOL72gjb4lU8NeRPeKAwR77YNyyGvMbuEA== +"@smithy/signature-v4@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-3.0.0.tgz#f536d0abebfeeca8e9aab846a4042658ca07d3b7" + integrity sha512-kXFOkNX+BQHe2qnLxpMEaCRGap9J6tUGLzc3A9jdn+nD4JdMwCKTJ+zFwQ20GkY+mAXGatyTw3HcoUlR39HwmA== dependencies: "@smithy/is-array-buffer" "^3.0.0" - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" "@smithy/util-hex-encoding" "^3.0.0" - "@smithy/util-middleware" "^3.0.3" + "@smithy/util-middleware" "^3.0.0" "@smithy/util-uri-escape" "^3.0.0" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" -"@smithy/smithy-client@^3.1.2", "@smithy/smithy-client@^3.1.5": - version "3.1.5" - resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-3.1.5.tgz#3956f0b511c3a51f859c45eb11bfd70ae00c5fec" - integrity sha512-x9bL9Mx2CT2P1OiUlHM+ZNpbVU6TgT32f9CmTRzqIHA7M4vYrROCWEoC3o4xHNJASoGd4Opos3cXYPgh+/m4Ww== - dependencies: - "@smithy/middleware-endpoint" "^3.0.4" - "@smithy/middleware-stack" "^3.0.3" - "@smithy/protocol-http" "^4.0.3" - "@smithy/types" "^3.3.0" - "@smithy/util-stream" "^3.0.5" +"@smithy/smithy-client@^3.0.0", "@smithy/smithy-client@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-3.0.1.tgz#c440473f6fb5dfbe86eaf015565fc56f66533bb4" + integrity sha512-KAiFY4Y4jdHxR+4zerH/VBhaFKM8pbaVmJZ/CWJRwtM/CmwzTfXfvYwf6GoUwiHepdv+lwiOXCuOl6UBDUEINw== + dependencies: + "@smithy/middleware-endpoint" "^3.0.0" + "@smithy/middleware-stack" "^3.0.0" + "@smithy/protocol-http" "^4.0.0" + "@smithy/types" "^3.0.0" + "@smithy/util-stream" "^3.0.1" tslib "^2.6.2" -"@smithy/types@^3.1.0", "@smithy/types@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@smithy/types/-/types-3.3.0.tgz#fae037c733d09bc758946a01a3de0ef6e210b16b" - integrity sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA== +"@smithy/types@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/types/-/types-3.0.0.tgz#00231052945159c64ffd8b91e8909d8d3006cb7e" + integrity sha512-VvWuQk2RKFuOr98gFhjca7fkBS+xLLURT8bUjk5XQoV0ZLm7WPwWPPY3/AwzTLuUBDeoKDCthfe1AsTUWaSEhw== dependencies: tslib "^2.6.2" -"@smithy/url-parser@^3.0.1", "@smithy/url-parser@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-3.0.3.tgz#e8a060d9810b24b1870385fc2b02485b8a6c5955" - integrity sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A== +"@smithy/url-parser@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-3.0.0.tgz#5fdc77cd22051c1aac6531be0315bfcba0fa705d" + integrity sha512-2XLazFgUu+YOGHtWihB3FSLAfCUajVfNBXGGYjOaVKjLAuAxx3pSBY3hBgLzIgB17haf59gOG3imKqTy8mcrjw== dependencies: - "@smithy/querystring-parser" "^3.0.3" - "@smithy/types" "^3.3.0" + "@smithy/querystring-parser" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" "@smithy/util-base64@^3.0.0": @@ -2418,14 +2169,6 @@ dependencies: tslib "^2.6.2" -"@smithy/util-buffer-from@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz#6fc88585165ec73f8681d426d96de5d402021e4b" - integrity sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA== - dependencies: - "@smithy/is-array-buffer" "^2.2.0" - tslib "^2.6.2" - "@smithy/util-buffer-from@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz#559fc1c86138a89b2edaefc1e6677780c24594e3" @@ -2441,37 +2184,37 @@ dependencies: tslib "^2.6.2" -"@smithy/util-defaults-mode-browser@^3.0.4": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.7.tgz#5868ae56c9ae4a3532c175f9c0ee281a41065215" - integrity sha512-Q2txLyvQyGfmjsaDbVV7Sg8psefpFcrnlGapDzXGFRPFKRBeEg6OvFK8FljqjeHSaCZ6/UuzQExUPqBR/2qlDA== +"@smithy/util-defaults-mode-browser@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.1.tgz#0ba33ec90f6dd311599bed3a3dd604f3adba9acd" + integrity sha512-nW5kEzdJn1Bn5TF+gOPHh2rcPli8JU9vSSXLbfg7uPnfR1TMRQqs9zlYRhIb87NeSxIbpdXOI94tvXSy+fvDYg== dependencies: - "@smithy/property-provider" "^3.1.3" - "@smithy/smithy-client" "^3.1.5" - "@smithy/types" "^3.3.0" + "@smithy/property-provider" "^3.0.0" + "@smithy/smithy-client" "^3.0.1" + "@smithy/types" "^3.0.0" bowser "^2.11.0" tslib "^2.6.2" -"@smithy/util-defaults-mode-node@^3.0.4": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.7.tgz#e802ca57df6b8543dc288524d3894a6c357b51fc" - integrity sha512-F4Qcj1fG6MGi2BSWCslfsMSwllws/WzYONBGtLybyY+halAcXdWhcew+mej8M5SKd5hqPYp4f7b+ABQEaeytgg== - dependencies: - "@smithy/config-resolver" "^3.0.4" - "@smithy/credential-provider-imds" "^3.1.3" - "@smithy/node-config-provider" "^3.1.3" - "@smithy/property-provider" "^3.1.3" - "@smithy/smithy-client" "^3.1.5" - "@smithy/types" "^3.3.0" +"@smithy/util-defaults-mode-node@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.1.tgz#71242a6978240a6f559445d4cc26f2cce91c90e1" + integrity sha512-TFk+Qb+elLc/MOhtSp+50fstyfZ6avQbgH2d96xUBpeScu+Al9elxv+UFAjaTHe0HQe5n+wem8ZLpXvU8lwV6Q== + dependencies: + "@smithy/config-resolver" "^3.0.0" + "@smithy/credential-provider-imds" "^3.0.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/property-provider" "^3.0.0" + "@smithy/smithy-client" "^3.0.1" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/util-endpoints@^2.0.2": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@smithy/util-endpoints/-/util-endpoints-2.0.4.tgz#0cfb01deb42ec5cd819b54e85acb2c32e4ba4385" - integrity sha512-ZAtNf+vXAsgzgRutDDiklU09ZzZiiV/nATyqde4Um4priTmasDH+eLpp3tspL0hS2dEootyFMhu1Y6Y+tzpWBQ== +"@smithy/util-endpoints@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@smithy/util-endpoints/-/util-endpoints-2.0.0.tgz#5a16a723c1220f536a9b1b3e01787e69e77b6f12" + integrity sha512-+exaXzEY3DNt2qtA2OtRNSDlVrE4p32j1JSsQkzA5AdP0YtJNjkYbYhJxkFmPYcjI1abuwopOZCwUmv682QkiQ== dependencies: - "@smithy/node-config-provider" "^3.1.3" - "@smithy/types" "^3.3.0" + "@smithy/node-config-provider" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" "@smithy/util-hex-encoding@^3.0.0": @@ -2481,31 +2224,31 @@ dependencies: tslib "^2.6.2" -"@smithy/util-middleware@^3.0.1", "@smithy/util-middleware@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-3.0.3.tgz#07bf9602682f5a6c55bc2f0384303f85fc68c87e" - integrity sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw== +"@smithy/util-middleware@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-3.0.0.tgz#64d775628b99a495ca83ce982f5c83aa45f1e894" + integrity sha512-q5ITdOnV2pXHSVDnKWrwgSNTDBAMHLptFE07ua/5Ty5WJ11bvr0vk2a7agu7qRhrCFRQlno5u3CneU5EELK+DQ== dependencies: - "@smithy/types" "^3.3.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/util-retry@^3.0.1", "@smithy/util-retry@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-3.0.3.tgz#9b2ac0dbb1c81f69812a8affa4d772bebfc0e049" - integrity sha512-AFw+hjpbtVApzpNDhbjNG5NA3kyoMs7vx0gsgmlJF4s+yz1Zlepde7J58zpIRIsdjc+emhpAITxA88qLkPF26w== +"@smithy/util-retry@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-3.0.0.tgz#8a0c47496aab74e1dfde4905d462ad636a8824bb" + integrity sha512-nK99bvJiziGv/UOKJlDvFF45F00WgPLKVIGUfAK+mDhzVN2hb/S33uW2Tlhg5PVBoqY7tDVqL0zmu4OxAHgo9g== dependencies: - "@smithy/service-error-classification" "^3.0.3" - "@smithy/types" "^3.3.0" + "@smithy/service-error-classification" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" -"@smithy/util-stream@^3.0.2", "@smithy/util-stream@^3.0.5": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-3.0.5.tgz#8ca98441e1deedfc4ec8d3fee9aa4342fdbc484f" - integrity sha512-xC3L5PKMAT/Bh8fmHNXP9sdQ4+4aKVUU3EEJ2CF/lLk7R+wtMJM+v/1B4en7jO++Wa5spGzFDBCl0QxgbUc5Ug== +"@smithy/util-stream@^3.0.0", "@smithy/util-stream@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-3.0.1.tgz#3cf527bcd3fec82c231c38d47dd75f3364747edb" + integrity sha512-7F7VNNhAsfMRA8I986YdOY5fE0/T1/ZjFF6OLsqkvQVNP3vZ/szYDfGCyphb7ioA09r32K/0qbSFfNFU68aSzA== dependencies: - "@smithy/fetch-http-handler" "^3.2.0" - "@smithy/node-http-handler" "^3.1.1" - "@smithy/types" "^3.3.0" + "@smithy/fetch-http-handler" "^3.0.1" + "@smithy/node-http-handler" "^3.0.0" + "@smithy/types" "^3.0.0" "@smithy/util-base64" "^3.0.0" "@smithy/util-buffer-from" "^3.0.0" "@smithy/util-hex-encoding" "^3.0.0" @@ -2519,14 +2262,6 @@ dependencies: tslib "^2.6.2" -"@smithy/util-utf8@^2.0.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@smithy/util-utf8/-/util-utf8-2.3.0.tgz#dd96d7640363259924a214313c3cf16e7dd329c5" - integrity sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A== - dependencies: - "@smithy/util-buffer-from" "^2.2.0" - tslib "^2.6.2" - "@smithy/util-utf8@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@smithy/util-utf8/-/util-utf8-3.0.0.tgz#1a6a823d47cbec1fd6933e5fc87df975286d9d6a" @@ -2535,13 +2270,13 @@ "@smithy/util-buffer-from" "^3.0.0" tslib "^2.6.2" -"@smithy/util-waiter@^3.0.1": - version "3.1.2" - resolved "https://registry.yarnpkg.com/@smithy/util-waiter/-/util-waiter-3.1.2.tgz#2d40c3312f3537feee763459a19acafab4c75cf3" - integrity sha512-4pP0EV3iTsexDx+8PPGAKCQpd/6hsQBaQhqWzU4hqKPHN5epPsxKbvUTIiYIHTxaKt6/kEaqPBpu/ufvfbrRzw== +"@smithy/util-waiter@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@smithy/util-waiter/-/util-waiter-3.0.0.tgz#26bcc5bbbf1de9360a7aeb3b3919926fc6afa2bc" + integrity sha512-+fEXJxGDLCoqRKVSmo0auGxaqbiCo+8oph+4auefYjaNxjOLKSY2MxVQfRzo65PaZv4fr+5lWg+au7vSuJJ/zw== dependencies: - "@smithy/abort-controller" "^3.1.1" - "@smithy/types" "^3.3.0" + "@smithy/abort-controller" "^3.0.0" + "@smithy/types" "^3.0.0" tslib "^2.6.2" "@szmarczak/http-timer@^4.0.5": @@ -2556,6 +2291,26 @@ resolved "https://registry.yarnpkg.com/@tokenizer/token/-/token-0.3.0.tgz#fe98a93fe789247e998c75e74e9c7c63217aa276" integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A== +"@tsconfig/node10@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" + integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + "@types/babel__core@^7.1.14": version "7.20.5" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" @@ -2583,9 +2338,9 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.20.6" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.6.tgz#8dc9f0ae0f202c08d8d4dab648912c8d6038e3f7" - integrity sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg== + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.5.tgz#7b7502be0aa80cc4ef22978846b983edaafcd4dd" + integrity sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ== dependencies: "@babel/types" "^7.20.7" @@ -2636,9 +2391,9 @@ integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== "@types/express-serve-static-core@^4.17.33": - version "4.19.5" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz#218064e321126fcf9048d1ca25dd2465da55d9c6" - integrity sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg== + version "4.19.0" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.0.tgz#3ae8ab3767d98d0b682cda063c3339e1e86ccfaa" + integrity sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ== dependencies: "@types/node" "*" "@types/qs" "*" @@ -2711,9 +2466,9 @@ "@types/node" "*" "@types/lodash@^4.14.123": - version "4.17.6" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.6.tgz#193ced6a40c8006cfc1ca3f4553444fb38f0e543" - integrity sha512-OpXEVoCKSS3lQqjx9GGGOapBeuW5eUboYHRlHP9urXPX25IKZ6AnP5ZRxtVf63iieUbsHxLn8NQ5Nlftc6yzAA== + version "4.17.1" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.1.tgz#0fabfcf2f2127ef73b119d98452bd317c4a17eb8" + integrity sha512-X+2qazGS3jxLAIz5JDXDzglAF3KpijdhFxlf/V1+hEsOUc+HnWi81L/uv/EvGuV90WY+7mPGFCUDGfQC3Gj95Q== "@types/mime@^1": version "1.3.5" @@ -2721,9 +2476,9 @@ integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== "@types/node@*": - version "20.14.9" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.9.tgz#12e8e765ab27f8c421a1820c99f5f313a933b420" - integrity sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg== + version "20.12.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.12.tgz#7cbecdf902085cec634fdb362172dfe12b8f2050" + integrity sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw== dependencies: undici-types "~5.26.4" @@ -2962,20 +2717,25 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" -acorn-import-attributes@^1.9.5: - version "1.9.5" - resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" - integrity sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ== +acorn-import-assertions@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" + integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== + +acorn-walk@^8.1.1: + version "8.3.2" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" + integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== -acorn@^8.7.1, acorn@^8.8.2: - version "8.12.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.0.tgz#1627bfa2e058148036133b8d9b51a700663c294c" - integrity sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw== +acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.2: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== adm-zip@^0.5.5: - version "0.5.14" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.14.tgz#2c557c0bf12af4311cf6d32970f4060cf8133b2a" - integrity sha512-DnyqqifT4Jrcvb8USYjp6FHtBpEIz1mnXu6pTRHZ0RL69LbQYiO+0lDFg5+OKA7U29oWSs3a/i8fhn8ZcceIWg== + version "0.5.12" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.12.tgz#87786328e91d54b37358d8a50f954c4cd73ba60b" + integrity sha512-6TVU49mK6KZb4qG6xWaaM4C7sA/sgUMLy/JYMOzkcp3BvVLpW0fXDFQiIzAuxFCt/2+xD7fNIiPFAoLZPhVNLQ== agent-base@6: version "6.0.2" @@ -3007,9 +2767,9 @@ ajv@^6.12.5: uri-js "^4.2.2" ajv@^8.0.0, ajv@^8.12.0: - version "8.16.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.16.0.tgz#22e2a92b94f005f7e0f9c9d39652ef0b8f6f0cb4" - integrity sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw== + version "8.13.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.13.0.tgz#a3939eaec9fb80d217ddf0c3376948c023f28c91" + integrity sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA== dependencies: fast-deep-equal "^3.1.3" json-schema-traverse "^1.0.0" @@ -3111,19 +2871,6 @@ archiver-utils@^3.0.4: normalize-path "^3.0.0" readable-stream "^3.6.0" -archiver-utils@^5.0.0, archiver-utils@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-5.0.2.tgz#63bc719d951803efc72cf961a56ef810760dd14d" - integrity sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA== - dependencies: - glob "^10.0.0" - graceful-fs "^4.2.0" - is-stream "^2.0.1" - lazystream "^1.0.0" - lodash "^4.17.15" - normalize-path "^3.0.0" - readable-stream "^4.0.0" - archiver@^5.3.0, archiver@^5.3.1: version "5.3.2" resolved "https://registry.yarnpkg.com/archiver/-/archiver-5.3.2.tgz#99991d5957e53bd0303a392979276ac4ddccf3b0" @@ -3137,18 +2884,10 @@ archiver@^5.3.0, archiver@^5.3.1: tar-stream "^2.2.0" zip-stream "^4.1.0" -archiver@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/archiver/-/archiver-7.0.1.tgz#c9d91c350362040b8927379c7aa69c0655122f61" - integrity sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ== - dependencies: - archiver-utils "^5.0.2" - async "^3.2.4" - buffer-crc32 "^1.0.0" - readable-stream "^4.0.0" - readdir-glob "^1.1.2" - tar-stream "^3.0.0" - zip-stream "^6.0.1" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== argparse@^1.0.7: version "1.0.10" @@ -3231,19 +2970,10 @@ available-typed-arrays@^1.0.7: dependencies: possible-typed-array-names "^1.0.0" -aws-sdk-mock@^5.4.0: - version "5.9.0" - resolved "https://registry.yarnpkg.com/aws-sdk-mock/-/aws-sdk-mock-5.9.0.tgz#80e5cdef33a8357899c77d1378316e9ed777b4fa" - integrity sha512-kTUXaQQ1CTn3Cwxa2g1XqtCDq+FTEbPl/zgaYCok357f7gbWkeYEegqa5RziTRb11oNIUHrLp9DSHwZT3XdBkA== - dependencies: - aws-sdk "^2.1231.0" - sinon "^17.0.0" - traverse "^0.6.6" - -aws-sdk@^2.1059.0, aws-sdk@^2.1231.0, aws-sdk@^2.1404.0: - version "2.1651.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1651.0.tgz#1b3cd731dbbfd08072793c5d3e480953b689c0eb" - integrity sha512-MZjQvvOPkKcx1N428ejUjqSfhm4TAIcgPIgpniiDMw1LjB1yA8JBZvrWer6J6MACAXQ99v0uKE4BSvtYn+AT3g== +aws-sdk@^2.1059.0, aws-sdk@^2.1404.0: + version "2.1620.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1620.0.tgz#712c72ccaca0c86e6c70f25eb5f6022f05249c57" + integrity sha512-G+mBI/VzuFpobBe+pu++ELc3YXSx2UzBTiLmQuZIQDi2+9VEU+/8QFAH45SI8PRPDRCcn4NMK4Euqs0uCyObvQ== dependencies: buffer "4.9.2" events "1.1.1" @@ -3257,19 +2987,14 @@ aws-sdk@^2.1059.0, aws-sdk@^2.1231.0, aws-sdk@^2.1404.0: xml2js "0.6.2" axios@^1.4.0, axios@^1.6.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621" - integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw== + version "1.6.8" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66" + integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" proxy-from-env "^1.1.0" -b4a@^1.6.4: - version "1.6.6" - resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.6.tgz#a4cc349a3851987c3c4ac2d7785c18744f6da9ba" - integrity sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg== - babel-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" @@ -3335,11 +3060,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -bare-events@^2.2.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.4.2.tgz#3140cca7a0e11d49b3edc5041ab560659fd8e1f8" - integrity sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q== - base64-js@^1.0.2, base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -3429,22 +3149,22 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" -braces@^3.0.3, braces@~3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" - integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: - fill-range "^7.1.1" + fill-range "^7.0.1" browserslist@^4.21.10, browserslist@^4.22.2: - version "4.23.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96" - integrity sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw== + version "4.23.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== dependencies: - caniuse-lite "^1.0.30001629" - electron-to-chromium "^1.4.796" + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" node-releases "^2.0.14" - update-browserslist-db "^1.0.16" + update-browserslist-db "^1.0.13" bser@2.1.1: version "2.1.1" @@ -3471,11 +3191,6 @@ buffer-crc32@^0.2.1, buffer-crc32@^0.2.13, buffer-crc32@~0.2.3: resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== -buffer-crc32@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-1.0.0.tgz#a10993b9055081d55304bd9feb4a072de179f405" - integrity sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w== - buffer-equal-constant-time@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" @@ -3590,10 +3305,10 @@ camelcase@^7.0.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-7.0.1.tgz#f02e50af9fd7782bc8b88a3558c32fd3a388f048" integrity sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw== -caniuse-lite@^1.0.30001629: - version "1.0.30001638" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001638.tgz#598e1f0c2ac36f37ebc3f5b8887a32ca558e5d56" - integrity sha512-5SuJUJ7cZnhPpeLHaH0c/HPAnAHZvS6ElWyHK9GSIbVOQABLzowiI2pjmpvZ1WEbkyz46iFd4UXlOHR5SqgfMQ== +caniuse-lite@^1.0.30001587: + version "1.0.30001618" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001618.tgz#fad74fa006aef0f01e8e5c0a5540c74d8d36ec6f" + integrity sha512-p407+D1tIkDvsEAPS22lJxLQQaG8OTBEqo0KhzfABGk0TU4juBNDSfH0hyAp/HRyx+M8L17z/ltyhxh27FTfQg== chainsaw@~0.1.0: version "0.1.0" @@ -3677,9 +3392,9 @@ chownr@^2.0.0: integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== chrome-trace-event@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz#05bffd7ff928465093314708c93bdfa9bd1f0f5b" - integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ== + version "1.0.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== ci-info@^3.2.0, ci-info@^3.8.0: version "3.9.0" @@ -3863,17 +3578,6 @@ compress-commons@^4.1.2: normalize-path "^3.0.0" readable-stream "^3.6.0" -compress-commons@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-6.0.2.tgz#26d31251a66b9d6ba23a84064ecd3a6a71d2609e" - integrity sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg== - dependencies: - crc-32 "^1.2.0" - crc32-stream "^6.0.0" - is-stream "^2.0.1" - normalize-path "^3.0.0" - readable-stream "^4.0.0" - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -3914,14 +3618,6 @@ crc32-stream@^4.0.2: crc-32 "^1.2.0" readable-stream "^3.4.0" -crc32-stream@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-6.0.0.tgz#8529a3868f8b27abb915f6c3617c0fadedbf9430" - integrity sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g== - dependencies: - crc-32 "^1.2.0" - readable-stream "^4.0.0" - create-jest@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" @@ -3935,6 +3631,11 @@ create-jest@^29.7.0: jest-util "^29.7.0" prompts "^2.0.1" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cron-parser@^4.2.0: version "4.9.0" resolved "https://registry.yarnpkg.com/cron-parser/-/cron-parser-4.9.0.tgz#0340694af3e46a0894978c6f52a6dbb5c0f11ad5" @@ -3953,7 +3654,7 @@ cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.0, cross-spawn@^7.0.3: +cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -3962,11 +3663,6 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crypto@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/crypto/-/crypto-1.0.1.tgz#2af1b7cad8175d24c8a1b0778255794a21803037" - integrity sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig== - d@1, d@^1.0.1, d@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/d/-/d-1.0.2.tgz#2aefd554b81981e7dccf72d6842ae725cb17e5de" @@ -4012,10 +3708,10 @@ dayjs@^1.11.8: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.11.tgz#dfe0e9d54c5f8b68ccf8ca5f72ac603e7e5ed59e" integrity sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg== -debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4, debug@^4.3.5: - version "4.3.5" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" - integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== +debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" @@ -4238,10 +3934,10 @@ diff-sequences@^29.6.3: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== -diff@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" - integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== dir-glob@^3.0.1: version "3.0.1" @@ -4287,10 +3983,10 @@ ecdsa-sig-formatter@1.0.11: dependencies: safe-buffer "^5.0.1" -electron-to-chromium@^1.4.796: - version "1.4.814" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.814.tgz#176535a0b899c9c473464502ab77576aa8bb1cbe" - integrity sha512-GVulpHjFu1Y9ZvikvbArHmAhZXtm3wHlpjTMcXNGKl4IQ4jMQjlnz8yMQYYqdLHKi/jEL2+CBC2akWVCoIGUdw== +electron-to-chromium@^1.4.668: + version "1.4.768" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.768.tgz#3795bd000ccb8978be1af2d06320b2dac810a372" + integrity sha512-z2U3QcvNuxdkk33YV7R1bVMNq7fL23vq3WfO5BHcqrm4TnDGReouBfYKLEFh5umoK1XACjEwp8mmnhXk2EJigw== emittery@^0.13.1: version "0.13.1" @@ -4319,10 +4015,10 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" -enhanced-resolve@^5.17.0: - version "5.17.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz#d037603789dd9555b89aaec7eb78845c49089bc5" - integrity sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA== +enhanced-resolve@^5.16.0: + version "5.16.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.1.tgz#e8bc63d51b826d6f1cbc0a150ecb5a8b0c62e567" + integrity sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -4399,9 +4095,9 @@ es-errors@^1.2.1, es-errors@^1.3.0: integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== es-module-lexer@^1.2.1: - version "1.5.4" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78" - integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw== + version "1.5.2" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.2.tgz#00b423304f2500ac59359cc9b6844951f372d497" + integrity sha512-l60ETUTmLqbVbVHv1J4/qj+M8nq7AwMzEcg3kmJDt9dCNrTk+yHcYFf/Kw75pMDwd9mPcIGCG5LcS20SxYRzFA== es-object-atoms@^1.0.0: version "1.0.0" @@ -4591,7 +4287,7 @@ events@1.1.1: resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" integrity sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw== -events@^3.2.0, events@^3.3.0: +events@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -4678,11 +4374,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-fifo@^1.2.0, fast-fifo@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" - integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== - fast-glob@^3.2.7, fast-glob@^3.2.9: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" @@ -4815,10 +4506,10 @@ filesize@^10.0.7: resolved "https://registry.yarnpkg.com/filesize/-/filesize-10.1.2.tgz#33bb71c5c134102499f1bc36e6f2863137f6cb0c" integrity sha512-Dx770ai81ohflojxhU+oG+Z2QGvKdYxgEr9OSA8UVrqhwNHjfH9A8f5NKfg83fEH8ZFA5N5llJo5T3PIoZ4CRA== -fill-range@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" - integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: to-regex-range "^5.0.1" @@ -4872,14 +4563,6 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" -foreground-child@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.2.1.tgz#767004ccf3a5b30df39bed90718bab43fe0a59f7" - integrity sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA== - dependencies: - cross-spawn "^7.0.0" - signal-exit "^4.0.1" - form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -4920,7 +4603,7 @@ fs-extra@^10.1.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^11.1.0, fs-extra@^11.2.0: +fs-extra@^11.1.0, fs-extra@^11.1.1: version "11.2.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== @@ -5079,18 +4762,6 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@^10.0.0: - version "10.4.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.2.tgz#bed6b95dade5c1f80b4434daced233aee76160e5" - integrity sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w== - dependencies: - foreground-child "^3.1.0" - jackspeak "^3.1.2" - minimatch "^9.0.4" - minipass "^7.1.2" - package-json-from-dist "^1.0.0" - path-scurry "^1.11.1" - glob@^7.0.5, glob@^7.1.3, glob@^7.1.4, glob@^7.2.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -5423,11 +5094,11 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== is-core-module@^2.13.0: - version "2.14.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.14.0.tgz#43b8ef9f46a6a08888db67b1ffd4ec9e3dfd59d1" - integrity sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A== + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== dependencies: - hasown "^2.0.2" + hasown "^2.0.0" is-data-view@^1.0.1: version "1.0.1" @@ -5534,7 +5205,7 @@ is-stream@^1.1.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ== -is-stream@^2.0.0, is-stream@^2.0.1: +is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== @@ -5662,15 +5333,6 @@ istanbul-reports@^3.1.3: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jackspeak@^3.1.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.0.tgz#a75763ff36ad778ede6a156d8ee8b124de445b4a" - integrity sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw== - dependencies: - "@isaacs/cliui" "^8.0.2" - optionalDependencies: - "@pkgjs/parseargs" "^0.11.0" - java-invoke-local@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/java-invoke-local/-/java-invoke-local-0.0.6.tgz#0e04b20b5e306a1e8384846a9ac286790ee6d868" @@ -6049,9 +5711,9 @@ jmespath@0.16.0: integrity sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw== jose@^4.11.2, jose@^4.14.6: - version "4.15.7" - resolved "https://registry.yarnpkg.com/jose/-/jose-4.15.7.tgz#96ad68d786632bd03c9068aa281810dbbe1b60d8" - integrity sha512-L7ioP+JAuZe8v+T5+zVI9Tx8LtU8BL7NxkyDFVMv+Qr3JW0jSoYDedLtodaXwfqMpeCyx4WXFNyu9tJt4WvC1A== + version "4.15.5" + resolved "https://registry.yarnpkg.com/jose/-/jose-4.15.5.tgz#6475d0f467ecd3c630a1b5dadd2735a7288df706" + integrity sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg== js-string-escape@^1.0.1: version "1.0.1" @@ -6180,11 +5842,6 @@ jszip@^3.10.1, jszip@^3.9.1: readable-stream "~2.3.6" setimmediate "^1.0.5" -just-extend@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-6.2.0.tgz#b816abfb3d67ee860482e7401564672558163947" - integrity sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw== - jwa@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" @@ -6419,18 +6076,6 @@ lowercase-keys@^2.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== -lru-cache@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -lru-cache@^10.2.0: - version "10.3.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.3.0.tgz#4a4aaf10c84658ab70f79a85a9a3f1e1fb11196b" - integrity sha512-CQl19J/g+Hbjbv4Y3mFNNXFEL/5t/KCg8POCuUqd4rMKjGG+j1ybER83hxV58zL+dFI1PTkt3GNFSHRt+d8qEQ== - lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -6438,13 +6083,21 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" +lru-cache@~4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" + integrity sha512-uQw9OqphAGiZhkuPlpFGmdTU2tEuhxTourM/19qGJrxBPHAr/f8BT1a0i/lOclESnGatdJG/UCkP9kZB/Lh1iw== + dependencies: + pseudomap "^1.0.1" + yallist "^2.0.0" + lru-memoizer@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/lru-memoizer/-/lru-memoizer-2.3.0.tgz#ef0fbc021bceb666794b145eefac6be49dc47f31" - integrity sha512-GXn7gyHAMhO13WSKrIiNfztwxodVsP8IoZ3XfrJV4yH2x0/OeTO/FIaAHTY5YekdGgW94njfuKmyyt1E0mR6Ug== + version "2.2.0" + resolved "https://registry.yarnpkg.com/lru-memoizer/-/lru-memoizer-2.2.0.tgz#b9d90c91637b4b1a423ef76f3156566691293df8" + integrity sha512-QfOZ6jNkxCcM/BkIPnFsqDhtrazLRsghi9mBwFAzol5GCvj4EkFT899Za3+QwikCg5sRX8JstioBDwOxEyzaNw== dependencies: lodash.clonedeep "^4.5.0" - lru-cache "6.0.0" + lru-cache "~4.0.0" lru-queue@^0.1.0: version "0.1.0" @@ -6472,6 +6125,11 @@ make-dir@^4.0.0: dependencies: semver "^7.5.3" +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + makeerror@1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" @@ -6480,12 +6138,12 @@ makeerror@1.0.12: tmpl "1.0.5" memoizee@^0.4.14, memoizee@^0.4.15: - version "0.4.17" - resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.17.tgz#942a5f8acee281fa6fb9c620bddc57e3b7382949" - integrity sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA== + version "0.4.15" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.15.tgz#e6f3d2da863f318d02225391829a6c5956555b72" + integrity sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ== dependencies: - d "^1.0.2" - es5-ext "^0.10.64" + d "^1.0.1" + es5-ext "^0.10.53" es6-weak-map "^2.0.3" event-emitter "^0.3.5" is-promise "^2.2.2" @@ -6509,11 +6167,11 @@ methods@^1.1.2: integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: - version "4.0.7" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" - integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: - braces "^3.0.3" + braces "^3.0.2" picomatch "^2.3.1" mime-db@1.52.0, mime-db@^1.28.0, mime-db@^1.52.0: @@ -6567,13 +6225,6 @@ minimatch@^5.0.1, minimatch@^5.1.0: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.4: - version "9.0.5" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" - integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== - dependencies: - brace-expansion "^2.0.1" - minimist@^1.2.5, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" @@ -6591,11 +6242,6 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" - integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== - minizlib@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" @@ -6680,7 +6326,7 @@ neo-async@^2.6.2: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -next-tick@^1.0.0, next-tick@^1.1.0: +next-tick@1, next-tick@^1.0.0, next-tick@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== @@ -6690,17 +6336,6 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nise@^5.1.9: - version "5.1.9" - resolved "https://registry.yarnpkg.com/nise/-/nise-5.1.9.tgz#0cb73b5e4499d738231a473cd89bd8afbb618139" - integrity sha512-qOnoujW4SV6e40dYxJOb3uvuoPHtmLzIk4TFo+j0jPJoC+5Z9xja5qH5JZobEPsa8+YYphMrOSwnrshEhG2qww== - dependencies: - "@sinonjs/commons" "^3.0.0" - "@sinonjs/fake-timers" "^11.2.2" - "@sinonjs/text-encoding" "^0.7.2" - just-extend "^6.2.0" - path-to-regexp "^6.2.1" - node-dir@^0.1.17: version "0.1.17" resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" @@ -6833,9 +6468,9 @@ object-hash@^3.0.0: integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== object-inspect@^1.13.1: - version "1.13.2" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" - integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== object-keys@^1.1.1: version "1.1.1" @@ -7004,11 +6639,6 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -package-json-from-dist@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" - integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== - pako@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" @@ -7067,19 +6697,6 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-scurry@^1.11.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" - integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== - dependencies: - lru-cache "^10.2.0" - minipass "^5.0.0 || ^6.0.2 || ^7.0.0" - -path-to-regexp@^6.2.1: - version "6.2.2" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.2.tgz#324377a83e5049cbecadc5554d6a63a9a4866b36" - integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw== - path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -7233,6 +6850,11 @@ proxy-from-env@^1.1.0: resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== +pseudomap@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== + pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -7278,11 +6900,6 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -queue-tick@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/queue-tick/-/queue-tick-1.0.1.tgz#f6f07ac82c1fd60f82e098b417a80e52f1f4c142" - integrity sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag== - quick-lru@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" @@ -7301,9 +6918,9 @@ react-is@^18.0.0: integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== read-excel-file@^5.3.4: - version "5.8.3" - resolved "https://registry.yarnpkg.com/read-excel-file/-/read-excel-file-5.8.3.tgz#c2b92a3878cf1c8af0a8a3badfa2e8500a5dd96e" - integrity sha512-XgZQw6/ZPSC1cSaOVumZTkXfxMJFNP4PeGHuNEs54hZPKGVCehKN/yqY1Jrjd9WilJoQpov7XQ3XFI3tAnaDvA== + version "5.8.1" + resolved "https://registry.yarnpkg.com/read-excel-file/-/read-excel-file-5.8.1.tgz#e1ce3119560d831baacd208eeb6efed8cfc5f574" + integrity sha512-P/eFstjAXUQz8qsuim5hb+0414qBSyU76eBJ/HYUhSDRobnWt9VVXIxzVTbdHd33jzjQ/oPffGBDdv55psXcMw== dependencies: "@xmldom/xmldom" "^0.8.2" fflate "^0.7.3" @@ -7350,17 +6967,6 @@ readable-stream@^3.0.0, readable-stream@^3.1.1, readable-stream@^3.4.0, readable string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^4.0.0: - version "4.5.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" - integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== - dependencies: - abort-controller "^3.0.0" - buffer "^6.0.3" - events "^3.3.0" - process "^0.11.10" - string_decoder "^1.3.0" - readable-web-to-node-stream@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz#5d52bb5df7b54861fd48d015e93a2cb87b3ee0bb" @@ -7546,9 +7152,9 @@ sax@1.2.1: integrity sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA== sax@>=0.6.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.4.1.tgz#44cc8988377f126304d3b3fc1010c733b929ef0f" - integrity sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg== + version "1.3.0" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.3.0.tgz#a5dbe77db3be05c9d1ee7785dbd3ea9de51593d0" + integrity sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA== schema-utils@^3.1.1, schema-utils@^3.2.0: version "3.3.0" @@ -7576,7 +7182,7 @@ semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.1.1, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.2: +semver@^7.1.1, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== @@ -7642,30 +7248,26 @@ serverless-plugin-include-dependencies@^5.0.0: semver "^7.1.1" serverless-webpack@^5.13.0: - version "5.14.1" - resolved "https://registry.yarnpkg.com/serverless-webpack/-/serverless-webpack-5.14.1.tgz#4950674a2b011ccb40960b7e70d18be5e7243cf2" - integrity sha512-sRt9WpTHf66M/IeT5b/7O81QT7WzzXKZcZX4QhR8KrMU1CtOWHJCjp5pKKv8LPivCX+YyIwY9n0hHEtHoWhHDw== + version "5.13.0" + resolved "https://registry.yarnpkg.com/serverless-webpack/-/serverless-webpack-5.13.0.tgz#0159dfeae10da502748db0bc761dfa2548cde22e" + integrity sha512-isMEbXbAK1F8YZJfeKgYA5uNuXPFzdHwZyRA9SuMGXVY2L8t1JIzPvRDLZiT4F3uQm16woyal+uaoDyxQo13vg== dependencies: - archiver "^7.0.1" + archiver "^5.3.1" bluebird "^3.7.2" find-yarn-workspace-root "^2.0.0" - fs-extra "^11.2.0" + fs-extra "^11.1.1" glob "^8.1.0" is-builtin-module "^3.2.1" lodash "^4.17.21" - semver "^7.6.2" + semver "^7.3.8" + optionalDependencies: + ts-node ">= 8.3.0" serverless@^3.18.1: - version "3.39.0" - resolved "https://registry.yarnpkg.com/serverless/-/serverless-3.39.0.tgz#699fbea4d0b0ba0baba0510be743f9d025ac363d" - integrity sha512-FHI3fhe4TRS8+ez/KA7HmO3lt3fAynO+N1pCCzYRThMWG0J8RWCI0BI+K0mw9+sEV+QpBCpZRZbuGyUaTsaQew== - dependencies: - "@aws-sdk/client-api-gateway" "^3.588.0" - "@aws-sdk/client-cognito-identity-provider" "^3.588.0" - "@aws-sdk/client-eventbridge" "^3.588.0" - "@aws-sdk/client-iam" "^3.588.0" - "@aws-sdk/client-lambda" "^3.588.0" - "@aws-sdk/client-s3" "^3.588.0" + version "3.38.0" + resolved "https://registry.yarnpkg.com/serverless/-/serverless-3.38.0.tgz#9275763cab3ec1cd29635520cf24b9b5e7202583" + integrity sha512-NJE1vOn8XmQEqfU9UxmVhkUFaCRmx6FhYw/jITN863WlOt4Y3PQbj3hwQyIb5QS1ZrXFq5ojklwewUXH7xGpdA== + dependencies: "@serverless/dashboard-plugin" "^7.2.0" "@serverless/platform-client" "^4.5.1" "@serverless/utils" "^6.13.1" @@ -7789,19 +7391,14 @@ signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -signal-exit@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" - integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== - simple-git@^3.16.0: - version "3.25.0" - resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-3.25.0.tgz#3666e76d6831f0583dc380645945b97e0ac4aab6" - integrity sha512-KIY5sBnzc4yEcJXW7Tdv4viEz8KyG+nU0hay+DWZasvdFOYKeUZ6Xc25LUHHjw0tinPT7O1eY6pzX7pRT1K8rw== + version "3.24.0" + resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-3.24.0.tgz#33a8c88dc6fa74e53eaf3d6bfc27d0182a49ec00" + integrity sha512-QqAKee9Twv+3k8IFOFfPB2hnk6as6Y6ACUpwCtQvRYBAes23Wv3SZlHVobAzqcE8gfsisCvPw3HGW3HYM+VYYw== dependencies: "@kwsites/file-exists" "^1.1.1" "@kwsites/promise-deferred" "^1.1.1" - debug "^4.3.5" + debug "^4.3.4" simple-swizzle@^0.2.2: version "0.2.2" @@ -7810,18 +7407,6 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -sinon@^17.0.0: - version "17.0.2" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-17.0.2.tgz#470894bcc2d24b01bad539722ea46da949892405" - integrity sha512-uihLiaB9FhzesElPDFZA7hDcNABzsVHwr3YfmM9sBllVwab3l0ltGlRV1XhpNfIacNDLGD1QRZNLs5nU5+hTuA== - dependencies: - "@sinonjs/commons" "^3.0.1" - "@sinonjs/fake-timers" "^11.2.2" - "@sinonjs/samsam" "^8.0.0" - diff "^5.2.0" - nise "^5.1.9" - supports-color "^7" - sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -7899,9 +7484,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.18" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz#22aa922dcf2f2885a6494a261f2d8b75345d0326" - integrity sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ== + version "3.0.17" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz#887da8aa73218e51a1d917502d79863161a93f9c" + integrity sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg== split2@^3.1.1, split2@^3.2.2: version "3.2.2" @@ -7916,11 +7501,11 @@ sprintf-js@~1.0.2: integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== sprintf-kit@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/sprintf-kit/-/sprintf-kit-2.0.2.tgz#e79f0c6076d2bc656b5fb55fa43b737ca98d3ecf" - integrity sha512-lnapdj6W4LflHZGKvl9eVkz5YF0xaTrqpRWVA4cNVOTedwqifIP8ooGImldzT/4IAN5KXFQAyXTdLidYVQdyag== + version "2.0.1" + resolved "https://registry.yarnpkg.com/sprintf-kit/-/sprintf-kit-2.0.1.tgz#bb837e8fa4b28f094531d8e33669120027236bb8" + integrity sha512-2PNlcs3j5JflQKcg4wpdqpZ+AjhQJ2OZEo34NXDtlB0tIPG84xaaXhpA8XFacFiwjKA4m49UOYG83y3hbMn/gQ== dependencies: - es5-ext "^0.10.64" + es5-ext "^0.10.53" stack-trace@0.0.x: version "0.0.10" @@ -7935,9 +7520,9 @@ stack-utils@^2.0.3: escape-string-regexp "^2.0.0" stream-buffers@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-3.0.3.tgz#9fc6ae267d9c4df1190a781e011634cac58af3cd" - integrity sha512-pqMqwQCso0PBJt2PQmDO0cFj0lyqmiwOMiMSkVtRokl7e+ZTRYgDHKnuZNbqjiJXgsg4nuqtD/zxuo9KqTp0Yw== + version "3.0.2" + resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-3.0.2.tgz#5249005a8d5c2d00b3a32e6e0a6ea209dc4f3521" + integrity sha512-DQi1h8VEBA/lURbSwFtEHnSTb9s2/pwLEaFuNhXwy1Dx3Sa0lOuYT2yNUr4/j2fs8oCAMANtrZ5OrPZtyVs3MQ== stream-promise@^3.2.0: version "3.2.0" @@ -7948,17 +7533,6 @@ stream-promise@^3.2.0: es5-ext "^0.10.49" is-stream "^1.1.0" -streamx@^2.15.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.18.0.tgz#5bc1a51eb412a667ebfdcd4e6cf6a6fc65721ac7" - integrity sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ== - dependencies: - fast-fifo "^1.3.2" - queue-tick "^1.0.1" - text-decoder "^1.1.0" - optionalDependencies: - bare-events "^2.2.0" - string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -7967,7 +7541,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -8013,7 +7587,7 @@ string.prototype.trimstart@^1.0.8: define-properties "^1.2.1" es-object-atoms "^1.0.0" -string_decoder@^1.1.1, string_decoder@^1.3.0: +string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -8027,7 +7601,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -8119,7 +7693,7 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" -supports-color@^7, supports-color@^7.1.0: +supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== @@ -8174,15 +7748,6 @@ tar-stream@^2.2.0: inherits "^2.0.3" readable-stream "^3.1.1" -tar-stream@^3.0.0: - version "3.1.7" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.7.tgz#24b3fb5eabada19fe7338ed6d26e5f7c482e792b" - integrity sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ== - dependencies: - b4a "^1.6.4" - fast-fifo "^1.2.0" - streamx "^2.15.0" - tar@^6.1.15: version "6.2.1" resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" @@ -8207,9 +7772,9 @@ terser-webpack-plugin@^5.3.10: terser "^5.26.0" terser@^5.26.0: - version "5.31.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.1.tgz#735de3c987dd671e95190e6b98cfe2f07f3cf0d4" - integrity sha512-37upzU1+viGvuFtBo9NPufCb9dwM0+l9hMxYyWfBA+fbwrPqNJAhbZ6W47bBFnZHKHTUBnMvi87434qq+qnxOg== + version "5.31.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.0.tgz#06eef86f17007dbad4593f11a574c7f5eb02c6a1" + integrity sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2" @@ -8225,13 +7790,6 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" -text-decoder@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/text-decoder/-/text-decoder-1.1.0.tgz#3379e728fcf4d3893ec1aea35e8c2cac215ef190" - integrity sha512-TmLJNj6UgX8xcUZo4UDStGQtDiTzF7BzWlzn9g7UWrjkpHr5uJTK1ld16wZ3LXb2vb6jH8qU89dW5whuMdXYdw== - dependencies: - b4a "^1.6.4" - text-hex@1.0.x: version "1.0.0" resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" @@ -8248,12 +7806,12 @@ through@^2.3.6, through@^2.3.8: integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== timers-ext@^0.1.7: - version "0.1.8" - resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.8.tgz#b4e442f10b7624a29dd2aa42c295e257150cf16c" - integrity sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww== + version "0.1.7" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6" + integrity sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ== dependencies: - es5-ext "^0.10.64" - next-tick "^1.1.0" + es5-ext "~0.10.46" + next-tick "1" tiny-inflate@^1.0.2: version "1.0.3" @@ -8328,15 +7886,34 @@ triple-beam@^1.3.0: resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg== -tslib@^1.8.1: +"ts-node@>= 8.3.0": + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + +tslib@^1.11.1, tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.1.0, tslib@^2.6.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" - integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== +tslib@^2.1.0, tslib@^2.3.1, tslib@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== tsutils@^3.21.0: version "3.21.0" @@ -8345,7 +7922,7 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" -type-detect@4.0.8, type-detect@^4.0.8: +type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== @@ -8376,9 +7953,9 @@ type-fest@^3.0.0: integrity sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g== type@^2.1.0, type@^2.5.0, type@^2.6.0, type@^2.7.2: - version "2.7.3" - resolved "https://registry.yarnpkg.com/type/-/type-2.7.3.tgz#436981652129285cc3ba94f392886c2637ea0486" - integrity sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ== + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== typed-array-buffer@^1.0.2: version "1.0.2" @@ -8502,7 +8079,7 @@ unzipper@^0.10.11: readable-stream "~2.3.6" setimmediate "~1.0.4" -update-browserslist-db@^1.0.16: +update-browserslist-db@^1.0.13: version "1.0.16" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== @@ -8556,10 +8133,15 @@ uuid@^9.0.0, uuid@^9.0.1: resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + v8-to-istanbul@^9.0.1: - version "9.3.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175" - integrity sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA== + version "9.2.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" + integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== dependencies: "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" @@ -8625,9 +8207,9 @@ webpack-sources@^3.2.3: integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== webpack@^5.91.0: - version "5.92.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.92.1.tgz#eca5c1725b9e189cffbd86e8b6c3c7400efc5788" - integrity sha512-JECQ7IwJb+7fgUFBlrJzbyu3GEuNBcdqr1LD7IbSzwkSmIevTm8PF+wej3Oxuz/JFBUZ6O1o43zsPkwm1C4TmA== + version "5.91.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.91.0.tgz#ffa92c1c618d18c878f06892bbdc3373c71a01d9" + integrity sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^1.0.5" @@ -8635,10 +8217,10 @@ webpack@^5.91.0: "@webassemblyjs/wasm-edit" "^1.12.1" "@webassemblyjs/wasm-parser" "^1.12.1" acorn "^8.7.1" - acorn-import-attributes "^1.9.5" + acorn-import-assertions "^1.9.0" browserslist "^4.21.10" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.17.0" + enhanced-resolve "^5.16.0" es-module-lexer "^1.2.1" eslint-scope "5.1.1" events "^3.2.0" @@ -8731,19 +8313,19 @@ winston@^3.8.0: triple-beam "^1.3.0" winston-transport "^4.7.0" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== +wrap-ansi@^6.0.1: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== dependencies: ansi-styles "^4.0.0" string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^6.0.1: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" string-width "^4.1.0" @@ -8782,14 +8364,14 @@ write-file-atomic@^4.0.2: signal-exit "^3.0.7" ws@^7.5.3, ws@^7.5.9: - version "7.5.10" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" - integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + version "7.5.9" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== ws@^8.11.0: - version "8.17.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" - integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== + version "8.17.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" + integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== xml2js@0.6.2: version "0.6.2" @@ -8814,6 +8396,11 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== +yallist@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== + yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" @@ -8863,6 +8450,11 @@ yauzl@^2.4.2: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" @@ -8876,12 +8468,3 @@ zip-stream@^4.1.0: archiver-utils "^3.0.4" compress-commons "^4.1.2" readable-stream "^3.6.0" - -zip-stream@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-6.0.1.tgz#e141b930ed60ccaf5d7fa9c8260e0d1748a2bbfb" - integrity sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA== - dependencies: - archiver-utils "^5.0.0" - compress-commons "^6.0.2" - readable-stream "^4.0.0"